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
Laurent S
erp5
Commits
6e377384
Commit
6e377384
authored
Aug 16, 2017
by
Vincent Bechu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_officejs] Change global setting url in dav configurator
parent
0c1e24fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
20 deletions
+11
-20
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
+9
-18
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
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_js.js
View file @
6e377384
...
...
@@ -4,22 +4,14 @@
(
function
(
window
,
rJS
,
RSVP
)
{
"
use strict
"
;
function
setjIODAVConfiguration
(
gadget
)
{
var
dav_url
=
gadget
.
props
.
element
.
querySelector
(
"
input[name='dav_url']
"
).
value
;
function
setjIODAVConfiguration
(
gadget
,
options
)
{
return
gadget
.
getSetting
(
"
portal_type
"
,
"
Web Page
"
)
.
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
);
configuration
=
{
var
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
//+ 'AND local_roles: ("Owner") '
//+ 'AND validation_state: ("draft", "released_alive", "shared_alive", "published_alive") ',
limit
:
[
0
,
100
]
},
use_remote_post
:
false
,
...
...
@@ -66,14 +58,13 @@
property
:
{
"
portal_type
"
:
[
"
switchPropertyValue
"
,
{
"
PDF
"
:
"
pdf
"
,
"
Web Page
"
:
"
txt
"
}
{
"
PDF
"
:
"
pdf
"
,
"
Web Page
"
:
"
txt
"
}
]
},
sub_storage
:
{
type
:
"
dav
"
,
url
:
gadget
.
props
.
element
.
querySelector
(
"
input[name='dav_url']
"
).
value
,
basic_login
:
btoa
(
gadget
.
props
.
element
.
querySelector
(
"
input[name='dav_username']
"
).
value
+
'
:
'
+
gadget
.
props
.
element
.
querySelector
(
"
input[name='dav_password']
"
).
value
),
url
:
options
.
dav_url
,
basic_login
:
btoa
(
options
.
username
+
'
:
'
+
options
.
password
),
with_credentials
:
true
}
}
...
...
@@ -87,7 +78,7 @@
return
gadget
.
setSetting
(
'
jio_storage_name
'
,
"
DAV
"
);
})
.
push
(
function
()
{
return
gadget
.
setGlobalSetting
(
'
dav_url
'
,
dav_url
);
return
gadget
.
setGlobalSetting
(
'
dav_url
'
,
options
.
dav_url
);
})
.
push
(
function
()
{
return
gadget
.
setSetting
(
'
sync_reload
'
,
true
);
...
...
@@ -95,7 +86,7 @@
.
push
(
function
()
{
return
gadget
.
redirect
({
command
:
"
display
"
,
options
:
{
page
:
'
sync
'
,
auto_repair
:
'
true
'
}
options
:
{
page
:
'
ojs_
sync
'
,
auto_repair
:
'
true
'
}
});
});
}
...
...
@@ -155,7 +146,7 @@
.
declareService
(
function
()
{
var
gadget
=
this
;
return
gadget
.
getSetting
(
"
global_setting_gadget_url
"
,
"
officejs_setting_gadget/app/
"
)
return
gadget
.
getSetting
(
"
global_setting_gadget_url
"
,
"
../
officejs_setting_gadget/app/
"
)
.
push
(
function
(
global_setting_gadget_url
)
{
return
gadget
.
declareGadget
(
global_setting_gadget_url
,
{
"
scope
"
:
"
global_setting_gadget
"
,
...
...
@@ -214,7 +205,7 @@
"
editable
"
:
1
,
"
key
"
:
"
password
"
,
"
hidden
"
:
0
,
"
type
"
:
"
String
Field
"
"
type
"
:
"
Password
Field
"
}
}},
"
_links
"
:
{
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_js.xml
View file @
6e377384
...
...
@@ -238,7 +238,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.
10686.10882.5973
</string>
</value>
<value>
<string>
961.
29545.56354.24985
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>
1502
107775.92
</float>
<float>
1502
901834.19
</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