Browse Source

! And some more icon spriting combination magic.

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer 10 years ago
parent
commit
d42f3b28a7

+ 3 - 3
Themes/default/SplitTopics.template.php

@@ -101,7 +101,7 @@ function template_select()
 					<li class="windowbg', $message['alternate'] ? '2' : '', '" id="not_selected_', $message['id'], '">
 						<div class="content">
 							<div class="message_header">
-								<a class="split_icon floatright" href="', $scripturl, '?action=splittopics;sa=selectTopics;subname=', $context['topic']['subject'], ';topic=', $context['topic']['id'], '.', $context['not_selected']['start'], ';start2=', $context['selected']['start'], ';move=down;msg=', $message['id'], '" onclick="return select(\'down\', ', $message['id'], ');"><img src="', $settings['images_url'], '/split_select.png" alt="-&gt;"></a>
+								<a class="split_icon floatright" href="', $scripturl, '?action=splittopics;sa=selectTopics;subname=', $context['topic']['subject'], ';topic=', $context['topic']['id'], '.', $context['not_selected']['start'], ';start2=', $context['selected']['start'], ';move=down;msg=', $message['id'], '" onclick="return select(\'down\', ', $message['id'], ');"><span class="generic_icons split_sel" title="-&gt;"></span></a>
 								', sprintf($txt['post_by_member'], $message['subject'], $message['poster']), '<br>
 								<em>', $message['time'], '</em>
 							</div>
@@ -133,7 +133,7 @@ function template_select()
 					<li class="windowbg', $message['alternate'] ? '2' : '', '" id="selected_', $message['id'], '">
 						<div class="content">
 							<div class="message_header">
-								<a class="split_icon floatleft" href="', $scripturl, '?action=splittopics;sa=selectTopics;subname=', $context['topic']['subject'], ';topic=', $context['topic']['id'], '.', $context['not_selected']['start'], ';start2=', $context['selected']['start'], ';move=up;msg=', $message['id'], '" onclick="return select(\'up\', ', $message['id'], ');"><img src="', $settings['images_url'], '/split_deselect.png" alt="&lt;-"></a>
+								<a class="split_icon floatleft" href="', $scripturl, '?action=splittopics;sa=selectTopics;subname=', $context['topic']['subject'], ';topic=', $context['topic']['id'], '.', $context['not_selected']['start'], ';start2=', $context['selected']['start'], ';move=up;msg=', $message['id'], '" onclick="return select(\'up\', ', $message['id'], ');"><span class="generic_icons split_desel" title="&lt;-"></span></a>
 								', sprintf($txt['post_by_member'], $message['subject'], $message['poster']), '<br>
 								<em>', $message['time'], '</em>
 							</div>
@@ -211,7 +211,7 @@ function template_select()
 					newItem = document.createElement("LI");
 					newItem.className = "windowbg2";
 					newItem.id = curSection + "_" + curId;
-					newItem.innerHTML = "<div class=\\"content\\"><div class=\\"message_header\\"><a class=\\"split_icon float" + (curSection == "selected" ? "left" : "right") + "\\" href=\\"" + smf_prepareScriptUrl(smf_scripturl) + "action=splittopics;sa=selectTopics;subname=', $context['topic']['subject'], ';topic=', $context['topic']['id'], '.', $context['not_selected']['start'], ';start2=', $context['selected']['start'], ';move=" + (curSection == "selected" ? "up" : "down") + ";msg=" + curId + "\\" onclick=\\"return select(\'" + (curSection == "selected" ? "up" : "down") + "\', " + curId + ");\\"><img src=\\"', $settings['images_url'], '/split_" + (curSection == "selected" ? "de" : "") + "select.png\\" alt=\\"" + (curSection == "selected" ? "&lt;-" : "-&gt;") + "\\"></a><strong>" + curChange.getElementsByTagName("subject")[0].firstChild.nodeValue + "</strong> ', $txt['by'], ' <strong>" + curChange.getElementsByTagName("poster")[0].firstChild.nodeValue + "</strong><br><em>" + curChange.getElementsByTagName("time")[0].firstChild.nodeValue + "</em></div><div class=\\"post\\">" + curChange.getElementsByTagName("body")[0].firstChild.nodeValue + "</div></div>";
+					newItem.innerHTML = "<div class=\\"content\\"><div class=\\"message_header\\"><a class=\\"split_icon float" + (curSection == "selected" ? "left" : "right") + "\\" href=\\"" + smf_prepareScriptUrl(smf_scripturl) + "action=splittopics;sa=selectTopics;subname=', $context['topic']['subject'], ';topic=', $context['topic']['id'], '.', $context['not_selected']['start'], ';start2=', $context['selected']['start'], ';move=" + (curSection == "selected" ? "up" : "down") + ";msg=" + curId + "\\" onclick=\\"return select(\'" + (curSection == "selected" ? "up" : "down") + "\', " + curId + ");\\"><span class=\\"generic_icons split_" + (curSection == "selected" ? "de" : "") + "sel\\" title=\\"" + (curSection == "selected" ? "&lt;-" : "-&gt;") + "\\"></span></a><strong>" + curChange.getElementsByTagName("subject")[0].firstChild.nodeValue + "</strong> ', $txt['by'], ' <strong>" + curChange.getElementsByTagName("poster")[0].firstChild.nodeValue + "</strong><br><em>" + curChange.getElementsByTagName("time")[0].firstChild.nodeValue + "</em></div><div class=\\"post\\">" + curChange.getElementsByTagName("body")[0].firstChild.nodeValue + "</div></div>";
 
 					// So, where do we insert it?
 					if (typeof sInsertBeforeId == "string")

+ 19 - 6
Themes/default/css/index.css

@@ -1735,22 +1735,22 @@ ul li.greeting {
 	width: 16px;
 	height: 16px;
 	display: inline-block;
-	background: url(../images/pm_icons.png) no-repeat 0 0;
+	background: url(../images/generic_icons.png) no-repeat 0 -64px;
 }
 .pm_icons.inbox {
-	background-position: 0 0;
+	background-position: 0 -64px;
 }
 .pm_icons.switch {
-	background-position: -16px 0;
+	background-position: -16px -64px;
 }
 .pm_icons.replied {
-	background-position: -32px 0;
+	background-position: -32px -64px;
 }
 .pm_icons.im_on {
-	background-position: -48px 0;
+	background-position: -48px -64px;
 }
 .pm_icons.im_off {
-	background-position: -64px 0;
+	background-position: -64px -64px;
 }
 
 /* Styles for the board index and child boards tables.
@@ -3087,6 +3087,19 @@ tr.windowbg td, tr.windowbg2 td, tr.highlight2 td {
 .generic_icons.move {
 	background-position: -112px -32px;
 }
+/* Most of the bottom row is already declared via .pm_icons */
+
+.generic_icons.del_small {
+	background-position: -80px -64px;
+	width: 9px;
+	height: 9px;
+}
+.generic_icons.split_desel {
+	background-position: -96px -64px;
+}
+.generic_icons.split_sel {
+	background-position: -112px -64px;
+}
 
 /* Styles for (fatal) errors.
 ------------------------------------------------- */

BIN
Themes/default/images/generic_icons.png


BIN
Themes/default/images/pm_icons.png


BIN
Themes/default/images/split_deselect.png


BIN
Themes/default/images/split_select.png