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
Labels
Merge Requests
138
Merge Requests
138
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
ed59ed35
Commit
ed59ed35
authored
Oct 01, 2019
by
Klaus Wölfel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_core/erp5_web_rjs_ui] jIO 3.41.0
parent
834ce074
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
16 deletions
+70
-16
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_jio_js.js
...enderjs_ui/PathTemplateItem/web_page_module/rjs_jio_js.js
+34
-7
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
+34
-7
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_jio_js.js
View file @
ed59ed35
...
@@ -15886,26 +15886,50 @@ return new Parser;
...
@@ -15886,26 +15886,50 @@ return new Parser;
*/
*/
/*jslint nomen: true*/
/*jslint nomen: true*/
/*global jIO, RSVP, DOMParser, XMLSerializer*/
/*global
document,
jIO, RSVP, DOMParser, XMLSerializer*/
(
function
(
jIO
,
RSVP
,
DOMParser
,
XMLSerializer
)
{
(
function
(
jIO
,
RSVP
,
DOMParser
,
XMLSerializer
)
{
"
use strict
"
;
"
use strict
"
;
var
parser
=
new
DOMParser
(),
var
parser
=
new
DOMParser
(),
serializer
=
new
XMLSerializer
();
serializer
=
new
XMLSerializer
();
function
makeXmlRpcRequest
(
file
,
from
,
to
)
{
function
makeXmlRpcRequest
(
file
,
from
,
to
,
conversion_kw
)
{
var
xml
=
parser
.
parseFromString
(
var
xml
=
parser
.
parseFromString
(
'
<?xml version="1.0" encoding="UTF-8"?><methodCall>
'
+
'
<?xml version="1.0" encoding="UTF-8"?><methodCall>
'
+
'
<methodName>convertFile</methodName><params>
'
+
'
<methodName>convertFile</methodName><params>
'
+
'
<param><value><string></string></value></param>
'
+
'
<param><value><string></string></value></param>
'
+
'
<param><value><string></string></value></param>
'
+
'
<param><value><string></string></value></param>
'
+
'
<param><value><string></string></value></param></params></methodCall>
'
,
'
<param><value><string></string></value></param>
'
+
'
<param><struct></struct></param>
'
+
'
</params></methodCall>
'
,
'
text/xml
'
'
text/xml
'
),
),
elt
,
member
,
name
,
value
,
key
,
struct
=
xml
.
getElementsByTagName
(
'
struct
'
),
string_list
=
xml
.
getElementsByTagName
(
'
string
'
);
string_list
=
xml
.
getElementsByTagName
(
'
string
'
);
string_list
[
0
].
textContent
=
file
;
string_list
[
0
].
textContent
=
file
;
string_list
[
1
].
textContent
=
from
;
string_list
[
1
].
textContent
=
from
;
string_list
[
2
].
textContent
=
to
;
string_list
[
2
].
textContent
=
to
;
if
(
conversion_kw
)
{
for
(
key
in
conversion_kw
)
{
if
(
conversion_kw
.
hasOwnProperty
(
key
))
{
elt
=
document
.
createElementNS
(
null
,
conversion_kw
[
key
][
1
]);
elt
.
textContent
=
conversion_kw
[
key
][
0
];
value
=
document
.
createElementNS
(
null
,
"
value
"
);
value
.
appendChild
(
elt
);
name
=
document
.
createElementNS
(
null
,
"
name
"
);
name
.
textContent
=
key
;
member
=
document
.
createElementNS
(
null
,
"
member
"
);
member
.
appendChild
(
name
);
member
.
appendChild
(
value
);
struct
[
0
].
appendChild
(
member
);
}
}
}
return
serializer
.
serializeToString
(
xml
);
return
serializer
.
serializeToString
(
xml
);
}
}
...
@@ -15914,7 +15938,7 @@ return new Parser;
...
@@ -15914,7 +15938,7 @@ return new Parser;
* from a format to another
* from a format to another
* return converted blob.
* return converted blob.
**/
**/
function
convert
(
url
,
blob
,
from
,
to
)
{
function
convert
(
url
,
blob
,
from
,
to
,
conversion_kw
)
{
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
.
push
(
function
()
{
return
jIO
.
util
.
readBlobAsDataURL
(
blob
);
return
jIO
.
util
.
readBlobAsDataURL
(
blob
);
...
@@ -15926,7 +15950,8 @@ return new Parser;
...
@@ -15926,7 +15950,8 @@ return new Parser;
data
:
makeXmlRpcRequest
(
data
:
makeXmlRpcRequest
(
result
.
target
.
result
.
split
(
'
base64,
'
)[
1
],
result
.
target
.
result
.
split
(
'
base64,
'
)[
1
],
from
,
from
,
to
to
,
conversion_kw
)
)
});
});
})
})
...
@@ -15976,11 +16001,13 @@ return new Parser;
...
@@ -15976,11 +16001,13 @@ return new Parser;
return
this
.
_sub_storage
.
getAttachment
.
apply
(
this
.
_sub_storage
,
arguments
);
return
this
.
_sub_storage
.
getAttachment
.
apply
(
this
.
_sub_storage
,
arguments
);
};
};
CloudoooStorage
.
prototype
.
putAttachment
=
function
(
id
,
name
,
blob
)
{
CloudoooStorage
.
prototype
.
putAttachment
=
function
(
id
,
name
,
blob
,
conversion_kw
)
{
var
storage
=
this
;
var
storage
=
this
;
return
storage
.
get
(
id
)
return
storage
.
get
(
id
)
.
push
(
function
(
doc
)
{
.
push
(
function
(
doc
)
{
return
convert
(
storage
.
_url
,
blob
,
doc
.
from
,
doc
.
to
);
return
convert
(
storage
.
_url
,
blob
,
doc
.
from
,
doc
.
to
,
conversion_kw
);
})
})
.
push
(
function
(
converted_blob
)
{
.
push
(
function
(
converted_blob
)
{
return
storage
.
_sub_storage
.
putAttachment
(
id
,
name
,
converted_blob
);
return
storage
.
_sub_storage
.
putAttachment
(
id
,
name
,
converted_blob
);
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_jio_js.xml
View file @
ed59ed35
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
978.
21180.38418.37324
</string>
</value>
<value>
<string>
978.
45841.25288.26948
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
156
8036980.4
2
</float>
<float>
156
9858528.
2
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/jio.js.js
View file @
ed59ed35
...
@@ -15886,26 +15886,50 @@ return new Parser;
...
@@ -15886,26 +15886,50 @@ return new Parser;
*/
*/
/*jslint nomen: true*/
/*jslint nomen: true*/
/*global jIO, RSVP, DOMParser, XMLSerializer*/
/*global
document,
jIO, RSVP, DOMParser, XMLSerializer*/
(
function
(
jIO
,
RSVP
,
DOMParser
,
XMLSerializer
)
{
(
function
(
jIO
,
RSVP
,
DOMParser
,
XMLSerializer
)
{
"
use strict
"
;
"
use strict
"
;
var
parser
=
new
DOMParser
(),
var
parser
=
new
DOMParser
(),
serializer
=
new
XMLSerializer
();
serializer
=
new
XMLSerializer
();
function
makeXmlRpcRequest
(
file
,
from
,
to
)
{
function
makeXmlRpcRequest
(
file
,
from
,
to
,
conversion_kw
)
{
var
xml
=
parser
.
parseFromString
(
var
xml
=
parser
.
parseFromString
(
'
<?xml version="1.0" encoding="UTF-8"?><methodCall>
'
+
'
<?xml version="1.0" encoding="UTF-8"?><methodCall>
'
+
'
<methodName>convertFile</methodName><params>
'
+
'
<methodName>convertFile</methodName><params>
'
+
'
<param><value><string></string></value></param>
'
+
'
<param><value><string></string></value></param>
'
+
'
<param><value><string></string></value></param>
'
+
'
<param><value><string></string></value></param>
'
+
'
<param><value><string></string></value></param></params></methodCall>
'
,
'
<param><value><string></string></value></param>
'
+
'
<param><struct></struct></param>
'
+
'
</params></methodCall>
'
,
'
text/xml
'
'
text/xml
'
),
),
elt
,
member
,
name
,
value
,
key
,
struct
=
xml
.
getElementsByTagName
(
'
struct
'
),
string_list
=
xml
.
getElementsByTagName
(
'
string
'
);
string_list
=
xml
.
getElementsByTagName
(
'
string
'
);
string_list
[
0
].
textContent
=
file
;
string_list
[
0
].
textContent
=
file
;
string_list
[
1
].
textContent
=
from
;
string_list
[
1
].
textContent
=
from
;
string_list
[
2
].
textContent
=
to
;
string_list
[
2
].
textContent
=
to
;
if
(
conversion_kw
)
{
for
(
key
in
conversion_kw
)
{
if
(
conversion_kw
.
hasOwnProperty
(
key
))
{
elt
=
document
.
createElementNS
(
null
,
conversion_kw
[
key
][
1
]);
elt
.
textContent
=
conversion_kw
[
key
][
0
];
value
=
document
.
createElementNS
(
null
,
"
value
"
);
value
.
appendChild
(
elt
);
name
=
document
.
createElementNS
(
null
,
"
name
"
);
name
.
textContent
=
key
;
member
=
document
.
createElementNS
(
null
,
"
member
"
);
member
.
appendChild
(
name
);
member
.
appendChild
(
value
);
struct
[
0
].
appendChild
(
member
);
}
}
}
return
serializer
.
serializeToString
(
xml
);
return
serializer
.
serializeToString
(
xml
);
}
}
...
@@ -15914,7 +15938,7 @@ return new Parser;
...
@@ -15914,7 +15938,7 @@ return new Parser;
* from a format to another
* from a format to another
* return converted blob.
* return converted blob.
**/
**/
function
convert
(
url
,
blob
,
from
,
to
)
{
function
convert
(
url
,
blob
,
from
,
to
,
conversion_kw
)
{
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
.
push
(
function
()
{
return
jIO
.
util
.
readBlobAsDataURL
(
blob
);
return
jIO
.
util
.
readBlobAsDataURL
(
blob
);
...
@@ -15926,7 +15950,8 @@ return new Parser;
...
@@ -15926,7 +15950,8 @@ return new Parser;
data
:
makeXmlRpcRequest
(
data
:
makeXmlRpcRequest
(
result
.
target
.
result
.
split
(
'
base64,
'
)[
1
],
result
.
target
.
result
.
split
(
'
base64,
'
)[
1
],
from
,
from
,
to
to
,
conversion_kw
)
)
});
});
})
})
...
@@ -15976,11 +16001,13 @@ return new Parser;
...
@@ -15976,11 +16001,13 @@ return new Parser;
return
this
.
_sub_storage
.
getAttachment
.
apply
(
this
.
_sub_storage
,
arguments
);
return
this
.
_sub_storage
.
getAttachment
.
apply
(
this
.
_sub_storage
,
arguments
);
};
};
CloudoooStorage
.
prototype
.
putAttachment
=
function
(
id
,
name
,
blob
)
{
CloudoooStorage
.
prototype
.
putAttachment
=
function
(
id
,
name
,
blob
,
conversion_kw
)
{
var
storage
=
this
;
var
storage
=
this
;
return
storage
.
get
(
id
)
return
storage
.
get
(
id
)
.
push
(
function
(
doc
)
{
.
push
(
function
(
doc
)
{
return
convert
(
storage
.
_url
,
blob
,
doc
.
from
,
doc
.
to
);
return
convert
(
storage
.
_url
,
blob
,
doc
.
from
,
doc
.
to
,
conversion_kw
);
})
})
.
push
(
function
(
converted_blob
)
{
.
push
(
function
(
converted_blob
)
{
return
storage
.
_sub_storage
.
putAttachment
(
id
,
name
,
converted_blob
);
return
storage
.
_sub_storage
.
putAttachment
(
id
,
name
,
converted_blob
);
...
...
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