CC-3715 : Library- carry over selected state between pages, be like gmail include select all/none

This commit is contained in:
Naomi Aro 2012-04-27 11:22:44 +02:00
parent 2c84420424
commit b9e13d3b08
5 changed files with 141 additions and 75 deletions

View file

@ -5,16 +5,15 @@ var AIRTIME = (function(AIRTIME){
AIRTIME.library = {};
}
AIRTIME.library.events = {};
mod = AIRTIME.library.events;
mod = AIRTIME.library;
mod.enableAddButtonCheck = function() {
var selected = $('#library_display tr input[type=checkbox]').filter(":checked"),
mod.checkAddButton = function() {
var selected = mod.getChosenItemsLength(),
cursor = $('tr.cursor-selected-row'),
check = false;
//make sure library items are selected and a cursor is selected.
if (selected.length !== 0 && cursor.length !== 0) {
if (mod.chosenItems.length !== 0 && cursor.length !== 0) {
check = true;
}
@ -36,6 +35,9 @@ var AIRTIME = (function(AIRTIME){
mod.fnDrawCallback = function fnLibDrawCallback() {
mod.redrawChosen();
mod.checkToolBarIcons();
$('#library_display tr:not(:first)').draggable({
helper: function(){
var selected = $('#library_display tr:not(:first) input:checked').parents('tr'),
@ -73,7 +75,7 @@ var AIRTIME = (function(AIRTIME){
},
cursor: 'pointer',
connectToSortable: '#show_builder_table'
});
});
};
mod.setupLibraryToolbar = function() {