From 886794e4a3d934a54db3b6fffbf088518e3f26e4 Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 29 Dec 2013 17:33:42 +0530 Subject: [PATCH] cosmetic changes --- static/js/UI.js | 4 ++-- static/js/pandora.js | 2 +- static/js/utils.js | 20 ++++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/static/js/UI.js b/static/js/UI.js index 8872340d..519d800a 100644 --- a/static/js/UI.js +++ b/static/js/UI.js @@ -211,8 +211,8 @@ pandora.UI = (function() { } triggerEvents && Ox.forEach(trigger, function(val, key) { Ox.Log('UI', 'TRIGGER ', key, val); - Ox.forEach(pandora.$ui, function(element) { - Ox.UI.isElement(element) && element.triggerEvent('pandora_' + key.toLowerCase(), { + Ox.forEach(pandora.$ui, function($element) { + Ox.UI.isElement($element) && $element.triggerEvent('pandora_' + key.toLowerCase(), { value: val, previousValue: self.previousUI[key] }); diff --git a/static/js/pandora.js b/static/js/pandora.js index 5c41311f..72c56b56 100644 --- a/static/js/pandora.js +++ b/static/js/pandora.js @@ -71,7 +71,7 @@ appPanel function getPandoraVersion() { var i, path, scripts = document.getElementsByTagName('script'); - for (i = 0;i < scripts.length; i++) { + for (i = 0; i < scripts.length; i++) { if(/pandora.js/.test(scripts[i].src)) { return scripts[i].src.replace(/.*\?/, ''); } diff --git a/static/js/utils.js b/static/js/utils.js index 9d28352f..a49966c9 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -775,7 +775,7 @@ pandora.enableDragAndDrop = function($list, canMove, section) { whiteSpace: 'nowrap' }) .html(text) - ) + ); } function isAtListsTop(e) { @@ -1722,9 +1722,9 @@ pandora.getVideoPartsAndPoints = function(durations, points) { }; pandora.hasDialogOrScreen = function() { - return $('.OxDialog:visible').length - || $('.OxFullscreen').length - || $('.OxScreen').length; + return !!$('.OxDialog:visible').length + || !!$('.OxFullscreen').length + || !!$('.OxScreen').length; }; pandora.hasEventsLayer = function() { @@ -1982,15 +1982,15 @@ pandora.resizeWindow = function() { pandora.$ui.clipList.size(); } else if (pandora.user.ui.itemView == 'timeline') { pandora.$ui.timeline && pandora.$ui.timeline.options({ - // fixme: duplicated - height: pandora.$ui.contentPanel.size(1), - width: pandora.$ui.document.width() - pandora.$ui.mainPanel.size(0) - 1 + // fixme: duplicated + height: pandora.$ui.contentPanel.size(1), + width: pandora.$ui.document.width() - pandora.$ui.mainPanel.size(0) - 1 }); } else if (pandora.user.ui.itemView == 'player') { pandora.$ui.player && pandora.$ui.player.options({ - // fixme: duplicated - height: pandora.$ui.contentPanel.size(1), - width: pandora.$ui.document.width() - pandora.$ui.mainPanel.size(0) - 1 + // fixme: duplicated + height: pandora.$ui.contentPanel.size(1), + width: pandora.$ui.document.width() - pandora.$ui.mainPanel.size(0) - 1 }); } else if (pandora.user.ui.itemView == 'editor') { pandora.$ui.editor && pandora.$ui.editor.options({