Bug 568896 - Update about:firstrun for Fennec 2.0a1 (fixup) [r=mfinkle]
authorWesley Johnston <wjohnston@mozilla.com>
Fri, 20 Aug 2010 16:56:19 -0400
changeset 66464 d99901d1331af55002f599d434a868176230685f
parent 66463 0cbc33348546e4cf29923a47c73deb5ab1cd839d
child 66465 4e200383acfecd7d7496cb5de17f539e40d467a9
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs568896
Bug 568896 - Update about:firstrun for Fennec 2.0a1 (fixup) [r=mfinkle]
mobile/chrome/content/firstrun/firstrun.xhtml
mobile/locales/en-US/chrome/firstrun.dtd
mobile/themes/core/firstRun.css
--- a/mobile/chrome/content/firstrun/firstrun.xhtml
+++ b/mobile/chrome/content/firstrun/firstrun.xhtml
@@ -59,35 +59,37 @@
   <link rel="stylesheet" href="chrome://browser/skin/firstRun.css" type="text/css"/>
 </head>
 
 <body id="firstrun" class="">
   <div id="wrapper">
     <div id="header">
       <a href="http://mozilla.com/m"><img src="chrome://browser/content/firstrun/mozilla.png" width="64" height="17"/></a>
     </div>
-  
+    
     <div id="head">
       <h1><img src="chrome://branding/content/logoWordmark.png"/></h1>
-      <p>&firstrun.heading;</p>
+      <p>&firstrun.heading2;</p>
     </div>
   
     <div id="content">
       <h2></h2>
       <ul id="recommended">
         <li id="sync"><a href="javascript:loadSync();"><b>&firstrun.sync.title;</b> <span>&firstrun.sync.description;</span></a></li>
-        <li id="starter"><a href="javascript:loadAddons();"><b>&firstrun.starter.title;</b> <span>&firstrun.starter.description;</span></a></li>
-        <li id="tour"><a href="about:home"><b>&firstrun.tour.title;</b> <span>&firstrun.tour.description;</span></a></li>
+        <li id="addons"><a href="javascript:loadAddons();"><b>&firstrun.addons.title;</b> <span>&firstrun.addons.description;</span></a></li>
+        <li id="home"><a href="about:home"><b>&firstrun.home.title;</b> <span>&firstrun.home.description;</span></a></li>
       </ul>
 
-      <p id="features"><a href="https://www.mozilla.com/en-US/mobile/2.0a1/releasenotes/">&firstrun.features;</a></p>
-
+      <p id="relNotes"><a id="releaseNotesURL">&firstrun.relNotes.label;</a></p>
       <script type="application/javascript;version=1.8"><![CDATA[
         let Ci = Components.interfaces, Cc = Components.classes, Cu = Components.utils;
         let gChromeWin = null;
+        let links = [
+          {id: "releaseNotesURL", pref: "app.releaseNotesURL"},
+        ];
         
         function getChromeWin() {
           if (!gChromeWin) {
             gChromeWin = window
                     .QueryInterface(Ci.nsIInterfaceRequestor)
                     .getInterface(Ci.nsIWebNavigation)
                     .QueryInterface(Ci.nsIDocShellTreeItem)
                     .rootTreeItem
@@ -107,16 +109,33 @@
           if (prefsBox && syncArea)
             prefsBox.ensureElementIsVisible(syncArea);
         }
 
         function loadAddons() {
           let win = getChromeWin();
           win.BrowserUI.showPanel("addons-container");
         }
+
+        function init() {
+          setupLinks();
+        }
+        
+        function setupLinks() {
+          try {
+            let formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"]
+                                      .getService(Ci.nsIURLFormatter);            
+            links.forEach(function (link) {
+              let url = formatter.formatURLPref(link.pref);
+              let element = document.getElementById(link.id);
+              element.setAttribute("href", url);
+            });
+          } catch (ex) {}
+        }
+        document.addEventListener("DOMContentLoaded", init, false);
       ]]></script>
     </div>
   
     <div id="footer">
       
       <ul class="nav">
         <!--
         <li><a href="http://mozilla.com/m/faq">&firstrun.faq;</a></li>
--- a/mobile/locales/en-US/chrome/firstrun.dtd
+++ b/mobile/locales/en-US/chrome/firstrun.dtd
@@ -1,12 +1,12 @@
 <!ENTITY firstrun.title                "Welcome to &brandShortName;">
-<!ENTITY firstrun.heading              "Welcome to &brandShortName;">
+<!ENTITY firstrun.heading2             "Welcome to &brandShortName;">
 <!ENTITY firstrun.sync.title           "Get Firefox Sync">
 <!ENTITY firstrun.sync.description     "Share your &brandShortName; history, passwords, bookmarks &amp; tabs between your desktop &amp; mobile">
-<!ENTITY firstrun.starter.title        "Get Addons">
-<!ENTITY firstrun.starter.description  "Install add-ons to enhance your &brandShortName; experience">
-<!ENTITY firstrun.tour.title           "Get Started">
-<!ENTITY firstrun.tour.description     "Tap to go to your personalized Start page and start browsing the Web">
-<!ENTITY firstrun.features             "See the Release Notes">
+<!ENTITY firstrun.addons.title         "Get Add-ons">
+<!ENTITY firstrun.addons.description   "Install add-ons to enhance your &brandShortName; experience">
+<!ENTITY firstrun.home.title           "Get Started">
+<!ENTITY firstrun.home.description     "Tap to go to your personalized Start page and start browsing the Web">
+<!ENTITY firstrun.relNotes.label       "See the Release Notes">
 <!ENTITY firstrun.faq                  "FAQ">
 <!ENTITY firstrun.privacy              "Privacy Policy">
 <!ENTITY firstrun.follow               "Follow us on:">
--- a/mobile/themes/core/firstRun.css
+++ b/mobile/themes/core/firstRun.css
@@ -191,30 +191,30 @@ img {
   display: block;
   padding: 0 10px;
 }
 
 #firstrun ul#recommended li#sync b {
   background-position: 50% 0;
 }
 
-#firstrun ul#recommended li#starter b {
+#firstrun ul#recommended li#addons b {
   background-position: 50% -150px;
 }
 
-#firstrun ul#recommended li#tour b {
+#firstrun ul#recommended li#home b {
   background-position: 50% -300px;
 }
 
-#firstrun #features {
+#firstrun #relNotes {
   clear: both;
   text-align: center;
 }
 
-#firstrun #features a {
+#firstrun #relNotes a {
   display: inline-block;
   padding: 5px 35px 5px 0;
   background: url("chrome://browser/content/firstrun/nav-arrow.png") right center no-repeat;
   font-size: 16px;
 }
 
 #firstrun #demo {
   text-align: center;