|
|
|
@@ -101,16 +101,20 @@ function initPageInfo(){ |
|
|
|
|
|
|
|
function searchItem(type,sortType){ |
|
|
|
console.log("enter item 2."); |
|
|
|
currentSearchKeyword = document.getElementById("keyword_input").value; |
|
|
|
if(!isEmpty(currentSearchKeyword)){ |
|
|
|
initPageInfo(); |
|
|
|
currentSearchTableName = itemType[type]; |
|
|
|
currentSearchSortBy = sortBy[sortType]; |
|
|
|
currentSearchAscending = sortAscending[sortType]; |
|
|
|
OnlySearchLabel =false; |
|
|
|
page(currentPage); |
|
|
|
if(OnlySearchLabel){ |
|
|
|
doSearchLabel(currentSearchTableName,currentSearchKeyword,sortBy[sortType],sortAscending[sortType]) |
|
|
|
}else{ |
|
|
|
emptySearch(); |
|
|
|
currentSearchKeyword = document.getElementById("keyword_input").value; |
|
|
|
if(!isEmpty(currentSearchKeyword)){ |
|
|
|
initPageInfo(); |
|
|
|
currentSearchTableName = itemType[type]; |
|
|
|
currentSearchSortBy = sortBy[sortType]; |
|
|
|
currentSearchAscending = sortAscending[sortType]; |
|
|
|
OnlySearchLabel =false; |
|
|
|
page(currentPage); |
|
|
|
}else{ |
|
|
|
emptySearch(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|