Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: 16.11.01
    • Component/s: framework
    • Labels:
      None
    • Sprint:
      Bug Crush Event - 21/2/2015, Community Day 3 - 2016

      Description

      We have many occurrence of selectAll, toggleAll abd checkToggle function calling in ftls. Example:

      // 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>
      

      Above all functionality should be replaced using one generic utility of selectAll. Example:

      // One class "selectAll" on parent checkbox will handle all above cases.
      <input type="checkbox" name="selectAll" value="Y" class="selectAll"/>
      
      1. OFBIZ-7720.patch
        4 kB
        Amardeep Singh Jhajj

        Activity

        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Ah, and this while going to catalog/control/ListVisualThemes. So it's maybe simply lacking the jQuery lib or is not used there.
        Ah, and this is possibly due to the recent common theme change (most probably). Then while reopening, please link this issue as being broken by OFBIZ-9138

        HTH

        Show
        jacques.le.roux Jacques Le Roux added a comment - Ah, and this while going to catalog/control/ListVisualThemes. So it's maybe simply lacking the jQuery lib or is not used there. Ah, and this is possibly due to the recent common theme change (most probably). Then while reopening, please link this issue as being broken by OFBIZ-9138 HTH
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Hi Pranay, Amardeep,

        With OFBIZ-6766 I'm working on implementing a CSP 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

        Show
        jacques.le.roux Jacques Le Roux added a comment - Hi Pranay, Amardeep, With OFBIZ-6766 I'm working on implementing a CSP 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
        Hide
        pandeypranay Pranay Pandey added a comment -

        Thanks Amardeep Singh Jhajj for the contribution.

        Patch committed to trunk r1761177.

        Show
        pandeypranay Pranay Pandey added a comment - Thanks Amardeep Singh Jhajj for the contribution. Patch committed to trunk r1761177.
        Hide
        amardeepsj Amardeep Singh Jhajj added a comment -

        Please find attached patch for one utility functionality for selectAll, toggleAll and checkToggle. Also added patch for its usage in OFBIZ-7896. Thanks.

        Show
        amardeepsj Amardeep Singh Jhajj added a comment - Please find attached patch for one utility functionality for selectAll, toggleAll and checkToggle. Also added patch for its usage in OFBIZ-7896 . Thanks.

          People

          • Assignee:
            pandeypranay Pranay Pandey
            Reporter:
            amardeepsj Amardeep Singh Jhajj
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development

                Agile