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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ludovic Kiefer
erp5
Commits
bd97ec6a
Commit
bd97ec6a
authored
Dec 19, 2016
by
Vincent Bechu
Committed by
Cédric Le Ninivin
Dec 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: move reload from configurator_page to sync_page
parent
d98b99d2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
149 additions
and
72 deletions
+149
-72
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_js.js
...ge_module/gadget_officejs_page_jio_dav_configurator_js.js
+1
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_js.xml
...e_module/gadget_officejs_page_jio_dav_configurator_js.xml
+11
-9
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_js.js
...e_module/gadget_officejs_page_jio_erp5_configurator_js.js
+43
-45
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_js.xml
..._module/gadget_officejs_page_jio_erp5_configurator_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_sync_js.js
...plateItem/web_page_module/gadget_officejs_page_sync_js.js
+20
-8
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_sync_js.xml
...lateItem/web_page_module/gadget_officejs_page_sync_js.xml
+72
-7
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_js.js
View file @
bd97ec6a
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
return
gadget
.
setSetting
(
'
jio_storage_name
'
,
"
DAV
"
);
return
gadget
.
setSetting
(
'
jio_storage_name
'
,
"
DAV
"
);
})
})
.
push
(
function
()
{
.
push
(
function
()
{
return
gadget
.
reload
(
);
return
gadget
.
setSetting
(
'
sync_reload
'
,
true
);
})
})
.
push
(
function
()
{
.
push
(
function
()
{
return
gadget
.
redirect
({
page
:
'
sync
'
,
auto_repair
:
'
true
'
});
return
gadget
.
redirect
({
page
:
'
sync
'
,
auto_repair
:
'
true
'
});
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_js.xml
View file @
bd97ec6a
...
@@ -103,11 +103,13 @@
...
@@ -103,11 +103,13 @@
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
<value>
<string>
OfficeJS jIO DAV Configurator Page JS
</string>
</value>
<value>
<string>
OfficeJS jIO DAV Configurator Page JS
</string>
</value>
</item>
</item>
<item>
<key>
<string>
url_string
</string>
</key>
<value>
<string>
gadget_officejs_page_jio_dav_configurator.js
</string>
</value>
</item>
<item>
<item>
<key>
<string>
version
</string>
</key>
<key>
<string>
version
</string>
</key>
<value>
<value>
<string>
001
</string>
</value>
<none/>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<key>
<string>
workflow_history
</string>
</key>
...
@@ -167,7 +169,7 @@
...
@@ -167,7 +169,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
cedric.le.ninivin
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -189,7 +191,7 @@
...
@@ -189,7 +191,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
14
42831622.16
</float>
<float>
14
81896181.34
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
@@ -234,7 +236,7 @@
...
@@ -234,7 +236,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
4.38524.51199.12134
</string>
</value>
<value>
<string>
95
6.4046.59099.17288
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +254,7 @@
...
@@ -252,7 +254,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
14
76437846.74
</float>
<float>
14
82142993.78
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
@@ -279,7 +281,7 @@
...
@@ -279,7 +281,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
cedric.le.ninivin
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -309,7 +311,7 @@
...
@@ -309,7 +311,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
14
42830548.22
</float>
<float>
14
81896152.61
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_js.js
View file @
bd97ec6a
...
@@ -8,53 +8,48 @@
...
@@ -8,53 +8,48 @@
var
erp5_url
=
gadget
.
props
.
element
.
querySelector
(
"
input[name='erp5_url']
"
).
value
;
var
erp5_url
=
gadget
.
props
.
element
.
querySelector
(
"
input[name='erp5_url']
"
).
value
;
return
gadget
.
getSetting
(
"
portal_type
"
)
return
gadget
.
getSetting
(
"
portal_type
"
)
.
push
(
function
(
portal_type
)
{
.
push
(
function
(
portal_type
)
{
return
gadget
.
setSetting
(
var
old_date
=
new
Date
(),
'
jio_storage_description
'
,
configuration
=
{};
{
// We are looking for documents modified in the past 3 month
type
:
"
replicate
"
,
old_date
=
new
Date
(
old_date
.
getFullYear
(),
old_date
.
getMonth
(),
old_date
.
getDate
()
-
15
);
use_remote_post
:
true
,
configuration
=
{
conflict_handling
:
1
,
type
:
"
replicate
"
,
check_local_modification
:
true
,
// XXX This drop the signature lists...
check_local_creation
:
true
,
query
:
{
check_local_deletion
:
false
,
query
:
'
portal_type:"
'
+
portal_type
check_remote_modification
:
true
,
// XX Synchonizing the whole module is too much, here is a way to start quietly
check_remote_creation
:
true
,
// Supsended until modification_date is handled for synchronization
check_remote_deletion
:
true
,
+
'
" AND modification_date:>="
'
query
:
{
+
old_date
.
toISOString
()
+
'
"
'
,
query
:
'
portal_type:"
'
+
portal_type
+
'
"
'
limit
:
[
0
,
1234567890
]
},
},
attachment_list
:
[
"
data
"
],
use_remote_post
:
true
,
local_sub_storage
:
{
conflict_handling
:
1
,
type
:
"
query
"
,
check_local_modification
:
true
,
check_local_creation
:
true
,
check_local_deletion
:
false
,
check_remote_modification
:
true
,
check_remote_creation
:
true
,
check_remote_deletion
:
true
,
local_sub_storage
:
{
type
:
"
query
"
,
sub_storage
:
{
type
:
"
uuid
"
,
sub_storage
:
{
sub_storage
:
{
type
:
"
uuid
"
,
type
:
"
indexeddb
"
,
sub_storage
:
{
database
:
"
officejs-erp5
"
type
:
"
indexeddb
"
,
database
:
"
officejs-erp5
"
}
}
},
remote_sub_storage
:
{
type
:
"
mapping
"
,
attachment_mapping_dict
:
{
"
data
"
:
{
"
get
"
:
{
"
uri_template
"
:
(
new
URI
(
"
hateoas
"
))
.
absoluteTo
(
erp5_url
)
.
toString
()
+
"
/{+id}?format=
"
}
}
},
sub_storage
:
{
type
:
"
erp5
"
,
url
:
(
new
URI
(
"
hateoas
"
))
.
absoluteTo
(
erp5_url
)
.
toString
(),
default_view_reference
:
"
jio_view
"
}
}
}
}
},
remote_sub_storage
:
{
type
:
"
erp5
"
,
url
:
(
new
URI
(
"
hateoas
"
))
.
absoluteTo
(
erp5_url
)
.
toString
(),
default_view_reference
:
"
jio_view
"
}
}
);
};
return
gadget
.
setSetting
(
'
jio_storage_description
'
,
configuration
);
})
})
.
push
(
function
()
{
.
push
(
function
()
{
return
gadget
.
setSetting
(
'
jio_storage_name
'
,
"
ERP5
"
);
return
gadget
.
setSetting
(
'
jio_storage_name
'
,
"
ERP5
"
);
...
@@ -63,7 +58,10 @@
...
@@ -63,7 +58,10 @@
return
gadget
.
setGlobalSetting
(
'
erp5_url
'
,
erp5_url
);
return
gadget
.
setGlobalSetting
(
'
erp5_url
'
,
erp5_url
);
})
})
.
push
(
function
()
{
.
push
(
function
()
{
return
gadget
.
renderApplication
({
args
:{
page
:
'
sync
'
,
auto_repair
:
'
true
'
}});
return
gadget
.
setSetting
(
'
sync_reload
'
,
true
);
})
.
push
(
function
()
{
return
gadget
.
redirect
({
page
:
'
sync
'
,
auto_repair
:
'
true
'
});
});
});
}
}
...
@@ -80,9 +78,9 @@
...
@@ -80,9 +78,9 @@
})
})
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
reload
"
,
"
reload
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
.
declareAcquiredMethod
(
"
renderApplication
"
,
"
renderApplication
"
)
.
declareMethod
(
"
getGlobalSetting
"
,
function
(
key
)
{
.
declareMethod
(
"
getGlobalSetting
"
,
function
(
key
)
{
var
gadget
=
this
;
var
gadget
=
this
;
return
gadget
.
getDeclaredGadget
(
"
global_setting_gadget
"
)
return
gadget
.
getDeclaredGadget
(
"
global_setting_gadget
"
)
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_js.xml
View file @
bd97ec6a
...
@@ -271,7 +271,7 @@
...
@@ -271,7 +271,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
956.
60.28713.510
2
</string>
</value>
<value>
<string>
956.
4077.57694.3024
2
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -289,7 +289,7 @@
...
@@ -289,7 +289,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
148
1903967.67
</float>
<float>
148
2145123.94
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_sync_js.js
View file @
bd97ec6a
...
@@ -12,14 +12,23 @@
...
@@ -12,14 +12,23 @@
function
repair_and_redirect
(
gadget
)
{
function
repair_and_redirect
(
gadget
)
{
gadget
.
props
.
element
.
querySelector
(
"
button
"
).
disabled
=
true
;
gadget
.
props
.
element
.
querySelector
(
"
button
"
).
disabled
=
true
;
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
.
push
(
function
(){
return
gadget
.
repair
()
return
gadget
.
getSetting
(
'
sync_reload
'
,
false
);
})
})
.
push
(
function
(
result
)
{
.
push
(
function
(
sync_reload
)
{
if
(
result
!==
undefined
&&
result
.
hasOwnProperty
(
'
redirect
'
)){
if
(
sync_reload
)
{
return
gadget
.
redirect
(
result
.
redirect
);
return
gadget
.
setSetting
(
'
sync_reload
'
,
false
)
}
.
push
(
function
()
{
return
gadget
.
redirect
({});
return
gadget
.
reload
();
});
}
return
gadget
.
repair
()
.
push
(
function
(
result
)
{
if
(
result
!==
undefined
&&
result
.
hasOwnProperty
(
'
redirect
'
)){
return
gadget
.
redirect
(
result
.
redirect
);
}
return
gadget
.
redirect
({});
});
});
});
}
}
...
@@ -55,6 +64,9 @@
...
@@ -55,6 +64,9 @@
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
repair
"
,
"
jio_repair
"
)
.
declareAcquiredMethod
(
"
repair
"
,
"
jio_repair
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
.
declareAcquiredMethod
(
"
reload
"
,
"
reload
"
)
.
declareService
(
function
()
{
.
declareService
(
function
()
{
var
gadget
=
this
;
var
gadget
=
this
;
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_sync_js.xml
View file @
bd97ec6a
...
@@ -103,11 +103,13 @@
...
@@ -103,11 +103,13 @@
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
<value>
<string>
OfficeJS Sync Page JS
</string>
</value>
<value>
<string>
OfficeJS Sync Page JS
</string>
</value>
</item>
</item>
<item>
<key>
<string>
url_string
</string>
</key>
<value>
<string>
gadget_officejs_page_sync.js
</string>
</value>
</item>
<item>
<item>
<key>
<string>
version
</string>
</key>
<key>
<string>
version
</string>
</key>
<value>
<value>
<string>
001
</string>
</value>
<none/>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<key>
<string>
workflow_history
</string>
</key>
...
@@ -140,6 +142,12 @@
...
@@ -140,6 +142,12 @@
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</value>
</item>
</item>
<item>
<key>
<string>
processing_status_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
</dictionary>
</dictionary>
</value>
</value>
</item>
</item>
...
@@ -161,7 +169,7 @@
...
@@ -161,7 +169,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
cedric.le.ninivin
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -183,7 +191,7 @@
...
@@ -183,7 +191,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
14
42854079.85
</float>
<float>
14
81896177.33
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
@@ -228,7 +236,7 @@
...
@@ -228,7 +236,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
4.38795.35440.52684
</string>
</value>
<value>
<string>
95
6.4036.55463.52258
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -246,7 +254,64 @@
...
@@ -246,7 +254,64 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1476450033.82
</float>
<float>
1482142570.33
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
detect_converted_file
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_processing_state
</string>
</key>
<value>
<string>
converted
</string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
0.0.0.0
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1481896139.44
</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