forked from 0x2620/pandora
misc fixes
This commit is contained in:
parent
41f6ca478c
commit
d800c49c8e
8 changed files with 23 additions and 39 deletions
|
|
@ -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
|
||||
));
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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: '+'}],
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue