* Code for task#78661.
This commit is contained in:
@@ -390,7 +390,7 @@ class tree extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->view->optionMenu = $this->tree->getOptionMenu($module->root, $module->type, 0, $module->branch);
|
||||
$this->view->optionMenu = $this->tree->getOptionMenu($module->root, $module->type, 0, $module->branch, 'noMainBranch');
|
||||
}
|
||||
|
||||
if($type == 'doc') $this->view->libs = $this->loadModel('doc')->getLibs('all', $extra = 'withObject', '', 0, 'book');
|
||||
@@ -534,12 +534,13 @@ class tree extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$optionMenu = $this->tree->getOptionMenu($rootID, $viewType, $rootModuleID, $branch);
|
||||
$optionMenu = $this->tree->getOptionMenu($rootID, $viewType, $rootModuleID, $branch, $extra);
|
||||
}
|
||||
|
||||
if(strpos($extra, 'excludeModuleID') !== false)
|
||||
{
|
||||
parse_str($extra, $output);
|
||||
list($excludeModule, $noMainBranch) = explode(',', $extra);
|
||||
parse_str($excludeModule, $output);
|
||||
$excludeModuleID = $output['excludeModuleID'];
|
||||
if(isset($optionMenu[$excludeModuleID])) unset($optionMenu[$excludeModuleID]);
|
||||
}
|
||||
|
||||
@@ -109,11 +109,14 @@ class treeModel extends model
|
||||
->andWhere('type')->in($type)
|
||||
->beginIF($grade)->andWhere('grade')->le($grade)->fi()
|
||||
->beginIF($startModulePath)->andWhere('path')->like($startModulePath)->fi()
|
||||
->beginIF($branch !== 'all' and $branch !== '' and $branch !== false)
|
||||
->beginIF($branch !== 'all' and $branch !== '' and $branch !== false and strpos($param, 'noMainBranch') === false)
|
||||
->andWhere('(branch')->eq(0)
|
||||
->orWhere('branch')->eq($branch)
|
||||
->markRight(1)
|
||||
->fi()
|
||||
->beginIF($branch !== 'all' and $branch !== '' and $branch !== false and strpos($param, 'noMainBranch') !== false)
|
||||
->andWhere('branch')->eq($branch)
|
||||
->fi()
|
||||
->beginIF(strpos($param, 'nodeleted') !== false)->andWhere('deleted')->eq(0)->fi()
|
||||
->orderBy('grade desc, `order`')
|
||||
->get();
|
||||
|
||||
@@ -189,7 +189,7 @@ function loadModules(branch)
|
||||
if(typeof(branchID) == 'undefined') branchID = 0;
|
||||
if(typeof(moduleID) == 'undefined') moduleID = 0;
|
||||
|
||||
link = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=story&branch=' + branchID + '&rootModuleID=0&returnType=html&fieldID=&needManage=true&extra=excludeModuleID=' + <?php echo $module->id;?> + '¤tModuleID=' + moduleID);
|
||||
link = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=story&branch=' + branchID + '&rootModuleID=0&returnType=html&fieldID=&needManage=true&extra=excludeModuleID=' + <?php echo $module->id;?> + ',noMainBranch¤tModuleID=' + moduleID);
|
||||
$(moduleBox).load(link, function()
|
||||
{
|
||||
$(this).children('select').attr('id', 'parent').attr('name', 'parent');
|
||||
|
||||
Reference in New Issue
Block a user