summaryrefslogtreecommitdiff
path: root/web-ui/app/js/mixins
diff options
context:
space:
mode:
authorPatrick Maia <patrickjourdanmaia@gmail.com>2014-08-07 18:01:01 -0300
committerPatrick Maia <patrickjourdanmaia@gmail.com>2014-08-08 13:44:44 -0300
commitbd624bdd14ef63186064b2e39fc422f328b24b26 (patch)
tree4a1ecee496baaf490354b5f11f222410ecf94379 /web-ui/app/js/mixins
parentb30c4434e50c4e3ac128cf04ce4935ca6c660037 (diff)
disables save draft, add tag, reply-section features
Diffstat (limited to 'web-ui/app/js/mixins')
-rw-r--r--web-ui/app/js/mixins/with_feature_toggle.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/web-ui/app/js/mixins/with_feature_toggle.js b/web-ui/app/js/mixins/with_feature_toggle.js
index 3a484388..2b071e68 100644
--- a/web-ui/app/js/mixins/with_feature_toggle.js
+++ b/web-ui/app/js/mixins/with_feature_toggle.js
@@ -1,15 +1,12 @@
-define(['lib/features'],
+define(['features'],
function(features) {
function withFeatureToggle(componentName) {
return function() {
- var defaultToggle = {enabled: true};
-
this.around('initialize', function(basicInitialize) {
- var featureToggle = features[componentName] || defaultToggle;
- if(featureToggle.enabled) {
- basicInitialize(arguments[1], arguments[2]);
+ if(features.isEnabled(componentName)) {
+ return basicInitialize(arguments[1], arguments[2]);
}
});
};