From cc3931ae9f7da1387d494c530951e1bc1db10327 Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 15 Jul 2013 14:18:58 +0000 Subject: [PATCH] add getAllItemsTitle utils method --- static/js/pandora/allItems.js | 6 +----- static/js/pandora/utils.js | 6 ++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/static/js/pandora/allItems.js b/static/js/pandora/allItems.js index 66edf07d..23d27edd 100644 --- a/static/js/pandora/allItems.js +++ b/static/js/pandora/allItems.js @@ -41,11 +41,7 @@ pandora.ui.allItems = function(section) { overflow: 'hidden', whiteSpace: 'nowrap' }) - .html( - section == 'items' - ? Ox._('All {0}', [Ox._(pandora.site.itemName.plural)]) - : Ox._('{0} ' + Ox.toTitleCase(section), [pandora.site.site.name]) - ) + .html(pandora.getAllItemsTitle()) .appendTo(that), $items; diff --git a/static/js/pandora/utils.js b/static/js/pandora/utils.js index c000b461..e57e4770 100644 --- a/static/js/pandora/utils.js +++ b/static/js/pandora/utils.js @@ -808,6 +808,12 @@ pandora.exitFullscreen = function() { pandora.user.ui.showBrowser && pandora.$ui.contentPanel.size(0, 112 + Ox.UI.SCROLLBAR_SIZE); }; +pandora.getAllItemsTitle = function() { + return pandora.user.ui.section == 'items' + ? Ox._('All {0}', [Ox._(pandora.site.itemName.plural)]) + : Ox._('{0} ' + Ox.toTitleCase(pandora.user.ui.section), [pandora.site.site.name]); +}; + pandora.getClipsItems = function(width) { width = width || window.innerWidth - pandora.user.ui.showSidebar * pandora.user.ui.sidebarSize - 1