r65895 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65894‎ | r65895 | r65896 >
Date:05:52, 4 May 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Further implemented ajaxscroll for storyreview. Will add review controls soon.
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)

Diff [purge]

Index: trunk/extensions/Storyboard/storyboard.css
@@ -72,6 +72,29 @@
7373 }
7474
7575 /**
 76+ * Css for storyreview
 77+ */
 78+
 79+.storyreviewboard {
 80+ border: 1px solid #ddd;
 81+}
 82+.storyreviewboard .storyboard-batch {
 83+ margin: 0;
 84+ padding: 0;
 85+}
 86+.storyreviewboard .storyboard-box {
 87+ display: inline-block;
 88+ border: 1px solid #eee;
 89+ width: 99%;
 90+ min-height: 100px;
 91+ margin: 5px;
 92+}
 93+.storyreviewboard .storyboard-empty .storyboard-box {
 94+ border: 1px solid #ddd;
 95+ background: #FCFCFC url(images/storyboard-loader.gif) no-repeat scroll center center;
 96+}
 97+
 98+/**
7699 * Css for <storyboard> tags
77100 */
78101 .storyboard {
Index: trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php
@@ -63,8 +63,8 @@
6464 <div id="storyreview-tabs">
6565 <ul>
6666 <li><a href="#$unpublished" id="$unpublished-tab">$unpublished</a></li>
67 - <li><a href="#$published" id="$published-tab">$published</a></li>
68 - <li><a href="#$hidden" id="$hidden-tab">$hidden</a></li>
 67+ <!--<li><a href="#$published" id="$published-tab">$published</a></li>
 68+ <li><a href="#$hidden" id="$hidden-tab">$hidden</a></li>-->
6969 </ul>
7070 <div id="$unpublished"></div>
7171 <div id="$published"></div>
@@ -184,6 +184,8 @@
185185
186186 private function getStateActionButton( $storyId, $action, $messageKey ) {
187187 $message = htmlspecialchars( wfMsg( $messageKey ) );
 188+ $storyId = Xml::escapeJsString( $storyId );
 189+ $action = Xml::escapeJsString( $action );
188190 return <<<EOT
189191 <button type="button" onclick="stbDoStoryAction( this, $storyId, '$action' )">$message</button>
190192 EOT;
Index: trunk/extensions/Storyboard/storyboard.js
@@ -115,13 +115,34 @@
116116 function stbAddStories( $storyboard, query ) {
117117 // Remove the empty boxes.
118118 $storyboard.html( '' );
119 -
 119+
120120 // TODO: create the review blocks html with jQuery
121121 for ( var i in query.stories ) {
122122 var story = query.stories[i];
123123 var $storyBody = jQuery( "<div />" ).addClass( "storyboard-box" );
124124
125 - $storyboard.append( $storyBody );
 125+ var $header = jQuery( "<div />" ).addClass( "story-header" ).appendTo( $storyBody );
 126+ jQuery( "<div />" ).addClass( "story-title" ).text( story.title ).appendTo( $header );
 127+
 128+ var textAndImg = jQuery( "<div />" ).addClass( "story-text" ).text( story["*"] );
 129+
 130+ if ( story.imageurl ) {
 131+ textAndImg.prepend(
 132+ jQuery( "<img />" ).attr( "src", story.imageurl ).addClass( "story-image" )
 133+ );
 134+ }
 135+
 136+ $storyBody.append( textAndImg );
 137+
 138+ $storyBody.append( // TODO: get the actual message here
 139+ jQuery( "<div />" ).addClass( "story-metadata" ).append(
 140+ jQuery("<span />").addClass( "story-metadata" ).text( " Submitted by $1 from $2 on $3, $4.")
 141+ )
 142+ );
 143+
 144+ // TODO: add review controls
 145+
 146+ $storyboard.append( $storyBody );
126147 }
127148 }
128149

Status & tagging log