|
|
|
@@ -108,8 +108,9 @@ function searchItem(type,sortType){ |
|
|
|
currentSearchSortBy = sortBy[sortType]; |
|
|
|
currentSearchAscending = sortAscending[sortType]; |
|
|
|
OnlySearchLabel =false; |
|
|
|
|
|
|
|
page(currentPage); |
|
|
|
}else{ |
|
|
|
emptySearch(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@@ -121,27 +122,31 @@ function search(){ |
|
|
|
if(!isEmpty(currentSearchKeyword)){ |
|
|
|
currentSearchKeyword = currentSearchKeyword.trim(); |
|
|
|
} |
|
|
|
$('#searchForm').addClass("hiddenSearch"); |
|
|
|
initPageInfo(); |
|
|
|
if(!isEmpty(currentSearchKeyword)){ |
|
|
|
doSpcifySearch(currentSearchTableName,currentSearchKeyword,sortBy[10],"false"); |
|
|
|
}else{ |
|
|
|
initDiv(false); |
|
|
|
document.getElementById("find_id").innerHTML=getLabel(isZh,"search_empty"); |
|
|
|
$('#find_title').html(""); |
|
|
|
document.getElementById("sort_type").innerHTML=""; |
|
|
|
document.getElementById("child_search_item").innerHTML=""; |
|
|
|
document.getElementById("page_menu").innerHTML=""; |
|
|
|
$('#repo_total').text(""); |
|
|
|
$('#pr_total').text(""); |
|
|
|
$('#issue_total').text(""); |
|
|
|
$('#dataset_total').text(""); |
|
|
|
$('#user_total').text(""); |
|
|
|
$('#org_total').text(""); |
|
|
|
setActivate(null); |
|
|
|
emptySearch(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function emptySearch(){ |
|
|
|
initDiv(false); |
|
|
|
initPageInfo(); |
|
|
|
$('#searchForm').addClass("hiddenSearch"); |
|
|
|
document.getElementById("find_id").innerHTML=getLabel(isZh,"search_empty"); |
|
|
|
$('#find_title').html(""); |
|
|
|
document.getElementById("sort_type").innerHTML=""; |
|
|
|
document.getElementById("child_search_item").innerHTML=""; |
|
|
|
document.getElementById("page_menu").innerHTML=""; |
|
|
|
$('#repo_total').text(""); |
|
|
|
$('#pr_total').text(""); |
|
|
|
$('#issue_total').text(""); |
|
|
|
$('#dataset_total').text(""); |
|
|
|
$('#user_total').text(""); |
|
|
|
$('#org_total').text(""); |
|
|
|
setActivate(null); |
|
|
|
} |
|
|
|
|
|
|
|
function initDiv(isSearchLabel=false){ |
|
|
|
if(isSearchLabel){ |
|
|
|
document.getElementById("search_div").style.display="none"; |
|
|
|
@@ -152,7 +157,6 @@ function initDiv(isSearchLabel=false){ |
|
|
|
document.getElementById("user_item").style.display="none"; |
|
|
|
document.getElementById("org_item").style.display="none"; |
|
|
|
document.getElementById("find_id").innerHTML=""; |
|
|
|
|
|
|
|
}else{ |
|
|
|
document.getElementById("search_div").style.display="block"; |
|
|
|
document.getElementById("search_label_div").style.display="none"; |
|
|
|
@@ -167,6 +171,7 @@ function initDiv(isSearchLabel=false){ |
|
|
|
|
|
|
|
function doSpcifySearch(tableName,keyword,sortBy="",ascending="false"){ |
|
|
|
initDiv(false); |
|
|
|
$('#searchForm').addClass("hiddenSearch"); |
|
|
|
document.getElementById("find_id").innerHTML=getLabel(isZh,"search_finded"); |
|
|
|
currentSearchKeyword = keyword; |
|
|
|
initPageInfo(); |
|
|
|
@@ -1285,6 +1290,8 @@ var zhCN={ |
|
|
|
var specifySearch = sessionStorage.getItem("specifySearch"); |
|
|
|
if(specifySearch){ |
|
|
|
sessionStorage.removeItem("specifySearch"); |
|
|
|
console.log("search sepcial keyword=...." + sessionStorage.getItem("keyword")); |
|
|
|
document.getElementById("keyword_input").value = sessionStorage.getItem("keyword"); |
|
|
|
doSpcifySearch(sessionStorage.getItem("tableName"),sessionStorage.getItem("keyword"),sessionStorage.getItem("sortBy"),sessionStorage.getItem("ascending")); |
|
|
|
}else{ |
|
|
|
console.log("normal search...."); |
|
|
|
|