From e4e90cc1e479eda922baabec219ea6a0e27e78dd Mon Sep 17 00:00:00 2001
From: Gabriel Monnerat <gabriel@tiolive.com>
Date: Tue, 2 Nov 2010 18:53:59 +0000
Subject: [PATCH] 2010-11-02 gabriel * The initial commit

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39807 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_jquery/plugin/colorpicker.xml        | 26 ++++++++
 .../colorpicker/jquery.colorPicker.css.xml    | 66 +++++++++++++++++++
 .../colorpicker/jquery.colorPicker.min.js.xml | 48 ++++++++++++++
 .../bt/change_log                             |  2 +
 .../bt/copyright_list                         |  1 +
 .../bt/dependency_list                        |  1 +
 .../bt/description                            |  1 +
 bt5/erp5_jquery_plugin_colorpicker/bt/license |  1 +
 .../bt/maintainer_list                        |  1 +
 .../bt/revision                               |  1 +
 .../bt/template_format_version                |  1 +
 .../bt/template_path_list                     |  2 +
 bt5/erp5_jquery_plugin_colorpicker/bt/title   |  1 +
 bt5/erp5_jquery_plugin_colorpicker/bt/version |  1 +
 14 files changed, 153 insertions(+)
 create mode 100644 bt5/erp5_jquery_plugin_colorpicker/PathTemplateItem/portal_skins/erp5_jquery/plugin/colorpicker.xml
 create mode 100644 bt5/erp5_jquery_plugin_colorpicker/PathTemplateItem/portal_skins/erp5_jquery/plugin/colorpicker/jquery.colorPicker.css.xml
 create mode 100644 bt5/erp5_jquery_plugin_colorpicker/PathTemplateItem/portal_skins/erp5_jquery/plugin/colorpicker/jquery.colorPicker.min.js.xml
 create mode 100644 bt5/erp5_jquery_plugin_colorpicker/bt/change_log
 create mode 100644 bt5/erp5_jquery_plugin_colorpicker/bt/copyright_list
 create mode 100644 bt5/erp5_jquery_plugin_colorpicker/bt/dependency_list
 create mode 100644 bt5/erp5_jquery_plugin_colorpicker/bt/description
 create mode 100644 bt5/erp5_jquery_plugin_colorpicker/bt/license
 create mode 100644 bt5/erp5_jquery_plugin_colorpicker/bt/maintainer_list
 create mode 100644 bt5/erp5_jquery_plugin_colorpicker/bt/revision
 create mode 100644 bt5/erp5_jquery_plugin_colorpicker/bt/template_format_version
 create mode 100644 bt5/erp5_jquery_plugin_colorpicker/bt/template_path_list
 create mode 100644 bt5/erp5_jquery_plugin_colorpicker/bt/title
 create mode 100644 bt5/erp5_jquery_plugin_colorpicker/bt/version

diff --git a/bt5/erp5_jquery_plugin_colorpicker/PathTemplateItem/portal_skins/erp5_jquery/plugin/colorpicker.xml b/bt5/erp5_jquery_plugin_colorpicker/PathTemplateItem/portal_skins/erp5_jquery/plugin/colorpicker.xml
new file mode 100644
index 0000000000..9f294c31cd
--- /dev/null
+++ b/bt5/erp5_jquery_plugin_colorpicker/PathTemplateItem/portal_skins/erp5_jquery/plugin/colorpicker.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="Folder" module="OFS.Folder"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_objects</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>colorpicker</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_jquery_plugin_colorpicker/PathTemplateItem/portal_skins/erp5_jquery/plugin/colorpicker/jquery.colorPicker.css.xml b/bt5/erp5_jquery_plugin_colorpicker/PathTemplateItem/portal_skins/erp5_jquery/plugin/colorpicker/jquery.colorPicker.css.xml
new file mode 100644
index 0000000000..abb9d67430
--- /dev/null
+++ b/bt5/erp5_jquery_plugin_colorpicker/PathTemplateItem/portal_skins/erp5_jquery/plugin/colorpicker/jquery.colorPicker.css.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="DTMLMethod" module="OFS.DTMLMethod"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_Cacheable__manager_id</string> </key>
+            <value> <string>http_cache</string> </value>
+        </item>
+        <item>
+            <key> <string>__name__</string> </key>
+            <value> <string>jquery.colorPicker.css</string> </value>
+        </item>
+        <item>
+            <key> <string>_vars</string> </key>
+            <value>
+              <dictionary/>
+            </value>
+        </item>
+        <item>
+            <key> <string>globals</string> </key>
+            <value>
+              <dictionary/>
+            </value>
+        </item>
+        <item>
+            <key> <string>raw</string> </key>
+            <value> <string>div.color_picker {\n
+  height: 16px;\n
+  width: 16px;\n
+  padding: 0 !important;\n
+  border: 1px solid #ccc;\n
+  background: url(arrow.gif) no-repeat top right;\n
+  cursor: pointer;\n
+  line-height: 16px;\n
+}\n
+\n
+div#color_selector {\n
+  width: 110px;\n
+  position: absolute;\n
+  border: 1px solid #598FEF;\n
+  background-color: #EFEFEF;\n
+  padding: 2px;\n
+}\n
+  div#color_custom {width: 100%; float:left }\n
+  div#color_custom label {font-size: 95%; color: #2F2F2F; margin: 5px 2px; width: 25%}\n
+  div#color_custom input {margin: 5px 2px; padding: 0; font-size: 95%; border: 1px solid #000; width: 65%; }\n
+\n
+div.color_swatch {\n
+  height: 12px;\n
+  width: 12px;\n
+  border: 1px solid #000;\n
+  margin: 2px;\n
+  float: left;\n
+  cursor: pointer;\n
+  line-height: 12px;\n
+}\n
+</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_jquery_plugin_colorpicker/PathTemplateItem/portal_skins/erp5_jquery/plugin/colorpicker/jquery.colorPicker.min.js.xml b/bt5/erp5_jquery_plugin_colorpicker/PathTemplateItem/portal_skins/erp5_jquery/plugin/colorpicker/jquery.colorPicker.min.js.xml
new file mode 100644
index 0000000000..977b5bcfe3
--- /dev/null
+++ b/bt5/erp5_jquery_plugin_colorpicker/PathTemplateItem/portal_skins/erp5_jquery/plugin/colorpicker/jquery.colorPicker.min.js.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="File" module="OFS.Image"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_Cacheable__manager_id</string> </key>
+            <value> <string>http_cache</string> </value>
+        </item>
+        <item>
+            <key> <string>_EtagSupport__etag</string> </key>
+            <value> <string>ts79962420.93</string> </value>
+        </item>
+        <item>
+            <key> <string>__name__</string> </key>
+            <value> <string>jquery.colorPicker.min.js</string> </value>
+        </item>
+        <item>
+            <key> <string>content_type</string> </key>
+            <value> <string>application/x-javascript</string> </value>
+        </item>
+        <item>
+            <key> <string>data</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+(function(c){c.fn.colorPicker=function(){if(this.length>0){buildSelector()}return this.each(function(d){buildPicker(this)})};var a;var b=false;buildPicker=function(d){control=c("<div class=\'color_picker\'>&nbsp;</div>");control.css("background-color",c(d).val());control.bind("click",toggleSelector);c(d).after(control);c(d).hide()};buildSelector=function(){selector=c("<div id=\'color_selector\'></div>");c.each(c.fn.colorPicker.defaultColors,function(d){swatch=c("<div class=\'color_swatch\'>&nbsp;</div>");swatch.css("background-color","#"+this);swatch.bind("click",function(f){changeColor(c(this).css("background-color"))});swatch.bind("mouseover",function(f){c(this).css("border-color","#598FEF");c("input#color_value").val(toHex(c(this).css("background-color")))});swatch.bind("mouseout",function(f){c(this).css("border-color","#000");c("input#color_value").val(toHex(c(a).css("background-color")))});swatch.appendTo(selector)});hex_field=c("<label for=\'color_value\'>Hex</label><input type=\'text\' size=\'8\' id=\'color_value\'/>");hex_field.bind("keydown",function(d){if(d.keyCode==13){changeColor(c(this).val())}if(d.keyCode==27){toggleSelector()}});c("<div id=\'color_custom\'></div>").append(hex_field).appendTo(selector);c("body").append(selector);selector.hide()};checkMouse=function(e){var d="div#color_selector";var f=c(e.target).parents(d).length;if(e.target==c(d)[0]||e.target==a||f>0){return}hideSelector()};hideSelector=function(){var d=c("div#color_selector");c(document).unbind("mousedown",checkMouse);d.hide();b=false};showSelector=function(){var d=c("div#color_selector");d.css({top:c(a).offset().top+(c(a).outerHeight()),left:c(a).offset().left});hexColor=c(a).next("input").val();c("input#color_value").val(hexColor);d.show();c(document).bind("mousedown",checkMouse);b=true};toggleSelector=function(d){a=this;b?hideSelector():showSelector()};changeColor=function(d){if(selectedValue=toHex(d)){c(a).css("background-color",selectedValue);c(a).prev("input").val(selectedValue).change();hideSelector()}};toHex=function(e){if(e.match(/[0-9a-fA-F]{3}$/)||e.match(/[0-9a-fA-F]{6}$/)){e=(e.charAt(0)=="#")?e:("#"+e)}else{if(e.match(/^rgb\\(([0-9]|[1-9][0-9]|[1][0-9]{2}|[2][0-4][0-9]|[2][5][0-5]),[ ]{0,1}([0-9]|[1-9][0-9]|[1][0-9]{2}|[2][0-4][0-9]|[2][5][0-5]),[ ]{0,1}([0-9]|[1-9][0-9]|[1][0-9]{2}|[2][0-4][0-9]|[2][5][0-5])\\)$/)){var j=([parseInt(RegExp.$1),parseInt(RegExp.$2),parseInt(RegExp.$3)]);var i=function(l){if(l.length<2){for(var k=0,g=2-l.length;k<g;k++){l="0"+l}}return l};if(j.length==3){var h=i(j[0].toString(16)),f=i(j[1].toString(16)),d=i(j[2].toString(16));e="#"+h+f+d}}else{e=false}}return e};c.fn.colorPicker.addColors=function(d){c.fn.colorPicker.defaultColors=c.fn.colorPicker.defaultColors.concat(d)};c.fn.colorPicker.defaultColors=["000000","993300","333300","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","999999","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFFF","99CCFF","FFFFFF"]})(jQuery);
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>precondition</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>size</string> </key>
+            <value> <int>3097</int> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_jquery_plugin_colorpicker/bt/change_log b/bt5/erp5_jquery_plugin_colorpicker/bt/change_log
new file mode 100644
index 0000000000..6c7854e368
--- /dev/null
+++ b/bt5/erp5_jquery_plugin_colorpicker/bt/change_log
@@ -0,0 +1,2 @@
+2010-11-02 gabriel
+* The initial commit
\ No newline at end of file
diff --git a/bt5/erp5_jquery_plugin_colorpicker/bt/copyright_list b/bt5/erp5_jquery_plugin_colorpicker/bt/copyright_list
new file mode 100644
index 0000000000..47af9544bf
--- /dev/null
+++ b/bt5/erp5_jquery_plugin_colorpicker/bt/copyright_list
@@ -0,0 +1 @@
+2010 (c) Nexedi SA
\ No newline at end of file
diff --git a/bt5/erp5_jquery_plugin_colorpicker/bt/dependency_list b/bt5/erp5_jquery_plugin_colorpicker/bt/dependency_list
new file mode 100644
index 0000000000..a3d3a39331
--- /dev/null
+++ b/bt5/erp5_jquery_plugin_colorpicker/bt/dependency_list
@@ -0,0 +1 @@
+erp5_jquery
\ No newline at end of file
diff --git a/bt5/erp5_jquery_plugin_colorpicker/bt/description b/bt5/erp5_jquery_plugin_colorpicker/bt/description
new file mode 100644
index 0000000000..b83d64235d
--- /dev/null
+++ b/bt5/erp5_jquery_plugin_colorpicker/bt/description
@@ -0,0 +1 @@
+Easy to implement and simple jQuery component to select color in the same way you select color in GIMP.
\ No newline at end of file
diff --git a/bt5/erp5_jquery_plugin_colorpicker/bt/license b/bt5/erp5_jquery_plugin_colorpicker/bt/license
new file mode 100644
index 0000000000..3a3e12bcad
--- /dev/null
+++ b/bt5/erp5_jquery_plugin_colorpicker/bt/license
@@ -0,0 +1 @@
+GPL
\ No newline at end of file
diff --git a/bt5/erp5_jquery_plugin_colorpicker/bt/maintainer_list b/bt5/erp5_jquery_plugin_colorpicker/bt/maintainer_list
new file mode 100644
index 0000000000..38363f7303
--- /dev/null
+++ b/bt5/erp5_jquery_plugin_colorpicker/bt/maintainer_list
@@ -0,0 +1 @@
+gabriel
\ No newline at end of file
diff --git a/bt5/erp5_jquery_plugin_colorpicker/bt/revision b/bt5/erp5_jquery_plugin_colorpicker/bt/revision
new file mode 100644
index 0000000000..d8263ee986
--- /dev/null
+++ b/bt5/erp5_jquery_plugin_colorpicker/bt/revision
@@ -0,0 +1 @@
+2
\ No newline at end of file
diff --git a/bt5/erp5_jquery_plugin_colorpicker/bt/template_format_version b/bt5/erp5_jquery_plugin_colorpicker/bt/template_format_version
new file mode 100644
index 0000000000..56a6051ca2
--- /dev/null
+++ b/bt5/erp5_jquery_plugin_colorpicker/bt/template_format_version
@@ -0,0 +1 @@
+1
\ No newline at end of file
diff --git a/bt5/erp5_jquery_plugin_colorpicker/bt/template_path_list b/bt5/erp5_jquery_plugin_colorpicker/bt/template_path_list
new file mode 100644
index 0000000000..2f9b09eee4
--- /dev/null
+++ b/bt5/erp5_jquery_plugin_colorpicker/bt/template_path_list
@@ -0,0 +1,2 @@
+portal_skins/erp5_jquery/plugin/colorpicker
+portal_skins/erp5_jquery/plugin/colorpicker/**
\ No newline at end of file
diff --git a/bt5/erp5_jquery_plugin_colorpicker/bt/title b/bt5/erp5_jquery_plugin_colorpicker/bt/title
new file mode 100644
index 0000000000..472e96b5cc
--- /dev/null
+++ b/bt5/erp5_jquery_plugin_colorpicker/bt/title
@@ -0,0 +1 @@
+erp5_jquery_plugin_colorpicker
\ No newline at end of file
diff --git a/bt5/erp5_jquery_plugin_colorpicker/bt/version b/bt5/erp5_jquery_plugin_colorpicker/bt/version
new file mode 100644
index 0000000000..48360de846
--- /dev/null
+++ b/bt5/erp5_jquery_plugin_colorpicker/bt/version
@@ -0,0 +1 @@
+5.4.7
\ No newline at end of file
-- 
2.30.9