瀏覽代碼

! Combine three icons into a sprite for moving things around, and just for fun, let's make the board move icons actually more meaningful than they were before.

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer 11 年之前
父節點
當前提交
6f92316cd2

+ 2 - 0
Sources/ManageBoards.php

@@ -161,11 +161,13 @@ function ManageBoardsMain()
 						'child_level' => $boards[$boardid]['level'],
 						'label' => $txt['mboards_order_after'] . '\'' . $smcFunc['htmlspecialchars']($boards[$boardid]['name']) . '\'',
 						'href' => $scripturl . '?action=admin;area=manageboards;sa=move;src_board=' . $context['move_board'] . ';target_board=' . $boardid . ';move_to=after;' . $security,
+						'class' => $boards[$boardid]['level'] > 0 ? 'above' : 'below',
 					),
 					array(
 						'child_level' => $boards[$boardid]['level'] + 1,
 						'label' => $txt['mboards_order_child_of'] . ' \'' . $smcFunc['htmlspecialchars']($boards[$boardid]['name']) . '\'',
 						'href' => $scripturl . '?action=admin;area=manageboards;sa=move;src_board=' . $context['move_board'] . ';target_board=' . $boardid . ';move_to=child;' . $security,
+						'class' => 'here',
 					),
 				);
 

+ 2 - 2
Themes/default/ManageBoards.template.php

@@ -57,7 +57,7 @@ function template_main()
 
 		if (!empty($category['move_link']))
 			echo '
-						<li><a href="', $category['move_link']['href'], '" title="', $category['move_link']['label'], '"><img src="', $settings['images_url'], '/smiley_select_spot.png" alt="', $category['move_link']['label'], '" /></a></li>';
+						<li><a href="', $category['move_link']['href'], '" title="', $category['move_link']['label'], '"><span class="select_spot above"></span></a></li>';
 
 		$alternate = false;
 
@@ -85,7 +85,7 @@ function template_main()
 
 				foreach ($board['move_links'] as $link)
 					echo '
-							<a href="', $link['href'], '" class="move_links" title="', $link['label'], '"><img src="', $settings['images_url'], '/board_select_spot', $link['child_level'] > 0 ? '_child' : '', '.png" alt="', $link['label'], '" style="padding: 0px; margin: 0px;" /></a>';
+							<a href="', $link['href'], '" class="move_links" title="', $link['label'], '"><span class="select_spot ', $link['class'], '" title="', $link['label'], '" style="padding: 0px; margin: 0px;"></span></a>';
 
 				echo '
 						</li>';

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

@@ -406,14 +406,14 @@ function template_setorder()
 		{
 			if (!empty($context['move_smiley']))
 				echo '
-					<a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $row[0]['row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><img src="', $settings['images_url'], '/smiley_select_spot.png" alt="', $txt['smileys_move_here'], '" /></a>';
+					<a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $row[0]['row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><span class="select_spot below" title="', $txt['smileys_move_here'], '"></span></a>';
 
 			foreach ($row as $smiley)
 			{
 				if (empty($context['move_smiley']))
 					echo '<a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;move=', $smiley['id'], '"><img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px; border: 0px solid black;" alt="', $smiley['description'], '" /></a>';
 				else
-					echo '<img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px; border: ', $smiley['selected'] ? '2px solid red' : '0px solid black', ';" alt="', $smiley['description'], '" /><a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';after=', $smiley['id'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '" title="', $txt['smileys_move_here'], '"><img src="', $settings['images_url'], '/smiley_select_spot.png" alt="', $txt['smileys_move_here'], '" /></a>';
+					echo '<img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px; border: ', $smiley['selected'] ? '2px solid red' : '0px solid black', ';" alt="', $smiley['description'], '" /><a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';after=', $smiley['id'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '" title="', $txt['smileys_move_here'], '"><span class="select_spot below" title="', $txt['smileys_move_here'], '"></span></a>';
 			}
 
 			echo '
@@ -421,7 +421,7 @@ function template_setorder()
 		}
 		if (!empty($context['move_smiley']))
 			echo '
-					<a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $location['last_row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><img src="', $settings['images_url'], '/smiley_select_spot.png" alt="', $txt['smileys_move_here'], '" /></a>';
+					<a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $location['last_row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><span class="select_spot below" title="', $txt['smileys_move_here'], '"></span></a>';
 		echo '
 				</div>
 			</div>

+ 20 - 0
Themes/default/css/admin.css

@@ -697,6 +697,22 @@ pre.file_content {
 	background-color: #eee;
 }
 
+.select_spot {
+	width: 16px;
+	height: 16px;
+	display: inline-block;
+	background: url(../images/select_spot.png) no-repeat 0 0;
+}
+.select_spot.above {
+	background-position: 0 0;
+}
+.select_spot.here {
+	background-position: -16px 0;
+}
+.select_spot.below {
+	background-position: -32px 0;
+}
+
 /* Styles for the BBC permissions
 ------------------------------------------------- */
 .list_bbc {
@@ -768,6 +784,10 @@ pre.file_content {
 	vertical-align: middle;
 	padding: 0 6px 3px 6px;
 }
+#manage_boards li .select_spot {
+	vertical-align: middle;
+	margin: 0 6px 3px 6px;
+}
 #manage_boards li .floatleft {
 	font-weight: bold;
 	padding: 0 6px;

二進制
Themes/default/images/board_select_spot.png


二進制
Themes/default/images/board_select_spot_child.png


二進制
Themes/default/images/select_spot.png


二進制
Themes/default/images/smiley_select_spot.png