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

listbox fail when sorting invisible listitems

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 6.5.8
    • ZK Client Engine
    • None

      1. click the button above to set listitem invisible.
      2. click Col1 to sort listitems.
      3. observe the browser console. javascript errors occurred.

      a workaround:
      zk.afterLoad('zul.sel', function() {
      function _isListgroup(w)

      { return zk.isLoaded('zkex.sel') && w.$instanceof(zkex.sel.Listgroup); }

      function _isListfoot(w)

      { return w.$instanceof(zul.sel.Listfoot); }

      function _isListgroupfoot(w)

      { return zk.isLoaded('zkex.sel') && w.$instanceof(zkex.sel.Listgroupfoot); }

      zk.override(zul.sel.SelectWidget.prototype, '_isAllSelected', function(){
      if (!this._selItems.length)
      return false;
      var isGroupSelect = this.groupSelect;
      for (var it = this.getBodyWidgetIterator(

      {skipHidden:true}

      ), w; (w = it.next())

      { if ((_isListgroup(w) || _isListgroupfoot(w) || _isListfoot(w)) && !isGroupSelect) continue; if (!w.isDisabled() && !w.isSelected()) return false; }

      return true;
      });
      });

            Unassigned Unassigned
            JoeHuang JoeHuang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: