From 083afbcbde9ec8fe7f9e6cbe57f53eaddf055b19 Mon Sep 17 00:00:00 2001 From: Tomasz Mieszkowski Date: Fri, 5 Sep 2014 11:31:31 +0200 Subject: Minor clean-up in 'tipboard.js' and some html files. --- tipboard/static/js/tipboard.js | 8 ++++---- tipboard/templates/base.html | 2 +- tipboard/tests/frontend/SpecRunner.html | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tipboard/static/js/tipboard.js b/tipboard/static/js/tipboard.js index 3727608..ce0dce6 100644 --- a/tipboard/static/js/tipboard.js +++ b/tipboard/static/js/tipboard.js @@ -40,7 +40,7 @@ RendererFactory.prototype.rendererName2renderObj = { RendererFactory.prototype.createRenderer = function (rendererName) { var lower = rendererName.toLowerCase(); var rendererClass = RendererFactory.prototype.rendererName2renderObj[lower]; - if (rendererClass === undefined) { + if (rendererClass === void 0) { throw new RendererFactory.prototype.UnknownRenderer(rendererName); } return rendererClass; @@ -183,11 +183,11 @@ var renderersSwapper = new RenderersSwapper(); getPalette: function(colors) { // DEPRECATED, use paletteAsList instead var palette = []; - for (var name in colors) { + $.each(colors, function(name) { if (['black', 'white', 'tile_background'].indexOf(name) < 0) { palette.push(colors[name]); } - } + }); return palette; }, @@ -413,7 +413,7 @@ var renderersSwapper = new RenderersSwapper(); return false; // break } }); - if (typeof nextFlipIdx !== undefined) { + if (typeof nextFlipIdx !== void 0) { var tileToFlip = containerFlips[nextFlipIdx]; $(tileToFlip).addClass("flippedforward"); } diff --git a/tipboard/templates/base.html b/tipboard/templates/base.html index 950a3ff..afb9136 100644 --- a/tipboard/templates/base.html +++ b/tipboard/templates/base.html @@ -1,5 +1,5 @@ - + {% block page_title %}Dashboard{% end %} diff --git a/tipboard/tests/frontend/SpecRunner.html b/tipboard/tests/frontend/SpecRunner.html index b62052d..51b54a7 100644 --- a/tipboard/tests/frontend/SpecRunner.html +++ b/tipboard/tests/frontend/SpecRunner.html @@ -1,5 +1,5 @@ - + Sample Dashboard -- cgit v1.2.3