gbinterview.js
1.27 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
if($("#data-myinterviews-tmpl").length){
var $myinterviews = $('#myinterviews'), page=0, pagesize=5, $showmore = $('#showmoreinterview');
$showmore.click(function(){
var ladda = Ladda.create(this);
ladda.start();
var map = {start:page*pagesize, offset:((page+1)*pagesize), userid: global_onlineuser.uid};
identityService.findAllCodeReplays4Interview(map, {
callback:function(gbdata){
if(gbdata.length>0){
var template = Handlebars.compile($("#data-myinterviews-tmpl").html()),
interviews = template(gbdata);
$myinterviews.append(interviews);
$('#empty').hide();
}else{
$showmore.fadeOut();
}
ladda.stop();
page++;
}
});
});
$showmore.trigger('click');
}
{
var timenow = new Date();
timenow.setSeconds(timenow.getSeconds() + 60*30);
$('#interviewcountdownclock').countdown(timenow,function(event){
var timeformat = event.strftime('倒计时 %H:%M:%S'); //定义倒计时格式
$(this).html(timeformat);
}).on('finish.countdown', function(){
$(this)
.parent()
.hide()
.html('<button class="btn btn-danger btn-lg"><span class="glyphicon glyphicon-off"></span> 笔试结束</button>')
.addClass('animated flash')
.show();
});
}