Bug 719022 - Digits-only file names get .css prefixed in front of postfixed. r=jwalker

This commit is contained in:
Paul Rouget 2012-01-23 20:26:03 +01:00
Родитель 71b481fd13
Коммит 7e8b7257e8
4 изменённых файлов: 12 добавлений и 14 удалений

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

@ -402,7 +402,9 @@ StyleEditorChrome.prototype = {
this._view.setItemClassName(summary, aEditor.flags);
text(summary, ".stylesheet-name", aEditor.getFriendlyName());
let label = summary.querySelector(".stylesheet-name > label");
label.setAttribute("value", aEditor.getFriendlyName());
text(summary, ".stylesheet-title", aEditor.styleSheet.title || "");
text(summary, ".stylesheet-rule-count",
PluralForm.get(ruleCount, _("ruleCount.label")).replace("#1", ruleCount));

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

@ -20,6 +20,7 @@
*
* Contributor(s):
* Cedric Vivier <cedricv@neonux.com> (original author)
* Paul Rouget <paul@mozilla.com>
*
* 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
@ -64,22 +65,17 @@ li.error > .stylesheet-info > .stylesheet-more > .stylesheet-error-message {
}
.stylesheet-name {
/* clip the text at the beginning */
display: -moz-box;
direction: rtl;
text-align: left;
overflow: hidden;
outline: none;
}
.stylesheet-name > label {
cursor: pointer;
}
.splitview-nav > li > hgroup.stylesheet-info {
-moz-box-pack: center;
}
.splitview-nav:-moz-locale-dir(ltr) > li.unsaved > hgroup .stylesheet-name:before,
.splitview-nav:-moz-locale-dir(rtl) > li.unsaved > hgroup .stylesheet-name:after {
content: "* ";
}
.stylesheet-enabled {
display: -moz-box;
}

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

@ -101,7 +101,7 @@
title="&visibilityToggle.tooltip;"
accesskey="&saveButton.accesskey;"></a>
<hgroup class="stylesheet-info">
<h1><a class="stylesheet-name" href="#"></a></h1>
<h1><a class="stylesheet-name" href="#"><xul:label crop="start"/></a></h1>
<div class="stylesheet-more">
<h3 class="stylesheet-title"></h3>
<h3 class="stylesheet-rule-count"></h3>

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

@ -85,7 +85,7 @@ function testFirstStyleSheetEditor(aChrome, aEditor)
ok(!summary.classList.contains("inline"),
"first stylesheet UI does not have INLINE class");
let name = summary.querySelector(".stylesheet-name").textContent;
let name = summary.querySelector(".stylesheet-name > label").getAttribute("value");
is(name, "simple.css",
"first stylesheet's name is `simple.css`");
@ -113,7 +113,7 @@ function testSecondStyleSheetEditor(aChrome, aEditor)
ok(summary.classList.contains("inline"),
"second stylesheet UI has INLINE class");
let name = summary.querySelector(".stylesheet-name").textContent;
let name = summary.querySelector(".stylesheet-name > label").getAttribute("value");
ok(/^<.*>$/.test(name),
"second stylesheet's name is surrounded by `<>`");