diff options
| author | Jules Laplace <jules@okfoc.us> | 2016-03-30 19:01:15 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2016-03-30 19:01:15 -0400 |
| commit | 266a3f2b5070e2a7c897a54f8beef5063146dae4 (patch) | |
| tree | f07a28cfa016642095083792da070b579122520a /public/assets/js/lib/HeaderView.js | |
| parent | b29849f5a0d5ee0a3695f4acd57640d453272b6d (diff) | |
fig numbers update correctly
Diffstat (limited to 'public/assets/js/lib/HeaderView.js')
| -rw-r--r-- | public/assets/js/lib/HeaderView.js | 14 |
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(){ |
