Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
preetwinder
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
Hide 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,
/*global window, rJS, RSVP*/
loopEventListener, btoa */
/*jslint nomen: true, indent: 2, maxerr: 3*/
/*jslint nomen: true, indent: 2, maxerr: 3*/
(function (window, rJS, RSVP
, console
) {
(function (window, rJS, RSVP) {
"use strict";
"use strict";
function setDropboxConfiguration(gadget, token) {
function setDropboxConfiguration(gadget, token) {
return gadget.getSetting("portal_type")
return new RSVP.Queue()
.push(function (portal_type) {
.push(function () {
var old_date = new Date(),
return RSVP.all([
configuration = {};
gadget.getSetting("portal_type"),
// We are looking for documents modified in the past 3 month
gadget.getSetting("erp5_attachment_synchro", "")
old_date = new Date(old_date.getFullYear(), old_date.getMonth() - 3);
]);
})
.push(function (setting) {
var configuration = {},
attachment_synchro = setting[1] !== "";
configuration = {
configuration = {
type: "replicate",
type: "replicate",
// XXX This drop the signature lists...
query: {
query: {
query: 'portal_type:"' + portal_type + '" ',
query: 'portal_type:"' + setting[0] + '" ',
// XX Synchonizing the whole module is too much, here is a way to start quietly
limit: [0, 100],
// Supsended until modification_date is handled for synchronization
sort_on: [["modification_date", "descending"]]
limit: [0, 1234567890]
},
},
use_remote_post: false,
use_remote_post: false,
conflict_handling: 2,
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_modification: true,
check_local_creation: true,
check_local_creation: true,
check_local_deletion: false,
check_local_deletion: false,
check_remote_modification: true,
check_remote_modification: true,
check_remote_creation: true,
check_remote_creation: true,
check_remote_deletion: 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: {
local_sub_storage: {
type: "mapping",
type: "mapping",
attachment: {
attachment: {
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dropbox_configurator_js.xml
View file @
48257d7f
...
@@ -242,7 +242,7 @@
...
@@ -242,7 +242,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<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>
150
1593492.98
</float>
<float>
150
2716653.05
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</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