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
Hamza
erp5
Commits
0e3893cd
Commit
0e3893cd
authored
Sep 04, 2019
by
Hamza Chahed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial commit of jiodev until updating the jio project
parent
b3edff46
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
726 additions
and
34 deletions
+726
-34
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_button_editable.html
...plateItem/web_page_module/rjs_gadget_button_editable.html
+21
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_button_editable.xml
...mplateItem/web_page_module/rjs_gadget_button_editable.xml
+325
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_button_editable_js.js
...lateItem/web_page_module/rjs_gadget_button_editable_js.js
+18
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_button_editable_js.xml
...ateItem/web_page_module/rjs_gadget_button_editable_js.xml
+325
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.js
...thTemplateItem/web_page_module/rjs_gadget_erp5_form_js.js
+0
-4
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.xml
...emplateItem/web_page_module/rjs_gadget_erp5_header_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
...plateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
...emplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
+2
-8
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_form_js.js
...plateItem/web_page_module/rjs_gadget_erp5_page_form_js.js
+0
-7
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_form_js.xml
...lateItem/web_page_module/rjs_gadget_erp5_page_form_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_jio_js.js
...enderjs_ui/PathTemplateItem/web_page_module/rjs_jio_js.js
+27
-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
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_button_editable.html
0 → 100644
View file @
0e3893cd
<!DOCTYPE html>
<html>
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<title>
ERP5 Button Editable
</title>
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"gadget_button_editable.js"
type=
"text/javascript"
></script>
</head>
<body>
<button
type=
"button"
class=
"ui-icon-check ui-btn-icon-notext"
value=
"Execute"
style=
"float: right; border: 1px solid #e7e7e7;border-radius: 5px; padding: 8px; width: 100px"
>
Execute
</button>
<button
type=
"button"
class=
"ui-icon-edit ui-btn-icon-notext"
value=
"Edit"
style=
"float: right; border: 1px solid #e7e7e7;border-radius: 5px; padding: 8px; width: 100px"
>
Edit
</button>
</body>
</html>
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_button_editable.xml
0 → 100644
View file @
0e3893cd
This diff is collapsed.
Click to expand it.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_button_editable_js.js
0 → 100644
View file @
0e3893cd
/*global window, rJS */
/*jslint indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
)
{
"
use strict
"
;
rJS
(
window
)
.
declareAcquiredMethod
(
'
triggerEditable
'
,
'
triggerEditable
'
)
.
onEvent
(
'
click
'
,
function
(
event
)
{
var
identif
=
event
.
toElement
.
value
;
if
(
identif
===
'
Edit
'
)
{
return
this
.
triggerEditable
({
editable
:
true
});
}
else
if
(
identif
===
'
Execute
'
)
{
return
this
.
triggerEditable
({
editable
:
false
});
}
});
}(
window
,
rJS
,
RSVP
));
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_button_editable_js.xml
0 → 100644
View file @
0e3893cd
This diff is collapsed.
Click to expand it.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.js
View file @
0e3893cd
...
@@ -131,10 +131,6 @@
...
@@ -131,10 +131,6 @@
return
this
.
getContent
(
param_list
[
0
]);
return
this
.
getContent
(
param_list
[
0
]);
})
})
.
allowPublicAcquisition
(
"
getFormDefinition
"
,
function
getFormDefinition
()
{
return
JSON
.
parse
(
JSON
.
stringify
(
this
.
state
.
form_definition
));
})
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// declared methods
// declared methods
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.xml
View file @
0e3893cd
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
97
1.18983.58402.648
</string>
</value>
<value>
<string>
97
8.11004.43383.62156
</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>
15
40898451.07
</float>
<float>
15
67426691.29
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
View file @
0e3893cd
...
@@ -228,7 +228,7 @@
...
@@ -228,7 +228,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
97
5.29292.10042.3754
</string>
</value>
<value>
<string>
97
8.11575.30837.17920
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -246,7 +246,7 @@
...
@@ -246,7 +246,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
56870187.8
</float>
<float>
15
67498338.6
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
View file @
0e3893cd
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
cell
=
row
.
cell_list
[
j
];
cell
=
row
.
cell_list
[
j
];
td_element
=
document
.
createElement
(
'
td
'
);
td_element
=
document
.
createElement
(
'
td
'
);
if
(
options
.
show_line_selector
||
(
options
.
form_id
===
'
form_dialog
'
&&
options
.
show_select
)
)
{
if
(
options
.
show_line_selector
)
{
if
(
j
===
0
)
{
if
(
j
===
0
)
{
// If first cell, show a checkbox to select the line
// If first cell, show a checkbox to select the line
sub_element
=
document
.
createElement
(
'
input
'
);
sub_element
=
document
.
createElement
(
'
input
'
);
...
@@ -279,8 +279,6 @@
...
@@ -279,8 +279,6 @@
container
=
template
({
container
=
template
({
"
row_list
"
:
row_list
,
"
row_list
"
:
row_list
,
"
show_anchor
"
:
gadget
.
state
.
show_anchor
,
"
show_anchor
"
:
gadget
.
state
.
show_anchor
,
"
show_select
"
:
gadget
.
state
.
show_select
,
"
form_id
"
:
gadget
.
state
.
form_id
,
"
column_list
"
:
column_list
,
"
column_list
"
:
column_list
,
"
show_line_selector
"
:
gadget
.
state
.
show_line_selector
,
"
show_line_selector
"
:
gadget
.
state
.
show_line_selector
,
"
show_select_action
"
:
gadget
.
state
.
show_select_action
,
"
show_select_action
"
:
gadget
.
state
.
show_select_action
,
...
@@ -344,7 +342,6 @@
...
@@ -344,7 +342,6 @@
"
triggerListboxSelectAction
"
)
"
triggerListboxSelectAction
"
)
.
declareAcquiredMethod
(
"
triggerListboxClipboardAction
"
,
.
declareAcquiredMethod
(
"
triggerListboxClipboardAction
"
,
"
triggerListboxClipboardAction
"
)
"
triggerListboxClipboardAction
"
)
.
declareAcquiredMethod
(
"
getFormDefinition
"
,
"
getFormDefinition
"
)
//////////////////////////////////////////////
//////////////////////////////////////////////
// initialize the gadget content
// initialize the gadget content
...
@@ -409,8 +406,7 @@
...
@@ -409,8 +406,7 @@
return
RSVP
.
all
([
return
RSVP
.
all
([
gadget
.
getUrlParameter
(
field_json
.
key
+
'
_begin_from
'
),
gadget
.
getUrlParameter
(
field_json
.
key
+
'
_begin_from
'
),
gadget
.
getUrlParameter
(
field_json
.
key
+
'
_sort_list:json
'
),
gadget
.
getUrlParameter
(
field_json
.
key
+
'
_sort_list:json
'
),
gadget
.
getUrlParameter
(
field_json
.
key
+
'
_column_list:json
'
),
gadget
.
getUrlParameter
(
field_json
.
key
+
'
_column_list:json
'
)
gadget
.
getFormDefinition
()
]);
]);
})
})
.
push
(
function
(
result_list
)
{
.
push
(
function
(
result_list
)
{
...
@@ -463,8 +459,6 @@
...
@@ -463,8 +459,6 @@
show_anchor
:
field_json
.
show_anchor
,
show_anchor
:
field_json
.
show_anchor
,
show_stat
:
field_json
.
show_stat
,
show_stat
:
field_json
.
show_stat
,
show_count
:
field_json
.
show_count
,
show_count
:
field_json
.
show_count
,
show_select
:
field_json
.
show_select
,
form_id
:
result_list
[
3
].
pt
,
line_icon
:
field_json
.
line_icon
,
line_icon
:
field_json
.
line_icon
,
query
:
field_json
.
query
,
query
:
field_json
.
query
,
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_form_js.js
View file @
0e3893cd
...
@@ -589,17 +589,10 @@ and handling data send&receive.
...
@@ -589,17 +589,10 @@ and handling data send&receive.
.
declareJob
(
"
forceDownload
"
,
function
forceDownload
(
attachment
)
{
.
declareJob
(
"
forceDownload
"
,
function
forceDownload
(
attachment
)
{
/*jslint regexp: true */
/*jslint regexp: true */
var
attachment_data
=
attachment
.
target
.
response
,
var
attachment_data
=
attachment
.
target
.
response
,
filename_utf8_quoted
=
/
(?:
^|;
)\s
*filename
\*
=UTF-8''
?([^
";
]
+
)
/i
.
exec
(
attachment
.
target
.
getResponseHeader
(
"
Content-Disposition
"
)
||
""
),
filename
=
/
(?:
^|;
)\s
*filename
\s
*=
\s
*"
?([^
";
]
+
)
/i
.
exec
(
filename
=
/
(?:
^|;
)\s
*filename
\s
*=
\s
*"
?([^
";
]
+
)
/i
.
exec
(
attachment
.
target
.
getResponseHeader
(
"
Content-Disposition
"
)
||
""
attachment
.
target
.
getResponseHeader
(
"
Content-Disposition
"
)
||
""
),
),
a_tag
=
document
.
createElement
(
"
a
"
);
a_tag
=
document
.
createElement
(
"
a
"
);
if
(
filename_utf8_quoted
)
{
filename
=
filename_utf8_quoted
;
filename
[
1
]
=
decodeURI
(
filename
[
1
]);
}
/*jslint regexp: false */
/*jslint regexp: false */
if
(
attachment
.
target
.
responseType
!==
"
blob
"
)
{
if
(
attachment
.
target
.
responseType
!==
"
blob
"
)
{
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_form_js.xml
View file @
0e3893cd
...
@@ -228,7 +228,7 @@
...
@@ -228,7 +228,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
97
8.9875.57005.56541
</string>
</value>
<value>
<string>
97
6.34271.30288.29832
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -246,7 +246,7 @@
...
@@ -246,7 +246,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
156
7358955.05
</float>
<float>
156
1044454.34
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_jio_js.js
View file @
0e3893cd
...
@@ -15905,7 +15905,7 @@ return new Parser;
...
@@ -15905,7 +15905,7 @@ return new Parser;
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>
'
+
...
@@ -15914,10 +15914,29 @@ return new Parser;
...
@@ -15914,10 +15914,29 @@ return new Parser;
'
<param><value><string></string></value></param></params></methodCall>
'
,
'
<param><value><string></string></value></param></params></methodCall>
'
,
'
text/xml
'
'
text/xml
'
),
),
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
){
var
param
=
parser
.
parseFromString
(
'
<param><value><boolean>0</boolean></value></param>
'
,
'
text/xml
'
).
firstChild
;
xml
.
firstChild
.
lastChild
.
appendChild
(
param
);
var
param
=
parser
.
parseFromString
(
'
<param><value><boolean>0</boolean></value></param>
'
,
'
text/xml
'
).
firstChild
;
xml
.
firstChild
.
lastChild
.
appendChild
(
param
);
param
=
parser
.
parseFromString
(
'
<param><struct></struct></param>
'
,
'
text/xml
'
).
firstChild
;
var
struct
=
param
.
firstChild
;
for
(
var
key
in
conversion_kw
)
{
var
element_value
=
document
.
createElement
(
conversion_kw
[
key
][
1
]);
var
member
=
parser
.
parseFromString
(
'
<member><name></name><value></value></member>
'
,
'
text/xml
'
).
firstChild
;
element_value
.
textContent
=
conversion_kw
[
key
][
0
];
member
.
getElementsByTagName
(
'
name
'
)[
0
].
textContent
=
key
;
member
.
getElementsByTagName
(
'
value
'
)[
0
].
appendChild
(
element_value
);
struct
.
appendChild
(
member
);
}
xml
.
firstChild
.
lastChild
.
appendChild
(
param
);
}
//
return
serializer
.
serializeToString
(
xml
);
return
serializer
.
serializeToString
(
xml
);
}
}
...
@@ -15926,7 +15945,7 @@ return new Parser;
...
@@ -15926,7 +15945,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
);
...
@@ -15938,7 +15957,8 @@ return new Parser;
...
@@ -15938,7 +15957,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
)
)
});
});
})
})
...
@@ -15988,11 +16008,11 @@ return new Parser;
...
@@ -15988,11 +16008,11 @@ 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 @
0e3893cd
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
97
7.17610.605.30924
</string>
</value>
<value>
<string>
97
8.10764.60200.28910
</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
3892822.4
</float>
<float>
156
7412217.18
</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