+ finish the feature of edit a module.

This commit is contained in:
wangchunsheng
2010-03-04 02:51:27 +00:00
parent 47a9164f60
commit 8cf4610112
5 changed files with 50 additions and 34 deletions
+9 -5
View File
@@ -101,13 +101,17 @@ class tree extends control
{
if(!empty($_POST))
{
if($this->product->update($_POST)) die(js::locate($this->createLink($this->moduleName, 'index', "product=$_POST[id]"), 'parent'));
$this->tree->update($moduleID);
echo js::alert($this->lang->tree->successSave);
die(js::reload('parent'));
}
$this->view->module = $this->tree->getById($moduleID);
$this->view->optionMenu = $this->tree->getOptionMenu($this->view->module->product, $this->view->module->view);
/* 去掉自己和child。*/
$childs = $this->tree->getAllChildId($moduleID);
foreach($childs as $childModuleID) unset($this->view->optionMenu[$childModuleID]);
$product = $this->product->getByID($productID);
$header['title'] = $this->lang->product->edit . $this->lang->colon . $product->name;
$this->assign('header', $header);
$this->assign('product', $product);
$this->display();
}