diff options
author | niko <niko> | 2012-07-04 11:55:50 (GMT) |
---|---|---|
committer | niko <niko> | 2012-07-04 11:55:50 (GMT) |
commit | 183420f033a9f1fd4366c80943ba39c9e758b4a1 (patch) | |
tree | 124ceb5d291b1ecada86b0e2e2170f2fb99fa794 /src | |
parent | d957ef44ac3327647f3d2793b6cc6222367dcbce (diff) | |
download | synckolab-183420f033a9f1fd4366c80943ba39c9e758b4a1.tar.gz |
#24986
Diffstat (limited to 'src')
-rw-r--r-- | src/chrome/content/synckolab/addressbook.js | 59 | ||||
-rw-r--r-- | src/chrome/content/synckolab/calendar.js | 59 | ||||
-rw-r--r-- | src/chrome/content/synckolab/progressWindow.xul | 24 |
3 files changed, 79 insertions, 63 deletions
diff --git a/src/chrome/content/synckolab/addressbook.js b/src/chrome/content/synckolab/addressbook.js index 34f4ea9..d3110df 100644 --- a/src/chrome/content/synckolab/addressbook.js +++ b/src/chrome/content/synckolab/addressbook.js @@ -611,16 +611,13 @@ com.synckolab.AddressBook = { var abcontent; // create a new item in the itemList for display - this.curItemInList = this.doc.createElement("listitem"); - this.curItemInListId = this.doc.createElement("listcell"); - this.curItemInListStatus = this.doc.createElement("listcell"); - this.curItemInListContent = this.doc.createElement("listcell"); + this.curItemInList = this.doc.createElement("treerow"); + this.curItemInListId = this.doc.createElement("treecell"); + this.curItemInListStatus = this.doc.createElement("treecell"); + this.curItemInListContent = this.doc.createElement("treecell"); this.curItemInListId.setAttribute("label", com.synckolab.global.strBundle.getString("unknown")); - this.curItemInListId.setAttribute("value", "-"); this.curItemInListStatus.setAttribute("label", com.synckolab.global.strBundle.getString("parsing")); - this.curItemInListStatus.setAttribute("value", "-"); this.curItemInListContent.setAttribute("label", com.synckolab.global.strBundle.getString("unknown")); - this.curItemInListContent.setAttribute("value", "-"); this.curItemInList.appendChild(this.curItemInListId); this.curItemInList.appendChild(this.curItemInListStatus); @@ -628,7 +625,9 @@ com.synckolab.AddressBook = { if (this.itemList) { - this.itemList.appendChild(this.curItemInList); + var curListItem = this.doc.createElement("treeitem"); + curListItem.appendChild(this.curItemInList); + this.itemList.appendChild(curListItem); com.synckolab.tools.scrollToBottom(this.itemList); } @@ -1073,10 +1072,10 @@ com.synckolab.AddressBook = { this.gConfig.addressBook.modifyCard(cur); // create a new item in the itemList for display - this.curItemInList = this.doc.createElement("listitem"); - this.curItemInListId = this.doc.createElement("listcell"); - this.curItemInListStatus = this.doc.createElement("listcell"); - this.curItemInListContent = this.doc.createElement("listcell"); + this.curItemInList = this.doc.createElement("treerow"); + this.curItemInListId = this.doc.createElement("treecell"); + this.curItemInListStatus = this.doc.createElement("treecell"); + this.curItemInListContent = this.doc.createElement("treecell"); this.curItemInListId.setAttribute("label", this.tools.getUID(curItem)); this.curItemInListStatus.setAttribute("label", com.synckolab.global.strBundle.getString("addToServer")); if (curItem.isMailList) { @@ -1085,17 +1084,18 @@ com.synckolab.AddressBook = { this.curItemInListContent.setAttribute("label", cur.firstName + " " + curItem.lastName + " <" + curItem.primaryEmail + ">"); } - this.curItemInList.appendChild(this.curItemInListId); this.curItemInList.appendChild(this.curItemInListStatus); this.curItemInList.appendChild(this.curItemInListContent); if (this.itemList) { - this.itemList.appendChild(this.curItemInList); + var curListItem = this.doc.createElement("treeitem"); + curListItem.appendChild(this.curItemInList); + this.itemList.appendChild(curListItem); com.synckolab.tools.scrollToBottom(this.itemList); } - + // and write the message abcontent = com.synckolab.addressbookTools.card2Message(curItem, this.gConfig.email, this.gConfig.format); com.synckolab.tools.logMessage("New Card " + this.tools.getUID(curItem), com.synckolab.global.LOG_INFO + com.synckolab.global.LOG_AB); @@ -1149,10 +1149,10 @@ com.synckolab.AddressBook = { } // create a new item in the itemList for display - this.curItemInList = this.doc.createElement("listitem"); - this.curItemInListId = this.doc.createElement("listcell"); - this.curItemInListStatus = this.doc.createElement("listcell"); - this.curItemInListContent = this.doc.createElement("listcell"); + this.curItemInList = this.doc.createElement("treerow"); + this.curItemInListId = this.doc.createElement("treecell"); + this.curItemInListStatus = this.doc.createElement("treecell"); + this.curItemInListContent = this.doc.createElement("treecell"); this.curItemInListId.setAttribute("label", this.tools.getUID(curItem)); this.curItemInListStatus.setAttribute("label", com.synckolab.global.strBundle.getString("localDelete")); if (curItem.isMailList) { @@ -1160,17 +1160,19 @@ com.synckolab.AddressBook = { } else { this.curItemInListContent.setAttribute("label", curItem.firstName + " " + curItem.lastName + " <" + curItem.primaryEmail + ">"); } - + this.curItemInList.appendChild(this.curItemInListId); this.curItemInList.appendChild(this.curItemInListStatus); this.curItemInList.appendChild(this.curItemInListContent); if (this.itemList) { - this.itemList.appendChild(this.curItemInList); + var curListItem = this.doc.createElement("treeitem"); + curListItem.appendChild(this.curItemInList); + this.itemList.appendChild(curListItem); com.synckolab.tools.scrollToBottom(this.itemList); } - + // also remove the local db file since we deleted the contact on the server idxEntry.remove(false); @@ -1180,10 +1182,10 @@ com.synckolab.AddressBook = { { // create a new item in the itemList for display - this.curItemInList = this.doc.createElement("listitem"); - this.curItemInListId = this.doc.createElement("listcell"); - this.curItemInListStatus = this.doc.createElement("listcell"); - this.curItemInListContent = this.doc.createElement("listcell"); + this.curItemInList = this.doc.createElement("treerow"); + this.curItemInListId = this.doc.createElement("treecell"); + this.curItemInListStatus = this.doc.createElement("treecell"); + this.curItemInListContent = this.doc.createElement("treecell"); this.curItemInListId.setAttribute("label", this.tools.getUID(curItem)); this.curItemInListStatus.setAttribute("label", com.synckolab.global.strBundle.getString("addToServer")); if (curItem.isMailList) { @@ -1191,13 +1193,16 @@ com.synckolab.AddressBook = { } else { this.curItemInListContent.setAttribute("label", curItem.firstName + " " + curItem.lastName + " <" + curItem.primaryEmail + ">"); } + this.curItemInList.appendChild(this.curItemInListId); this.curItemInList.appendChild(this.curItemInListStatus); this.curItemInList.appendChild(this.curItemInListContent); if (this.itemList) { - this.itemList.appendChild(this.curItemInList); + var curListItem = this.doc.createElement("treeitem"); + curListItem.appendChild(this.curItemInList); + this.itemList.appendChild(curListItem); com.synckolab.tools.scrollToBottom(this.itemList); } diff --git a/src/chrome/content/synckolab/calendar.js b/src/chrome/content/synckolab/calendar.js index a2f7e75..2374731 100644 --- a/src/chrome/content/synckolab/calendar.js +++ b/src/chrome/content/synckolab/calendar.js @@ -578,20 +578,23 @@ com.synckolab.Calendar = { parseMessage : function (fileContent) { // create a new item in the itemList for display - this.curItemInList = this.doc.createElement("listitem"); - this.curItemInListId = this.doc.createElement("listcell"); - this.curItemInListStatus = this.doc.createElement("listcell"); - this.curItemInListContent = this.doc.createElement("listcell"); + this.curItemInList = this.doc.createElement("treerow"); + this.curItemInListId = this.doc.createElement("treecell"); + this.curItemInListStatus = this.doc.createElement("treecell"); + this.curItemInListContent = this.doc.createElement("treecell"); this.curItemInListId.setAttribute("label", com.synckolab.global.strBundle.getString("unknown")); this.curItemInListStatus.setAttribute("label", com.synckolab.global.strBundle.getString("parsing")); this.curItemInListContent.setAttribute("label", com.synckolab.global.strBundle.getString("unknown")); - + this.curItemInList.appendChild(this.curItemInListId); this.curItemInList.appendChild(this.curItemInListStatus); this.curItemInList.appendChild(this.curItemInListContent); - - if (this.itemList) { - this.itemList.appendChild(this.curItemInList); + + if (this.itemList) + { + var curListItem = this.doc.createElement("treeitem"); + curListItem.appendChild(this.curItemInList); + this.itemList.appendChild(curListItem); com.synckolab.tools.scrollToBottom(this.itemList); } @@ -984,6 +987,8 @@ com.synckolab.Calendar = { // not on the imap acct. if we got this entry in our internal db // it has been deleted on the server and we dont know about it yet if (writeCur) { + var curListItem; + com.synckolab.tools.logMessage("nextUpdate decided to write event:" + cur.id, com.synckolab.global.LOG_CAL + com.synckolab.global.LOG_INFO); cEntry = com.synckolab.tools.file.getSyncDbFile(this.gConfig, cur.id); @@ -1001,39 +1006,45 @@ com.synckolab.Calendar = { } // create a new item in the itemList for display - this.curItemInList = this.doc.createElement("listitem"); - this.curItemInListId = this.doc.createElement("listcell"); - this.curItemInListStatus = this.doc.createElement("listcell"); - this.curItemInListContent = this.doc.createElement("listcell"); + this.curItemInList = this.doc.createElement("treerow"); + this.curItemInListId = this.doc.createElement("treecell"); + this.curItemInListStatus = this.doc.createElement("treecell"); + this.curItemInListContent = this.doc.createElement("treecell"); this.curItemInListId.setAttribute("label", cur.id); this.curItemInListStatus.setAttribute("label", com.synckolab.global.strBundle.getString("localDelete")); this.curItemInListContent.setAttribute("label", cur.title); - + this.curItemInList.appendChild(this.curItemInListId); this.curItemInList.appendChild(this.curItemInListStatus); this.curItemInList.appendChild(this.curItemInListContent); - - if (this.itemList) { - this.itemList.appendChild(this.curItemInList); + + if (this.itemList) + { + curListItem = this.doc.createElement("treeitem"); + curListItem.appendChild(this.curItemInList); + this.itemList.appendChild(curListItem); com.synckolab.tools.scrollToBottom(this.itemList); } } else { // create a new item in the itemList for display - this.curItemInList = this.doc.createElement("listitem"); - this.curItemInListId = this.doc.createElement("listcell"); - this.curItemInListStatus = this.doc.createElement("listcell"); - this.curItemInListContent = this.doc.createElement("listcell"); + this.curItemInList = this.doc.createElement("treerow"); + this.curItemInListId = this.doc.createElement("treecell"); + this.curItemInListStatus = this.doc.createElement("treecell"); + this.curItemInListContent = this.doc.createElement("treecell"); this.curItemInListId.setAttribute("label", cur.id); this.curItemInListStatus.setAttribute("label", com.synckolab.global.strBundle.getString("addToServer")); this.curItemInListContent.setAttribute("label", cur.title); - + this.curItemInList.appendChild(this.curItemInListId); this.curItemInList.appendChild(this.curItemInListStatus); this.curItemInList.appendChild(this.curItemInListContent); - - if (this.itemList) { - this.itemList.appendChild(this.curItemInList); + + if (this.itemList) + { + curListItem = this.doc.createElement("treeitem"); + curListItem.appendChild(this.curItemInList); + this.itemList.appendChild(curListItem); com.synckolab.tools.scrollToBottom(this.itemList); } } diff --git a/src/chrome/content/synckolab/progressWindow.xul b/src/chrome/content/synckolab/progressWindow.xul index a0f4c7c..2cfaee2 100644 --- a/src/chrome/content/synckolab/progressWindow.xul +++ b/src/chrome/content/synckolab/progressWindow.xul @@ -70,19 +70,18 @@ function setCloseWindow() { <spacer style="height: 10px"/> - <listbox id="itemList" flex="1"> - <listhead> - <listheader label="id"/> - <listheader label="&synckolab.progress.status;"/> - <listheader label="&synckolab.progress.content;"/> - </listhead> + <tree flex="1"> + <treecols> + <treecol label="id" flex="1"/> + <splitter class="tree-splitter"/> + <treecol label="&synckolab.progress.status;"/> + <splitter class="tree-splitter"/> + <treecol label="&synckolab.progress.content;" flex="1"/> + </treecols> + <treechildren id="itemList"> + </treechildren> + </tree> - <listcols> - <listcol flex="1" /> - <listcol /> - <listcol flex="1" width="200px"/> - </listcols> - </listbox> <spacer style="height: 10px"/> <hbox> <label value="&synckolab.progress.CurrentProgress;"/> @@ -95,5 +94,6 @@ function setCloseWindow() { <button id="cancel-button" default="true" oncommand="closeSync()" label="&synckolab.progress.Cancel;"/> </hbox> <checkbox id="closeWnd" style="width: 300px" oncommand="setCloseWindow()" label="&synckolab.settings.CloseWindow;" /> + </vbox> </window>
\ No newline at end of file |