diff --git a/module/product/control.php b/module/product/control.php index a27d44dfe2..9778bbfb94 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -438,7 +438,7 @@ class product extends control * @access public * @return void */ - public function dropMenu($productID, $module, $method, $extra) + public function ajaxGetDropMenu($productID, $module, $method, $extra) { $this->view->link = $this->getProductLink($module, $method, $extra); $this->view->productID = $productID; @@ -459,7 +459,7 @@ class product extends control * @access public * @return void */ - public function searchItems($keywords, $module, $method, $extra) + public function ajaxGetMatchedItems($keywords, $module, $method, $extra) { $this->view->link = $this->getProductLink($module, $method, $extra); $this->view->products = $this->dao->select('*')->from(TABLE_PRODUCT)->where('deleted')->eq(0)->andWhere('name')->like("%$keywords%")->orderBy('code')->fetchAll(); diff --git a/module/product/view/dropmenu.html.php b/module/product/view/ajaxgetdropmenu.html.php similarity index 100% rename from module/product/view/dropmenu.html.php rename to module/product/view/ajaxgetdropmenu.html.php diff --git a/module/product/view/searchitems.html.php b/module/product/view/ajaxgetmatcheditems.html.php similarity index 100% rename from module/product/view/searchitems.html.php rename to module/product/view/ajaxgetmatcheditems.html.php diff --git a/module/project/control.php b/module/project/control.php index 9f7fd24f57..fc577cf796 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1512,7 +1512,7 @@ class project extends control * @access public * @return void */ - public function dropMenu($projectID, $module, $method, $extra) + public function ajaxGetDropMenu($projectID, $module, $method, $extra) { $this->view->link = $this->getProjectLink($module, $method, $extra); $this->view->projectID = $projectID; @@ -1533,7 +1533,7 @@ class project extends control * @access public * @return void */ - public function searchItems($keywords, $module, $method, $extra) + public function ajaxGetMatchedItems($keywords, $module, $method, $extra) { $this->view->link = $this->getProjectLink($module, $method, $extra); $this->view->projects = $this->dao->select('*')->from(TABLE_PROJECT)->where('deleted')->eq(0)->andWhere('name')->like("%$keywords%")->orderBy('code')->fetchAll(); diff --git a/module/project/view/dropmenu.html.php b/module/project/view/ajaxgetdropmenu.html.php similarity index 100% rename from module/project/view/dropmenu.html.php rename to module/project/view/ajaxgetdropmenu.html.php diff --git a/module/project/view/searchitems.html.php b/module/project/view/ajaxgetmatcheditems.html.php similarity index 100% rename from module/project/view/searchitems.html.php rename to module/project/view/ajaxgetmatcheditems.html.php diff --git a/www/js/my.full.js b/www/js/my.full.js index 0b6b787ba4..d73f83cffa 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -138,7 +138,7 @@ var showMenu = 0; //Showing or hiding drop menu. function showDropMenu(objectType, objectID, module, method, extra) { if(showMenu == 1) { showMenu = 0; return $("#dropMenu").hide();}; - $.get(createLink(objectType, 'dropMenu', "objectID=" + objectID + "&module=" + module + "&method=" + method + "&extra=" + extra), function(data){ $('#dropMenu').html(data);}); + $.get(createLink(objectType, 'ajaxGetDropMenu', "objectID=" + objectID + "&module=" + module + "&method=" + method + "&extra=" + extra), function(data){ $('#dropMenu').html(data);}); var offset = $('#currentItem').offset(); $("#dropMenu").css({ top:offset.top + $('#currentItem').height() + "px", left:offset.left }); $("#dropMenu").show('fast', function(){$("#dropMenu #search").focus();}); @@ -163,11 +163,11 @@ function searchItems(keywords, objectType, objectID, module, method, extra) { showMenu = 0; showDropMenu(objectType, objectID, module, method, extra); - setTimeout(function(){$("#dropMenu #search").focus();}, 500); + setTimeout(function(){$("#dropMenu #search").focus();}, 300); } else { - if(keywords != '-') $.get(createLink(objectType, 'searchItems', "keywords=" + keywords + "&module=" + module + "&method=" + method + "&extra=" + extra), function(data){ $('#searchResult').html(data);}); + if(keywords != '-') $.get(createLink(objectType, 'ajaxGetMatchedItems', "keywords=" + keywords + "&module=" + module + "&method=" + method + "&extra=" + extra), function(data){ $('#searchResult').html(data);}); } }