From 409c5a1fc287d20cced1b3c2505ce09b80bdd20a Mon Sep 17 00:00:00 2001 From: j Date: Fri, 7 Jul 2023 16:14:17 +0530 Subject: [PATCH 1/2] avoid undefined errors --- static/js/infoView.js | 4 ++++ static/js/toolbar.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/static/js/infoView.js b/static/js/infoView.js index 42f70ce8..2307e109 100644 --- a/static/js/infoView.js +++ b/static/js/infoView.js @@ -588,6 +588,10 @@ pandora.ui.infoView = function(data, isMixed) { pandora.UI.set({infoIconSize: iconSize}); } + that.resizeElement = function() { + // overwrite splitpanel resize + }; + that.reload = function() { var src = src = '/' + data.id + '/' + ( ui.icons == 'posters' ? 'poster' : 'icon' diff --git a/static/js/toolbar.js b/static/js/toolbar.js index 464a7fc1..6eb0a845 100644 --- a/static/js/toolbar.js +++ b/static/js/toolbar.js @@ -95,7 +95,7 @@ pandora.ui.toolbar = function() { return ['map', 'calendar'].indexOf(pandora.user.ui.listView) > -1 ? 152 : 316; } that.updateListName = function(listId) { - pandora.$ui.listTitle.options({title: getListName(listId)}); + pandora.$ui.listTitle && pandora.$ui.listTitle.options({title: getListName(listId)}); }; return that; }; From adaeb16c6924981d60942b33ae659380b213ed63 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 7 Jul 2023 16:14:28 +0530 Subject: [PATCH 2/2] fix hiding of lists with : in name --- static/js/mainMenu.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/static/js/mainMenu.js b/static/js/mainMenu.js index 522d9cfa..07f608e8 100644 --- a/static/js/mainMenu.js +++ b/static/js/mainMenu.js @@ -291,27 +291,27 @@ pandora.ui.mainMenu = function() { items: 'Lists' }[ui.section], folderKey = folderItems.toLowerCase(), - listName = data.id.slice(7).replace(/\t/g, '_'), + name = data.id.slice(7).replace(/\t/g, '_'), set = {} if (ui.section == "items") { set.find = { conditions: [ - {key: 'list', value: pandora.user.username + ":" + listName, operator: '=='} + {key: 'list', value: pandora.user.username + ":" + name, operator: '=='} ], operator: '&' } } else if (ui.section == "edits") { - set.edit = pandora.user.username + ":" + listName; + set.edit = pandora.user.username + ":" + name; } else if (ui.section == "documents") { set.findDocuments = { conditions: [ - {key: 'collection', value: pandora.user.username + ":" + listName, operator: '=='} + {key: 'collection', value: pandora.user.username + ":" + name, operator: '=='} ], operator: '&' } } - set['hidden.' + folderKey] = ui.hidden[folderKey].filter(name => { return name != listName }) + set['hidden.' + folderKey] = ui.hidden[folderKey].filter(other => { return other != name }) pandora.UI.set(set) Ox.Request.clearCache('find' + folderItems); pandora.$ui.folderList.personal.reloadList() @@ -326,7 +326,7 @@ pandora.ui.mainMenu = function() { documents: ui._collection, edits: ui.edit, items: ui._list - }[ui.section]).split(':', 2)[1], + }[ui.section]).split(':').slice(1).join(':'), set = {}; if (ui.section == "items") { set.find = { @@ -341,7 +341,7 @@ pandora.ui.mainMenu = function() { operator: '&' }; } - set['hidden.' + folderKey] = Ox.unique([listName].concat(pandora.user.ui.hidden[folderKey])) + set['hidden.' + folderKey] = Ox.sort(Ox.unique([listName].concat(pandora.user.ui.hidden[folderKey]))) pandora.UI.set(set) Ox.Request.clearCache('find' + folderItems); pandora.$ui.folderList.personal.reloadList()