2010-11-22 23:44:52 +01:00
|
|
|
/**
|
2011-05-03 09:26:32 +02:00
|
|
|
* EGroupware infolog javascript code used on index page
|
|
|
|
*
|
|
|
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
|
|
|
* @package infolog
|
|
|
|
* @link http://www.egroupware.org
|
|
|
|
* @version $Id$
|
2010-11-22 23:44:52 +01:00
|
|
|
*/
|
|
|
|
|
2011-05-04 01:31:40 +02:00
|
|
|
/**
|
|
|
|
* Confirm delete
|
|
|
|
* If entry has children, asks if you want to delete children too
|
|
|
|
*
|
|
|
|
* @param _action
|
|
|
|
* @param _senders
|
|
|
|
*/
|
|
|
|
function confirm_delete(_action, _senders)
|
|
|
|
{
|
|
|
|
var children = false;
|
2011-06-03 10:55:18 +02:00
|
|
|
var child_button = document.getElementById(egw_globalObjectManager.getObjectById('infolog.index.rows').etemplate_var_prefix+'[delete_sub]');
|
2011-05-04 01:31:40 +02:00
|
|
|
if(child_button) {
|
|
|
|
for(var i = 0; i < _senders.length; i++) {
|
2011-07-03 11:12:55 +02:00
|
|
|
if ($j(_senders[i].iface.node).hasClass('rowHasSubs')) {
|
2011-05-05 08:30:44 +02:00
|
|
|
children = true;
|
|
|
|
break;
|
|
|
|
}
|
2011-05-04 01:31:40 +02:00
|
|
|
}
|
|
|
|
child_button.style.display = children ? 'block' : 'none';
|
|
|
|
}
|
2011-05-07 10:51:35 +02:00
|
|
|
nm_open_popup(_action, _senders);
|
2010-11-22 23:44:52 +01:00
|
|
|
}
|