(OFBIZ-11810)
Currently when you want to display an information easily on sub-screen
dynamically (example as related element) is currently not possible without
write specific js code.
To simplify it, we introduce a new link type: update-area, to indicate
to the theme that we want to refresh a local area with the call result.
Example :
<link target="ListCategoryProductMembers" link-type="update-area" target-window="detail">
<parameter param-name="productCategoryId"/>
</link>
For this example we indicate that the display result of target 'ListCategoryProductMembers' is going
on the area identify by 'detail'. Pleasure to the theme to manage it.
(OFBIZ-9846)
Replaced inline js from renderFormClose macro to external js in OfbizUtils.js
Done following:
Used custom data attributes: data-focus-field to define focus field for the form.
Used attribute selector to find elements and set focus on the particular field.
Added "requireValidation" class to all the forms with required fields.
Used the class selector to find such forms & attached Validator plugin to it.
Steps to verify:
At add ProdCatalog page: https://localhost:8443/catalog/control/EditProdCatalog
Dialogs:
New Example dialog on Find Example page
Go to Find Example page https://localhost:8443/example/control/FindExample
Click on New Example button
Validations should work in dialog on form submit.
Additional Changes:
Link for dialog in HtmlMenuMacroLibrary still had the inline code.
Replaced the code with external js code.
Validations on forms rendered with renderSubmitField macro from
HtmlFormMacroLibrary.ftl seems not working
https://demo-trunk.ofbiz.apache.org/partymgr/control/NewEmployee, will create
a separate ticket for it.
jleroux:
I agree about NewEmployee issue
As mentionned Aditya themes/rainbowstone/template/HtmlMenuMacroLibrary.ftl was
redundant, removed
I also removed commented out code in rainbowstone HtmlMenuMacroLibrary.ftl
(left by Aditya while working on the issue I guess)
Thanks: Aditya
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832307 13f79535-47bb-0310-9956-ffa450edef68