From 9bfee31fca37060a3e988899ca76a7bf1589ffde Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 13 Feb 2014 15:58:13 +0000 Subject: [PATCH] fix naming collision (with the main find element's scope select) and resulting JS errors --- static/js/folderBrowserBar.js | 12 ++++++------ static/js/folders.js | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/static/js/folderBrowserBar.js b/static/js/folderBrowserBar.js index df5221242..5b9c6142d 100644 --- a/static/js/folderBrowserBar.js +++ b/static/js/folderBrowserBar.js @@ -8,9 +8,9 @@ pandora.ui.folderBrowserBar = function(id, section) { that = Ox.Bar({ size: 24 }); - pandora.$ui.findListElement[id] = Ox.FormElementGroup({ + pandora.$ui.findListsElement[id] = Ox.FormElementGroup({ elements: [ - pandora.$ui.findListSelect[id] = Ox.Select({ + pandora.$ui.findListsSelect[id] = Ox.Select({ items: [ {id: 'user', title: Ox._('Find: User')}, {id: 'name', title: Ox._('Find: {0}', [folderItem])} @@ -21,14 +21,14 @@ pandora.ui.folderBrowserBar = function(id, section) { .bindEvent({ change: function(data) { var key = data.value, - value = pandora.$ui.findListInput[id].value(); + value = pandora.$ui.findListsInput[id].value(); value && updateList(key, value); - pandora.$ui.findListInput[id].options({ + pandora.$ui.findListsInput[id].options({ placeholder: data.title }); } }), - pandora.$ui.findListInput[id] = Ox.Input({ + pandora.$ui.findListsInput[id] = Ox.Input({ changeOnKeypress: true, clear: true, placeholder: Ox._('Find: User'), @@ -36,7 +36,7 @@ pandora.ui.folderBrowserBar = function(id, section) { }) .bindEvent({ change: function(data) { - var key = pandora.$ui.findListSelect[id].value(), + var key = pandora.$ui.findListsSelect[id].value(), value = data.value; updateList(key, value); } diff --git a/static/js/folders.js b/static/js/folders.js index 4a47685b5..4ff9ffe84 100644 --- a/static/js/folders.js +++ b/static/js/folders.js @@ -22,9 +22,9 @@ pandora.ui.folders = function(section) { pandora.$ui.folderBrowser = {}; pandora.$ui.folderList = {}; pandora.$ui.folderPlaceholder = {}; - pandora.$ui.findListElement = {}; - pandora.$ui.findListSelect = {}; - pandora.$ui.findListInput = {}; + pandora.$ui.findListsElement = {}; + pandora.$ui.findListsSelect = {}; + pandora.$ui.findListsInput = {}; pandora.$ui.manageListsButton = {}; pandora.site.sectionFolders[section].forEach(function(folder, i) { var extras, $select;