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
cb19dfe9
Commit
cb19dfe9
authored
Jun 12, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Hack previous/next
parent
79d804b6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
4 deletions
+47
-4
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
+45
-2
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 @
cb19dfe9
...
@@ -244,15 +244,27 @@
...
@@ -244,15 +244,27 @@
selector
.
textContent
=
"
\
u00A0
"
+
translated_title_list
[
0
];
selector
.
textContent
=
"
\
u00A0
"
+
translated_title_list
[
0
];
selector
.
className
=
"
ui-content-title ui-body-c ui-icon ui-icon-custom
"
+
icon
;
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
);
form_gadget
.
element
.
querySelector
(
'
button[name="action_update"]
'
).
textContent
=
form_gadget
.
state
.
form_definition
.
update_action_title
;
}
// Render the erp5_from
// Render the erp5_from
return
form_gadget
.
getDeclaredGadget
(
"
erp5_form
"
);
return
form_gadget
.
getDeclaredGadget
(
"
erp5_form
"
);
})
})
.
push
(
function
(
erp5_form
)
{
.
push
(
function
(
erp5_form
)
{
var
form_options
=
form_gadget
.
state
.
erp5_form
;
var
form_options
=
form_gadget
.
state
.
erp5_form
,
embedded_form
,
rendered_form
,
i
,
len
,
key
;
// pass own form options to the embedded form
// pass own form options to the embedded form
form_options
.
erp5_document
=
form_gadget
.
state
.
erp5_document
;
form_options
.
erp5_document
=
form_gadget
.
state
.
erp5_document
;
form_options
.
form_definition
=
form_gadget
.
state
.
form_definition
;
form_options
.
form_definition
=
form_gadget
.
state
.
form_definition
;
form_options
.
view
=
form_gadget
.
state
.
view
;
form_options
.
view
=
form_gadget
.
state
.
view
;
form_options
.
jio_key
=
form_gadget
.
state
.
jio_key
;
form_options
.
jio_key
=
form_gadget
.
state
.
jio_key
;
form_options
.
editable
=
true
;
// dialog is always editable
form_options
.
editable
=
true
;
// dialog is always editable
...
@@ -261,6 +273,31 @@
...
@@ -261,6 +273,31 @@
if
(
form_gadget
.
state
.
extended_search
)
{
if
(
form_gadget
.
state
.
extended_search
)
{
form_options
.
form_definition
.
extended_search
=
form_gadget
.
state
.
extended_search
;
form_options
.
form_definition
.
extended_search
=
form_gadget
.
state
.
extended_search
;
}
}
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.
*/
embedded_form
=
form_options
.
erp5_document
.
_embedded
.
_view
;
/*
for (key in embedded_form) {
if (embedded_form.hasOwnProperty(key) && key[0] !== "_") {
embedded_form[key].hidden = 1;
embedded_form[key].required = 0;
delete embedded_form[key].error_text;
}
}
*/
console
.
log
(
form_options
);
/*
form_options.erp5_document = {
"_embedded": {
"_view": rendered_form
}
};
*/
return
erp5_form
.
render
(
form_options
);
return
erp5_form
.
render
(
form_options
);
})
})
.
push
(
function
()
{
.
push
(
function
()
{
...
@@ -272,6 +309,7 @@
...
@@ -272,6 +309,7 @@
})
})
.
push
(
function
(
all_result
)
{
.
push
(
function
(
all_result
)
{
form_gadget
.
element
.
querySelector
(
'
a.dialogcancel
'
).
href
=
all_result
[
0
];
form_gadget
.
element
.
querySelector
(
'
a.dialogcancel
'
).
href
=
all_result
[
0
];
form_gadget
.
enableButtonAsJob
();
return
form_gadget
.
updateHeader
({
return
form_gadget
.
updateHeader
({
cancel_url
:
all_result
[
0
],
cancel_url
:
all_result
[
0
],
page_title
:
all_result
[
1
]
page_title
:
all_result
[
1
]
...
@@ -298,7 +336,7 @@
...
@@ -298,7 +336,7 @@
}
}
},
false
,
false
)
},
false
,
false
)
.
declare
Service
(
function
enableButton
()
{
.
declare
Job
(
'
enableButtonAsJob
'
,
function
enableButton
()
{
// click event listener is now activated
// click event listener is now activated
// Change the state of the gadget
// Change the state of the gadget
var
gadget
=
this
,
var
gadget
=
this
,
...
@@ -311,5 +349,10 @@
...
@@ -311,5 +349,10 @@
update_button
.
disabled
=
false
;
update_button
.
disabled
=
false
;
}
}
});
});
/*
.declareService(function () {
return this.enableButtonAsJob();
});
*/
}(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
Handlebars
,
ensureArray
));
}(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
Handlebars
,
ensureArray
));
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.xml
View file @
cb19dfe9
...
@@ -222,7 +222,7 @@
...
@@ -222,7 +222,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
976.2
0956.15292.37495
</string>
</value>
<value>
<string>
976.2
2331.21487.3942
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -240,7 +240,7 @@
...
@@ -240,7 +240,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1560
246152.37
</float>
<float>
1560
328214.66
</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