Fixing 44782, but with my original fixes intact. r=bienvenu.

git-svn-id: svn://10.0.0.236/trunk@73823 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bryner%uiuc.edu
2000-07-07 18:33:16 +00:00
parent d4be327220
commit fe224fa891

View File

@@ -280,15 +280,54 @@
<binding id="treerows">
<content flex="1"/>
<handlers>
<handler type="click" shift="false" control="false"
value="if (event.target.localName == 'treecell')
parentNode.selectItem(event.target.parentNode.parentNode);"/>
<handler type="click" shift="false" control="true"
value="if (event.target.localName == 'treecell')
parentNode.toggleItemSelection(event.target.parentNode.parentNode);"/>
<handler type="click" shift="true" control="false"
value="if (event.target.localName == 'treecell')
parentNode.selectItemRange(null, event.target.parentNode.parentNode);"/>
<!-- If there is no modifier key, we select on mousedown, not
click, so that drags work correctly. -->
<handler type="mousedown" shift="false" control="false">
<![CDATA[
if (event.target.localName == 'treecell') {
var isSelected = event.target.parentNode.parentNode.getAttribute("selected");
if (!isSelected) {
parentNode.selectItem(event.target.parentNode.parentNode);
}
parentNode.currentItem = event.target.parentNode.parentNode;
}
]]>
</handler>
<!-- On a click (up+down on the same item), deselect everything
except this item. -->
<handler type="click" shift="false" control="false">
<![CDATA[
if (event.target.localName == 'treecell') {
var selectedItems = parentNode.selectedItems;
var i = 0;
while (i < selectedItems.length) {
if (selectedItems[i] != event.target.parentNode.parentNode)
parentNode.removeItemFromSelection(selectedItems[i]);
else
i++;
}
}
]]>
</handler>
<handler type="click" shift="false" control="true">
<![CDATA[
if (event.target.localName == 'treecell') {
parentNode.toggleItemSelection(event.target.parentNode.parentNode);
parentNode.currentItem = event.target.parentNode.parentNode;
}
]]>
</handler>
<handler type="click" shift="true" control="false">
<![CDATA[
if (event.target.localName == 'treecell') {
parentNode.selectItemRange(null, event.target.parentNode.parentNode);
parentNode.currentItem = event.target.parentNode.parentNode;
}
]]>
</handler>
<handler type="click" shift="false" control="false" clickcount="2">
<![CDATA[
if (event.target.localName == 'treecell') {