diff --git a/pandora/0xdb.json b/pandora/0xdb.json
index a1e788d67..370a90ce1 100644
--- a/pandora/0xdb.json
+++ b/pandora/0xdb.json
@@ -566,12 +566,12 @@
"icons": "posters",
"infoIconSize": 256,
"item": "",
- "itemSort": [{"key": "clip:position", "operator": ""}],
+ "itemSort": [{"key": "clip:position", "operator": "+"}],
"itemView": "info",
"listColumns": ["title", "director", "country", "year", "language", "runtime", "genre"],
"listColumnWidth": {},
"listSelection": [],
- "listSort": [{"key": "director", "operator": ""}],
+ "listSort": [{"key": "director", "operator": "+"}],
"listView": "grid",
"lists": {},
"mapFind": "",
diff --git a/static/js/pandora.js b/static/js/pandora.js
index 2289aeff6..e8df4d7b4 100644
--- a/static/js/pandora.js
+++ b/static/js/pandora.js
@@ -26,7 +26,7 @@ appPanel
Ox.load({
UI: {
- debug: true,
+ //debug: true,
hideScreen: false,
loadImages: true,
showScreen: true,
@@ -42,15 +42,6 @@ Ox.load({
load: function(data) {
if (!browserSupported) {
- $('.OxLoadingScreen').find('div').append(
- $('
')
- .css({
- width: '100%',
- paddingTop: '78px',
- textAlign: 'center'
- })
- .html(data.site.site.name + ' does not support your browser,
please update to one of these browsers.')
- );
return;
}
@@ -63,8 +54,6 @@ Ox.load({
Ox.print('Ox.App load', data);
- // Ox.UI.hideLoadingScreen();
-
Ox.extend(pandora, {
$ui: {
body: $('body'),
@@ -118,15 +107,6 @@ Ox.load({
pandora.site.listSettings[key] = key[4].toLowerCase() + key.substr(5);
}
});
- /*
- if (Ox.isEmpty(pandora.user.ui.lists)) {
- var listSettings = {};
- Ox.forEach(pandora.site.listSettings, function(listSetting, setting) {
- listSettings[listSetting] = pandora.site.user.ui[setting];
- });
- pandora.UI.set('lists.', listSettings);
- }
- */
Ox.extend(pandora.user, {
sectionElement: 'buttons',
@@ -163,8 +143,8 @@ Ox.load({
$.getJSON(json, function(files) {
var promises = [];
files.forEach(function(file) {
- // fixme: opera doesnt fire onload for svg
- // fixme: we don't have any svgs, right?
+ // fixme: opera doesnt fire onload for svgs
+ // (but neither do we support opera nor do we have svgs)
if ($.browser.opera && Ox.endsWith(file, '.svg')) {
return;
}
diff --git a/static/js/pandora/UI.js b/static/js/pandora/UI.js
index b96e91e83..723148d3d 100644
--- a/static/js/pandora/UI.js
+++ b/static/js/pandora/UI.js
@@ -43,11 +43,12 @@ pandora.UI = (function() {
pandora.user.ui._list = list;
pandora.user.ui._groupsState = pandora.getGroupsState(val);
pandora.user.ui._findState = pandora.getFindState(val);
- // make sure we don't do this on page load
+ if (!pandora.user.ui.lists[list]) {
+ add['lists.' + that.encode(list)] = {};
+ }
+ // fixme: if we did this on page load,
+ // find would get set to advanced
if (pandora.$ui.appPanel && list != self.previousUI._list) {
- if (!pandora.user.ui.lists[list]) {
- add['lists.' + that.encode(list)] = {};
- }
Ox.forEach(listSettings, function(listSetting, setting) {
if (!pandora.user.ui.lists[list]) {
// add default list setting and copy to settings
@@ -111,7 +112,6 @@ pandora.UI = (function() {
});
});
});
- Ox.print('isBooting?', !pandora.$ui.appPanel, Object.keys(args), pandora.user.ui.listView);
pandora.URL.update(Object.keys(
!pandora.$ui.appPanel ? args : trigger
));
diff --git a/static/js/pandora/URL.js b/static/js/pandora/URL.js
index e28cb817c..1eb526803 100644
--- a/static/js/pandora/URL.js
+++ b/static/js/pandora/URL.js
@@ -392,9 +392,12 @@ pandora.URL = (function() {
} else {
if (
!pandora.$ui.appPanel
- || (keys.length == 1 && keys[0] == 'span')
|| keys.every(function(key) {
- return /^videoPoints/.test(key);
+ return [
+ 'listColumnWidth', 'listColumns', 'listSelection',
+ 'mapFind', 'mapSelection'
+ ].indexOf(key) > -1
+ || /^videoPoints/.test(key);
})
) {
action = 'replace';
diff --git a/static/js/pandora/ui/clipList.js b/static/js/pandora/ui/clipList.js
index 0c1aaa8e2..cd8673089 100644
--- a/static/js/pandora/ui/clipList.js
+++ b/static/js/pandora/ui/clipList.js
@@ -9,7 +9,6 @@ pandora.ui.clipList = function(videoRatio) {
that = Ox.IconList({
fixedRatio: fixedRatio,
item: function(data, sort, size) {
- Ox.print('*********', data)
size = size || 128; // fixme: is this needed?
var ratio, width, height, url, sortKey, info;
if (!ui.item) {
diff --git a/static/js/pandora/ui/infoView.js b/static/js/pandora/ui/infoView.js
index f4edd28a7..f8efc1a22 100644
--- a/static/js/pandora/ui/infoView.js
+++ b/static/js/pandora/ui/infoView.js
@@ -391,11 +391,11 @@ pandora.ui.infoView = function(data) {
}
$text.find('a').click(function(event) {
- pandora.URL.push(
- event.target.hostname == document.location.hostname
- ? event.target.pathname
- : '/url=' + encodeURIComponent(event.target.href)
- );
+ if (event.target.hostname == document.location.hostname) {
+ pandora.URL.push(event.target.pathname);
+ } else {
+ document.location.href = '/url=' + encodeURIComponent(event.target.href);
+ }
return false;
});
@@ -429,7 +429,7 @@ pandora.ui.infoView = function(data) {
: ['index', 'position', 'width', 'height', 'url'],
max: 1,
min: 1,
- orientation: 'vertical',
+ orientation: 'both',
selected: [selectedImage['index']],
size: 128,
sort: [{key: 'index', operator: '+'}],
diff --git a/static/js/pandora/ui/item.js b/static/js/pandora/ui/item.js
index 9bd8a2716..89d16008d 100644
--- a/static/js/pandora/ui/item.js
+++ b/static/js/pandora/ui/item.js
@@ -10,6 +10,7 @@ pandora.ui.item = function() {
}, pandora.user.level == 'admin' && pandora.user.ui.itemView == 'info' ? 0 : -1, function(result) {
if (result.status.code == 200) {
+ // fixme: can the history state title get updated too?
document.title = pandora.getPageTitle(result.data.title);
}
diff --git a/static/js/pandora/utils.js b/static/js/pandora/utils.js
index 951069eef..01b638d88 100644
--- a/static/js/pandora/utils.js
+++ b/static/js/pandora/utils.js
@@ -565,6 +565,7 @@ pandora.getMetadataByIdOrName = function(item, view, str, callback) {
(function() {
var itemTitles = {};
pandora.getPageTitle = function(itemTitle) {
+ Ox.print('ITEM TITLES', itemTitles)
if (itemTitle) {
itemTitles[pandora.user.ui.item] = itemTitle
}