Browse Source

made changes in UI

git-svn-id: file:///tmp/snv/trunk@13 12951d8a-c33d-4b7c-b961-822215c816
Abhinav Sarkar 13 years ago
parent
commit
fc0419fc57

+ 0
- 1
chrome/content/diggsidebar.js View File

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

+ 9
- 35
chrome/content/diggstory.xml View File

@@ -9,15 +9,12 @@
9 9
             <stylesheet src="chrome://diggsidebar/skin/diggsidebar.css"/>
10 10
         </resources>
11 11
         <content>
12
-            <xul:vbox>
13
-            <html:div class="storyHeader">
14
-                <html:span class="storyNew" title="New">New</html:span>
15
-                <html:span class="storyRead" title="Unread">Unread</html:span>
16
-                <html:img src="chrome://diggsidebar/content/image/up.jpg" class="storyCEIcon" />
17
-                <html:span xbl:inherits="xbl:text=title" class="storyTitle"></html:span>
18
-            </html:div>
19
-            <html:div class="storyDetails">
20
-                <html:div>
12
+            <xul:vbox flex="1">
13
+            <xul:vbox class="storyHeader" flex="1">
14
+                <xul:label xbl:inherits="xbl:text=title" class="storyTitle"/>
15
+            </xul:vbox>
16
+            <xul:vbox class="storyDetails" flex="1">
17
+                <html:div class="storyCategory">
21 18
                     <html:span xbl:inherits="xbl:text=container" class="storyContainer"></html:span> &gt;
22 19
                     <html:span xbl:inherits="xbl:text=topic" class="storyTopic"></html:span> /
23 20
                     <html:span xbl:inherits="xbl:text=status" class="storyStatus"></html:span>
@@ -48,7 +45,7 @@
48 45
                             onclick="DiggSidebar.Utils.openUrlInTab(this.href); return false"></html:a>
49 46
                     <html:span xbl:inherits="xbl:text=date" class="storyDate"></html:span>
50 47
                 </html:div>
51
-            </html:div>
48
+            </xul:vbox>
52 49
             </xul:vbox>
53 50
         </content>
54 51
         <implementation>
@@ -56,39 +53,20 @@
56 53
                 <![CDATA[
57 54
                 this.d = {};
58 55
                 this.d.read = false;
59
-                this.d.new = true;
60 56
                 this.d.collapsed = true;
61 57
                 ]]>
62 58
             </constructor>
63 59
             <property name="read"
64 60
                 onget="return this.d.read;"
65 61
                 onset="this.d.read = val; if(val==true) this.markAsRead();"/>
66
-            <property name="new"
67
-                onget="return this.d.new;"
68
-                onset="this.d.new = val; if(val==false) this.markAsOld();"/>
69 62
             <property name="collapsed"
70 63
                 onget="return this.d.collapsed;"
71 64
                 onset="this.d.collapsed = val;"/>
72 65
             <method name="markAsRead">
73 66
                 <body>
74 67
                 <![CDATA[
75
-                    with (document.getAnonymousElementByAttribute(this, "class", "storyRead")) {
76
-                        style.backgroundColor = "black";
77
-                        style.color = "white";
78
-                        title = "Read";
79
-                        textContent = "Read";
80
-                    }
81
-                ]]>
82
-                </body>
83
-            </method>
84
-            <method name="markAsOld">
85
-                <body>
86
-                <![CDATA[
87
-                    with (document.getAnonymousElementByAttribute(this, "class", "storyNew")) {
88
-                        style.backgroundColor = "black";
89
-                        style.color = "white";
90
-                        title = "Old";
91
-                        textContent = "Old";
68
+                    with (document.getAnonymousElementByAttribute(this, "class", "storyTitle")) {
69
+                        style.color = "#333333";
92 70
                     }
93 71
                 ]]>
94 72
                 </body>
@@ -96,8 +74,6 @@
96 74
             <method name="showDescription">
97 75
                 <body>
98 76
                 <![CDATA[
99
-                    document.getAnonymousElementByAttribute(this, "class", "storyCEIcon").src =
100
-                        "chrome://diggsidebar/content/image/down.jpg";
101 77
                     document.getAnonymousElementByAttribute(this, "class", "storyDetails").style.display = 'block';
102 78
                     this.read = true;
103 79
                     this.collapsed = false;
@@ -107,8 +83,6 @@
107 83
             <method name="hideDescription">
108 84
                 <body>
109 85
                 <![CDATA[
110
-                    document.getAnonymousElementByAttribute(this, "class", "storyCEIcon").src =
111
-                        "chrome://diggsidebar/content/image/up.jpg";
112 86
                     document.getAnonymousElementByAttribute(this, "class", "storyDetails").style.display = 'none';
113 87
                     this.collapsed = true;
114 88
                 ]]>

BIN
chrome/content/image/down.jpg View File


BIN
chrome/content/image/up.jpg View File


+ 18
- 25
chrome/skin/diggsidebar.css View File

@@ -6,20 +6,16 @@ a {
6 6
 a img {
7 7
     border: none;
8 8
 }
9
-#dsStoryListBox {
10
-    margin: 1px;
11
-    border-style: solid !important;
12
-    border-color: #000;
13
-    border-width: 1px;
9
+.storyHeader {
10
+    cursor: pointer;
11
+    padding: 1px;
14 12
 }
15 13
 .storyDetails {
16 14
     padding: 3px;
17 15
     display: none;
18 16
     background-color: #ffffff;
19 17
     clear: both;
20
-    border: 1px dashed black;
21
-    margin: 0px 8px 8px 8px;
22
-    width: 230px;
18
+    margin: 0px 5px 5px 5px;
23 19
 }
24 20
 .storyDetails > div {
25 21
     clear: both;
@@ -27,18 +23,17 @@ a img {
27 23
     font-size: x-small;
28 24
 }
29 25
 .storyTitle {
30
-    padding: 0px 5px;
31 26
     font-size: x-small;
32 27
     font-weight: bold;
33 28
     width: 100%;
29
+    color: #105CB6;
34 30
 }
35
-.storyNew, .storyRead, .storyPopularity {
36
-    float: right;
31
+.storyCategory {
32
+    background-color: rgb(252,243,164);
33
+    text-align: center;
37 34
 }
38
-.storyNew, .storyRead {
39
-    padding: 0px 2px;
40
-    font-size: xx-small;
41
-    font-family: monospace;
35
+.storyPopularity {
36
+    float: right;
42 37
 }
43 38
 .storyHref {
44 39
     font-weight: bold;
@@ -48,27 +43,25 @@ a img {
48 43
 .storyDesc {
49 44
     height: auto!important;
50 45
 }
51
-.storyHeader {
52
-    cursor: pointer;
53
-    padding: 2px;
54
-    width: 250px;
55
-}
56 46
 .storyHref:hover, .storyUserLink:hover {
57 47
     color: white;
58 48
     background-color: blue;
59 49
 }
60 50
 
61 51
 #dsStoryListBox richlistitem{
62
-    border-bottom: 1px solid black;
52
+    border: 2px solid #E5ECF3;
53
+    border-top: none;
63 54
     color: #000000!important;
64 55
     -moz-binding: url("chrome://diggsidebar/content/diggstory.xml#diggstoryitem");
65 56
 }
66 57
 
67 58
 richlistitem[selected="true"] {
68
-    background-color: #FFEBF0;
59
+    background-color: #E5ECF3;
69 60
     color: inherit;
70 61
 }
71
-richlistitem .storyTitle:hover {
72
-    background-color: green;
73
-    color: white;
62
+.storyHeader:hover {
63
+    background-color: rgb(252,243,164);
64
+}
65
+.storyHeader:hover .storyTitle{
66
+    color: #000;
74 67
 }

Loading…
Cancel
Save