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