2014-03-30 06:45:52 +01:00
|
|
|
//= require jquery
|
2014-04-11 09:57:00 +01:00
|
|
|
//= require jquery_ujs
|
2014-05-26 18:42:27 +01:00
|
|
|
//= require jquery-ui
|
2014-04-02 11:32:35 +01:00
|
|
|
//= require js-routes
|
2014-04-04 11:12:25 +01:00
|
|
|
|
2014-10-23 09:46:49 +01:00
|
|
|
//= require bootstrap-sprockets
|
2014-04-04 11:12:25 +01:00
|
|
|
|
2014-04-08 14:11:34 +01:00
|
|
|
//= require angular
|
|
|
|
//= require angular-sanitize
|
|
|
|
//= require angular-ui-bootstrap-tpls
|
2014-04-11 09:57:00 +01:00
|
|
|
//= require ui-codemirror
|
2014-04-04 11:12:25 +01:00
|
|
|
//= require angular-i18n
|
2014-04-08 14:11:34 +01:00
|
|
|
|
2014-05-26 18:42:27 +01:00
|
|
|
//= require angular-resource
|
|
|
|
//= require ng-rails-csrf
|
|
|
|
//= require angular-cookies
|
|
|
|
//= require soundmanager2-nodebug-jsmin
|
|
|
|
|
2014-10-16 11:43:52 +01:00
|
|
|
//= require angular-rails-templates
|
|
|
|
|
2014-04-04 11:12:25 +01:00
|
|
|
//= require moment
|
|
|
|
|
2015-02-02 21:15:31 +00:00
|
|
|
//= require_tree ./angularjs
|
2014-04-04 11:12:25 +01:00
|
|
|
//= require loading-bar
|
2014-05-26 18:42:27 +01:00
|
|
|
|
|
|
|
//= require underscore
|
|
|
|
|
2014-07-01 15:52:52 +01:00
|
|
|
//= require zeroclipboard
|
|
|
|
|
2014-11-07 22:09:32 +00:00
|
|
|
//= require lib/Chart
|
2014-11-10 22:21:48 +00:00
|
|
|
//= require lib/bootstrap-typeahead
|
|
|
|
//= require lib/custom-bootstrap-typeahead
|
2014-11-10 18:46:44 +00:00
|
|
|
//= require extra/highlight
|
2014-11-07 22:09:32 +00:00
|
|
|
|
2014-12-11 17:39:13 +00:00
|
|
|
//= require extra/pull
|
2014-12-25 13:29:43 +00:00
|
|
|
//= require extra/scroller
|
2015-02-09 10:02:51 +00:00
|
|
|
//= require extra/fork
|
2014-12-11 17:39:13 +00:00
|
|
|
|
2014-06-03 10:21:13 +01:00
|
|
|
//= require_self
|
|
|
|
|
|
|
|
function setCookie (name, value, expires, path, domain, secure) {
|
|
|
|
document.cookie = name + "=" + escape(value) +
|
|
|
|
((expires) ? "; expires=" + expires : "") +
|
|
|
|
((path) ? "; path=" + path : "") +
|
|
|
|
((domain) ? "; domain=" + domain : "") +
|
|
|
|
((secure) ? "; secure" : "");
|
|
|
|
}
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
2014-07-09 12:56:21 +01:00
|
|
|
$('.notify.alert button.close').click(function () {
|
2014-06-03 10:21:13 +01:00
|
|
|
var exdate=new Date();
|
|
|
|
exdate.setDate(exdate.getDate() + 365);
|
|
|
|
var expires="expires="+exdate.toUTCString();
|
|
|
|
setCookie("flash_notify_hash", FLASH_HASH_ID, expires);
|
|
|
|
});
|
2014-07-01 15:52:52 +01:00
|
|
|
|
2015-01-14 12:07:32 +00:00
|
|
|
var clip = new ZeroClipboard($("#copy_to_clipboard"));
|
2014-07-08 15:52:10 +01:00
|
|
|
|
|
|
|
$('.datetime_moment').each(function() {
|
2015-02-04 12:44:59 +00:00
|
|
|
var mtime = moment($(this).attr('origin_datetime'), 'YYYY-MM-DD HH:mm Z');
|
|
|
|
$(this).attr('title', mtime.utc().format('YYYY-MM-DD HH:mm:ss UTC'));
|
2014-07-08 15:52:10 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
window.updateTime = function () {
|
|
|
|
$('.datetime_moment').each(function() {
|
2015-02-04 12:44:59 +00:00
|
|
|
var time = moment($(this).attr('origin_datetime'), 'YYYY-MM-DD HH:mm Z');
|
2014-11-07 17:53:27 +00:00
|
|
|
$(this).html(time.format('D MMM YYYY, HH:mm') + ' (' + time.fromNow() + ')');
|
2014-07-08 15:52:10 +01:00
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
updateTime();
|
|
|
|
setInterval( updateTime, 15000 );
|
2014-07-09 12:55:40 +01:00
|
|
|
|
|
|
|
// TODO refactoring
|
|
|
|
$('#branch_selector').change(function() {
|
|
|
|
var form = $('form#branch_changer');
|
|
|
|
form.attr('action', $(this).val());
|
|
|
|
form.submit();
|
|
|
|
});
|
2014-07-09 12:56:21 +01:00
|
|
|
|
|
|
|
$('#create_fork').click(function () {
|
|
|
|
$(this).button('loading');
|
|
|
|
});
|
|
|
|
|
2015-01-13 23:17:23 +00:00
|
|
|
$('[data-toggle="tooltip"]').tooltip();
|
2014-06-03 10:21:13 +01:00
|
|
|
});
|