From 1f22d8c28ca61139baf10d9be3650940d918b8d5 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Wed, 31 Dec 2014 12:57:00 +0000 Subject: [PATCH] Move tag management from behind config/labs flags issue #4248 - tag management is ready for release, this takes the training wheels off :) - remove config flag - remove labs checkbox and related code --- core/client/controllers/feature.js | 4 ---- core/client/controllers/settings.js | 4 ++-- core/client/controllers/settings/labs.js | 13 +------------ core/client/routes/settings/tags.js | 17 +---------------- core/client/templates/settings/labs.hbs | 12 ------------ core/server/api/configuration.js | 1 - 6 files changed, 4 insertions(+), 47 deletions(-) diff --git a/core/client/controllers/feature.js b/core/client/controllers/feature.js index bb449f7f41..4f99ec29df 100644 --- a/core/client/controllers/feature.js +++ b/core/client/controllers/feature.js @@ -25,10 +25,6 @@ var FeatureController = Ember.Controller.extend(Ember.PromiseProxyMixin, { return value; }), - tagsUI: Ember.computed('config.tagsUI', 'labs.tagsUI', function () { - return this.get('config.tagsUI') || this.get('labs.tagsUI'); - }), - codeInjectionUI: Ember.computed('config.codeInjectionUI', 'labs.codeInjectionUI', function () { return this.get('config.codeInjectionUI') || this.get('labs.codeInjectionUI'); }) diff --git a/core/client/controllers/settings.js b/core/client/controllers/settings.js index 090251c267..d60fd784fe 100644 --- a/core/client/controllers/settings.js +++ b/core/client/controllers/settings.js @@ -7,8 +7,8 @@ var SettingsController = Ember.Controller.extend({ showUsers: Ember.computed('session.user.name', function () { return this.get('session.user.isAuthor') ? false : true; }), - showTags: Ember.computed('session.user.name', 'controllers.feature.tagsUI', function () { - return this.get('session.user.isAuthor') || !this.get('controllers.feature.tagsUI') ? false : true; + showTags: Ember.computed('session.user.name', function () { + return this.get('session.user.isAuthor') ? false : true; }), showCodeInjection: Ember.computed('session.user.name', 'controllers.feature.codeInjectionUI', function () { return this.get('session.user.isAuthor') || this.get('session.user.isEditor') || !this.get('controllers.feature.codeInjectionUI') ? false : true; diff --git a/core/client/controllers/settings/labs.js b/core/client/controllers/settings/labs.js index 531d91d01c..f3c7e8023c 100644 --- a/core/client/controllers/settings/labs.js +++ b/core/client/controllers/settings/labs.js @@ -22,20 +22,9 @@ var LabsController = Ember.Controller.extend(Ember.Evented, { }); }, - tagsUIFlag: Ember.computed.alias('config.tagsUI'), codeUIFlag: Ember.computed.alias('config.codeInjectionUI'), - useTagsUI: Ember.computed('controllers.feature.tagsUI', function (key, value) { - // setter - if (arguments.length > 1) { - this.saveLabs('tagsUI', value); - } - - // getter - return this.get('controllers.feature.tagsUI') || false; - }), - - useCodeInjectionUI: Ember.computed('controllers.feature.tagsUI', function (key, value) { + useCodeInjectionUI: Ember.computed('controllers.feature.codeInjectionUI', function (key, value) { // setter if (arguments.length > 1) { this.saveLabs('codeInjectionUI', value); diff --git a/core/client/routes/settings/tags.js b/core/client/routes/settings/tags.js index d51502f475..862d043782 100644 --- a/core/client/routes/settings/tags.js +++ b/core/client/routes/settings/tags.js @@ -21,23 +21,8 @@ TagsRoute = AuthenticatedRoute.extend(CurrentUserSettings, PaginationRouteMixin, titleToken: 'Tags', beforeModel: function () { - var feature = this.controllerFor('feature'), - self = this; - - if (!feature) { - this.generateController('feature'); - feature = this.controllerFor('feature'); - } - return this.currentUser() - .then(this.transitionAuthor()) - .then(function () { - return feature.then(function () { - if (!feature.get('tagsUI')) { - return self.transitionTo('settings.general'); - } - }); - }); + .then(this.transitionAuthor()); }, model: function () { diff --git a/core/client/templates/settings/labs.hbs b/core/client/templates/settings/labs.hbs index bd72e08d41..e234a8977b 100644 --- a/core/client/templates/settings/labs.hbs +++ b/core/client/templates/settings/labs.hbs @@ -47,18 +47,6 @@
- {{#unless tagsUIFlag}} -
- - -

A settings screen which enables you to add, edit and delete tags (work in progress)

-
- {{/unless}} - {{#unless codeUIFlag}}
diff --git a/core/server/api/configuration.js b/core/server/api/configuration.js index 47e45e3db9..75a203cea8 100644 --- a/core/server/api/configuration.js +++ b/core/server/api/configuration.js @@ -11,7 +11,6 @@ function getValidKeys() { var validKeys = { fileStorage: config.fileStorage === false ? false : true, apps: config.apps === true ? true : false, - tagsUI: config.tagsUI === true ? true : false, codeInjectionUI: config.codeInjectionUI === true ? true : false, version: config.ghostVersion, environment: process.env.NODE_ENV,