Commit ecaa597a authored by Jérome Perrin's avatar Jérome Perrin

officejs_support_request_ui: get selected language from settings

no need to to request server for this
parent e6d89583
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
.declareAcquiredMethod("updateHeader", "updateHeader") .declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("getSetting", "getSetting") .declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("getSettingList", "getSettingList")
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment") .declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.declareAcquiredMethod("jio_putAttachment", "jio_putAttachment") .declareAcquiredMethod("jio_putAttachment", "jio_putAttachment")
.declareAcquiredMethod("notifySubmitted", "notifySubmitted") .declareAcquiredMethod("notifySubmitted", "notifySubmitted")
...@@ -158,12 +159,10 @@ ...@@ -158,12 +159,10 @@
}) })
.push(function () { .push(function () {
// set locale for momentjs // set locale for momentjs
return gadget.jio_getAttachment( return gadget.getSettingList(["selected_language",
'post_module', "default_selected_language"]
gadget.hateoas_url + "/Localizer/get_selected_language", ).push(function (lang_list) {
{format: 'text'} moment.locale(lang_list[0] || lang_list[1]);
).push(function (lang) {
moment.locale(lang);
}); });
}) })
.push(function () { .push(function () {
......
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1539132486.97</float> <float>1539132630.18</float>
<string>GMT+9</string> <string>GMT+9</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment