[
https://issues.apache.org/jira/browse/OFBIZ-7720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15383637#comment-15383637
]
Amardeep Singh Jhajj commented on OFBIZ-7720:
---------------------------------------------
Please find attached patch for one utility functionality for selectAll,
toggleAll and checkToggle. Also added patch for its usage in OFBIZ-7896. Thanks.
> Write one generic functionality for select all checkbox by removing currently
> written multiple fuctionality
> -----------------------------------------------------------------------------------------------------------
>
> Key: OFBIZ-7720
> URL: https://issues.apache.org/jira/browse/OFBIZ-7720
> Project: OFBiz
> Issue Type: Sub-task
> Components: framework
> Affects Versions: Trunk
> Reporter: Amardeep Singh Jhajj
> Assignee: Amardeep Singh Jhajj
> Attachments: OFBIZ-7720.patch
>
>
> We have many occurrence of selectAll, toggleAll abd checkToggle function
> calling in ftls. Example:
> {code}
> // For selecting all the child checkboxes
> <input type="checkbox" name="selectAll" value="Y"
> onclick="javascript:toggleAll(this, '${selectAllFormName}');"/>
> // For selecting the child checkboxes and parent (if all child boxes is
> selected)
> <input type="checkbox" name="_rowSubmit_o_${rowCount}" value="Y"
> onclick="javascript:checkToggle(this, '${selectAllFormName}');"/>
> // For selecting all the child checkboxes if parent checbox is selected on
> page load.
> <script language="JavaScript"
> type="text/javascript">selectAll('selectAllForm');</script>
> {code}
> Above all functionality should be replaced using one generic utility of
> selectAll. Example:
> {code}
> // One class "selectAll" on parent checkbox will handle all above cases.
> <input type="checkbox" name="selectAll" value="Y" class="selectAll"/>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)