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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
3ee62945
Commit
3ee62945
authored
Jun 19, 2019
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] wip dialogjs
parent
11eecb7b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.js
...Item/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.js
+10
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.xml
...tem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.js
View file @
3ee62945
...
...
@@ -18,6 +18,7 @@
}
function
submitDialog
(
is_updating
)
{
console
.
log
(
'
submitDialog is_updating
'
,
is_updating
);
var
gadget
=
this
,
button_container
=
gadget
.
element
.
querySelector
(
'
.dialog_button_container
'
),
...
...
@@ -245,8 +246,8 @@
selector
.
className
=
"
ui-content-title ui-body-c ui-icon ui-icon-custom
"
+
icon
;
if
(
form_gadget
.
state
.
has_update_action
)
{
console
.
log
(
form_gadget
.
state
.
form_definition
);
console
.
log
(
form_gadget
.
state
.
form_definition
.
update_action_title
);
//
console.log(form_gadget.state.form_definition);
//
console.log(form_gadget.state.form_definition.update_action_title);
form_gadget
.
element
.
querySelector
(
'
button[name="action_update"]
'
).
textContent
=
form_gadget
.
state
.
form_definition
.
update_action_title
;
}
...
...
@@ -274,7 +275,7 @@
form_options
.
form_definition
.
extended_search
=
form_gadget
.
state
.
extended_search
;
}
console
.
log
(
form_options
);
//
console.log(form_options);
/* Remove empty non-editable fields to prevent them from displaying (business requirement).
Deleting objects inplace was not a good idea.
So we pass through only non-empty (non-editable) fields.
...
...
@@ -318,18 +319,24 @@
})
.
onEvent
(
'
submit
'
,
function
submit
()
{
console
.
log
(
'
submit event
'
);
/*
if (this.state.has_update_action === true) {
// default action on submit is update in case of its existence
return submitDialog.apply(this, [true]);
}
*/
return
submitDialog
.
apply
(
this
,
[
false
]);
},
false
,
true
)
.
onEvent
(
'
click
'
,
function
click
(
evt
)
{
/*
console.log('click', evt.target);
if (evt.target.name === "action_confirm") {
evt.preventDefault();
return submitDialog.apply(this, [false]);
}
*/
if
(
evt
.
target
.
name
===
"
action_update
"
)
{
evt
.
preventDefault
();
return
submitDialog
.
apply
(
this
,
[
true
]);
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.xml
View file @
3ee62945
...
...
@@ -222,7 +222,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
976.2
2331.21487.3942
</string>
</value>
<value>
<string>
976.2
3815.15073.26368
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -240,7 +240,7 @@
</tuple>
<state>
<tuple>
<float>
1560
328214.66
</float>
<float>
1560
418192.61
</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