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

Adding a flag to bandpopup / bandbox to force bandpopup follow the bandbox width.

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Normal Normal
    • 8.0.3
    • None
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.0.3 S6

      Adding a flag to bandpopup / bandbox to force bandpopup follow the bandbox width.
      A possible implementation could be in bandbox:_fixsz(...)

      It could be possible to add a flag check such as:
      _fixsz: function (ppofs) {
      var pp = this.getPopupNode_();
      if (!pp) return;

      var pp2 = this.getPopupNode_(true);
      if (ppofs[1] == 'auto' && pp.offsetHeight > 350)

      { pp.style.height = '350px'; }

      else if (pp.offsetHeight < 10)

      { pp.style.height = '10px'; if (this._shadow) this._shadow.sync(); }

      if (ppofs[0] == 'auto') {
      var cb = this.$n();
      if (pp.offsetWidth <= cb.offsetWidth)

      { pp.style.width = zk(pp).revisedWidth(cb.offsetWidth) + 'px'; if (pp2) pp2.style.width = '100%'; }

      else

      { var wd = jq.innerWidth() - 20; if (wd < cb.offsetWidth) wd = cb.offsetWidth; if (pp.offsetWidth > wd) pp.style.width = wd; }

      }

      if(this._fitPopupToBandbox)

      { var cb = this.$n(); var wd = cb.offsetWidth; pp.style.width = wd+"px"; }

      }

      so that if the bandbox is declared:
      <bandbox fitPopupToBandbox ...></bandbox>
      the popup size will be calculated to match the bandbox input size.

      See attached example for the desired result

            wenninghsu wenninghsu
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h