Commit 0f6bbbba authored by Vincent Bechu's avatar Vincent Bechu Committed by Eteri

erp5_officejs: bookmark dropbox sync fix

parent 20d24662
......@@ -44,8 +44,8 @@
.push(function () {
return jIO.util.ajax({
type: "GET",
url: (url.startsWith("http") || url.startsWith("//")) ?
url : storage._origin_url + url,
url: ((url.startsWith("http") || url.startsWith("//")) ?
url : storage._origin_url) + url,
dataType: "blob"
});
})
......
......@@ -239,7 +239,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>960.4069.29402.50824</string> </value>
<value> <string>960.14254.57744.3293</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -257,7 +257,7 @@
</tuple>
<state>
<tuple>
<float>1497527515.31</float>
<float>1498139825.46</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -35,6 +35,7 @@
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod('getSetting', 'getSetting')
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("redirect", "redirect")
.allowPublicAcquisition("jio_allDocs", function (param_list) {
var gadget = this;
return this.jio_allDocs.apply(this, param_list)
......@@ -68,6 +69,10 @@
})
.push(function (answer_list) {
gadget.props.portal_type = answer_list[0];
// Hardcoded For Bookmark View
if (gadget.props.portal_type === "Bookmark") {
return gadget.redirect({"page": "bookmark_list" });
}
gadget.props.document_title_plural = answer_list[1];
return gadget.getUrlFor({page: "add_document"});
})
......
......@@ -267,7 +267,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.64450.52709.9386</string> </value>
<value> <string>959.44888.46554.50039</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -285,7 +285,7 @@
</tuple>
<state>
<tuple>
<float>1485956738.35</float>
<float>1498035961.94</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -42,7 +42,8 @@
function setDroboxConfiguration(gadget) {
return new RSVP.Queue()
.push(function () {
return gadget.getSetting('dropbox_app_key');
return gadget.getSetting('dropbox_app_key', 'r47azfr1dgqwxdp');
// harcoded for bookmark only
})
.push(function (app_key) {
window.location = 'https://www.dropbox.com/1/oauth2/authorize?client_id='
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>957.3286.34994.57207</string> </value>
<value> <string>960.15342.25021.61081</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1486030156.02</float>
<float>1498465949.74</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -114,7 +114,13 @@
})
.declareService(function () {
var gadget = this;
return setDropboxConfiguration(gadget);
return new RSVP.Queue()
.push(function () {
return gadget.props.deferred.promise;
})
.push(function () {
return setDropboxConfiguration(gadget);
});
});
}(window, rJS, RSVP, console));
\ No newline at end of file
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>960.12610.20791.23552</string> </value>
<value> <string>960.15367.8749.64307</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1498039829.6</float>
<float>1498205374.87</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -273,7 +273,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>960.4156.34453.31453</string> </value>
<value> <string>960.19731.25963.32546</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -291,7 +291,7 @@
</tuple>
<state>
<tuple>
<float>1497614097.81</float>
<float>1498467149.37</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -239,7 +239,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>959.27838.40575.32000</string> </value>
<value> <string>960.14254.57744.3293</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -257,7 +257,7 @@
</tuple>
<state>
<tuple>
<float>1495033483.29</float>
<float>1498139828.83</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -239,7 +239,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>957.13731.19555.59477</string> </value>
<value> <string>960.14254.57744.3293</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -257,7 +257,7 @@
</tuple>
<state>
<tuple>
<float>1486656236.28</float>
<float>1498139839.71</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>958.34158.24639.31624</string> </value>
<value> <string>960.14254.57744.3293</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1496218919.19</float>
<float>1498139912.86</float>
<string>UTC</string>
</tuple>
</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