|
@@ -338,9 +338,33 @@ function structureHtml(object){
|
|
|
return '<div class="restime time-diff">'+area+datatype+industryname+tdf+'</div>';
|
|
|
});
|
|
|
$(this).append('<div style="clear:both;"></div>');
|
|
|
+
|
|
|
+ var tableVisit = "";
|
|
|
+ // 已读未读
|
|
|
+ var $list = $(this).find(".bt").attr("eid");
|
|
|
+ if (typeof (a_visitedindex) != "undefined") {
|
|
|
+ var xh = $(this).find(".xh").text().replace(".", "");
|
|
|
+ // console.log(xh);
|
|
|
+ for (var i = 0; i < a_visitedindex.length; i++) {
|
|
|
+ if (xh == a_visitedindex[i]) {
|
|
|
+ tableVisit="visited";
|
|
|
+ $(this).find("a.bt").addClass("visited");
|
|
|
+ $(this).find(".xh").addClass("visited");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (typeof (a_visitedindex) != "undefined") {
|
|
|
+ for (var i = 0; i < a_visitedindex.length; i++) {
|
|
|
+ if ($list == a_visitedindex[i]) {
|
|
|
+ tableVisit="visited";
|
|
|
+ $(this).find("a.bt").addClass("visited");
|
|
|
+ $(this).find(".xh").addClass("visited");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
//
|
|
|
- tablehtml +='<tr onClick="tablejump(\''+$(this).find("a.bt").attr("eid")+'\',\''+$(this).find("a.bt").attr("s")+'\',\''+words.join("_")+'\')">'+
|
|
|
- '<td>'+count+'</td>'
|
|
|
+ tablehtml +='<tr onClick="tablejump(\''+$(this).find("a.bt").attr("eid")+'\',\''+$(this).find("a.bt").attr("s")+'\',\''+words.join("_")+'\',$(this))" class="'+tableVisit+'">'+
|
|
|
+ '<td>'+count+'</td>'
|
|
|
if(typeof(info.projectname) != "undefined"&&info.projectname != ""){
|
|
|
var pn = info.projectname;
|
|
|
for(var n=0;n<words.length;n++){
|
|
@@ -416,28 +440,6 @@ function structureHtml(object){
|
|
|
var tabletime = formatDate(info.publishtime);
|
|
|
tablehtml +='<td>'+tabletime+'</td></tr>'
|
|
|
|
|
|
- // 已读未读
|
|
|
- // console.log(a_visitedindex);
|
|
|
- var $list = $(this).find(".bt").attr("eid");
|
|
|
- if (typeof (a_visitedindex) != "undefined") {
|
|
|
- var xh = $(this).find(".xh").text().replace(".", "");
|
|
|
- // console.log(xh);
|
|
|
- for (var i = 0; i < a_visitedindex.length; i++) {
|
|
|
- if (xh == a_visitedindex[i]) {
|
|
|
- $(this).find("a.bt").addClass("visited");
|
|
|
- $(this).find(".xh").addClass("visited");
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if (typeof (a_visitedindex) != "undefined") {
|
|
|
-
|
|
|
- for (var i = 0; i < a_visitedindex.length; i++) {
|
|
|
- if ($list == a_visitedindex[i]) {
|
|
|
- $(this).find("a.bt").addClass("visited");
|
|
|
- $(this).find(".xh").addClass("visited");
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
});
|
|
|
listCache += content.prop("outerHTML");
|
|
|
tableCache += tablehtml;
|
|
@@ -473,7 +475,7 @@ function formatDate(date,sl) {
|
|
|
//
|
|
|
function appendList(content,tablehtml){
|
|
|
content.children(".tslist").on("click", function(event){
|
|
|
- setVisitedIndex($(this));
|
|
|
+ setVisitedIndex($(this),"");
|
|
|
var sds = $(this).attr("words");
|
|
|
var h = $(this).find("a.bt").attr("s");
|
|
|
var eid = $(this).find("a.bt").attr("eid");
|
|
@@ -485,10 +487,11 @@ function appendList(content,tablehtml){
|
|
|
$(".findnull").hide();
|
|
|
$(".listcontent").show();
|
|
|
}
|
|
|
-function tablejump(eid,h,sds){
|
|
|
+function tablejump(eid,h,sds,t){
|
|
|
if(localStorage){
|
|
|
localStorage.setItem("listortable"+{{.T._id}},"T");
|
|
|
}
|
|
|
+ setVisitedIndex(t,eid);
|
|
|
beforeJump(eid,h,sds);
|
|
|
}
|
|
|
function beforeJump(eid,h,sds){
|
|
@@ -516,8 +519,9 @@ function setSessionStorage(){
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-function setVisitedIndex(obj){
|
|
|
- if(obj.find("a.bt").hasClass("visit")){
|
|
|
+function setVisitedIndex(obj,eid){
|
|
|
+ console.log(obj.hasClass("visited")+"--------");
|
|
|
+ if(obj.find("a.bt").hasClass("visit")||obj.hasClass("visited")){
|
|
|
return;
|
|
|
}
|
|
|
obj.find("a.bt").addClass("visited");
|
|
@@ -528,6 +532,10 @@ function setVisitedIndex(obj){
|
|
|
index = index.substring(0,index.length-1)
|
|
|
}
|
|
|
var vsid=obj.find("a.bt").attr("eid");
|
|
|
+ if (eid != ""){
|
|
|
+ obj.addClass("visited");
|
|
|
+ vsid = eid;
|
|
|
+ }
|
|
|
$.post("/jyapp/wxpush/bid/ajaxReq",{_id:_id,vsid:vsid,index:index});
|
|
|
}
|
|
|
</script>
|