[jira] [Commented] (OFBIZ-7720) One generic functionality for select all checkbox by removing currently written multiple functionality

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-7720) One generic functionality for select all checkbox by removing currently written multiple functionality

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-7720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16211680#comment-16211680 ]

Jacques Le Roux commented on OFBIZ-7720:
----------------------------------------

Hi Pranay, Amardeep,

With OFBIZ-6766 I'm working on implementing a [CSP policy|https://en.wikipedia.org/wiki/Content_Security_Policy]. I really apreciate the work you did with this issue and OFBIZ-7896, because the less inline js we have the better. Actually if we could have none it would be even better! I thought stumbled upon an issue with OfbizUtil.js while tracing things with FF tools. It says that ReferenceError: $ is not defined in line 27. Replacing by jQuery does not help. Please have a look and reopen if it's a real issue, thanks :)

> One generic functionality for select all checkbox by removing currently written multiple functionality
> ------------------------------------------------------------------------------------------------------
>
>                 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: Pranay Pandey
>             Fix For: 16.11.01
>
>         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.4.14#64029)