gbcollection.js
1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
$(function(){
if($("#data-gbcollection-tmpl").length){
var page_index = 0,
offset = 10,
start = 0,
collection_usertagid=90601;
$('#showmorecollection').click(function(e){
$(this).val("加载中...");
$('#showmoreloading').fadeIn();
start = page_index * offset;
$('.loading').removeClass('hidden');
identityService.findAllPostByUserTagID({utid:collection_usertagid,start:start,offset:offset},{
callback:function(gbresults){
var template = Handlebars.compile($("#data-gbcollection-tmpl").html()),
gbcollection = template(gbresults);
$('#collectionlist').append(gbcollection);
page_index++;
if(gbresults.length===0){
$('#showmorecollection').addClass('hidden');
}
$('.loading').addClass('hidden');
}
});
e.preventDefault();
});
$('#showmorecollection').trigger('click');
}
if($("#data-gbevents-tmpl").length){
var page_index = 0,
offset = 10,
start = 0,
collection_usertagid=151331;
$('#showmorecollection').click(function(e){
$(this).val("加载中...");
$('#showmoreloading').fadeIn();
start = page_index * offset;
$('.loading').removeClass('hidden');
identityService.findAllPostByUserTagID({utid:collection_usertagid,start:start,offset:offset},{
callback:function(gbresults){
var template = Handlebars.compile($("#data-gbevents-tmpl").html()),
gbcollection = template(gbresults);
$('#collectionlist').append(gbcollection);
page_index++;
if(gbresults.length===0){
$('#showmorecollection').addClass('hidden');
}
$('.loading').addClass('hidden');
}
});
e.preventDefault();
});
$('#showmorecollection').trigger('click');
}
});