Index: trunk/extensions/Storyboard/Storyboard.i18n.php |
— | — | @@ -67,6 +67,9 @@ |
68 | 68 | 'storyboard-done' => 'Done', |
69 | 69 | 'storyboard-working' => 'Working...', |
70 | 70 | 'storyboard-imagedeleted' => 'Image deleted', |
| 71 | + 'storyboard-showimage' => 'Show image', |
| 72 | + 'storyboard-hideimage' => 'Hide image', |
| 73 | + 'storyboard-imagedeletionconfirm' => 'Are you sure you want to permanently delete this stories image?', |
71 | 74 | |
72 | 75 | // Story review |
73 | 76 | 'storyreview' => 'Story review', |
Index: trunk/extensions/Storyboard/tags/Storyboard/storyboard.js |
— | — | @@ -108,9 +108,17 @@ |
109 | 109 | |
110 | 110 | $storyBody.append( textAndImg ); |
111 | 111 | |
| 112 | + var metaDataText; |
| 113 | + if ( story.location != '' ) { |
| 114 | + metaDataText = stbMsgExt( 'storyboard-storymetadatafrom', [story.author, story.location, story.creationtime, story.creationdate] ); |
| 115 | + } |
| 116 | + else { |
| 117 | + metaDataText = stbMsgExt( 'storyboard-storymetadata', [story.author, story.creationtime, story.creationdate] ); |
| 118 | + } |
| 119 | + |
112 | 120 | $storyBody.append( // TODO: get the actual message here |
113 | 121 | $( "<div />" ).addClass( "story-metadata" ).append( |
114 | | - $("<span />").addClass( "story-metadata" ).text( " Submitted by $1 from $2 on $3, $4.") |
| 122 | + $("<span />").addClass( "story-metadata" ).text( metaDataText ) |
115 | 123 | ) |
116 | 124 | ); |
117 | 125 | |
Index: trunk/extensions/Storyboard/tags/Storyboard/Storyboard_body.php |
— | — | @@ -34,12 +34,42 @@ |
35 | 35 | |
36 | 36 | // TODO: Combine+minfiy JS files, add switch to use combined+minified version |
37 | 37 | $parser->getOutput()->addHeadItem( |
38 | | - <<<EOT |
39 | | - <link rel="stylesheet" href="$egStoryboardScriptPath/storyboard.css?$wgStyleVersion" /> |
40 | | - <script type="$wgJsMimeType" src="$wgStylePath/common/jquery.min.js?$wgStyleVersion"></script> |
41 | | - <script type="$wgJsMimeType" src="$egStoryboardScriptPath/jquery/jquery.ajaxscroll.js?$wgStyleVersion"></script> |
42 | | - <script type="$wgJsMimeType" src="$egStoryboardScriptPath/tags/Storyboard/storyboard.js?$wgStyleVersion"></script> |
43 | | -EOT |
| 38 | + Html::element( |
| 39 | + 'link', |
| 40 | + array( |
| 41 | + 'rel' => 'stylesheet', |
| 42 | + 'type' => 'text/css', |
| 43 | + 'href' => "$egStoryboardScriptPath/storyboard.css?$wgStyleVersion" |
| 44 | + ) |
| 45 | + ) . |
| 46 | + Html::element( |
| 47 | + 'script', |
| 48 | + array( |
| 49 | + 'type' => $wgJsMimeType, |
| 50 | + 'src' => "$wgStylePath/common/jquery.min.js?$wgStyleVersion" |
| 51 | + ) |
| 52 | + ) . |
| 53 | + Html::element( |
| 54 | + 'script', |
| 55 | + array( |
| 56 | + 'type' => $wgJsMimeType, |
| 57 | + 'src' => "$egStoryboardScriptPath/jquery/jquery.ajaxscroll.js?$wgStyleVersion" |
| 58 | + ) |
| 59 | + ) . |
| 60 | + Html::element( |
| 61 | + 'script', |
| 62 | + array( |
| 63 | + 'type' => $wgJsMimeType, |
| 64 | + 'src' => "$egStoryboardScriptPath/tags/Storyboard/storyboard.js?$wgStyleVersion" |
| 65 | + ) |
| 66 | + ) . |
| 67 | + Html::element( |
| 68 | + 'script', |
| 69 | + array( |
| 70 | + 'type' => $wgJsMimeType, |
| 71 | + 'src' => "$egStoryboardScriptPath/storyboard.js?$wgStyleVersion" |
| 72 | + ) |
| 73 | + ) |
44 | 74 | ); |
45 | 75 | |
46 | 76 | $width = StoryboardUtils::getDimension( $args, 'width', $egStoryboardWidth ); |
Index: trunk/extensions/Storyboard/tags/Storysubmission/Storysubmission_body.php |
— | — | @@ -59,12 +59,36 @@ |
60 | 60 | |
61 | 61 | // Loading a seperate JS file would be overkill for just these 3 lines, and be bad for performance. |
62 | 62 | $parser->getOutput()->addHeadItem( |
63 | | - <<<EOT |
64 | | - <link rel="stylesheet" href="$egStoryboardScriptPath/storyboard.css?$wgStyleVersion" /> |
65 | | - <script type="$wgJsMimeType" src="$egStoryboardScriptPath/storyboard.js?$wgStyleVersion"></script> |
66 | | - <script type="$wgJsMimeType" src="$wgStylePath/common/jquery.min.js?$wgStyleVersion"></script> |
67 | | - <script type="$wgJsMimeType" src="$egStoryboardScriptPath/jquery/jquery.validate.js?$wgStyleVersion"></script> |
68 | | -<script type="$wgJsMimeType"> /*<![CDATA[*/ |
| 63 | + Html::element( |
| 64 | + 'link', |
| 65 | + array( |
| 66 | + 'rel' => 'stylesheet', |
| 67 | + 'type' => 'text/css', |
| 68 | + 'href' => "$egStoryboardScriptPath/storyboard.css?$wgStyleVersion" |
| 69 | + ) |
| 70 | + ) . |
| 71 | + Html::element( |
| 72 | + 'script', |
| 73 | + array( |
| 74 | + 'type' => $wgJsMimeType, |
| 75 | + 'src' => "$egStoryboardScriptPath/storyboard.js?$wgStyleVersion" |
| 76 | + ) |
| 77 | + ) . |
| 78 | + Html::element( |
| 79 | + 'script', |
| 80 | + array( |
| 81 | + 'type' => $wgJsMimeType, |
| 82 | + 'src' => "$wgStylePath/common/jquery.min.js?$wgStyleVersion" |
| 83 | + ) |
| 84 | + ) . |
| 85 | + Html::element( |
| 86 | + 'script', |
| 87 | + array( |
| 88 | + 'type' => $wgJsMimeType, |
| 89 | + 'src' => "$egStoryboardScriptPath/jquery/jquery.validate.js?$wgStyleVersion" |
| 90 | + ) |
| 91 | + ) . |
| 92 | + Html::inlineScript( <<<EOT |
69 | 93 | addOnloadHook( function() { |
70 | 94 | document.getElementById( 'storysubmission-button' ).disabled = true; |
71 | 95 | stbValidateStory( document.getElementById('storytext'), $minLen, $maxLen, 'storysubmission-charlimitinfo', 'storysubmission-button' ) |
— | — | @@ -77,9 +101,9 @@ |
78 | 102 | } |
79 | 103 | } |
80 | 104 | }); |
81 | | -}); |
82 | | -/*]]>*/ </script> |
| 105 | +}); |
83 | 106 | EOT |
| 107 | + ) |
84 | 108 | ); |
85 | 109 | |
86 | 110 | $fieldSize = 50; |
Index: trunk/extensions/Storyboard/storyboard.js |
— | — | @@ -192,7 +192,7 @@ |
193 | 193 | 'format': 'json', |
194 | 194 | 'storyid': storyid, |
195 | 195 | 'storyaction': action |
196 | | - }, |
| 196 | + }, |
197 | 197 | function( data ) { |
198 | 198 | if ( data.storyreview ) { |
199 | 199 | switch( data.storyreview.action ) { |
— | — | @@ -215,7 +215,7 @@ |
216 | 216 | break; |
217 | 217 | } |
218 | 218 | } else { |
219 | | - alert( 'An error occured:\n' + data.error.info ); // TODO: i18n |
| 219 | + alert( stbMsgExt( 'storyboard-anerroroccured', [data.error.info] ) ); |
220 | 220 | } |
221 | 221 | } |
222 | 222 | ); |
— | — | @@ -233,7 +233,7 @@ |
234 | 234 | function stbToggeShowImage( sender, storyId, completedAction ) { |
235 | 235 | if ( completedAction == 'hideimage' ) { |
236 | 236 | jQuery( '#story_image_' + storyId ).slideUp( 'slow', function () { |
237 | | - sender.innerHTML = 'Show image'; // TODO: i18n |
| 237 | + sender.innerHTML = stbMsg( 'storyboard-showimage' ); |
238 | 238 | sender.onclick = function() { |
239 | 239 | stbDoStoryAction( sender, storyId, 'unhideimage' ); |
240 | 240 | }; |
— | — | @@ -241,7 +241,7 @@ |
242 | 242 | } ); |
243 | 243 | } else { |
244 | 244 | jQuery( '#story_image_' + storyId ).slideDown( 'slow', function () { |
245 | | - sender.innerHTML = 'Hide image'; // TODO: i18n |
| 245 | + sender.innerHTML = stbMsg( 'storyboard-hideimage' ); |
246 | 246 | sender.onclick = function() { |
247 | 247 | stbDoStoryAction( sender, storyId, 'hideimage' ); |
248 | 248 | }; |
— | — | @@ -259,7 +259,7 @@ |
260 | 260 | * @return Boolean indicating whether the deletion was confirmed. |
261 | 261 | */ |
262 | 262 | function stbDeleteStoryImage( sender, storyid ) { |
263 | | - var confirmed = confirm( 'Are you sure you want to permanently delete this stories image?' ); // TODO: i18n |
| 263 | + var confirmed = confirm( stbMsg( 'storyboard-imagedeletionconfirm' ) ); |
264 | 264 | if ( confirmed ) { |
265 | 265 | stbDoStoryAction( sender, storyid, 'deleteimage' ); |
266 | 266 | } |
Index: trunk/extensions/Storyboard/Storyboard.php |
— | — | @@ -146,6 +146,9 @@ |
147 | 147 | 'storyboard-done', |
148 | 148 | 'storyboard-working', |
149 | 149 | 'storyboard-imagedeleted', |
| 150 | + 'storyboard-showimage', |
| 151 | + 'storyboard-hideimage', |
| 152 | + 'storyboard-imagedeletionconfirm', |
150 | 153 | ); |
151 | 154 | |
152 | 155 | $data = array(); |