Browse Source

Merge pull request #773 from Arantor/release-2.1

Some minor tweaks that form the basis of bigger ones.
Arantor 11 years ago
parent
commit
5690412e45

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

@@ -691,7 +691,7 @@ function template_main()
 			<div class="tborder" id="quickreplybox">
 				<div class="cat_bar">
 					<h3 class="catbg">
-						<a href="javascript:oQuickReply.swap();"><img src="', $settings['images_url'], '/', $options['display_quick_reply'] > 1 ? 'collapse' : 'expand', '.png" alt="+" id="quickReplyExpand" class="icon" /></a>
+						<a href="javascript:oQuickReply.swap();" class="', $options['display_quick_reply'] > 1 ? 'toggle_up' : 'toggle_down', '" id="quickReplyExpand"></a>
 						<a href="javascript:oQuickReply.swap();">', $txt['quick_reply'], '</a>
 					</h3>
 				</div>
@@ -834,8 +834,8 @@ function template_main()
 						sImagesUrl: smf_images_url,
 						sContainerId: "quickReplyOptions",
 						sImageId: "quickReplyExpand",
-						sImageCollapsed: "collapse.png",
-						sImageExpanded: "expand.png",
+						sClassCollapsed: "toggle_up",
+						sClassExpanded: "toggle_down",
 						sJumpAnchor: "quickreply",
 						bIsFull: ', !empty($options['use_editor_quick_reply']) ? 'true' : 'false', '
 					});';

+ 1 - 2
Themes/default/MessageIndex.template.php

@@ -285,8 +285,7 @@ function template_main()
 					</td>
 					<td class="', $alternate_class, ' lastpost">
 						<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.png" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" /></a>
-						', $topic['last_post']['time'], '<br />
-						', $txt['by'], ' ', $topic['last_post']['member']['link'], '
+						', sprintf($txt['last_post_topic'], $topic['last_post']['time'], $topic['last_post']['member']['link']), '
 					</td>';
 
 			// Show the quick moderation options?

+ 17 - 1
Themes/default/css/index.css

@@ -431,6 +431,18 @@ a img {
 	border: 0;
 }
 
+/* Those collapse and expand icons are wonderful.  */
+.toggle_up, .toggle_down, .go_up, .go_down {
+	width: 17px;
+	height: 17px;
+	display: inline-block;
+	background: url(../images/toggle.png) no-repeat 0 0px;
+	text-indent: -100em;
+	overflow: hidden;
+}
+.toggle_down, .go_down {
+	background-position: 0 -17px;
+}
 /* Generally, those [?] icons.  This makes your cursor a help icon. */
 .help {
 	cursor: help;
@@ -885,11 +897,15 @@ div.title_barIC h4.titlebg {
 	margin: 0;
 	padding: 6px;
 }
-img#upshrink_ic, img#newsupshrink, img.panel_toggle, img#quickReplyExpand {
+img#upshrink_ic, img#newsupshrink, img.panel_toggle {
 	float: right;
 	margin: 0;
 	padding: 4px 4px 0 4px;
 }
+#quickReplyExpand {
+	float: right;
+	margin: 2px 2px 0 2px;
+}
 table.table_list a.unreadlink, table.table_list a.collapse {
 	float: right;
 }

BIN
Themes/default/images/toggle.png


+ 1 - 1
Themes/default/index.template.php

@@ -362,7 +362,7 @@ function template_body_below()
 
 	// There is now a global "Go to top" link at the right.
 		echo '
-			<a href="#top" id="bot"><img src="', $settings['images_url'], '/upshrink.png" alt="*" title="', $txt['go_up'], '" /></a>
+			<a href="#top" id="bot" class="go_up">', $txt['go_up'], '</a>
 			<ul class="reset">
 				<li class="copyright">', theme_copyright(), '</li>
 			</ul>';

+ 1 - 2
Themes/default/languages/index.english.php

@@ -115,6 +115,7 @@ $txt['first_post'] = 'First post';
 $txt['last_poster'] = 'Last post by';
 //$txt['last_post_message'] = '<strong>Last post</strong> by %1$s<br />in %2$s<br />on %3$s';
 $txt['last_post_message'] = '<strong>Last post: </strong>%3$s<br />%2$s by %1$s';
+$txt['last_post_topic'] = '%1$s<br />by %2$s';
 $txt['boardindex_total_posts'] = '%1$s Posts in %2$s Topics by %3$s Members';
 $txt['show'] = 'Show';
 $txt['hide'] = 'Hide';
@@ -706,8 +707,6 @@ $txt['help_popup'] = 'A little lost? Let me explain:';
 $txt['previous_next_back'] = 'previous topic';
 $txt['previous_next_forward'] = 'next topic';
 
-$txt['upshrink_description'] = 'Shrink or expand the header.';
-
 $txt['mark_unread'] = 'Mark unread';
 
 $txt['ssi_not_direct'] = 'Please don\'t access SSI.php by URL directly; you may want to use the path (%1$s) or add ?ssi_function=something.';

+ 1 - 1
Themes/default/scripts/topic.js

@@ -290,7 +290,7 @@ QuickReply.prototype.onQuoteReceived = function (oXMLDoc)
 // The function handling the swapping of the quick reply.
 QuickReply.prototype.swap = function ()
 {
-	document.getElementById(this.opt.sImageId).src = this.opt.sImagesUrl + "/" + (this.bCollapsed ? this.opt.sImageCollapsed : this.opt.sImageExpanded);
+	$('#' + this.opt.sImageId).toggleClass(this.opt.sClassCollapsed + ' ' + this.opt.sClassExpanded);
 	$('#' + this.opt.sContainerId).slideToggle();
 
 	this.bCollapsed = !this.bCollapsed;