From e5ff815f4b7e317e6d4d432d43b5a89b3bb23e48 Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 6 Feb 2014 08:51:17 +0000 Subject: [PATCH] sort element: add public resizeElement method --- static/js/sortElement.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/js/sortElement.js b/static/js/sortElement.js index f4ca0463..5d336e00 100644 --- a/static/js/sortElement.js +++ b/static/js/sortElement.js @@ -25,7 +25,7 @@ pandora.ui.sortElement = function(isNavigationView) { $sortSelect = Ox.Select({ items: items, value: ui[sortKey][0].key, - width: !isEmbed && isNavigationView ? 120 + Ox.UI.SCROLLBAR_SIZE : 144 + width: !isEmbed && isNavigationView && ui.clipColumns == 1 ? 120 + Ox.UI.SCROLLBAR_SIZE : 144 }) .bindEvent({ change: function(data) { @@ -78,6 +78,10 @@ pandora.ui.sortElement = function(isNavigationView) { }); } + that.resizeElement = function(size) { + $sortSelect.options({width: size}); + }; + return that; };