Skip to content

Commit 7c39f8b

Browse files
committed
Fix DFL-1704: Don't use the css content property to display Dragonfly UI
images. Plus fixes for some whitespace issues. Also removed the text for badges, only use icons.
1 parent 271f7aa commit 7c39f8b

File tree

4 files changed

+18
-30
lines changed

4 files changed

+18
-30
lines changed

src/storage/storage_style.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ input[type='datetime-local']
118118

119119
.storage_view .sortable-table .check
120120
{
121-
content: url("../ui-images/menu_check.png");
121+
background: transparent url("../ui-images/menu_check.png") 50% no-repeat;
122+
width: 100%;
123+
height: 22px;
122124
}
123125

124126

src/ui-scripts/tab.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,13 @@ var TabBase = new function()
4545
return document.querySelector("tab[ref-id='" + this.ref_id + "']");
4646
};
4747

48-
this.set_badge = function(type, content)
48+
this.set_badge = function(type)
4949
{
5050
var tab = this._get_top_tab_element();
5151
var badge = tab ? tab.querySelector(".badge") : null;
5252
if (badge)
5353
{
5454
badge.addClass(type || "");
55-
badge.textContent = content != null ? content : "";
5655
}
5756
};
5857

@@ -87,7 +86,7 @@ var TabBase = new function()
8786

8887
this.clear_badge = function()
8988
{
90-
this.set_badge("", null);
89+
this.set_badge("");
9190
};
9291

9392
this.set_state = function(state)
@@ -132,7 +131,7 @@ var JavaScriptTab = function(ref_id, name, has_close_button)
132131
switch (msg.state)
133132
{
134133
case "waiting":
135-
this.set_badge("paused", "paused");
134+
this.set_badge("paused");
136135
break;
137136
default:
138137
this.clear_badge();

src/ui-style/tabs.css

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -168,22 +168,8 @@ top-tabs tab[data-state="waiting"].active
168168
top-tabs .badge
169169
{
170170
position: absolute;
171-
background: #cf3015; /* daniel/david edit 2011-07-01, was: #df6531 */
172-
color: #fff; /* daniel/david edit 2011-07-01, was: #000 */
173-
text-shadow: 0 0 1px; /* daniel/david edit 2011-07-01, was: none */
174-
line-height: 1;
175-
padding: 1px 3px;
176-
border-radius: 4px;
177-
top: 1px;
178-
right: 1px;
179-
font-size: 9px;
180-
}
181-
top-tabs .badge:empty
182-
{
183-
display: none;
184171
}
185172

186-
187173
/* Top tabs */
188174
/* Width depends on the images */
189175

src/ui-style/ui.css

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,8 +1677,8 @@ toolbar
16771677
/* TODO: this is just a temp workaround. */
16781678
#waiting-for-connection
16791679
{
1680-
position: relative;
1681-
z-index: 2;
1680+
position: relative;
1681+
z-index: 2;
16821682
}
16831683

16841684
.close-tab-button
@@ -1768,31 +1768,32 @@ info {
17681768

17691769
.badge.paused
17701770
{
1771-
content: url("../ui-images/pause.png");
1772-
background-color: transparent;
1773-
top: -2px;
1774-
left: 21px;
1771+
background: transparent url("../ui-images/pause.png") 50% no-repeat;
1772+
height: 15px;
1773+
width: 15px;
1774+
left: 22px;
1775+
top: -1px;
17751776
}
17761777

17771778
.inspect-node-link
17781779
{
1779-
cursor: pointer;
1780+
cursor: pointer;
17801781
}
17811782

17821783
.inspect-node-link:hover
17831784
{
1784-
text-decoration: underline;
1785+
text-decoration: underline;
17851786
}
17861787

17871788
.internal-link
17881789
{
1789-
cursor: pointer;
1790-
text-decoration: underline;
1790+
cursor: pointer;
1791+
text-decoration: underline;
17911792
}
17921793

17931794
.internal-link:hover
17941795
{
1795-
text-decoration: none;
1796+
text-decoration: none;
17961797
}
17971798

17981799
.inline-block

0 commit comments

Comments
 (0)