fix for #51862. thanks to hyatt for the performance suggestion.

move the onclick handler out of the tree cell.  sr=mscott
This commit is contained in:
sspitzer%netscape.com 2000-12-14 21:43:51 +00:00
Родитель 3e55414ad1
Коммит efd7ca3b3e
2 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -259,7 +259,7 @@ function StateChanged(name,state)
gChangeTable[gServerURI][name] = state;
}
else {
var oldValue = gChangeTable[gServerURI,name];
var oldValue = gChangeTable[gServerURI][name];
if (oldValue != state) {
gChangeTable[gServerURI][name] = undefined;
}
@ -305,6 +305,7 @@ function ReverseStateFromNode(node)
SetState(name, state);
}
function SubscribeOnClick(event)
{
var t = event.originalTarget;
@ -329,6 +330,12 @@ function SubscribeOnClick(event)
}
}
else {
// if the user clicks on the subscribe check box, we handle it here
if (t.localName == "image") {
ReverseStateFromNode(t.parentNode.parentNode.parentNode);
return;
}
var name = t.parentNode.parentNode.getAttribute('name');
if (name && (name.length > 0)) {
gNameField.setAttribute('value',name);

Просмотреть файл

@ -98,7 +98,7 @@ Rights Reserved.
<treeitem uri="..." name="rdf:http://home.netscape.com/NC-rdf#Name" Subscribed="rdf:http://home.netscape.com/NC-rdf#Subscribed" ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
<treerow>
<treecell indent="true" class="treecell-indent tree-cell-subscribe-icon" value="rdf:http://home.netscape.com/NC-rdf#LeafName" ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"/>
<treecell class="treecell-image subscribedcol" allowevents="true" onclick="return top.ReverseStateFromNode(event.originalTarget.parentNode.parentNode.parentNode)" value="rdf:http://home.netscape.com/NC-rdf#Subscribed"/>
<treecell class="treecell-image subscribedcol" value="rdf:http://home.netscape.com/NC-rdf#Subscribed" allowevents="true"/>
<treecell value="rdf:http://home.netscape.com/NC-rdf#TotalMessages"/>
</treerow>
</treeitem>