From e00c33a62329b689c0ebf33fd5339f55425b2dcc Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 20 Feb 2013 01:27:59 +0530 Subject: [PATCH] make flags a site (not user) config (fixes #1268) --- pandora/config.0xdb.jsonc | 2 +- pandora/config.indiancinema.jsonc | 2 +- pandora/config.padma.jsonc | 2 +- pandora/config.pandora.jsonc | 2 +- static/js/pandora/filter.js | 2 +- static/js/pandora/utils.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora/config.0xdb.jsonc b/pandora/config.0xdb.jsonc index fd9e7a41..abedef25 100644 --- a/pandora/config.0xdb.jsonc +++ b/pandora/config.0xdb.jsonc @@ -86,6 +86,7 @@ {"id": "actor", "title": "Actor", "type": "string"}, {"id": "keyword", "title": "Keyword", "type": "string"} ], + "flags": true, /* An itemKey must have the following properties: id: The id of the key (as known by the server) @@ -735,7 +736,6 @@ "showBrowser": true, "showCalendarControls": true, // fixme: should be false "showFilters": true, - "showFlags": true, // fixme: this should be a site preference "showHome": true, "showIconBrowser": false, "showInfo": true, diff --git a/pandora/config.indiancinema.jsonc b/pandora/config.indiancinema.jsonc index b7c6ecd7..fea72592 100644 --- a/pandora/config.indiancinema.jsonc +++ b/pandora/config.indiancinema.jsonc @@ -87,6 +87,7 @@ {"id": "actor", "title": "Actor", "type": "string"}, {"id": "keyword", "title": "Keyword", "type": "string"} ], + "flags": false, /* An itemKey must have the following properties: id: The id of the key (as known by the server) @@ -735,7 +736,6 @@ "showBrowser": true, "showCalendarControls": true, // fixme: should be false "showFilters": true, - "showFlags": false, // fixme: this should be a site preference "showHome": true, "showIconBrowser": false, "showInfo": true, diff --git a/pandora/config.padma.jsonc b/pandora/config.padma.jsonc index a25aa21c..297eee1f 100644 --- a/pandora/config.padma.jsonc +++ b/pandora/config.padma.jsonc @@ -82,6 +82,7 @@ {"id": "events", "title": "Events", "type": "string"}, {"id": "keywords", "title": "Keywords", "type": "string"} ], + "flags": false, /* An itemKey must have the following properties: id: The id of the key (as known by the server) @@ -655,7 +656,6 @@ "showBrowser": true, "showCalendarControls": true, // fixme: should be false "showFilters": true, - "showFlags": false, "showHome": true, "showIconBrowser": false, "showInfo": true, diff --git a/pandora/config.pandora.jsonc b/pandora/config.pandora.jsonc index b0780103..3590b062 100644 --- a/pandora/config.pandora.jsonc +++ b/pandora/config.pandora.jsonc @@ -79,6 +79,7 @@ {"id": "featuring", "title": "Featuring", "type": "string"}, {"id": "keywords", "title": "Keywords", "type": "string"} ], + "flags": false, /* An itemKey must have the following properties: id: The id of the key (as known by the server) @@ -574,7 +575,6 @@ "showBrowser": true, "showCalendarControls": true, // fixme: should be false "showFilters": true, - "showFlags": false, "showHome": true, "showIconBrowser": false, "showInfo": true, diff --git a/static/js/pandora/filter.js b/static/js/pandora/filter.js index 0e8c4ce7..924c4193 100644 --- a/static/js/pandora/filter.js +++ b/static/js/pandora/filter.js @@ -15,7 +15,7 @@ pandora.ui.filter = function(id) { align: 'left', id: 'name', format: function(value) { - return pandora.user.ui.showFlags && ['country', 'language'].indexOf(id) > -1 + return pandora.site.flags && ['country', 'language'].indexOf(id) > -1 ? $('
') .append( $('') diff --git a/static/js/pandora/utils.js b/static/js/pandora/utils.js index 13bb9e71..5131988c 100644 --- a/static/js/pandora/utils.js +++ b/static/js/pandora/utils.js @@ -1132,7 +1132,7 @@ pandora.resizeFilters = function(width) { .size(2, pandora.user.ui.filterSizes[3]); pandora.$ui.filters && pandora.$ui.filters.forEach(function($list, i) { $list.resizeColumn('name', pandora.user.ui.filterSizes[i] - 44 - Ox.UI.SCROLLBAR_SIZE); - if (pandora.user.ui.showFlags) { + if (pandora.site.flags) { $list.find('.flagname').css({width: pandora.user.ui.filterSizes[i] - 68 - Ox.UI.SCROLLBAR_SIZE}) } });