* * 3 1) numExistingCachedAddresses = (numExistingCachedAddresses + 1)/ 2; var index = 0; var numAddressesAdded = 0; var emailAddressNode; var commaNode; while (numAddressesAdded < numExistingCachedAddresses && numAddressesAdded < aNumAddressesToShow) { if (index && numExistingCachedAddresses > 1) { commaNode = aAddressesNode.childNodes[index++]; if (commaNode) commaNode.removeAttribute('collapsed'); } // get the node pointed to by index emailAddressNode = aAddressesNode.childNodes[index++]; this.updateEmailAddressNode(emailAddressNode, this.mAddresses[numAddressesAdded]); emailAddressNode.removeAttribute('collapsed'); numAddressesAdded++; } // if we have added all of our elements but we still have more cached items in this address node // then make sure the extra cached copies are collapsed... numExistingCachedAddresses = aAddressesNode.childNodes.length; // reset while (index < numExistingCachedAddresses) { aAddressesNode.childNodes[index++].setAttribute('collapsed', true); } return this.mAddresses.length - numAddressesAdded; ]]> numAddresses) // then show all aNumAddressesToShow = numAddresses; // before we try to create email address nodes, try to leverage any cached nodes... var remainder = this.fillCachedAddresses(aAddressesNode, aNumAddressesToShow); var index = numAddresses - remainder; while (index < numAddresses && index < aNumAddressesToShow) { var newAddressNode = document.createElement("mail-emailaddress"); if (index) { var textNode = document.createElement("text"); textNode.setAttribute("value", ", "); textNode.setAttribute("class", "emailSeparator"); aAddressesNode.appendChild(textNode); } var itemInDocument = aAddressesNode.appendChild(newAddressNode); this.updateEmailAddressNode(itemInDocument, this.mAddresses[index]); index++; } ]]> aNumAddressesToShow) this.toggleIcon.removeAttribute('collapsed'); else this.toggleIcon.setAttribute('collapsed', true); ]]> numItemsToPreserve)) { aParentNode.removeChild(aParentNode.childNodes[numItemsInNode-1]); numItemsInNode = numItemsInNode - 1; } ]]> null Components.interfaces.nsMsgSearchAttrib.OtherHeader && hdrs) strings[i] = hdrsArray[j++]; else strings[i] = this.stringBundle.GetStringFromID(ids[i]); } return strings; ]]> 0) menulist.selectedItem = dataItems[0]; // now notify targets of new parent's value var targets = this.targets; if (targets) { for (var i=0; i< targets.length; i++) { targets[i].parentValue = val; } } else { //dump("Doh! No targets!\n"); } return val; ]]> null null null 0) children[1].selectedItem = matchingPriority[0]; } else if (attrib == nsMsgSearchAttrib.MsgStatus) { var matchingStatus = children[2].getElementsByAttribute("value", val.status); if (matchingStatus.length > 0) children[2].selectedItem = matchingStatus[0]; } else if (attrib == nsMsgSearchAttrib.AgeInDays) children[0].value = val.age; else if (attrib == nsMsgSearchAttrib.Date) children[3].value = convertPRTimeToString(val.date); else children[0].value = val.str; return val; ]]> null null 0) booleanNodes[i].setAttribute("value", staticString); } catch (ex) { /* no error, means string not found */} } ]]> nsMsgSearchAttrib.OtherHeader && this.searchAttribute < nsMsgSearchAttrib.kNumMsgSearchAttributes) searchTerm.arbitraryHeader = this.searchattribute.label; searchTerm.op = this.searchoperator.value; if (this.searchvalue.value) this.searchvalue.save(); else this.searchvalue.saveTo(searchTerm.value); searchTerm.value = this.searchvalue.value; searchTerm.booleanAnd = this.booleanAnd; ]]>