Commit 2d5f45e0 authored by Vincent Bechu's avatar Vincent Bechu

[erp5_officejs] Bookmark Manager: Update app cache and fixs

parent 48257d7f
...@@ -193,6 +193,8 @@ gadget_erp5_search_editor.js\n ...@@ -193,6 +193,8 @@ gadget_erp5_search_editor.js\n
gadget_erp5_sort_editor.html\n gadget_erp5_sort_editor.html\n
gadget_erp5_sort_editor.js\n gadget_erp5_sort_editor.js\n
\n \n
gadget_erp5_field_checkbox.html\n
gadget_erp5_field_checkbox.js\n
gadget_officejs_bookmark_manager_router.html\n gadget_officejs_bookmark_manager_router.html\n
gadget_officejs_jio_bookmark_view.html\n gadget_officejs_jio_bookmark_view.html\n
gadget_officejs_jio_bookmark_view.js\n gadget_officejs_jio_bookmark_view.js\n
...@@ -350,7 +352,7 @@ NETWORK:\n ...@@ -350,7 +352,7 @@ NETWORK:\n
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.11869.34421.55569</string> </value> <value> <string>961.16277.24517.44253</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -368,7 +370,7 @@ NETWORK:\n ...@@ -368,7 +370,7 @@ NETWORK:\n
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1501841135.17</float> <float>1502876178.53</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -3,18 +3,6 @@ ...@@ -3,18 +3,6 @@
(function (window, RSVP, rJS, URL) { (function (window, RSVP, rJS, URL) {
"use strict"; "use strict";
function saveOptionDict(gadget) {
var option_dict = {
search_engine: gadget.element.querySelector(
".options input[name=\"search_engine\"]"
).value,
auto_redirect: gadget.element.querySelector(
".options input[name=\"auto_redirect\"]"
).checked
};
return gadget.setSetting("option", option_dict);
}
rJS(window) rJS(window)
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// Acquired methods // Acquired methods
...@@ -23,6 +11,8 @@ ...@@ -23,6 +11,8 @@
.declareAcquiredMethod("updateHeader", "updateHeader") .declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("getSetting", "getSetting") .declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("setSetting", "setSetting") .declareAcquiredMethod("setSetting", "setSetting")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", 'notifySubmitted')
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// declared methods // declared methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -83,7 +73,7 @@ ...@@ -83,7 +73,7 @@
"css_class": "", "css_class": "",
"required": 1, "required": 1,
"editable": 1, "editable": 1,
"key": "title", "key": "auto_redirect",
"hidden": 0, "hidden": 0,
"type": "CheckBoxField" "type": "CheckBoxField"
}, },
...@@ -116,7 +106,23 @@ ...@@ -116,7 +106,23 @@
}); });
}) })
.onEvent("submit", function () { .onEvent("submit", function () {
saveOptionDict(this); var gadget = this;
return gadget.notifySubmitting()
.push(function () {
return gadget.getDeclaredGadget("form_view");
})
.push(function (form_gadget) {
return form_gadget.getContent();
})
.push(function (content) {
return RSVP.all([
gadget.setSetting('bookmark_auto_redirect', content.auto_redirect),
gadget.setSetting('bookmark_search_engine', content.search_engine)
]);
})
.push(function () {
return gadget.notifySubmitted('Preferences Saved');
});
}); });
}(window, RSVP, rJS, URL)); }(window, RSVP, rJS, URL));
\ No newline at end of file
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.9320.43291.25821</string> </value> <value> <string>961.29122.59801.40686</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1501746619.11</float> <float>1502876708.86</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
"hidden": 0, "hidden": 0,
"type": "StringField" "type": "StringField"
}, },
"description": { "my_description": {
"description": "", "description": "",
"title": "Description", "title": "Description",
"default": gadget.state.doc.description, "default": gadget.state.doc.description,
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.11872.7503.60654</string> </value> <value> <string>961.16277.24517.44253</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1501841404.2</float> <float>1503056104.29</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