Bug 508705: simplify bookmarks hierarchy [r=mark.finkle]
authorVivien Nicolas <21@vingtetun.org>
Fri, 11 Sep 2009 10:56:09 -0400
changeset 65547 7329b019e71de3b0a8c6d055ab87c79f641f8e98
parent 65546 18123c7b9a651e0d0cc5a8c1b2acb5e314f50f18
child 65548 07c6b3d07234cd8365fcf005f4f0c727e8e1a5b4
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)
reviewersmark
bugs508705
Bug 508705: simplify bookmarks hierarchy [r=mark.finkle]
mobile/chrome/content/bindings.xml
mobile/themes/hildon/browser.css
mobile/themes/hildon/images/arrowup-16.png
mobile/themes/hildon/jar.mn
mobile/themes/wince/browser.css
mobile/themes/wince/images/arrowup-16.png
mobile/themes/wince/jar.mn
--- a/mobile/chrome/content/bindings.xml
+++ b/mobile/chrome/content/bindings.xml
@@ -820,17 +820,17 @@
               let parent = document.createElementNS(XULNS, "placelabel");
               parent.setAttribute("class", "bookmark-folder");
               parent.setAttribute("itemid", folderId);
               parent.setAttribute("indent", 0);
               parent.setAttribute("title", title);
               parents.insertBefore(parent, parents.firstChild);
 
               // XXX Fix me - use <handler>?
-              parent.addEventListener("click", function(e) { self.openFolder(e.target.itemId); }, false);
+              parent.addEventListener("click", function(e) { self.openFolder(e.target.previousSibling.itemId); }, false);
 
               folderId = PlacesUtils.bookmarks.getFolderIdForItem(folderId);
             } while (folderId != PlacesUtils.bookmarks.placesRoot)
 
             let children = this._children;
             while (children.firstChild)
               children.removeChild(children.firstChild);
 
--- a/mobile/themes/hildon/browser.css
+++ b/mobile/themes/hildon/browser.css
@@ -445,22 +445,30 @@ toolbarbutton.page-button {
 #bookmark-items, #folder-items {
   -moz-appearance: none !important;
   background-color: rgb(255,255,255);
   padding: 0;
 }
 
 .place-list-parents {
   background-color: rgb(207,207,207);
-  padding: 0.5mm;
+}
+
+.place-list-parents placelabel {
+  visibility: collapse;
+}
+
+.place-list-parents placelabel:last-child:not(:only-child) {
+  visibility: visible;
 }
 
 .place-list-children {
   -moz-appearance: none;
   border: none !important;
+  margin: 0.5mm;
   padding: 0;
 }
 
 .bookmark-folder, .bookmark-item {
   padding: 0.5mm 1.1mm;
   border-bottom: 0.1mm solid rgb(207,207,207);
   min-height: 14.4mm; /* row size */
 }
@@ -497,38 +505,47 @@ placeitem[selected] .bookmark-item-image
   color: black;
   margin-right: 2.2mm;
   font-size: 11.75pt !important;
   font-weight: lighter;
 }
 
 placelabel.bookmark-folder {
   border-bottom: 0.1mm solid rgb(255,255,255);
+  background: url(chrome://browser/skin/images/arrowup-16.png) no-repeat 98% 50%;
 }
 
 /* folders have a fixed image */
 placeitem[type=folder] .bookmark-item-image {
   list-style-image: url("chrome://browser/skin/images/folder-30.png");
 }
 
+placeitem[type="folder"] {
+  background: url(chrome://browser/skin/images/arrowright-16.png) no-repeat 98% 50%;
+}
+
 /* hide the unuseful fields for folder */
 placeitem[type=folder] .bookmark-item-uri,
 placeitem[type=folder] .bookmark-item-tags {
   visibility: hidden;
 }
 
 /* control the manage controls */
 .bookmark-folder-new {
   visibility: collapse;
 }
 
 placelist[ui="manage"] .bookmark-folder-new {
   visibility: visible;
 }
 
+placelist[ui="manage"] placeitem[type="folder"] {
+  background-image: none;
+}
+
 placeitem[ui="manage"] .bookmark-close-button,
 placeitem[ui="manage"] .bookmark-folder-button,
 placeitem[ui="manage"] .bookmark-item-image {
   visibility: collapse;
 }
 
 /* be consistent with the size of placeitem */
 placelabel {
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..87d7b6eb1b384aada1cc657d0d5b71c5338f2573
GIT binary patch
literal 309
zc%17D@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@
z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPggaPEI~)w!>zfl0c!Yo-U3d7N@UH
z-Y9rTL8Q&zsIApFL-~%Upm;&Ujf~{iT6qalYfIU=UKlwA-Pp}&mho`n^x*SOR($*V
z|JynomH3$^a%quS*`JLL(z{u#a^Jkmb!^hl+%;Y0)mC=RvgtQ>bKRSJgoTNx;L5SE
zy-kce!h<+I@Xlb`suE~yE6;eHXAj3c)0Yj*8_s=Q!mv$<M_|wGCzEWvGE^caY&oBO
y<=8X_&MOCZmpv$*c7Vl#{e9He%lkjbH(BpJ>-8>mho=zG0}P(7elF{r5}E*zMsb$_
--- a/mobile/themes/hildon/jar.mn
+++ b/mobile/themes/hildon/jar.mn
@@ -9,16 +9,17 @@ chrome.jar:
 
 chrome.jar:
 % skin browser classic/1.0 %
   aboutCertError.css                   (aboutCertError.css)
   platform.css                         (platform.css)
   browser.css                          (browser.css)
   notification.css                     (notification.css)
   images/arrowright-16.png             (images/arrowright-16.png)
+  images/arrowup-16.png                (images/arrowup-16.png)
   images/ratings-18.png                (images/ratings-18.png)
   images/favicon-default-30.png        (images/favicon-default-30.png)
   images/starred-64.png                (images/starred-64.png)
   images/throbber.png                  (images/throbber.png)
   images/navigation-magnifier-30.png   (images/navigation-magnifier-30.png)
   images/folder-30.png                 (images/folder-30.png)
   images/stop-30.png                   (images/stop-30.png)
   images/reload-30.png                 (images/reload-30.png)
--- a/mobile/themes/wince/browser.css
+++ b/mobile/themes/wince/browser.css
@@ -232,22 +232,30 @@ toolbarbutton.page-button {
 #bookmark-items, #folder-items {
   -moz-appearance: none !important;
   background-color: rgb(255,255,255);
   padding: 0;
 }
 
 .place-list-parents {
   background-color: rgb(207,207,207);
-  padding: 0.25mm;
+}
+
+.place-list-parents placelabel {
+  visibility: collapse;
+}
+
+.place-list-parents placelabel:last-child:not(:only-child) {
+  visibility: visible;
 }
 
 .place-list-children {
   -moz-appearance: none;
   border: none !important;
+  margin: 0.25mm;
   padding: 0;
 }
 
 .bookmark-folder, .bookmark-item {
   padding: 0.25mm 0.55mm;
   border-bottom: 0.05mm solid rgb(207,207,207);
   min-height: 7.2mm; /* row size */
 }
@@ -284,16 +292,21 @@ placeitem[selected] .bookmark-item-image
   color: black;
   margin-right: 1.1mm;
   font-size: 8pt !important;
   font-weight: lighter;
 }
 
 placelabel.bookmark-folder {
   border-bottom: 0.05mm solid rgb(255,255,255);
+  background: url(chrome://browser/skin/images/arrowup-16.png) no-repeat 98% 50%;
+}
+
+placeitem[type="folder"] {
+  background: url(chrome://browser/skin/images/arrowright-16.png) no-repeat 98% 50%;
 }
 
 /* hide the unuseful fields for folder */
 placeitem[type=folder] .bookmark-item-uri,
 placeitem[type=folder] .bookmark-item-tags {
   visibility: hidden;
 }
 
@@ -301,16 +314,20 @@ placeitem[type=folder] .bookmark-item-ta
 .bookmark-folder-new {
   visibility: collapse;
 }
 
 placelist[ui="manage"] .bookmark-folder-new {
   visibility: visible;
 }
 
+placelist[ui="manage"] placeitem[type="folder"] {
+  background-image: none;
+}
+
 placeitem[ui="manage"] .bookmark-close-button,
 placeitem[ui="manage"] .bookmark-folder-button,
 placeitem[ui="manage"] .bookmark-item-image {
   visibility: collapse;
 }
 
 /* be consistent with the size of placeitem */
 placelabel {
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..87d7b6eb1b384aada1cc657d0d5b71c5338f2573
GIT binary patch
literal 309
zc%17D@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@
z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPggaPEI~)w!>zfl0c!Yo-U3d7N@UH
z-Y9rTL8Q&zsIApFL-~%Upm;&Ujf~{iT6qalYfIU=UKlwA-Pp}&mho`n^x*SOR($*V
z|JynomH3$^a%quS*`JLL(z{u#a^Jkmb!^hl+%;Y0)mC=RvgtQ>bKRSJgoTNx;L5SE
zy-kce!h<+I@Xlb`suE~yE6;eHXAj3c)0Yj*8_s=Q!mv$<M_|wGCzEWvGE^caY&oBO
y<=8X_&MOCZmpv$*c7Vl#{e9He%lkjbH(BpJ>-8>mho=zG0}P(7elF{r5}E*zMsb$_
--- a/mobile/themes/wince/jar.mn
+++ b/mobile/themes/wince/jar.mn
@@ -11,16 +11,17 @@ chrome.jar:
 % skin browser classic/1.0 %
   aboutCertError.css                   (aboutCertError.css)
   platform.css                         (platform.css)
   browser.css                          (browser.css)
   browser-high.css                     (browser-high.css)
   browser-low.css                      (browser-low.css)
   notification.css                     (notification.css)
   images/arrowright-16.png             (images/arrowright-16.png)
+  images/arrowup-16.png                (images/arrowup-16.png)
   images/ratings-18.png                (images/ratings-18.png)
 
   images/favicon-default-30.png        (images/favicon-default-30.png)
   images/starred-64.png                (images/starred-64.png)
   images/throbber.png                  (images/throbber.png)
   images/navigation-magnifier-30.png   (images/navigation-magnifier-30.png)
   images/folder-30.png                 (images/folder-30.png)
   images/stop-30.png                   (images/stop-30.png)