Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
erp5
Commits
48257d7f
Commit
48257d7f
authored
Aug 14, 2017
by
Vincent Bechu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_officejs] Add attachments in dropbox configuration
parent
2bb706f4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
16 deletions
+32
-16
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dropbox_configurator_js.txt
...dule/gadget_officejs_page_jio_dropbox_configurator_js.txt
+30
-14
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dropbox_configurator_js.xml
...dule/gadget_officejs_page_jio_dropbox_configurator_js.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dropbox_configurator_js.txt
View file @
48257d7f
/*global window, rJS, RSVP, URI, location,
loopEventListener, btoa */
/*global window, rJS, RSVP*/
/*jslint nomen: true, indent: 2, maxerr: 3*/
(function (window, rJS, RSVP
, console
) {
(function (window, rJS, RSVP) {
"use strict";
function setDropboxConfiguration(gadget, token) {
return gadget.getSetting("portal_type")
.push(function (portal_type) {
var old_date = new Date(),
configuration = {};
// We are looking for documents modified in the past 3 month
old_date = new Date(old_date.getFullYear(), old_date.getMonth() - 3);
return new RSVP.Queue()
.push(function () {
return RSVP.all([
gadget.getSetting("portal_type"),
gadget.getSetting("erp5_attachment_synchro", "")
]);
})
.push(function (setting) {
var configuration = {},
attachment_synchro = setting[1] !== "";
configuration = {
type: "replicate",
// XXX This drop the signature lists...
query: {
query: 'portal_type:"' + portal_type + '" ',
// XX Synchonizing the whole module is too much, here is a way to start quietly
// Supsended until modification_date is handled for synchronization
limit: [0, 1234567890]
query: 'portal_type:"' + setting[0] + '" ',
limit: [0, 100],
sort_on: [["modification_date", "descending"]]
},
use_remote_post: false,
conflict_handling: 2,
check_local_attachment_modification: attachment_synchro,
check_local_attachment_creation: attachment_synchro,
check_remote_attachment_modification: attachment_synchro,
check_remote_attachment_creation: attachment_synchro,
check_remote_attachment_deletion: attachment_synchro,
check_local_modification: true,
check_local_creation: true,
check_local_deletion: false,
check_remote_modification: true,
check_remote_creation: true,
check_remote_deletion: true,
signature_sub_storage: {
type: "query",
sub_storage: {
type: "uuid",
sub_storage: {
type: "indexeddb",
database: "officejs-dropbox-hash"
}
}
},
local_sub_storage: {
type: "mapping",
attachment: {
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dropbox_configurator_js.xml
View file @
48257d7f
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
0.64671.63974.4751
3
</string>
</value>
<value>
<string>
96
1.26184.18077.1039
3
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
150
1593492.98
</float>
<float>
150
2716653.05
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment