Commit 6437b9fb authored by Mechtilde's avatar Mechtilde

Import Upstream version 4.0.0~beta4

parent 41e02234
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [4.0.0-beta4] - 2017-07-03
### Added
- Turkish localization #43, #44, #46
- Missing release notes of 3.9 and 3.8 releases #35
- Support for shared task list #41
### Changed
- Clean up and improve compatibility of build scripts #38, #40
### Fixed
- File permissions #36
- HTML content editor #28, #29
- Activate Italian localization #46
## [4.0.0-beta3] - 2017-06-25
### Added
- Added Italian translation #22
### Changed
- Updated README.md #26, master
### Fixed
- Colorpick on calender creation doesn't work #19
- Can't update tasks/events descriptions #5
## [4.0.0-beta2] - 2017-06-10 ## [4.0.0-beta2] - 2017-06-10
### Fixed ### Fixed
- Opening and working with Attachment dialog #12 - Opening and working with Attachment dialog #12
## [3.9.0] - unknown release date
- Stable Release
- Support enabled for TB 50.*
- Tested on TB 45.5.1 Lightning 4.7.4
- We don't support TB/Lightning beta.
- bug: add new calendar or no password prompt
## [3.8.0] - unknown release date
- Support of Thunderbird 45.0
- Support to Office365 calendar new calendar. Note: New users has to Create calendar using office365 type.
- fix auto discovery for new hosted calendar
- fix cancelled not removed
- fix forward event
- d9f170f fix #459 #426 #466 #464 #462 remove extra info
- 1d4b8b4 fix #459 #426 #466 #464 #462
- 0d1a78a fix: #459
- 5e02727 (origin/master, origin/HEAD, master) rename folowup mail window
- ab836f9 task-fixed
- eaa1c2d (HEAD -> ec-3.8, tag: v3.8-beta3) bump-version
- a641199 (master) bump-version-tb-support
- 98c047c (origin/master, origin/HEAD) status-undefined-for-ipmnote
- c8af0bd strict-error
- 78377ee Merge branch 'master' into ec-3.8
- 8edfea3 js strict error
- 65f46a5 strict error
- 4f92738 js strict error
## [3.7.0] - unknown release date ## [3.7.0] - unknown release date
- d1b2860 (origin/master, origin/HEAD, master) revert calendar-event-dialog - d1b2860 (origin/master, origin/HEAD, master) revert calendar-event-dialog
- df713f4 Merge pull request #458 from enozkan/patch-5 - df713f4 Merge pull request #458 from enozkan/patch-5
......
##Exchange EWS Provider Exchange Calendar is an **add-on for Thunderbird and Lightning** that provides **Exchange calendar support**.
=====================
Thank you for checking out Ericsson's Exchange EWS Provider. Ericsson and the Ericsson QA team are grateful for the help and hard work of many [contributors][contributors] like yourself.
Current Release Vs. Download trend is something like [this](https://rawgit.com/muthusuba/github-tools/master/downloads-trend.html?user=Ericsson&repo=exchangecalendar) ## Contributing
This add-on is open-source and based on the work of many [contributors](https://github.com/ExchangeCalendar/exchangecalendar/graphs/contributors).
Getting involved as a contributor
------------------------------------------
We love working with contributors for Exchange EWS Provider, but it does require a few skills. You will need to know some Javascript, XUL, some CSS and a basic familiarity with GitHub.
If you know some Javascript, it's worth having a look at the Object Oriented Programming to understand the basic concepts of class based coding and especially for xul window objects.
If you need to brush-up on programming, but are eager to start contributing immediately, please consider helping us find bugs in Github [Exchange EWS Provider][Exchange EWS Provider] or find bugs in the Issues tested by the [EricssonQA][EricssonQA] team. To brush up on Javascript skills before engaging with us, Dive Into Javascript [mozilla][mozilla] is an excellent resource. W3schools also has [notes on Javascript][w3schools] available through their website. The programming concepts you will need to know include functions, working with classes, and some object-oriented programming basics. To brush up on XUL, Mozilla [XUL][XUL] is an easy and simple place to learn XUL, More of XUL are dynamically configured and cross-plateform.
Special thanks to all our [contributors][contributors]
[w3schools]: http://www.w3schools.com/js/
[mozilla]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide
[EricssonQA]: https://github.com/Ericsson/exchangecalendar/
[Exchange EWS Provider]: https://github.com/Ericsson/exchangecalendar/issues
[XUL]: https://developer.mozilla.org/en-US/Add-ons/Overlay_Extensions/XUL_School
[contributors]: https://github.com/Ericsson/exchangecalendar/contributors
Questions are always welcome
----------------------------
While we take pains to keep our documentation updated, the best source of information is those of us who work on the project. We also have the [wiki][wiki] pages to answer your general questions about contributing to Exchange EWS Provider.
[wiki]: https://github.com/Ericsson/exchangecalendar/wiki
Getting set up
-------------
It's easy to get set up: just 2 pieces of software to install and in few command lines you'll be running the addon!
### Install Thunderbird
If you don't already have it installed, please install latest version
https://support.mozilla.org/en-US/kb/installing-thunderbird
### Install Lightning
If you don't already have it installed, please install latest version
https://support.mozilla.org/en-US/kb/installing-lightning-thunderbird
### Cloning the test repository with Git
After you have installed [Git] you will need to clone the project to your hard drive. From your workspace directory run this command which will copy (clone) the project to your hard drive
git clone --recursive git://github.com/Ericsson/exchangecalendar.git
[Git]: http://en.wikipedia.org/wiki/Git_%28software%29
### Installing developement tools ### Installing developement tools
You will need to install Dom Inspector, Javascript Debugger and some other development tools. Fortunately `Thunderbird addons` makes it easy to install all of these: You will need to install Dom Inspector, Javascript Debugger and some other development tools. Fortunately `Thunderbird addons` makes it easy to install all of these:
...@@ -53,21 +10,6 @@ Now using bash we'll compile the addon we need (which are written in wiki) ...@@ -53,21 +10,6 @@ Now using bash we'll compile the addon we need (which are written in wiki)
cd ./exchangecalendar_master; chmod +x ./build.sh; ./build.sh; cd ./exchangecalendar_master; chmod +x ./build.sh; ./build.sh;
Now you can install the Exchange EWS Provider addon ## License
Writing Code
-------------
If you want to get involved and add more code, then there's just a few things
we'd like to ask you to do:
1. Use the similar code format for all new developement and window objects
2. Follow mozilla's simple [Coding Style Guide][Coding Style Guide] recommendations
3. Fork this project with your own GitHub account
4. Make sure all tests are passing and submit a pull request with your changes
[Coding Style Guide]: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style
License
-------
This software is licensed under the [GNU GPL] Version 3 This software is licensed under the [GNU GPL] Version 3
[GNU GPL]: http://www.gnu.org/licenses/gpl.html [GNU GPL]: http://www.gnu.org/licenses/gpl.html
#!/bin/sh #!/bin/sh
usage() { echo "Usage: $0 [-u | -d ]" 1>&2;echo "-u:enable update";echo "-d:disable update"; exit 1; } usage() {
printf "Usage: %s [ -u | -d ]\n" "$0" 1>&2
printf " -u enable update\n" 1>&2
printf " -d disable update\n" 1>&2
exit 1
}
if [ $# = 0 ];then if [ $# = 0 ];then
usage usage
fi fi
version=`sed -n -e "s/.*<em:version>\(.*\)<\/em:version>/\1/p" install.rdf` version=$(sed -n -e "s/.*<em:version>\(.*\)<\/em:version>/\1/p" install.rdf)
while getopts ":ud" OPTION while getopts ":ud" OPTION
do do
case ${OPTION} in case ${OPTION} in
u) echo "update" u) echo "update"
cat defaults/preferences/update_enable.txt > defaults/preferences/update.js cat defaults/preferences/update_enable.txt > defaults/preferences/update.js
zip -r exchangecalendar-v$version.xpi * -x \*.git \*.xpi \*.sh update\*.txt zip -r exchangecalendar-v"$version".xpi ./* -x \*.git \*.xpi \*.sh update\*.txt
exit exit
;; ;;
d) echo "no update" d) echo "no update"
cat defaults/preferences/update_disable.txt > defaults/preferences/update.js cat defaults/preferences/update_disable.txt > defaults/preferences/update.js
zip -r exchangecalendar-v$version.xpi * -x \*.git \*.xpi \*.sh update\*.txt zip -r exchangecalendar-v"$version".xpi ./* -x \*.git \*.xpi \*.sh update\*.txt
exit exit
;; ;;
*) usage ;; *) usage ;;
esac esac
done done
usage
usage
...@@ -50,6 +50,8 @@ locale exchangecalendar de locale/exchangecalendar/de/ ...@@ -50,6 +50,8 @@ locale exchangecalendar de locale/exchangecalendar/de/
locale exchangecalendar ja-JP locale/exchangecalendar/ja-JP/ locale exchangecalendar ja-JP locale/exchangecalendar/ja-JP/
locale exchangecalendar sv locale/exchangecalendar/sv/ locale exchangecalendar sv locale/exchangecalendar/sv/
locale exchangecalendar ru locale/exchangecalendar/ru/ locale exchangecalendar ru locale/exchangecalendar/ru/
locale exchangecalendar it-IT locale/exchangecalendar/it-IT/
locale exchangecalendar tr locale/exchangecalendar/tr/
manifest interfaces/exchangeCalendar/mivExchangeCalendar.manifest manifest interfaces/exchangeCalendar/mivExchangeCalendar.manifest
......
...@@ -267,30 +267,30 @@ exchAttachments.prototype = { ...@@ -267,30 +267,30 @@ exchAttachments.prototype = {
this.globalFunctions.LOG(" -- It is an Exchange Calendar event:"+item.title); this.globalFunctions.LOG(" -- It is an Exchange Calendar event:"+item.title);
if (this._document.getElementById("event-grid-attachment-row")) { if (this._document.getElementById("event-grid-attachment-row")) {
this._document.getElementById("event-grid-attachment-row").collapsed = true; this._document.getElementById("event-grid-attachment-row").setAttribute("collapsed", true);
} }
// Modify context menu for the attachment list inside the "Attachment" panel // Modify context menu for the attachment list inside the "Attachment" panel
let attachmentListbox = this._document.getElementById("attachment-link"); let attachmentListbox = this._document.getElementById("attachment-link");
attachmentListbox.context = "exchWebService-attachment-popup" ; attachmentListbox.setAttribute("context", "exchWebService-attachment-popup") ;
attachmentListbox.onkeypress = function (aEvent) { self.onKeyPress(aEvent); }; attachmentListbox.setAttribute("onkeypress", function (aEvent) { self.onKeyPress(aEvent); }) ;
attachmentListbox.onclick = function (aEvent) { self.onSelect(aEvent); }; attachmentListbox.setAttribute("onclick", function (aEvent) { self.onSelect(aEvent); }) ;
attachmentListbox.ondblclick = function (aEvent) { self.onDblClick(aEvent); }; attachmentListbox.setAttribute("ondblclick", function (aEvent) { self.onDblClick(aEvent); }) ;
this.addAttachmentsFromItem(item); this.addAttachmentsFromItem(item);
} else { } else {
if (this._document.getElementById("event-grid-attachment-row")) { if (this._document.getElementById("event-grid-attachment-row")) {
this._document.getElementById("event-grid-attachment-row").collapsed = false; this._document.getElementById("event-grid-attachment-row").setAttribute("collapsed", false);
} }
// Modify context menu for the attachment list inside the "Attachment" panel // Modify context menu for the attachment list inside the "Attachment" panel
let attachmentListbox = this._document.getElementById("attachment-link"); let attachmentListbox = this._document.getElementById("attachment-link");
attachmentListbox.context = "attachment-popup" ; attachmentListbox.setAttribute("context", "attachment-popup") ;
attachmentListbox.onkeypress="attachmentLinkKeyPress(event)" ; attachmentListbox.setAttribute("onkeypress", "attachmentLinkKeyPress(event)") ;
attachmentListbox.onclick="attachmentClick(event);" ; attachmentListbox.setAttribute("onclick", "attachmentClick(event);") ;
attachmentListbox.ondblclick="attachmentDblClick(event)" ; attachmentListbox.setAttribute("ondblclick", "attachmentDblClick(event)") ;
} }
// Add message listener to be able to receive message from parent window or tab // Add message listener to be able to receive message from parent window or tab
......
...@@ -147,50 +147,65 @@ exchCalendarCreation.prototype = { ...@@ -147,50 +147,65 @@ exchCalendarCreation.prototype = {
}, },
/*
* saveSettings: save calendar settings after calendar wizard completed
*
* Lightning original code to save calendar can be found in:
* comm-central/calendar/resources/content/calendarCreation.js
*/
saveSettings: function _saveSettings() saveSettings: function _saveSettings()
{ {
this.globalFunctions.LOG("saveSettings Going to create the calendar in prefs.js"); this.globalFunctions.LOG("saveSettings Going to create the calendar in prefs.js");
// Calculate the new calendar.id // Calculate the new calendar.id and properties
var newCalId = this.globalFunctions.getUUID(); let newCalId = this.globalFunctions.getUUID();
let newCalName = this._document.getElementById("calendar-name").value;
let newCalColor = this._document.getElementById("calendar-color").value;
// Save settings in dialog to new cal id. // Save settings in dialog to new cal id.
tmpSettingsOverlay.exchWebServicesSaveExchangeSettingsByCalId(newCalId); tmpSettingsOverlay.exchWebServicesSaveExchangeSettingsByCalId(newCalId);
// Need to save the useOfflineCache preference separetly because it is not part of the main. // Need to save the useOfflineCache preference separetly because it is not part of the main.
this.prefs = Cc["@mozilla.org/preferences-service;1"] this.prefs = Cc["@mozilla.org/preferences-service;1"]
.getService(Ci.nsIPrefService) .getService(Ci.nsIPrefService)
.getBranch("extensions.exchangecalendar@extensions.1st-setup.nl."+newCalId+"."); .getBranch("extensions.exchangecalendar@extensions.1st-setup.nl."+newCalId+".");
this.prefs.setBoolPref("useOfflineCache", this._document.getElementById("exchange-cache").checked); this.prefs.setBoolPref("useOfflineCache", this._document.getElementById("exchange-cache").checked);
this.prefs.setIntPref("exchangePrefVersion", 1); this.prefs.setIntPref("exchangePrefVersion", 1);
// We create a new URI for this calendar which will contain the calendar.id // We create a new URI for this calendar which will contain the calendar.id
var ioService = Cc["@mozilla.org/network/io-service;1"] var ioService = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService); .getService(Ci.nsIIOService);
var tmpURI = ioService.newURI("https://auto/"+newCalId, null, null); var tmpURI = ioService.newURI("https://auto/"+newCalId, null, null);
// Register calendar to global settings
var calPrefs = Cc["@mozilla.org/preferences-service;1"]
.getService(Ci.nsIPrefService)
.getBranch("calendar.registry."+newCalId+".");
calPrefs.setCharPref("name", newCalName);
// Create the new calendar object
// Should be synced with Lightning doCreateCalendar() code
var calManager = Cc["@mozilla.org/calendar/manager;1"] var calManager = Cc["@mozilla.org/calendar/manager;1"]
.getService(Ci.calICalendarManager); .getService(Ci.calICalendarManager);
var newCal = calManager.createCalendar("exchangecalendar", tmpURI); var newCal = calManager.createCalendar("exchangecalendar", tmpURI);
newCal.id = newCalId; newCal.id = newCalId;
newCal.name = this._document.getElementById("calendar-name").value; newCal.name = newCalName;
var calPrefs = Cc["@mozilla.org/preferences-service;1"] newCal.setProperty("color", newCalColor);
.getService(Ci.nsIPrefService)
.getBranch("calendar.registry."+newCalId+".");
calPrefs.setCharPref("name", this._document.getElementById("calendar-name").value); newCal.setProperty("cache.enabled", false);
newCal.setProperty("color", this._document.getElementById('calendar-color').color);
if (!this._document.getElementById("fire-alarms").checked) { if (!this._document.getElementById("fire-alarms").checked) {
newCal.setProperty("suppressAlarms", true); newCal.setProperty("suppressAlarms", true);
} }
// End of sync
var emailCalendarIdentity = this._document.getElementById("email-identity-menulist").selectedItem;
var selItem = this._document.getElementById("email-identity-menulist").selectedItem; if (emailCalendarIdentity) {
if (selItem) { var identity = emailCalendarIdentity.getAttribute("value");
var identity = selItem.getAttribute("value");
} }
else { else {
var identity = ""; var identity = "";
...@@ -199,13 +214,11 @@ exchCalendarCreation.prototype = { ...@@ -199,13 +214,11 @@ exchCalendarCreation.prototype = {
newCal.setProperty("imip.identity.key", identity); newCal.setProperty("imip.identity.key", identity);
newCal.setProperty("cache.enabled", false);
Cc["@mozilla.org/preferences-service;1"] Cc["@mozilla.org/preferences-service;1"]
.getService(Ci.nsIPrefService).savePrefFile(null); .getService(Ci.nsIPrefService).savePrefFile(null);
// Finally register completly the new calendar
calManager.registerCalendar(newCal); calManager.registerCalendar(newCal);
}, },
} }
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
...@@ -36,7 +36,12 @@ ...@@ -36,7 +36,12 @@
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="exchWebServiceEditor"> <binding id="exchWebServiceEditor">
<content> <!-- CSS needed to correctly display color buttons (font and background) -->
<resources>
<stylesheet src="chrome://messenger/skin/messengercompose/messengercompose.css" />
</resources>
<content>
<xul:vbox flex="1"> <xul:vbox flex="1">
<xul:toolbox anonid="FormatToolbox" mode="icons"> <xul:toolbox anonid="FormatToolbox" mode="icons">
...@@ -105,7 +110,7 @@ ...@@ -105,7 +110,7 @@
state="state_all"/> state="state_all"/>
<xul:toolbarseparator class="toolbarseparator-standard"/> <xul:toolbarseparator class="toolbarseparator-standard"/>
<xul:toolbaritem class="formatting-button"> <xul:toolbaritem class="formatting-button">
<xul:stack align="enter" state="rgb(102,102,102)"> <xul:stack align="center" state="rgb(102,102,102)">
<xul:box style="background-color:#FFFFFF" <xul:box style="background-color:#FFFFFF"
anonid="cmd_backgroundColor" anonid="cmd_backgroundColor"
class="color-button" class="color-button"
...@@ -192,68 +197,72 @@ ...@@ -192,68 +197,72 @@
flex="1"/> flex="1"/>
</xul:vbox> </xul:vbox>
</content> </content>
<implementation> <implementation>
<constructor><![CDATA[ <constructor><![CDATA[
this.editorElement = document.getAnonymousElementByAttribute(this, "anonid", "editor");
var self=this; var self=this;
// To be able to set correct HTML content
this.globalFunctions = Components.classes["@1st-setup.nl/global/functions;1"]
.getService(Components.interfaces.mivFunctions);
this.editorElement = document.getAnonymousElementByAttribute(this, "anonid", "editor");
if (this.editorElement) { if (this.editorElement) {
this.commandManager = this.editorElement.commandManager; this.commandManager = this.editorElement.commandManager;
this.editorClickFunction = function(aEvent) { self.onClickEditor(aEvent);}; this.editorClickFunction = function(aEvent) { self.onClickEditor(aEvent);};
this.editorElement.addEventListener("click", this.editorClickFunction, true); this.editorElement.addEventListener("click", this.editorClickFunction, false);
this.editorDblClickFunction = function(aEvent) { self.onDblClickEditor(aEvent);}; this.editorDblClickFunction = function(aEvent) { self.onDblClickEditor(aEvent);};
this.editorElement.addEventListener("dblclick", this.editorDblClickFunction, true); this.editorElement.addEventListener("dblclick", this.editorDblClickFunction, false);
this.editorKeyPressFunction = function(aEvent) { self.onKeyPressEditor(aEvent);}; this.editorKeyPressFunction = function(aEvent) { self.onKeyPressEditor(aEvent);};
this.editorElement.addEventListener("keyup", this.editorKeyPressFunction, true); this.editorElement.addEventListener("keyup", this.editorKeyPressFunction, false);
this.editorMouseOver = function(aEvent) { self.onMouseOver(aEvent);}; this.editorMouseOver = function(aEvent) { self.onMouseOver(aEvent);};
this.editorMouseOut = function(aEvent) { self.onMouseOut(aEvent);};
this.editorElement.addEventListener("mouseover", this.editorMouseOver , false); this.editorElement.addEventListener("mouseover", this.editorMouseOver , false);
this.editorMouseOut = function(aEvent) { self.onMouseOut(aEvent);};
this.editorElement.addEventListener("mouseout", this.editorMouseOut, false); this.editorElement.addEventListener("mouseout", this.editorMouseOut, false);
// Set default document to empty HTML content
this.editorElement.contentDocument.documentElement.innerHTML = this.globalFunctions.fromText2HTML(null);
} }
this.atomService = Components.classes["@mozilla.org/atom-service;1"] this.atomService = Components.classes["@mozilla.org/atom-service;1"]
.getService(Components.interfaces.nsIAtomService); .getService(Components.interfaces.nsIAtomService);
// Set initial content to empty HTML body this.connectAllCommandListenerToolbar("FormatToolbar");
this.globalFunctions = Components.classes["@1st-setup.nl/global/functions;1"]
.getService(Components.interfaces.mivFunctions);
this.editorElement.contentDocument.documentElement.innerHTML = this.globalFunctions.fromText2HTML(null);
this.connectButtons("FormatToolbar");
// Connect color button // Connect color button
this.bgColorFunction = function(){ self.selectColor("cmd_backgroundColor");}; this.bgColorFunction = function(){ self.selectColor("cmd_backgroundColor");};
var bgColorElement = document.getAnonymousElementByAttribute(this, "anonid", "cmd_backgroundColor") var bgColorElement = document.getAnonymousElementByAttribute(this, "anonid", "cmd_backgroundColor")
bgColorElement.addEventListener("click", this.bgColorFunction, true); bgColorElement.addEventListener("click", this.bgColorFunction, false);
this.fontColorFunction = function(){ self.selectColor("cmd_fontColor");}; this.fontColorFunction = function(){ self.selectColor("cmd_fontColor");};
var fontColorElement = document.getAnonymousElementByAttribute(this, "anonid", "cmd_fontColor") var fontColorElement = document.getAnonymousElementByAttribute(this, "anonid", "cmd_fontColor")
fontColorElement.addEventListener("click", this.fontColorFunction, true); fontColorElement.addEventListener("click", this.fontColorFunction, false);
this.highlightColor = "#FFFFFF"; this.highlightColor = "#FFFFFF";
this.fontColor = "#000000"; this.fontColor = "#000000";
// Fill fontfac popup menu // Connect FontFace popup menu
this.menuPopupFunction = function(event){ self.selectFont("cmd_fontFace", event.target.value);}; this.menuPopupFunction = function(event){ self.selectFont("cmd_fontFace", event.target.value);};
this.menuPopup = document.getAnonymousElementByAttribute(this, "anonid", "fontFaceSelect"); this.menuPopup = document.getAnonymousElementByAttribute(this, "anonid", "fontFaceSelect");
this.menuPopup.addEventListener("command", this.menuPopupFunction, true); this.menuPopup.addEventListener("command", this.menuPopupFunction, false);
this.fillFontFace(); this.fillFontFace();
// Connect HyperLink buttons
this.addLinkFunction = function(){ self.addLink();}; this.addLinkFunction = function(){ self.addLink();};
var addLinkElement = document.getAnonymousElementByAttribute(this, "anonid", "cmd_add_link") var addLinkElement = document.getAnonymousElementByAttribute(this, "anonid", "cmd_add_link")
addLinkElement.addEventListener("click", this.addLinkFunction, true); addLinkElement.addEventListener("click", this.addLinkFunction, false);
this.removeLinkFunction = function(){ self.removeLink();}; this.removeLinkFunction = function(){ self.removeLink();};
var removeLinkElement = document.getAnonymousElementByAttribute(this, "anonid", "cmd_remove_link") var removeLinkElement = document.getAnonymousElementByAttribute(this, "anonid", "cmd_remove_link")
removeLinkElement.addEventListener("click", this.removeLinkFunction, true); removeLinkElement.addEventListener("click", this.removeLinkFunction, false);
this.editLinkFunction = function(){ self.editLink();}; this.editLinkFunction = function(){ self.editLink();};
var editLinkElement = document.getAnonymousElementByAttribute(this, "anonid", "cmd_edit_link") var editLinkElement = document.getAnonymousElementByAttribute(this, "anonid", "cmd_edit_link")
editLinkElement.addEventListener("click", this.editLinkFunction, true); editLinkElement.addEventListener("click", this.editLinkFunction, false);
]]></constructor> ]]></constructor>
<destructor><![CDATA[ <destructor><![CDATA[
...@@ -261,20 +270,32 @@ ...@@ -261,20 +270,32 @@
this.editorElement.removeEventListener("click", this.editorClickFunction, false); this.editorElement.removeEventListener("click", this.editorClickFunction, false);
this.editorElement.removeEventListener("keyup", this.editorKeyPressFunction, false); this.editorElement.removeEventListener("keyup", this.editorKeyPressFunction, false);
this.editorElement.removeEventListener("dblclick", this.editorDblClickFunction, true); this.editorElement.removeEventListener("dblclick", this.editorDblClickFunction, false);
this.editorElement.removeEventListener("mouseover", this.editorMouseOver , false); this.editorElement.removeEventListener("mouseover", this.editorMouseOver , false);
this.editorElement.removeEventListener("mouseout", this.editorMouseOut, false); this.editorElement.removeEventListener("mouseout", this.editorMouseOut, false);
} }
this.disconnectButtons("FormatToolbar");
document.getAnonymousElementByAttribute(this, "anonid", "cmd_backgroundColor").removeEventListener("click", this.bgColorFunction, false); this.removeAllCommandListenerToolbar("FormatToolbar");
document.getAnonymousElementByAttribute(this, "anonid", "cmd_fontColor").removeEventListener("click", this.fontColorFunction, false);
// Disconnect color button
document.getAnonymousElementByAttribute(this, "anonid", "cmd_backgroundColor")
.removeEventListener("click", this.bgColorFunction, false);
document.getAnonymousElementByAttribute(this, "anonid", "cmd_fontColor")
.removeEventListener("click", this.fontColorFunction, false);
// Disconnect Font face button
if (this.menuPopupFunction) { if (this.menuPopupFunction) {
this.menuPopup.removeEventListener("command", this.menuPopupFunction, false); this.menuPopup.removeEventListener("command", this.menuPopupFunction, false);
} }
document.getAnonymousElementByAttribute(this, "anonid", "cmd_add_link").removeEventListener("click", this.addLinkFunction, true);
document.getAnonymousElementByAttribute(this, "anonid", "cmd_remove_link").removeEventListener("click", this.removeLinkFunction, true); // Disconnect HyperLink buttons
document.getAnonymousElementByAttribute(this, "anonid", "cmd_edit_link").removeEventListener("click", this.editLinkFunction, true); document.getAnonymousElementByAttribute(this, "anonid", "cmd_add_link")
.removeEventListener("click", this.addLinkFunction, false);
document.getAnonymousElementByAttribute(this, "anonid", "cmd_remove_link")
.removeEventListener("click", this.removeLinkFunction, false);
document.getAnonymousElementByAttribute(this, "anonid", "cmd_edit_link")
.removeEventListener("click", this.editLinkFunction, false);
]]></destructor> ]]></destructor>