From 55bc1387757eb3754c0b67022c5be74e03e58280 Mon Sep 17 00:00:00 2001 From: rolux Date: Tue, 22 Oct 2013 15:57:35 +0200 Subject: [PATCH] fix #1909 (that.resize -> that.resizeElement) --- static/js/contactForm.js | 4 ++-- static/js/homePage.js | 4 ++-- static/js/infoView.0xdb.js | 2 +- static/js/infoView.indiancinema.js | 2 -- static/js/infoView.js | 2 -- static/js/infoView.padma.js | 2 -- static/js/item.js | 4 ++-- static/js/news.js | 2 +- static/js/postersView.js | 4 ++-- static/js/siteDialog.0xdb.js | 4 ++-- static/js/siteDialog.js | 4 ++-- static/js/utils.js | 2 +- 12 files changed, 15 insertions(+), 21 deletions(-) diff --git a/static/js/contactForm.js b/static/js/contactForm.js index 9fb6a5dc8..4f77ce4ef 100644 --- a/static/js/contactForm.js +++ b/static/js/contactForm.js @@ -157,7 +157,7 @@ pandora.ui.contactForm = function() { ) - 304 - Ox.UI.SCROLLBAR_SIZE, 512); } - that.resize = function() { + that.resizeElement = function() { var width = getWidth(); $form.css({width: width + 'px'}); $form.options('items').forEach(function($input, i) { @@ -169,7 +169,7 @@ pandora.ui.contactForm = function() { $receiptCheckbox.options({width: width - 136}); } $text.css({width: width + 'px'}); - } + }; return that; diff --git a/static/js/homePage.js b/static/js/homePage.js index e0938b4e0..d66ad0d18 100644 --- a/static/js/homePage.js +++ b/static/js/homePage.js @@ -65,7 +65,7 @@ pandora.ui.homePage = function() { .html('center') .appendTo($center); - that.resize = function() { + that.resizeElement = function() { var size = Ox.splitInt(window.innerWidth - pandora.user.ui.showSidebar * pandora.user.ui.sidebarSize - 1 - 64, 3); $left.css({width: size[0] + 'px'}); $center.css({width: size[1] + 'px'}); @@ -74,7 +74,7 @@ pandora.ui.homePage = function() { $right.css({width: size[2] + 'px'}); }; - that.resize(); + that.resizeElement(); return that; diff --git a/static/js/infoView.0xdb.js b/static/js/infoView.0xdb.js index d38843235..669df34ea 100644 --- a/static/js/infoView.0xdb.js +++ b/static/js/infoView.0xdb.js @@ -1148,7 +1148,7 @@ pandora.ui.infoView = function(data) { pandora.user.level == 'admin' && $list.replaceWith($list = renderList()); }; - that.resize = function() { + that.resizeElement = function() { var height = getHeight() + 'px'; $data.css({height: height}); $list && $list.css({height: height}); diff --git a/static/js/infoView.indiancinema.js b/static/js/infoView.indiancinema.js index 09c775a1b..2dc63a11f 100644 --- a/static/js/infoView.indiancinema.js +++ b/static/js/infoView.indiancinema.js @@ -1052,8 +1052,6 @@ pandora.ui.infoView = function(data) { toggleIconSize(); }; - that.resize = Ox.noop; - that.bindEvent({ pandora_icons: that.reload, pandora_showsiteposters: function() { diff --git a/static/js/infoView.js b/static/js/infoView.js index 479d824dd..d18dd4e94 100644 --- a/static/js/infoView.js +++ b/static/js/infoView.js @@ -632,8 +632,6 @@ pandora.ui.infoView = function(data) { toggleIconSize(); }; - that.resize = Ox.noop; - that.bindEvent({ pandora_icons: that.reload, pandora_showsiteposters: function() { diff --git a/static/js/infoView.padma.js b/static/js/infoView.padma.js index 5c6c5b709..71c64e42e 100644 --- a/static/js/infoView.padma.js +++ b/static/js/infoView.padma.js @@ -778,8 +778,6 @@ pandora.ui.infoView = function(data) { toggleIconSize(); }; - that.resize = Ox.noop; - that.bindEvent({ pandora_icons: that.reload, pandora_showsiteposters: function() { diff --git a/static/js/item.js b/static/js/item.js index 32c05f6b2..c86e286b0 100644 --- a/static/js/item.js +++ b/static/js/item.js @@ -62,7 +62,7 @@ pandora.ui.item = function() { pandora.$ui.item = pandora.ui.infoView(result.data) .bindEvent({ resize: function() { - pandora.$ui.item.resize && pandora.$ui.item.resize(); + pandora.$ui.item.resizeElement && pandora.$ui.item.resizeElement(); } }) ); @@ -132,7 +132,7 @@ pandora.ui.item = function() { pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.item = pandora.ui.PostersView().bindEvent({ resize: function() { - pandora.$ui.item.resize(); + pandora.$ui.item.resizeElement(); } }) ); diff --git a/static/js/news.js b/static/js/news.js index 25f1d0071..d05932cea 100644 --- a/static/js/news.js +++ b/static/js/news.js @@ -189,7 +189,7 @@ pandora.ui.news = function(width, height) { renderList(); } - that.resize = function(data) { + that.resizeElement = function(data) { width = data.width; height = data.height; $left.css({width: width - 512}); diff --git a/static/js/postersView.js b/static/js/postersView.js index e51d567ad..5e1c79072 100644 --- a/static/js/postersView.js +++ b/static/js/postersView.js @@ -22,9 +22,9 @@ pandora.ui.posterView = function() { orientation: 'horizontal' }); - that.resize = function() { + that.resizeElement = function() { selectedImage.url && renderPreview(); - } + }; pandora.api.get({ id: item, diff --git a/static/js/siteDialog.0xdb.js b/static/js/siteDialog.0xdb.js index 454a73a15..78f811802 100644 --- a/static/js/siteDialog.0xdb.js +++ b/static/js/siteDialog.0xdb.js @@ -172,9 +172,9 @@ pandora.ui.siteDialog = function(section) { dialogHeight = data.height; dialogWidth = data.width; if (selected == 'contact') { - pandora.$ui.contactForm.resize(); + pandora.$ui.contactForm.resizeElement(); } else if (selected == 'news') { - pandora.$ui.news.resize(data); + pandora.$ui.news.resizeElement(data); } }, key_down: function() { diff --git a/static/js/siteDialog.js b/static/js/siteDialog.js index e63022c56..084293051 100644 --- a/static/js/siteDialog.js +++ b/static/js/siteDialog.js @@ -140,9 +140,9 @@ pandora.ui.siteDialog = function(section) { dialogHeight = data.height; dialogWidth = data.width; if (selected == 'contact') { - pandora.$ui.contactForm.resize(); + pandora.$ui.contactForm.resizeElement(); } else if (selected == 'news') { - pandora.$ui.news.resize(data); + pandora.$ui.news.resizeElement(data); } }, key_down: function() { diff --git a/static/js/utils.js b/static/js/utils.js index 9a92cf0dd..4278776e9 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -1950,7 +1950,7 @@ pandora.resizeWindow = function() { } else { pandora.$ui.browser.scrollToSelection(); if (pandora.user.ui.itemView == 'info') { - pandora.$ui.item.resize && pandora.$ui.item.resize(); + pandora.$ui.item.resizeElement && pandora.$ui.item.resizeElement(); } else if (pandora.user.ui.itemView == 'clips') { pandora.$ui.clipList.size(); } else if (pandora.user.ui.itemView == 'timeline') {