Browse Source

提交代码,重定向

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.3.2^2
zouap 3 years ago
parent
commit
d7e1a2defa
1 changed files with 27 additions and 1 deletions
  1. +27
    -1
      public/home/search.js

+ 27
- 1
public/home/search.js View File

@@ -187,11 +187,29 @@ function initDiv(isSearchLabel=false){
}
}

function doSearchLabel(tableName,keyword,sortBy="",ascending="false"){
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 searchLabel(tableName,keyword,sortBy="",ascending="false"){

sessionStorage.setItem("keyword",keyword);
sessionStorage.setItem("tableName",tableName);
sessionStorage.setItem("searchLabel",true);
sessionStorage.setItem("sortBy",sortBy);
sessionStorage.setItem("ascending",ascending);

console.log("enter label search.");

@@ -1265,4 +1283,12 @@ var zhCN={
}


initDiv(false);
initDiv(false);

var tmpSearchLabel = sessionStorage.getItem("searchLabel");
if(tmpSearchLabel){
console.log("search label....");
doSearchLabel(sessionStorage.getItem("tableName"),sessionStorage.getItem("keyword"),sessionStorage.getItem("sortBy"),sessionStorage.getItem("ascending"))
}else{
console.log("normal search....");
}

Loading…
Cancel
Save