made changes in UI

git-svn-id: file:///tmp/snv/trunk@13 12951d8a-c33d-4b7c-b961-822215c816e1
master
Abhinav Sarkar 2008-12-05 13:35:41 +00:00
parent cd689e8948
commit fc0419fc57
5 ha cambiato i file con 27 aggiunte e 61 eliminazioni

Vedi File

@ -176,7 +176,6 @@ var DiggSidebar = {
for (attr in attributes)
li.setAttribute(attr, attributes[attr]);
if (DiggSidebar.storyIds.indexOf(story.id) != -1) li.new = false;
li.read = story.read;
}
if (DiggSidebar.storyIds.indexOf(story.id) == -1) newStoryIds.push(story.id);

Vedi File

@ -9,15 +9,12 @@
<stylesheet src="chrome://diggsidebar/skin/diggsidebar.css"/>
</resources>
<content>
<xul:vbox>
<html:div class="storyHeader">
<html:span class="storyNew" title="New">New</html:span>
<html:span class="storyRead" title="Unread">Unread</html:span>
<html:img src="chrome://diggsidebar/content/image/up.jpg" class="storyCEIcon" />
<html:span xbl:inherits="xbl:text=title" class="storyTitle"></html:span>
</html:div>
<html:div class="storyDetails">
<html:div>
<xul:vbox flex="1">
<xul:vbox class="storyHeader" flex="1">
<xul:label xbl:inherits="xbl:text=title" class="storyTitle"/>
</xul:vbox>
<xul:vbox class="storyDetails" flex="1">
<html:div class="storyCategory">
<html:span xbl:inherits="xbl:text=container" class="storyContainer"></html:span> &gt;
<html:span xbl:inherits="xbl:text=topic" class="storyTopic"></html:span> /
<html:span xbl:inherits="xbl:text=status" class="storyStatus"></html:span>
@ -48,7 +45,7 @@
onclick="DiggSidebar.Utils.openUrlInTab(this.href); return false"></html:a>
<html:span xbl:inherits="xbl:text=date" class="storyDate"></html:span>
</html:div>
</html:div>
</xul:vbox>
</xul:vbox>
</content>
<implementation>
@ -56,39 +53,20 @@
<![CDATA[
this.d = {};
this.d.read = false;
this.d.new = true;
this.d.collapsed = true;
]]>
</constructor>
<property name="read"
onget="return this.d.read;"
onset="this.d.read = val; if(val==true) this.markAsRead();"/>
<property name="new"
onget="return this.d.new;"
onset="this.d.new = val; if(val==false) this.markAsOld();"/>
<property name="collapsed"
onget="return this.d.collapsed;"
onset="this.d.collapsed = val;"/>
<method name="markAsRead">
<body>
<![CDATA[
with (document.getAnonymousElementByAttribute(this, "class", "storyRead")) {
style.backgroundColor = "black";
style.color = "white";
title = "Read";
textContent = "Read";
}
]]>
</body>
</method>
<method name="markAsOld">
<body>
<![CDATA[
with (document.getAnonymousElementByAttribute(this, "class", "storyNew")) {
style.backgroundColor = "black";
style.color = "white";
title = "Old";
textContent = "Old";
with (document.getAnonymousElementByAttribute(this, "class", "storyTitle")) {
style.color = "#333333";
}
]]>
</body>
@ -96,8 +74,6 @@
<method name="showDescription">
<body>
<![CDATA[
document.getAnonymousElementByAttribute(this, "class", "storyCEIcon").src =
"chrome://diggsidebar/content/image/down.jpg";
document.getAnonymousElementByAttribute(this, "class", "storyDetails").style.display = 'block';
this.read = true;
this.collapsed = false;
@ -107,8 +83,6 @@
<method name="hideDescription">
<body>
<![CDATA[
document.getAnonymousElementByAttribute(this, "class", "storyCEIcon").src =
"chrome://diggsidebar/content/image/up.jpg";
document.getAnonymousElementByAttribute(this, "class", "storyDetails").style.display = 'none';
this.collapsed = true;
]]>

File binario non mostrato.

Prima

Larghezza:  |  Altezza:  |  Dimensione: 375 B

File binario non mostrato.

Prima

Larghezza:  |  Altezza:  |  Dimensione: 396 B

Vedi File

@ -6,20 +6,16 @@ a {
a img {
border: none;
}
#dsStoryListBox {
margin: 1px;
border-style: solid !important;
border-color: #000;
border-width: 1px;
.storyHeader {
cursor: pointer;
padding: 1px;
}
.storyDetails {
padding: 3px;
display: none;
background-color: #ffffff;
clear: both;
border: 1px dashed black;
margin: 0px 8px 8px 8px;
width: 230px;
margin: 0px 5px 5px 5px;
}
.storyDetails > div {
clear: both;
@ -27,19 +23,18 @@ a img {
font-size: x-small;
}
.storyTitle {
padding: 0px 5px;
font-size: x-small;
font-weight: bold;
width: 100%;
color: #105CB6;
}
.storyNew, .storyRead, .storyPopularity {
.storyCategory {
background-color: rgb(252,243,164);
text-align: center;
}
.storyPopularity {
float: right;
}
.storyNew, .storyRead {
padding: 0px 2px;
font-size: xx-small;
font-family: monospace;
}
.storyHref {
font-weight: bold;
padding: 2px 3px;
@ -48,27 +43,25 @@ a img {
.storyDesc {
height: auto!important;
}
.storyHeader {
cursor: pointer;
padding: 2px;
width: 250px;
}
.storyHref:hover, .storyUserLink:hover {
color: white;
background-color: blue;
}
#dsStoryListBox richlistitem{
border-bottom: 1px solid black;
border: 2px solid #E5ECF3;
border-top: none;
color: #000000!important;
-moz-binding: url("chrome://diggsidebar/content/diggstory.xml#diggstoryitem");
}
richlistitem[selected="true"] {
background-color: #FFEBF0;
background-color: #E5ECF3;
color: inherit;
}
richlistitem .storyTitle:hover {
background-color: green;
color: white;
.storyHeader:hover {
background-color: rgb(252,243,164);
}
.storyHeader:hover .storyTitle{
color: #000;
}