|
@@ -29,7 +29,7 @@ $(function(){
|
|
|
if(firstPage.i_size == 1){
|
|
|
var content = $(firstPage[0].s_content).find("a.bt");
|
|
|
var words = firstPage[0].s_words;
|
|
|
- newredirect(zbadd,content.attr("href"),content.attr("eid"),words?words.join("+"):"");
|
|
|
+ newredirect(zbadd,content.attr("href"),content.attr("eid"),words?"subkey_"+words.join("_"):"");
|
|
|
return;
|
|
|
}
|
|
|
$(window).scroll(function(){
|
|
@@ -164,6 +164,8 @@ function open_window(link){
|
|
|
function hasNoData(){
|
|
|
$(".listcontent").hide();
|
|
|
$(".findnull").css("display","block");
|
|
|
+ $(".showType").hide();
|
|
|
+ $(".showType").next().hide();
|
|
|
}
|
|
|
function structureHtml(object){
|
|
|
var tablehtml = '';
|
|
@@ -174,7 +176,7 @@ function structureHtml(object){
|
|
|
count++;
|
|
|
var info = object["o_pushinfo"][i+1];
|
|
|
if(words){
|
|
|
- $(this).attr("words",words.join("+"));
|
|
|
+ $(this).attr("words",words.join("_"));
|
|
|
}
|
|
|
$(this).find(".xh").html(count+".").wrap('<div class="resnumb"><div class="one"></div></div>');
|
|
|
$(this).find("a.bt").attr("s",function(){
|
|
@@ -197,7 +199,22 @@ function structureHtml(object){
|
|
|
var area = $(this).find(".area").text();
|
|
|
var html = $(this).find(".bt").html().replace("[<span class=\"area\">"+area,"").replace("</span>]","");
|
|
|
if(words){
|
|
|
- html = keyWordHighlight(html,words.join("|").replace(/\+/gm,"|"),'<font class="keyword">$1</font>');
|
|
|
+ for(var n=0;n<words.length;n++){
|
|
|
+ var keysTemp = words[n].split("+");
|
|
|
+ var isReplace = true;
|
|
|
+ var htmlTemp = html;
|
|
|
+ for(var m=0;m<keysTemp.length;m++){
|
|
|
+ var _htmlTemp = keyWordHighlight(htmlTemp,keysTemp[m],'<font class="keyword">$1</font>');
|
|
|
+ if(htmlTemp == _htmlTemp){
|
|
|
+ isReplace = false;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ htmlTemp = _htmlTemp;
|
|
|
+ }
|
|
|
+ if(isReplace){
|
|
|
+ html = htmlTemp;
|
|
|
+ }
|
|
|
+ }
|
|
|
$(this).find("a.bt").html(html);
|
|
|
}
|
|
|
$(this).find(".bt").html(html);
|
|
@@ -243,10 +260,26 @@ function structureHtml(object){
|
|
|
});
|
|
|
$(this).append('<div style="clear:both;"></div>');
|
|
|
//
|
|
|
- tablehtml +='<tr onClick="tablejump(\''+$(this).find("a.bt").attr("eid")+'\',\''+$(this).find("a.bt").attr("s")+'\')">'+
|
|
|
+ tablehtml +='<tr onClick="tablejump(\''+$(this).find("a.bt").attr("eid")+'\',\''+$(this).find("a.bt").attr("s")+'\',\''+words.join("_")+'\')">'+
|
|
|
'<td>'+count+'</td>'
|
|
|
if(typeof(info.projectname) != "undefined"&&info.projectname != ""){
|
|
|
- var pn = keyWordHighlight(info.projectname,words.join("|").replace(/\+/gm,"|"),'<font class="keyword">$1</font>');
|
|
|
+ var pn = info.projectname;
|
|
|
+ for(var n=0;n<words.length;n++){
|
|
|
+ var keysTemp = words[n].split("+");
|
|
|
+ var isReplace = true;
|
|
|
+ var pnTemp = pn;
|
|
|
+ for(var m=0;m<keysTemp.length;m++){
|
|
|
+ var _pnTemp = keyWordHighlight(pnTemp,keysTemp[m],'<font class="keyword">$1</font>');
|
|
|
+ if(pnTemp == _pnTemp){
|
|
|
+ isReplace = false;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ pnTemp = _pnTemp;
|
|
|
+ }
|
|
|
+ if(isReplace){
|
|
|
+ pn = pnTemp;
|
|
|
+ }
|
|
|
+ }
|
|
|
tablehtml +='<td>'+pn+'</td>'
|
|
|
}else{
|
|
|
tablehtml +='<td>'+$(this).find("a.bt").html()+'</td>'
|
|
@@ -337,36 +370,32 @@ function formatDate(date,sl) {
|
|
|
|
|
|
//
|
|
|
function appendList(content,tablehtml){
|
|
|
- var sds =""
|
|
|
content.children(".tslist").on("click", function(event){
|
|
|
- sds = $(this).attr("words");
|
|
|
+ var sds = $(this).attr("words");
|
|
|
var h = $(this).find("a.bt").attr("s");
|
|
|
var eid = $(this).find("a.bt").attr("eid");
|
|
|
- if(sessionStorage){
|
|
|
- sessionStorage.historypushScrollTop = scrollTop;
|
|
|
- sessionStorage.historypushListCache = listCache;
|
|
|
- sessionStorage.historypushTableCache = tableCache;
|
|
|
- sessionStorage.historypushLasttimeCache = lasttime;
|
|
|
- sessionStorage.historypushNoMoreCache = noMore;
|
|
|
- sessionStorage.historypushCount = count;
|
|
|
- }
|
|
|
- newredirect(zbadd,h,eid,sds);
|
|
|
+ beforeJump(eid,h,sds);
|
|
|
});
|
|
|
$("#list").append(content);
|
|
|
//
|
|
|
- tablejump = function(eid,h){
|
|
|
+ $("#mytable").append(tablehtml)
|
|
|
+}
|
|
|
+function tablejump(eid,h,sds){
|
|
|
+ if(localStorage){
|
|
|
localStorage.setItem("listortable"+{{.T._id}},"T");
|
|
|
- if(sessionStorage){
|
|
|
- sessionStorage.historypushScrollTop = scrollTop;
|
|
|
- sessionStorage.historypushListCache = listCache;
|
|
|
- sessionStorage.historypushTableCache = tableCache;
|
|
|
- sessionStorage.historypushLasttimeCache = lasttime;
|
|
|
- sessionStorage.historypushNoMoreCache = noMore;
|
|
|
- sessionStorage.historypushCount = count;
|
|
|
- }
|
|
|
- newredirect(zbadd,h,eid,sds);
|
|
|
}
|
|
|
- $("#mytable").append(tablehtml)
|
|
|
+ beforeJump(eid,h,sds);
|
|
|
+}
|
|
|
+function beforeJump(eid,h,sds){
|
|
|
+ if(sessionStorage){
|
|
|
+ sessionStorage.historypushScrollTop = scrollTop;
|
|
|
+ sessionStorage.historypushListCache = listCache;
|
|
|
+ sessionStorage.historypushTableCache = tableCache;
|
|
|
+ sessionStorage.historypushLasttimeCache = lasttime;
|
|
|
+ sessionStorage.historypushNoMoreCache = noMore;
|
|
|
+ sessionStorage.historypushCount = count;
|
|
|
+ }
|
|
|
+ newredirect(zbadd,h,eid,"subkey_"+sds);
|
|
|
}
|
|
|
</script>
|
|
|
<style type="text/css">
|