Commit 1e1e2e5a authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Add getTranslationList/getSettingList methods on the JQM launcher.

This is needed to keep using the translation gadget.
See 9d0b0878
parent 71630b12
...@@ -288,6 +288,24 @@ ...@@ -288,6 +288,24 @@
.allowPublicAcquisition("getSetting", function (argument_list) { .allowPublicAcquisition("getSetting", function (argument_list) {
return getSetting(this, argument_list[0], argument_list[1]); return getSetting(this, argument_list[0], argument_list[1]);
}) })
.allowPublicAcquisition("getSettingList",
function getSettingList(argument_list) {
var key_list = argument_list[0];
return route(this, 'setting_gadget', 'get', ['setting'])
.push(function (doc) {
var i,
result_list = [];
for (i = 0; i < key_list.length; i += 1) {
result_list[i] = doc[key_list[i]];
}
return result_list;
}, function (error) {
if (error.status_code === 404) {
return new Array(key_list.length);
}
throw error;
});
})
.allowPublicAcquisition("setSetting", function (argument_list) { .allowPublicAcquisition("setSetting", function (argument_list) {
return setSetting(this, argument_list[0], argument_list[1]); return setSetting(this, argument_list[0], argument_list[1]);
}) })
...@@ -331,6 +349,11 @@ ...@@ -331,6 +349,11 @@
return translation_gadget.translate(argument_list[0]); return translation_gadget.translate(argument_list[0]);
}); });
}) })
.allowPublicAcquisition("getTranslationList",
function getTranslationList(argument_list) {
return route(this, 'translation_gadget', 'getTranslationList',
argument_list);
})
.allowPublicAcquisition("redirect", function (param_list) { .allowPublicAcquisition("redirect", function (param_list) {
return this.getDeclaredGadget('router') return this.getDeclaredGadget('router')
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>957.11877.38028.13977</string> </value> <value> <string>969.32253.34302.52394</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1487945144.32</float> <float>1534152432.65</float>
<string>UTC</string> <string>UTC</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