diff --git a/etemplate/inc/class.nextmatch_widget.inc.php b/etemplate/inc/class.nextmatch_widget.inc.php index 27f6cdf792..f397ef7fc1 100644 --- a/etemplate/inc/class.nextmatch_widget.inc.php +++ b/etemplate/inc/class.nextmatch_widget.inc.php @@ -565,6 +565,7 @@ class nextmatch_widget static $default_icons = array( 'view' => 'view', 'edit' => 'edit', + 'open' => 'edit', // does edit if possible, otherwise view 'add' => 'new', 'delete' => 'delete', 'cat' => 'attach', // add as category icon to api diff --git a/phpgwapi/lang/egw_de.lang b/phpgwapi/lang/egw_de.lang index bb959cf3d3..e20e348e56 100644 --- a/phpgwapi/lang/egw_de.lang +++ b/phpgwapi/lang/egw_de.lang @@ -497,6 +497,7 @@ on mouse over common de On Maus Over only private common de nur private only yours common de nur eigene oops! you caught us in the middle of system maintainance. common de Hoppla! Sie haben uns in der Mitte einer Systemwartung erwischt. +open common de Öffnen open notify window common de Benachrichtigungsfenster öffnen open popup window common de Popup Fenster öffnen open sidebox common de Seitenmenü öffnen @@ -764,6 +765,7 @@ what style would you like the image to have? common de Welchen Stil soll das Bil when you say yes the home and logout buttons are presented as applications in the main top applcation bar. common de Wenn Sie dies aktivieren, werden die Start und Abmelde Symbole als Anwendungen im oberen Anwendungsbalken angezeigt. where and how will the egroupware links like preferences, about and logout be displayed. common de Wo und wie werden die EGroupware Verknüpfungen wie Einstellungen, Über ..., und Abmelden angezeigt. which groups common de Welche Gruppen +whole query common de Gesamte Abfrage width common de Breite wk jscalendar de KW work email common de geschäftliche E-Mail diff --git a/phpgwapi/lang/egw_en.lang b/phpgwapi/lang/egw_en.lang index 6152889736..9d80af3b6f 100644 --- a/phpgwapi/lang/egw_en.lang +++ b/phpgwapi/lang/egw_en.lang @@ -498,6 +498,7 @@ on mouse over common en On Mouse Over only private common en only private only yours common en only yours oops! you caught us in the middle of system maintainance. common en Oops! You caught us in the middle of system maintainance. +open common en Open open notify window common en Open notify window open popup window common en Open popup window open sidebox common en Open sidebox @@ -765,6 +766,7 @@ what style would you like the image to have? common en What style would you like when you say yes the home and logout buttons are presented as applications in the main top applcation bar. common en When you say yes the home and logout buttons are presented as applications in the main top applcation bar. where and how will the egroupware links like preferences, about and logout be displayed. common en Where and how will the egroupware links like preferences, about and logout be displayed. which groups common en Which groups +whole query common en Whole query width common en Width wk jscalendar en wk work email common en work email diff --git a/timesheet/inc/class.timesheet_ui.inc.php b/timesheet/inc/class.timesheet_ui.inc.php index 7461100ca8..52b53fad7e 100644 --- a/timesheet/inc/class.timesheet_ui.inc.php +++ b/timesheet/inc/class.timesheet_ui.inc.php @@ -791,7 +791,7 @@ class timesheet_ui extends timesheet_bo { $msg .= lang('%1 timesheets(s) %2',$success,$action_msg); } - elseif(is_null($msg)) + elseif(empty($msg)) { $msg .= lang('%1 timesheets(s) %2, %3 failed because of insufficent rights !!!',$success,$action_msg,$failed); } @@ -868,6 +868,15 @@ class timesheet_ui extends timesheet_bo private function get_actions() { $actions = array( + 'open' => array( // does edit if allowed, otherwise view + 'caption' => 'Open', + 'default' => true, + 'allowOnMultiple' => false, + 'url' => 'menuaction=timesheet.timesheet_ui.edit&ts_id=$id', + 'popup' => egw_link::get_registry('timesheet', 'add_popup'), + 'group' => $group=1, + ), +/* 'view' => array( 'caption' => 'View', 'default' => true, @@ -885,6 +894,7 @@ class timesheet_ui extends timesheet_bo 'enabled' => 'javaScript:nm_not_disableClass', 'disableClass' => 'rowNoEdit', ), +*/ 'add' => array( 'caption' => 'Add', 'url' => 'menuaction=timesheet.timesheet_ui.edit', @@ -908,7 +918,6 @@ class timesheet_ui extends timesheet_bo 'children' => $this->status_labels, 'prefix' => 'to_status_', 'enabled' => (boolean)$this->status_labels, - 'hideOnDisabled' => true, ), 'document' => array( 'caption' => lang('Insert in %1',egw_vfs::basename($GLOBALS['egw_info']['user']['preferences']['timesheet']['default_document'])), @@ -928,7 +937,16 @@ class timesheet_ui extends timesheet_bo 'disableClass' => 'rowNoDelete', ), ); - + // enable additonal edit check for following actions, if they are generally available + foreach(array('cat','status') as $action) + { + if ($actions[$action]['enabled']) + { + $actions[$action]['enabled'] = 'javaScript:nm_not_disableClass'; + $actions[$action]['disableClass'] = 'rowNoEdit'; + } + } + //_debug_array($actions); return $actions; } @@ -946,7 +964,6 @@ class timesheet_ui extends timesheet_bo */ function action($action,$checked,$use_all,&$success,&$failed,&$action_msg,$session_name,&$msg) { - //echo "

uicontacts::action('$action',".print_r($checked,true).','.(int)$use_all.",...)

\n"; $success = $failed = 0; if ($use_all) { @@ -960,6 +977,7 @@ class timesheet_ui extends timesheet_bo $this->get_rows($query,$checked,$readonlys,true); // true = only return the id's } } + //error_log(__METHOD__."('$action', ".array2string($checked).', '.array2string($use_all).",,, '$session_name')"); if (substr($action,0,9) == 'to_status') {