[refs #193] Add lost file with wiki_history checkboxes script

This commit is contained in:
konstantin.grabar 2012-02-21 20:11:16 +04:00
parent 81393d7f5b
commit 3a48f8dea9
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
// Disable checkboxes selection for history table for more than 2 versions:
//$(document).ready(function() {
if ('.wiki .history') {
$('.niceCheck-main').click(function() {
var count = 0;
$('input.history_cbx').each(function(i,el) {
if ($(el).attr('checked')) {
count = count + 1;
}
});
if (count > 2) {
var cbx = $( $(this).find('input.history_cbx')[0] );
if ( cbx.attr('checked') ) {
$(this).css('background-position', '0pt 0px');
cbx.removeAttr('checked');
}
}
});
}
//});