r66160 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66159‎ | r66160 | r66161 >
Date:21:02, 10 May 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Fixed story review button layout
Modified paths:
  • /trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php (modified) (history)
  • /trunk/extensions/Storyboard/storyboard.css (modified) (history)
  • /trunk/extensions/Storyboard/storyboard.js (modified) (history)
  • /trunk/extensions/Storyboard/tags/Storyboard/storyboard.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Storyboard/storyboard.css
@@ -94,6 +94,11 @@
9595 background: #FCFCFC url(images/storyboard-loader.gif) no-repeat scroll center center;
9696 }
9797
 98+.story-controls {
 99+ text-align: center;
 100+ margin: 0px 5px 5px 5px;
 101+}
 102+
98103 /**
99104 * Css for <storyboard> tags
100105 */
Index: trunk/extensions/Storyboard/tags/Storyboard/storyboard.js
@@ -114,7 +114,7 @@
115115 }
116116 else {
117117 metaDataText = stbMsgExt( 'storyboard-storymetadata', [story.author, story.creationtime, story.creationdate] );
118 - }
 118+ }
119119
120120 $storyBody.append(
121121 $( "<div />" ).addClass( "story-metadata" ).append(
Index: trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php
@@ -57,8 +57,8 @@
5858
5959 $language = $wgRequest->getText( 'language', false );
6060 if ( !$language ) $language = $wgContLanguageCode;
61 -
62 - $html = <<<EOT
 61+
 62+ $wgOut->addHTML( <<<EOT
6363 <div id="storyreview-tabs">
6464 <ul>
6565 <li><a href="#$unpublished" id="$unpublished-tab">$unpublished</a></li>
@@ -81,8 +81,7 @@
8282 stbShowReviewBoard( jQuery( ui.panel ), ui.index );
8383 });
8484 </script>
85 -EOT;
86 -
87 - $wgOut->addHTML( $html );
 85+EOT
 86+ );
8887 }
8988 }
\ No newline at end of file
Index: trunk/extensions/Storyboard/storyboard.js
@@ -211,7 +211,7 @@
212212 )
213213 );
214214
215 - var controlDiv = jQuery( "<div />" );
 215+ var controlDiv = jQuery( "<div />" ).addClass( "story-controls" );
216216
217217 if ( story.state != 0 ) {
218218 controlDiv.append(
@@ -221,6 +221,9 @@
222222 }
223223
224224 if ( story.state != 1 ) {
 225+ if ( story.state != 0 ) {
 226+ controlDiv.append( '&nbsp;&nbsp;&nbsp;' );
 227+ }
225228 controlDiv.append(
226229 jQuery( "<button />" ).text( stbMsg( "storyboard-publish" ) )
227230 .attr( "onclick", "stbDoStoryAction( this, " + story.id + ", 'publish' )" )
@@ -228,21 +231,27 @@
229232 }
230233
231234 if ( story.state != 2 ) {
 235+ controlDiv.append( '&nbsp;&nbsp;&nbsp;' );
232236 controlDiv.append(
233237 jQuery( "<button />" ).text( stbMsg( "storyboard-hide" ) )
234238 .attr( "onclick", "stbDoStoryAction( this, " + story.id + ", 'hide' )" )
235239 );
236240 }
237241
 242+ controlDiv.append( '&nbsp;&nbsp;&nbsp;' );
238243 controlDiv.append( jQuery( "<button />" ).text( stbMsg( "edit" ) )
239244 .attr( "onclick", "window.location='" + story.modifyurl + "'" ) );
240245
241246 if ( story.imageurl ) {
 247+ controlDiv.append( '&nbsp;&nbsp;&nbsp;' );
 248+
242249 controlDiv.append(
243250 jQuery( "<button />" ).text( stbMsg( "storyboard-deleteimage" ) )
244251 .attr( "onclick", "stbDeleteStoryImage( this, " + story.id + " )" )
245252 );
246253
 254+ controlDiv.append( '&nbsp;&nbsp;&nbsp;' );
 255+
247256 if ( story.imagehidden == "1" ) {
248257 controlDiv.append(
249258 jQuery( "<button />" ).text( stbMsg( "storyboard-showimage" ) )

Status & tagging log