From c8ed94b94bf5854ea3da88e7d8ddfefaa35831d7 Mon Sep 17 00:00:00 2001 From: "changhyun1.lee" Date: Tue, 22 Oct 2013 13:41:12 +0900 Subject: [PATCH] [Title] Update jQuery-ColorPicker library [Desc.] [Issue] Change-Id: I69f7deab8871f8aee9396aac79d52f281d8e7ec7 Signed-off-by: changhyun1.lee --- NOTICE | 9 + org.tizen.common.ui/about.html | 4 +- .../about_files/jquerycolorpicker-LICENSE.txt | 20 ++ org.tizen.common.ui/resources/README | 7 +- .../resources/scripts/colorpicker/README.md | 120 +++++++ .../resources/scripts/colorpicker/colorpicker.html | 6 +- .../scripts/colorpicker/css/colorpicker.css | 193 +++++++---- .../scripts/colorpicker/css/colorpicker.min.css | 1 + .../resources/scripts/colorpicker/css/layout.css | 218 ------------ .../resources/scripts/colorpicker/css/page.css | 105 ++++++ .../resources/scripts/colorpicker/images/Thumbs.db | Bin 19968 -> 0 bytes .../resources/scripts/colorpicker/images/blank.gif | Bin 49 -> 0 bytes .../colorpicker/images/colorpicker_background.png | Bin 1897 -> 0 bytes .../scripts/colorpicker/images/colorpicker_hex.png | Bin 532 -> 0 bytes .../colorpicker/images/colorpicker_hsb_b.png | Bin 970 -> 0 bytes .../colorpicker/images/colorpicker_hsb_h.png | Bin 1012 -> 0 bytes .../colorpicker/images/colorpicker_hsb_s.png | Bin 1171 -> 0 bytes .../colorpicker/images/colorpicker_overlay.png | Bin 10355 -> 0 bytes .../colorpicker/images/colorpicker_rgb_b.png | Bin 970 -> 0 bytes .../colorpicker/images/colorpicker_rgb_g.png | Bin 1069 -> 0 bytes .../colorpicker/images/colorpicker_rgb_r.png | Bin 1066 -> 0 bytes .../colorpicker/images/colorpicker_submit.png | Bin 984 -> 0 bytes .../colorpicker/images/custom_background.png | Bin 1916 -> 0 bytes .../scripts/colorpicker/images/custom_hex.png | Bin 562 -> 0 bytes .../scripts/colorpicker/images/custom_hsb_b.png | Bin 1097 -> 0 bytes .../scripts/colorpicker/images/custom_hsb_h.png | Bin 970 -> 0 bytes .../scripts/colorpicker/images/custom_hsb_s.png | Bin 1168 -> 0 bytes .../scripts/colorpicker/images/custom_indic.gif | Bin 86 -> 0 bytes .../scripts/colorpicker/images/custom_rgb_b.png | Bin 1008 -> 0 bytes .../scripts/colorpicker/images/custom_rgb_g.png | Bin 1069 -> 0 bytes .../scripts/colorpicker/images/custom_rgb_r.png | Bin 1018 -> 0 bytes .../scripts/colorpicker/images/custom_submit.png | Bin 997 -> 0 bytes .../scripts/colorpicker/images/grabber.png | Bin 0 -> 333 bytes .../colorpicker/images/gradient_grabber.png | Bin 0 -> 306 bytes .../scripts/colorpicker/images/gradient_input.png | Bin 0 -> 213 bytes .../images/{colorpicker_indic.gif => indic.gif} | Bin .../scripts/colorpicker/images/overlay.png | Bin 0 -> 9128 bytes .../images/{colorpicker_select.gif => select.gif} | Bin .../scripts/colorpicker/images/select.png | Bin 506 -> 363 bytes .../scripts/colorpicker/images/select2.png | Bin 518 -> 376 bytes .../scripts/colorpicker/images/select3.png | Bin 0 -> 233 bytes .../scripts/colorpicker/images/select4.png | Bin 0 -> 194 bytes .../scripts/colorpicker/images/select_hue.png | Bin 0 -> 574 bytes .../scripts/colorpicker/images/slider.png | Bin 315 -> 0 bytes .../scripts/colorpicker/images/submit.png | Bin 0 -> 919 bytes .../resources/scripts/colorpicker/index.html | 375 +++++++++++---------- .../scripts/colorpicker/js/colorpicker.js | 192 +++++++---- .../scripts/colorpicker/js/colorpicker.min.js | 1 + .../resources/scripts/colorpicker/js/eye.js | 34 -- .../resources/scripts/colorpicker/js/layout.js | 67 ---- .../resources/scripts/colorpicker/js/utils.js | 252 -------------- 51 files changed, 708 insertions(+), 896 deletions(-) create mode 100644 org.tizen.common.ui/about_files/jquerycolorpicker-LICENSE.txt create mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/README.md create mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/css/colorpicker.min.css delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/css/layout.css create mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/css/page.css delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/Thumbs.db delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/blank.gif delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/colorpicker_background.png delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/colorpicker_hex.png delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/colorpicker_hsb_b.png delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/colorpicker_hsb_h.png delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/colorpicker_hsb_s.png delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/colorpicker_overlay.png delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/colorpicker_rgb_b.png delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/colorpicker_rgb_g.png delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/colorpicker_rgb_r.png delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/colorpicker_submit.png delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/custom_background.png delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/custom_hex.png delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/custom_hsb_b.png delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/custom_hsb_h.png delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/custom_hsb_s.png delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/custom_indic.gif delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/custom_rgb_b.png delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/custom_rgb_g.png delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/custom_rgb_r.png delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/custom_submit.png create mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/grabber.png create mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/gradient_grabber.png create mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/gradient_input.png rename org.tizen.common.ui/resources/scripts/colorpicker/images/{colorpicker_indic.gif => indic.gif} (100%) create mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/overlay.png rename org.tizen.common.ui/resources/scripts/colorpicker/images/{colorpicker_select.gif => select.gif} (100%) create mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/select3.png create mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/select4.png create mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/select_hue.png delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/slider.png create mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/images/submit.png create mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/js/colorpicker.min.js delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/js/eye.js delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/js/layout.js delete mode 100644 org.tizen.common.ui/resources/scripts/colorpicker/js/utils.js diff --git a/NOTICE b/NOTICE index 3102ff1..8fdce22 100644 --- a/NOTICE +++ b/NOTICE @@ -91,3 +91,12 @@ Notices for file(s): ------------------------------------------------------------ Common Public License, Version 1.0 http://zipeditor.sourceforge.net/ + +============================================================ +Notices for file(s): +/org.tizen.common.ui/resources/scripts/colorpicker/* +------------------------------------------------------------ +MIT +https://github.com/Belelros/jQuery-ColorPicker/ + + diff --git a/org.tizen.common.ui/about.html b/org.tizen.common.ui/about.html index c0dc25d..44c54f8 100644 --- a/org.tizen.common.ui/about.html +++ b/org.tizen.common.ui/about.html @@ -90,9 +90,9 @@ A simple component to select color in the same way you select color in Adobe Pho

-The home page is located at: +A copy of the license is included in about_files/jquerycolorpicker-LICENSE.txt. The home page is located at:

diff --git a/org.tizen.common.ui/about_files/jquerycolorpicker-LICENSE.txt b/org.tizen.common.ui/about_files/jquerycolorpicker-LICENSE.txt new file mode 100644 index 0000000..f2c7367 --- /dev/null +++ b/org.tizen.common.ui/about_files/jquerycolorpicker-LICENSE.txt @@ -0,0 +1,20 @@ +Copyright 2013 Antonio Laguna + +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. \ No newline at end of file diff --git a/org.tizen.common.ui/resources/README b/org.tizen.common.ui/resources/README index 190d5b2..09f959e 100644 --- a/org.tizen.common.ui/resources/README +++ b/org.tizen.common.ui/resources/README @@ -1,6 +1,7 @@ COLOR PICKER - JQUERY PLUGIN - Library: colorpicker -- Download Site: http://www.eyecon.ro/colorpicker/#download -- Release: - colorpicker.zip -- Release Date: -2009-05-23 +- Download Site: https://github.com/Belelros/jQuery-ColorPicker +- Original Site: http://www.eyecon.ro/colorpicker/#download +- Release: - jQuery-ColorPicker-master.zip +- Release Date: -2013-09-17 - License: Dual licensed under the MIT and GPL licenses. diff --git a/org.tizen.common.ui/resources/scripts/colorpicker/README.md b/org.tizen.common.ui/resources/scripts/colorpicker/README.md new file mode 100644 index 0000000..df118b7 --- /dev/null +++ b/org.tizen.common.ui/resources/scripts/colorpicker/README.md @@ -0,0 +1,120 @@ +#ColorPicker + +This is **yet another colorpicker** plugin for jQuery since most of them are not on GitHub nor being mantained at the moment. + +The plugin is a fork of the one developed by Stefan Petre who seems not to be interested in it anymore. I needed a powerfull colorpicker for one of my projects so I updated it and then thought it would be nice if it would were freely available. + +You can see the [demo][] now. + +##Features + +- Flat model - as element in page, attached to an input and custom widget. +- Powerful controls for color selection +- Easy to customize the look by changing some images +- Fits into the viewport +- Powerful callback system to totally control the way it works + +##License + +The plugin is currently dual licensed under the MIT and GPL licenses. + +##Implement + +Attach the Javascript and CSS files to your document. Edit CSS file and fix the paths to images and change colors to fit your site theme. + + + + +##How to use + +All you have to do, is to select the elements in a jQuery way and call the plugin over them. + + $('input').ColorPicker(options); + +##Options +An object containing parameters. Please, note that all parameters are optional. + +> **eventName** (*string*): This is the desired event to trigger the colorpicker. Default: 'click' + +> **color** (*string* or *object*): The default color. String for hex color or hash for RGB and HSB ({r:255, r:0, b:0}) . Default: 'ff0000' + +> **flat** (*boolean*): Whether if the color picker is appended to the element or triggered by an event. Default false + +> **livePreview** (*boolean*): Whether if the color values are filled in the fields while changing values on selector or a field. If false it may improve speed. Default true + +> **onShow** (*function*): Callback function triggered when the colorpicker is shown + +> **onBeforeShow** (*function*) Callback function triggered before the colorpicker is shown + +> **onHide** (*function*): Callback function triggered when the colorpicker is hidden + +> **onChange** (*function*): Callback function triggered when the color is changed + +> **onSubmit** (*function*): Callback function triggered when the color is chosen + +##Methods + +If you want to set a new color. + + $('input').ColorPickerSetColor(color); + +The 'color' argument is the same format as the option color, string for hex color or object for RGB and HSB ({r:255, r:0, b:0}). + +##Examples + +###Flat mode + + $('#colorpickerholder').ColorPicker({flat: true}); + +Custom skin and using flat mode to display the color picker in a custom widget. + + $('#colorpickerholder2').ColorPicker({ + flat: true, + color: '#EFEFEF', + onSubmit: function(hsb, hex, rgb) { + $('#colorselector div').css('backgroundColor', '#' + hex); + } + }); + + +Attached to a text field and using callback functions to update the color with field's value and set the value back in the field by submiting the color. + + $('#colorpickerfield').ColorPicker({ + onSubmit: function(hsb, hex, rgb, el, parent) { + $(el).val(hex); + $(el).ColorPickerHide(); + }, + onBeforeShow: function () { + $(this).ColorPickerSetColor(this.value); + } + }) + .bind('keyup', function(){ + $(this).ColorPickerSetColor(this.value); + }); + +Attached to DOM and using callbacks to live preview the color and adding animation. + + $('#colorselector2').ColorPicker({ + color: '#EFEFEF', + onShow: function (colpkr) { + $(colpkr).fadeIn(500); + return false; + }, + onHide: function (colpkr) { + $(colpkr).fadeOut(500); + return false; + }, + onChange: function (hsb, hex, rgb) { + $('#colorselector2 div').css('backgroundColor', '#' + hex); + } + }); +[demo]: http://belelros.github.com/jQuery-ColorPicker/ "View the demo now!" + +##Thanks + +I would like to thank to everybody that keeps mantaining this ColorPicker. By far, these people have been added/fixed something to this: + +- [Colin Viebrock](https://github.com/cviebrock) +- [Fabian Mücke](https://github.com/fabianmuecke) +- Ken Thomson (sorry, couldn't find it's profile) +- [Daniel Macedo](https://github.com/dm) \ No newline at end of file diff --git a/org.tizen.common.ui/resources/scripts/colorpicker/colorpicker.html b/org.tizen.common.ui/resources/scripts/colorpicker/colorpicker.html index 96fc3c6..86476fe 100644 --- a/org.tizen.common.ui/resources/scripts/colorpicker/colorpicker.html +++ b/org.tizen.common.ui/resources/scripts/colorpicker/colorpicker.html @@ -2,12 +2,12 @@ - + - +