From 594fe78d0969b8d665c28d154d5097148321d16a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 27 Apr 2011 16:59:12 +0000 Subject: [PATCH] enable via a class and no more need to set enabled='javascript:nm...' for enableClass or disableClass --- addressbook/inc/class.addressbook_ui.inc.php | 7 ------- timesheet/inc/class.timesheet_ui.inc.php | 4 +--- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index 7d50f3e7b5..52f771956b 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -364,7 +364,6 @@ class addressbook_ui extends addressbook_bo 'url' => 'menuaction=addressbook.addressbook_ui.edit&contact_id=$id', 'popup' => egw_link::get_registry('addressbook', 'add_popup'), 'group' => $group, - 'enabled' => 'javaScript:nm_not_disableClass', 'disableClass' => 'rowNoEdit', ), 'add' => array( @@ -438,14 +437,12 @@ class addressbook_ui extends addressbook_bo 'addressbook',$group,'Add category', 'cat_add_' )+array( 'icon' => 'foldertree_nolines_plus', - 'enabled' => 'javaScript:nm_not_disableClass', 'disableClass' => 'rowNoEdit', ), 'cat_del' => nextmatch_widget::category_action( 'addressbook',$group,'Delete category', 'cat_del_' )+array( 'icon' => 'foldertree_nolines_minus', - 'enabled' => 'javaScript:nm_not_disableClass', 'disableClass' => 'rowNoEdit', ), 'cat_edit' => array( @@ -477,7 +474,6 @@ class addressbook_ui extends addressbook_bo 'children' => $add_lists, 'prefix' => 'to_list_', 'icon' => 'foldertree_nolines_plus', - 'enabled' => 'javaScript:nm_not_disableClass', 'disableClass' => 'rowNoEdit', ), 'remove_from_list' => array( @@ -514,7 +510,6 @@ class addressbook_ui extends addressbook_bo 'children' => $move2addressbooks, 'prefix' => 'move_to_', 'group' => $group, - 'enabled' => 'javaScript:nm_not_disableClass', 'disableClass' => 'rowNoDelete', ); } @@ -597,7 +592,6 @@ class addressbook_ui extends addressbook_bo 'confirm' => 'Delete this contact', 'confirm_multiple' => 'Delete these entries', 'group' => $group, - 'enabled' => 'javaScript:nm_not_disableClass', 'disableClass' => 'rowNoDelete', ); } @@ -606,7 +600,6 @@ class addressbook_ui extends addressbook_bo $actions['undelete'] = array( 'caption' => 'Un-delete', 'group' => $group, - 'enabled' => 'javaScript:nm_not_disableClass', 'disableClass' => 'rowNoEdit', ); } diff --git a/timesheet/inc/class.timesheet_ui.inc.php b/timesheet/inc/class.timesheet_ui.inc.php index 038af0d56a..f874ec3e98 100644 --- a/timesheet/inc/class.timesheet_ui.inc.php +++ b/timesheet/inc/class.timesheet_ui.inc.php @@ -895,7 +895,6 @@ class timesheet_ui extends timesheet_bo 'url' => 'menuaction=timesheet.timesheet_ui.edit&ts_id=$id', 'popup' => egw_link::get_registry('timesheet', 'add_popup'), 'group' => $group, - 'enabled' => 'javaScript:nm_not_disableClass', 'disableClass' => 'rowNoEdit', ), */ @@ -932,7 +931,6 @@ class timesheet_ui extends timesheet_bo 'confirm' => 'Delete this entry', 'confirm_multiple' => 'Delete these entries', 'group' => ++$group, - 'enabled' => 'javaScript:nm_not_disableClass', 'disableClass' => 'rowNoDelete', ), ); @@ -941,7 +939,7 @@ class timesheet_ui extends timesheet_bo { if ($actions[$action]['enabled']) { - $actions[$action]['enabled'] = 'javaScript:nm_not_disableClass'; + $actions[$action]['enabled'] = 'javaScript:nm_not_disableClass'; // required! $actions[$action]['disableClass'] = 'rowNoEdit'; } }