app/assets/javascripts/rightnow_oms/app/app.js.coffee in rightnow_oms-0.1.4 vs app/assets/javascripts/rightnow_oms/app/app.js.coffee in rightnow_oms-0.1.6
- old
+ new
@@ -7,13 +7,21 @@
window.RightnowOms.store.commit() if window.RightnowOms.config.get('autoCommit') || force
), 500)
_commitTimer: null
-window.RightnowOms.store = DS.Store.create
+ config: Em.Object.create()
+
+ configure: (reconfigure) ->
+ reconfigure(RightnowOms.config) if reconfigure
+
+ defaultLocale = RightnowOms.config.get('defaultLocale') || 'en'
+ locale = 'locales.' + defaultLocale
+ Em.I18n.translations = RightnowOms.config.get(locale)
+
+
+RightnowOms.store = DS.Store.create
+ revision: 2
adapter:
DS.MyRESTAdapter.create
bulkCommit: false
namespace: 'rightnow_oms'
-
-window.RightnowOms.config = Em.Object.create()
-window.RightnowOms.config.set('autoCommit', true)