Bug 896757 - Defect - Remove > from narrow version of grid title strings r=mbrubeck

--HG--
extra : rebase_source : c9cc4980e978d0d16a7c3b2023a26ad100fcbcd1
This commit is contained in:
Rodrigo Silveira 2013-07-29 18:11:16 -07:00
Родитель 5a0e1504b3
Коммит 52243bdf34
5 изменённых файлов: 45 добавлений и 28 удалений

Просмотреть файл

@ -1185,16 +1185,16 @@ var StartUI = {
ContextUI.dismissTabs();
},
onNarrowTitleClick: function onNarrowTitleClick(gridId) {
let grid = document.getElementById(gridId);
onNarrowTitleClick: function onNarrowTitleClick(sectionId) {
let section = document.getElementById(sectionId);
if (grid.hasAttribute("expanded"))
if (section.hasAttribute("expanded"))
return;
for (let expandedGrid of Elements.startUI.querySelectorAll("[expanded]"))
expandedGrid.removeAttribute("expanded")
for (let expandedSection of Elements.startUI.querySelectorAll(".meta-section[expanded]"))
expandedSection.removeAttribute("expanded")
grid.setAttribute("expanded", "true");
section.setAttribute("expanded", "true");
},
handleEvent: function handleEvent(aEvent) {

Просмотреть файл

@ -197,31 +197,35 @@
<!-- portrait/landscape/filled view -->
<scrollbox id="start-scrollbox" observes="bcast_preciseInput" flex="1">
<vbox id="start-topsites" class="meta-section">
<vbox id="start-topsites" class="meta-section" expanded="true">
<label class="meta-section-title wide-title" value="&topSitesHeader.label;"/>
<label class="meta-section-title narrow-title" value="&snappedTopSitesHeader.label;"
onclick="StartUI.onNarrowTitleClick('start-topsites-grid')"/>
<richgrid id="start-topsites-grid" set-name="topSites" rows="3" columns="3" tiletype="thumbnail" seltype="multiple" flex="1" expanded="true"/>
<html:div class="meta-section-title narrow-title" onclick="StartUI.onNarrowTitleClick('start-topsites')">
&narrowTopSitesHeader.label;
</html:div>
<richgrid id="start-topsites-grid" set-name="topSites" rows="3" columns="3" tiletype="thumbnail" seltype="multiple" flex="1"/>
</vbox>
<vbox id="start-bookmarks" class="meta-section">
<label class="meta-section-title wide-title" value="&bookmarksHeader.label;"/>
<label class="meta-section-title narrow-title" value="&snappedBookmarksHeader.label;"
onclick="StartUI.onNarrowTitleClick('start-bookmarks-grid')"/>
<html:div class="meta-section-title narrow-title" onclick="StartUI.onNarrowTitleClick('start-bookmarks')">
&narrowBookmarksHeader.label;
</html:div>
<richgrid id="start-bookmarks-grid" set-name="bookmarks" seltype="multiple" flex="1"/>
</vbox>
<vbox id="start-history" class="meta-section">
<label class="meta-section-title wide-title" value="&recentHistoryHeader.label;"/>
<label class="meta-section-title narrow-title" value="&snappedRecentHistoryHeader.label;"
onclick="StartUI.onNarrowTitleClick('start-history-grid')"/>
<html:div class="meta-section-title narrow-title" onclick="StartUI.onNarrowTitleClick('start-history')">
&narrowRecentHistoryHeader.label;
</html:div>
<richgrid id="start-history-grid" set-name="recentHistory" seltype="multiple" flex="1"/>
</vbox>
<vbox id="start-remotetabs" class="meta-section">
<label class="meta-section-title wide-title" value="&remoteTabsHeader.label;"/>
<label id="snappedRemoteTabsLabel" class="meta-section-title narrow-title" value="&snappedRemoteTabsHeader.label;"
onclick="StartUI.onNarrowTitleClick('start-remotetabs-grid')"/>
<html:div id="snappedRemoteTabsLabel" class="meta-section-title narrow-title" onclick="StartUI.onNarrowTitleClick('start-remotetabs')">
&narrowRemoteTabsHeader.label;
</html:div>
<richgrid id="start-remotetabs-grid" set-name="remoteTabs" seltype="multiple" flex="1"/>
</vbox>

Просмотреть файл

@ -25,17 +25,17 @@
<!ENTITY recentHistoryHeader.label "Recent History">
<!ENTITY remoteTabsHeader.label "Tabs from Other Devices">
<!-- LOCALIZATION NOTE (snappedRemoteTabsHeader.label): shortened version of startRemoteTabsHeader.label.
Needs to be two words or shorter to fit in narrow vertical space.-->
<!-- LOCALIZATION NOTE (snappedRemoteTabsHeader.label,
snappedBookmarksHeader.label,
snappedHistoryHeader.label,
snappedTopSitesHeader.label )
The '>' character is not part of the name, but is an indicator of more content. Please do not localize the '>' -->
<!ENTITY snappedRemoteTabsHeader.label "Remote Tabs >">
<!ENTITY snappedBookmarksHeader.label "Bookmarks >">
<!ENTITY snappedRecentHistoryHeader.label "Recent History >">
<!ENTITY snappedTopSitesHeader.label "Top Sites >">
<!-- LOCALIZATION NOTE (narrowTopSitesHeader.label,
narrowBookmarksHeader.label,
narrowHistoryHeader.label,
narrowRemoteTabsHeader.label )
are shortened versions of topSitesHeader.label, bookmarksHeader.label, recentHistoryHeader.label
and remoteTabsHeader.label. Need to be two words or shorter to fit in narrow vertical space.
-->
<!ENTITY narrowTopSitesHeader.label "Top Sites">
<!ENTITY narrowBookmarksHeader.label "Bookmarks">
<!ENTITY narrowRecentHistoryHeader.label "Recent History">
<!ENTITY narrowRemoteTabsHeader.label "Remote Tabs">
<!ENTITY downloadsHeader.label "Downloads">
<!ENTITY downloadShowPage.label "Go to Page">

Просмотреть файл

@ -249,7 +249,7 @@ documenttab[selected] .documenttab-selection {
visibility: collapse;
}
#start-container[viewstate="snapped"] richgrid[expanded] {
#start-container[viewstate="snapped"] .meta-section[expanded] > richgrid {
visibility: visible;
}

Просмотреть файл

@ -653,18 +653,31 @@ arrowbox {
max-width: 100%;
width: 100%;
}
.meta-section {
margin: 0 @metro_spacing_large@;
}
.meta-section-title {
font-size: @metro_font_large@;
font-weight: 100;
display: none;
cursor: default;
}
#start-container[viewstate="snapped"] .meta-section-title.narrow-title,
#start-container:not([viewstate="snapped"]) .meta-section-title.wide-title {
display: block;
}
.meta-section:not([expanded]) > .meta-section-title.narrow-title:-moz-locale-dir(ltr):after {
content: ">";
}
.meta-section:not([expanded]) > .meta-section-title.narrow-title:-moz-locale-dir(rtl):before {
content: "<";
}
/* App bars ----------------------------------------------------------------- */
appbar {
display: block;