Bug 737348 - Filelink notifification should display a 'What's this ?' link to a Filelink feature description. r+ui-r=bwinton,a=Standard8.
authorMike Conley <mconley@mozilla.com>
Mon, 02 Apr 2012 17:09:26 -0400
changeset 11157 a183704a54497317d10c3e720f4d6b32d7102567
parent 11156 659db89dd3e30cf0460a6fda57f96fa9d074b81c
child 11158 89b4aee905d230bb8f2ddc566ad4c43abd6139d0
push id463
push userbugzilla@standard8.plus.com
push dateTue, 24 Apr 2012 17:34:51 +0000
treeherdercomm-beta@e53588e8f7b0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8
bugs737348
Bug 737348 - Filelink notifification should display a 'What's this ?' link to a Filelink feature description. r+ui-r=bwinton,a=Standard8.
mail/app/profile/all-thunderbird.js
mail/components/compose/content/bigFileObserver.js
--- a/mail/app/profile/all-thunderbird.js
+++ b/mail/app/profile/all-thunderbird.js
@@ -776,8 +776,9 @@ pref("devtools.debugger.log", false);
 
 pref("mail.chat.enabled", true);
 // Send typing notification in private conversations
 pref("purple.conversations.im.send_typing", true);
 
 // BigFiles
 pref("mail.cloud_files.enabled", true);
 pref("mail.cloud_files.inserted_urls.footer.link", "http://www.getthunderbird.com");
+pref("mail.cloud_files.learn_more_url", "http://support.mozillamessaging.com/kb/file-link");
--- a/mail/components/compose/content/bigFileObserver.js
+++ b/mail/components/compose/content/bigFileObserver.js
@@ -95,42 +95,56 @@ var gBigFileObserver = {
     if (this.bigFiles.length) {
       if (notification) {
         notification.label = this.formatString("bigFileDescription",
                                                [this.bigFiles.length],
                                                this.bigFiles.length);
         return;
       }
 
+      let msgBundle = Services.strings.createBundle("chrome://messenger/locale/messenger.properties");
+
       let buttons = [
+        {
+          label: msgBundle.GetStringFromName("crashedpluginsMessage.learnMore"),
+          accessKey: "",
+          callback: this.openLearnMore.bind(this),
+        },
         { label: this.formatString("bigFileShare.label",
                                    []),
           accessKey: this.formatString("bigFileShare.accesskey"),
           callback: this.convertAttachments.bind(this),
         },
 
         { label: this.formatString("bigFileAttach.label",
                                    []),
           accessKey: this.formatString("bigFileAttach.accesskey"),
           callback: this.hideNotification.bind(this),
         },
       ];
 
-      nb.appendNotification(this.formatString("bigFileDescription",
-                                              [this.bigFiles.length],
-                                              this.bigFiles.length),
-                            "bigAttachment", "null", nb.PRIORITY_WARNING_MEDIUM,
-                            buttons);
+      let msg = this.formatString("bigFileDescription", [this.bigFiles.length],
+                                  this.bigFiles.length);
+
+      notification = nb.appendNotification(msg, "bigAttachment", "null",
+                                           nb.PRIORITY_WARNING_MEDIUM,
+                                           buttons);
     }
     else {
       if (notification)
         nb.removeNotification(notification);
     }
   },
 
+  openLearnMore: function() {
+    let url = Services.prefs.getCharPref("mail.cloud_files.learn_more_url");
+    openContentTab(url);
+    return true;
+  },
+
   convertAttachments: function() {
     let cloudProvider;
     let accounts = cloudFileAccounts.accounts;
 
     if(accounts.length == 1) {
       cloudProvider = accounts[0];
     }
     else if(accounts.length > 1) {