Browse Source

Allow editing the "Welcome" dashboard

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2075 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 13 years ago
parent
commit
3c3412e62b
1 changed files with 12 additions and 0 deletions
  1. 12 0
      pages/ajax.render.php

+ 12 - 0
pages/ajax.render.php

@@ -627,6 +627,18 @@ try
 		
 		case 'dashboard_editor':
 		$sId = utils::ReadParam('id', '', false, 'raw_data');
+		
+		// Before searching for the menus make sure that all of them exist
+		// Build menus from module handlers
+		//
+		foreach(get_declared_classes() as $sPHPClass)
+		{
+			if (is_subclass_of($sPHPClass, 'ModuleHandlerAPI'))
+			{
+				$aCallSpec = array($sPHPClass, 'OnMenuCreation');
+				call_user_func($aCallSpec);
+			}
+		}
 		$idx = ApplicationMenu::GetMenuIndexById($sId);
 		$oMenu = ApplicationMenu::GetMenuNode($idx);
 		$oMenu->RenderEditor($oPage);