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
62d31b8d
Commit
62d31b8d
authored
Mar 06, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_core/erp5_web_renderjs_ui] Update to jio 3.27.0
parent
ed7949b7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
174 additions
and
52 deletions
+174
-52
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_jio_js.js
...enderjs_ui/PathTemplateItem/web_page_module/rjs_jio_js.js
+86
-25
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_jio_js.xml
...nderjs_ui/PathTemplateItem/web_page_module/rjs_jio_js.xml
+2
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/jio.js.js
...p5_core/SkinTemplateItem/portal_skins/erp5_core/jio.js.js
+86
-25
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_jio_js.js
View file @
62d31b8d
...
...
@@ -7540,6 +7540,7 @@ return new Parser;
* @param {String} [param.dataType=""] The data type to retrieve
* @param {String} param.url The url
* @param {Any} [param.data] The data to send
* @param {Number} param.timeout The request timeout value
* @param {Function} [param.beforeSend] A function called just before the
* send request. The first parameter of this function is the XHR object.
* @return {Promise} The promise
...
...
@@ -7572,6 +7573,12 @@ return new Parser;
}
}
}
if
(
param
.
timeout
!==
undefined
&&
param
.
timeout
!==
0
)
{
xhr
.
timeout
=
param
.
timeout
;
xhr
.
ontimeout
=
function
()
{
return
reject
(
new
jIO
.
util
.
jIOError
(
"
Gateway Timeout
"
,
504
));
};
}
if
(
typeof
param
.
beforeSend
===
'
function
'
)
{
param
.
beforeSend
(
xhr
);
}
...
...
@@ -7632,6 +7639,9 @@ return new Parser;
if
(
obj
===
undefined
)
{
return
undefined
;
}
if
(
obj
===
null
)
{
return
'
null
'
;
}
if
(
obj
.
constructor
===
Object
)
{
key_list
=
Object
.
keys
(
obj
).
sort
();
result_list
=
[];
...
...
@@ -10528,6 +10538,8 @@ return new Parser;
}
else
{
this
.
_catch_error
=
false
;
}
// If timeout not set, use 0 for no timeout value
this
.
_timeout
=
spec
.
timeout
||
0
;
}
HttpStorage
.
prototype
.
get
=
function
(
id
)
{
...
...
@@ -10536,7 +10548,8 @@ return new Parser;
.
push
(
function
()
{
return
jIO
.
util
.
ajax
({
type
:
'
HEAD
'
,
url
:
id
url
:
id
,
timeout
:
context
.
_timeout
});
})
.
push
(
undefined
,
function
(
error
)
{
...
...
@@ -10586,7 +10599,8 @@ return new Parser;
return
jIO
.
util
.
ajax
({
type
:
'
GET
'
,
url
:
id
,
dataType
:
"
blob
"
dataType
:
"
blob
"
,
timeout
:
context
.
_timeout
});
})
.
push
(
undefined
,
function
(
error
)
{
...
...
@@ -12142,12 +12156,26 @@ return new Parser;
function
isSingleLocalRoles
(
parsed_query
)
{
if
((
parsed_query
instanceof
SimpleQuery
)
&&
(
parsed_query
.
operator
===
undefined
)
&&
(
parsed_query
.
key
===
'
local_roles
'
))
{
// local_roles:"Assignee"
return
parsed_query
.
value
;
}
}
function
isSingleDomain
(
parsed_query
)
{
if
((
parsed_query
instanceof
SimpleQuery
)
&&
(
parsed_query
.
operator
===
undefined
)
&&
(
parsed_query
.
key
!==
undefined
)
&&
(
parsed_query
.
key
.
indexOf
(
'
selection_domain_
'
)
===
0
))
{
// domain_region:"europe/france"
var
result
=
{};
result
[
parsed_query
.
key
.
slice
(
'
selection_domain_
'
.
length
)]
=
parsed_query
.
value
;
return
result
;
}
}
function
isMultipleLocalRoles
(
parsed_query
)
{
var
i
,
sub_query
,
...
...
@@ -12159,6 +12187,7 @@ return new Parser;
for
(
i
=
0
;
i
<
parsed_query
.
query_list
.
length
;
i
+=
1
)
{
sub_query
=
parsed_query
.
query_list
[
i
];
if
((
sub_query
instanceof
SimpleQuery
)
&&
(
sub_query
.
key
!==
undefined
)
&&
(
sub_query
.
key
===
'
local_roles
'
))
{
local_role_list
.
push
(
sub_query
.
value
);
}
else
{
...
...
@@ -12182,19 +12211,26 @@ return new Parser;
.
push
(
function
(
site_hal
)
{
var
query
=
options
.
query
,
i
,
key
,
parsed_query
,
sub_query
,
result_list
,
local_roles
,
local_role_found
=
false
,
selection_domain
,
sort_list
=
[];
if
(
options
.
query
)
{
parsed_query
=
jIO
.
QueryFactory
.
create
(
options
.
query
);
result_list
=
isSingleLocalRoles
(
parsed_query
);
if
(
result_list
)
{
query
=
undefined
;
local_roles
=
result_list
;
}
else
{
result_list
=
isSingleDomain
(
parsed_query
);
if
(
result_list
)
{
query
=
undefined
;
selection_domain
=
result_list
;
}
else
{
result_list
=
isMultipleLocalRoles
(
parsed_query
);
if
(
result_list
)
{
...
...
@@ -12204,29 +12240,49 @@ return new Parser;
(
parsed_query
.
operator
===
'
AND
'
))
{
// portal_type:"Person" AND local_roles:"Assignee"
// AND selection_domain_region:"europe/france"
for
(
i
=
0
;
i
<
parsed_query
.
query_list
.
length
;
i
+=
1
)
{
sub_query
=
parsed_query
.
query_list
[
i
];
if
(
!
local_role_found
)
{
result_list
=
isSingleLocalRoles
(
sub_query
);
if
(
result_list
)
{
local_roles
=
result_list
;
parsed_query
.
query_list
.
splice
(
i
,
1
);
query
=
jIO
.
Query
.
objectToSearchText
(
parsed_query
);
i
=
parsed_query
.
query_list
.
length
;
local_role_found
=
true
;
}
else
{
result_list
=
isMultipleLocalRoles
(
sub_query
);
if
(
result_list
)
{
local_roles
=
result_list
;
parsed_query
.
query_list
.
splice
(
i
,
1
);
query
=
jIO
.
Query
.
objectToSearchText
(
parsed_query
);
i
=
parsed_query
.
query_list
.
length
;
local_role_found
=
true
;
}
}
}
result_list
=
isSingleDomain
(
sub_query
);
if
(
result_list
)
{
parsed_query
.
query_list
.
splice
(
i
,
1
);
query
=
jIO
.
Query
.
objectToSearchText
(
parsed_query
);
if
(
selection_domain
)
{
for
(
key
in
result_list
)
{
if
(
result_list
.
hasOwnProperty
(
key
))
{
selection_domain
[
key
]
=
result_list
[
key
];
}
}
}
else
{
selection_domain
=
result_list
;
}
i
-=
1
;
}
}
}
}
}
}
if
(
options
.
sort_on
)
{
for
(
i
=
0
;
i
<
options
.
sort_on
.
length
;
i
+=
1
)
{
...
...
@@ -12234,6 +12290,10 @@ return new Parser;
}
}
if
(
selection_domain
)
{
selection_domain
=
JSON
.
stringify
(
selection_domain
);
}
return
jIO
.
util
.
ajax
({
"
type
"
:
"
GET
"
,
"
url
"
:
UriTemplate
.
parse
(
site_hal
.
_links
.
raw_search
.
href
)
...
...
@@ -12243,7 +12303,8 @@ return new Parser;
select_list
:
options
.
select_list
||
[
"
title
"
,
"
reference
"
],
limit
:
options
.
limit
,
sort_on
:
sort_list
,
local_roles
:
local_roles
local_roles
:
local_roles
,
selection_domain
:
selection_domain
}),
"
xhrFields
"
:
{
withCredentials
:
true
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_jio_js.xml
View file @
62d31b8d
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
963.2
2427.36654.49664
</string>
</value>
<value>
<string>
963.2
9105.23200.50073
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
15
10318903.92
</float>
<float>
15
20356783.07
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/jio.js.js
View file @
62d31b8d
...
...
@@ -7540,6 +7540,7 @@ return new Parser;
* @param {String} [param.dataType=""] The data type to retrieve
* @param {String} param.url The url
* @param {Any} [param.data] The data to send
* @param {Number} param.timeout The request timeout value
* @param {Function} [param.beforeSend] A function called just before the
* send request. The first parameter of this function is the XHR object.
* @return {Promise} The promise
...
...
@@ -7572,6 +7573,12 @@ return new Parser;
}
}
}
if
(
param
.
timeout
!==
undefined
&&
param
.
timeout
!==
0
)
{
xhr
.
timeout
=
param
.
timeout
;
xhr
.
ontimeout
=
function
()
{
return
reject
(
new
jIO
.
util
.
jIOError
(
"
Gateway Timeout
"
,
504
));
};
}
if
(
typeof
param
.
beforeSend
===
'
function
'
)
{
param
.
beforeSend
(
xhr
);
}
...
...
@@ -7632,6 +7639,9 @@ return new Parser;
if
(
obj
===
undefined
)
{
return
undefined
;
}
if
(
obj
===
null
)
{
return
'
null
'
;
}
if
(
obj
.
constructor
===
Object
)
{
key_list
=
Object
.
keys
(
obj
).
sort
();
result_list
=
[];
...
...
@@ -10528,6 +10538,8 @@ return new Parser;
}
else
{
this
.
_catch_error
=
false
;
}
// If timeout not set, use 0 for no timeout value
this
.
_timeout
=
spec
.
timeout
||
0
;
}
HttpStorage
.
prototype
.
get
=
function
(
id
)
{
...
...
@@ -10536,7 +10548,8 @@ return new Parser;
.
push
(
function
()
{
return
jIO
.
util
.
ajax
({
type
:
'
HEAD
'
,
url
:
id
url
:
id
,
timeout
:
context
.
_timeout
});
})
.
push
(
undefined
,
function
(
error
)
{
...
...
@@ -10586,7 +10599,8 @@ return new Parser;
return
jIO
.
util
.
ajax
({
type
:
'
GET
'
,
url
:
id
,
dataType
:
"
blob
"
dataType
:
"
blob
"
,
timeout
:
context
.
_timeout
});
})
.
push
(
undefined
,
function
(
error
)
{
...
...
@@ -12142,12 +12156,26 @@ return new Parser;
function
isSingleLocalRoles
(
parsed_query
)
{
if
((
parsed_query
instanceof
SimpleQuery
)
&&
(
parsed_query
.
operator
===
undefined
)
&&
(
parsed_query
.
key
===
'
local_roles
'
))
{
// local_roles:"Assignee"
return
parsed_query
.
value
;
}
}
function
isSingleDomain
(
parsed_query
)
{
if
((
parsed_query
instanceof
SimpleQuery
)
&&
(
parsed_query
.
operator
===
undefined
)
&&
(
parsed_query
.
key
!==
undefined
)
&&
(
parsed_query
.
key
.
indexOf
(
'
selection_domain_
'
)
===
0
))
{
// domain_region:"europe/france"
var
result
=
{};
result
[
parsed_query
.
key
.
slice
(
'
selection_domain_
'
.
length
)]
=
parsed_query
.
value
;
return
result
;
}
}
function
isMultipleLocalRoles
(
parsed_query
)
{
var
i
,
sub_query
,
...
...
@@ -12159,6 +12187,7 @@ return new Parser;
for
(
i
=
0
;
i
<
parsed_query
.
query_list
.
length
;
i
+=
1
)
{
sub_query
=
parsed_query
.
query_list
[
i
];
if
((
sub_query
instanceof
SimpleQuery
)
&&
(
sub_query
.
key
!==
undefined
)
&&
(
sub_query
.
key
===
'
local_roles
'
))
{
local_role_list
.
push
(
sub_query
.
value
);
}
else
{
...
...
@@ -12182,19 +12211,26 @@ return new Parser;
.
push
(
function
(
site_hal
)
{
var
query
=
options
.
query
,
i
,
key
,
parsed_query
,
sub_query
,
result_list
,
local_roles
,
local_role_found
=
false
,
selection_domain
,
sort_list
=
[];
if
(
options
.
query
)
{
parsed_query
=
jIO
.
QueryFactory
.
create
(
options
.
query
);
result_list
=
isSingleLocalRoles
(
parsed_query
);
if
(
result_list
)
{
query
=
undefined
;
local_roles
=
result_list
;
}
else
{
result_list
=
isSingleDomain
(
parsed_query
);
if
(
result_list
)
{
query
=
undefined
;
selection_domain
=
result_list
;
}
else
{
result_list
=
isMultipleLocalRoles
(
parsed_query
);
if
(
result_list
)
{
...
...
@@ -12204,29 +12240,49 @@ return new Parser;
(
parsed_query
.
operator
===
'
AND
'
))
{
// portal_type:"Person" AND local_roles:"Assignee"
// AND selection_domain_region:"europe/france"
for
(
i
=
0
;
i
<
parsed_query
.
query_list
.
length
;
i
+=
1
)
{
sub_query
=
parsed_query
.
query_list
[
i
];
if
(
!
local_role_found
)
{
result_list
=
isSingleLocalRoles
(
sub_query
);
if
(
result_list
)
{
local_roles
=
result_list
;
parsed_query
.
query_list
.
splice
(
i
,
1
);
query
=
jIO
.
Query
.
objectToSearchText
(
parsed_query
);
i
=
parsed_query
.
query_list
.
length
;
local_role_found
=
true
;
}
else
{
result_list
=
isMultipleLocalRoles
(
sub_query
);
if
(
result_list
)
{
local_roles
=
result_list
;
parsed_query
.
query_list
.
splice
(
i
,
1
);
query
=
jIO
.
Query
.
objectToSearchText
(
parsed_query
);
i
=
parsed_query
.
query_list
.
length
;
local_role_found
=
true
;
}
}
}
result_list
=
isSingleDomain
(
sub_query
);
if
(
result_list
)
{
parsed_query
.
query_list
.
splice
(
i
,
1
);
query
=
jIO
.
Query
.
objectToSearchText
(
parsed_query
);
if
(
selection_domain
)
{
for
(
key
in
result_list
)
{
if
(
result_list
.
hasOwnProperty
(
key
))
{
selection_domain
[
key
]
=
result_list
[
key
];
}
}
}
else
{
selection_domain
=
result_list
;
}
i
-=
1
;
}
}
}
}
}
}
if
(
options
.
sort_on
)
{
for
(
i
=
0
;
i
<
options
.
sort_on
.
length
;
i
+=
1
)
{
...
...
@@ -12234,6 +12290,10 @@ return new Parser;
}
}
if
(
selection_domain
)
{
selection_domain
=
JSON
.
stringify
(
selection_domain
);
}
return
jIO
.
util
.
ajax
({
"
type
"
:
"
GET
"
,
"
url
"
:
UriTemplate
.
parse
(
site_hal
.
_links
.
raw_search
.
href
)
...
...
@@ -12243,7 +12303,8 @@ return new Parser;
select_list
:
options
.
select_list
||
[
"
title
"
,
"
reference
"
],
limit
:
options
.
limit
,
sort_on
:
sort_list
,
local_roles
:
local_roles
local_roles
:
local_roles
,
selection_domain
:
selection_domain
}),
"
xhrFields
"
:
{
withCredentials
:
true
...
...
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