diff --git a/static/js/pandora/news.js b/static/js/pandora/news.js index 86f392dea..010dc2647 100644 --- a/static/js/pandora/news.js +++ b/static/js/pandora/news.js @@ -13,7 +13,8 @@ pandora.ui.news = function(width, height) { ? 'rgb(32, 32, 32)' : 'rgb(224, 224, 224)', isEditable = pandora.site.capabilities.canEditSitePages[pandora.user.level], items = [], - selected; + selected, + $text; pandora.api.getNews({}, function(result) { items = result.data.items; @@ -60,7 +61,7 @@ pandora.ui.news = function(width, height) { function renderItem() { $left.empty(); - var $title, $date, $text, + var $title, $date, index = Ox.getIndexById(items, selected); $title = Ox.Editable({ editable: isEditable, @@ -182,10 +183,13 @@ pandora.ui.news = function(width, height) { }); } - that.resize = function() { - + that.resize = function(data) { + width = data.width; + height = data.height; + $left.css({width: width - 512}); + $text.css({width: width - 512}); }; return that; -}; \ No newline at end of file +}; diff --git a/static/js/pandora/siteDialog.js b/static/js/pandora/siteDialog.js index e94fce6cc..eadfde9f8 100644 --- a/static/js/pandora/siteDialog.js +++ b/static/js/pandora/siteDialog.js @@ -151,7 +151,7 @@ pandora.ui.siteDialog = function(section) { if (selected == 'contact') { pandora.$ui.contactForm.resize(); } else if (selected == 'news') { - + pandora.$ui.news.resize(data); } } });