diff --git a/module/tree/control.php b/module/tree/control.php
index 760f9a6797..c34909b326 100644
--- a/module/tree/control.php
+++ b/module/tree/control.php
@@ -30,7 +30,6 @@ class tree extends control
$product = $this->loadModel('product')->getById($rootID);
if($product->type != 'normal') $this->view->branches = $this->loadModel('branch')->getPairs($product->id);
$this->view->root = $product;
- $this->view->productModules = $this->tree->getOptionMenu($rootID, 'story');
}
/* The viewType is doc. */
elseif(strpos($viewType, 'doc') !== false)
@@ -65,6 +64,7 @@ class tree extends control
$this->view->allProduct = $products;
$this->view->currentProduct = $currentProduct;
+ $this->view->productModules = $this->tree->getOptionMenu($currentProduct, 'story');
$title = $product->name . $this->lang->colon . $this->lang->tree->manageProduct;
$position[] = html::a($this->createLink('product', 'browse', "product=$rootID"), $product->name);
diff --git a/module/tree/js/browse.js b/module/tree/js/browse.js
index 9a9e395070..9ff2e8ba4e 100644
--- a/module/tree/js/browse.js
+++ b/module/tree/js/browse.js
@@ -22,7 +22,7 @@ function syncModule(rootID, type)
{
if(value)
{
- $('#sonModule .input-group:last').after($inputgroup);
+ $('#sonModule').append($inputgroup);
$('#sonModule .input-group:last input').val(value);
}
})
diff --git a/module/tree/view/browse.html.php b/module/tree/view/browse.html.php
index a5cd44701d..ed43bb7f75 100644
--- a/module/tree/view/browse.html.php
+++ b/module/tree/view/browse.html.php
@@ -86,7 +86,7 @@
echo html::input("modules[]", '', 'class="form-control"');
if($hasBranch) echo '' . html::select("branch[]", $branches, $branch, 'class="form-control"');
echo "";
- echo "";
+ echo "";
echo '';
}
?>