| @@ -102,7 +102,6 @@ function initPageInfo(){ | |||
| function searchItem(type,sortType){ | |||
| console.log("enter item 2."); | |||
| currentSearchKeyword = document.getElementById("keyword_input").value; | |||
| sessionStorage.removeItem("searchLabel"); | |||
| if(!isEmpty(currentSearchKeyword)){ | |||
| initPageInfo(); | |||
| currentSearchTableName = itemType[type]; | |||
| @@ -122,7 +121,6 @@ function search(){ | |||
| if(!isEmpty(currentSearchKeyword)){ | |||
| currentSearchKeyword = currentSearchKeyword.trim(); | |||
| } | |||
| sessionStorage.removeItem("searchLabel"); | |||
| $('#searchForm').addClass("hiddenSearch"); | |||
| initPageInfo(); | |||
| if(!isEmpty(currentSearchKeyword)){ | |||
| @@ -212,23 +210,8 @@ function searchLabel(tableName,keyword,sortBy="",ascending="false"){ | |||
| sessionStorage.setItem("searchLabel",true); | |||
| sessionStorage.setItem("sortBy",sortBy); | |||
| sessionStorage.setItem("ascending",ascending); | |||
| console.log("enter label search."); | |||
| window.open("/all/search/"); | |||
| // initDiv(true); | |||
| // //document.getElementById("search_div").style.display="none"; | |||
| // //document.getElementById("search_label_div").style.display="block"; | |||
| // document.getElementById("search_label_div").innerHTML="<p class=\"searchlabel\">#" + keyword + "</p>"; | |||
| // currentSearchKeyword = keyword; | |||
| // initPageInfo(); | |||
| // currentSearchTableName = tableName; | |||
| // currentSearchSortBy = sortBy; | |||
| // currentSearchAscending = ascending; | |||
| // OnlySearchLabel =true; | |||
| // page(currentPage); | |||
| } | |||
| function doSearch(tableName,keyword,page,pageSize=15,onlyReturnNum=true,sortBy="",OnlySearchLabel=false){ | |||
| @@ -261,9 +244,6 @@ function doSearch(tableName,keyword,page,pageSize=15,onlyReturnNum=true,sortBy=" | |||
| console.log("tableName=" + tableName); | |||
| console.log(json); | |||
| displayResult(tableName,page,json,onlyReturnNum,keyword); | |||
| if(OnlySearchLabel){ | |||
| sessionStorage.removeItem("searchLabel"); | |||
| } | |||
| }, | |||
| error:function(response) { | |||
| console.log(response); | |||
| @@ -1289,7 +1269,8 @@ var zhCN={ | |||
| console.log("tmpSearchLabel=" + tmpSearchLabel); | |||
| if(tmpSearchLabel){ | |||
| console.log("search label...."); | |||
| doSearchLabel(sessionStorage.getItem("tableName"),sessionStorage.getItem("keyword"),sessionStorage.getItem("sortBy"),sessionStorage.getItem("ascending")) | |||
| sessionStorage.removeItem("searchLabel"); | |||
| doSearchLabel(sessionStorage.getItem("tableName"),sessionStorage.getItem("keyword"),sessionStorage.getItem("sortBy"),sessionStorage.getItem("ascending")); | |||
| }else{ | |||
| console.log("normal search...."); | |||
| search(); | |||