Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3691

Listgroups are selected by the selectAll checkmark in listbox

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.0.5
    • Fix Version/s: 8.5.2
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None

      Description

      Steps to Reproduce

      http://zkfiddle.org/sample/2m2ij5s/3-Select-all-select-group-and-groupfoot
      run fiddle
      Use the select all checkmark

      Current Result

      All listitems and listgroups and listgroupfoot are selected

      Expected Result

      Only listitems should be selected

      Debug Info

      Listbox / groupsmodel default selection control don't tag listgroup and listgroupfoot as non selectable, even though they are not data items

      Root Cause

      Workaround

      <script><![CDATA[
      zk.afterLoad('zul.sel', function() {
      var xListbox = {};
      zk.override(zul.sel.Listbox.prototype, xListbox ,{
      selectAll: zkf= function (notify, evt)

      { for (var it = this.getBodyWidgetIterator(), w; (w = it.next());) if (w._loaded && !w.isDisabled() && w.isSelectable() && !(w.className == "zkex.sel.Listgroup" || w.className == "zkex.sel.Listgroupfoot")) this._changeSelect(w, true); if (notify && evt !== true) this.fireOnSelect(this.getSelectedItem(), evt); }

      ,
      setSelectAll: zkf
      });//zk.override
      });//zk.afterLoad
      ]]></script>

        Activity

        Hide
        JamesChu JamesChu added a comment -

        Fixed since 2018/04/26

        Show
        JamesChu JamesChu added a comment - Fixed since 2018/04/26

          People

          • Assignee:
            CharlesQiu CharlesQiu
            Reporter:
            MDuchemin MDuchemin
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1 day
              1d
              Remaining:
              Time Spent - 4 hours Remaining Estimate - 4 hours
              4h
              Logged:
              Time Spent - 4 hours Remaining Estimate - 4 hours
              4h