Browse Source

[UPDATE] allow for custom setting of icon order on default actions

experimental
Georgi Hristov 2 years ago
parent
commit
ec243dd9f4
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      modules/Utils/GenericBrowser/GenericBrowser_0.php

+ 4
- 4
modules/Utils/GenericBrowser/GenericBrowser_0.php View File

@@ -194,10 +194,10 @@ class Utils_GenericBrowser extends Module {
public function __add_row_action($num,$tag_attrs,$label,$tooltip,$icon,$order=0,$off=false,$size=1) {
if (!isset($icon)) $icon = strtolower(trim($label));
switch ($icon) {
case 'view': $order = -3; break;
case 'edit': $order = -2; break;
case 'delete': $order = -1; break;
case 'info': $order = 1000; break;
case 'view': $order = $order?: -3; break;
case 'edit': $order = $order?: -2; break;
case 'delete': $order = $order?: -1; break;
case 'info': $order = $order?: 1000; break;
}
$this->actions[$num][$icon] = array('tag_attrs'=>$tag_attrs,'label'=>$label,'tooltip'=>$tooltip, 'off'=>$off, 'size'=>$size, 'order'=>$order);
$this->en_actions = true;


Loading…
Cancel
Save