diff --git a/pandora/0xdb.json b/pandora/0xdb.json index 370a90ce1..da87e1d94 100644 --- a/pandora/0xdb.json +++ b/pandora/0xdb.json @@ -500,6 +500,7 @@ {"name": "Restricted", "color": [255, 128, 0], "description": "Only staff and admin can see and play."}, {"name": "Private", "color": [255, 0, 0], "description": "Only admins can see and play."} ], + "sendReferrer": false, "site": { "id": "{{settings.SITEID}}", "name": "{{settings.SITENAME}}", diff --git a/static/js/pandora.js b/static/js/pandora.js index 295073318..cc7130aa2 100644 --- a/static/js/pandora.js +++ b/static/js/pandora.js @@ -42,6 +42,11 @@ Ox.load({ if (!browserSupported) { return; + /* + $('.OxLoadingScreen') + .css({opacity: 0.9}) + .click($(this).remove); + */ } Ox.extend(pandora, { diff --git a/static/js/pandora/URL.js b/static/js/pandora/URL.js index 6a4152779..854834434 100644 --- a/static/js/pandora/URL.js +++ b/static/js/pandora/URL.js @@ -112,12 +112,10 @@ pandora.URL = (function() { if (pandora.user.ui.showHome) { pandora.$ui.home = pandora.ui.home().showScreen(); - /* - Ox.print('LIST', pandora.user.ui._list) - pandora.user.ui._list && pandora.Query.fromString( - 'find=list:' + pandora.user.ui._list - ); - */ + pandora.user.ui._list = pandora.getListsState(pandora.user.ui.find); + pandora.user.ui._groupsState = pandora.getGroupsState(pandora.user.ui.find); + pandora.user.ui._findState = pandora.getFindState(pandora.user.ui.find); + } else { /* pandora.UI.set({ diff --git a/static/js/pandora/ui/group.js b/static/js/pandora/ui/group.js index d9e32ca8f..32325dc32 100644 --- a/static/js/pandora/ui/group.js +++ b/static/js/pandora/ui/group.js @@ -78,7 +78,9 @@ pandora.ui.group = function(id) { pandora.$ui.list.triggerEvent('paste', data); }, select: function(data) { - // FIXME: cant index be an empty array, instead of -1? + // fixme: cant index be an empty array, instead of -1? + // FIXME: this is still incorrect when deselecting a group item + // makes a selected item in another group disappear var conditions = data.ids.map(function(value) { return { key: id, diff --git a/static/js/pandora/ui/infoView.js b/static/js/pandora/ui/infoView.js index f8efc1a22..36d2059e6 100644 --- a/static/js/pandora/ui/infoView.js +++ b/static/js/pandora/ui/infoView.js @@ -390,14 +390,7 @@ pandora.ui.infoView = function(data) { }).join(', '); } - $text.find('a').click(function(event) { - if (event.target.hostname == document.location.hostname) { - pandora.URL.push(event.target.pathname); - } else { - document.location.href = '/url=' + encodeURIComponent(event.target.href); - } - return false; - }); + pandora.createLinks($text); function renderList() { pandora.api.get({ diff --git a/static/js/pandora/utils.js b/static/js/pandora/utils.js index 01b638d88..ad8259801 100644 --- a/static/js/pandora/utils.js +++ b/static/js/pandora/utils.js @@ -134,6 +134,17 @@ pandora.addList = function() { } }; +pandora.createLinks = function($element) { + $element.find('a').click(function(event) { + if (event.target.hostname == document.location.hostname) { + pandora.URL.push(event.target.pathname); + } else { + document.location.href = '/url=' + encodeURIComponent(event.target.href); + } + return false; + }); +}; + pandora.enableDragAndDrop = function($list, canMove) { var $tooltip = Ox.Tooltip({ @@ -774,6 +785,8 @@ pandora.selectList = function() { // are either list or groups), or if all conditions in an | query have // the same group id as key and "==" as operator Ox.print('getFindState', find) + // FIXME: this is still incorrect when you select a lot of group items + // and reload the page (will be advanced) var conditions, indices, state = {index: -1, key: '*', value: ''}; if (find.operator == '&') { // number of conditions that are not list or groups