/* Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ if(!dojo._hasResource["dijit.ColorPalette"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. dojo._hasResource["dijit.ColorPalette"] = true; dojo.provide("dijit.ColorPalette"); dojo.require("dijit._Widget"); dojo.require("dijit._Templated"); dojo.require("dojo.colors"); dojo.require("dojo.i18n"); dojo.require("dojo.string"); dojo.require("dijit._PaletteMixin"); dojo.requireLocalization("dojo", "colors", null, "ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,kk,ko,nb,nl,pl,pt,pt-pt,ro,ru,sk,sl,sv,th,tr,zh,zh-tw"); dojo.declare("dijit.ColorPalette", [dijit._Widget, dijit._Templated, dijit._PaletteMixin], { // summary: // A keyboard accessible color-picking widget // description: // Grid showing various colors, so the user can pick a certain color. // Can be used standalone, or as a popup. // // example: // |
// // example: // | var picker = new dijit.ColorPalette({ },srcNode); // | picker.startup(); // palette: [const] String // Size of grid, either "7x10" or "3x4". palette: "7x10", // _palettes: [protected] Map // This represents the value of the colors. // The first level is a hashmap of the different palettes available. // The next two dimensions represent the columns and rows of colors. _palettes: { "7x10": [["white", "seashell", "cornsilk", "lemonchiffon","lightyellow", "palegreen", "paleturquoise", "lightcyan", "lavender", "plum"], ["lightgray", "pink", "bisque", "moccasin", "khaki", "lightgreen", "lightseagreen", "lightskyblue", "cornflowerblue", "violet"], ["silver", "lightcoral", "sandybrown", "orange", "palegoldenrod", "chartreuse", "mediumturquoise", "skyblue", "mediumslateblue","orchid"], ["gray", "red", "orangered", "darkorange", "yellow", "limegreen", "darkseagreen", "royalblue", "slateblue", "mediumorchid"], ["dimgray", "crimson", "chocolate", "coral", "gold", "forestgreen", "seagreen", "blue", "blueviolet", "darkorchid"], ["darkslategray","firebrick","saddlebrown", "sienna", "olive", "green", "darkcyan", "mediumblue","darkslateblue", "darkmagenta" ], ["black", "darkred", "maroon", "brown", "darkolivegreen", "darkgreen", "midnightblue", "navy", "indigo", "purple"]], "3x4": [["white", "lime", "green", "blue"], ["silver", "yellow", "fuchsia", "navy"], ["gray", "red", "purple", "black"]] }, // templateString: String // The template of this widget. templateString: dojo.cache("dijit", "templates/ColorPalette.html", "