diff --git a/spring-faces/src/main/java/META-INF/dijit/ColorPalette.js b/spring-faces/src/main/java/META-INF/dijit/ColorPalette.js
index ef061f61..44b30c6b 100644
--- a/spring-faces/src/main/java/META-INF/dijit/ColorPalette.js
+++ b/spring-faces/src/main/java/META-INF/dijit/ColorPalette.js
@@ -6,7 +6,7 @@ dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dojo.colors");
dojo.require("dojo.i18n");
-dojo.requireLocalization("dojo", "colors", null, "ROOT");
+dojo.requireLocalization("dojo", "colors", null, "ko,zh,ja,zh-tw,ru,it,hu,ROOT,fr,pt,pl,es,de,cs");
dojo.declare(
"dijit.ColorPalette",
@@ -16,13 +16,13 @@ dojo.declare(
// Grid showing various colors, so the user can pick a certain color
// defaultTimeout: Number
- // number of milliseconds before a held key or button becomes typematic
+ // number of milliseconds before a held key or button becomes typematic
defaultTimeout: 500,
// timeoutChangeRate: Number
- // fraction of time used to change the typematic timer between events
- // 1.0 means that each typematic event fires at defaultTimeout intervals
- // < 1.0 means that each typematic event fires at an increasing faster rate
+ // fraction of time used to change the typematic timer between events
+ // 1.0 means that each typematic event fires at defaultTimeout intervals
+ // < 1.0 means that each typematic event fires at an increasing faster rate
timeoutChangeRate: 0.90,
// palette: String
@@ -50,7 +50,7 @@ dojo.declare(
// The first level is a hashmap of the different arrays 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"],
@@ -58,11 +58,11 @@ dojo.declare(
["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"]]
-
+
},
// _imagePaths: Map
@@ -76,18 +76,20 @@ dojo.declare(
// This is a map that is used to calculate the coordinates of the
// images that make up the palette.
_paletteCoords: {
- "leftOffset": 3, "topOffset": 3,
- "cWidth": 18, "cHeight": 16
+ "leftOffset": 4, "topOffset": 4,
+ "cWidth": 20, "cHeight": 20
+
},
// templatePath: String
// Path to the template of this widget.
- templateString:"
\n",
-
+ templateString:"
\n\t
\n\t\t\n\t
\t\n
\n",
+ // _paletteDims: Object
+ // Size of the supported palettes for alignment purposes.
_paletteDims: {
- "7x10": {"width": "185px", "height": "117px"},
- "3x4": {"width": "77px", "height": "53px"}
+ "7x10": {"width": "206px", "height": "145px"},
+ "3x4": {"width": "86px", "height": "64px"}
},
@@ -120,7 +122,7 @@ dojo.declare(
highlightStyle.left = coords.leftOffset + (col * coords.cWidth) + "px";
highlightNode.setAttribute("tabIndex","-1");
highlightNode.title = this.colorNames[color];
- dijit.wai.setAttr(highlightNode, "waiRole", "role", "gridcell");
+ dijit.setWaiRole(highlightNode, "gridcell");
highlightNode.index = this._highlightNodes.length;
this._highlightNodes.push(highlightNode);
}
@@ -166,7 +168,7 @@ dojo.declare(
// Callback when a color is selected.
// color: String
// Hex value corresponding to color.
- console.debug("Color selected is: "+color);
+// console.debug("Color selected is: "+color);
},
_onColorDijitclick: function(/*Event*/ evt){
@@ -231,8 +233,7 @@ dojo.declare(
// This selects a color. It triggers the onChange event
// area:
// The area node that covers the color being selected.
- this.value = selectNode.color;
- this.onChange(selectNode.color);
+ this.onChange(this.value = selectNode.color);
},
_navigateByKey: function(increment, typeCount){
@@ -241,7 +242,7 @@ dojo.declare(
// It changes the focus and the highlighed color.
// increment:
// How much the key is navigated.
- // typeCount:
+ // typeCount:
// How many times typematic has fired.
// typecount == -1 means the key is released.
diff --git a/spring-faces/src/main/java/META-INF/dijit/Declaration.js b/spring-faces/src/main/java/META-INF/dijit/Declaration.js
index aeb2ec01..395d67c3 100644
--- a/spring-faces/src/main/java/META-INF/dijit/Declaration.js
+++ b/spring-faces/src/main/java/META-INF/dijit/Declaration.js
@@ -25,8 +25,11 @@ dojo.declare(
var propList = this.defaults||{};
- this.mixins = this.mixins.length ?
- dojo.map(this.mixins, dojo.getObject) :
+ // map array of strings like [ "dijit.form.Button" ] to array of mixin objects
+ // (note that dojo.map(this.mixins, dojo.getObject) doesn't work because it passes
+ // a bogus third argument to getObject(), confusing it)
+ this.mixins = this.mixins.length ?
+ dojo.map(this.mixins, function(name){ return dojo.getObject(name); } ) :
[ dijit._Widget, dijit._Templated ];
if(preambles.length){
@@ -34,17 +37,14 @@ dojo.declare(
propList.preamble = dojo.parser._functionFromScript(preambles[0]);
}
propList.widgetsInTemplate = true;
- propList.templateString = "<"+srcType+" class='"+src.className+"'>"+src.innerHTML.replace(/\%7B/g,"{").replace(/\%7D/g,"}")+""+srcType+">";
+ propList._skipNodeCache = true;
+ propList.templateString = "<"+srcType+" class='"+src.className+"' dojoAttachPoint='"+(src.getAttribute("dojoAttachPoint")||'')+"' dojoAttachEvent='"+(src.getAttribute("dojoAttachEvent")||'')+"' >"+src.innerHTML.replace(/\%7B/g,"{").replace(/\%7D/g,"}")+""+srcType+">";
+ // console.debug(propList.templateString);
// strip things so we don't create stuff under us in the initial setup phase
dojo.query("[dojoType]", src).forEach(function(node){
node.removeAttribute("dojoType");
});
- scripts.forEach(function(s){
- if(!s.getAttribute("event")){
- this.mixins.push(dojo.parser._functionFromScript(s));
- }
- }, this);
// create the new widget class
dojo.declare(
@@ -53,11 +53,12 @@ dojo.declare(
propList
);
+ // do the connects for each