Tab switching "x records" message is resetting from now on. Added "do nothing" for batch operations. Closes #15

This commit is contained in:
Malishev Dmitry 2012-01-10 12:34:14 +03:00
parent c8c8e90435
commit f2c1e0ed5e
3 changed files with 25 additions and 3 deletions

View file

@ -54,6 +54,11 @@ App.Actions.update_cs_value = function(evt)
var val = elm.find('.c-s-value').val();
$('.complex-select-content').addClass('hidden');
if (val.toLowerCase() == 'nothing') {
App.Actions.mass_nothing();
return;
}
if (App.Tmp[App.Env.world + '_selected_records'] > 0) {
var confirm_message_key = App.Tmp[App.Env.world + '_selected_records'] == 1 ? 1 + ' record' : App.Tmp[App.Env.world + '_selected_records'] + ' records';
var confirmed = confirm('This action will ' + val.toLowerCase() + ' ' + confirm_message_key + '. Do you want to proceede?');
@ -83,6 +88,11 @@ App.Actions.mass_unsuspend = function()
App.Actions.reset_batch();
}
App.Actions.mass_nothing = function()
{
$('.complex-select-content').addClass('hidden');
}
App.Actions.mass_action = function(method_name)
{
var rows = $('.checked-row');