Bug 932694 - Show apps container when installed apps are found. r=mfinkle, a=bajaj
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Fri, 01 Nov 2013 07:45:32 -0700
changeset 166368 c24b1290afa9ea196e928389fe3a8e8f128da1d5
parent 166367 ee03911b8e1ded49efc2e3253b50ee8fdff39d51
child 166369 1a88cb16105332dde736e2b744519475155a18cb
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle, bajaj
bugs932694
milestone27.0a2
Bug 932694 - Show apps container when installed apps are found. r=mfinkle, a=bajaj
mobile/android/chrome/content/aboutApps.js
mobile/android/chrome/content/aboutApps.xhtml
--- a/mobile/android/chrome/content/aboutApps.js
+++ b/mobile/android/chrome/content/aboutApps.js
@@ -94,18 +94,18 @@ function updateList() {
   while (grid.lastChild) {
     grid.removeChild(grid.lastChild);
   }
 
   let request = navigator.mozApps.mgmt.getAll();
   request.onsuccess = function() {
     for (let i = 0; i < request.result.length; i++)
       addApplication(request.result[i]);
-    if (!request.result.length)
-      document.getElementById("noapps").className = "";
+    if (request.result.length)
+      document.getElementById("main-container").classList.remove("hidden");
   }
 }
 
 function addApplication(aApp) {
   let list = document.getElementById("appgrid");
   let manifest = new ManifestHelper(aApp.manifest, aApp.origin);
 
   let container = document.createElement("div");
--- a/mobile/android/chrome/content/aboutApps.xhtml
+++ b/mobile/android/chrome/content/aboutApps.xhtml
@@ -34,17 +34,17 @@
       <menuitem label="&aboutApps.uninstall;" onclick="ContextMenus.uninstall();"></menuitem>
     </menu>
   
     <div class="header">
       <div>&aboutApps.header;</div>
       <div id="header-button" role="button" aria-label="&aboutApps.browseMarketplace;" pref="app.marketplaceURL" onclick="openLink(this);"/>
     </div>
 
-    <div id="main-container" class="list hidden">
+    <div id="main-container" class="hidden">
       <div>
         <div class="spacer" id="spacer1"> </div>
         <div id="appgrid"/>
         <div class="spacer" id="spacer1"> </div>
       </div>
     </div>
 
     <div class="list-item" role="button" pref="app.marketplaceURL" onclick="openLink(this);">