From 550ced514d6fbdc769095d48b3415259a2788ef1 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 5 Mar 2014 13:39:25 +0000 Subject: [PATCH] remove admin only flags for sections and locale --- static/js/appearanceDialog.js | 1 - static/js/folders.js | 1 + static/js/mainMenu.js | 3 +-- static/js/preferencesDialog.js | 1 - static/js/sectionButtons.js | 4 ++-- static/js/sectionSelect.js | 4 ++-- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/static/js/appearanceDialog.js b/static/js/appearanceDialog.js index 6e294400..86aede45 100644 --- a/static/js/appearanceDialog.js +++ b/static/js/appearanceDialog.js @@ -32,7 +32,6 @@ pandora.ui.appearanceDialog = function() { } }), Ox.Select({ - disabled: pandora.user.level != 'admin', id: 'locale', items: Object.keys(Ox.LOCALE_NAMES).map(function(locale) { return {id: locale, title: Ox.LOCALE_NAMES[locale]} diff --git a/static/js/folders.js b/static/js/folders.js index 4ff9ffe8..3b145483 100644 --- a/static/js/folders.js +++ b/static/js/folders.js @@ -232,6 +232,7 @@ pandora.ui.folders = function(section) { })]; } } else if (folder.id == 'featured') { + //FIXME: this should use 'canEditFeatured' + section if (pandora.user.level != 'admin') { extras = [infoButton(Ox._('Featured ' + folderItems), Ox._('Featured {0} are selected public {0}, picked by the {1} staff.', diff --git a/static/js/mainMenu.js b/static/js/mainMenu.js index b732bf81..1dcb83e8 100644 --- a/static/js/mainMenu.js +++ b/static/js/mainMenu.js @@ -56,8 +56,7 @@ pandora.ui.mainMenu = function() { return { id: section, title: section == 'items' ? Ox._(pandora.site.itemName.plural) : Ox._(Ox.toTitleCase(section)), - checked: ui.section == section, - disabled: section != 'items' && pandora.user.level != 'admin' + checked: ui.section == section }; }) } ] }, diff --git a/static/js/preferencesDialog.js b/static/js/preferencesDialog.js index e8e503ce..02cf4999 100644 --- a/static/js/preferencesDialog.js +++ b/static/js/preferencesDialog.js @@ -120,7 +120,6 @@ pandora.ui.preferencesDialog = function() { } }), Ox.Select({ - disabled: pandora.user.level != 'admin', id: 'locale', items: Object.keys(Ox.LOCALE_NAMES).map(function(locale) { return {id: locale, title: Ox.LOCALE_NAMES[locale]} diff --git a/static/js/sectionButtons.js b/static/js/sectionButtons.js index 94dc16e2..568ece23 100644 --- a/static/js/sectionButtons.js +++ b/static/js/sectionButtons.js @@ -4,8 +4,8 @@ pandora.ui.sectionButtons = function(section) { var that = Ox.ButtonGroup({ buttons: [ {id: 'items', title: Ox._(pandora.site.itemName.plural)}, - {id: 'edits', title: Ox._('Edits'), disabled: pandora.user.level != 'admin'}, - {id: 'texts', title: Ox._('Texts'), disabled: pandora.user.level != 'admin'} + {id: 'edits', title: Ox._('Edits')}, + {id: 'texts', title: Ox._('Texts')} ], id: 'sectionButtons', selectable: true, diff --git a/static/js/sectionSelect.js b/static/js/sectionSelect.js index 543527a5..3329b66e 100644 --- a/static/js/sectionSelect.js +++ b/static/js/sectionSelect.js @@ -6,8 +6,8 @@ pandora.ui.sectionSelect = function(section) { id: 'sectionSelect', items: [ {id: 'items', title: Ox._(pandora.site.itemName.plural)}, - {id: 'edits', title: Ox._('Edits'), disabled: pandora.user.level != 'admin'}, - {id: 'texts', title: Ox._('Texts'), disabled: pandora.user.level != 'admin'} + {id: 'edits', title: Ox._('Edits')}, + {id: 'texts', title: Ox._('Texts')} ], value: section || pandora.user.ui.section }).css({