* Finish task #37530.
This commit is contained in:
@@ -53,13 +53,14 @@ class branch extends control
|
||||
* Ajax get drop menu.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param string $module
|
||||
* @param string $method
|
||||
* @param string $extra
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetDropMenu($productID, $module, $method, $extra)
|
||||
public function ajaxGetDropMenu($productID, $branch = 0, $module, $method, $extra = '')
|
||||
{
|
||||
$this->view->link = $this->loadModel('product')->getProductLink($module, $method, $extra, true);
|
||||
$this->view->productID = $productID;
|
||||
@@ -70,7 +71,7 @@ class branch extends control
|
||||
|
||||
$branches = $this->branch->getPairs($productID);
|
||||
$this->view->branches = $branches;
|
||||
$this->view->currentBranchID = $this->cookie->preBranch;
|
||||
$this->view->currentBranchID = $branch;
|
||||
$this->view->branchesPinyin = common::convert2Pinyin($branches);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ class productModel extends model
|
||||
$branchName = isset($branches[$branch]) ? $branches[$branch] : $branches[0];
|
||||
if(!$isMobile)
|
||||
{
|
||||
$dropMenuLink = helper::createLink('branch', 'ajaxGetDropMenu', "objectID=$productID&module=$currentModule&method=$currentMethod&extra=$extra");
|
||||
$dropMenuLink = helper::createLink('branch', 'ajaxGetDropMenu', "objectID=$productID&branch=$branch&module=$currentModule&method=$currentMethod&extra=$extra");
|
||||
$output .= "<div class='btn-group'><button id='currentBranch' data-toggle='dropdown' type='button' class='btn btn-limit'>{$branchName} <span class='caret'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
|
||||
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
|
||||
$output .= "</div></div>";
|
||||
@@ -458,7 +458,7 @@ class productModel extends model
|
||||
$branches = $this->loadModel('branch')->getPairs($productID);
|
||||
$branch = (int)$branch;
|
||||
$branchName = isset($branches[$branch]) ? $branches[$branch] : $branches[0];
|
||||
$dropMenuLink = helper::createLink('branch', 'ajaxGetDropMenu', "objectID=$productID&module=$currentModule&method=$currentMethod&extra=$extra");
|
||||
$dropMenuLink = helper::createLink('branch', 'ajaxGetDropMenu', "objectID=$productID&branch=$branch&module=$currentModule&method=$currentMethod&extra=$extra");
|
||||
|
||||
$output .= "<div class='btn-group header-btn'><button id='currentBranch' data-toggle='dropdown' type='button' class='btn'><span class='text'>{$branchName}</span> <span class='caret' style='margin-top: 3px'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
|
||||
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
|
||||
|
||||
Reference in New Issue
Block a user