Fixes to bustage of the select addresses dialog. Regression 20730 (select addresses dialog broken because of change to treecell), also fixed select addresses dialog bugs 20717, 20720, 19604. r=ducarroz

This commit is contained in:
hangas%netscape.com 1999-12-04 00:53:53 +00:00
Родитель b930468a1d
Коммит ec38e9ae58
3 изменённых файлов: 18 добавлений и 19 удалений

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

@ -32,6 +32,8 @@ Rights Reserved.
style="width:100%; height:100%"
ref="abdirectory://"
datasources="rdf:addressdirectory"
rdf:containment="http://home.netscape.com/NC-rdf#child"
rdf:ignore="http://home.netscape.com/NC-rdf#CardChild"
onselect="DirPaneSelectionChange(); document.commandDispatcher.updateCommands('tree-select');"
onblur="goOnEvent(this,'blur')"
allownegativeassertions="false"
@ -51,9 +53,7 @@ Rights Reserved.
<treecol rdf:resource="http://home.netscape.com/NC-rdf#DirName"/>
<treechildren id="dirTreeBody"
rdf:containment="http://home.netscape.com/NC-rdf#child"
rdf:ignore="http://home.netscape.com/NC-rdf#CardChild">
<treechildren id="dirTreeBody">
</treechildren>
</tree>

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

@ -79,25 +79,25 @@ function SelectAddressOKButton()
cell = row.childNodes[0];
if ( cell.childNodes && cell.childNodes.length )
{
text = cell.childNodes[0];
if ( text && text.data && text.data.length )
text = cell.getAttribute('value');
if ( text )
{
switch ( text.data[0] )
switch ( text[0] )
{
case prefixTo[0]:
if ( toAddress )
toAddress += ", ";
toAddress += text.data.substring(prefixTo.length, text.data.length);
toAddress += text.substring(prefixTo.length, text.length);
break;
case prefixCc[0]:
if ( ccAddress )
ccAddress += ", ";
ccAddress += text.data.substring(prefixCc.length, text.data.length);
ccAddress += text.substring(prefixCc.length, text.length);
break;
case prefixBcc[0]:
if ( bccAddress )
bccAddress += ", ";
bccAddress += text.data.substring(prefixBcc.length, text.data.length);
bccAddress += text.substring(prefixBcc.length, text.length);
break;
}
}
@ -159,9 +159,8 @@ function AddAddressIntoBucket(address)
var item = document.createElement('treeitem');
var row = document.createElement('treerow');
var cell = document.createElement('treecell');
var text = document.createTextNode(address);
cell.setAttribute('value', address);
cell.appendChild(text);
row.appendChild(cell);
item.appendChild(row);
body.appendChild(item);

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

@ -32,8 +32,8 @@ Rights Reserved.
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&selectAddressWindow.title;"
class="dialog"
width="640" height="480"
style="width:100%; height:100%; padding:0px"
width="680" height="480"
style="padding:0px"
onload="OnLoadSelectAddress()"
align="vertical">
@ -47,7 +47,7 @@ Rights Reserved.
<keyset id="keyset"/>
<!-- Thin box across top, show names containing & stop, search buttons -->
<box align="horizontal" style="width:100%; padding:0px; padding-top:2px; padding-bottom:2px">
<box align="horizontal" style="padding:0px; padding-top:2px; padding-bottom:2px">
<html:div flex="100%" style="vertical-align: middle;">
<html:label for="searchtext" tabindex="0">&search.label;</html:label>
<html:input type="text" id="searchtext" flex="100%"/>
@ -67,9 +67,9 @@ Rights Reserved.
<!-- dir tree -->
<box align="horizontal"
style="width:200px; height:100%; background-color:white; border-right:solid black 1px">
style="width:180px; height:100%; background-color:white; border-right:solid black 1px">
<!-- FIX ME - div is hack to make tree scroll properly -->
<html:div style="width:100px;height:100px" flex="1">
<html:div style="width:100px; height:100px; min-width:10px" flex="1">
<tree id="dirTree"/>
</html:div>
</box>
@ -84,13 +84,13 @@ Rights Reserved.
<box flex="100%" align="vertical"
style="background-color:white; border-bottom:solid black 1px">
<!-- FIX ME - div is hack to make tree scroll properly -->
<html:div style="width:100px;height:100px" flex="1">
<html:div style="width:100px; height:100px; min-width:10px" flex="1">
<tree id="resultsTree"/>
</html:div>
</box>
<!-- Box that holds (to,cc,bcc buttons) -->
<box align="horizontal" style="padding:0.3em; border-bottom:solid black 1px">
<box align="horizontal" style="padding:0.3em; border-bottom:solid black 1px; min-width:10px">
<spring flex="50%"/>
<titledbutton id="toButton" value="&toButton.label;" class="dialog push" onclick="SelectAddressToButton()"/>
<spring style="width:10px"/>
@ -105,7 +105,7 @@ Rights Reserved.
<!-- Address bucket -->
<box align="vertical" style="height:170px; background-color:white; border-top:solid black 1px">
<html:div style="width:100px;height:100px" flex="1">
<html:div style="width:100px;height:100px; min-width:10px" flex="1">
<tree id="addressBucket" style="width:100%; height:100%">
<treecol style="width:100%"/>
<treechildren id="bucketBody"/>