chrome/content/firstrun/firstrun.xhtml
author Anas Husseini <linux.anas@gmail.com>
Thu, 31 Mar 2011 17:35:11 +0200
changeset 2958 bfd90c18b93914077249540913cec926a1ac9897
parent 2707 2e402445a7073c364813c0397a5e1b2ca87e8455
permissions -rw-r--r--
Bug 646595 - Add RTL support to about:firstrun in Fennec [r=vingtetun]

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
%brandDTD;
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd" >
%globalDTD;
<!ENTITY % firstrunDTD SYSTEM "chrome://browser/locale/firstrun.dtd" >
%firstrunDTD;
]>

<!-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
   -
   - The contents of this file are subject to the Mozilla Public License Version
   - 1.1 (the "License"); you may not use this file except in compliance with
   - the License. You may obtain a copy of the License at
   - http://www.mozilla.org/MPL/
   -
   - Software distributed under the License is distributed on an "AS IS" basis,
   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   - for the specific language governing rights and limitations under the
   - License.
   -
   - The Original Code is Mozilla Communicator client code, released
   - March 31, 1998.
   -
   - The Initial Developer of the Original Code is
   - Netscape Communications Corporation.
   - Portions created by the Initial Developer are Copyright (C) 1998-1999
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -   Henrik Gemal <mozilla@gemal.dk>
   -   Daniel Veditz <dveditz@netscape.com>
   -   Alexey Chernyak <alexeyc@bigfoot.com>
   -   Steffen Wilberg <steffen.wilberg@web.de>
   -
   - Alternatively, the contents of this file may be used under the terms of
   - either the GNU General Public License Version 2 or later (the "GPL"), or
   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
   - in which case the provisions of the GPL or the LGPL are applicable instead
   - of those above. If you wish to allow use of your version of this file only
   - under the terms of either the GPL or the LGPL, and not to allow others to
   - use your version of this file under the terms of the MPL, indicate your
   - decision by deleting the provisions above and replace them with the notice
   - and other provisions required by the GPL or the LGPL. If you do not delete
   - the provisions above, a recipient may use your version of this file under
   - the terms of any one of the MPL, the GPL or the LGPL.
   -
   - ***** END LICENSE BLOCK ***** -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="viewport" content="width=480; initial-scale=.6667; user-scalable=0;" />
  <title>&firstrun.title;</title>
  <link rel="icon" type="image/png" href="chrome://branding/content/favicon32.png" />
  <link rel="stylesheet" href="chrome://browser/skin/firstRun.css" type="text/css"/>
</head>

<body id="firstrun" dir="&locale.dir;" 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.heading2;</p>
    </div>

    <div id="content">
      <h2></h2>
      <ul id="recommended">
        <li id="sync"><a href="javascript:loadSync();"><b>&firstrun.sync2.title;</b> <span>&firstrun.sync2.description;</span></a></li>
        <li id="addons"><a href="javascript:loadAddons();"><b>&firstrun.addons2.title;</b> <span>&firstrun.addons2.description;</span></a></li>
        <li id="home"><a href="about:home"><b>&firstrun.home2.title;</b> <span>&firstrun.home2.description;</span></a></li>
      </ul>

      <p id="features"><a id="featuresURL"><span>&firstrun.features;</span><img id="nav-arrow" src="chrome://browser/content/firstrun/nav-arrow.png" /></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"},
          {id: "featuresURL", pref: "app.featuresURL"},
          {id: "faqURL", pref: "app.faqURL"},
          {id: "privacyURL", pref: "app.privacyURL"}
        ];

        function getChromeWin() {
          if (!gChromeWin) {
            gChromeWin = window
                    .QueryInterface(Ci.nsIInterfaceRequestor)
                    .getInterface(Ci.nsIWebNavigation)
                    .QueryInterface(Ci.nsIDocShellTreeItem)
                    .rootTreeItem
                    .QueryInterface(Ci.nsIInterfaceRequestor)
                    .getInterface(Ci.nsIDOMWindow)
                    .QueryInterface(Ci.nsIDOMChromeWindow);
          }
          return gChromeWin;
        }

        function loadSync() {
          let win = getChromeWin();
          win.WeaveGlue.open();
        }

        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 element = document.getElementById(link.id);
              if (element) {
                let url = formatter.formatURLPref(link.pref);
                element.setAttribute("href", url);
              }
            });
          } catch (ex) {}
        }

        document.addEventListener("DOMContentLoaded", init, false);
      ]]></script>
    </div>

    <div id="footer">

      <ul class="nav">
        <li><a id="faqURL">&firstrun.faq;</a></li>
        <li><a id="privacyURL">&firstrun.privacy;</a></li>
      </ul>

      <div id="follow">
        <p>&firstrun.follow;</p>
        <ul>
          <li id="follow-twitter"><a href="http://twitter.com/mozmobile"><img src="chrome://browser/content/firstrun/twitter.png" height="41" width="42" /></a></li>
          <li id="follow-facebook"><a href="http://www.facebook.com/firefoxformobile"><img src="chrome://browser/content/firstrun/facebook.png" height="41" width="42" /></a></li>
        </ul>
      </div>
    </div>
  </div>
</body>
</html>