Etemplate - remove jPicker, now using browser's color picker for color widget

This commit is contained in:
nathangray 2019-07-18 16:16:43 -06:00
parent 58c53efd49
commit feedce26c3
21 changed files with 3 additions and 3454 deletions

View File

@ -124,7 +124,6 @@ module.exports = function (grunt) {
"api/js/etemplate/et2_widget_button.js", "api/js/etemplate/et2_widget_button.js",
"api/js/etemplate/et2_core_valueWidget.js", "api/js/etemplate/et2_core_valueWidget.js",
"api/js/etemplate/et2_core_inputWidget.js", "api/js/etemplate/et2_core_inputWidget.js",
"api/js/jquery/jpicker/jpicker-1.1.6.js",
"api/js/etemplate/et2_widget_color.js", "api/js/etemplate/et2_widget_color.js",
"api/js/jquery/blueimp/js/blueimp-gallery.min.js", "api/js/jquery/blueimp/js/blueimp-gallery.min.js",
"api/js/etemplate/expose.js", "api/js/etemplate/expose.js",

View File

@ -14,7 +14,6 @@
/vendor/bower-asset/jquery/dist/jquery.js; /vendor/bower-asset/jquery/dist/jquery.js;
et2_core_inputWidget; et2_core_inputWidget;
et2_core_valueWidget; et2_core_valueWidget;
/api/js/jquery/jpicker/jpicker-1.1.6.js;
*/ */
/** /**
@ -25,27 +24,6 @@
var et2_color = (function(){ "use strict"; return et2_inputWidget.extend( var et2_color = (function(){ "use strict"; return et2_inputWidget.extend(
{ {
attributes: { attributes: {
"alphaSupport": {
"name": "Transparancy",
"type": "boolean",
"default": false,
"description": "Allow selection of alpha channel as well as color"
}
},
// Settings for jPicker - internal
defaults: {
"window": {
expandable: true,
effects: {"type":"none"},
position: { "x": "screenCenter", "y": "screenCenter"}
},
"images": {
clientPath: egw_webserverUrl + "/api/js/jquery/jpicker/images/"
},
"color": {
"active": new jQuery.jPicker.Color()
}
}, },
/** /**
@ -58,167 +36,18 @@ var et2_color = (function(){ "use strict"; return et2_inputWidget.extend(
// included via etemplate2.css // included via etemplate2.css
//this.egw().includeCSS("phpgwapi/js/jquery/jpicker/css/jPicker-1.1.6.min.css"); //this.egw().includeCSS("phpgwapi/js/jquery/jpicker/css/jPicker-1.1.6.min.css");
this.input = this.$node = jQuery(document.createElement("span")); this.input = this.$node = jQuery("<input type='color' class='et2_color'/>");
// Translations
for(var key in jQuery.fn.jPicker.defaults.localization.text)
{
if(jQuery.fn.jPicker.defaults.localization.text[key])
{
jQuery.fn.jPicker.defaults.localization.text[key] = this.egw().lang(jQuery.fn.jPicker.defaults.localization.text[key]);
}
}
for(var key in jQuery.fn.jPicker.defaults.localization.tooltips)
{
if(jQuery.fn.jPicker.defaults.localization.tooltips[key].ok)
{
jQuery.fn.jPicker.defaults.localization.tooltips[key].ok = this.egw().lang(jQuery.fn.jPicker.defaults.localization.tooltips[key].ok);
}
if(jQuery.fn.jPicker.defaults.localization.tooltips[key].cancel)
{
jQuery.fn.jPicker.defaults.localization.tooltips[key].cancel = this.egw().lang(jQuery.fn.jPicker.defaults.localization.tooltips[key].cancel);
}
}
this.options = jQuery.extend({}, this.defaults, this.options);
this.setDOMNode(this.$node[0]); this.setDOMNode(this.$node[0]);
}, },
/**
* Clean up and remove references to jPicker
*/
destroy: function() {
if(this.get_jPicker())
{
this.get_jPicker().destroy();
jQuery("table.jPicker").dialog("destroy");
jQuery("table.jPicker").remove();
this.$node.next("span").remove();
}
this._super.call(this, arguments);
},
doLoadingFinished: function()
{
// as tabs can cause a double loading, we check here if jPicker is already initialised
if (this.get_jPicker()) return;
this._super.apply(this, arguments);
var self = this;
// Initialize jPicker
this.options.color.active = new jQuery.jPicker.Color(this.value ? {hex:this.value} : {});
// Do this to get a reference to the actual jPicker used, so we can fully remove it in destroy()
var list_id = jQuery.jPicker.List.length ? jQuery.jPicker.List.length : 0;
var val = this.$node.jPicker(this.options,
// Ok
function(value) {
self.set_value(value);
jQuery("table.jPicker").dialog("close");
},
// Color change
null,
// Cancel
function(color) {
jQuery("table.jPicker").dialog("close");
}
);
jQuery.jPicker.List[list_id].id = this.id + "_jPicker";
// jPicker doesn't allow translation of this one
jQuery('.Image', this.$node.parent()).attr('title', this.egw().lang('Click to open colorpicker'));
// Make it look better - plugin defers initialization, so we have to also
setTimeout(function() {
//Regex to exclude invalid charachters from class identifier name, to be able to address the class name with jquery selector later.
var regExClassName = /[\[\]']+/g;
// Make the buttons look like all the others
jQuery("div.jPicker :button").addClass("et2_button et2_button_text");
// Turn it into a full dialog
jQuery("table.jPicker").dialog({
title: self.options.statustext ? self.options.statustext : self.egw().lang('Select color'),
autoOpen: false,
resizable: false,
width: "auto"
});
jQuery('table.jPicker').each(function(){
if (!this.getAttribute('class').match(/jPickerColorIden/))
{
//Add an identifier to dialog for later on to bind a click handler to it
//as jquery dialog has already an unique id, we make a unique class identifier with help of the widget id
jQuery(this).addClass('jPickerColorIden-'+self.id.replace(regExClassName, '_'));
return false;
}
});
// Hide original move bar
jQuery('table.jPicker .Move').hide();
// Trigger dialog opening
jQuery('.Image',self.$node.next()).click(function() {
jQuery("table.jPickerColorIden-"+self.id.replace(regExClassName, '_')).dialog("open");
});
},500);
return true;
},
/**
* Get the jPicker object for this widget, so further things can be done to it
*
* Id of jPicker node is either our id+'_jPicker' or our dom_id (no idea why).
*/
get_jPicker: function() {
for(var i=0; i < jQuery.jPicker.List.length; ++i)
{
var node = jQuery.jPicker.List[i];
if (node && (node.id == this.id+'_jPicker' || node.id == this.dom_id))
{
return node;
}
}
return null;
},
getValue: function() { getValue: function() {
return this.value; return this.$node.val();
}, },
set_value: function(color) { set_value: function(color) {
if(typeof color == "string") {
this.value = color;
}
else if (typeof color == "object" && color.val)
{
// Prefix # to match previous picker values
var hex = color.val('hex');
// Hex might be null
if(hex)
{
hex = '#'+hex;
}
else if(this.value != hex)
{
// Color was cleared
hex = '';
}
this.value = hex;
}
// Update picker this.$node.val(color);
if(jQuery.jPicker.List.length)
{
var self = this;
var picker = this.get_jPicker();
if(picker)
{
picker.color.active = new jQuery.jPicker.Color(self.options.value);
}
}
} }
});}).call(this); });}).call(this);
et2_register_widget(et2_color, ["colorpicker"]); et2_register_widget(et2_color, ["colorpicker"]);

View File

@ -1,121 +0,0 @@
Change Log
______________
1.1.6
Corrected bug preventing selections inside input values in some browsers - the onselectstart function no longer captures on input boxes.
Added support for up/down arrow adjustments of the currently focused input box making the picker more keyboard friendly.
Added ticks around the backgroundImage assignments to correct for paths with whitespace.
1.1.5
Corrected Color object constructor to allow setting of the "alpha" value as per the documentation which previously didn't work.
Added support for translucency for quickList colors with checkered background - Only available if "alphaSupport" is enabled.
Restricted default color to "alpha" of 255 if "alphaSupport" is disabled - It will now assign an explicit alpha of 255 when disabled.
Added new setting variable "alphaPrecision" which indicates the number of decimal points to allow in the alpha percentage display - Now defaults to 0.
1.1.4
Changed "alpha" range from 0-100 to 0-255 to correct truncating and rounding errors caused by attempting to get an integer percentage that matches a hex value.
"alpha" percentage display will now show up to 1 decimal point for more accurate representation of "alpha" value.
Color object now accepts "alpha" values in a range of 0-255 and also returns the same when getting the "alpha" value. You will need to run ((alpha * 100) / 255) to retrieve a percentage value.
Reworked the table layout and labels to remove the need for the label to reference the radio input box. This reduces injected code and removes the need to generate unique ids on the radio buttons.
Transparent/invisible caret on NULL color is now corrected - uses the same caret color as a white color.
Setting a binded input value of "" or no value attribute will now create a NULL color on initialization instead of the settings default color.
Added a dynamic, invisible "iframe" behind a dialog picker in all browsers that fail jQuery.support.boxModel (currently IE <= 7 Quirks Mode). This prevents "select" box from showing through the picker.
1.1.3
Now adding popup color pickers to document.body instead of inline with the popup control. This corrects issues with the picker not showing beyond a relative container scope.
No longer need to hide popup icon in Internet Explorer for picker elements lower in the DOM than the currently active one since the picker itself is attached to document.body (it is always higher in the DOM now).
Popup pickers are now bring-to-front selectable. Clicking on the picker will bring it above all other pickers on the page instead of having to drag one out from underneath another.
Corrected jPicker.List/setTimeout bug which allowed an instance to bind to the List in an order other than the order the initialization function was called.
Added a updateInputColor option (default true) to allow for a binded input field that does not automatically update its background/text color.
1.1.2
Reworked the find methods and contexts for element searches. Now using ":first" instead of ".eq(0)" to take advantage of early out searches. Much faster initialization of the picker, on the order of 6 times.
Now using setTimeout for calling visual updates. Dramatically improved marker dragging in all browsers. Reduces blocking as re-rendering is internal to the browser and independent of the other javascript still in progress.
Marker updates can now cancel a previous valueChanged event when a new mouseMove event comes in. IE8 marker dragging is still slower, much over 5 times faster than it was.
Reworked entire quickPick list creation. It now adds up source code and does a single "html" method instead of multiple "append" methods. This is a large part of the speed increase on initialization.
The vast majority of all running scripts on both initialization and dragging is now occupied altering the style rules and finding elements (init only) instead of jPicker code.
All methods previously called with global context now use the "call" method for using the context of the class running the method. "this" in a callback is now the DOM node (jQuery style) and jPicker instead of "window".
Added "effects" section of window settings to allow different show/hide effects and durations.
Removed change log and read me from the full source code to separate files (ChangeLog.txt and ReadMe.txt) and an HTML demonstration/documentation page (Example.txt).
1.1.1
Correct IE exception caused by attempting to set "#transparent" to CSS background-color.
1.1.0
Reworked nearly the entire plugin including the internal and external event model, bindings, DOM searches, classes, and overall presentation.
The Color object now supports a changed event that you can bind to (or just bind to the picker events still included).
Event order has been reversed, instead of a change event on the map/bar/text fields updating the display, they now update the Color object which then fires the events that update the display.
alphaSupport re-implemented by request - default behavior is off.
Hex code now only 6 characters again.
Color object can now have its value changed from code, using the "val" method, and it will fire all events necessary to update the display.
Removed all "get_*" methods from the color object, instead opting for a single "val" method for getting and setting, more in line with familiar jQuery methods.
Better rendering for all IE versions in Quirks mode.
1.0.13
Updated transparency algorithm for red/green/blue color modes. The algorithm from John Dyers' color picker was close but incorrect. Bar colors are now pixel perfect with the new algorithm.
Changed from using "background-position" on the color maps to an element of full height using the "top" attribute for image-map location using "overflow: hidden" to hide overdraw.
IE7/8 ignores opacity on elements taller than 4096px. Image maps therefore no longer include a blank first map so the Bar is just under 4096. Blank is now accomplished by setting the "top" setting to below the map display.
New colorBar picker image that does not draw outside of the element since the elements now hide overdraw.
Added IE5.5/6 support for the picker. This is why it now uses maps of full height and the "top" attribute for map locations.
Moved the images in the maps to 4 pixels apart from each other. IE7/8 change the first pixel of the bottom-border of 2px to partially transparent showing a portion of a different color map without this.
1.0.12
Added minified CSS file.
Added IE7/8 Quirks Mode support.
Added configurable string constants for all text and tooltips. You can now change the default values for different languages.
Privatized the RGBA values in the Color object for better NULL handling. YOU MUST USE THE NEW GET FUNCTIONS TO ACCESS THE COLOR PROPERTIES.
Better NULL color handling and an additional "No Color Selected" quick pick color.
More consistent behavior across multiple versions of browsers.
Added alpha response to the binded color picker icon.
Removed "alphaSupport" variable. It is now always supported.
1.0.11b
Corrected NULL behavior in IE. jQuery was getting an exception when attempting to assign a backgroundColor style of '#'. Now assigns 'transparent' if color is NULL.
Can now create new Color object WITH OR WITHOUT the '#' prefix.
1.0.11
Added ability for NULL colors (delete the hex value). Color will be returned as color.hex == ''. Can set the default color to an empty hex string as well.
cancelCallback now returns the original color for use in programming responses.
1.0.10
Corrected table layout and tweaked display for more consisent presentation. Nice catch from Jonathan Pasquier.
1.0.9
Added optional title variable for each jPicker window.
1.0.8
Moved all images into a few sprites - now using backgroundPosition to change color maps and bars instead of changing the image - this should be faster to download and run.
1.0.7
RENAMED CSS FILE TO INCLUDE VERSION NUMBER!!! YOU MUST USE THIS VERSIONED CSS FILE!!! There will be no need to do your own CSS version number increments from now on.
Added opacity feedback to color preview boxes.
Removed reliance on "id" value of containing object. Subobjects are now found by class and container instead of id's. This drastically reduces injected code.
Removed (jQuery).jPicker.getListElementById(id) function since "id" is no longer incorporated or required.
1.0.6
Corrected picker bugs introduced with 1.0.5.
Removed alpha slider bar until activated - default behavior for alpha is now OFF.
Corrected Color constructor bug not allowing values of 0 for initial value (it was evaluating false and missing the init code - Thanks Pavol).
Removed title tags (tooltips) from color maps and bars - They get in the way in some browsers (e.g. IE - dragging marker does NOT prevent or hide the tooltip).
THERE WERE CSS FILE CHANGES WITH THIS UPDATE!!! IF YOU USE NEVER-EXPIRE HEADERS, YOU WILL NEED TO INCREMENT YOUR CSS FILE VERSION NUMBER!!!
1.0.5
Added opacity support to picker and color/callback methods. New property "a" (alpha - range from 0-100) in all color objects now - defaults to 100% opaque. (Thank you Pavol)
Added title attributes to input elements - gives short tooltip directions on what button or field does.
Commit callback used to fire on control initialization (twice actually) - This has been corrected, it does not fire on initialization.
THERE WERE CSS FILE CHANGES WITH THIS UPDATE!!! IF YOU USE NEVER-EXPIRE HEADERS, YOU WILL NEED TO INCREMENT YOUR CSS FILE VERSION NUMBER!!!
1.0.4
Added ability for smaller picker icon with expandable window on any DOM element (not just input).
"draggable" property renamed to "expandable" and its scope increased to create small picker icon or large static picker.
1.0.3
Added cancelCallback function for registering an external function when user clicks cancel button. (Thank you Jeff and Pavol)
1.0.2
Random bug fixes - speed concerns.
1.0.1
Corrected closure based memeory leak - there may be others?
1.0.0
First Release.

View File

@ -1,774 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Digital Magic Productions - jPicker - A jQuery Color Picker Plugin</title>
<link rel="Stylesheet" type="text/css" href="css/jpicker-1.1.6.min.css" />
<link rel="Stylesheet" type="text/css" href="jPicker.css" />
<script src="jquery-1.4.4.min.js" type="text/javascript"></script>
<script src="jpicker-1.1.6.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function()
{
$.fn.jPicker.defaults.images.clientPath='images/';
var LiveCallbackElement = $('#Live'),
LiveCallbackButton = $('#LiveButton');
$('#Inline').jPicker({window:{title:'Inline Example'}});
$('#Expandable').jPicker({window:{expandable:true,title:'Expandable Example'}});
$('#Alpha').jPicker({window:{expandable:true,title:'Alpha (Transparency) Example)',alphaSupport:true},color:{active:new $.jPicker.Color({ahex:'99330099'})}});
$('#Binded').jPicker({window:{title:'Binded Example'},color:{active:new $.jPicker.Color({ahex:'993300ff'})}});
$('.Multiple').jPicker({window:{title:'Multiple Binded Example'}});
$('#Callbacks').jPicker(
{window:{title:'Callback Example'}},
function(color, context)
{
var all = color.val('all');
alert('Color chosen - hex: ' + (all && '#' + all.hex || 'none') + ' - alpha: ' + (all && all.a + '%' || 'none'));
$('#Commit').css({ backgroundColor: all && '#' + all.hex || 'transparent' });
},
function(color, context)
{
if (context == LiveCallbackButton.get(0)) alert('Color set from button');
var hex = color.val('hex');
LiveCallbackElement.css({ backgroundColor: hex && '#' + hex || 'transparent' });
},
function(color, context)
{
alert('"Cancel" Button Clicked');
});
$('#LiveButton').click(
function()
{
$.jPicker.List[7].color.active.val('hex', 'e2ddcf', this);
});
$('#AlterColors').jPicker({window:{title:'Color Interaction Example'}});
$('#GetActiveColor').click(
function()
{
alert($.jPicker.List[8].color.active.val('ahex'));
});
$('#GetRG').click(
function()
{
var rg=$.jPicker.List[8].color.active.val('rg');
alert('red: ' + rg.r + ', green: ' + rg.g);
});
$('#SetHue').click(
function()
{
$.jPicker.List[8].color.active.val('h', 133);
});
$('#SetValue').click(
function()
{
$.jPicker.List[8].color.active.val('v', 38);
});
$('#SetRG').click(
function()
{
$.jPicker.List[8].color.active.val('rg', { r: 213, g: 118 });
});
});
</script>
</head>
<body>
<div id="jPicker">
<h2>jPicker - A jQuery Color Picker Plugin.</h2>
<p>
jPicker is a fast, lightweight jQuery plugin for including an advanced color picker in your web projects. It has been painstakenly ported from John Dyers' awesome work on his picker using the Prototype framework.<br /><br />
jPicker supports all current browsers and has been extensively tested in Chrome, Firefox, IE5.5+, Safari, and Opera.<br /><br />
If you are updating a current version, you MUST always use the CSS and image files from the download as there may have been changes.<br /><br />
If you are moving from a V1.0.* version, you MUST read the docs below to implement some changes to the Color object returned by the callback functions.<br /><br />
<a href="http://johndyer.name/post/2007/09/PhotoShop-like-JavaScript-Color-Picker.aspx" class="newWindow">View John Dyer's prototype plugin here.</a><br /><br />
View jPicker details a docs below.<br /><br />
<a href="http://code.google.com/p/jpicker/" class="newWindow">Check out the source from Google Code.</a>
</p><hr /><br />
<h2>jPicker Inline Example</h2>
<p>
jPicker can be used inline by binding to any block level element.<br /><br />
<code>jPicker() -- no arguments</code>
<pre>
&lt;script type="text/javascript"&gt;
$(document).ready(
function()
{
$('#Inline').jPicker();
});
&lt;/script&gt;
&lt;div id="Inline"&gt;&lt;/div&gt;</pre>
<div id="Inline"></div>
</p><hr /><br />
<h2>jPicker Expandable Example</h2>
<p>
jPicker can also display only a small picker icon that opens a popup for editing.<br /><br />
<code>jPicker({ window: { expandable: true }})</code>
<pre>
&lt;script type="text/javascript"&gt;
$(document).ready(
function()
{
$('#Expandable').jPicker(
{
window:
{
expandable: true
}
});
});
&lt;/script&gt;
&lt;span id="Expandable"&gt;&lt;/span&gt;</pre>
<span id="Expandable"></span>
</p><hr /><br />
<h2>jPicker Alpha Channel Example</h2>
<p>
jPicker can also pick colors with alpha (transparency) values.<br /><br />
<code>jPicker({ window: { expandable: true }})</code>
<pre>
&lt;script type="text/javascript"&gt;
$(document).ready(
function()
{
$('#Alpha').jPicker(
{
window:
{
expandable: true
},
color:
{
alphaSupport: true,
active: new $.jPicker.Color({ ahex: '99330099' })
}
});
});
&lt;/script&gt;
&lt;span id="Alpha"&gt;&lt;/span&gt;</pre>
<span id="Alpha"></span>
</p><hr /><br />
<h2>jPicker Binded Example</h2>
<p>
jPicker can also be binded to an input element.<br /><br />
<code>jPicker() -- no arguments</code>
<pre>
&lt;script type="text/javascript"&gt;
$(document).ready(
function()
{
$('#Binded').jPicker();
});
&lt;/script&gt;
&lt;input id="Binded" type="text" value="e2ddcf" /&gt;</pre>
<input id="Binded" type="text" value="e2ddcf" />
</p><hr /><br />
<h2>Multiple jPicker Binded Example</h2>
<p>
jPicker can also be binded to multiple elements at a time.<br /><br />
<code>jPicker() -- no arguments</code>
<pre>
&lt;script type="text/javascript"&gt;
$(document).ready(
function()
{
$('.Multiple').jPicker();
});
&lt;/script&gt;
&lt;input class="Multiple" type="text" value="e2ddcf" /&gt;&lt;br /&gt;
&lt;input class="Multiple" type="text" value="" /&gt;&lt;br /&gt;
&lt;input class="Multiple" type="text" value="fda0f7" /&gt;</pre>
<input class="Multiple" type="text" value="e2ddcf" /><br />
<input class="Multiple" type="text" value="" /><br />
<input class="Multiple" type="text" value="fda0f7" /><br />
</p><hr /><br />
<h2>jPicker Callback Functions</h2>
<p>
Register for callback function to have it interact with your page.<br /><br />
<code>jPicker([settings, [commitCallback, [liveCallback, [cancelCallback]]]])</code>
<pre>
&lt;script type="text/javascript"&gt;
$(document).ready(
function()
{
var LiveCallbackElement = $('#Live'),
LiveCallbackButton = $('#LiveButton'); // you don't want it searching this
// on every live callback!!!
$('#Callbacks').jPicker(
{},
function(color, context)
{
var all = color.val('all');
alert('Color chosen - hex: ' + (all && '#' + all.hex || 'none') +
' - alpha: ' + (all && all.a + '%' || 'none'));
$('#Commit').css(
{
backgroundColor: all && '#' + all.hex || 'transparent'
}); // prevent IE from throwing exception if hex is empty
},
function(color, context)
{
if (context == LiveCallbackButton.get(0)) alert('Color set from button');
var hex = color.val('hex');
LiveCallbackElement.css(
{
backgroundColor: hex && '#' + hex || 'transparent'
}); // prevent IE from throwing exception if hex is empty
},
function(color, context)
{
alert('"Cancel" Button Clicked');
});
$('#LiveButton').click(
function()
{
$.jPicker.List[0].color.active.val('hex', 'e2ddcf', this);
});
});
&lt;/script&gt;
&lt;input id="Callbacks" type="text" value="e2ddcf" /&gt;
&lt;span id="Commit" style="background-color: #e2ddcf; display: block; --
float: left; height: 50px; margin: 10px; width: 50px;"&gt; --
Commit&lt;/span&gt;
&lt;span id="Live" style="display: block; float: left; height: 50px; --
margin: 10px; width: 50px;"&gt;Live&lt;/span&gt;
&lt;input id="LiveButton" type="button" value="Set To #e2ddcf" /&gt;</pre>
<input id="Callbacks" type="text" value="e2ddcf" /><br />
<span id="Commit" style="background-color: #e2ddcf; display: block; float: left; height: 50px; margin: 10px; width: 50px;">Commit</span>
<span id="Live" style="display: block; float: left; height: 50px; margin: 10px; width: 50px;">Live</span>
<input id="LiveButton" type="button" value="Set To #e2ddcf" />
</p><hr /><br />
<h2>jPicker Settings And Colors</h2>
<p>
Use the "val" method on the active color for interaction with the picker.<br /><br />
<code>(jQuery).jPicker.List[index]</code>
<pre>
&lt;script type="text/javascript"&gt;
$(document).ready(
function()
{
$('#AlterColors').jPicker();
$('#GetActiveColor').click(
function()
{
alert($.jPicker.List[0].color.active.val('ahex'));
});
$('#GetRG').click(
function()
{
var rg=$.jPicker.List[0].color.active.val('rg');
alert('red: ' + rg.r + ', green: ' + rg.g);
});
$('#SetHue').click(
function()
{
$.jPicker.List[0].color.active.val('h', 133);
});
$('#SetValue').click(
function()
{
$.jPicker.List[0].color.active.val('v', 38);
});
$('#SetRG').click(
function()
{
$.jPicker.List[0].color.active.val('rg', { r: 213, g: 118 });
});
});
&lt;/script&gt;
&lt;input id="AlterColors" type="text" value="e2ddcf" /&gt;&lt;br /&gt;
&lt;input id="GetActiveColor" type="button" value="Get Active Color" /&gt;&lt;br /&gt;
&lt;input id="GetRG" type="button" value="Get Red/Green Value" /&gt;&lt;br /&gt;
&lt;input id="SetHue" type="button" value="Set Hue To 133" /&gt;&lt;br /&gt;
&lt;input id="SetValue" type="button" value="Set Value To 38" /&gt;&lt;br /&gt;
&lt;input id="SetRG" type="button" value="Set Red/Green To 213, 118" /&gt;</pre>
<input id="AlterColors" type="text" value="e2ddcf" /><br />
<input id="GetActiveColor" type="button" value="Get Active Color" /><br />
<input id="GetRG" type="button" value="Get Red/Green Value" /><br />
<input id="SetHue" type="button" value="Set Hue To 133" /><br />
<input id="SetValue" type="button" value="Set Value To 38" /><br />
<input id="SetRG" type="button" value="Set Red/Green To 213, 118" />
</p><hr /><br />
<h2>jPicker Core</h2>
<p>
jPicker Core function - returns the jQuery object.<br /><br />
<code>jPicker([settings, [commitCallback, [liveCallback, [cancelCallback]]]])</code>
</p><hr /><br />
<h2>Settings</h2>
<p>
settings [object]: (with defaults)<br />
<pre>
{
window: // used to define the position of the popup window
// only useful in binded mode
{
title: null, // any title for the jPicker window itself - displays
// "Drag Markers To Pick A Color" if left null
position:
{
x: 'screenCenter', // acceptable values "left", "center", "right",
// "screenCenter", or relative px value
y: 'top', // acceptable values "top", "bottom", "center", or relative px
// value
},
expandable: false, // default to large static picker - set to true to make an
// expandable picker (small icon with popup) - set
// automatically when binded to input element
liveUpdate: true, // set false if you want the user to click "OK" before the
// binded input box updates values (always "true" for
// expandable picker)
alphaSupport: false, // set to true to enable alpha picking
alphaPrecision: 0, // set decimal precision for alpha percentage display -
// hex codes do not map directly to percentage integers -
// range 0-2
updateInputColor: true // set to false to prevent binded input colors from
// changing
},
color:
{
mode: 'h', // acceptable values "h" (hue), "s" (saturation), "v" (brightness),
// "r" (red), "g" (green), "b" (blue), "a" (alpha)
active: new $.jPicker.Color({ hex: 'ffc000' }), // accepts any declared
// jPicker.Color object or hex string WITH OR WITHOUT '#'
quickList: // this list of quick pick colors - override for a different list
[
new $.jPicker.Color({ h: 360, s: 33, v: 100}), // accepts any declared
// jPicker.Color object or hex string WITH OR WITHOUT '#'
new $.jPicker.Color({ h: 360, s: 66, v: 100}),
(...) // removed for brevity
new $.jPicker.Color({ h: 330, s: 100, v: 50}),
new $.jPicker.Color()
]
},
images
{
clientPath: '/jPicker/images/', // Path to image files
colorMap: // colorMap size and arrow icon
{
width: 256, // Map width - don't override unless using a smaller image set
height: 256, // Map height - don't override unles using a smaller image set
arrow:
{
file: 'mappoint.gif', // Arrow icon image file
width: 15, // Arrow icon width
height: 15 // Arrow icon height
}
},
colorBar: // colorBar size and arrow icon
{
width: 20, // Bar width - don't override unless using a smaller image set
height: 256, // Bar height - don't override unless using a smaller image set
arrow:
{
file: 'rangearrows.gif', // Arrow icon image file
width: 40, // Arrow icon width
height: 9 // Arrow icon height
}
},
picker: // picker icon and size
{
file: 'picker.gif', // Picker icon image file
width: 25, // Picker width - don't override unless using a smaller image set
height: 24 // Picker height - don't override unless using a smaller image set
}
},
localization:
{
text:
{
title: 'Drag Markers To Pick A Color',
newColor: 'new',
currentColor: 'current',
ok: 'OK',
cancel: 'Cancel'
},
tooltips:
{
colors:
{
newColor: 'New Color - Press &ldquo;OK&rdquo; To Commit',
currentColor: 'Click To Revert To Original Color'
},
buttons:
{
ok: 'Commit To This Color Selection',
cancel: 'Cancel And Revert To Original Color'
},
hue:
{
radio: 'Set To &ldquo;Hue&rdquo; Color Mode',
textbox: 'Enter A &ldquo;Hue&rdquo; Value (0-360&deg;)'
},
saturation:
{
radio: 'Set To &ldquo;Saturation&rdquo; Color Mode',
textbox: 'Enter A &ldquo;Saturation&rdquo; Value (0-100%)'
},
brightness:
{
radio: 'Set To &ldquo;Brightness&rdquo; Color Mode',
textbox: 'Enter A &ldquo;Brightness&rdquo; Value (0-100%)'
},
red:
{
radio: 'Set To &ldquo;Red&rdquo; Color Mode',
textbox: 'Enter A &ldquo;Red&rdquo; Value (0-255)'
},
green:
{
radio: 'Set To &ldquo;Green&rdquo; Color Mode',
textbox: 'Enter A &ldquo;Green&rdquo; Value (0-255)'
},
blue:
{
radio: 'Set To &ldquo;Blue&rdquo; Color Mode',
textbox: 'Enter A &ldquo;Blue&rdquo; Value (0-255)'
},
alpha:
{
radio: 'Set To &ldquo;Alpha&rdquo; Color Mode',
textbox: 'Enter A &ldquo;Alpha&rdquo; Value (0-100)'
},
hex:
{
textbox: 'Enter A &ldquo;Hex&rdquo; Color Value (#000000-#ffffff)',
alpha: 'Enter A &ldquo;Alpha&rdquo; Value (#00-#ff)'
}
}
}
}</pre>
</p><hr /><br />
<h2>Callback Pattern</h2>
<p>
<code>function(jPicker.Color color, object context){...}</code>
</p><hr /><br />
<h2>jPicker List</h2>
<p>
The list of active jPicker objects.<br /><br />
<code>(jQuery).jPicker.List[]</code>
</p><hr /><br />
<h2>jPicker Color Class</h2>
<p>
Definition of the jPicker.Color class.<br />
<pre>
(jQuery).jPicker.Color()
(jQuery).jPicker.Color({ ahex: 'ffffffff' })
(jQuery).jPicker.Color({ hex: 'ffffff', [a: (0-255)] })
(jQuery).jPicker.Color({ r: (0-255), g: (0-255), b: (0-255), [a: (0-255)] })
(jQuery).jPicker.Color({ h: (0-360), s: (0-100), v: (0-100), [a: (0-255)] })
{
val: function(name, value, context),
bind: function(callback) where callback is function(color, [context]),
unbind: function(callback)
}
method "val" usage
val(name) : get value
'r': red (0-255)
'g': green (0-255)
'b': blue (0-255)
'a': alpha (0-255)
'h': hue (0-360)
's': saturation (0-100)
'v': value (0-100)
'hex': hex (000000-ffffff)
'ahex': ahex (00000000-ffffffff)
'all': all all
ex. Usage
val('r'): (0-255)
val('h'): (0-360)
val('hex'): (000000-ffffff)
val('rg'): { r: (0-255), g: (0-255) }
val('rgba'): { r: (0-255), g: (0-255), b: (0-255), a: (0-255) }
val('hvga'): { h: (0-255), v: (0-100), g: (0-255), a: (0-255) }
val('all'): { r: (0-255), g: (0-255), b: (0-255), a: (0-255), h: (0-360) --
s: (0-100), v: (0-100), hex: (000000-ffffff), --
ahex: (00000000-ffffffff) }
val(name, value, [context]) : set value
'r': red (0-255)
'g': green (0-255)
'b': blue (0-255)
'a': alpha (0-255)
'h': hue (0-360)
's': saturation (0-100)
'v': value (0-100)
'hex': hex (000000-ffffff)
'ahex': ahex (00000000-ffffffff)
ex. Usage
val('r', (0-255)) || val('r', { r: (0-255) })
val('h', (0-360)) || val('h', { h: (0-360) })
val('hex', (000000-ffffff)) || val('hex', { hex: (000000-ffffff) })
val('rg', { r: (0-255), g: (0-255) })
val('rgba', { r: (-255), g: (0-255), b: (0-255), a: (0-255) })
val(null, { r: (0-255), g: (0-255) })
val('hvga'): incorrect usage - cannot set hsv AND rgb as they will conflict</pre>
</p><hr /><br />
<h2>jPicker ColorMethod Utility Class</h2>
<p>
Static methods for altering and retrieving different color spaces.<br />
<pre>
(jQuery).jPicker.ColorMethods.hexToRgba:
function(hex)
returns { r: (0-255), g: (0-255), b: (0-255), a: (0-255) }
(jQuery).jPicker.ColorMethods.validateHex:
function(hex)
returns new hex string
(jQuery).jPicker.ColorMethods.rgbaToHex:
function({ r: (0-255), g: (0-255), b: (0-255), a: (0-255) })
returns hex string
(jQuery).jPicker.ColorMethods.intToHex:
function(number)
returns hex string
(jQuery).jPicker.ColorMethods.hexToInt:
function(hex)
return integer
(jQuery).jPicker.ColorMethods.rgbToHsv:
function({ r: (0-255), g: (0-255), b: (0-255) })
returns { h: (0-360), s: (0-100), v: (0-100) }
(jQuery).jPicker.ColorMethods.hsvToRgb:
function({ h: (0-360), s: (0-100), v: (0-100) })
returns { r: (0-255), g: (0-255), b: (0-255) }
</pre>
</p><hr /><br />
<h2>Known Issues</h2>
<ul>
<li>
<h3>Attaching multiple jPicker objects on a single page will slow performance.</h3>
<ul>
<li>jPicker creates a new instance of the picker for every element. Performance will suffer when binding dozens of instances.</li>
</ul>
</li>
</ul><hr />
<h2>Coming Soon</h2>
<ul>
<li>
<ul>
<li>Will consider supporting jQuery ThemeRoller CSS API for theming the UI if demand exists.</li>
</ul>
</li>
</ul><hr />
<h2>Planned For Future Release</h2>
<ul>
<li>
Move the jPicker object to a single instance that all selection instances point to.
<ul>
<li>This will result in much faster operation and initialization for pages with multiple pickers.</li>
</ul>
</li>
<li>Add activateCallback option for calling a callback function when the jPicker is activated or its binding is switched to a different picker element.</li>
</ul><hr />
<h2>Change Log</h2>
<ul>
<li>
<h3>V1.1.5:</h3>
<ul>
<li>Corrected Color object constructor to allow setting of the "alpha" value as per the documentation which previously didn't work.</li>
<li>Added support for translucency for quickList colors with checkered background - Only available if "alphaSupport" is enabled.</li>
<li>Restricted default color to "alpha" of 255 if "alphaSupport" is disabled - It will now assign an explicit alpha of 255 when disabled.</li>
<li>Added new setting variable "alphaPrecision" which indicates the number of decimal points to allow in the alpha percentage display - Now defaults to 0.</li>
</ul>
</li>
<li>
<h3>V1.1.4:</h3>
<ul>
<li>Changed "alpha" range from 0-100 to 0-255 to correct truncating and rounding errors caused by attempting to get an integer percentage that matches a hex value.</li>
<li>"alpha" percentage display will now show up to 1 decimal point for more accurate representation of "alpha" value.</li>
<li>Color object now accepts "alpha" values in a range of 0-255 and also returns the same when getting the "alpha" value. You will need to run ((alpha * 100) / 255) to retrieve a percentage value.</li>
<li>Reworked the table layout and labels to remove the need for the label to reference the radio input box. This reduces injected code and removes the need to generate unique ids on the radio buttons.</li>
<li>Transparent/invisible caret on NULL color is now corrected - uses the same caret color as a white color.</li>
<li>Setting a binded input value of "" or no value attribute will now create a NULL color on initialization instead of the settings default color.</li>
<li>Added a dynamic, invisible "iframe" behind a dialog picker in all browsers that fail jQuery.support.boxModel (currently IE <= 7 Quirks Mode). This prevents "select" box from showing through the picker.</li>
</ul>
</li>
<li>
<h3>V1.1.3:</h3>
<ul>
<li>Now adding popup color pickers to document.body instead of inline with the popup control. This corrects issues with the picker not showing beyond a relative container scope.</li>
<li>No longer need to hide popup icon in Internet Explorer for picker elements lower in the DOM than the currently active one since the picker itself is attached to document.body (it is always higher in the DOM now).</li>
<li>Popup pickers are now bring-to-front selectable. Clicking on the picker will bring it above all other pickers on the page instead of having to drag one out from underneath another.</li>
<li>Corrected jPicker.List/setTimeout bug which allowed an instance to bind to the List in an order other than the order the initialization function was called.</li>
<li>Added a updateInputColor option (default true) to allow for a binded input field that does not automatically update its background/text color.</li>
</ul>
<hr />
</li>
<li>
<h3>V1.1.2:</h3>
<ul>
<li>Reworked the find methods and contexts for element searches. Now using ":first" instead of ".eq(0)" to take advantage of early out searches. Much faster initialization of the picker, on the order of 6 times.</li>
<li>Now using setTimeout for calling visual updates. Dramatically improved marker dragging in all browsers. Reduces blocking as re-rendering is internal to the browser and independent of the other javascript still in progress.</li>
<li>Marker updates can now cancel a previous valueChanged event when a new mouseMove event comes in. IE8 marker dragging is still slower, much over 5 times faster than it was.</li>
<li>Reworked entire quickPick list creation. It now adds up source code and does a single "html" method instead of multiple "append" methods. This is a large part of the speed increase on initialization.</li>
<li>The vast majority of all running scripts on both initialization and dragging is now occupied altering the style rules and finding elements (init only) instead of jPicker code.</li>
<li>All methods previously called with global context now use the "call" method for using the context of the class running the method. "this" in a callback is now the DOM node (jQuery style) and jPicker instead of "window".</li>
<li>Added "effects" section of window settings to allow different show/hide effects and durations.</li>
<li>Removed change log and read me from the full source code to separate files (ChangeLog.txt and ReadMe.txt) and an HTML demonstration/documentation page (Example.txt).</li>
</ul>
<hr />
</li>
<li>
<h3>V1.1.1:</h3>
<ul>
<li>Correct IE exception caused by attempting to set "#transparent" to CSS background-color.</li>
</ul>
<hr />
</li>
<li>
<h3>V1.1.0:</h3>
<ul>
<li>Reworked nearly the entire plugin including the internal and external event model, bindings, DOM searches, classes, and overall presentation.</li>
<li>The Color object now supports a changed event that you can bind to (or just bind to the picker events still included).</li>
<li>Event order has been reversed, instead of an change event on the map/bar/text fields updating the display, they now update the Color object which then fires the events that update the display.</li>
<li>alphaSupport re-implemented by request - default behavior is off.</li>
<li>Hex code now only 6 characters again.</li>
<li>Color object can now have its value changed from code, using the "val" method, and it will fire all events necessary to update the display.</li>
<li>Removed all "get_*" methods from the color object, instead opting for a single "val" method for getting and setting, more in line with familiar jQuery methods.</li>
<li>Better rendering for all IE versions in Quirks mode.</li>
</ul>
<hr />
</li>
<li>
<h3>V1.0.13:</h3>
<ul>
<li>Updated transparency algorithm for red/green/blue color modes. The algorithm from John Dyers' color picker was close but incorrect. Bar colors are now pixel perfect with the new algorithm.</li>
<li>Changed from using "background-position" on the color maps to an element of full height using the "top" attribute for image-map location using "overflow: hidden" to hide overdraw.</li>
<li>IE7/8 ignores opacity on elements taller than 4096px. Image maps therefore no longer include a blank first map so the Bar is just under 4096. Blank is now accomplished by setting the "top" setting to below the map display.</li>
<li>New colorBar picker image that does not draw outside of the element since the elements now hide overdraw.</li>
<li>Added IE5.5/6 support for the picker. This is why it now uses maps of full height and the "top" attribute for map locations.</li>
<li>Moved the images in the maps to 4 pixels apart from each other. IE7/8 change the first pixel of the bottom-border of 2px to partially transparent showing a portion of a different color map without this.</li>
</ul>
<hr />
</li>
<li>
<h3>V1.0.12:</h3>
<ul>
<li>Added minified CSS file.</li>
<li>Added IE7/8 Quirks Mode support.</li>
<li>Added configurable string constants for all text and tooltips. You can now change the default values for different languages.</li>
<li>Privatized the RGBA values in the Color object for better NULL handling. YOU MUST USE THE NEW GET FUNCTIONS TO ACCESS THE COLOR PROPERTIES.</li>
<li>Better NULL color handling and an additional "No Color Selected" quick pick color.</li>
<li>More consistent behavior across multiple versions of browsers.</li>
<li>Added alpha response to the binded color picker icon.</li>
<li>Removed "alphaSupport" variable. It is now always supported.</li>
</ul>
<hr />
</li>
<li>
<h3>V1.0.11b:</h3>
<ul>
<li>Corrected NULL behavior in IE. jQuery was getting an exception when attempting to assign a backgroundColor style of '#'. Now assigns 'transparent' if color is NULL.</li>
<li>Can now create new Color object WITH OR WITHOUT the '#' prefix.</li>
</ul>
<hr />
</li>
<li>
<h3>V1.0.11:</h3>
<ul>
<li>Added ability for NULL colors (delete the hex value). Color will be returned as color.hex == ''. Can set the default color to an empty hex string as well.</li>
<li>cancelCallback now returns the original color for use in programming responses.</li>
</ul>
<hr />
</li>
<li>
<h3>V1.0.10:</h3>
<ul>
<li>Corrected table layout and tweaked display for more consisent presentation. Nice catch from Jonathan Pasquier.</li>
</ul>
<hr />
</li>
<li>
<h3>V1.0.9:</h3>
<ul>
<li>Added optional title variable for each jPicker window.</li>
</ul>
<hr />
</li>
<li>
<h3>V1.0.8:</h3>
<ul>
<li>Moved all images into a few sprites - now using backgroundPosition to change color maps and bars instead of changing the image - this should be faster to download and run.</li>
</ul>
<hr />
</li>
<li>
<h3>V1.0.7:</h3>
<ul>
<li>RENAMED CSS FILE TO INCLUDE VERSION NUMBER!!! YOU MUST USE THIS VERSIONED CSS FILE!!! There will be no need to do your own CSS version number increments from now on.</li>
<li>Added opacity feedback to color preview boxes.</li>
<li>Removed reliance on "id" value of containing object. Subobjects are now found by class and container instead of id's. This drastically reduces injected code.</li>
<li>Removed (jQuery).jPicker.getListElementById(id) function since "id" is no longer incorporated or required.</li>
</ul>
<hr />
</li>
<li>
<h3>V1.0.6:</h3>
<ul>
<li>Corrected picker bugs introduced with 1.0.5.</li>
<li>Removed alpha slider bar until activated - default behavior for alpha is now OFF.</li>
<li>Corrected Color constructor bug not allowing values of 0 for initial value (it was evaluating false and missing the init code - Thanks Pavol).</li>
<li>Removed title tags (tooltips) from color maps and bars - They get in the way in some browsers (e.g. IE - dragging marker does NOT prevent or hide the tooltip).</li>
<li>THERE WERE CSS FILE CHANGES WITH THIS UPDATE!!! IF YOU USE NEVER-EXPIRE HEADERS, YOU WILL NEED TO INCREMENT YOUR CSS FILE VERSION NUMBER!!!</li>
</ul>
<hr />
</li>
<li>
<h3>V1.0.5:</h3>
<ul>
<li>Added opacity support to picker and color/callback methods. New property "a" (alpha - range from 0-100) in all color objects now - defaults to 100% opaque. (Thank you Pavol)</li>
<li>Added title attributes to input elements - gives short tooltip directions on what button or field does.</li>
<li>Commit callback used to fire on control initialization (twice actually) - This has been corrected, it does not fire on initialization.</li>
<li>THERE WERE CSS FILE CHANGES WITH THIS UPDATE!!! IF YOU USE NEVER-EXPIRE HEADERS, YOU WILL NEED TO INCREMENT YOUR CSS FILE VERSION NUMBER!!!</li>
</ul>
<hr />
</li>
<li>
<h3>V1.0.4:</h3>
<ul>
<li>Added ability for smaller picker icon with expandable window on any DOM element (not just input).</li>
<li>"draggable" property renamed to "expandable" and its scope increased to create small picker icon or large static picker.</li>
</ul>
<hr />
</li>
<li>
<h3>V1.0.3</h3>
<ul>
<li>Added cancelCallback function for registering an external function when user clicks cancel button. (Thank you Jeff and Pavol)</li>
</ul>
<hr />
</li>
<li>
<h3>V1.0.2</h3>
<ul>
<li>Random bug fixes - speed concerns.</li>
</ul>
<hr />
</li>
<li>
<h3>V1.0.1</h3>
<ul>
<li>Corrected closure based memeory leak - there may be others?</li>
</ul>
<hr />
</li>
<li>
<h3>V1.0.0</h3>
<ul>
<li>First Release.</li>
</ul>
<hr />
</li>
</ul>
</div>
</body>
</html>

View File

@ -1,47 +0,0 @@
jPicker 1.1.6
jQuery Plugin for Photoshop style color picker
Copyright (c) 2010 Christopher T. Tillman
Digital Magic Productions, Inc. (http://www.digitalmagicpro.com/)
MIT style license, FREE to use, alter, copy, sell, and especially ENHANCE
Painstakingly ported from John Dyers' excellent work on his own color picker based on the Prototype framework.
John Dyers' website: (http://johndyer.name)
Color Picker page: (http://johndyer.name/post/2007/09/PhotoShop-like-JavaScript-Color-Picker.aspx)
jPicker is a fast, lightweight jQuery plugin for including an advanced color picker in your web projects.
It has been painstakenly ported from John Dyers' awesome work on his picker using the Prototype framework.
jPicker supports all current browsers and has been extensively tested in Chrome, Firefox, IE5.5+, Safari,
and Opera.
If you are updating a current version, you MUST always use the CSS and image files from the download as
there may have been changes.
If you are moving from a V1.0.* version, you MUST read the docs below to implement some changes to the
Color object returned by the callback functions.
Known Issues
______________
Attaching multiple jPicker objects on a single page will slow performance.
jPicker creates a new instance of the picker for every element. Performance will suffer when binding dozens of instances.
Coming Soon
______________
Will consider supporting jQuery ThemeRoller CSS API for theming the UI if demand exists.
Planned For Future Release
______________
Move the jPicker object to a single instance that all selection instances point to.
- This will result in much faster operation and initialization for pages with multiple pickers.
Add activateCallback option for calling a callback function when the jPicker is activated or its binding is switched to a different picker element.
Add multiple window modes for picker operation, include modal, popup, windowed, and exclusive.

View File

@ -1,232 +0,0 @@
.jPicker .Icon {
display: inline-block;
height: 24px; /* change this value if using a different sized color picker icon */
position: relative; /* make this element an absolute positioning container */
text-align: left; /* make the zero width children position to the left of container */
width: 25px; /* change this value if using a different sized color picker icon */
}
.jPicker .Icon span.Color, .jPicker .Icon span.Alpha {
background-position: 2px 2px;
display: block;
height: 100%;
left: 0px;
position: absolute;
top: 0px;
width: 100%;
}
.jPicker .Icon span.Image {
background-repeat: no-repeat;
cursor: pointer;
display: block;
height: 100%;
left: 0px;
position: absolute;
top: 0px;
width: 100%;
}
.jPicker.Container {
color: #000;
z-index: 10;
}
table.jPicker {
background-color: #efefef;
border: 1px outset #666;
font-family: Arial, Helvetica, Sans-Serif;
font-size: 12px !important;
margin: 0px;
padding: 5px;
width: 545px;
z-index: 20;
}
.jPicker .Move {
background-color: #dddddd;
border-color: #fff #666 #666 #fff;
border-style: solid;
border-width: 1px;
cursor: move;
height: 12px;
padding: 0px;
}
.jPicker .Title {
font-size: 11px !important;
font-weight: bold;
margin: -2px 0px 0px 0px;
padding: 10px 0px 0px 0px;
text-align: center;
width: 100%;
}
.jPicker div.Map {
border-bottom: 2px solid #fff;
border-left: 2px solid #9a9a9a;
border-right: 2px solid #fff;
border-top: 2px solid #9a9a9a;
cursor: crosshair;
height: 260px; /* IE 6 incorrectly draws border inside the width and height instead of outside - We will fix this to 256px later */
margin: 0px 10px 10px 10px;
overflow: hidden; /* hide the overdraw of the Color Map icon when at edge of viewing box */
padding: 0px;
position: relative; /* make this element an absolute positioning container */
width: 260px; /* IE 6 incorrectly draws border inside the width and height instead of outside - We will fix this to 256px later */
}
.jPicker div[class="Map"] {
height: 256px; /* correct to 256px for browsers that support the "[class="xxx"]" selector (IE7+,Firefox,Safari,Chrome,Opera,etc.) */
width: 256px; /* correct to 256px for browsers that support the "[class="xxx"]" selector (IE7+,Firefox,Safari,Chrome,Opera,etc.) */
}
.jPicker div.Bar {
border-bottom: 2px solid #fff;
border-left: 2px solid #9a9a9a;
border-right: 2px solid #fff;
border-top: 2px solid #9a9a9a;
cursor: n-resize;
height: 260px; /* IE 6 incorrectly draws border inside the width and height instead of outside - We will fix this to 256px later */
margin: 12px 10px 0px 5px;
overflow: hidden;
padding: 0px;
position: relative;
width: 24px; /* IE 6 incorrectly draws border inside the width and height instead of outside - We will fix this to 20px later */
}
.jPicker div[class="Bar"] {
height: 256px; /* correct to 256px for browsers that support the "[class="xxx"]" selector (IE7+,Firefox,Safari,Chrome,Opera,etc.) */
width: 20px; /* correct to 20px for browsers that support the "[class="xxx"]" selector (IE7+,Firefox,Safari,Chrome,Opera,etc.) */
}
.jPicker .Map .Map1, .jPicker .Map .Map2, .jPicker .Map .Map3, .jPicker .Bar .Map1, .jPicker .Bar .Map2, .jPicker .Bar .Map3, .jPicker .Bar .Map4, .jPicker .Bar .Map5, .jPicker .Bar .Map6 {
background-color: transparent;
background-image: none;
display: block;
left: 0px;
position: absolute;
top: 0px;
}
.jPicker .Map .Map1, .jPicker .Map .Map2, .jPicker .Map .Map3 {
height: 2596px;
width: 256px; /* must specify pixel width. IE7/8 Quirks mode ignores opacity for an absolutely positioned item in a relative container with "overflow: visible". The marker in the colorBar
would not be drawn if its overflow is set to hidden. */
}
.jPicker .Bar .Map1, .jPicker .Bar .Map2, .jPicker .Bar .Map3, .jPicker .Bar .Map4 {
height: 3896px;
width: 20px; /* must specify pixel width. IE7/8 Quirks mode ignores opacity for an absolutely positioned item in a relative container with "overflow: visible". The marker in the colorBar
would not be drawn if its overflow is set to hidden. */
}
.jPicker .Bar .Map5, .jPicker .Bar .Map6 {
height: 256px;
width: 20px; /* must specify pixel width. IE7/8 Quirks mode ignores opacity for an absolutely positioned item in a relative container with "overflow: visible". The marker in the colorBar
would not be drawn if its overflow is set to hidden. */
}
.jPicker .Map .Map1, .jPicker .Map .Map2, .jPicker .Bar .Map6 {
background-repeat: no-repeat;
}
.jPicker .Map .Map3, .jPicker .Bar .Map5 {
background-repeat: repeat;
}
.jPicker .Bar .Map1, .jPicker .Bar .Map2, .jPicker .Bar .Map3, .jPicker .Bar .Map4 {
background-repeat: repeat-x;
}
.jPicker .Map .Arrow {
display: block;
position: absolute;
}
.jPicker .Bar .Arrow {
display: block;
left: 0px; /* (arrow width / 2) - (element width / 2) - position arrows' center in elements' center */
position: absolute;
}
.jPicker .Preview {
font-size: 9px;
padding: 5px 0px 0px 0px;
text-align: center;
}
.jPicker .Preview div {
border: 2px inset #eee;
height: 62px;
margin: 0px auto;
padding: 0px;
width: 62px;
}
.jPicker .Preview div span {
border: 1px solid #000;
display: block;
height: 30px;
margin: 0px auto;
padding: 0px;
width: 60px;
}
.jPicker .Preview .Active {
border-bottom-width: 0px;
}
.jPicker .Preview .Current {
border-top-width: 0px;
cursor: pointer;
}
.jPicker input {
font-size: 13px;
}
.jPicker .Button {
text-align: center;
padding: 0px 4px;
width: 115px;
}
.jPicker .Button input {
padding: 2px 0px;
width: 100px;
}
.jPicker .Button .Ok {
margin: 12px 0px 5px 0px;
}
.jPicker td {
margin: 0px;
padding: 0px;
}
.jPicker td.Radio {
margin: 0px;
padding: 0px;
width: 31px;
}
.jPicker td.Radio input {
margin: 0px 5px 0px 0px;
padding: 0px;
}
.jPicker td.Text {
font-size: 12px !important;
height: 22px;
margin: 0px;
padding: 0px;
text-align: left;
width: 70px;
}
.jPicker tr.Hex td.Text {
width: 100px;
}
.jPicker td.Text input {
background-color: #fff;
border: 1px inset #aaa;
height: 19px;
margin: 0px 0px 0px 5px;
text-align: left;
width: 30px;
}
.jPicker td[class="Text"] input {
height: 15px;
}
.jPicker tr.Hex td.Text input.Hex {
width: 50px;
}
.jPicker tr.Hex td.Text input.AHex {
width: 20px;
}
.jPicker .Grid {
text-align: center;
width: 114px;
}
.jPicker .Grid span.QuickColor {
border: 1px inset #aaa;
cursor: pointer;
display: inline-block;
height: 15px;
line-height: 15px;
margin: 0px;
padding: 0px;
width: 19px;
}
.jPicker .Grid span[class="QuickColor"] {
width: 17px;
}

View File

@ -1 +0,0 @@
.jPicker .Icon{display:inline-block;height:24px;position:relative;text-align:left;width:25px}.jPicker .Icon span.Color,.jPicker .Icon span.Alpha{background-position:2px 2px;display:block;height:100%;left:0;position:absolute;top:0;width:100%}.jPicker .Icon span.Image{background-repeat:no-repeat;cursor:pointer;display:block;height:100%;left:0;position:absolute;top:0;width:100%}.jPicker.Container{color:#000;z-index:10}table.jPicker{background-color:#efefef;border:1px outset #666;font-family:Arial,Helvetica,Sans-Serif;font-size:12px!important;margin:0;padding:5px;width:545px;z-index:20}.jPicker .Move{background-color:#ddd;border-color:#fff #666 #666 #fff;border-style:solid;border-width:1px;cursor:move;height:12px;padding:0}.jPicker .Title{font-size:11px!important;font-weight:bold;margin:-2px 0 0 0;padding:10px 0 0 0;text-align:center;width:100%}.jPicker div.Map{border-bottom:2px solid #fff;border-left:2px solid #9a9a9a;border-right:2px solid #fff;border-top:2px solid #9a9a9a;cursor:crosshair;height:260px;margin:0 10px 10px 10px;overflow:hidden;padding:0;position:relative;width:260px}.jPicker div[class="Map"]{height:256px;width:256px}.jPicker div.Bar{border-bottom:2px solid #fff;border-left:2px solid #9a9a9a;border-right:2px solid #fff;border-top:2px solid #9a9a9a;cursor:n-resize;height:260px;margin:12px 10px 0 5px;overflow:hidden;padding:0;position:relative;width:24px}.jPicker div[class="Bar"]{height:256px;width:20px}.jPicker .Map .Map1,.jPicker .Map .Map2,.jPicker .Map .Map3,.jPicker .Bar .Map1,.jPicker .Bar .Map2,.jPicker .Bar .Map3,.jPicker .Bar .Map4,.jPicker .Bar .Map5,.jPicker .Bar .Map6{background-color:transparent;background-image:none;display:block;left:0;position:absolute;top:0}.jPicker .Map .Map1,.jPicker .Map .Map2,.jPicker .Map .Map3{height:2596px;width:256px}.jPicker .Bar .Map1,.jPicker .Bar .Map2,.jPicker .Bar .Map3,.jPicker .Bar .Map4{height:3896px;width:20px}.jPicker .Bar .Map5,.jPicker .Bar .Map6{height:256px;width:20px}.jPicker .Map .Map1,.jPicker .Map .Map2,.jPicker .Bar .Map6{background-repeat:no-repeat}.jPicker .Map .Map3,.jPicker .Bar .Map5{background-repeat:repeat}.jPicker .Bar .Map1,.jPicker .Bar .Map2,.jPicker .Bar .Map3,.jPicker .Bar .Map4{background-repeat:repeat-x}.jPicker .Map .Arrow{display:block;position:absolute}.jPicker .Bar .Arrow{display:block;left:0;position:absolute}.jPicker .Preview{font-size:9px;padding:5px 0 0 0;text-align:center}.jPicker .Preview div{border:2px inset #eee;height:62px;margin:0 auto;padding:0;width:62px}.jPicker .Preview div span{border:1px solid #000;display:block;height:30px;margin:0 auto;padding:0;width:60px}.jPicker .Preview .Active{border-bottom-width:0}.jPicker .Preview .Current{border-top-width:0;cursor:pointer}.jPicker input{font-size:13px}.jPicker .Button{text-align:center;padding:0 4px;width:115px}.jPicker .Button input{padding:2px 0;width:100px}.jPicker .Button .Ok{margin:12px 0 5px 0}.jPicker td{margin:0;padding:0}.jPicker td.Radio{margin:0;padding:0;width:31px}.jPicker td.Radio input{margin:0 5px 0 0;padding:0}.jPicker td.Text{font-size:12px!important;height:22px;margin:0;padding:0;text-align:left;width:70px}.jPicker tr.Hex td.Text{width:100px}.jPicker td.Text input{background-color:#fff;border:1px inset #aaa;height:19px;margin:0 0 0 5px;text-align:left;width:30px}.jPicker td[class="Text"] input{height:15px}.jPicker tr.Hex td.Text input.Hex{width:50px}.jPicker tr.Hex td.Text input.AHex{width:20px}.jPicker .Grid{text-align:center;width:114px}.jPicker .Grid span.QuickColor{border:1px inset #aaa;cursor:pointer;display:inline-block;height:15px;line-height:15px;margin:0;padding:0;width:19px}.jPicker .Grid span[class="QuickColor"]{width:17px}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 B

View File

@ -1,17 +0,0 @@
@media all
{
#jPicker { margin: 0px 8px; text-align: left; }
#jPicker ul { font-size: 15px; margin: 0px 0px 0px 15px; padding: 0px; }
#jPicker ul li { list-style: disc; padding: 2px 0px; }
#jPicker ul li ul { margin-bottom: 10px; }
#jPicker ul li ul li { list-style: circle; }
#jPicker p { font-size: 13px; padding: 0px 10px; }
#jPicker hr { clear: both; }
#jPicker h2.jPicker { font-size: 16px; padding: 20px 10px; }
#jPicker code { color: #8bd; font-size: 14px; font-weight: bold; }
#jPicker pre { background: #eee; border: 1px solid #000; color: #000; display: block; font-size: 11px; margin: 10px 5px; padding: 5px; }
#jPicker span { font-size: 13px; text-align: center; }
#jPicker a { color: #ff8050; }
#jPicker input { font-size: 13px; padding: 2px 5px; }
#jPicker h2 { font-size: 16px; margin: 10px 0px; }
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long