[Pkg-mozext-commits] [firetray] 55/399: fix options' UI
David Prévot
taffit at alioth.debian.org
Tue Oct 29 18:23:13 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch dfsg-clean
in repository firetray.
commit ad680a6477b01268c1dfd56a25703effd321484a
Author: foudfou <foudil.newbie+git at gmail.com>
Date: Sat Sep 24 13:15:38 2011 +0200
fix options' UI
---
src/chrome/content/options.js | 13 ++++++++++---
src/chrome/content/options.xul | 2 +-
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/chrome/content/options.js b/src/chrome/content/options.js
index 91197e0..1a0384a 100644
--- a/src/chrome/content/options.js
+++ b/src/chrome/content/options.js
@@ -4,7 +4,6 @@ const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
-Cu.import("resource:///modules/mailServices.js");
Cu.import("resource://firetray/FiretrayHandler.jsm");
Cu.import("resource://firetray/commons.js");
@@ -22,9 +21,16 @@ firetray.UIOptions = {
if(firetray.Handler.inMailApp) {
Cu.import("resource://firetray/FiretrayMessaging.jsm");
this.insertMailAccountsExcluded(this.accountBoxId);
+ } else {
+ this.hideMailAccountsExcluded(this.accountBoxId);
}
},
+ hideMailAccountsExcluded: function(parentId) {
+ let targetNode = document.getElementById(parentId);
+ targetNode.hidden = true; //!(appType & Firetray_MAIL);
+ },
+
insertMailAccountsExcluded: function(parentId) {
// the DOM parent where we do appendChild
let targetNode = document.getElementById(parentId);
@@ -40,8 +46,9 @@ firetray.UIOptions = {
nodeAccount.setAttribute('label', accountServer.rootFolder.name);
nodeAccount.setAttribute('checked',
(firetray.Messaging.getPrefAccountsExcluded().indexOf(accountServerKey) >= 0));
- nodeAccount.setAttribute('oncommand',
- 'firetray.UIOptions.updateMailAccountsExcluded(firetray.UIOptions.accountBoxId)');
+ let that = this;
+ nodeAccount.addEventListener('command', function(e){
+ that.updateMailAccountsExcluded(that.accountBoxId);});
targetNode.appendChild(nodeAccount);
}
diff --git a/src/chrome/content/options.xul b/src/chrome/content/options.xul
index c8a7c8d..054c886 100644
--- a/src/chrome/content/options.xul
+++ b/src/chrome/content/options.xul
@@ -23,7 +23,7 @@
<groupbox id="accounts_box"> <!-- firetray.UIOptions.accountBoxId -->
<caption label="&mail_accounts_exclude;"/>
- <!-- accounts are dynamically added here with insert_accounts_name() functions, called at the bottom of this file -->
+ <!-- accounts are dynamically added here with insert_accounts_name() functions, called at the bottom of this file -->
</groupbox>
</prefpane>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firetray.git
More information about the Pkg-mozext-commits
mailing list