summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorniko <niko>2012-10-09 23:35:41 (GMT)
committerniko <niko>2012-10-09 23:35:41 (GMT)
commit793b6fb9135e641f651715bd94f45a1ba3bbf617 (patch)
tree20b35e7abbec20605e768544f00606e7ff8c598b /src
parent9254ccd9792d7dee7638025f618db6d18e5a945b (diff)
downloadsynckolab-793b6fb9135e641f651715bd94f45a1ba3bbf617.tar.gz
version to 2.9.0 to show upgrade path to 3.0
Diffstat (limited to 'src')
-rw-r--r--src/changelog.txt5
-rw-r--r--src/chrome/content/synckolab/addressbookTools.js21
-rw-r--r--src/chrome/content/synckolab/config.js2
-rw-r--r--src/chrome/content/synckolab/tools.js43
-rw-r--r--src/chrome/content/synckolab/wndConfig.xul2
5 files changed, 17 insertions, 56 deletions
diff --git a/src/changelog.txt b/src/changelog.txt
index 1c4eefd..0d202c6 100644
--- a/src/changelog.txt
+++ b/src/changelog.txt
@@ -1,3 +1,8 @@
+SyncKolab 2.9.0
+===============
+* Add support for kolab3
+* Add unit test framework
+
SyncKolab 2.0.2
===============
* #24933 hide folders does not work
diff --git a/src/chrome/content/synckolab/addressbookTools.js b/src/chrome/content/synckolab/addressbookTools.js
index 0af8d1d..601e958 100644
--- a/src/chrome/content/synckolab/addressbookTools.js
+++ b/src/chrome/content/synckolab/addressbookTools.js
@@ -1261,8 +1261,8 @@ synckolab.addressbookTools.list2Kolab3 = function (card, fields) {
xml += "<vlist version=\"1.0\" >\n";
xml += " <product-id>SyncKolab " + synckolab.config.version + ", Kolab resource</product-id>\n";
xml += " <uid>" + this.getUID(card) + "</uid>\n";
- xml += " <creation-date>" + synckolab.tools.text.date2String(new Date(this.getCardProperty(card, "LastModifiedDate") * 1000)) + "T" + synckolab.tools.text.time2String(new Date(this.getCardProperty(card, "LastModifiedDate") * 1000)) + "Z</creation-date>\n";
- xml += " <last-modification-date>" + synckolab.tools.text.date2String(new Date(this.getCardProperty(card, "LastModifiedDate") * 1000)) + "T" + synckolab.tools.text.time2String(new Date(this.getCardProperty(card, "LastModifiedDate") * 1000)) + "Z</last-modification-date>\n";
+ xml += " <creation-date>" + synckolab.tools.text.calDateTime2String(new Date(), false, true) + "</creation-date>\n";
+ xml += " <last-modification-date>" + synckolab.tools.text.calDateTime2String(new Date(), false, true) + "</last-modification-date>\n";
// default: public - tbird doesnt know of other types of list like private
xml += " <sensitivity>public</sensitivity>\n";
@@ -1333,8 +1333,8 @@ synckolab.addressbookTools.list2Xml = function (card, fields) {
xml += "<distribution-list version=\"1.0\" >\n";
xml += " <product-id>SyncKolab, Kolab resource</product-id>\n";
xml += " <uid>" + this.getUID(card) + "</uid>\n";
- xml += " <creation-date>" + synckolab.tools.text.date2String(new Date(this.getCardProperty(card, "LastModifiedDate") * 1000)) + "T" + synckolab.tools.text.time2String(new Date(this.getCardProperty(card, "LastModifiedDate") * 1000)) + "Z</creation-date>\n";
- xml += " <last-modification-date>" + synckolab.tools.text.date2String(new Date(this.getCardProperty(card, "LastModifiedDate") * 1000)) + "T" + synckolab.tools.text.time2String(new Date(this.getCardProperty(card, "LastModifiedDate") * 1000)) + "Z</last-modification-date>\n";
+ xml += " <creation-date>" + synckolab.tools.text.calDateTime2String(new Date(), false, true) + "</creation-date>\n";
+ xml += " <last-modification-date>" + synckolab.tools.text.calDateTime2String(new Date(), false, true) + "</last-modification-date>\n";
// default: public - tbird doesnt know of other types of list like private
xml += " <sensitivity>public</sensitivity>\n";
@@ -1499,11 +1499,11 @@ synckolab.addressbookTools.getXmlProperty = function(card, field, nodeName, node
var xml = "";
if(nodeName2) {
- xml += "<" + nodeName + ">\n";
+ xml += " <" + nodeName + ">\n";
xml += " " + synckolab.tools.text.nodeWithContent(nodeName2, this.getCardProperty(card, field));
- xml += "</" + nodeName + ">\n";
+ xml += " </" + nodeName + ">\n";
} else {
- xml += " " + synckolab.tools.text.nodeWithContent(nodeName, this.getCardProperty(card, field)) + "\n";
+ xml += " " + synckolab.tools.text.nodeWithContent(nodeName, this.getCardProperty(card, field));
}
return xml;
};
@@ -1530,9 +1530,9 @@ synckolab.addressbookTools.card2Kolab3 = function (card, skipHeader, fields) {
}
xml += "<vcard>\n";
- xml += " <uid><uri>urn:uuid:" + synckolab.tools.text.encode4XML(this.getUID(card)) + "</uri></uid>\n";
- xml += " <prodid><text>SyncKolab , Kolab resource</text></prodid>\n"; // TODO add version
- xml += " <rev><timestamp>" + synckolab.tools.text.calDateTime2String(new Date(this.getCardProperty(card, "LastModifiedDate")), false, true) + "Z</timestamp></rev>\n";
+ xml += " <uid><uri>" + synckolab.tools.text.encode4XML(this.getUID(card)) + "</uri></uid>\n";
+ xml += " <prodid><text>SyncKolab " + synckolab.config.version + ", Kolab resource</text></prodid>\n"; // TODO add version
+ xml += " <rev><timestamp>" + synckolab.tools.text.calDateTime2String(new Date(this.getCardProperty(card, "LastModifiedDate")*1000), false, true) + "Z</timestamp></rev>\n";
// ??
//xml += synckolab.tools.text.nodeWithContent("categories", this.getCardProperty(card, "Category"), false);
@@ -1554,7 +1554,6 @@ synckolab.addressbookTools.card2Kolab3 = function (card, skipHeader, fields) {
}
}
- xml += this.getXmlProperty(card, "FirstName", "given");
xml += synckolab.tools.text.nodeWithContent("organization", this.getCardProperty(card, "Company"), false);
xml += this.getXmlProperty(card, "WebPage1", "url", "uri");
diff --git a/src/chrome/content/synckolab/config.js b/src/chrome/content/synckolab/config.js
index 0902159..1157f1f 100644
--- a/src/chrome/content/synckolab/config.js
+++ b/src/chrome/content/synckolab/config.js
@@ -35,7 +35,7 @@
if(!synckolab) var synckolab={};
synckolab.config = {
- version: "3.0.0",
+ version: "2.9.0",
DEBUG_SYNCKOLAB: true,
SWITCH_TIME: 20, //wait 20ms (enough so tbird wont get unresponsive)
diff --git a/src/chrome/content/synckolab/tools.js b/src/chrome/content/synckolab/tools.js
index 6816a47..a27c7ea 100644
--- a/src/chrome/content/synckolab/tools.js
+++ b/src/chrome/content/synckolab/tools.js
@@ -1461,49 +1461,6 @@ synckolab.Node.prototype.getAttribute = function (attrName)
/**
- * compare this to another node.
- */
-synckolab.Node.prototype.isEqualNode = function(other) {
- var that = this;
- var props = ['nodeType', 'nodeName', 'nodeValue'];
- var i;
- for (i = props.length; i-- > 0;) {
- if (that[props[i]] !== other[props[i]]) {
- return false;
- }
- }
-
- // Check element attributes match
- //
- if (that.nodeType === 1) {
- if (that.attributes.length !== other.attributes.length) {
- return false;
- }
- for (i = 0; i < that.attributes.length; i++) {
- if (that.attributes[i] !== other.getAttribute(that.attributes[i].name)) {
- return false;
- }
- }
- }
-
- // Check children match, recursively
- if (that.childNodes.length !== other.childNodes.length) {
- return false;
- }
-
- for (i = that.childNodes.length; i-- > 0;){
-
- if (!new synckolab.Node(that.childNodes[i]).isEqualNode(other.childNodes[i])) {
- return false;
- }
- }
-
- return true;
-};
-
-
-
-/**
* (At least on branch 1.8), the js instanceof operator does not work to test
* interfaces on direct implementation objects, i.e. non-wrapped objects.
* This function falla back to using QueryInterface to check whether the interface
diff --git a/src/chrome/content/synckolab/wndConfig.xul b/src/chrome/content/synckolab/wndConfig.xul
index 4491cff..bfff217 100644
--- a/src/chrome/content/synckolab/wndConfig.xul
+++ b/src/chrome/content/synckolab/wndConfig.xul
@@ -4,7 +4,7 @@
<!DOCTYPE loc SYSTEM "chrome://synckolab/locale/synckolab.dtd">
-<dialog id="syncKolabConfigDlg" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="synckolab.settings.init();" buttons="accept,cancel" ondialogaccept="return synckolab.settings.savePrefs();" persist="screenX screenY" width="0" title="SyncKolab 2.0.3">
+<dialog id="syncKolabConfigDlg" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="synckolab.settings.init();" buttons="accept,cancel" ondialogaccept="return synckolab.settings.savePrefs();" persist="screenX screenY" width="0" title="SyncKolab 2.9.0">
<script type="application/x-javascript" src="chrome://synckolab/content/calendarTools.js" />
<script type="application/x-javascript" src="chrome://synckolab/content/addressbookTools.js"/>