fix naming collision (with the main find element's scope select) and resulting JS errors

This commit is contained in:
rolux 2014-02-13 15:58:13 +00:00 committed by j
parent cc5ee75564
commit 9bfee31fca
2 changed files with 9 additions and 9 deletions

View file

@ -8,9 +8,9 @@ pandora.ui.folderBrowserBar = function(id, section) {
that = Ox.Bar({ that = Ox.Bar({
size: 24 size: 24
}); });
pandora.$ui.findListElement[id] = Ox.FormElementGroup({ pandora.$ui.findListsElement[id] = Ox.FormElementGroup({
elements: [ elements: [
pandora.$ui.findListSelect[id] = Ox.Select({ pandora.$ui.findListsSelect[id] = Ox.Select({
items: [ items: [
{id: 'user', title: Ox._('Find: User')}, {id: 'user', title: Ox._('Find: User')},
{id: 'name', title: Ox._('Find: {0}', [folderItem])} {id: 'name', title: Ox._('Find: {0}', [folderItem])}
@ -21,14 +21,14 @@ pandora.ui.folderBrowserBar = function(id, section) {
.bindEvent({ .bindEvent({
change: function(data) { change: function(data) {
var key = data.value, var key = data.value,
value = pandora.$ui.findListInput[id].value(); value = pandora.$ui.findListsInput[id].value();
value && updateList(key, value); value && updateList(key, value);
pandora.$ui.findListInput[id].options({ pandora.$ui.findListsInput[id].options({
placeholder: data.title placeholder: data.title
}); });
} }
}), }),
pandora.$ui.findListInput[id] = Ox.Input({ pandora.$ui.findListsInput[id] = Ox.Input({
changeOnKeypress: true, changeOnKeypress: true,
clear: true, clear: true,
placeholder: Ox._('Find: User'), placeholder: Ox._('Find: User'),
@ -36,7 +36,7 @@ pandora.ui.folderBrowserBar = function(id, section) {
}) })
.bindEvent({ .bindEvent({
change: function(data) { change: function(data) {
var key = pandora.$ui.findListSelect[id].value(), var key = pandora.$ui.findListsSelect[id].value(),
value = data.value; value = data.value;
updateList(key, value); updateList(key, value);
} }

View file

@ -22,9 +22,9 @@ pandora.ui.folders = function(section) {
pandora.$ui.folderBrowser = {}; pandora.$ui.folderBrowser = {};
pandora.$ui.folderList = {}; pandora.$ui.folderList = {};
pandora.$ui.folderPlaceholder = {}; pandora.$ui.folderPlaceholder = {};
pandora.$ui.findListElement = {}; pandora.$ui.findListsElement = {};
pandora.$ui.findListSelect = {}; pandora.$ui.findListsSelect = {};
pandora.$ui.findListInput = {}; pandora.$ui.findListsInput = {};
pandora.$ui.manageListsButton = {}; pandora.$ui.manageListsButton = {};
pandora.site.sectionFolders[section].forEach(function(folder, i) { pandora.site.sectionFolders[section].forEach(function(folder, i) {
var extras, $select; var extras, $select;