[
https://issues.apache.org/jira/browse/WICKET-4933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sven Meier resolved WICKET-4933.
--------------------------------
Resolution: Fixed
Fix Version/s: 6.5.0
Assignee: Sven Meier
Thanks.
> Palette does not handle disabled choices correctly
> --------------------------------------------------
>
> Key: WICKET-4933
> URL: https://issues.apache.org/jira/browse/WICKET-4933
> Project: Wicket
> Issue Type: Improvement
> Components: wicket-extensions
> Affects Versions: 6.4.0
> Reporter: Andreas Kappler
> Assignee: Sven Meier
> Priority: Minor
> Fix For: 6.5.0
>
>
> 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) {
> dest.appendChild(source.options[i]);
> i--;
> dirty=true;
> }
> }
> return dirty;
> };
> Maybe it makes sense to integrate this into Palette?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira