[PLIP-Advisories] [Plone] #11017: Tags MultiSelectionWidget w/scrollbar & checkboxes
Change notifications for Plone PLIPs on Trac.
plone-plip-advisories at lists.plone.org
Mon Jun 20 13:57:29 UTC 2011
#11017: Tags MultiSelectionWidget w/scrollbar & checkboxes
-------------------------------------------+--------------------------------
Reporter: rmattb | Owner: RMattB
Type: PLIP | Status: reopened
Priority: minor | Milestone: 4.1
Component: User Experience and Interface | Resolution:
Keywords: |
-------------------------------------------+--------------------------------
Changes (by potzenheimer):
* status: closed => reopened
* resolution: fixed =>
Comment:
Just addressed #8792 (keyword widget: performance issue in edit mode)
which is still an issue in `Products.Archetypes` trunk. Appologies for
highjacking this PLIP ticket, but since this PLIP is scheduled for
inclusion in Plone 4.1 fixing this potential performance problem is not
only overdue but also mission critical.
{{{
Index:
Products.Archetypes/Products/Archetypes/skins/archetypes/widgets/keyword.pt
===================================================================
---
Products.Archetypes/Products/Archetypes/skins/archetypes/widgets/keyword.pt
(revision 13688)
+++
Products.Archetypes/Products/Archetypes/skins/archetypes/widgets/keyword.pt
(working copy)
@@ -29,7 +29,9 @@
allowedKeywords python:
context.collectKeywords(fieldName, field.accessor, widget.vocab_source);
site_props
context/portal_properties/site_properties|nothing;
format widget/format | string:select;
- allowRolesToAddKeywords
site_props/allowRolesToAddKeywords|nothing;">
+ allowRolesToAddKeywords
site_props/allowRolesToAddKeywords|nothing;
+ selectionview context/@@at_selection_widget;
+ selection
python:selectionview.getSelected(allowedKeywords, contentKeywords);">
<div tal:condition="allowedKeywords"
id="existingTagsSection">
<tal:comment tal:replace="nothing">
@@ -68,7 +70,7 @@
name
string:${fieldName}_existing_keywords:list;">
<option value="#" tal:repeat="keyword
allowedKeywords"
tal:content="keyword"
tal:attributes="value keyword;
- selected
python:test(context.unicodeTestIn(keyword, value), 'selected', None)">
+ selected python:keyword in selection
and 'selected' or None;">
An existing tag
</option>
</select>
@@ -103,7 +105,7 @@
type string:checkbox;
name
string:${fieldName}_existing_keywords:list;
id
string:${fieldName}_${repeat/keyword/number};
- checked
python:test(context.unicodeTestIn(keyword, value), 'checked', None);
+ checked python:keyword in
selection and 'checked' or None;
value keyword" />
<label
tal:content="keyword"
@@ -140,7 +142,7 @@
rows="4"
tal:attributes="id
string:${fieldName}_keywords;
name
string:${fieldName}_keywords:lines;"
- tal:define="subject python:[item for
item in value if not context.unicodeTestIn(item,allowedKeywords)]"
+ tal:define="subject python:[item for
item in value if not item in selection]"
tal:content="python:'\n'.join(subject)">
A new tag
</textarea>
}}}
--
Ticket URL: <http://dev.plone.org/plone/ticket/11017#comment:74>
Plone <http://plone.org>
Plone Enterprise Content Management System
More information about the PLIP-Advisories
mailing list