* fix for task #404

This commit is contained in:
wangyidong
2011-04-12 02:39:16 +00:00
parent 5ee2a83d57
commit 5adb86b96d
3 changed files with 40 additions and 2 deletions
+16
View File
@@ -53,6 +53,7 @@ class tree extends control
if($viewType == 'story')
{
$this->product->setMenu($this->product->getPairs(), $rootID, 'story');
$this->view->allProduct = $this->product->getPairs();
$this->lang->tree->menu = $this->lang->product->menu;
$this->lang->set('menugroup.tree', 'product');
@@ -200,6 +201,8 @@ class tree extends control
*/
public function ajaxGetOptionMenu($rootID, $viewType = 'story', $rootModuleID = 0)
{
$this->view->productModules = $this->tree->getOptionMenu($rootID, 'story');
$optionMenu = $this->tree->getOptionMenu($rootID, $viewType, $rootModuleID);
die( html::select("module", $optionMenu, '', 'onchange=setAssignedTo()'));
}
@@ -223,4 +226,17 @@ class tree extends control
foreach($modules as $key => $name) $modules[$key] = str_replace(" "," ","$name");
die(json_encode($modules));
}
/**
* AJAX: get modules.
*
* @param int $moduleID
* @param int $rootID
* @access public
* @return string json_encoded modules.
*/
public function ajaxGetModules($rootID = 0, $type='story')
{
$modules = $this->tree->getOptionMenu($rootID, 'story');
die(json_encode($modules));
}
}