Closed Bug 109908 Opened 23 years ago Closed 23 years ago

card pane should look different when selecting an mailing list in the results pane

Categories

(SeaMonkey :: MailNews: Address Book & Contacts, defect, P3)

x86
Windows 2000
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.9

People

(Reporter: sspitzer, Assigned: shliang)

References

Details

(Whiteboard: nab-mlist)

Attachments

(6 files, 3 obsolete files)

card pane should look different when selecting an mailing list in the results 
pane.
Attached image Example
Seth, looks great. Thanks for doing this. If possible, could the title of the
Card pane be "Mailing List: <name>" and the Addresses be listed vertically as
links? If not, i can file a separate rfe bug. Thanks.
Seth, this is a dup of bug 47205. Up to you if you want to dup this one or that 
one. 

One more thing from 47205, Display Name should be "List Name".
*** Bug 47205 has been marked as a duplicate of this bug. ***
I've got the fixes for

1) "Mailing List: <name>"
2) Display Name should be "List Name".

when this lands, I'll log another rfe on the way you'd like the address to 
appear.

Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.9
Target Milestone: mozilla0.9.9 → mozilla0.9.7
moving to 0.9.8, the AB_OUTLINER_BRANCH should land in early 0.9.8
Target Milestone: mozilla0.9.7 → mozilla0.9.8
Keywords: nsbeta1
Whiteboard: nab-mlist
I've landed, but I'll leep this open until I match the image that jglick 
provided.
Target Milestone: mozilla0.9.8 → mozilla0.9.9
Attached image Remaining Issue
Only remaining issue: display addresses vertically, not horizontally (as seen
here).
Asking Shuehan to fix this bug. 
Keywords: nsbeta1nsbeta1+
Priority: -- → P3
moving to 1.0.1
Target Milestone: mozilla0.9.9 → mozilla1.0.1
Attached patch patch (obsolete) — Splinter Review
patch to display emails vertically 

changes to abCardViewOverlay.js and abCardViewOverlay.css
some of the stuff in that patch doesn't belong there...sorry
reassigning to shliang.  Moving to 0.9.9 since there's a patch. Bhuvan, could
you review the patch when you get the chance.
Assignee: sspitzer → shliang
Status: ASSIGNED → NEW
Target Milestone: mozilla1.0.1 → mozilla0.9.9
Shuehan,

Changes to abCardViewOverlay.css are not found in the patch posted. Can you
repost the patch in here..Also use diff -uw so that white space changes are
ignored (but make sure you use right editor when you add whitespaces).

Also, please post a screenshot when you update.

thanks.
oh i meant abCardViewOverlay.xul...sorry for the confusion. i'll repost the
patch and a screenshot.
Attached patch patch (obsolete) — Splinter Review
Attached image screenshot (obsolete) —
Shuehan, this looks great. Thanks for the fix.

The individual addresses should probably be links as well though.(User could 
click on an individual "Addresses" and launch a new message compose to that 
person only.) see attachment 57610 [details].
Attachment #67556 - Attachment is obsolete: true
Attachment #67948 - Attachment is obsolete: true
Attachment #67950 - Attachment is obsolete: true
Attached image screenshot
Comment on attachment 68175 [details] [diff] [review]
adding links and displaying names

r=bhuvan
Attachment #68175 - Flags: review+
Thanks Shuehan. :-)
accepting for shuehan during triage. 
Status: NEW → ASSIGNED
Comment on attachment 68175 [details] [diff] [review]
adding links and displaying names

>Index: abCardViewOverlay.js
>===================================================================
>RCS file: /cvsroot/mozilla/mailnews/addrbook/resources/content/abCardViewOverlay.js,v
>retrieving revision 1.23
>diff -u -w -r1.23 abCardViewOverlay.js
>--- abCardViewOverlay.js	27 Dec 2001 23:05:48 -0000	1.23
>+++ abCardViewOverlay.js	6 Feb 2002 20:16:32 -0000
>@@ -226,8 +226,7 @@
>   	cvSetVisible(data.cvbDescription, visible);
> 
>     // Addresses section
>-    var addresses = GetAddressesFromURI(card.mailListURI);
>-	  visible = cvSetNode(data.cvAddresses, addresses)
>+	  visible = cvAddAddressNodes(data.cvAddresses, card.mailListURI);
>   	cvSetVisible(data.cvbAddresses, visible);
>     
>     // Other section, not shown for mailing lists.
>@@ -345,6 +344,46 @@
> 		cvSetVisible(node, visible);
> 	}
> 
>+	return visible;
>+}
>+
>+function cvAddAddressNodes(node, uri)
>+{
>+  var visible = false;
>+	if ( node )
>+	{
>+    var displayName = ""; 
>+    var address = "";
>+
>+    var editList = GetDirectoryFromURI(uri);
>+    var addressList = editList.addressLists;
>+      
>+    if (addressList) {
>+      var total = addressList.Count();
>+      if (total > 0) {
>+        for (var i = node.childNodes.length - 1; i >= 0; i--) {
>+          node.removeChild(node.childNodes[i]);
>+        }
>+        for (var i = 0;  i < total; i++ ) {
>+      		var descNode = document.createElement("description");   
>+          address = addressList.GetElementAt(i).QueryInterface(Components.interfaces.nsIAbCard).primaryEmail;    
>+          displayName = addressList.GetElementAt(i).QueryInterface(Components.interfaces.nsIAbCard).displayName;  
>+          descNode.setAttribute("class", "CardViewLink");
>+          node.appendChild(descNode);         
>+          
>+          var linkNode = document.createElementNS("http://www.w3.org/1999/xhtml", "a");
>+          linkNode.setAttribute("id", "addr#" + i);
>+          linkNode.setAttribute("href", "mailto:" + address);
>+          descNode.appendChild(linkNode);
>+          
>+          var textNode = document.createTextNode(displayName + " <" + address + ">");
>+          linkNode.appendChild(textNode);
>+        }
>+			  visible = true;
>+      }
>+		}    
>+		cvSetVisible(node, visible);
>+	}
> 	return visible;
> }
> 
>Index: abCardViewOverlay.xul
>===================================================================
>RCS file: /cvsroot/mozilla/mailnews/addrbook/resources/content/abCardViewOverlay.xul,v
>retrieving revision 1.24
>diff -u -w -r1.24 abCardViewOverlay.xul
>--- abCardViewOverlay.xul	22 Dec 2001 02:04:48 -0000	1.24
>+++ abCardViewOverlay.xul	6 Feb 2002 20:16:32 -0000
>@@ -35,7 +35,7 @@
> 
> 		<hbox style="width:100%" flex="1">
> 			
>-			<vbox flex="1" style="width:200px">
>+			<vbox flex="1">
> 				<vbox id="cvbName" class="cardViewGroup">
> 					  <description class="CardViewHeading" id="cvhName"/>
>             <description class="CardViewLink" id="cvListNameBox">
>@@ -51,14 +51,18 @@
>             </description>
> 				</vbox>
> 				
>-				<vbox id="cvbHome" class="cardViewGroup">
>+				<vbox id="cvbHome" class="cardViewGroup" flex="1">
>           <description class="CardViewHeading" id="cvhHome">&home.heading;</description>
>+          <hbox>
>+            <vbox>
>           <description class="CardViewText" id="cvHomeAddress"/>
>           <description class="CardViewText" id="cvHomeAddress2"/>
>           <description class="CardViewText" id="cvHomeCityStZip"/>
>           <description class="CardViewText" id="cvHomeCountry"/>
>-          <hbox id="cvbHomeMapItBox" autostretch="never">
>+            </vbox>
>+            <vbox id="cvbHomeMapItBox" pack="end">
>             <button id="cvHomeMapIt" url="" label="&mapItButton.label;" onclick="MapIt('cvHomeMapIt');"/>
>+            </vbox>
>           </hbox>
>           <description class="CardViewLink" id="cvHomeWebPageBox">
> 					  <html:p><html:a onclick="return openLink('cvHomeWebPage');" href="" id="cvHomeWebPage"/></html:p>
>@@ -81,13 +85,14 @@
> 
>         <vbox id="cvbAddresses" class="cardViewGroup">
>                                         <description class="CardViewHeading" id="cvhAddresses">&addresses.heading;</description>
>-                                        <description class="CardViewText" id="cvAddresses"/>
>+                                        <vbox id="cvAddresses"/>                                                     
>+                                        
> 				</vbox>
> 			</vbox>
> 			
> 			<spacer style="width:20px"/>
> 
>-			<vbox flex="1" style="width:200px">
>+			<vbox flex="1">
> 				<vbox id="cvbPhone" class="cardViewGroup">
>                                         <description class="CardViewHeading" id="cvhPhone">&phone.heading;</description>
>                                         <description class="CardViewText" id="cvPhWork"/>
>@@ -102,12 +107,16 @@
>                                         <description class="CardViewText" id="cvJobTitle"/>
>                                         <description class="CardViewText" id="cvDepartment"/>
>                                         <description class="CardViewText" id="cvCompany"/>
>+                                        <hbox>
>+                                          <vbox>
>                                         <description class="CardViewText" id="cvWorkAddress"/>
>                                         <description class="CardViewText" id="cvWorkAddress2"/>
>                                         <description class="CardViewText" id="cvWorkCityStZip"/>
>                                         <description class="CardViewText" id="cvWorkCountry"/>
>-                                        <hbox id="cvbWorkMapItBox" autostretch="never">
>+                                          </vbox>
>+                                          <vbox id="cvbWorkMapItBox" pack="end">
>                                           <button id="cvWorkMapIt" url="" label="&mapItButton.label;" onclick="MapIt('cvWorkMapIt');"/>
>+                                          </vbox>
>                                         </hbox>
>                                         <description class="CardViewLink" id="cvWorkWebPageBox">
> 						                              <html:p><html:a onclick="return openLink('cvWorkWebPage');" href="" id="cvWorkWebPage"/></html:p>
whoops, sorry.  here comes the review..
Comment on attachment 68175 [details] [diff] [review]
adding links and displaying names

>Index: abCardViewOverlay.js
>===================================================================
>RCS file: /cvsroot/mozilla/mailnews/addrbook/resources/content/abCardViewOverlay.js,v
>retrieving revision 1.23
>diff -u -w -r1.23 abCardViewOverlay.js
>--- abCardViewOverlay.js	27 Dec 2001 23:05:48 -0000	1.23
>+++ abCardViewOverlay.js	6 Feb 2002 20:16:32 -0000
>@@ -226,8 +226,7 @@
>   	cvSetVisible(data.cvbDescription, visible);
> 
>     // Addresses section
>-    var addresses = GetAddressesFromURI(card.mailListURI);
>-	  visible = cvSetNode(data.cvAddresses, addresses)
>+	  visible = cvAddAddressNodes(data.cvAddresses, card.mailListURI);
>   	cvSetVisible(data.cvbAddresses, visible);
>     
>     // Other section, not shown for mailing lists.
>@@ -345,6 +344,46 @@
> 		cvSetVisible(node, visible);
> 	}
> 
>+	return visible;
>+}
>+
>+function cvAddAddressNodes(node, uri)
>+{
>+  var visible = false;
>+	if ( node )
>+	{
>+    var displayName = ""; 
>+    var address = "";
>+
>+    var editList = GetDirectoryFromURI(uri);
>+    var addressList = editList.addressLists;
>+      
>+    if (addressList) {
>+      var total = addressList.Count();
>+      if (total > 0) {
>+        for (var i = node.childNodes.length - 1; i >= 0; i--) {
>+          node.removeChild(node.childNodes[i]);
>+        }
>+        for (var i = 0;  i < total; i++ ) {
>+      		var descNode = document.createElement("description");   
>+          address = addressList.GetElementAt(i).QueryInterface(Components.interfaces.nsIAbCard).primaryEmail;    
>+          displayName = addressList.GetElementAt(i).QueryInterface(Components.interfaces.nsIAbCard).displayName;  
>+          descNode.setAttribute("class", "CardViewLink");
>+          node.appendChild(descNode);         
>+          
>+          var linkNode = document.createElementNS("http://www.w3.org/1999/xhtml", "a");
>+          linkNode.setAttribute("id", "addr#" + i);
>+          linkNode.setAttribute("href", "mailto:" + address);
>+          descNode.appendChild(linkNode);
>+          
>+          var textNode = document.createTextNode(displayName + " <" + address + ">");
>+          linkNode.appendChild(textNode);
>+        }
>+			  visible = true;
>+      }
>+		}    
>+		cvSetVisible(node, visible);
>+	}
> 	return visible;
> }
> 
>Index: abCardViewOverlay.xul
>===================================================================
>RCS file: /cvsroot/mozilla/mailnews/addrbook/resources/content/abCardViewOverlay.xul,v
>retrieving revision 1.24
>diff -u -w -r1.24 abCardViewOverlay.xul
>--- abCardViewOverlay.xul	22 Dec 2001 02:04:48 -0000	1.24
>+++ abCardViewOverlay.xul	6 Feb 2002 20:16:32 -0000
>@@ -35,7 +35,7 @@
> 
> 		<hbox style="width:100%" flex="1">
> 			
>-			<vbox flex="1" style="width:200px">
>+			<vbox flex="1">
> 				<vbox id="cvbName" class="cardViewGroup">
> 					  <description class="CardViewHeading" id="cvhName"/>
>             <description class="CardViewLink" id="cvListNameBox">
>@@ -51,14 +51,18 @@
>             </description>
> 				</vbox>
> 				
>-				<vbox id="cvbHome" class="cardViewGroup">
>+				<vbox id="cvbHome" class="cardViewGroup" flex="1">
>           <description class="CardViewHeading" id="cvhHome">&home.heading;</description>
>+          <hbox>
>+            <vbox>
>           <description class="CardViewText" id="cvHomeAddress"/>
>           <description class="CardViewText" id="cvHomeAddress2"/>
>           <description class="CardViewText" id="cvHomeCityStZip"/>
>           <description class="CardViewText" id="cvHomeCountry"/>
>-          <hbox id="cvbHomeMapItBox" autostretch="never">
>+            </vbox>
>+            <vbox id="cvbHomeMapItBox" pack="end">
>             <button id="cvHomeMapIt" url="" label="&mapItButton.label;" onclick="MapIt('cvHomeMapIt');"/>
>+            </vbox>
>           </hbox>
>           <description class="CardViewLink" id="cvHomeWebPageBox">
> 					  <html:p><html:a onclick="return openLink('cvHomeWebPage');" href="" id="cvHomeWebPage"/></html:p>
>@@ -81,13 +85,14 @@
> 
>         <vbox id="cvbAddresses" class="cardViewGroup">
>                                         <description class="CardViewHeading" id="cvhAddresses">&addresses.heading;</description>
>-                                        <description class="CardViewText" id="cvAddresses"/>
>+                                        <vbox id="cvAddresses"/>                                                     
>+                                        
> 				</vbox>
> 			</vbox>
> 			
> 			<spacer style="width:20px"/>
> 
>-			<vbox flex="1" style="width:200px">
>+			<vbox flex="1">
> 				<vbox id="cvbPhone" class="cardViewGroup">
>                                         <description class="CardViewHeading" id="cvhPhone">&phone.heading;</description>
>                                         <description class="CardViewText" id="cvPhWork"/>
>@@ -102,12 +107,16 @@
>                                         <description class="CardViewText" id="cvJobTitle"/>
>                                         <description class="CardViewText" id="cvDepartment"/>
>                                         <description class="CardViewText" id="cvCompany"/>
>+                                        <hbox>
>+                                          <vbox>
>                                         <description class="CardViewText" id="cvWorkAddress"/>
>                                         <description class="CardViewText" id="cvWorkAddress2"/>
>                                         <description class="CardViewText" id="cvWorkCityStZip"/>
>                                         <description class="CardViewText" id="cvWorkCountry"/>
>-                                        <hbox id="cvbWorkMapItBox" autostretch="never">
>+                                          </vbox>
>+                                          <vbox id="cvbWorkMapItBox" pack="end">
>                                           <button id="cvWorkMapIt" url="" label="&mapItButton.label;" onclick="MapIt('cvWorkMapIt');"/>
>+                                          </vbox>
>                                         </hbox>
>                                         <description class="CardViewLink" id="cvWorkWebPageBox">
> 						                              <html:p><html:a onclick="return openLink('cvWorkWebPage');" href="" id="cvWorkWebPage"/></html:p>
well, damn it.  there's a bug in mozilla where whenever I do "edit as comment"
it submits!

I'll do my review the old fashion way, as soon as I log that bug.
Comment on attachment 68175 [details] [diff] [review]
adding links and displaying names

sr=sspitzer

how does it look when you've got a lot of addresses?  do we get a reasonable
scrollbar?
Attached image screenshot 2
fixed
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Trunk build 2002-03-01: WinMe, Linux RH 7.1, Mac 9.1
Verified Fixed.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: