From cb3c73bbbfc7cbf2f757e298a8c03095ac663218 Mon Sep 17 00:00:00 2001 From: Narendra Sisodiya Date: Fri, 6 Feb 2009 08:58:39 +0000 Subject: [PATCH] First Vesion git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2 eee81c28-f429-11dd-99c0-75d572ba1ddd --- SvgEditor.js | 52 + blank.svg | 7 + blanksvg.js | 412 ++ colorpicker/css/colorpicker.css | 161 + colorpicker/css/layout.css | 218 + colorpicker/images/Thumbs.db | Bin 0 -> 19968 bytes colorpicker/images/blank.gif | Bin 0 -> 49 bytes colorpicker/images/colorpicker_background.png | Bin 0 -> 1897 bytes colorpicker/images/colorpicker_hex.png | Bin 0 -> 532 bytes colorpicker/images/colorpicker_hsb_b.png | Bin 0 -> 970 bytes colorpicker/images/colorpicker_hsb_h.png | Bin 0 -> 1012 bytes colorpicker/images/colorpicker_hsb_s.png | Bin 0 -> 1171 bytes colorpicker/images/colorpicker_indic.gif | Bin 0 -> 86 bytes colorpicker/images/colorpicker_overlay.png | Bin 0 -> 10355 bytes colorpicker/images/colorpicker_rgb_b.png | Bin 0 -> 970 bytes colorpicker/images/colorpicker_rgb_g.png | Bin 0 -> 1069 bytes colorpicker/images/colorpicker_rgb_r.png | Bin 0 -> 1066 bytes colorpicker/images/colorpicker_select.gif | Bin 0 -> 78 bytes colorpicker/images/colorpicker_submit.png | Bin 0 -> 984 bytes colorpicker/images/custom_background.png | Bin 0 -> 1916 bytes colorpicker/images/custom_hex.png | Bin 0 -> 562 bytes colorpicker/images/custom_hsb_b.png | Bin 0 -> 1097 bytes colorpicker/images/custom_hsb_h.png | Bin 0 -> 970 bytes colorpicker/images/custom_hsb_s.png | Bin 0 -> 1168 bytes colorpicker/images/custom_indic.gif | Bin 0 -> 86 bytes colorpicker/images/custom_rgb_b.png | Bin 0 -> 1008 bytes colorpicker/images/custom_rgb_g.png | Bin 0 -> 1069 bytes colorpicker/images/custom_rgb_r.png | Bin 0 -> 1018 bytes colorpicker/images/custom_submit.png | Bin 0 -> 997 bytes colorpicker/images/select.png | Bin 0 -> 506 bytes colorpicker/images/select2.png | Bin 0 -> 518 bytes colorpicker/images/slider.png | Bin 0 -> 315 bytes colorpicker/index.html | 171 + colorpicker/js/colorpicker.js | 450 +++ colorpicker/js/eye.js | 34 + colorpicker/js/layout.js | 66 + colorpicker/js/sdjquery.js | 3549 +++++++++++++++++ colorpicker/js/utils.js | 252 ++ save.php | 16 + svg-editor.html | 59 + 40 files changed, 5447 insertions(+) create mode 100644 SvgEditor.js create mode 100644 blank.svg create mode 100644 blanksvg.js create mode 100644 colorpicker/css/colorpicker.css create mode 100644 colorpicker/css/layout.css create mode 100644 colorpicker/images/Thumbs.db create mode 100644 colorpicker/images/blank.gif create mode 100644 colorpicker/images/colorpicker_background.png create mode 100644 colorpicker/images/colorpicker_hex.png create mode 100644 colorpicker/images/colorpicker_hsb_b.png create mode 100644 colorpicker/images/colorpicker_hsb_h.png create mode 100644 colorpicker/images/colorpicker_hsb_s.png create mode 100644 colorpicker/images/colorpicker_indic.gif create mode 100644 colorpicker/images/colorpicker_overlay.png create mode 100644 colorpicker/images/colorpicker_rgb_b.png create mode 100644 colorpicker/images/colorpicker_rgb_g.png create mode 100644 colorpicker/images/colorpicker_rgb_r.png create mode 100644 colorpicker/images/colorpicker_select.gif create mode 100644 colorpicker/images/colorpicker_submit.png create mode 100644 colorpicker/images/custom_background.png create mode 100644 colorpicker/images/custom_hex.png create mode 100644 colorpicker/images/custom_hsb_b.png create mode 100644 colorpicker/images/custom_hsb_h.png create mode 100644 colorpicker/images/custom_hsb_s.png create mode 100644 colorpicker/images/custom_indic.gif create mode 100644 colorpicker/images/custom_rgb_b.png create mode 100644 colorpicker/images/custom_rgb_g.png create mode 100644 colorpicker/images/custom_rgb_r.png create mode 100644 colorpicker/images/custom_submit.png create mode 100644 colorpicker/images/select.png create mode 100644 colorpicker/images/select2.png create mode 100644 colorpicker/images/slider.png create mode 100644 colorpicker/index.html create mode 100644 colorpicker/js/colorpicker.js create mode 100644 colorpicker/js/eye.js create mode 100644 colorpicker/js/layout.js create mode 100644 colorpicker/js/sdjquery.js create mode 100644 colorpicker/js/utils.js create mode 100644 save.php create mode 100644 svg-editor.html diff --git a/SvgEditor.js b/SvgEditor.js new file mode 100644 index 00000000..b5390bab --- /dev/null +++ b/SvgEditor.js @@ -0,0 +1,52 @@ +$(document).ready(function(){ + + + ApplyColorPicker("colorSelectorStroke" , "000000" , { + callback: function(hex){ + window.set_stroke_color(hex); + } + }); + + ApplyColorPicker("colorSelectorFill" , "ffffff" , { + callback: function(hex){ + window.set_fill_color(hex); + } + }); + + + +});//end ready + +function ApplyColorPicker(id , ini_col_hex , fun_var){ + + $("#" + id ).css({ + "border": "1px solid black", + "height" : "30px", + "width" : "30px", + "backgroundColor" : "#" + ini_col_hex + + }); + + $("#" + id).ColorPicker({ + color: "#" + ini_col_hex, + onChange: function (hsb, hex, rgb) { + $("#" + id).css("backgroundColor", "#" + hex); + fun_var.callback('#' + hex); + } + }); + +}//apply + + +function return_str_to_html(str){ + //alert("This is svg image in string format \n This will be posted to server \n " + str) + //posting the data to server + + //document.getElementById("hidden_svg_data").setAttribute("value", escape(str)); + $.post( + "save.php", + {svg_data: escape(str) + }); +} + + diff --git a/blank.svg b/blank.svg new file mode 100644 index 00000000..b72974e8 --- /dev/null +++ b/blank.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/blanksvg.js b/blanksvg.js new file mode 100644 index 00000000..97e2cb10 --- /dev/null +++ b/blanksvg.js @@ -0,0 +1,412 @@ + SVGDocument = null; + var svgns = "http://www.w3.org/2000/svg"; + var d_attr = 0 ; + var signature_started = 0 ; + var path_elememt = 0 ; + var path_num = 1 ; + var rect_num = 1 ; + var line_num = 1 ; + var ellipse_num = 1 ; + var rect_x = null ; + var rect_y = null ; + top.clear_svg = SVGclear_svg ; + top.set_draw_mode = SVGset_draw_mode ; + top.submit_svg = SVGsubmit_svg ; + top.set_stroke_color = SVGset_stroke_color; + top.set_fill_color = SVGset_fill_color; + top.set_stroke_width = SVGset_stroke_width ; + + var current_draw_element = "path" ; + var current_draw_element_fill = "none" ; + var current_draw_element_stroke_width = "1px" ; + var current_draw_element_stroke = "black" ; + + var freehandcircle_min_x = null ; + var freehandcircle_max_x = null ; + var freehandcircle_min_y = null ; + var freehandcircle_max_y = null ; + +function SVGset_draw_mode(ele_name) { + current_draw_element = ele_name; +} + + + +function SVGset_stroke_color(col_hex){ + current_draw_element_stroke = col_hex; +} + +function SVGset_fill_color(col_hex){ + current_draw_element_fill = col_hex; +} + +function SVGset_stroke_width(val){ + current_draw_element_stroke_width = val; +} + +function Initialize(LoadEvent) +{ +SVGDocument = LoadEvent.target.ownerDocument +} + + + +function fun_mouseUP(evt) +{ + +signature_started = 0 ; + + switch (current_draw_element) + { + case "path": + d_attr = 0 ; + path_num = path_num + 1 ; + break + case "rect": + rect_num = rect_num + 1 ; + break + case "line": + line_num = line_num + 1 ; + break + case "ellipse": + ellipse_num = ellipse_num + 1 ; + break + case "freehandcircle": + d_attr = 0 ; + path_num = path_num + 1 ; + + create_svg_element_by_json({ + "element": "ellipse", + "cx": (freehandcircle_min_x + freehandcircle_max_x ) / 2, + "cy": (freehandcircle_min_y + freehandcircle_max_y ) / 2, + "rx": (freehandcircle_max_x - freehandcircle_min_x ) / 2 + "px", + "ry": (freehandcircle_max_y - freehandcircle_min_y ) / 2 + "px", + "id": "ellipse_" + ellipse_num, + "fill": current_draw_element_fill, + "stroke": current_draw_element_stroke, + "strokeWidth": current_draw_element_stroke_width + }); + }//switch + + + +} + + +function fun_mouseDOWN(evt) +{ + + var x = evt.pageX; + var y = evt.pageY; + + switch (current_draw_element) + { + case "freehandcircle": + d_attr = "M" + x + " " + y + " "; + signature_started = 1 ; + //SVG_insert_to_svg();//create element + create_svg_element_by_json({ + "element": "path", + "d": d_attr, + "id": "path_" + path_num, + "fill": "none", + "stroke": current_draw_element_stroke, + "strokeWidth": current_draw_element_stroke_width + + }); + + freehandcircle_min_x = x ; + freehandcircle_max_x = x ; + freehandcircle_min_y = y ; + freehandcircle_max_y = y ; + + break + case "path": + d_attr = "M" + x + " " + y + " "; + signature_started = 1 ; + //SVG_insert_to_svg();//create element + create_svg_element_by_json({ + "element": "path", + "d": d_attr, + "id": "path_" + path_num, + "fill": "none", + "stroke": current_draw_element_stroke, + "strokeWidth": current_draw_element_stroke_width + + }); + + break + case "rect": + signature_started = 1 ; + rect_x = x ; + rect_y = y ; + create_svg_element_by_json({ + "element": "rect", + "x": x, + "y": y, + "width": "1px", + "height": "1px", + "id": "rect_" + rect_num, + "fill": current_draw_element_fill, + "stroke": current_draw_element_stroke, + "strokeWidth": current_draw_element_stroke_width + + }); + break + case "line": + signature_started = 1 ; + + create_svg_element_by_json({ + "element": "line", + "x1": x, + "y1": y, + "x2": x + 1 + "px", + "y2": y + 1 + "px", + "id": "line_" + line_num, + "stroke": current_draw_element_stroke, + "strokeWidth": current_draw_element_stroke_width + + }); + break + case "ellipse": + signature_started = 1 ; + create_svg_element_by_json({ + "element": "ellipse", + "cx": x, + "cy": y, + "rx": 1 + "px", + "ry": 1 + "px", + "id": "ellipse_" + ellipse_num, + "fill": current_draw_element_fill, + "stroke": current_draw_element_stroke, + "strokeWidth": current_draw_element_stroke_width + }); + break + }//switch + + +} + +function fun_mouseMOVE(evt) +{ + if (signature_started == 1 ) + { + var x = evt.pageX; + var y = evt.pageY; + + + switch (current_draw_element) + { + case "path": + + d_attr = d_attr + "L" + x + " " + y + " "; + var shape = SVGDocument.getElementById("path_" + path_num); + shape.setAttributeNS(null, "d", d_attr); + break + + case "rect": + + var shape = SVGDocument.getElementById("rect_" + rect_num); + var start_x = shape.getAttributeNS(null, "x"); + var start_y = shape.getAttributeNS(null, "y"); + + if(rect_x < x ){ + shape.setAttributeNS(null, "x", rect_x); + shape.setAttributeNS(null, "width", x - rect_x); + }else{ + shape.setAttributeNS(null, "x", x); + shape.setAttributeNS(null, "width", rect_x - x); + } + if(rect_y < y ){ + shape.setAttributeNS(null, "y", rect_y); + shape.setAttributeNS(null, "height", y - rect_y); + }else{ + shape.setAttributeNS(null, "y", y); + shape.setAttributeNS(null, "height", rect_y - y); + } + + break + case "line": + var shape = SVGDocument.getElementById("line_" + line_num); + shape.setAttributeNS(null, "x2", x); + shape.setAttributeNS(null, "y2", y); + break + case "ellipse": + var shape = SVGDocument.getElementById("ellipse_" + ellipse_num); + var cx = shape.getAttributeNS(null, "cx"); + var cy = shape.getAttributeNS(null, "cy"); + var rad = Math.sqrt( (x-cx)*(x-cx) + (y-cy)*(y-cy) ); + + shape.setAttributeNS(null, "rx", rad); + shape.setAttributeNS(null, "ry", rad); + break; + + case "freehandcircle": + d_attr = d_attr + "L" + x + " " + y + " "; + var shape = SVGDocument.getElementById("path_" + path_num); + shape.setAttributeNS(null, "d", d_attr); + + freehandcircle_min_x = min_of(x , freehandcircle_min_x ) ; + freehandcircle_max_x = max_of(x , freehandcircle_max_x ) ; + freehandcircle_min_y = min_of(y , freehandcircle_min_y ) ; + freehandcircle_max_y = max_of(y , freehandcircle_max_y ) ; + break; + + }//switch + + }//if +}//function + + +function min_of(a ,b){ + if (a < b ) { return a ;} + else {return b ;} +} +function max_of(a ,b){ + if (a > b ) { return a ;} + else {return b ;} +} + + + function SVG_insert_to_svg() + { + + var shape = SVGDocument.createElementNS(svgns, "path"); + shape.setAttributeNS(null, "d", d_attr); + shape.setAttributeNS(null, "id", "path_" + path_num); + shape.setAttributeNS(null, "fill", "none"); + shape.setAttributeNS(null, "stroke", "green"); + SVGDocument.documentElement.appendChild(shape); + + } + function create_svg_element_by_json(data) + { + var shape = SVGDocument.createElementNS(svgns, data.element); + + + switch (data.element) + { + case "freehandcircle": + case "path": + shape.setAttributeNS(null, "d", data.d_attr); + shape.setAttributeNS(null, "id", data.id); + shape.setAttributeNS(null, "fill", data.fill); + shape.setAttributeNS(null, "stroke", data.stroke); + shape.setAttributeNS(null, "stroke-width", data.strokeWidth); + SVGDocument.documentElement.appendChild(shape); + break + case "rect": + shape.setAttributeNS(null, "x", data.x); + shape.setAttributeNS(null, "y", data.y); + shape.setAttributeNS(null, "width", data.width); + shape.setAttributeNS(null, "height", data.height); + shape.setAttributeNS(null, "id", data.id); + shape.setAttributeNS(null, "fill", data.fill); + shape.setAttributeNS(null, "stroke", data.stroke); + shape.setAttributeNS(null, "stroke-width", data.strokeWidth); + SVGDocument.documentElement.appendChild(shape); + break + case "line": + shape.setAttributeNS(null, "x1", data.x1); + shape.setAttributeNS(null, "x2", data.x2); + shape.setAttributeNS(null, "y1", data.y1); + shape.setAttributeNS(null, "y2", data.y2); + shape.setAttributeNS(null, "id", data.id); + shape.setAttributeNS(null, "stroke", data.stroke); + shape.setAttributeNS(null, "stroke-width", data.strokeWidth); + SVGDocument.documentElement.appendChild(shape); + break + case "ellipse": + shape.setAttributeNS(null, "cx", data.cx); + shape.setAttributeNS(null, "cy", data.cy); + shape.setAttributeNS(null, "rx", data.rx); + shape.setAttributeNS(null, "ry", data.ry); + shape.setAttributeNS(null, "id", data.id); + shape.setAttributeNS(null, "fill", data.fill); + shape.setAttributeNS(null, "stroke", data.stroke); + shape.setAttributeNS(null, "stroke-width", data.strokeWidth); + SVGDocument.documentElement.appendChild(shape); + break + }//switch + + + } + + + function SVGclear_svg() + { + for(var i=1; i=0; i--) + { + attr = attrs.item(i); + out += " " + attr.nodeName + "=\"" + attr.nodeValue+ "\""; + } + + + + if (elem.hasChildNodes()) + { + out += ">\n"; + indent++; + for (i=0; i\n"; + } + else + { + out += " />\n"; + } + + } + return out; + } + + function SVGsubmit_svg(){ + + var str = " \ + \n \ \n "; + + for(var i=1; i" + + top.return_str_to_html(str); + + } + diff --git a/colorpicker/css/colorpicker.css b/colorpicker/css/colorpicker.css new file mode 100644 index 00000000..05b02b48 --- /dev/null +++ b/colorpicker/css/colorpicker.css @@ -0,0 +1,161 @@ +.colorpicker { + width: 356px; + height: 176px; + overflow: hidden; + position: absolute; + background: url(../images/colorpicker_background.png); + font-family: Arial, Helvetica, sans-serif; + display: none; +} +.colorpicker_color { + width: 150px; + height: 150px; + left: 14px; + top: 13px; + position: absolute; + background: #f00; + overflow: hidden; + cursor: crosshair; +} +.colorpicker_color div { + position: absolute; + top: 0; + left: 0; + width: 150px; + height: 150px; + background: url(../images/colorpicker_overlay.png); +} +.colorpicker_color div div { + position: absolute; + top: 0; + left: 0; + width: 11px; + height: 11px; + overflow: hidden; + background: url(../images/colorpicker_select.gif); + margin: -5px 0 0 -5px; +} +.colorpicker_hue { + position: absolute; + top: 13px; + left: 171px; + width: 35px; + height: 150px; + cursor: n-resize; +} +.colorpicker_hue div { + position: absolute; + width: 35px; + height: 9px; + overflow: hidden; + background: url(../images/colorpicker_indic.gif) left top; + margin: -4px 0 0 0; + left: 0px; +} +.colorpicker_new_color { + position: absolute; + width: 60px; + height: 30px; + left: 213px; + top: 13px; + background: #f00; +} +.colorpicker_current_color { + position: absolute; + width: 60px; + height: 30px; + left: 283px; + top: 13px; + background: #f00; +} +.colorpicker input { + background-color: transparent; + border: 1px solid transparent; + position: absolute; + font-size: 10px; + font-family: Arial, Helvetica, sans-serif; + color: #898989; + top: 4px; + right: 11px; + text-align: right; + margin: 0; + padding: 0; + height: 11px; +} +.colorpicker_hex { + position: absolute; + width: 72px; + height: 22px; + background: url(../images/colorpicker_hex.png) top; + left: 212px; + top: 142px; +} +.colorpicker_hex input { + right: 6px; +} +.colorpicker_field { + height: 22px; + width: 62px; + background-position: top; + position: absolute; +} +.colorpicker_field span { + position: absolute; + width: 12px; + height: 22px; + overflow: hidden; + top: 0; + right: 0; + cursor: n-resize; +} +.colorpicker_rgb_r { + background-image: url(../images/colorpicker_rgb_r.png); + top: 52px; + left: 212px; +} +.colorpicker_rgb_g { + background-image: url(../images/colorpicker_rgb_g.png); + top: 82px; + left: 212px; +} +.colorpicker_rgb_b { + background-image: url(../images/colorpicker_rgb_b.png); + top: 112px; + left: 212px; +} +.colorpicker_hsb_h { + background-image: url(../images/colorpicker_hsb_h.png); + top: 52px; + left: 282px; +} +.colorpicker_hsb_s { + background-image: url(../images/colorpicker_hsb_s.png); + top: 82px; + left: 282px; +} +.colorpicker_hsb_b { + background-image: url(../images/colorpicker_hsb_b.png); + top: 112px; + left: 282px; +} +.colorpicker_submit { + position: absolute; + width: 22px; + height: 22px; + background: url(../images/colorpicker_submit.png) top; + left: 322px; + top: 142px; + overflow: hidden; +} +.colorpicker_focus { + background-position: center; +} +.colorpicker_hex.colorpicker_focus { + background-position: bottom; +} +.colorpicker_submit.colorpicker_focus { + background-position: bottom; +} +.colorpicker_slider { + background-position: bottom; +} diff --git a/colorpicker/css/layout.css b/colorpicker/css/layout.css new file mode 100644 index 00000000..8b3f00ff --- /dev/null +++ b/colorpicker/css/layout.css @@ -0,0 +1,218 @@ +body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { + margin:0; + padding:0; +} +table { + border-collapse:collapse; + border-spacing:0; +} +fieldset,img { + border:0; +} +address,caption,cite,code,dfn,em,strong,th,var { + font-style:normal; + font-weight:normal; +} +ol,ul { + list-style:none; +} +caption,th { + text-align:left; +} +h1,h2,h3,h4,h5,h6 { + font-size:100%; + font-weight:normal; +} +q:before,q:after { + content:''; +} +abbr,acronym { border:0; +} +html, body { + background-color: #fff; + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + line-height: 18px; + color: #52697E; +} +body { + text-align: center; + overflow: auto; +} +.wrapper { + width: 700px; + margin: 0 auto; + text-align: left; +} +h1 { + font-size: 21px; + height: 47px; + line-height: 47px; + text-transform: uppercase; +} +.navigationTabs { + height: 23px; + line-height: 23px; + border-bottom: 1px solid #ccc; +} +.navigationTabs li { + float: left; + height: 23px; + line-height: 23px; + padding-right: 3px; +} +.navigationTabs li a{ + float: left; + dispaly: block; + height: 23px; + line-height: 23px; + padding: 0 10px; + overflow: hidden; + color: #52697E; + background-color: #eee; + position: relative; + text-decoration: none; +} +.navigationTabs li a:hover { + background-color: #f0f0f0; +} +.navigationTabs li a.active { + background-color: #fff; + border: 1px solid #ccc; + border-bottom: 0px solid; +} +.tabsContent { + border: 1px solid #ccc; + border-top: 0px solid; + width: 698px; + overflow: hidden; +} +.tab { + padding: 16px; + display: none; +} +.tab h2 { + font-weight: bold; + font-size: 16px; +} +.tab h3 { + font-weight: bold; + font-size: 14px; + margin-top: 20px; +} +.tab p { + margin-top: 16px; + clear: both; +} +.tab ul { + margin-top: 16px; + list-style: disc; +} +.tab li { + margin: 10px 0 0 35px; +} +.tab a { + color: #8FB0CF; +} +.tab strong { + font-weight: bold; +} +.tab pre { + font-size: 11px; + margin-top: 20px; + width: 668px; + overflow: auto; + clear: both; +} +.tab table { + width: 100%; +} +.tab table td { + padding: 6px 10px 6px 0; + vertical-align: top; +} +.tab dt { + margin-top: 16px; +} + +#colorSelector { + position: relative; + width: 36px; + height: 36px; + background: url(../images/select.png); +} +#colorSelector div { + position: absolute; + top: 3px; + left: 3px; + width: 30px; + height: 30px; + background: url(../images/select.png) center; +} +#colorSelector2 { + position: absolute; + top: 0; + left: 0; + width: 36px; + height: 36px; + background: url(../images/select2.png); +} +#colorSelector2 div { + position: absolute; + top: 4px; + left: 4px; + width: 28px; + height: 28px; + background: url(../images/select2.png) center; +} +#colorpickerHolder2 { + top: 32px; + left: 0; + width: 356px; + height: 0; + overflow: hidden; + position: absolute; +} +#colorpickerHolder2 .colorpicker { + background-image: url(../images/custom_background.png); + position: absolute; + bottom: 0; + left: 0; +} +#colorpickerHolder2 .colorpicker_hue div { + background-image: url(../images/custom_indic.gif); +} +#colorpickerHolder2 .colorpicker_hex { + background-image: url(../images/custom_hex.png); +} +#colorpickerHolder2 .colorpicker_rgb_r { + background-image: url(../images/custom_rgb_r.png); +} +#colorpickerHolder2 .colorpicker_rgb_g { + background-image: url(../images/custom_rgb_g.png); +} +#colorpickerHolder2 .colorpicker_rgb_b { + background-image: url(../images/custom_rgb_b.png); +} +#colorpickerHolder2 .colorpicker_hsb_s { + background-image: url(../images/custom_hsb_s.png); + display: none; +} +#colorpickerHolder2 .colorpicker_hsb_h { + background-image: url(../images/custom_hsb_h.png); + display: none; +} +#colorpickerHolder2 .colorpicker_hsb_b { + background-image: url(../images/custom_hsb_b.png); + display: none; +} +#colorpickerHolder2 .colorpicker_submit { + background-image: url(../images/custom_submit.png); +} +#colorpickerHolder2 .colorpicker input { + color: #778398; +} +#customWidget { + position: relative; + height: 36px; +} diff --git a/colorpicker/images/Thumbs.db b/colorpicker/images/Thumbs.db new file mode 100644 index 0000000000000000000000000000000000000000..d396c36dd87185c82fdc303e5736e526634ec549 GIT binary patch literal 19968 zcmeI32|QI>|Npm{$UM)5C{syfJV~ZpNkT{}WKNPO>WC1L5S2ovWX?P%;|WFPF=GiC z%W!a<^Z%ai@YM6%=id9f&+GO3{qOI07w@yr*?XU48%fBB zkq-PAbI*^PKmAFLkdpkIKXLmMkMIo-=Px%wm62B7beT(9zLup{3nQ&&;@$o{658mXV#2iG`Jojg5|h zgOi<=lbMx`m3R^oGDt&CK|?`7!@8ArE9-wb5MClo)KFKdWF*@WQYI2ICK5s&aU3C` zfU6~5@K1q+6t0nyikfB%Ekr1UCzOPYjFg;=c-0X58XQN+nJAdI?NOs-F*rlD-IZ15 zMtB0X(81hlwqtDz!h6qN^rhLt&cVsWEwV#YZ09c7eRA^q6%^GEX=rL`>l`*bZe(n7 z!qm*l+UA_CoxOwGCHKo7o>#8=-SiI#ycHB25qU2v`u>B5F^NgZDNj?MrKRWP7Zes1 zmz0*()YjEEU|uygwRd!Ob@%l4^^cB?zyC1tadK*U@$;9Z<&{JR?IT<+>v0Nmi9sn5=ImNa;l+0=dRA*dSw#(e0W<405kXub7wD;Ho+u4h4 zTiAtVM@1HiMf+N^KUOf`KUK0{3igk3^&@m-Bv5%|Oz;41q|VdwgtJVyxE5)a{$_q=|w{Hk1YDIj! zvyNPTK}*1)@M{%CWEzthacXRkF2i()Q?vK+~a;PI4_%o+_iUQ`vg$=1D_ zllI}uXm3WemmnPh@eGM6&?T?9tg&a{T{D+}M0kHwQ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w?y*@0Ab-zTT#RY*|h zTL<#11qx9$tqfSp8oa=wYSgts^J|-@)Q78A<6R!y7aU z&TB+~6*4H|=fHYN`xS28E}h?+_M&j5_Lt}Ct&bCmxPMv}!Il8rlVti1}P1J(ABP{Jsf*l5H+v;Dn zr02bjfcWxQ;^hr{ueYLTPpwc0Y{d!REUDe$??Amu)eLr-4bhr7wvGx^Vy%k{{j&Gr zH@oTTZ}AV+1dBak_(vxT3s=9Yl)hC|Vi1KmOZ$hSast(54Vvob{+Al&V}AwxbQ+=l zTR;8pcz^GGg=D59)%f{vnl6{nDxC1{)TovFeZ{ka&JC_1uED#&((i;GTe6!CTYIn# zwI(B$W6M;_(!6&5#Xh(7)X)UAYq}9M*JqvXhd&y%WJcF7w2izYAbVMNLf<54aLS0d zvq5Ka!G(Z4EMmoMz97*+A6$&1>fO}Wo632M^N<_MnU%Jgw~UaJ$B8eD<7IfXD?f+f zLU+G;jPB@_HR)1i!$M*XGOfzbRTDeu`Y@aOD1#TU8OrM)yWFv7TwdXIMq7l|2}rlf zr_U{z1g!A}ewQ8}c!^412*Y_BoLu#HsT#{`>p^{n6(0if$~PEqQR8Z|a$mmkx|Y?K zA7TKbeT^Uast9|!ez=E=nr!oQ+UWe-P5Gj>T;Oe&_dN`S(7jG6yue}J^T7o z*W$}<9*b{2npGKaD}OBDe_a?|H?NiV1^r=+(=~p@C-KGgh05ZPacpXGz(P@3(e12* zbeJO#G+9~&DzfNY>Fh|Ltj$Y2csQN9XW literal 0 HcmV?d00001 diff --git a/colorpicker/images/colorpicker_background.png b/colorpicker/images/colorpicker_background.png new file mode 100644 index 0000000000000000000000000000000000000000..8401572f1939a1a24c1963513573b0194ad36ee0 GIT binary patch literal 1897 zcmY*a3pATo9RCoHhLk=v9+hya?P*IB^(tbYgf7-$bhEY|(I?UtUPi9vs#R ziy#P&{yr@fLG&2ly2iu^RFBrRRp1Ms>i=nK7%MiF8HO#xOG2 z_n6)YVr)vMq5IN*f2sWccT3)gRvu2oXh6my%^v}*O;ra5-< zrfBywZT3aSz8bWP1#@=ep&&&2r%2Xx zddEiY1@l}|b6YxdaO6Q`RJq3)wtKZi&2z5yNzot36|pnd_gApH!?MH9gq?hIkpDQ? zoi#k4#OM3Qvsl*nW+NM0+h-~TfAN~J`Np!FYfHA<4F{vc3Gd`y^@%F1#Ljo6xgBMf z>q*?e(2(gjbtEPC06P3(T2t>_N`opfT&(A|#nr9ubq;Roe8EGc50&a+@Ca&D8N&V5 zfWzVZ*wTW^c5k?}vCRiBX+63NTRRx9IULPb=kLtbG7G2PR9LSNtF=j!&s8JxkH+I- zofPjPqCAy{x*V^kY%4z8I+~=}5Ut2+RB9hQnF-=Yy8f)_*S6oz?C#RkmvpMq7QP(o zbZ!bUKi!a-F8i&JTjM>>TAUAmd?)cz-HnW2PWdWk#$QRa^0SMsE*Ei8-<`C&zPP^R zdHWR`(Q|r$)T?{(gtteqpleg1llyjZ0ZVLw8leHw(a;G~vcN1Y>6s-e44f7NN&vzO zSzky!K z<_U2aPpuI;9PaSb&;Ej+#b@gJvw)$&8ZCQ!O0HDG-5Ryk0-~ziB-tPWKJK=>?ocx|gRt#KYNSCK| zmrMW=4om~tMIU%ONCY$t9RcY(kaUNR#1=v%^?pW-QzJnZCkAr|iCQDD687K8FZ`q_ zi57h%KMX!lwtAe@@x)l}04zNB(A4Qum^BC!^1cdZ=xa=ei3OvQ+5@W08>NszykE}f zv?z;H%6*$BjvuB;iP6rpc{~#`#C$juv62eaJ-(#wzbS@&`|x8xR0#<2lFZ9l84oq~ z)RtYb1_uH_On@$HmKKWl$={|vFVC?D2S?ere)+Ii3ZCYJc1u{wg0CgRowk%p6z-vm z25al~YDe{K&MKf#`#$i4g$_`C3_gpv%r}IrbhdU7n7ws`iL~u?7mnTC+5f*Z3oqn> z!F~y5)zR3`!AmrFCO)o-qINJDjGjk AumAu6 literal 0 HcmV?d00001 diff --git a/colorpicker/images/colorpicker_hex.png b/colorpicker/images/colorpicker_hex.png new file mode 100644 index 0000000000000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-2z|0F15BXa1p~(a}*s5CEWXbyYJAdmo&O{#YpD48vSpURq~=HZW^z zYn4ic=lPM5k&}~?zi?i#P(>mU00>*Q=~G~A=!rx^QIxK(E{0+5@9$+<_W68FXS3cg z9in$e&*$@{Qpx;xe0;nc^Q+Ji{h4jrtW!Iut3V(?BD!Pgx=!e-({Wy>6NMqMNDj~M~n z)!GO=qQA@t;I7t2;1S(50Ji7R-H^E z;Fxt5y+yKp{*YWFP<>kUy}douSY2JE!wBfrD*F4hvVtJ@ z_xH_*L>mEXHkOx{0bprq$rczQjer>#REvv?4Nu550(w0tO-7)tlOusf;N935Ms)0f sary=%7ro}V>f{=MmOlY4Yuc{?08g~^-7;vm)Bpeg07*qoM6N<$g2&OnRsaA1 literal 0 HcmV?d00001 diff --git a/colorpicker/images/colorpicker_hsb_h.png b/colorpicker/images/colorpicker_hsb_h.png new file mode 100644 index 0000000000000000000000000000000000000000..3977ed9f21e3186eefd37b198a7cc3f8de6c69cb GIT binary patch literal 1012 zcmVh+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4dPzh1Z?xtc9W|d^8%pySrl!Jsywq01yZSfWhDafa5q;(RrSK!_25Mnz_o6R-Q8VL6wU6+%F4pRf-Q$MI@dS4=mAHh)9FT|@$~eByOWcX z!Cq-b_?cFRh?(5s;V}d2mk4K?&4-6bIBX^iheAZrO{%IS z0YIfv$z`+F(Rl#Sb=`U9^73-C*$nbL0E`QQVHk#CxMmUxbFA4+=9etvc4lVg#bpWz zInPX|)2gcCza|_G>$(mIxn`0I%UGFA#{CZCigR#qP_0(EKmY)WdwYgq^vWbf{@jo* zE^s3|JL^F2F_(#niAW>@0HNVwp65~TOfr++9V?g3RwW5{t@J$$rn?^>GJgkDFu7a~ z0J4_L6actnGO6o2dKt1Tm&@fyBr-HKgb=#EzCJrUYqeSQ+^ z@p#6tJ$H`nQONIahe-%W5W9r2sHGI!dV# zn9t`wEiLs)_< zqd%&uZ8MDk?wUrxmh*4WOQjM3l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52*3aU002ovPDHLkV1hB)7U=*0 literal 0 HcmV?d00001 diff --git a/colorpicker/images/colorpicker_indic.gif b/colorpicker/images/colorpicker_indic.gif new file mode 100644 index 0000000000000000000000000000000000000000..f9fa95e2825eadd2d779ad270a71eddb94f94748 GIT binary patch literal 86 zcmZ?wbhEHbRA%60n8?6jX=xc99sU3Re+C8y#h)yU3=B*RIzTo9NS=X7-KS;c>A7MD o3b%A+G;E1+{h2#gG;NlJnPP?C%HXh+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaAe`AI}URCwC#eanvINRp%)C+D=l9`;ZBJNpmnIHzu)uwC7iS()Jv(>)Z8B@~LP zskuk>0)q)45bjPo-NPtU5fxQ4Hh2FoGyC6W_AoQwfBXI$J?{4V&pZ36_xa*}$2NB_ z?N>dXcGqbk;n!C5)IX`whhWfkj zZ|>f95RKQ5eRkk%JDA36{(L^|`Fz^r@vz6^;rIL9ZnvA=Za4q_{k#48>#z3DfBw_{ z_P4+JPe1)+-@bjbFYphQerW$@W^I41;efT)R*v)1=Z=959-jt1_`&@upMCjUJi)=X zZ3jN@=LPT>91D+m>_@LR0MSMOasXBvK!V70fXLnL`FvXMy^X(*$D=(SkL`ZH`|Wn~ zkB^V`U4-G2W0=k|C!+Lzw@%8BKH^%dX*CvOT6`fP)f zassgc-|0lP){Yay7eeq^3=*3Gi}%Ch;Wl_|YMZ-TYi;YjTWhWFe_QW81Qtc5BU0_Z z2hjF&ege^mQag}*k5GO8+nyWj7&|86@4`q!^t?O*@;m;Lg~FZRnXzxda$U+wvP z+7wtYFe#9V5hes@A%dkRUI0naO%=FdBnp6(0n6d>MnTj$n(e?rfG~iLWBd_>PP8__ z(+9A|F_G@f%zN*~U~+eRJRSpB_Iy5l0P1$T_1o=c_xpXj-|zO@Z@(SD`t{de?d#XC z{@ZWAS?_%ctnrWeB5jo-Tan(zp!(!Hwt(W~_YmLFL{z$fE(2EZcmpK$gwifxBAqk< z)S1%EY|t43$S^{U=lkEjzcvK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`e16^|FT<5Z(s6?j#VTsTon zCv+j|zDm~?MBhkUzpJ4xD=ELMv5FCF1wa*`T)?#mBA)?b&<c1aJ5yv7Ii& zw`g;5%eFTGI=fhwE_l<+5u_jrfR<~lcfe-xO)`&tXo<*dQIYJqtx|<5C>N=JdetX) z;xJ3*JkB!CV)W(zRX$gGsJPltRd=232Aj03tbk3?q`HzSS6lTeO-`84-dD9)Dz60> z+Ux?Tfce#^mF-g=$4az1EpD6Crj~$IeNBAHSHM$w4a55-Y6S017aXgOj{rm&aG&_v zbbKlo;)1psubrvz&B0s&mx^f1;4BRErLrH%ycnUr}i1xc5&CUZIL!(hh2Q% zVF85G$M?@|k?AL{c>H{+ImGMXwj@$S=VZlAuSDZz>MOkG?7UARP-F?H8dhbST)uG< z!K%^C=xT3K)>BF8i_z#$*_L=tD-o(3rHb2TQLIjdRp13+D1+sl!FqSlDp%v5IX1KR zE?#KMWB2aZOo25Spwjj?2I^fftq$5!4|=7?T)FV8`(!$;3Z&1t5Em}EcrwM}0M5Ww z-e&^BrF~uiYbyeJ`Q(WrcWTO3Cq^s)!3r0Of5txavt8_lKMNF-lT|rk)oAr81HO2o ztKQCk%draku>xSNOf71K!B`oTPaB*n9lUv!RxZM~$7%(XD-rkIv9hSU;RTQC-7E9m z_pA)~3P9g^PYW!Us@AN$Z{?y`0Y+$hym$e&j0)cY$}1;-^=h&guB=zD$d|} z_Zb(`yU}a`yg3zq62Mlt+}<6q&m6or<-uo2fw#utm5BUF(Xb9ITHWv9)mH{ug#2>Z zK&9)+K9#}q#er=r|KDVMK0T561VDQ6b7#P6U)~Mxt5@GENx_@c^yydbzcHKqvw^g1 zGZjC#ed)b_`TzOP{2K~q RdwKu>002ovPDHLkV1myV#+d*B literal 0 HcmV?d00001 diff --git a/colorpicker/images/colorpicker_rgb_b.png b/colorpicker/images/colorpicker_rgb_b.png new file mode 100644 index 0000000000000000000000000000000000000000..dfac595d017e279ff670df2c816e02d922660d9f GIT binary patch literal 970 zcmV;*12z1KP)h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4P)S5VRCwC#nn6n&K^TU=-E6Jmny{kAgHdYMnDn-IF?jG$4BqP9gMtMis0Dw8 zAV{dW=nt@ez?%dVDIU_2gRqI_5Em~-k8ZNXWV1btZa3MO4c19#+Wqh_Zf2N=;hoLQ zLzrMN$n!kVR;sFUJkQ_V-BE`=I5@}w0L!vKVQ~Q9@px!O=Q!>KBXRE#RaJ4J1Hkq5 zH74#rAmB*#N9cI-&+9?5X8Zj7{P_5|^XQH{u=yKC6vb33b$ff;+uIw9#SFtZ zJw0vcV;BZjbSqURlaVB;VRjAxerlS1&~!NI`5fVIQh?ryB; zCRH|X*Y~znJyFxHP3oeqGU3e&1O9;`*C3*9*=)dr#lP& zn<{s4fg0h-$-2z|0F15BXa1p~(a}*s5CEWXbyYJAdmo&O{#YpD48vSpURq~=HZW^z zYn4ic=lPM5k&}~?zi?i#P(>mU00>*Q=~G~A=!rx^QIxK(E{0+5@9$+<_W68FXS3cg z9in$e&*$@{Qpx;xe0;nc^Q+Ji{h4jrtW!Iut3V(?BD!Pgx=!e-({Wy>6NMqMNDj~M~n z)!GO=qQA@t;I7t2;1S(50Ji7R-H^E z;Fxt5y+yKp{*YWFP<>kUy}douSY2JE!wBfrD*F4hvVtJ@ z_xH_*L>mEXHkOx{0bprq$rczQjer>#REvv?4Nu550(w0tO-7)tlOusf;N935Ms)0f sary=%7ro}V>f{=MmOlY4Yuc{?08g~^-7;vm)Bpeg07*qoM6N<$g2&OnRsaA1 literal 0 HcmV?d00001 diff --git a/colorpicker/images/colorpicker_rgb_g.png b/colorpicker/images/colorpicker_rgb_g.png new file mode 100644 index 0000000000000000000000000000000000000000..72b32760a5c40b7ab834d176ac588750a06f13f2 GIT binary patch literal 1069 zcmV+|1k(G7P)h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4vq?ljRCwC#na@w+KorMcp|EVXQK$+YM6*gzHqnN7BF59kyLV$Gkwjyn8-M%_ zE{RbNUKIZauO4)ds|T|oT-ef(s1a0_$f>a^t?r@HEtF8AJM1*eOAln2$@}v7PN(lv zVqjo^rfD!+2!cS;G+ihZOeejotBV8xi^T#a3=#mWR;yX1lO*|ym8f@!APA_W1Hk3w zB_iEkuh&r3o1~-lLnG2_dVP3!cw}V6=kpbd#Y`r1aB$FM>4rPdqTFGsf@RrABvLAs z_V)IUj*iC1$ET;KtLC7VuFaK9CiU4#0Js;$s%4Xtll%Mo+uPgi?d>#8=kxjb`T6VX zYnRih&Uxo>AeFAF`pIzskVqr~Lqpo^765pv442ErFwDvEaR>5>mzrVKEiOMUN%>sbW=d;^vxor09`ug(nG5}<=S@G^porYX_`AU~VE3z!TGDK12 zc|IHtTS-zB#k2Esx7%GV#GgQ4^p{X9P7p+z=e5~u7zO}#c6JsQ7vu3b&+`;T_4M>` z9GA&t7={6YXue?rfdBvuX|^c<5G>0+K0fLf%ChWqI(vJ2Z8lpnnM|cp%5P9_w|2W7 z>1kS1l^S-tomBpdnunPn2&bo~4-XFj(BI$hKzujU8^&M)%d(Orp*X1D81+?=O8VFB zIa!wfZPi~d9gF96vq~2P!K`gH<8pO-Jf@R=lh2dg9?y?N!gSI{gTWRNFc%T{RQW{l z*CWMo2;1uKCntz>kA*@lBG4iNxDWx@ z)`lq&7!3wLPfXOA@a^yrUm{@0H1Q<@4N1q72$V`Cvl4;&Z#A$c0u5CiPaZTH69Gx%^@W86{U8at z_Fg3dSGk-*1b!6?u~UR@?manP6sovBm$~8BD1qf>UcbEU>Hn@ zfYuw~a2Nn)W@dDT!IB76y{(>_nyMPXmk7v4umABS0u4PmVn_r&_Vpo@j@&Rtryjo2 npA4&xFA;ctuJh%cDE=M*G)vtq^hrv*00000NkvXXu0mjffA{0B literal 0 HcmV?d00001 diff --git a/colorpicker/images/colorpicker_rgb_r.png b/colorpicker/images/colorpicker_rgb_r.png new file mode 100644 index 0000000000000000000000000000000000000000..4855fe03f8ea8d88b4f8ae625c7958eea65208ac GIT binary patch literal 1066 zcmV+_1l9YAP)h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4ut`KgRCwC#nL$e%K@`W|#$^*@2)1ijA*P`i*Vs!8o}|Yj_z@}|6buN87D4dl zS;)b(p0whp5G)M=FI7^gQ8aB#6dSZ+h!%w1Y;?1+hmFg+nRFn+=R+9LJG1n=PBo8cw>y;UEFPWHNyPjRb(ErY56GCrR=VBT=6aj^j{C z2Y}PlQ$)I5E>~4mPm+!{9%_-UkM*gkDWxt5LNprP-`}sZ^r|P&B!6Kv=J9woH#gVT z*4Ee8bGcj~5O6x38Xwfs)pPCb?dfMH0U$33`jPQ?{QUg<*V)k*x3{;YrDbbti|2U@V!3Kl zRCTj#GL@3+Y**KVSOqeE%ahy@p z>gUg%wKI(2q+et*WIMxri^U8lz0dD&5CLNmfmf=FKMMPvNFYqBzie+K(*3%>zd-~V zL;x2efZ8e(fs*tF5oi#B1`)uT2$WAXLZQ&n(GgA41VQBU`NhRWQ51QeZ*Fd`W2iq+ zC9AKVB^iPU{58STq)rq?Q52=WX&5rCK1rt=MBqOp0vDN#+vPH1T5ZUz6aegYJElaS z&+mUTFi^oE5)R`_1gbJke2G9!((xn$q9_`b2vmO6z?uluwCZ>gfvT~NFA}u zJ+zYaydY?bOazXPk7GMK??WM;=NX3ieRZYrsgLwvFbDv_U{E6+Um_sgKZCuSp8l}3 zB-f`^k&G`9D5zq6Vq!wyh%XUP9v_#Nm*vX%__#5MfK({RB``K7i(FY*Q5vx(0tHD@ z%IN4Q0E~=`C@okM0nKam@bIvv1z#c{ReS!&mk88!bHtDcymY$}N=F_r<$jdLkY231 k>i80YySoaVIYIa{0Hu_2rW%yutN;K207*qoM6N<$f_Z=6i~s-t literal 0 HcmV?d00001 diff --git a/colorpicker/images/colorpicker_select.gif b/colorpicker/images/colorpicker_select.gif new file mode 100644 index 0000000000000000000000000000000000000000..599f7f13a6854d198f501588948ffcf97bf9f365 GIT binary patch literal 78 zcmZ?wbhEHbij|08)1sO8@`> literal 0 HcmV?d00001 diff --git a/colorpicker/images/colorpicker_submit.png b/colorpicker/images/colorpicker_submit.png new file mode 100644 index 0000000000000000000000000000000000000000..7f4c0825f53cc4faba8fc9e043502276765da1f5 GIT binary patch literal 984 zcmV;}11J26P)h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4UP(kjRCwC#l;3aLR20X**Y`TM;~%lpWOcWu>lSTng3|pcNEB`2g@;K<+cQWY z@xLM7VCvg6R*=x(q3bFrqf^VEi|J^a#<62NaopJ9!D&c?Dnar9lXm0>pDUe@?m73~ z4=I<+ilSiD@O_^tic+msM@AHjMFxQ5IE)bt0Ht(X1Y>My)yQ<-5retIs8H*|7Z13? zPrUHG+_qWtj}ULo_;=1nmuBCc)-Nf|EIiTorNxc<%@yk|zrCVZLkMb`W;%{E7G4iN zdY`;^>*JEjL^t4S5m)PqP4!gn!t|B5ji+ioZtqDpHxS2Wp{R!++-@!2_(Y4UpgK4m zViuZ;a0>2(RyP)J-EMq2@vFSw;N4@5^iSl%HShG?6=}vnkb`7GE<#kGX$U5f)j^DG zO`a-yukBo4Eqs%fbh}*!AZ)eLTr4-l((DV8I3rsPQ%|p}SP9#JNLf&bBpDJZG zW<$AGB8VabkR(Z(yV_x(32nq4M4idHZe*o1M9zm)ay&Q^oD4ika}TwCNv{zQk|sL| zEVK!j0l0t*-&@MHmsF)f z27*#b=I7@-olgIr#Bm(QafeTW=}i0FOh-M7rpC5C;rX^4T9ibLF-mEF<1Bq({XG34 zgs?6|3$Q9c<*(6a0PyL%z)2^PzL$Tik72|p%JF@FT>Va&rlIR2BkGRB3|(JcTN@d1 z{p!_M20s~b?Xvgb4Q_GaQ_Xf@)!+uO)m$XyrsqoKoAMWHT2ux{DhP&ISOWy1~_n?w9g4TxaK54^@w;2!{Y}p; zD+Zr{ak)S?c%HM%;YW>mwawEyQ#A?io}b;W8h3kicY{-}@8&ydXB;}Ies{ij)7Phe zG~N1SJ||mV^{wS%HH#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zwo(o{saJAzfgYp#$#m=0p2iIYoA=IKF*b|-F~V7BA^y5)0+C{-j(tt0_cxn&YeEW z6>i>psSF~35Xt2`4X?QQJ$vd1Uny%MfCLAD`iHLp;O?U)VWoVDfO_REso~ihj~e+B z0nuBMe2D-G9yXH>eR2;lBp})JU<4<5KtT P00000NkvXXu0mjfA`AaT literal 0 HcmV?d00001 diff --git a/colorpicker/images/custom_hsb_h.png b/colorpicker/images/custom_hsb_h.png new file mode 100644 index 0000000000000000000000000000000000000000..a217e9218e6a512b507a35e8a6141f0e56193439 GIT binary patch literal 970 zcmV;*12z1KP)h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4P)S5VRCwC#m|aK|K^(yUyEA+4?d5?fXd;=M7I&7CAQ1#X&_j>CL_YN-gn@+F zgHSIeAw>3IK|;|7L=oge5IzJ#A^0E&>G?(8=|!HGo*#L7AKu<>4|8pMd)HkZt+#{w zXC7weW^aBB|Jj-SF*9F$o1tx>E$qcMycycAC@-ZBJ@9=M1Art+Kw)425XHpaLf3nT z*o$qs(c_|+-@n%!JfIWz{MV(NRK`u1oK!3sq$xeUk30*0rTO&r;Lz}xX3Q?2XDLZ^ zNtQLm=b0`ovGcrzGy{tZJ8^M;iCsNLZ*=us&BvV@!eqi&`J(hE1%Vf=JRxLR*23X^ zHtTjcstkxmW4fX%R1Gc%0Gw!YjZb;hvts~YStk9-f%l(m0w0fy0I;#P!Y~ZOFd0Yc z6v|xg8E^fO8d9H}oln`OnfJJ7mbVJzw2DT;EXx*f%c_Y}(B({td#$~-(d7^m2>@v8 zyhBz%)<4CSQ06-3bdbu#v?m=s^TUgQAW80>SVT-DWO+Bqe^ZT5c^X^}GWW!^H|6DM z{2&`t&HcxOX}{XxtgBuQu9KfyE}VDPRTnB@)bzR0U55`X2iGIf82PEXs$7=k;M$J@ zqW{A-4Q++h&2S`|@upE=bVXp?Ee;`O5dSyi! z_6LF|n~ze5J~HYyjR0NfpC{*ZC2Op&)zJu?In|^S_t5Z|X#`9oU=$;ucVssLNp#Z) zm`1=f0;Ul#jllmj0z<=NR2qTWnkv%>>_H8 zN}^l&B27_@0BI^lKr=??RZm8DS1SN?ceNr_7}^MstN?&p_nzJCxJ2r=d!JKa1US_; z?df}&-f3JTfPWoH*RQmY%H4;rv~L($))vJGczsJ=-;&x0XvXM>ju9#M``?gN>ukHI zbY@GK!e7T#7lFRVZvo)JlL2+7ag6|%dL;F~c&F(xt`Sh)F!UJ#{5Lm80~&$3`EU8J sdf~SzMzo^mJOqtv1hQW_1cCoK0IhW09jn*o82|tP07*qoM6N<$g4YtalK=n! literal 0 HcmV?d00001 diff --git a/colorpicker/images/custom_hsb_s.png b/colorpicker/images/custom_hsb_s.png new file mode 100644 index 0000000000000000000000000000000000000000..7826b415077be23ed1b1bf05b2da62d4aa5b1c67 GIT binary patch literal 1168 zcmV;B1aJF^P)h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA57D+@wRCwC#nQcf@Q5eUc-Fr6Onu3&AF^rild$UyX1q~x8l(L`*3O@uvFO(o; z_5wxr@*$1tgY{vMl7$6QeMqAy6e1xqkX2R|TUIxmtGu(iIrnyNAC8Ud=Dmt?_1xOS z`EYjbGoJs>o;~L|ziI4tJI8S#VLo05L|S~@48(C$eTIg-ib~hV#^6c%;`soO zlezfi8;3YL0sx8%PiTw9QdL!zm6bIwEpOSPl&u?AQj2Q*-QCgA(fXtl0Cw!$vnn?|%wceFNYM&oFvQ9@3=R%a03eJUpBbjP zxp`q)T3K1y!+W<%Hg9jJw`vg*Mw-&Q9tyNHEd`IT=#UEpqjD~4E z^RfC@Z$F3^H8z_~ryHfSWm(qgbTa*XVcv?&bj$btfnHa?*um@dDVpmsF>?L3*Xu+0 zyNG<2kdR<9neuc7gy{DU#-ng495vU+K24>ZIF9oRKKZ>NR5}3gyyPRArjJ2 zf+9GneqF87jYgx)wVGJz@o_T{>vs3KTv8sMfSye0b7#*&eJ)p4MuzH$z|-elQ6iu& zBJkq1T~TGrm!v941lAN}Dx|xuy)#M#qC|icBA~R%6M*&npp9OT#pigC=nPp5g7fdQCeDBTwIKaKxO%EOa#U(w2IzM!^(@?E$JU80&VS` zsw4ubW>b_1{D(wfc2d$OhEe0SngVs&z)y})BJlKi*ZoJ2WgLpv7LrQ@Xd0=N2vB3; zSaOMgR;yDh5zy*l)Jg<&+6m=42}FRVDYX&-MAM;h_SjzWOGMK|6M@hlJ|_?D1b{O~ zcb%xIR|gRYCCsVwSC1dqf#;_$G^l_GXhlEMv$c(piwF||u`vwu!e-l0Qj(pWefUUx zZQbpLdh413tIzMB(#G&_!c^|xjwk0X-;976L=pjnXgn@jo3O}(`?iG^i6#O_)CkmG zxeWl9>h6da$t42Xkw=pC+TE}fa*4p0M-sV20F9?}B#;Q$d%jF+*QfVdjmwBCrAMCe isv!dMU5CLC`)2?-k0%YdqHBTx0000b%7 literal 0 HcmV?d00001 diff --git a/colorpicker/images/custom_rgb_b.png b/colorpicker/images/custom_rgb_b.png new file mode 100644 index 0000000000000000000000000000000000000000..80764e5d6dd8aac3c5ef87d83b45d29780af1fe9 GIT binary patch literal 1008 zcmVh+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4c1c7*RCwC#nrlcDK^(y6c4ze-dVNsvS$Lk7-d#%KDZNO9B8i}H)rSZIAqqt8 z0YMQxK1gMO7GYLYP(hF%0x2*QLy#1V@^M=3*;VR^9(UeDy}aA)!`iamU9KIiH$ywj zhuOK=n;*mfzdQ50Qw)ExxjjCBThS(Jpxfh1O-aHI-9F`j004$z0EPtu00M#F|Aj7f zhG-Kt;^>QkKy=@(+mI#^_t>{dQ7Uu;MwBWt`i+KWzHKxWRFsz@h)w_i7?usGHrkT0 zKD)TsoR@FvXls4b(GxyKYINaT<}LZ*vqJ!YN*N!1=fMNzxw_27Kw#GGrD;0r$o{Em zr*Oc+f?rZ}o~pp02LO~789ois!r37JfFKm%ceb>?)2NlMS?`CQ&YGI)1dVFi;abap z;i(3Ot;S6{u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xT5=E@BPRC5JM(-{EmRs+wi z*>P|@#ScQvT9QAwUwvX=#Ku^(QHKpv2~+}=KqXKKR03@~kh1h#z3lU2-9S7%K9wHY zZlHd@zd1k|%qmdMx=&^ql(G#p7!3Z$L#9{gzl=qFW|hX6M^<+t`|yc1Y?-gyyEotInm#MOm!f^^y*-dYoVJ8o0wy4TmX zR?7dfn;bc9{iI8VpES5yofZaYh;TjCpK_UhilywQPp{V&o!)zNr-EuAP#7%xRC{Am z6GR!1|0e8}W%vqnuQi`zyC%VuOt~~QLec?j5=hH8t&PuqF6Zm0mDYFhgqkAab@NoR n(3#>M@3IhYo&TccjBE_r(UXjnZhw#mdW^x-)z4*}Q$iB}AxU+4 literal 0 HcmV?d00001 diff --git a/colorpicker/index.html b/colorpicker/index.html new file mode 100644 index 00000000..7e0b43f7 --- /dev/null +++ b/colorpicker/index.html @@ -0,0 +1,171 @@ + + + + + + ColorPicker - jQuery plugin + + + + + + + +
+

Color Picker - jQuery plugin

+ +
+
+

About

+

A simple component to select color in the same way you select color in Adobe Photoshop

+

Features

+
    +
  • Flat mode - as element in page
  • +
  • Powerful controls for color selection
  • +
  • Easy to customize the look by changing some images
  • +
  • Fits into the viewport
  • +
+

Examples

+

Flat mode.

+

+

+
+$('#colorpickerHolder').ColorPicker({flat: true});
+                
+

Custom skin and using flat mode to display the color picker in a custom widget.

+
+
+
+
+
+ +

Attached to an 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.

+

+
+$('#colorpickerField1').ColorPicker({
+	onSubmit: function(hsb, hex, rgb) {
+		$('#colorpickerField1').val(hex);
+	},
+	onBeforeShow: function () {
+		$(this).ColorPickerSetColor(this.value);
+	}
+})
+.bind('keyup', function(){
+	$(this).ColorPickerSetColor(this.value);
+});
+
+

Attached to DOMElement and using callbacks to live preview the color and adding animation.

+

+

+

+
+$('#colorSelector').ColorPicker({
+	color: '#0000ff',
+	onShow: function (colpkr) {
+		$(colpkr).fadeIn(500);
+		return false;
+	},
+	onHide: function (colpkr) {
+		$(colpkr).fadeOut(500);
+		return false;
+	},
+	onChange: function (hsb, hex, rgb) {
+		$('#colorSelector div').css('backgroundColor', '#' + hex);
+	}
+});
+
+
+
+

Download

+

colorpicker.zip (73 kb): jQuery, Javscript files, CSS files, images, examples and instructions.

+

Changelog

+
+
22.08.2008
+
Fixed bug: where some events were not canceled right on Safari
+
Fixed bug: where teh view port was not detected right on Safari
+
16-07-2008
+
Fixed bug where the letter 'F' could not be typed in the Hex field
+
Fixed bug where the changes on Hex field where not parsed
+
Added new option 'livePreview'
+
08-07-2008
+
Fixed typo in the code, both JavaScript and CSS
+
Changed the cursor for some elements
+
Added new demo explaining how to implement custom skin
+
07.07.2008
+
The first release.
+
+
+
+

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.

+
+<link rel="stylesheet" media="screen" type="text/css" href="css/colorpicker.css" />
+<script type="text/javascript" src="js/colorpicker.js"></script>
+                
+

Invocation code

+

All you have to do is to select the elements in a jQuery way and call the plugin.

+
+ $('input').ColorPickerSetColor(options);
+                
+

Options

+

A hash of parameters. All parameters are optional.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
eventNamestringThe desired event to trigger the colorpicker. Default: 'click'
colorstring or hashThe default color. String for hex color or hash for RGB and HSB ({r:255, r:0, b:0}) . Default: 'ff0000'
flatbooleanWhatever if the color picker is appended to the element or triggered by an event. Default false
livePreviewbooleanWhatever 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
onShowfunctionCallback function triggered when the color picker is shown
onBeforeShowfunctionCallback function triggered before the color picker is shown
onHidefunctionCallback function triggered when the color picker is hidden
onChangefunctionCallback function triggered when the color is changed
onSubmitfunctionCallback function triggered when the color it is chosen
+

Set color

+

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 hash for RGB and HSB ({r:255, r:0, b:0}).

+
+
+
+ + diff --git a/colorpicker/js/colorpicker.js b/colorpicker/js/colorpicker.js new file mode 100644 index 00000000..aa100062 --- /dev/null +++ b/colorpicker/js/colorpicker.js @@ -0,0 +1,450 @@ +/** + * + * Color picker + * Author: Stefan Petre www.eyecon.ro + * + */ +(function ($) { + var ColorPicker = function () { + var + ids = {}, + inAction, + charMin = 65, + visible, + tpl = '
', + defaults = { + eventName: 'click', + onShow: function () {}, + onBeforeShow: function(){}, + onHide: function () {}, + onChange: function () {}, + onSubmit: function () {}, + color: 'ff0000', + livePreview: true, + flat: false + }, + fillRGBFields = function (hsb, cal) { + var rgb = HSBToRGB(hsb); + $(cal).data('colorpicker').fields + .eq(1).val(rgb.r).end() + .eq(2).val(rgb.g).end() + .eq(3).val(rgb.b).end(); + }, + fillHSBFields = function (hsb, cal) { + $(cal).data('colorpicker').fields + .eq(4).val(hsb.h).end() + .eq(5).val(hsb.s).end() + .eq(6).val(hsb.b).end(); + }, + fillHexFields = function (hsb, cal) { + $(cal).data('colorpicker').fields + .eq(0).val(HSBToHex(hsb)).end(); + }, + setSelector = function (hsb, cal) { + $(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100})); + $(cal).data('colorpicker').selectorIndic.css({ + left: parseInt(150 * hsb.s/100, 10), + top: parseInt(150 * (100-hsb.b)/100, 10) + }); + }, + setHue = function (hsb, cal) { + $(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10)); + }, + setCurrentColor = function (hsb, cal) { + $(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb)); + }, + setNewColor = function (hsb, cal) { + $(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb)); + }, + keyDown = function (ev) { + var pressedKey = ev.charCode || ev.keyCode || -1; + if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) { + return false; + } + var cal = $(this).parent().parent(); + if (cal.data('colorpicker').livePreview === true) { + change.apply(this); + } + }, + change = function (ev) { + var cal = $(this).parent().parent(), col; + if (this.parentNode.className.indexOf('_hex') > 0) { + cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value)); + } else if (this.parentNode.className.indexOf('_hsb') > 0) { + cal.data('colorpicker').color = col = fixHSB({ + h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10), + s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10), + b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10) + }); + } else { + cal.data('colorpicker').color = col = RGBToHSB(fixRGB({ + r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10), + g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10), + b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10) + })); + } + if (ev) { + fillRGBFields(col, cal.get(0)); + fillHexFields(col, cal.get(0)); + fillHSBFields(col, cal.get(0)); + } + setSelector(col, cal.get(0)); + setHue(col, cal.get(0)); + setNewColor(col, cal.get(0)); + cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]); + }, + blur = function (ev) { + var cal = $(this).parent().parent(); + cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus') + }, + focus = function () { + charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65; + $(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus'); + $(this).parent().addClass('colorpicker_focus'); + }, + downIncrement = function (ev) { + var field = $(this).parent().find('input').focus(); + var current = { + el: $(this).parent().addClass('colorpicker_slider'), + max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255), + y: ev.pageY, + field: field, + val: parseInt(field.val(), 10), + preview: $(this).parent().parent().data('colorpicker').livePreview + }; + $(document).bind('mouseup', current, upIncrement); + $(document).bind('mousemove', current, moveIncrement); + }, + moveIncrement = function (ev) { + ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10)))); + if (ev.data.preview) { + change.apply(ev.data.field.get(0), [true]); + } + return false; + }, + upIncrement = function (ev) { + change.apply(ev.data.field.get(0), [true]); + ev.data.el.removeClass('colorpicker_slider').find('input').focus(); + $(document).unbind('mouseup', upIncrement); + $(document).unbind('mousemove', moveIncrement); + return false; + }, + downHue = function (ev) { + var current = { + cal: $(this).parent(), + y: $(this).offset().top + }; + current.preview = current.cal.data('colorpicker').livePreview; + $(document).bind('mouseup', current, upHue); + $(document).bind('mousemove', current, moveHue); + }, + moveHue = function (ev) { + change.apply( + ev.data.cal.data('colorpicker') + .fields + .eq(4) + .val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10)) + .get(0), + [ev.data.preview] + ); + return false; + }, + upHue = function (ev) { + fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); + fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); + $(document).unbind('mouseup', upHue); + $(document).unbind('mousemove', moveHue); + return false; + }, + downSelector = function (ev) { + var current = { + cal: $(this).parent(), + pos: $(this).offset() + }; + current.preview = current.cal.data('colorpicker').livePreview; + $(document).bind('mouseup', current, upSelector); + $(document).bind('mousemove', current, moveSelector); + }, + moveSelector = function (ev) { + change.apply( + ev.data.cal.data('colorpicker') + .fields + .eq(6) + .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10)) + .end() + .eq(5) + .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10)) + .get(0), + [ev.data.preview] + ); + return false; + }, + upSelector = function (ev) { + fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); + fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); + $(document).unbind('mouseup', upSelector); + $(document).unbind('mousemove', moveSelector); + return false; + }, + enterSubmit = function (ev) { + $(this).addClass('colorpicker_focus'); + }, + leaveSubmit = function (ev) { + $(this).removeClass('colorpicker_focus'); + }, + clickSubmit = function (ev) { + var cal = $(this).parent(); + var col = cal.data('colorpicker').color; + cal.data('colorpicker').origColor = col; + setCurrentColor(col, cal.get(0)); + cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col)); + }, + show = function (ev) { + var cal = $('#' + $(this).data('colorpickerId')); + cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]); + var pos = $(this).offset(); + var viewPort = getViewport(); + var top = pos.top + this.offsetHeight; + var left = pos.left; + if (top + 176 > viewPort.t + viewPort.h) { + top -= this.offsetHeight + 176; + } + if (left + 356 > viewPort.l + viewPort.w) { + left -= 356; + } + cal.css({left: left + 'px', top: top + 'px'}); + if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) { + cal.show(); + } + $(document).bind('mousedown', {cal: cal}, hide); + return false; + }, + hide = function (ev) { + if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) { + if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) { + ev.data.cal.hide(); + } + $(document).unbind('mousedown', hide); + } + }, + isChildOf = function(parentEl, el, container) { + if (parentEl == el) { + return true; + } + if (parentEl.contains) { + return parentEl.contains(el); + } + if ( parentEl.compareDocumentPosition ) { + return !!(parentEl.compareDocumentPosition(el) & 16); + } + var prEl = el.parentNode; + while(prEl && prEl != container) { + if (prEl == parentEl) + return true; + prEl = prEl.parentNode; + } + return false; + }, + getViewport = function () { + var m = document.compatMode == 'CSS1Compat'; + return { + l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft), + t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop), + w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth), + h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight) + }; + }, + fixHSB = function (hsb) { + return { + h: Math.min(360, Math.max(0, hsb.h)), + s: Math.min(100, Math.max(0, hsb.s)), + b: Math.min(100, Math.max(0, hsb.b)) + }; + }, + fixRGB = function (rgb) { + return { + r: Math.min(255, Math.max(0, rgb.r)), + g: Math.min(255, Math.max(0, rgb.g)), + b: Math.min(255, Math.max(0, rgb.b)) + }; + }, + fixHex = function (hex) { + var len = 6 - hex.length; + if (len > 0) { + var o = []; + for (var i=0; i -1) ? hex.substring(1) : hex), 16); + return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)}; + }, + HexToHSB = function (hex) { + return RGBToHSB(HexToRGB(hex)); + }, + RGBToHSB = function (rgb) { + var hsb = {}; + hsb.b = Math.max(Math.max(rgb.r,rgb.g),rgb.b); + hsb.s = (hsb.b <= 0) ? 0 : Math.round(100*(hsb.b - Math.min(Math.min(rgb.r,rgb.g),rgb.b))/hsb.b); + hsb.b = Math.round((hsb.b /255)*100); + if((rgb.r==rgb.g) && (rgb.g==rgb.b)) hsb.h = 0; + else if(rgb.r>=rgb.g && rgb.g>=rgb.b) hsb.h = 60*(rgb.g-rgb.b)/(rgb.r-rgb.b); + else if(rgb.g>=rgb.r && rgb.r>=rgb.b) hsb.h = 60 + 60*(rgb.g-rgb.r)/(rgb.g-rgb.b); + else if(rgb.g>=rgb.b && rgb.b>=rgb.r) hsb.h = 120 + 60*(rgb.b-rgb.r)/(rgb.g-rgb.r); + else if(rgb.b>=rgb.g && rgb.g>=rgb.r) hsb.h = 180 + 60*(rgb.b-rgb.g)/(rgb.b-rgb.r); + else if(rgb.b>=rgb.r && rgb.r>=rgb.g) hsb.h = 240 + 60*(rgb.r-rgb.g)/(rgb.b-rgb.g); + else if(rgb.r>=rgb.b && rgb.b>=rgb.g) hsb.h = 300 + 60*(rgb.r-rgb.b)/(rgb.r-rgb.g); + else hsb.h = 0; + hsb.h = Math.round(hsb.h); + return hsb; + }, + HSBToRGB = function (hsb) { + var rgb = {}; + var h = Math.round(hsb.h); + var s = Math.round(hsb.s*255/100); + var v = Math.round(hsb.b*255/100); + if(s == 0) { + rgb.r = rgb.g = rgb.b = v; + } else { + var t1 = v; + var t2 = (255-s)*v/255; + var t3 = (t1-t2)*(h%60)/60; + if(h==360) h = 0; + if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3} + else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3} + else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3} + else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3} + else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3} + else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3} + else {rgb.r=0; rgb.g=0; rgb.b=0} + } + return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)}; + }, + RGBToHex = function (rgb) { + var hex = [ + rgb.r.toString(16), + rgb.g.toString(16), + rgb.b.toString(16) + ]; + $.each(hex, function (nr, val) { + if (val.length == 1) { + hex[nr] = '0' + val; + } + }); + return hex.join(''); + }, + HSBToHex = function (hsb) { + return RGBToHex(HSBToRGB(hsb)); + }; + return { + init: function (options) { + options = $.extend({}, defaults, options||{}); + if (typeof options.color == 'string') { + options.color = HexToHSB(options.color); + } else if (options.color.r != undefined && options.color.g != undefined && options.color.b != undefined) { + options.color = RGBToHSB(options.color); + } else if (options.color.h != undefined && options.color.s != undefined && options.color.b != undefined) { + options.color = fixHSB(options.color); + } else { + return this; + } + options.origColor = options.color; + return this.each(function () { + if (!$(this).data('colorpickerId')) { + var id = 'collorpicker_' + parseInt(Math.random() * 1000); + $(this).data('colorpickerId', id); + var cal = $(tpl).attr('id', id); + if (options.flat) { + cal.appendTo(this).show(); + } else { + cal.appendTo(document.body); + } + options.fields = cal + .find('input') + .bind('keydown', keyDown) + .bind('change', change) + .bind('blur', blur) + .bind('focus', focus); + cal.find('span').bind('mousedown', downIncrement); + options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector); + options.selectorIndic = options.selector.find('div div'); + options.hue = cal.find('div.colorpicker_hue div'); + cal.find('div.colorpicker_hue').bind('mousedown', downHue); + options.newColor = cal.find('div.colorpicker_new_color'); + options.currentColor = cal.find('div.colorpicker_current_color'); + cal.data('colorpicker', options); + cal.find('div.colorpicker_submit') + .bind('mouseenter', enterSubmit) + .bind('mouseleave', leaveSubmit) + .bind('click', clickSubmit); + fillRGBFields(options.color, cal.get(0)); + fillHSBFields(options.color, cal.get(0)); + fillHexFields(options.color, cal.get(0)); + setHue(options.color, cal.get(0)); + setSelector(options.color, cal.get(0)); + setCurrentColor(options.color, cal.get(0)); + setNewColor(options.color, cal.get(0)); + if (options.flat) { + cal.css({ + position: 'relative', + display: 'block' + }); + } else { + $(this).bind(options.eventName, show); + } + } + }); + }, + showPicker: function() { + return this.each( function () { + if ($(this).data('colorpickerId')) { + show.apply(this); + } + }); + }, + hidePicker: function() { + return this.each( function () { + if ($(this).data('colorpickerId')) { + $('#' + $(this).data('colorpickerId')).hide(); + } + }); + }, + setColor: function(col) { + if (typeof col == 'string') { + col = HexToHSB(col); + } else if (col.r != undefined && col.g != undefined && col.b != undefined) { + col = RGBToHSB(col); + } else if (col.h != undefined && col.s != undefined && col.b != undefined) { + col = fixHSB(col); + } else { + return this; + } + return this.each(function(){ + if ($(this).data('colorpickerId')) { + var cal = $('#' + $(this).data('colorpickerId')); + cal.data('colorpicker').color = col; + cal.data('colorpicker').origColor = col; + fillRGBFields(col, cal.get(0)); + fillHSBFields(col, cal.get(0)); + fillHexFields(col, cal.get(0)); + setHue(col, cal.get(0)); + setSelector(col, cal.get(0)); + setCurrentColor(col, cal.get(0)); + setNewColor(col, cal.get(0)); + } + }); + } + }; + }(); + $.fn.extend({ + ColorPicker: ColorPicker.init, + ColorPickerHide: ColorPicker.hide, + ColorPickerShow: ColorPicker.show, + ColorPickerSetColor: ColorPicker.setColor + }); +})(jQuery) \ No newline at end of file diff --git a/colorpicker/js/eye.js b/colorpicker/js/eye.js new file mode 100644 index 00000000..ea70e643 --- /dev/null +++ b/colorpicker/js/eye.js @@ -0,0 +1,34 @@ +/** + * + * Zoomimage + * Author: Stefan Petre www.eyecon.ro + * + */ +(function($){ + var EYE = window.EYE = function() { + var _registered = { + init: [] + }; + return { + init: function() { + $.each(_registered.init, function(nr, fn){ + fn.call(); + }); + }, + extend: function(prop) { + for (var i in prop) { + if (prop[i] != undefined) { + this[i] = prop[i]; + } + } + }, + register: function(fn, type) { + if (!_registered[type]) { + _registered[type] = []; + } + _registered[type].push(fn); + } + }; + }(); + $(EYE.init); +})(jQuery); diff --git a/colorpicker/js/layout.js b/colorpicker/js/layout.js new file mode 100644 index 00000000..95358adc --- /dev/null +++ b/colorpicker/js/layout.js @@ -0,0 +1,66 @@ +(function($){ + var initLayout = function() { + var hash = window.location.hash.replace('#', ''); + var currentTab = $('ul.navigationTabs a') + .bind('click', showTab) + .filter('a[rel=' + hash + ']'); + if (currentTab.size() == 0) { + currentTab = $('ul.navigationTabs a:first'); + } + showTab.apply(currentTab.get(0)); + $('#colorpickerHolder').ColorPicker({flat: true}); + $('#colorpickerHolder2').ColorPicker({ + flat: true, + color: '#00ff00', + onSubmit: function(hsb, hex, rgb) { + $('#colorSelector2 div').css('backgroundColor', '#' + hex); + } + }); + $('#colorpickerHolder2>div').css('position', 'absolute'); + var widt = false; + $('#colorSelector2').bind('click', function() { + $('#colorpickerHolder2').stop().animate({height: widt ? 0 : 173}, 500); + widt = !widt; + }); + $('#colorpickerField1').ColorPicker({ + onSubmit: function(hsb, hex, rgb) { + $('#colorpickerField1').val(hex); + }, + onBeforeShow: function () { + $(this).ColorPickerSetColor(this.value); + } + }) + .bind('keyup', function(){ + $(this).ColorPickerSetColor(this.value); + }); + $('#colorSelector').ColorPicker({ + color: '#0000ff', + onShow: function (colpkr) { + $(colpkr).fadeIn(500); + return false; + }, + onHide: function (colpkr) { + $(colpkr).fadeOut(500); + return false; + }, + onChange: function (hsb, hex, rgb) { + $('#colorSelector div').css('backgroundColor', '#' + hex); + } + }); + }; + + var showTab = function(e) { + var tabIndex = $('ul.navigationTabs a') + .removeClass('active') + .index(this); + $(this) + .addClass('active') + .blur(); + $('div.tab') + .hide() + .eq(tabIndex) + .show(); + }; + + EYE.register(initLayout, 'init'); +})(jQuery) \ No newline at end of file diff --git a/colorpicker/js/sdjquery.js b/colorpicker/js/sdjquery.js new file mode 100644 index 00000000..e044f91e --- /dev/null +++ b/colorpicker/js/sdjquery.js @@ -0,0 +1,3549 @@ +(function(){ +/* + * jQuery 1.2.6 - New Wave Javascript + * + * Copyright (c) 2008 John Resig (jquery.com) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $ + * $Rev: 5685 $ + */ + +// Map over jQuery in case of overwrite +var _jQuery = window.jQuery, +// Map over the $ in case of overwrite + _$ = window.$; + +var jQuery = window.jQuery = window.$ = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context ); +}; + +// A simple way to check for HTML strings or ID strings +// (both of which we optimize for) +var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/, + +// Is it a simple selector + isSimple = /^.[^:#\[\.]*$/, + +// Will speed up references to undefined, and allows munging its name. + undefined; + +jQuery.fn = jQuery.prototype = { + init: function( selector, context ) { + // Make sure that a selection was provided + selector = selector || document; + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this[0] = selector; + this.length = 1; + return this; + } + // Handle HTML strings + if ( typeof selector == "string" ) { + // Are we dealing with HTML string or an ID? + var match = quickExpr.exec( selector ); + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) + selector = jQuery.clean( [ match[1] ], context ); + + // HANDLE: $("#id") + else { + var elem = document.getElementById( match[3] ); + + // Make sure an element was located + if ( elem ){ + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id != match[3] ) + return jQuery().find( selector ); + + // Otherwise, we inject the element directly into the jQuery object + return jQuery( elem ); + } + selector = []; + } + + // HANDLE: $(expr, [context]) + // (which is just equivalent to: $(content).find(expr) + } else + return jQuery( context ).find( selector ); + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) + return jQuery( document )[ jQuery.fn.ready ? "ready" : "load" ]( selector ); + + return this.setArray(jQuery.makeArray(selector)); + }, + + // The current version of jQuery being used + jquery: "1.2.6", + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + // The number of elements contained in the matched element set + length: 0, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == undefined ? + + // Return a 'clean' array + jQuery.makeArray( this ) : + + // Return just the object + this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + // Build a new jQuery matched element set + var ret = jQuery( elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + // Return the newly-formed element set + return ret; + }, + + // Force the current matched set of elements to become + // the specified array of elements (destroying the stack in the process) + // You should use pushStack() in order to do this, but maintain the stack + setArray: function( elems ) { + // Resetting the length to 0, then using the native Array push + // is a super-fast way to populate an object with array-like properties + this.length = 0; + Array.prototype.push.apply( this, elems ); + + return this; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + var ret = -1; + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem && elem.jquery ? elem[0] : elem + , this ); + }, + + attr: function( name, value, type ) { + var options = name; + + // Look for the case where we're accessing a style value + if ( name.constructor == String ) + if ( value === undefined ) + return this[0] && jQuery[ type || "attr" ]( this[0], name ); + + else { + options = {}; + options[ name ] = value; + } + + // Check to see if we're setting style values + return this.each(function(i){ + // Set all the styles + for ( name in options ) + jQuery.attr( + type ? + this.style : + this, + name, jQuery.prop( this, options[ name ], type, i, name ) + ); + }); + }, + + css: function( key, value ) { + // ignore negative width and height values + if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) + value = undefined; + return this.attr( key, value, "curCSS" ); + }, + + text: function( text ) { + if ( typeof text != "object" && text != null ) + return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); + + var ret = ""; + + jQuery.each( text || this, function(){ + jQuery.each( this.childNodes, function(){ + if ( this.nodeType != 8 ) + ret += this.nodeType != 1 ? + this.nodeValue : + jQuery.fn.text( [ this ] ); + }); + }); + + return ret; + }, + + wrapAll: function( html ) { + if ( this[0] ) + // The elements to wrap the target around + jQuery( html, this[0].ownerDocument ) + .clone() + .insertBefore( this[0] ) + .map(function(){ + var elem = this; + + while ( elem.firstChild ) + elem = elem.firstChild; + + return elem; + }) + .append(this); + + return this; + }, + + wrapInner: function( html ) { + return this.each(function(){ + jQuery( this ).contents().wrapAll( html ); + }); + }, + + wrap: function( html ) { + return this.each(function(){ + jQuery( this ).wrapAll( html ); + }); + }, + + append: function() { + return this.domManip(arguments, true, false, function(elem){ + if (this.nodeType == 1) + this.appendChild( elem ); + }); + }, + + prepend: function() { + return this.domManip(arguments, true, true, function(elem){ + if (this.nodeType == 1) + this.insertBefore( elem, this.firstChild ); + }); + }, + + before: function() { + return this.domManip(arguments, false, false, function(elem){ + this.parentNode.insertBefore( elem, this ); + }); + }, + + after: function() { + return this.domManip(arguments, false, true, function(elem){ + this.parentNode.insertBefore( elem, this.nextSibling ); + }); + }, + + end: function() { + return this.prevObject || jQuery( [] ); + }, + + find: function( selector ) { + var elems = jQuery.map(this, function(elem){ + return jQuery.find( selector, elem ); + }); + + return this.pushStack( /[^+>] [^+>]/.test( selector ) || selector.indexOf("..") > -1 ? + jQuery.unique( elems ) : + elems ); + }, + + clone: function( events ) { + // Do the clone + var ret = this.map(function(){ + if ( jQuery.browser.msie && !jQuery.isXMLDoc(this) ) { + // IE copies events bound via attachEvent when + // using cloneNode. Calling detachEvent on the + // clone will also remove the events from the orignal + // In order to get around this, we use innerHTML. + // Unfortunately, this means some modifications to + // attributes in IE that are actually only stored + // as properties will not be copied (such as the + // the name attribute on an input). + var clone = this.cloneNode(true), + container = document.createElement("div"); + container.appendChild(clone); + return jQuery.clean([container.innerHTML])[0]; + } else + return this.cloneNode(true); + }); + + // Need to set the expando to null on the cloned set if it exists + // removeData doesn't work here, IE removes it from the original as well + // this is primarily for IE but the data expando shouldn't be copied over in any browser + var clone = ret.find("*").andSelf().each(function(){ + if ( this[ expando ] != undefined ) + this[ expando ] = null; + }); + + // Copy the events from the original to the clone + if ( events === true ) + this.find("*").andSelf().each(function(i){ + if (this.nodeType == 3) + return; + var events = jQuery.data( this, "events" ); + + for ( var type in events ) + for ( var handler in events[ type ] ) + jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data ); + }); + + // Return the cloned set + return ret; + }, + + filter: function( selector ) { + return this.pushStack( + jQuery.isFunction( selector ) && + jQuery.grep(this, function(elem, i){ + return selector.call( elem, i ); + }) || + + jQuery.multiFilter( selector, this ) ); + }, + + not: function( selector ) { + if ( selector.constructor == String ) + // test special case where just one selector is passed in + if ( isSimple.test( selector ) ) + return this.pushStack( jQuery.multiFilter( selector, this, true ) ); + else + selector = jQuery.multiFilter( selector, this ); + + var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; + return this.filter(function() { + return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; + }); + }, + + add: function( selector ) { + return this.pushStack( jQuery.unique( jQuery.merge( + this.get(), + typeof selector == 'string' ? + jQuery( selector ) : + jQuery.makeArray( selector ) + ))); + }, + + is: function( selector ) { + return !!selector && jQuery.multiFilter( selector, this ).length > 0; + }, + + hasClass: function( selector ) { + return this.is( "." + selector ); + }, + + val: function( value ) { + if ( value == undefined ) { + + if ( this.length ) { + var elem = this[0]; + + // We need to handle select boxes special + if ( jQuery.nodeName( elem, "select" ) ) { + var index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type == "select-one"; + + // Nothing was selected + if ( index < 0 ) + return null; + + // Loop through all the selected options + for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { + var option = options[ i ]; + + if ( option.selected ) { + // Get the specifc value for the option + value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; + + // We don't need an array for one selects + if ( one ) + return value; + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + + // Everything else, we just grab the value + } else + return (this[0].value || "").replace(/\r/g, ""); + + } + + return undefined; + } + + if( value.constructor == Number ) + value += ''; + + return this.each(function(){ + if ( this.nodeType != 1 ) + return; + + if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) + this.checked = (jQuery.inArray(this.value, value) >= 0 || + jQuery.inArray(this.name, value) >= 0); + + else if ( jQuery.nodeName( this, "select" ) ) { + var values = jQuery.makeArray(value); + + jQuery( "option", this ).each(function(){ + this.selected = (jQuery.inArray( this.value, values ) >= 0 || + jQuery.inArray( this.text, values ) >= 0); + }); + + if ( !values.length ) + this.selectedIndex = -1; + + } else + this.value = value; + }); + }, + + html: function( value ) { + return value == undefined ? + (this[0] ? + this[0].innerHTML : + null) : + this.empty().append( value ); + }, + + replaceWith: function( value ) { + return this.after( value ).remove(); + }, + + eq: function( i ) { + return this.slice( i, i + 1 ); + }, + + slice: function() { + return this.pushStack( Array.prototype.slice.apply( this, arguments ) ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function(elem, i){ + return callback.call( elem, i, elem ); + })); + }, + + andSelf: function() { + return this.add( this.prevObject ); + }, + + data: function( key, value ){ + var parts = key.split("."); + parts[1] = parts[1] ? "." + parts[1] : ""; + + if ( value === undefined ) { + var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); + + if ( data === undefined && this.length ) + data = jQuery.data( this[0], key ); + + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + } else + return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){ + jQuery.data( this, key, value ); + }); + }, + + removeData: function( key ){ + return this.each(function(){ + jQuery.removeData( this, key ); + }); + }, + + domManip: function( args, table, reverse, callback ) { + var clone = this.length > 1, elems; + + return this.each(function(){ + if ( !elems ) { + elems = jQuery.clean( args, this.ownerDocument ); + + if ( reverse ) + elems.reverse(); + } + + var obj = this; + + if ( table && jQuery.nodeName( this, "table" ) && jQuery.nodeName( elems[0], "tr" ) ) + obj = this.getElementsByTagName("tbody")[0] || this.appendChild( this.ownerDocument.createElement("tbody") ); + + var scripts = jQuery( [] ); + + jQuery.each(elems, function(){ + var elem = clone ? + jQuery( this ).clone( true )[0] : + this; + + // execute all scripts after the elements have been injected + if ( jQuery.nodeName( elem, "script" ) ) + scripts = scripts.add( elem ); + else { + // Remove any inner scripts for later evaluation + if ( elem.nodeType == 1 ) + scripts = scripts.add( jQuery( "script", elem ).remove() ); + + // Inject the elements into the document + callback.call( obj, elem ); + } + }); + + scripts.each( evalScript ); + }); + } +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +function evalScript( i, elem ) { + if ( elem.src ) + jQuery.ajax({ + url: elem.src, + async: false, + dataType: "script" + }); + + else + jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); + + if ( elem.parentNode ) + elem.parentNode.removeChild( elem ); +} + +function now(){ + return +new Date; +} + +jQuery.extend = jQuery.fn.extend = function() { + // copy reference to target object + var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; + + // Handle a deep copy situation + if ( target.constructor == Boolean ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target != "object" && typeof target != "function" ) + target = {}; + + // extend jQuery itself if only one argument is passed + if ( length == i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) + // Extend the base object + for ( var name in options ) { + var src = target[ name ], copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) + continue; + + // Recurse if we're merging object values + if ( deep && copy && typeof copy == "object" && !copy.nodeType ) + target[ name ] = jQuery.extend( deep, + // Never move original objects, clone them + src || ( copy.length != null ? [ ] : { } ) + , copy ); + + // Don't bring in undefined values + else if ( copy !== undefined ) + target[ name ] = copy; + + } + + // Return the modified object + return target; +}; + +var expando = "jQuery" + now(), uuid = 0, windowData = {}, + // exclude the following css properties to add px + exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, + // cache defaultView + defaultView = document.defaultView || {}; + +jQuery.extend({ + noConflict: function( deep ) { + window.$ = _$; + + if ( deep ) + window.jQuery = _jQuery; + + return jQuery; + }, + + // See test/unit/core.js for details concerning this function. + isFunction: function( fn ) { + return !!fn && typeof fn != "string" && !fn.nodeName && + fn.constructor != Array && /^[\s[]?function/.test( fn + "" ); + }, + + // check if an element is in a (or is an) XML document + isXMLDoc: function( elem ) { + return elem.documentElement && !elem.body || + elem.tagName && elem.ownerDocument && !elem.ownerDocument.body; + }, + + // Evalulates a script in a global context + globalEval: function( data ) { + data = jQuery.trim( data ); + + if ( data ) { + // Inspired by code by Andrea Giammarchi + // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html + var head = document.getElementsByTagName("head")[0] || document.documentElement, + script = document.createElement("script"); + + script.type = "text/javascript"; + if ( jQuery.browser.msie ) + script.text = data; + else + script.appendChild( document.createTextNode( data ) ); + + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709). + head.insertBefore( script, head.firstChild ); + head.removeChild( script ); + } + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); + }, + + cache: {}, + + data: function( elem, name, data ) { + elem = elem == window ? + windowData : + elem; + + var id = elem[ expando ]; + + // Compute a unique ID for the element + if ( !id ) + id = elem[ expando ] = ++uuid; + + // Only generate the data cache if we're + // trying to access or manipulate it + if ( name && !jQuery.cache[ id ] ) + jQuery.cache[ id ] = {}; + + // Prevent overriding the named cache with undefined values + if ( data !== undefined ) + jQuery.cache[ id ][ name ] = data; + + // Return the named cache data, or the ID for the element + return name ? + jQuery.cache[ id ][ name ] : + id; + }, + + removeData: function( elem, name ) { + elem = elem == window ? + windowData : + elem; + + var id = elem[ expando ]; + + // If we want to remove a specific section of the element's data + if ( name ) { + if ( jQuery.cache[ id ] ) { + // Remove the section of cache data + delete jQuery.cache[ id ][ name ]; + + // If we've removed all the data, remove the element's cache + name = ""; + + for ( name in jQuery.cache[ id ] ) + break; + + if ( !name ) + jQuery.removeData( elem ); + } + + // Otherwise, we want to remove all of the element's data + } else { + // Clean up the element expando + try { + delete elem[ expando ]; + } catch(e){ + // IE has trouble directly removing the expando + // but it's ok with using removeAttribute + if ( elem.removeAttribute ) + elem.removeAttribute( expando ); + } + + // Completely remove the data cache + delete jQuery.cache[ id ]; + } + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, length = object.length; + + if ( args ) { + if ( length == undefined ) { + for ( name in object ) + if ( callback.apply( object[ name ], args ) === false ) + break; + } else + for ( ; i < length; ) + if ( callback.apply( object[ i++ ], args ) === false ) + break; + + // A special, fast, case for the most common use of each + } else { + if ( length == undefined ) { + for ( name in object ) + if ( callback.call( object[ name ], name, object[ name ] ) === false ) + break; + } else + for ( var value = object[0]; + i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} + } + + return object; + }, + + prop: function( elem, value, type, i, name ) { + // Handle executable functions + if ( jQuery.isFunction( value ) ) + value = value.call( elem, i ); + + // Handle passing in a number to a CSS property + return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ? + value + "px" : + value; + }, + + className: { + // internal only, use addClass("class") + add: function( elem, classNames ) { + jQuery.each((classNames || "").split(/\s+/), function(i, className){ + if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) + elem.className += (elem.className ? " " : "") + className; + }); + }, + + // internal only, use removeClass("class") + remove: function( elem, classNames ) { + if (elem.nodeType == 1) + elem.className = classNames != undefined ? + jQuery.grep(elem.className.split(/\s+/), function(className){ + return !jQuery.className.has( classNames, className ); + }).join(" ") : + ""; + }, + + // internal only, use hasClass("class") + has: function( elem, className ) { + return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; + } + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations + swap: function( elem, options, callback ) { + var old = {}; + // Remember the old values, and insert the new ones + for ( var name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + callback.call( elem ); + + // Revert the old values + for ( var name in options ) + elem.style[ name ] = old[ name ]; + }, + + css: function( elem, name, force ) { + if ( name == "width" || name == "height" ) { + var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; + + function getWH() { + val = name == "width" ? elem.offsetWidth : elem.offsetHeight; + var padding = 0, border = 0; + jQuery.each( which, function() { + padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; + border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; + }); + val -= Math.round(padding + border); + } + + if ( jQuery(elem).is(":visible") ) + getWH(); + else + jQuery.swap( elem, props, getWH ); + + return Math.max(0, val); + } + + return jQuery.curCSS( elem, name, force ); + }, + + curCSS: function( elem, name, force ) { + var ret, style = elem.style; + + // A helper method for determining if an element's values are broken + function color( elem ) { + if ( !jQuery.browser.safari ) + return false; + + // defaultView is cached + var ret = defaultView.getComputedStyle( elem, null ); + return !ret || ret.getPropertyValue("color") == ""; + } + + // We need to handle opacity special in IE + if ( name == "opacity" && jQuery.browser.msie ) { + ret = jQuery.attr( style, "opacity" ); + + return ret == "" ? + "1" : + ret; + } + // Opera sometimes will give the wrong display answer, this fixes it, see #2037 + if ( jQuery.browser.opera && name == "display" ) { + var save = style.outline; + style.outline = "0 solid black"; + style.outline = save; + } + + // Make sure we're using the right name for getting the float value + if ( name.match( /float/i ) ) + name = styleFloat; + + if ( !force && style && style[ name ] ) + ret = style[ name ]; + + else if ( defaultView.getComputedStyle ) { + + // Only "float" is needed here + if ( name.match( /float/i ) ) + name = "float"; + + name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); + + var computedStyle = defaultView.getComputedStyle( elem, null ); + + if ( computedStyle && !color( elem ) ) + ret = computedStyle.getPropertyValue( name ); + + // If the element isn't reporting its values properly in Safari + // then some display: none elements are involved + else { + var swap = [], stack = [], a = elem, i = 0; + + // Locate all of the parent display: none elements + for ( ; a && color(a); a = a.parentNode ) + stack.unshift(a); + + // Go through and make them visible, but in reverse + // (It would be better if we knew the exact display type that they had) + for ( ; i < stack.length; i++ ) + if ( color( stack[ i ] ) ) { + swap[ i ] = stack[ i ].style.display; + stack[ i ].style.display = "block"; + } + + // Since we flip the display style, we have to handle that + // one special, otherwise get the value + ret = name == "display" && swap[ stack.length - 1 ] != null ? + "none" : + ( computedStyle && computedStyle.getPropertyValue( name ) ) || ""; + + // Finally, revert the display styles back + for ( i = 0; i < swap.length; i++ ) + if ( swap[ i ] != null ) + stack[ i ].style.display = swap[ i ]; + } + + // We should always get a number back from opacity + if ( name == "opacity" && ret == "" ) + ret = "1"; + + } else if ( elem.currentStyle ) { + var camelCase = name.replace(/\-(\w)/g, function(all, letter){ + return letter.toUpperCase(); + }); + + ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { + // Remember the original values + var left = style.left, rsLeft = elem.runtimeStyle.left; + + // Put in the new values to get a computed value out + elem.runtimeStyle.left = elem.currentStyle.left; + style.left = ret || 0; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + elem.runtimeStyle.left = rsLeft; + } + } + + return ret; + }, + + clean: function( elems, context ) { + var ret = []; + context = context || document; + // !context.createElement fails in IE with an error but returns typeof 'object' + if (typeof context.createElement == 'undefined') + context = context.ownerDocument || context[0] && context[0].ownerDocument || document; + + jQuery.each(elems, function(i, elem){ + if ( !elem ) + return; + + if ( elem.constructor == Number ) + elem += ''; + + // Convert html string into DOM nodes + if ( typeof elem == "string" ) { + // Fix "XHTML"-style tags in all browsers + elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ + return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? + all : + front + ">"; + }); + + // Trim whitespace, otherwise indexOf won't work as expected + var tags = jQuery.trim( elem ).toLowerCase(), div = context.createElement("div"); + + var wrap = + // option or optgroup + !tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && + [ 1, "", "
" ] || + + !tags.indexOf("", "" ] || + + // matched above + (!tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + // IE can't serialize and + + + + + + + + + + + +
Draw Your SVG image here Control
+ +
+ + + +
+ +
+ + + +
+ + + + + + + + +
+ +Select Stroke Color + + +
+Stroke Width + +
+Select Fill Color +
+ + +
+
+ +