From c445e68b509bda5e6c148a3589b2209383da3fef Mon Sep 17 00:00:00 2001 From: Olivier Giulieri Date: Sat, 10 Jul 2021 12:44:02 -0700 Subject: [PATCH] v.3.4.3. --- bower.json | 2 +- css/demo.css | 2 +- css/evol-colorpicker.css | 2 +- index.html | 32 ++++++++++++++++---------------- js/evol-colorpicker.js | 26 +++++++++++++------------- js/evol-colorpicker.min.js | 4 ++-- package.json | 2 +- 7 files changed, 35 insertions(+), 35 deletions(-) diff --git a/bower.json b/bower.json index ac8896e..33b4ec1 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "evol-colorpicker", - "version": "3.4.2", + "version": "3.4.3", "description": "jQuery UI widget for web color picking which looks like the one in Microsoft Office 2010.", "homepage": "http://evoluteur.github.io/colorpicker/", "main": "js/evol-colorpicker.min.js", diff --git a/css/demo.css b/css/demo.css index 391b646..9688a8f 100644 --- a/css/demo.css +++ b/css/demo.css @@ -1,5 +1,5 @@ /* - evol-colorpicker 3.4.2 + evol-colorpicker 3.4.3 (c) 2021 Olivier Giulieri http://evoluteur.github.io/colorpicker/ */ diff --git a/css/evol-colorpicker.css b/css/evol-colorpicker.css index 499bf48..fe95982 100644 --- a/css/evol-colorpicker.css +++ b/css/evol-colorpicker.css @@ -1,5 +1,5 @@ /* - evol-colorpicker 3.4.2 + evol-colorpicker 3.4.3 (c) 2021 Olivier Giulieri http://evoluteur.github.io/colorpicker/ */ diff --git a/index.html b/index.html index 4596525..25c17c8 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@ - + @@ -18,8 +18,8 @@
-

Evol-ColorPicker v3.4.2

-
+

Evol-ColorPicker v3.4.3

+
@@ -29,7 +29,7 @@

Evol-ColorPicker v3.4.2

It can be used inline or as a popup bound to a text box. - It comes with several color palettes, can track selection history and supports "transparent" color. + It comes with several color palettes, can track selection history and supports "transparent" color. It is a full jQuery UI widget, supporting various configurations and themes.

@@ -58,12 +58,12 @@

Evol-ColorPicker v3.4.2

Enable Disable Destroy - +
Inline with "web" default palette:

-
+
@@ -76,7 +76,7 @@

Evol-ColorPicker v3.4.2

-
+
Using "showOn" option.
@@ -86,7 +86,7 @@

Evol-ColorPicker v3.4.2

Methods:

-
+
').after('
').on("keyup onpaste",function(t){var e=r(this).val();e!=o.options.color&&o._setValue(e,!0)});var n=this.options.showOn;"both"!==n&&"focus"!==n||e.on("focus",function(){o.showPalette()}),"both"!==n&&"button"!==n||e.next().on("click",function(t){return t.stopPropagation(),o.showPalette(),!1});break;default:this._isPopup=!1,this._palette=this.element.html(this._paletteHTML()).attr("aria-haspopup","true"),this._bindColors()}if(this.options.history){t&&this._add2History(t);var c=this.options.initialHistory;if(c)for(var a in c)this._add2History(c[a])}},_paletteHTML:function(){var t=this._paletteIdx=Math.abs(this._paletteIdx),e=this.options,o=e.strings.split(","),i='
"+this["_paletteHTML"+t]()+'
'+o[1+t]+"";return e.history&&(i+=''+o[5]+""),i+="
",e.displayIndicator&&(i+=this._colorIndHTML(this.options.color)+this._colorIndHTML("")),i+="
"},_colorIndHTML:function(t){var e=d?"evo-colorbox-ie ":"",o="";return t?t===g?e+="evo-transparent":o="background-color:"+t:o="display:none",'
'+(t||"")+"
"},_paletteHTML1:function(){var t,e=this.options,o=e.strings.split(","),i='
':'">',f='',n=''+f+o[0]+"";if(e.customTheme)for(t=0,ml=e.customTheme.length;t");else{for(i+="#",t=0;t<10;t++)n+=i+a[t]+s;for(n+="",d||(n+=''),n+='',t=0;t<10;t++)n+=i+_[t]+s;for(var c=1;c<4;c++)for(n+='',t=0;t<10;t++)n+=i+_[10*c+t]+s;for(n+='',t=40;t<50;t++)n+=i+_[t]+s;for(n+=""+f,e.transparentColor&&(n+='
'),n+=o[1]+"",t=0;t<10;t++)n+=i+b[t]+s}return n+="
"},_paletteHTML2:function(){for(var t='
':'">',o='',i="
",s='
',f=0,n=m.length;f
';var l="";for(s+=o,a=255;10"},_switchPalette:function(t){if(this._enabled){var e,o,i,s=this.options,f=s.strings.split(",");if(r(t).hasClass("evo-hist")){var n='
'+f[5]+'
';if(0===u.length)n+="

 "+f[6]+"

";else for(var c=u.length-1;-1
'):n+='
';n+="
",e=-this._paletteIdx,o=n,i=f[4]}else this._paletteIdx<0?(e=-this._paletteIdx,this._palette.find(".evo-hist").show()):e=2==this._paletteIdx?1:2,o=this["_paletteHTML"+e](),i=f[e+1],this._paletteIdx=e;this._paletteIdx=e;var a=this._palette.find(".evo-more").prev().html(o).end().children().eq(0).html(i);e<0&&a.next().hide()}},_downOrUpPositioning:function(){for(var t=this.element,e=0;null!==t&&e<100;){if("visible"!=t.css("overflow")){var o=this._palette.offset().top+this._palette.height(),i=t.offset().top+t.height(),s=this._palette.offset().top-this._palette.height()-this.element.outerHeight(),f=t.offset().top;idiv":"td";t.transparentColor&&(o+=",.evo-transparent"),this._cTxt1=e.eq(0).children().eq(0),this._cTxt2=e.eq(1).children().eq(0),this._palette.on("click",o,function(t){var e;i._enabled&&(e=r(this),i._setValue(e.hasClass("evo-transparent")?g:f(e.attr("style").substring(17))),i._active=!1)}).on("mouseover",o,function(t){var e,o;i._enabled&&(o=(e=r(this)).hasClass("evo-transparent")?g:f(e.attr("style").substring(17)),i.options.displayIndicator&&i._setColorInd(o,2),i._active&&i.element.trigger("mouseover.color",o))}).find(".evo-more a").on("click",function(){return i._switchPalette(this),!1})},val:function(t){return void 0===t?this.options.color:(this._setValue(t),this)},_setValue:function(t,e){t=t.replace(/ /g,""),this.options.color=t,this._isPopup?(e||this.hidePalette(),this._setBoxColor(this.element.val(t).change().next(),t)):this._setColorInd(t,1),this.options.history&&0div,.evo-transparent").find(".evo-more a").off("click"),this._isPopup&&this._palette.remove(),this._palette=this._cTxt=null),this._isPopup&&this.element.next().off("click").remove().end().off("focus").unwrap(),this.element.removeClass("colorPicker "+this.id).empty(),r.Widget.prototype.destroy.call(this)}})}(jQuery); \ No newline at end of file +!function(a){function e(t){return t=1==(t=t.toString(16)).length?"0"+t:t}function i(t){return e(Number(t))}function h(t){return(t=e(t))+t+t}function s(t){if(10
').after('
').on("keyup onpaste",function(t){var e=a(this).val();e!=s.options.color&&s._setValue(e,!0)}),"both"!==(i=this.options.showOn)&&"focus"!==i||t.on("focus",function(){s.showPalette()}),"both"!==i&&"button"!==i||t.next().on("click",function(t){return t.stopPropagation(),s.showPalette(),!1})):(this._isPopup=!1,this._palette=this.element.html(this._paletteHTML()).attr("aria-haspopup","true"),this._bindColors()),this.options.history){f&&this._add2History(f);var n=this.options.initialHistory;if(n)for(var c in n)this._add2History(n[c])}},_paletteHTML:function(){var t=this._paletteIdx=Math.abs(this._paletteIdx),e=this.options,o=e.strings.split(","),t='
"+this["_paletteHTML"+t]()+'
'+o[1+t]+"";return e.history&&(t+=''+o[5]+""),t+="
",e.displayIndicator&&(t+=this._colorIndHTML(this.options.color)+this._colorIndHTML("")),t+="
"},_colorIndHTML:function(t){var e=d?"evo-colorbox-ie ":"",o="";return t?t===g?e+="evo-transparent":o="background-color:"+t:o="display:none",'
'+(t||"")+"
"},_paletteHTML1:function(){var t,e=this.options,o=e.strings.split(","),i='
':'">',f='',n=''+f+o[0]+"";if(e.customTheme)for(t=0,ml=e.customTheme.length;t");else{for(i+="#",t=0;t<10;t++)n+=i+v[t]+s;for(n+="",d||(n+=''),n+='',t=0;t<10;t++)n+=i+_[t]+s;for(var c=1;c<4;c++)for(n+='',t=0;t<10;t++)n+=i+_[10*c+t]+s;for(n+='',t=40;t<50;t++)n+=i+_[t]+s;for(n+=""+f,e.transparentColor&&(n+='
'),n+=o[1]+"",t=0;t<10;t++)n+=i+b[t]+s}return n+="
"},_paletteHTML2:function(){for(var t='
':'">',o='',i="
",s='
',f=0,n=m.length;f
';var l="";for(s+=o,a=255;10"},_switchPalette:function(t){if(this._enabled){var e,o,i=this.options,s=i.strings.split(",");if(a(t).hasClass("evo-hist")){var f='
'+s[5]+'
';if(0===u.length)f+="

 "+s[6]+"

";else for(var n=u.length-1;-1
'):f+='
';e=-this._paletteIdx,o=f+="",c=s[4]}else this._paletteIdx<0?(e=-this._paletteIdx,this._palette.find(".evo-hist").show()):e=2==this._paletteIdx?1:2,o=this["_paletteHTML"+e](),c=s[e+1],this._paletteIdx=e;this._paletteIdx=e;var c=this._palette.find(".evo-more").prev().html(o).end().children().eq(0).html(c);e<0&&c.next().hide()}},_downOrUpPositioning:function(){for(var t=this.element,e=0;null!==t&&e<100;){if("visible"!=t.css("overflow")){var o=this._palette.offset().top+this._palette.height(),i=t.offset().top+t.height(),s=this._palette.offset().top-this._palette.height()-this.element.outerHeight(),f=t.offset().top;idiv":"td";t.transparentColor&&(i+=",.evo-transparent"),this._cTxt1=e.eq(0).children().eq(0),this._cTxt2=e.eq(1).children().eq(0),this._palette.on("click",i,function(t){var e;o._enabled&&(e=a(this),o._setValue(e.hasClass("evo-transparent")?g:s(e.attr("style").substring(17))),o._active=!1)}).on("mouseover",i,function(t){var e;o._enabled&&(e=(e=a(this)).hasClass("evo-transparent")?g:s(e.attr("style").substring(17)),o.options.displayIndicator&&o._setColorInd(e,2),o._active&&o.element.trigger("mouseover.color",e))}).find(".evo-more a").on("click",function(){return o._switchPalette(this),!1})},val:function(t){return void 0===t?this.options.color:(this._setValue(t),this)},_setValue:function(t,e){t=t.replace(/ /g,""),this.options.color=t,this._isPopup?(e||this.hidePalette(),this._setBoxColor(this.element.val(t).change().next(),t)):this._setColorInd(t,1),this.options.history&&0div,.evo-transparent").find(".evo-more a").off("click"),this._isPopup&&this._palette.remove(),this._palette=this._cTxt=null),this._isPopup&&this.element.next().off("click").remove().end().off("focus").unwrap(),this.element.removeClass("colorPicker "+this.id).empty(),a.Widget.prototype.destroy.call(this)}})}(jQuery); \ No newline at end of file diff --git a/package.json b/package.json index c47da05..ffadb33 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "evol-colorpicker", - "version": "3.4.2", + "version": "3.4.3", "description": "jQuery UI widget for web color picking which looks like the one in Microsoft Office 2010.", "copyright": "(c) 2021 Olivier Giulieri", "homepage": "http://evoluteur.github.io/colorpicker/",