made changes in UI

git-svn-id: file:///tmp/snv/trunk@13 12951d8a-c33d-4b7c-b961-822215c816e1
master
Abhinav Sarkar 14 years ago
parent cd689e8948
commit fc0419fc57
  1. 1
      chrome/content/diggsidebar.js
  2. 44
      chrome/content/diggstory.xml
  3. BIN
      chrome/content/image/down.jpg
  4. BIN
      chrome/content/image/up.jpg
  5. 43
      chrome/skin/diggsidebar.css

@ -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);

@ -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;
]]>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 396 B

@ -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,18 +23,17 @@ a img {
font-size: x-small;
}
.storyTitle {
padding: 0px 5px;
font-size: x-small;
font-weight: bold;
width: 100%;
color: #105CB6;
}
.storyNew, .storyRead, .storyPopularity {
float: right;
.storyCategory {
background-color: rgb(252,243,164);
text-align: center;
}
.storyNew, .storyRead {
padding: 0px 2px;
font-size: xx-small;
font-family: monospace;
.storyPopularity {
float: right;
}
.storyHref {
font-weight: bold;
@ -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;
}

Loading…
Cancel
Save