mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-12 17:08:34 +01:00
Don't try to select all if the current search filters give no results, give an alert to select something
This commit is contained in:
parent
1500c4f739
commit
203fb83f0d
@ -134,7 +134,7 @@ class importexport_admin_prefs_sidebox_hooks
|
|||||||
'text' => in_array($appname, array('calendar', 'sitemgr')) ? 'Export' : 'Export CSV'
|
'text' => in_array($appname, array('calendar', 'sitemgr')) ? 'Export' : 'Export CSV'
|
||||||
);
|
);
|
||||||
if($GLOBALS['egw_info']['flags']['disable_importexport']['export']) {
|
if($GLOBALS['egw_info']['flags']['disable_importexport']['export']) {
|
||||||
unset($file['Export CSV']['link']);
|
$file['Export CSV']['link'] = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(($file_list = bo_merge::get_documents($GLOBALS['egw_info']['user']['preferences'][$appname]['document_dir'], '', array(
|
if(($file_list = bo_merge::get_documents($GLOBALS['egw_info']['user']['preferences'][$appname]['document_dir'], '', array(
|
||||||
@ -161,8 +161,14 @@ if(actionMgr && objectMgr && win.egwAction) {
|
|||||||
if(objectMgr.selectedChildren.length == 0) {
|
if(objectMgr.selectedChildren.length == 0) {
|
||||||
// Be nice and select all, if they forgot to select any
|
// Be nice and select all, if they forgot to select any
|
||||||
if(actionMgr.getActionById(\'select_all\')) {
|
if(actionMgr.getActionById(\'select_all\')) {
|
||||||
actionMgr.getActionById(\'select_all\').set_checked(true);
|
var total = parseInt($(\'span#total\',actionMgr.etemplate_form).text());
|
||||||
toggle_select = true;
|
if(total > 0) {
|
||||||
|
actionMgr.getActionById(\'select_all\').set_checked(true);
|
||||||
|
toggle_select = true;
|
||||||
|
} else {
|
||||||
|
alert(\''.lang('You need to select some entries first!').'\');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
win.nm_action(action, objectMgr.selectedChildren);
|
win.nm_action(action, objectMgr.selectedChildren);
|
||||||
|
Loading…
Reference in New Issue
Block a user