Merge pull request #5125 from ErisDS/ci-remove-flag

No more feature flag for Code Injection
This commit is contained in:
Sebastian Gierlinger 2015-04-10 12:48:31 -05:00
commit fae709b79b
6 changed files with 3 additions and 55 deletions

View File

@ -24,10 +24,6 @@ var FeatureController = Ember.Controller.extend(Ember.PromiseProxyMixin, {
}
return value;
}),
codeInjectionUI: Ember.computed('config.codeInjectionUI', 'labs.codeInjectionUI', function () {
return this.get('config.codeInjectionUI') || this.get('labs.codeInjectionUI');
})
});

View File

@ -1,6 +1,5 @@
import Ember from 'ember';
var SettingsController = Ember.Controller.extend({
needs: ['feature'],
showGeneral: Ember.computed('session.user.name', function () {
return this.get('session.user.isAuthor') || this.get('session.user.isEditor') ? false : true;
@ -14,8 +13,8 @@ var SettingsController = Ember.Controller.extend({
showNavigation: Ember.computed('session.user.name', function () {
return this.get('session.user.isAuthor') || this.get('session.user.isEditor') ? 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;
showCodeInjection: Ember.computed('session.user.name', function () {
return this.get('session.user.isAuthor') || this.get('session.user.isEditor') ? false : true;
}),
showLabs: Ember.computed('session.user.name', function () {
return this.get('session.user.isAuthor') || this.get('session.user.isEditor') ? false : true;

View File

@ -23,18 +23,6 @@ var LabsController = Ember.Controller.extend(Ember.Evented, {
});
},
codeUIFlag: Ember.computed.alias('config.codeInjectionUI'),
useCodeInjectionUI: Ember.computed('controllers.feature.codeInjectionUI', function (key, value) {
// setter
if (arguments.length > 1) {
this.saveLabs('codeInjectionUI', value);
}
// getter
return this.get('controllers.feature.codeInjectionUI') || false;
}),
actions: {
onUpload: function (file) {
var self = this,

View File

@ -7,24 +7,9 @@ var SettingsCodeInjectionRoute = AuthenticatedRoute.extend(styleBody, loadingInd
classNames: ['settings-view-code'],
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(this.transitionEditor())
.then(function () {
return feature.then(function () {
if (!feature.get('codeInjectionUI')) {
return self.transitionTo('settings.general');
}
});
});
.then(this.transitionEditor());
},
model: function () {

View File

@ -44,23 +44,4 @@
</fieldset>
</form>
<hr>
<form>
<fieldset>
{{#unless codeUIFlag}}
<div class="form-group for-checkbox">
<label for="labs-codeInjectionUI">Code Injection</label>
<label class="check box" for="labs-codeInjectionUI">
{{input id="labs-codeInjectionUI" name="labs[codeInjectionUI]" type="checkbox"
checked=useCodeInjectionUI}}
<span class="input-toggle-component"></span>
<p>Enable the code injection interface</p>
</label>
<p>A settings screen which enables you to add code into your theme (work in progress)</p>
</div>
{{/unless}}
</fieldset>
</form>
</section>

View File

@ -11,7 +11,6 @@ function getValidKeys() {
var validKeys = {
fileStorage: config.fileStorage === false ? false : true,
apps: config.apps === true ? true : false,
codeInjectionUI: config.codeInjectionUI === true ? true : false,
version: config.ghostVersion,
environment: process.env.NODE_ENV,
database: config.database.client,