From bd624bdd14ef63186064b2e39fc422f328b24b26 Mon Sep 17 00:00:00 2001 From: Patrick Maia Date: Thu, 7 Aug 2014 18:01:01 -0300 Subject: disables save draft, add tag, reply-section features --- web-ui/app/js/features/features.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 web-ui/app/js/features/features.js (limited to 'web-ui/app/js/features/features.js') diff --git a/web-ui/app/js/features/features.js b/web-ui/app/js/features/features.js new file mode 100644 index 00000000..74efdd07 --- /dev/null +++ b/web-ui/app/js/features/features.js @@ -0,0 +1,18 @@ +define([], function() { + var disabledFeatures; + + function getFeatures() { + disabledFeatures = disabledFeatures || fetchDisabledFeatures(); + return disabledFeatures; + } + + function fetchDisabledFeatures() { + return ['saveDraft', 'createNewTag', 'replySection']; + } + + return { + isEnabled: function(featureName) { + return ! _.contains(getFeatures(), featureName); + } + }; +}); -- cgit v1.2.3