Give automatically added 'Select All' action its own group

This commit is contained in:
Nathan Gray 2013-11-15 19:59:25 +00:00
parent 0befd85d04
commit c1fd6e5acb

View File

@ -645,7 +645,7 @@ class etemplate_widget_nextmatch extends etemplate_widget
), ),
'group' => $action['group'], 'group' => $action['group'],
); );
$action_links[] = $prefix.'select_all'; $action_links[] = $prefix.'select_all';
} }
$group = $action['group']; $group = $action['group'];
@ -705,6 +705,16 @@ class etemplate_widget_nextmatch extends etemplate_widget
if (!$first_level && $n++ == $max_length) break; if (!$first_level && $n++ == $max_length) break;
} }
// Make sure select all is in a group by itself
foreach($egw_actions as $id => &$_action)
{
if($id == $prefix . 'select_all') continue;
if($_action['group'] >= $egw_actions[$prefix.'select_all']['group'] )
{
$egw_actions[$id]['group']+=1;
}
}
//echo "egw_actions="; _debug_array($egw_actions); //echo "egw_actions="; _debug_array($egw_actions);
return $egw_actions; return $egw_actions;
} }