Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
Commits
8d9575de
Commit
8d9575de
authored
Dec 11, 2017
by
Tomáš Peterka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[renderjs_ui] Show title of Form
parent
76e80f2e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
9 deletions
+33
-9
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
+19
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.xml
...hTemplateItem/web_page_module/rjs_gadget_erp5_form_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.js
...teItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.js
+7
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml
...eItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_report_view_js.js
...Item/web_page_module/rjs_gadget_erp5_pt_report_view_js.js
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_report_view_js.xml
...tem/web_page_module/rjs_gadget_erp5_pt_report_view_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.js
View file @
8d9575de
...
...
@@ -170,12 +170,29 @@
form_definition
=
this
.
state
.
form_definition
,
rendered_document
=
erp5_document
.
_embedded
.
_view
,
group_list
=
form_definition
.
group_list
,
form_gadget
=
this
;
form_gadget
=
this
,
tmp
;
if
(
modification_dict
.
hasOwnProperty
(
'
hash
'
))
{
form_gadget
.
props
.
gadget_list
=
[];
}
/* Update or remove h3 element based on value of `title` */
if
(
modification_dict
.
hasOwnProperty
(
'
title
'
))
{
tmp
=
this
.
element
.
querySelector
(
"
h3
"
);
if
(
modification_dict
.
title
)
{
if
(
tmp
===
null
)
{
// create new title element for existing title
tmp
=
document
.
createElement
(
"
h3
"
);
this
.
element
.
insertBefore
(
tmp
,
this
.
element
.
firstChild
);
}
tmp
.
textContent
=
modification_dict
.
title
;
}
if
(
modification_dict
.
title
===
null
||
modification_dict
.
title
===
""
)
{
// user tends to remove the title
if
(
tmp
!==
null
)
{
tmp
.
remove
();
}
}
tmp
=
undefined
;
}
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
(
group_list
.
map
(
function
(
group
)
{
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.xml
View file @
8d9575de
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
1.37896.39526.64290
</string>
</value>
<value>
<string>
96
2.57107.2774.15257
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
150
3478842.83
</float>
<float>
150
8401412.29
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.js
View file @
8d9575de
...
...
@@ -4,6 +4,11 @@
"
use strict
"
;
function
isGoodNonEditableField
(
field
)
{
// First catch input value errors
if
(
field
==
undefined
||
field
==
null
)
{
return
false
;
}
if
(
!
field
.
hasOwnProperty
(
"
type
"
))
{
return
false
;
}
// ListBox and FormBox should always get a chance to render
if
(
field
.
type
===
"
ListBox
"
)
{
return
true
;
}
if
(
field
.
type
===
"
FormBox
"
)
{
return
true
;
}
...
...
@@ -45,6 +50,7 @@
.
declareMethod
(
'
render
'
,
function
(
options
)
{
var
state_dict
=
{
jio_key
:
options
.
jio_key
,
title
:
options
.
title
,
view
:
options
.
view
,
editable
:
options
.
editable
,
erp5_document
:
options
.
erp5_document
,
...
...
@@ -76,6 +82,7 @@
form_options
.
erp5_document
=
gadget
.
state
.
erp5_document
;
form_options
.
form_definition
=
gadget
.
state
.
form_definition
;
form_options
.
view
=
gadget
.
state
.
view
;
form_options
.
title
=
gadget
.
state
.
title
;
form_options
.
jio_key
=
gadget
.
state
.
jio_key
;
form_options
.
editable
=
0
;
// because for editable=1 there is a special
// page template 'pt_form_editable'. Once it is
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml
View file @
8d9575de
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
962.
35930.39344.674
1
</string>
</value>
<value>
<string>
962.
63166.28788.92
1
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
150
7809117.8
</float>
<float>
150
8765414.5
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_report_view_js.js
View file @
8d9575de
...
...
@@ -33,7 +33,7 @@
};
return
form_gadget
.
render
({
erp5_document
:
erp5_document
,
form_definition
:
form_definition
,
editable
:
0
});
editable
:
0
,
title
:
report_section
.
title
});
});
}
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_report_view_js.xml
View file @
8d9575de
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
1.16421.12334.2201
</string>
</value>
<value>
<string>
96
2.56167.53905.31470
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
150
2116518.17
</float>
<float>
150
8400391.84
</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