Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
6.4.0
-
None
Description
It is possible to add choices to a Palette with the disabled HTML attribute. This attribute is respected by all modern browsers and prevents the selection of disabled choices.
However Palette also has a double-click handler, which will ignore the disabled attribute and add the choice to the selection.
The Javascript palette.js can be modified to prevent disabled choices from being added to the selection:
Wicket.Palette.moveHelper=function(source, dest) {
var dirty=false;
for (var i=0;i<source.options.length;i++) {
if (source.options[i].selected && !source.options[i].disabled)
}
return dirty;
};
Maybe it makes sense to integrate this into Palette?