diff --git a/public/home/search.js b/public/home/search.js index d728675dc..ef10222fa 100644 --- a/public/home/search.js +++ b/public/home/search.js @@ -934,11 +934,7 @@ $('#keyword_input').on('keypress',function(event){ } }); -document.onreadystatechange = function() { - if (document.readyState === "complete") { - search(); - } -} + @@ -1283,14 +1279,18 @@ var zhCN={ "find_title":" {total} \"{keyword}\" related {tablename}", "search_empty":"Please enter any keyword to start the search." } + initDiv(false); + document.onreadystatechange = function() { + if (document.readyState === "complete") { + 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...."); + search(); + } + } + } - - 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...."); - } +