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

colorbox not initializing hex value in palette popup

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.5.2
    • 8.5.1.1
    • Components
    • Security Level: Jimmy
    • None
    • ZK 8.5.2 S1, ZK 8.5.2 S2

      Steps to Reproduce

      <colorbox value="#6677FF"/>
      

      open popup

      Current Result

      the input field supposed to show the hex value is initially empty

      Expected Result

      hex value shown

      Root Cause

      zkex.inp.Colorpalette.onShow is not setting the input value

      Workaround

      Add the following override to initialize the hex input:

      	zk.afterLoad('zkex.inp', function() {
      		var xColorpalette = {};
      		zk.override(zkex.inp.Colorpalette.prototype, xColorpalette, {
      			onShow : function() {
      				this.$n('hex-inp').value = this._color.getHex();
      				xColorpalette.onShow.apply(this, arguments); //call original
      			}
      		});//zk.override
      	});//zk.afterLoad
      

            rudyhuang rudyhuang
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Time Spent - 1 hour Remaining Estimate - 3 hours
                3h
                Logged:
                Time Spent - 1 hour Remaining Estimate - 3 hours
                1h