Commit 25018fd5 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Eteri

erp5_officejs: Remove useless code from jio dropbox configurator

parent c5601bb5
......@@ -4,7 +4,7 @@
(function (window, rJS, RSVP, console) {
"use strict";
function setDropboxConfiguration(gadget) {
function setDropboxConfiguration(gadget, token) {
return gadget.getSetting("portal_type")
.push(function (portal_type) {
var old_date = new Date(),
......@@ -64,7 +64,7 @@
type: "drivetojiomapping",
sub_storage: {
type: "dropbox",
access_token: gadget.props.access_token,
access_token: token,
root: "sandbox"
}
}
......@@ -87,40 +87,11 @@
var gadget_klass = rJS(window);
gadget_klass
.ready(function (g) {
g.props = {};
return g.getElement()
.push(function (element) {
g.props.element = element;
g.props.deferred = RSVP.defer();
});
})
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("reload", "reload")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("setSetting", "setSetting")
.declareMethod("render", function (options) {
var gadget = this;
return gadget.updateHeader({
title: "Connect To Drobox Storage",
back_url: "#page=jio_configurator",
panel_action: false
})
.push(function () {
gadget.props.access_token = options.token;
return gadget.props.deferred.resolve();
});
})
.declareService(function () {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return gadget.props.deferred.promise;
})
.push(function () {
return setDropboxConfiguration(gadget);
});
return setDropboxConfiguration(this, options.access_token);
});
}(window, rJS, RSVP, console));
\ No newline at end of file
......@@ -222,7 +222,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <string>cedric.le.ninivin</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>960.15367.8749.64307</string> </value>
<value> <string>960.64347.25493.60518</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1498205374.87</float>
<float>1501057664.67</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