Bug 1127288 - add header for DRM checkbox, fix link alignment, r=dolske

This commit is contained in:
Gijs Kruitbosch 2015-01-31 10:36:54 +00:00
Родитель c3952b24ed
Коммит ea5e7de4d5
4 изменённых файлов: 36 добавлений и 11 удалений

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

@ -44,8 +44,11 @@ var gContentPane = {
let drmInfoURL =
Services.urlFormatter.formatURLPref("app.support.baseURL") + "drm-content";
document.getElementById("playDRMContentLink").setAttribute("href", drmInfoURL);
document.getElementById("playDRMContentRow").hidden =
!Services.prefs.getBoolPref("browser.eme.ui.enabled");
if (!Services.prefs.getBoolPref("browser.eme.ui.enabled")) {
// Don't want to rely on .hidden for the toplevel groupbox because
// of the pane hiding/showing code potentially interfering:
document.getElementById("drmGroup").setAttribute("style", "display: none !important");
}
},
// UTILITY FUNCTIONS

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

@ -39,22 +39,35 @@
<label class="header-name">&paneContent.title;</label>
</hbox>
<groupbox id="drmGroup" data-category="paneContent" hidden="true">
<caption><label>&drmContent.label;</label></caption>
<grid id="contentGrid2">
<columns>
<column flex="1"/>
<column/>
</columns>
<rows id="contentRows-2">
<row id="playDRMContentRow">
<vbox align="start">
<checkbox id="playDRMContent" preference="media.eme.enabled"
label="&playDRMContent.label;" accesskey="&playDRMContent.accesskey;"/>
</vbox>
<hbox pack="end" align="center">
<label id="playDRMContentLink" class="text-link" value="&playDRMContent.learnMore.label;"/>
</hbox>
</row>
</rows>
</grid>
</groupbox>
<groupbox id="miscGroup" data-category="paneContent" hidden="true">
<caption><label>&popups.label;</label></caption>
<grid id="contentGrid">
<columns>
<column flex="1"/>
<column/>
</columns>
<rows id="contentRows-1">
<row id="playDRMContentRow">
<vbox align="start">
<checkbox id="playDRMContent" preference="media.eme.enabled"
label="&playDRMContent.label;" accesskey="&playDRMContent.accesskey;"/>
</vbox>
<hbox pack="end">
<label id="playDRMContentLink" class="text-link" value="&playDRMContent.learnMore.label;"/>
</hbox>
</row>
<row id="popupPolicyRow">
<vbox align="start">
<checkbox id="popupPolicy" preference="dom.disable_open_during_load"

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

@ -43,6 +43,8 @@
<!ENTITY translation.options.attribution.beforeLogo "Translations by">
<!ENTITY translation.options.attribution.afterLogo "">
<!ENTITY drmContent.label "DRM content">
<!ENTITY playDRMContent.label "Play DRM content">
<!ENTITY playDRMContent.accesskey "P">
<!ENTITY playDRMContent.learnMore.label "Learn more">

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

@ -182,6 +182,13 @@ treecol {
-moz-margin-start: 0;
}
/* Content pane */
#playDRMContentLink {
/* Line up with the buttons in the other grid bits: */
margin-left: 4px !important;
margin-right: 4px !important;
}
/* Applications Pane Styles */
#applicationsContent {