summaryrefslogtreecommitdiff
path: root/plugins/jqueryui/js/jquery.miniColors.min.js
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-04-27 15:35:07 +0200
committerThomas Bruederli <thomas@roundcube.net>2014-04-27 15:35:07 +0200
commitb34d67907566663ab46b487b99817673ce4e32e5 (patch)
tree94666b9eee302b5b01dee09f737d11732d62e0ba /plugins/jqueryui/js/jquery.miniColors.min.js
parentb867bb81e1ebcff701b5352edd10a143c1ec6996 (diff)
Specify licenses in all javascript files and blocks to please LibreJS
Diffstat (limited to 'plugins/jqueryui/js/jquery.miniColors.min.js')
-rw-r--r--plugins/jqueryui/js/jquery.miniColors.min.js35
1 files changed, 34 insertions, 1 deletions
diff --git a/plugins/jqueryui/js/jquery.miniColors.min.js b/plugins/jqueryui/js/jquery.miniColors.min.js
index cd08974a0..4b42ab7ed 100644
--- a/plugins/jqueryui/js/jquery.miniColors.min.js
+++ b/plugins/jqueryui/js/jquery.miniColors.min.js
@@ -1,4 +1,37 @@
-// http://plugins.jquery.com/project/jQueryMiniColors
+/**
+ * jQuery MiniColors: A tiny color picker built on jQuery
+ *
+ * @source https://github.com/claviska/jquery-minicolors/blob/master/jquery.minicolors.js
+ *
+ * @licstart The following is the entire license notice for the
+ * JavaScript code in this file.
+ *
+ * Copyright Cory LaViska for A Beautiful Site, LLC. (http://www.abeautifulsite.net/)
+ *
+ * Licensed under the MIT licenses
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * @licend The above is the entire license notice
+ * for the JavaScript code in this file.
+ */
jQuery&&function(d){d.extend(d.fn,{miniColors:function(j,k){var x=function(a,b){var e=l(a.val());e||(e="FFFFFF");var c=p(e),e=d('<a class="miniColors-trigger" style="background-color: #'+e+'" href="#"></a>');e.insertAfter(a);a.addClass("miniColors").attr("maxlength",7).attr("autocomplete","off");a.data("trigger",e);a.data("hsb",c);b.change&&a.data("change",b.change);b.readonly&&a.attr("readonly",true);b.disabled&&q(a);b.colorValues&&a.data("colorValues",b.colorValues);e.bind("click.miniColors",function(b){b.preventDefault();
a.trigger("focus")});a.bind("focus.miniColors",function(){w(a)});a.bind("blur.miniColors",function(){var b=l(a.val());a.val(b?"#"+b:"")});a.bind("keydown.miniColors",function(b){b.keyCode===9&&i(a)});a.bind("keyup.miniColors",function(){var b=a.val().replace(/[^A-F0-9#]/ig,"");a.val(b);r(a)||a.data("trigger").css("backgroundColor","#FFF")});a.bind("paste.miniColors",function(){setTimeout(function(){a.trigger("keyup")},5)})},q=function(a){i(a);a.attr("disabled",true);a.data("trigger").css("opacity",
0.5)},w=function(a){if(a.attr("disabled"))return false;i();var b=d('<div class="miniColors-selector"></div>');b.append('<div class="miniColors-colors" style="background-color: #FFF;"><div class="miniColors-colorPicker"></div></div>');b.append('<div class="miniColors-hues"><div class="miniColors-huePicker"></div></div>');b.css({top:a.is(":visible")?a.offset().top+a.outerHeight():a.data("trigger").offset().top+a.data("trigger").outerHeight(),left:a.is(":visible")?a.offset().left:a.data("trigger").offset().left,