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;
|
2012-04-10 22:28:31 +02:00
|
|
|
var child_button = jQuery('#delete_sub').get(0) || jQuery('[id*="delete_sub"]').get(0);
|
2011-05-04 01:31:40 +02:00
|
|
|
if(child_button) {
|
|
|
|
for(var i = 0; i < _senders.length; i++) {
|
2011-07-03 11:00:36 +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
|
|
|
}
|