fix #1909 (that.resize -> that.resizeElement)

This commit is contained in:
rolux 2013-10-22 15:57:35 +02:00
parent 64fa66e327
commit 55bc138775
12 changed files with 15 additions and 21 deletions

View file

@ -157,7 +157,7 @@ pandora.ui.contactForm = function() {
) - 304 - Ox.UI.SCROLLBAR_SIZE, 512); ) - 304 - Ox.UI.SCROLLBAR_SIZE, 512);
} }
that.resize = function() { that.resizeElement = function() {
var width = getWidth(); var width = getWidth();
$form.css({width: width + 'px'}); $form.css({width: width + 'px'});
$form.options('items').forEach(function($input, i) { $form.options('items').forEach(function($input, i) {
@ -169,7 +169,7 @@ pandora.ui.contactForm = function() {
$receiptCheckbox.options({width: width - 136}); $receiptCheckbox.options({width: width - 136});
} }
$text.css({width: width + 'px'}); $text.css({width: width + 'px'});
} };
return that; return that;

View file

@ -65,7 +65,7 @@ pandora.ui.homePage = function() {
.html('center') .html('center')
.appendTo($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); var size = Ox.splitInt(window.innerWidth - pandora.user.ui.showSidebar * pandora.user.ui.sidebarSize - 1 - 64, 3);
$left.css({width: size[0] + 'px'}); $left.css({width: size[0] + 'px'});
$center.css({width: size[1] + 'px'}); $center.css({width: size[1] + 'px'});
@ -74,7 +74,7 @@ pandora.ui.homePage = function() {
$right.css({width: size[2] + 'px'}); $right.css({width: size[2] + 'px'});
}; };
that.resize(); that.resizeElement();
return that; return that;

View file

@ -1148,7 +1148,7 @@ pandora.ui.infoView = function(data) {
pandora.user.level == 'admin' && $list.replaceWith($list = renderList()); pandora.user.level == 'admin' && $list.replaceWith($list = renderList());
}; };
that.resize = function() { that.resizeElement = function() {
var height = getHeight() + 'px'; var height = getHeight() + 'px';
$data.css({height: height}); $data.css({height: height});
$list && $list.css({height: height}); $list && $list.css({height: height});

View file

@ -1052,8 +1052,6 @@ pandora.ui.infoView = function(data) {
toggleIconSize(); toggleIconSize();
}; };
that.resize = Ox.noop;
that.bindEvent({ that.bindEvent({
pandora_icons: that.reload, pandora_icons: that.reload,
pandora_showsiteposters: function() { pandora_showsiteposters: function() {

View file

@ -632,8 +632,6 @@ pandora.ui.infoView = function(data) {
toggleIconSize(); toggleIconSize();
}; };
that.resize = Ox.noop;
that.bindEvent({ that.bindEvent({
pandora_icons: that.reload, pandora_icons: that.reload,
pandora_showsiteposters: function() { pandora_showsiteposters: function() {

View file

@ -778,8 +778,6 @@ pandora.ui.infoView = function(data) {
toggleIconSize(); toggleIconSize();
}; };
that.resize = Ox.noop;
that.bindEvent({ that.bindEvent({
pandora_icons: that.reload, pandora_icons: that.reload,
pandora_showsiteposters: function() { pandora_showsiteposters: function() {

View file

@ -62,7 +62,7 @@ pandora.ui.item = function() {
pandora.$ui.item = pandora.ui.infoView(result.data) pandora.$ui.item = pandora.ui.infoView(result.data)
.bindEvent({ .bindEvent({
resize: function() { 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.contentPanel.replaceElement(1,
pandora.$ui.item = pandora.ui.PostersView().bindEvent({ pandora.$ui.item = pandora.ui.PostersView().bindEvent({
resize: function() { resize: function() {
pandora.$ui.item.resize(); pandora.$ui.item.resizeElement();
} }
}) })
); );

View file

@ -189,7 +189,7 @@ pandora.ui.news = function(width, height) {
renderList(); renderList();
} }
that.resize = function(data) { that.resizeElement = function(data) {
width = data.width; width = data.width;
height = data.height; height = data.height;
$left.css({width: width - 512}); $left.css({width: width - 512});

View file

@ -22,9 +22,9 @@ pandora.ui.posterView = function() {
orientation: 'horizontal' orientation: 'horizontal'
}); });
that.resize = function() { that.resizeElement = function() {
selectedImage.url && renderPreview(); selectedImage.url && renderPreview();
} };
pandora.api.get({ pandora.api.get({
id: item, id: item,

View file

@ -172,9 +172,9 @@ pandora.ui.siteDialog = function(section) {
dialogHeight = data.height; dialogHeight = data.height;
dialogWidth = data.width; dialogWidth = data.width;
if (selected == 'contact') { if (selected == 'contact') {
pandora.$ui.contactForm.resize(); pandora.$ui.contactForm.resizeElement();
} else if (selected == 'news') { } else if (selected == 'news') {
pandora.$ui.news.resize(data); pandora.$ui.news.resizeElement(data);
} }
}, },
key_down: function() { key_down: function() {

View file

@ -140,9 +140,9 @@ pandora.ui.siteDialog = function(section) {
dialogHeight = data.height; dialogHeight = data.height;
dialogWidth = data.width; dialogWidth = data.width;
if (selected == 'contact') { if (selected == 'contact') {
pandora.$ui.contactForm.resize(); pandora.$ui.contactForm.resizeElement();
} else if (selected == 'news') { } else if (selected == 'news') {
pandora.$ui.news.resize(data); pandora.$ui.news.resizeElement(data);
} }
}, },
key_down: function() { key_down: function() {

View file

@ -1950,7 +1950,7 @@ pandora.resizeWindow = function() {
} else { } else {
pandora.$ui.browser.scrollToSelection(); pandora.$ui.browser.scrollToSelection();
if (pandora.user.ui.itemView == 'info') { 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') { } else if (pandora.user.ui.itemView == 'clips') {
pandora.$ui.clipList.size(); pandora.$ui.clipList.size();
} else if (pandora.user.ui.itemView == 'timeline') { } else if (pandora.user.ui.itemView == 'timeline') {