blob: 4390ac860d47bd73b33a6fb5bbfe80400c1ddd8d (
plain)
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
|
var HeaderView = View.extend({
el: "nav",
events: {
"click .index": "toggleNav",
},
initialize: function(){
this.$figText = this.$(".fig-text")
this.$pageNumber = this.$(".page-no")
this.$slideNumber = this.$(".slide-no")
this.$slideCount = this.$(".slide-count")
this.$time = this.$("#time")
this.$hours = this.$("#hours")
this.$minutes = this.$("#minutes")
$("#curtain").click(this.toggleNav)
},
// startTime: function(){
// this.updateTime()
// this.$time.show()
// },
//
// lastTime: +new Date() - 1000,
// updateTime: function(){
// setTimeout( this.updateTime.bind(this), 500 )
// var t = new Date()
// var secs = +t
// if (secs - this.lastTime < 1000) { return }
// this.lastTime = secs
// var y = t.getYear() + 1900
// var mm = t.getMonth() + 1
// var d = t.getDate()
// var h = t.getHours() % 12
// var m = t.getMinutes()
// var s = t.getSeconds()
// if (mm < 10) mm = "0" + mm
// if (d < 10) d = "0" + d
// if (h < 10) h = "0" + h
// if (m < 10) m = "0" + m
// if (s < 10) s = "0" + s
// this.$hours.html(""+y+"/"+mm+"/"+d+" "+h+":"+m+":"+s)
// },
updateSlideNumber: function(n){
n += 1
if (n < 10) n = "0" + n
this.$slideNumber.html(n)
},
updatePageNumber: function(n){
n += 1
if (n < 10) n = "0" + n
this.$pageNumber.html(n)
},
updateSlideCount: function(n){
if (n > 1) {
if (n < 10) n = "0" + n
this.$figText.show()
this.$slideCount.html(n)
}
else {
this.$figText.hide()
}
},
toggleNav: function(){
document.body.classList.toggle('navopen') // $('body').toggleClass('navopen')
},
})
|