Index: trunk/extensions/Storyboard/tags/Storyboard/storyboard.js |
— | — | @@ -100,9 +100,9 @@ |
101 | 101 | |
102 | 102 | var textAndImg = $( "<div />" ).addClass( "story-text" ).text( story["*"] ); |
103 | 103 | |
104 | | - if ( story.imageurl ) { |
| 104 | + if ( story.imageurl && story.imagehidden == "0" ) { |
105 | 105 | textAndImg.prepend( |
106 | | - $( "<img />" ).attr( "src", story.imageurl ).addClass( "story-image" ) |
| 106 | + $( "<img />" ).attr( {"src": story.imageurl, "title": story.title, "alt": story.title } ).addClass( "story-image" ) |
107 | 107 | ); |
108 | 108 | } |
109 | 109 | |
Index: trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php |
— | — | @@ -8,9 +8,7 @@ |
9 | 9 | * |
10 | 10 | * @author Jeroen De Dauw |
11 | 11 | * |
12 | | - * TODO: implement eternal load (or paging) stuff for each list |
13 | 12 | * TODO: fix layout |
14 | | - * TODO: ajax load tab contents? |
15 | 13 | */ |
16 | 14 | |
17 | 15 | if ( !defined( 'MEDIAWIKI' ) ) { |
Index: trunk/extensions/Storyboard/storyboard.js |
— | — | @@ -181,8 +181,17 @@ |
182 | 182 | var textAndImg = jQuery( "<div />" ).addClass( "story-text" ).text( story["*"] ); |
183 | 183 | |
184 | 184 | if ( story.imageurl ) { |
| 185 | + var imgAttr = { |
| 186 | + "src": story.imageurl, |
| 187 | + "id": "story_image_" + story.id, |
| 188 | + "title": story.title, |
| 189 | + "alt": story.title |
| 190 | + }; |
| 191 | + if ( story.imagehidden == "1" ) { |
| 192 | + imgAttr.style = "display:none;"; |
| 193 | + } |
185 | 194 | textAndImg.prepend( |
186 | | - jQuery( "<img />" ).attr( "src", story.imageurl ).addClass( "story-image" ) |
| 195 | + jQuery( "<img />" ).attr( imgAttr ).addClass( "story-image" ) |
187 | 196 | ); |
188 | 197 | } |
189 | 198 | |
— | — | @@ -203,6 +212,7 @@ |
204 | 213 | ); |
205 | 214 | |
206 | 215 | // TODO: add review controls |
| 216 | + |
207 | 217 | $storyBody.append( |
208 | 218 | jQuery( "<div />" ).append( jQuery( "<button />" ).text( "edit" ).attr( "onclick", "window.location='" + story.modifyurl + "'" ) ) |
209 | 219 | ); |
Index: trunk/extensions/Storyboard/api/ApiQueryStories.php |
— | — | @@ -55,6 +55,7 @@ |
56 | 56 | 'story_author_id', |
57 | 57 | 'story_author_name', |
58 | 58 | 'story_author_image', |
| 59 | + 'story_image_hidden', |
59 | 60 | 'story_author_location', |
60 | 61 | 'story_title', |
61 | 62 | 'story_text', |
— | — | @@ -132,6 +133,7 @@ |
133 | 134 | 'modificationdate' => $wgLang->date( $story->story_modified ), |
134 | 135 | 'location' => $story->story_author_location, |
135 | 136 | 'imageurl' => $story->story_author_image, |
| 137 | + 'imagehidden' => $story->story_image_hidden, |
136 | 138 | 'permalink' => SpecialPage::getTitleFor( 'story', $story->story_title )->getFullURL() |
137 | 139 | ); |
138 | 140 | |