From 49e0ad774e47c16664d0295c887d62ba6f5a879f Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 2 Nov 2011 16:04:06 +0100 Subject: [PATCH 1/3] add logs entry to debug menu --- static/js/pandora/menu.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/js/pandora/menu.js b/static/js/pandora/menu.js index 2f2f2be15..99b298347 100644 --- a/static/js/pandora/menu.js +++ b/static/js/pandora/menu.js @@ -139,6 +139,7 @@ pandora.ui.mainMenu = function() { pandora.site.capabilities.canSeeDebugMenu[pandora.user.level] ? [ { id: 'debugMenu', title: 'Debug', items: [ + { id: 'logs', title: 'View Logs...'}, { id: 'clearcache', title: 'Clear Cache'}, { id: 'reloadapplication', title: 'Reload Application'}, { id: 'resetui', title: 'Reset UI Settings'}, @@ -266,6 +267,10 @@ pandora.ui.mainMenu = function() { pandora.api.resetUI({}, function() { pandora.$ui.appPanel.reload(); }); + } else if (data.id == 'logs') { + (pandora.$ui.logsDialog || ( + pandora.$ui.logsDialog = pandora.ui.logsDialog()) + ).open(); } else if (data.id == 'debug') { if(localStorage.debug) { delete localStorage.debug; From 4b78d1184d8c3e684de959d9e01f89a51330ad8d Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 2 Nov 2011 16:05:49 +0100 Subject: [PATCH 2/3] dialogs stay around, clear cache on close --- static/js/pandora/logsDialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/pandora/logsDialog.js b/static/js/pandora/logsDialog.js index 8aa7194b9..b75a5fe63 100644 --- a/static/js/pandora/logsDialog.js +++ b/static/js/pandora/logsDialog.js @@ -1,7 +1,6 @@ // vim: et:ts=4:sw=4:sts=4:ft=javascript pandora.ui.logsDialog = function() { - Ox.Request.clearCache('findLogs'); var height = Math.round((window.innerHeight - 48) * 0.9), width = Math.round(window.innerWidth * 0.9), numberOfLogs = 0, @@ -149,6 +148,7 @@ pandora.ui.logsDialog = function() { width: 48 }).bindEvent({ click: function() { + Ox.Request.clearCache('findLogs'); that.close(); } }) From 0ad5406f5e45b49d33351806751c78d1b1477179 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 2 Nov 2011 16:25:47 +0100 Subject: [PATCH 3/3] make sort director weird, fixes: #129 --- pandora/item/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/item/views.py b/pandora/item/views.py index af1dc3a63..edad1c224 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -38,7 +38,7 @@ def _order_query(qs, sort, prefix='sort__'): sort.append({'operator': '+', 'key': 'director'}) elif sort[0]['key'] == 'director': sort.append({'operator': '-', 'key': 'year'}) - sort.append({'operator': '+', 'key': 'title'}) + sort.append({'operator': '-', 'key': 'title'}) elif sort[0]['key'] == 'year': sort.append({'operator': '+', 'key': 'director'}) sort.append({'operator': '+', 'key': 'title'})