flush cache on list/item switch when sort is accessed/timesaccessed (fixes #245)
This commit is contained in:
parent
5a0a6e4c7f
commit
bc34966496
5 changed files with 16 additions and 4 deletions
|
@ -381,7 +381,8 @@
|
|||
"id": "accessed",
|
||||
"title": "Date Accessed",
|
||||
"type": "date",
|
||||
"columnWidth": 90
|
||||
"columnWidth": 90,
|
||||
"format": {"type": "date", "args": ["%Y-%m-%d %H:%M:%S"]}
|
||||
},
|
||||
{
|
||||
"id": "timesaccessed",
|
||||
|
|
|
@ -130,11 +130,12 @@ appPanel
|
|||
}
|
||||
|
||||
function loadOxJS(callback) {
|
||||
var script = document.createElement('script');
|
||||
var head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement,
|
||||
script = document.createElement('script');
|
||||
script.onload = callback;
|
||||
script.src = '/static/oxjs/dev/Ox.js';
|
||||
script.type = 'text/javascript';
|
||||
document.head.appendChild(script);
|
||||
head.appendChild(script);
|
||||
}
|
||||
|
||||
function loadOxUI(callback) {
|
||||
|
@ -150,6 +151,7 @@ appPanel
|
|||
url: '/api/',
|
||||
}).bindEvent({
|
||||
load: function(data) {
|
||||
Ox.print('browser', browserSupported);
|
||||
data.browserSupported = browserSupported;
|
||||
Ox.extend(pandora, {
|
||||
requests: {},
|
||||
|
|
|
@ -18,6 +18,9 @@ pandora.ui.backButton = function() {
|
|||
so we'd have to cancel with a function -- and
|
||||
it's unclear if the best place for that is here
|
||||
*/
|
||||
if (['accessed', 'timesaccessed'].indexOf(pandora.user.ui.listSort[0].key) > -1) {
|
||||
Ox.Request.clearCache('find');
|
||||
}
|
||||
pandora.UI.set({item: ''});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
pandora.ui.clipList = function(videoRatio) {
|
||||
|
||||
Ox.print('CLIP LIST FIND', !pandora.user.ui.item ? pandora.getItemFind(pandora.user.ui.find) : pandora.user.ui.itemFind);
|
||||
//Ox.print('CLIP LIST FIND', !pandora.user.ui.item ? pandora.getItemFind(pandora.user.ui.find) : pandora.user.ui.itemFind);
|
||||
|
||||
var ui = pandora.user.ui,
|
||||
fixedRatio = !ui.item ? 16/9 : videoRatio,
|
||||
|
@ -131,6 +131,9 @@ pandora.ui.clipList = function(videoRatio) {
|
|||
set['videoPoints.' + item] = Ox.extend(points, {
|
||||
position: points['in']
|
||||
});
|
||||
if (['accessed', 'timesaccessed'].indexOf(ui.listSort[0].key) > -1) {
|
||||
Ox.Request.clearCache('find');
|
||||
}
|
||||
pandora.UI.set(set);
|
||||
},
|
||||
openpreview: function(data) {
|
||||
|
|
|
@ -398,6 +398,9 @@ pandora.ui.list = function() {
|
|||
if (data.isSpecialTarget) {
|
||||
set.itemView = pandora.user.ui.videoView;
|
||||
}
|
||||
if (['accessed', 'timesaccessed'].indexOf(pandora.user.ui.listSort[0].key) > -1) {
|
||||
Ox.Request.clearCache('find');
|
||||
}
|
||||
pandora.UI.set(set);
|
||||
},
|
||||
openpreview: function(data) {
|
||||
|
|
Loading…
Reference in a new issue