diff --git a/dist/bundle.js b/dist/bundle.js index 6471e2140..fc42f9333 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 26f91c1bc..139d35b97 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 9370560e5..48a222b2e 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 1536c55bc..3caa817b8 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");