summaryrefslogtreecommitdiff
path: root/public/assets/js/lib/HeaderView.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-03-30 19:01:15 -0400
committerJules Laplace <jules@okfoc.us>2016-03-30 19:01:15 -0400
commit266a3f2b5070e2a7c897a54f8beef5063146dae4 (patch)
treef07a28cfa016642095083792da070b579122520a /public/assets/js/lib/HeaderView.js
parentb29849f5a0d5ee0a3695f4acd57640d453272b6d (diff)
fig numbers update correctly
Diffstat (limited to 'public/assets/js/lib/HeaderView.js')
-rw-r--r--public/assets/js/lib/HeaderView.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/public/assets/js/lib/HeaderView.js b/public/assets/js/lib/HeaderView.js
index 80dd5f8..374f84c 100644
--- a/public/assets/js/lib/HeaderView.js
+++ b/public/assets/js/lib/HeaderView.js
@@ -7,6 +7,7 @@ var HeaderView = View.extend({
},
initialize: function(){
+ this.$figText = this.$(".fig-text")
this.$pageNumber = this.$(".page-no")
this.$slideNumber = this.$(".slide-no")
this.$slideCount = this.$(".slide-count")
@@ -15,7 +16,7 @@ var HeaderView = View.extend({
updateSlideNumber: function(n){
n += 1
if (n < 10) n = "0" + n
- this.$slideNumber.html()
+ this.$slideNumber.html(n)
},
updatePageNumber: function(n){
@@ -25,8 +26,15 @@ var HeaderView = View.extend({
},
updateSlideCount: function(n){
- if (n < 10) n = "0" + n
- this.$slideCount.html(n)
+ console.log(n)
+ if (n > 1) {
+ if (n < 10) n = "0" + n
+ this.$figText.show()
+ this.$slideCount.html(n)
+ }
+ else {
+ this.$figText.hide()
+ }
},
toggleNav: function(){