From 557f4d3ea9775775f9868b9efb90cf63722a7dc6 Mon Sep 17 00:00:00 2001 From: j Date: Sat, 7 Mar 2015 20:16:59 +0530 Subject: [PATCH] pass modified to covers to avoid caching --- static/js/browser.js | 6 +++--- static/js/gridView.js | 4 ++-- static/js/identifyDialog.js | 1 + static/js/info.js | 6 +++--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/static/js/browser.js b/static/js/browser.js index d5761a2..95c8cbd 100644 --- a/static/js/browser.js +++ b/static/js/browser.js @@ -48,7 +48,7 @@ oml.ui.browser = function() { id: data.id, info: info, title: data.title, - url: '/' + data.id + '/' + ui.icons + '128.jpg', + url: '/' + data.id + '/' + ui.icons + '128.jpg?' + data.modified, width: width }; }, @@ -58,7 +58,7 @@ oml.ui.browser = function() { }), callback); }, keys: [ - 'author', 'coverRatio', 'extension', 'id', 'mediastate', + 'author', 'coverRatio', 'extension', 'id', 'mediastate', 'modified', 'previewRatio', 'size', 'textsize', 'title' ], max: 1, @@ -119,4 +119,4 @@ oml.ui.browser = function() { return that; -}; \ No newline at end of file +}; diff --git a/static/js/gridView.js b/static/js/gridView.js index 154d8fb..f35783b 100644 --- a/static/js/gridView.js +++ b/static/js/gridView.js @@ -48,7 +48,7 @@ oml.ui.gridView = function() { id: data.id, info: info, title: data.title, - url: '/' + data.id + '/' + ui.icons + '128.jpg', + url: '/' + data.id + '/' + ui.icons + '128.jpg?' + data.modified, width: width }; }, @@ -58,7 +58,7 @@ oml.ui.gridView = function() { }), callback); }, keys: [ - 'author', 'coverRatio', 'extension', 'id', 'mediastate', + 'author', 'coverRatio', 'extension', 'id', 'mediastate', 'modified', 'previewRatio', 'size', 'textsize', 'title' ], selected: ui.listSelection, diff --git a/static/js/identifyDialog.js b/static/js/identifyDialog.js index 948c521..e8a602c 100644 --- a/static/js/identifyDialog.js +++ b/static/js/identifyDialog.js @@ -240,6 +240,7 @@ oml.ui.identifyDialog = function(data) { that.close(); Ox.Request.clearCache('find'); oml.$ui.browser.reloadList(true); + oml.$ui.list.reloadList(true); Ox.Request.clearCache(data.id); oml.$ui.infoView.updateElement(data.id); }); diff --git a/static/js/info.js b/static/js/info.js index 60cf5c4..6873347 100644 --- a/static/js/info.js +++ b/static/js/info.js @@ -30,13 +30,13 @@ oml.ui.info = function() { id: id, keys: [ 'author', 'coverRatio', - 'description', 'title' + 'description', 'modified', 'title' ] }, function(result) { var data = result.data; that.empty(); $('') - .attr({src: '/' + id + '/cover128.jpg'}) + .attr({src: '/' + id + '/cover128.jpg?' + data.modified}) .css({margin: '16px 0 8px 0'}) .appendTo(that); $('
') @@ -69,4 +69,4 @@ oml.ui.info = function() { return that.updateElement(); -}; \ No newline at end of file +};