mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
Pass the final class to GetShortcutActions
SVN:trunk[1498]
This commit is contained in:
@@ -2146,8 +2146,10 @@ EOF
|
||||
|
||||
/**
|
||||
* Get the list of actions to be displayed as 'shortcuts' (i.e buttons) instead of inside the Actions popup menu
|
||||
* @param $sFinalClass string The actual class of the objects for which to display the menu
|
||||
* @return Array the list of menu codes (i.e dictionary entries) that can be displayed as shortcuts next to the actions menu
|
||||
*/
|
||||
public static function GetShortcutActions()
|
||||
public static function GetShortcutActions($sFinalClass)
|
||||
{
|
||||
return array('UI:Menu:New', 'UI:Menu:Modify');
|
||||
}
|
||||
|
||||
@@ -1228,9 +1228,8 @@ class MenuBlock extends DisplayBlock
|
||||
}
|
||||
}
|
||||
$aFavoriteActions = array();
|
||||
$aFavorites = array('UI:Menu:Modify', 'UI:Menu:New', /*'UI:Menu:Delete'*/);
|
||||
$aCallSpec = array($sClass, 'GetShortcutActions');
|
||||
$aShortcutActions = call_user_func($aCallSpec);
|
||||
$aShortcutActions = call_user_func($aCallSpec, $sClass);
|
||||
foreach ($aActions as $key => $aAction)
|
||||
{
|
||||
if (in_array($key, $aShortcutActions))
|
||||
|
||||
Reference in New Issue
Block a user