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

colorbox not initializing hex value in palette popup

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.5.1.1
    • Fix Version/s: 8.5.2
    • Component/s: Components
    • Security Level: Jimmy
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      ZK 8.5.2 S1, ZK 8.5.2 S2

      Description

      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
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                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