2012-02-08 14:01:00 +00:00
|
|
|
//= require jquery
|
|
|
|
//= require jquery_ujs
|
|
|
|
//= require jquery-ui
|
|
|
|
//= require autocomplete-rails
|
|
|
|
//= require vendor
|
2012-03-13 15:05:33 +00:00
|
|
|
//= require jquery.dataTables_ext
|
2012-06-04 20:49:20 +01:00
|
|
|
//= require lib/lib
|
2012-03-01 17:33:46 +00:00
|
|
|
//= require_tree ./design
|
|
|
|
//= require_tree ./extra
|
2012-04-09 18:11:39 +01:00
|
|
|
|
|
|
|
//= require underscore
|
|
|
|
//= require backbone
|
|
|
|
//= require backbone_rails_sync
|
|
|
|
//= require backbone_datalink
|
|
|
|
//= require backbone/rosa
|
2012-03-01 17:33:46 +00:00
|
|
|
//= require_self
|
2012-02-08 14:01:00 +00:00
|
|
|
|
2012-03-03 16:03:23 +00:00
|
|
|
function disableNotifierCbx(global_cbx) {
|
|
|
|
if ($(global_cbx).attr('checked')) {
|
|
|
|
$('.notify_cbx').removeAttr('disabled');
|
|
|
|
$('.notify_cbx').each(function(i,el) { $(el).prev().removeAttr('disabled'); })
|
|
|
|
} else {
|
|
|
|
$('.notify_cbx').attr('disabled', 'disabled');
|
|
|
|
$('.notify_cbx').each(function(i,el) { $(el).prev().attr('disabled', 'disabled'); })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
2012-04-17 14:39:14 +01:00
|
|
|
// setup all placeholders on page
|
|
|
|
$('input[placeholder], textarea[placeholder]').placeholder();
|
|
|
|
|
|
|
|
|
2012-03-03 16:03:23 +00:00
|
|
|
$('input.user_role_chbx').click(function() {
|
|
|
|
var current = $(this);
|
|
|
|
current.parent().find('input.user_role_chbx').each(function(i,el) {
|
|
|
|
if ($(el).attr('id') != current.attr('id')) {
|
|
|
|
$(el).removeAttr('checked');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#settings_notifier_can_notify').click(function() {
|
|
|
|
disableNotifierCbx($(this));
|
|
|
|
});
|
|
|
|
|
|
|
|
$('div.information > div.profile > a').live('click', function(e) {
|
|
|
|
e.preventDefault();
|
|
|
|
});
|
2012-03-21 10:25:30 +00:00
|
|
|
|
|
|
|
$('.more_activities').live('click', function(){
|
|
|
|
var button = $(this);
|
|
|
|
$.ajax({
|
|
|
|
type: 'GET',
|
|
|
|
url: button.attr("href"),
|
|
|
|
success: function(data){
|
|
|
|
button.fadeOut('slow').after(data);
|
|
|
|
button.remove();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
|
2012-04-05 08:26:03 +01:00
|
|
|
$('.description-top .git_help').click(function() {
|
|
|
|
$('#git_help_data').toggle();
|
|
|
|
var desc = $('.description-top');
|
|
|
|
|
|
|
|
if ($('#git_help_data').css('display') == 'none') {
|
|
|
|
desc.css('height', '38px');
|
|
|
|
} else {
|
2012-04-05 21:21:19 +01:00
|
|
|
desc.css('height', '196px');
|
2012-04-05 08:26:03 +01:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2012-03-03 16:03:23 +00:00
|
|
|
});
|