ztfy/utils/browser/templates/color_input.pt
branchZTK-1.1
changeset 149 738abc5935c9
parent 148 d3668ecd9137
child 150 3b6ce9aacac2
--- a/ztfy/utils/browser/templates/color_input.pt	Wed Jun 20 16:29:53 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-<div class="colorSelector"
-	 tal:attributes="id string:${view/id}_selector">
-	<input type="hidden"
-		   tal:attributes="id view/id;
-						   name view/name;
-						   lang view/lang;
-						   value view/value;" />
-	<div></div>
-	<script type="text/javascript" tal:content="string:
-		$$(document).ready(function() {
-			$$('DIV[id=${view/id}_selector] div').css('backgroundColor', '#${view/value}');
-			$$('DIV[id=${view/id}_selector]').ColorPicker({
-				color: '#${view/value}',
-				onShow: function (colpkr) {
-					$$(colpkr).fadeIn(500);
-					return false;
-				},
-				onHide: function (colpkr) {
-					$$(colpkr).fadeOut(500);
-					return false;
-				},
-				onChange: function (hsb, hex, rgb) {
-					$$('DIV[id=${view/id}_selector] div').css('backgroundColor', '#' + hex);
-					$$('INPUT[id=${view/id}]').val(hex);
-				},
-				onSubmit: function() {
-					$$('DIV[id=${view/id}_selector]').ColorPickerHide();
-				}
-			});
-		});
-	"></script>
-</div>
\ No newline at end of file