diff --git a/dist/bundle.js b/dist/bundle.js index 6471e21400..fc42f9333d 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -76964,7 +76964,7 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, { } else { self.setValue(self.lastColor || "#ffffff"); } - if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { + if ((self.R.isValid() && self.G.isValid() && self.B.isValid()) || self._isEmptyRGB()) { self.colorShow.element.css("background-color", self.getValue()); self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE); } @@ -76989,7 +76989,8 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, { } self.setValue(self.lastColor || "#ffffff"); } - if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { + if ((self.R.isValid() && self.G.isValid() && self.B.isValid()) || + self._isEmptyRGB()) { self.colorShow.element.css("background-color", self.getValue()); self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE); } @@ -77055,6 +77056,10 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, { }; }, + _isEmptyRGB: function () { + return BI.isEmptyString(this.storeValue.r) && BI.isEmptyString(this.storeValue.g) && BI.isEmptyString(this.storeValue.b); + }, + _showPreColor: function (color) { if (color === "") { this.colorShow.element.css("background-color", "").removeClass("trans-color-background").addClass("auto-color-background"); diff --git a/dist/case.js b/dist/case.js index 26f91c1bc2..139d35b979 100644 --- a/dist/case.js +++ b/dist/case.js @@ -4486,7 +4486,7 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, { } else { self.setValue(self.lastColor || "#ffffff"); } - if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { + if ((self.R.isValid() && self.G.isValid() && self.B.isValid()) || self._isEmptyRGB()) { self.colorShow.element.css("background-color", self.getValue()); self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE); } @@ -4511,7 +4511,8 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, { } self.setValue(self.lastColor || "#ffffff"); } - if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { + if ((self.R.isValid() && self.G.isValid() && self.B.isValid()) || + self._isEmptyRGB()) { self.colorShow.element.css("background-color", self.getValue()); self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE); } @@ -4577,6 +4578,10 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, { }; }, + _isEmptyRGB: function () { + return BI.isEmptyString(this.storeValue.r) && BI.isEmptyString(this.storeValue.g) && BI.isEmptyString(this.storeValue.b); + }, + _showPreColor: function (color) { if (color === "") { this.colorShow.element.css("background-color", "").removeClass("trans-color-background").addClass("auto-color-background"); diff --git a/dist/fineui.js b/dist/fineui.js index 9370560e54..48a222b2e6 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -77207,7 +77207,7 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, { } else { self.setValue(self.lastColor || "#ffffff"); } - if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { + if ((self.R.isValid() && self.G.isValid() && self.B.isValid()) || self._isEmptyRGB()) { self.colorShow.element.css("background-color", self.getValue()); self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE); } @@ -77232,7 +77232,8 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, { } self.setValue(self.lastColor || "#ffffff"); } - if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { + if ((self.R.isValid() && self.G.isValid() && self.B.isValid()) || + self._isEmptyRGB()) { self.colorShow.element.css("background-color", self.getValue()); self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE); } @@ -77298,6 +77299,10 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, { }; }, + _isEmptyRGB: function () { + return BI.isEmptyString(this.storeValue.r) && BI.isEmptyString(this.storeValue.g) && BI.isEmptyString(this.storeValue.b); + }, + _showPreColor: function (color) { if (color === "") { this.colorShow.element.css("background-color", "").removeClass("trans-color-background").addClass("auto-color-background"); diff --git a/src/case/colorchooser/colorpicker/editor.colorpicker.js b/src/case/colorchooser/colorpicker/editor.colorpicker.js index 1536c55bcb..3caa817b86 100644 --- a/src/case/colorchooser/colorpicker/editor.colorpicker.js +++ b/src/case/colorchooser/colorpicker/editor.colorpicker.js @@ -73,7 +73,7 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, { } else { self.setValue(self.lastColor || "#ffffff"); } - if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { + if ((self.R.isValid() && self.G.isValid() && self.B.isValid()) || self._isEmptyRGB()) { self.colorShow.element.css("background-color", self.getValue()); self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE); } @@ -98,7 +98,8 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, { } self.setValue(self.lastColor || "#ffffff"); } - if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { + if ((self.R.isValid() && self.G.isValid() && self.B.isValid()) || + self._isEmptyRGB()) { self.colorShow.element.css("background-color", self.getValue()); self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE); } @@ -164,6 +165,10 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, { }; }, + _isEmptyRGB: function () { + return BI.isEmptyString(this.storeValue.r) && BI.isEmptyString(this.storeValue.g) && BI.isEmptyString(this.storeValue.b); + }, + _showPreColor: function (color) { if (color === "") { this.colorShow.element.css("background-color", "").removeClass("trans-color-background").addClass("auto-color-background");