Index: branches/js2-work/phase3/js/mwEmbed/loader.js |
— | — | @@ -89,7 +89,7 @@ |
90 | 90 | |
91 | 91 | // Default request timeout ( for cases where we inlucde js and normal browser timeout can't be used ) |
92 | 92 | // stored in seconds |
93 | | - 'defaultRequestTimeout' : 30, |
| 93 | + 'defaultRequestTimeout' : 25, |
94 | 94 | |
95 | 95 | // Default user language is "en" Can be overwritten by: |
96 | 96 | // "uselang" url param |
Index: branches/js2-work/phase3/js/mwEmbed/languages/mwEmbed.i18n.php |
— | — | @@ -12,22 +12,67 @@ |
13 | 13 | |
14 | 14 | $messages['en'] = array( |
15 | 15 | /* |
16 | | - * js file: /skins/kskin/kskinConfig.js |
| 16 | + * js file: /modules/EmbedPlayer/mw.EmbedPlayer.js |
17 | 17 | */ |
18 | | - 'mwe-credit-title' => 'Title: $1', |
| 18 | + 'mwe-loading_plugin' => 'loading plugin ...', |
| 19 | + 'mwe-select_playback' => 'Set playback preference', |
| 20 | + 'mwe-link_back' => 'Link back', |
| 21 | + 'mwe-error_swap_vid' => 'Error: mwEmbed was unable to swap the video tag for the mwEmbed interface', |
| 22 | + 'mwe-add_to_end_of_sequence' => 'Add to end of sequence', |
| 23 | + 'mwe-missing_video_stream' => 'The video file for this stream is missing', |
| 24 | + 'mwe-play_clip' => 'Play clip', |
| 25 | + 'mwe-pause_clip' => 'Pause clip', |
| 26 | + 'mwe-volume_control' => 'Volume control', |
| 27 | + 'mwe-player_options' => 'Player options', |
| 28 | + 'mwe-timed_text' => 'Timed text', |
| 29 | + 'mwe-player_fullscreen' => 'Fullscreen', |
| 30 | + 'mwe-next_clip_msg' => 'Play next clip', |
| 31 | + 'mwe-prev_clip_msg' => 'Play previous clip', |
| 32 | + 'mwe-current_clip_msg' => 'Continue playing this clip', |
| 33 | + 'mwe-seek_to' => 'Seek $1', |
| 34 | + 'mwe-paused' => 'paused', |
| 35 | + 'mwe-download_segment' => 'Download selection:', |
| 36 | + 'mwe-download_full' => 'Download full video file:', |
| 37 | + 'mwe-download_right_click' => 'To download, right click and select <i>Save link as...</i>', |
| 38 | + 'mwe-download_clip' => 'Download video', |
| 39 | + 'mwe-download_text' => 'Download text (<a style="color:white" title="cmml" href="http://wiki.xiph.org/index.php/CMML">CMML</a> xml):', |
| 40 | + 'mwe-download' => 'Download', |
| 41 | + 'mwe-share' => 'Share', |
| 42 | + 'mwe-credits' => 'Credits', |
| 43 | + 'mwe-clip_linkback' => 'Clip source page', |
| 44 | + 'mwe-chose_player' => 'Choose video player', |
| 45 | + 'mwe-no-player' => 'No player available for $1', |
| 46 | + 'mwe-share_this_video' => 'Share this video', |
| 47 | + 'mwe-video_credits' => 'Video credits', |
| 48 | + 'mwe-kaltura-platform-title' => 'Kaltura open source video platform', |
| 49 | + 'mwe-menu_btn' => 'Menu', |
| 50 | + 'mwe-close_btn' => 'Close', |
| 51 | + 'mwe-ogg-player-vlc-player' => 'VLC player', |
| 52 | + 'mwe-ogg-player-oggNative' => 'HTML5 ogg player', |
| 53 | + 'mwe-ogg-player-h264Native' => 'HTML5 h.264 player', |
| 54 | + 'mwe-ogg-player-oggPlugin' => 'Generic Ogg plugin', |
| 55 | + 'mwe-ogg-player-quicktime-mozilla' => 'QuickTime plugin', |
| 56 | + 'mwe-ogg-player-quicktime-activex' => 'QuickTime ActiveX', |
| 57 | + 'mwe-ogg-player-cortado' => 'Java Cortado', |
| 58 | + 'mwe-ogg-player-flowplayer' => 'Flowplayer', |
| 59 | + 'mwe-ogg-player-kplayer' => 'Kaltura player', |
| 60 | + 'mwe-ogg-player-selected' => '(selected)', |
| 61 | + 'mwe-ogg-player-omtkplayer' => 'OMTK Flash Vorbis', |
| 62 | + 'mwe-generic_missing_plugin' => 'You browser does not appear to support the following playback type: <b>$1</b><br />Visit the <a href="http://commons.wikimedia.org/wiki/Commons:Media_help">Playback Methods</a> page to download a player.<br />', |
| 63 | + 'mwe-for_best_experience' => 'For a better video playback experience we recommend the <b><a href="http://www.mozilla.com/en-US/firefox/upgrade.html?from=mwEmbed">latest firefox</a>.</b>', |
| 64 | + 'mwe-do_not_warn_again' => 'Dismiss for now.', |
| 65 | + 'mwe-playerSelect' => 'Players', |
| 66 | + 'mwe-read_before_embed' => '<a href="http://mediawiki.org/wiki/Security_Notes_on_Remote_Embedding" target="_new">Read this</a> before embedding.', |
| 67 | + 'mwe-embed_site_or_blog' => 'Embed on a page', |
| 68 | + 'mwe-related_videos' => 'Related videos', |
| 69 | + 'mwe-seeking' => 'seeking', |
| 70 | + 'mwe-copy-code' => 'Copy code', |
| 71 | + 'mwe-video-h264' => 'H.264 video', |
| 72 | + 'mwe-video-flv' => 'Flash video', |
| 73 | + 'mwe-video-ogg' => 'Ogg video', |
| 74 | + 'mwe-video-audio' => 'Ogg audio', |
19 | 75 | |
20 | 76 | /* |
21 | | - * js file: /modules/Sequencer/mw.TimedEffectsEdit.js |
22 | | - */ |
23 | | - 'mwe-transition_in' => 'Transition in', |
24 | | - 'mwe-transition_out' => 'Transition out', |
25 | | - 'mwe-effects' => 'Effects stack', |
26 | | - 'mwe-remove_transition' => 'Remove transition', |
27 | | - 'mwe-edit_transin' => 'Edit transition into clip', |
28 | | - 'mwe-edit_transout' => 'Edit transition out of clip', |
29 | | - 'mwe-add-transition' => 'Add a transition', |
30 | | - |
31 | | - /* |
32 | 77 | * js file: /modules/Sequencer/mw.Sequencer.js |
33 | 78 | */ |
34 | 79 | 'mwe-menu_clipedit' => 'Edit media', |
— | — | @@ -66,12 +111,66 @@ |
67 | 112 | 'mwe-sequencer_credit_line' => 'Developed by <a href="http://kaltura.com">Kaltura, Inc.</a> in partnership with the <a href="http://wikimediafoundation.org/wiki/Home">Wikimedia Foundation</a> (<a href="#">more information</a>).', |
68 | 113 | |
69 | 114 | /* |
| 115 | + * js file: /modules/Sequencer/mw.TimedEffectsEdit.js |
| 116 | + */ |
| 117 | + 'mwe-transition_in' => 'Transition in', |
| 118 | + 'mwe-transition_out' => 'Transition out', |
| 119 | + 'mwe-effects' => 'Effects stack', |
| 120 | + 'mwe-remove_transition' => 'Remove transition', |
| 121 | + 'mwe-edit_transin' => 'Edit transition into clip', |
| 122 | + 'mwe-edit_transout' => 'Edit transition out of clip', |
| 123 | + 'mwe-add-transition' => 'Add a transition', |
| 124 | + |
| 125 | + /* |
70 | 126 | * js file: /modules/Sequencer/remotes/RemoteMwSequencer.js |
71 | 127 | */ |
72 | 128 | 'mwe-no-sequence-create' => 'No sequence exists named $1, You can $2', |
73 | 129 | 'mwe-sequence-create-one' => 'start a sequence', |
74 | 130 | |
75 | 131 | /* |
| 132 | + * js file: /modules/ClipEdit/mw.ClipEdit.js |
| 133 | + */ |
| 134 | + 'mwe-crop' => 'Crop image', |
| 135 | + 'mwe-apply_crop' => 'Apply crop to image', |
| 136 | + 'mwe-reset_crop' => 'Reset crop', |
| 137 | + 'mwe-insert_image_page' => 'Insert into page', |
| 138 | + 'mwe-insert_into_sequence' => 'Insert into sequence', |
| 139 | + 'mwe-preview_insert' => 'Preview insert', |
| 140 | + 'mwe-cancel_image_insert' => 'Cancel insert', |
| 141 | + 'mwe-sc_attributes' => 'Clip detail edit', |
| 142 | + 'mwe-sc_inoutpoints' => 'Set in-out points', |
| 143 | + 'mwe-sc_overlays' => 'Overlays', |
| 144 | + 'mwe-sc_audio' => 'Audio control', |
| 145 | + 'mwe-sc_duration' => 'Duration', |
| 146 | + 'mwe-template_properties' => 'Template properties', |
| 147 | + 'mwe-custom_title' => 'Custom title', |
| 148 | + 'mwe-edit_properties' => 'Edit properties', |
| 149 | + 'mwe-other_properties' => 'Other properties', |
| 150 | + 'mwe-resource_page' => 'Resource page:', |
| 151 | + 'mwe-set_in_out_points' => 'Set in-out points', |
| 152 | + 'mwe-start_time' => 'Start time', |
| 153 | + 'mwe-end_time' => 'End time', |
| 154 | + 'mwe-preview_inout' => 'Preview in-out points', |
| 155 | + 'mwe-edit-tools' => 'Edit tools', |
| 156 | + 'mwe-inline-description' => 'Caption', |
| 157 | + 'mwe-edit-video-tools' => 'Edit video tools:', |
| 158 | + 'mwe-duration' => 'Duration:', |
| 159 | + 'mwe-layout' => 'Layout', |
| 160 | + 'mwe-layout_right' => 'Right side image layout', |
| 161 | + 'mwe-layout_left' => 'Left side image layout', |
| 162 | + |
| 163 | + /* |
| 164 | + * js file: /modules/ApiProxy/mw.ApiProxy.js |
| 165 | + */ |
| 166 | + 'mwe-setting-up-proxy' => 'Setting up proxy...', |
| 167 | + 'mwe-re-try' => 'Retry API request', |
| 168 | + 'mwe-re-trying' => 'Retrying API request...', |
| 169 | + 'mwe-proxy-not-ready' => 'Proxy is not configured', |
| 170 | + 'mwe-please-login' => 'The request failed. Are you logged in on $1 ? Please $2 and try again', |
| 171 | + 'mwe-log-in-link' => 'log in', |
| 172 | + 'mwe-remember-loging' => 'General security reminder: Only login to web sites when your address bar displays that site\'s address.', |
| 173 | + |
| 174 | + /* |
76 | 175 | * js file: /modules/TimedText/mw.TimedTextEdit.js |
77 | 176 | */ |
78 | 177 | 'mew-timedtext-editor' => 'Timed text editor', |
— | — | @@ -130,67 +229,81 @@ |
131 | 230 | 'mwe-language-no-subtitles-for-clip' => 'No $1 subtitles where found for clip: $2', |
132 | 231 | |
133 | 232 | /* |
134 | | - * js file: /modules/EmbedPlayer/mw.EmbedPlayer.js |
| 233 | + * js file: /modules/AddMedia/mw.RemoteSearchDriver.js |
135 | 234 | */ |
136 | | - 'mwe-loading_plugin' => 'loading plugin ...', |
137 | | - 'mwe-select_playback' => 'Set playback preference', |
138 | | - 'mwe-link_back' => 'Link back', |
139 | | - 'mwe-error_swap_vid' => 'Error: mwEmbed was unable to swap the video tag for the mwEmbed interface', |
140 | | - 'mwe-add_to_end_of_sequence' => 'Add to end of sequence', |
141 | | - 'mwe-missing_video_stream' => 'The video file for this stream is missing', |
142 | | - 'mwe-play_clip' => 'Play clip', |
143 | | - 'mwe-pause_clip' => 'Pause clip', |
144 | | - 'mwe-volume_control' => 'Volume control', |
145 | | - 'mwe-player_options' => 'Player options', |
146 | | - 'mwe-timed_text' => 'Timed text', |
147 | | - 'mwe-player_fullscreen' => 'Fullscreen', |
148 | | - 'mwe-next_clip_msg' => 'Play next clip', |
149 | | - 'mwe-prev_clip_msg' => 'Play previous clip', |
150 | | - 'mwe-current_clip_msg' => 'Continue playing this clip', |
151 | | - 'mwe-seek_to' => 'Seek $1', |
152 | | - 'mwe-paused' => 'paused', |
153 | | - 'mwe-download_segment' => 'Download selection:', |
154 | | - 'mwe-download_full' => 'Download full video file:', |
155 | | - 'mwe-download_right_click' => 'To download, right click and select <i>Save link as...</i>', |
156 | | - 'mwe-download_clip' => 'Download video', |
157 | | - 'mwe-download_text' => 'Download text (<a style="color:white" title="cmml" href="http://wiki.xiph.org/index.php/CMML">CMML</a> xml):', |
158 | | - 'mwe-download' => 'Download', |
159 | | - 'mwe-share' => 'Share', |
160 | | - 'mwe-credits' => 'Credits', |
161 | | - 'mwe-clip_linkback' => 'Clip source page', |
162 | | - 'mwe-chose_player' => 'Choose video player', |
163 | | - 'mwe-no-player' => 'No player available for $1', |
164 | | - 'mwe-share_this_video' => 'Share this video', |
165 | | - 'mwe-video_credits' => 'Video credits', |
166 | | - 'mwe-kaltura-platform-title' => 'Kaltura open source video platform', |
167 | | - 'mwe-menu_btn' => 'Menu', |
168 | | - 'mwe-close_btn' => 'Close', |
169 | | - 'mwe-ogg-player-vlc-player' => 'VLC player', |
170 | | - 'mwe-ogg-player-oggNative' => 'HTML5 ogg player', |
171 | | - 'mwe-ogg-player-h264Native' => 'HTML5 h.264 player', |
172 | | - 'mwe-ogg-player-oggPlugin' => 'Generic Ogg plugin', |
173 | | - 'mwe-ogg-player-quicktime-mozilla' => 'QuickTime plugin', |
174 | | - 'mwe-ogg-player-quicktime-activex' => 'QuickTime ActiveX', |
175 | | - 'mwe-ogg-player-cortado' => 'Java Cortado', |
176 | | - 'mwe-ogg-player-flowplayer' => 'Flowplayer', |
177 | | - 'mwe-ogg-player-kplayer' => 'Kaltura player', |
178 | | - 'mwe-ogg-player-selected' => '(selected)', |
179 | | - 'mwe-ogg-player-omtkplayer' => 'OMTK Flash Vorbis', |
180 | | - 'mwe-generic_missing_plugin' => 'You browser does not appear to support the following playback type: <b>$1</b><br />Visit the <a href="http://commons.wikimedia.org/wiki/Commons:Media_help">Playback Methods</a> page to download a player.<br />', |
181 | | - 'mwe-for_best_experience' => 'For a better video playback experience we recommend the <b><a href="http://www.mozilla.com/en-US/firefox/upgrade.html?from=mwEmbed">latest firefox</a>.</b>', |
182 | | - 'mwe-do_not_warn_again' => 'Dismiss for now.', |
183 | | - 'mwe-playerSelect' => 'Players', |
184 | | - 'mwe-read_before_embed' => '<a href="http://mediawiki.org/wiki/Security_Notes_on_Remote_Embedding" target="_new">Read this</a> before embedding.', |
185 | | - 'mwe-embed_site_or_blog' => 'Embed on a page', |
186 | | - 'mwe-related_videos' => 'Related videos', |
187 | | - 'mwe-seeking' => 'seeking', |
188 | | - 'mwe-copy-code' => 'Copy code', |
189 | | - 'mwe-video-h264' => 'H.264 video', |
190 | | - 'mwe-video-flv' => 'Flash video', |
191 | | - 'mwe-video-ogg' => 'Ogg video', |
192 | | - 'mwe-video-audio' => 'Ogg audio', |
| 235 | + 'mwe-add_media_wizard' => 'Add media wizard', |
| 236 | + 'mwe-media_search' => 'Media search', |
| 237 | + 'rsd_box_layout' => 'Box layout', |
| 238 | + 'rsd_list_layout' => 'List layout', |
| 239 | + 'rsd_results_desc' => 'Results $1 to $2', |
| 240 | + 'rsd_results_desc_total' => 'Results $1 to $2 of $3', |
| 241 | + 'rsd_results_next' => 'next', |
| 242 | + 'rsd_results_prev' => 'previous', |
| 243 | + 'rsd_no_results' => 'No search results for <b>$1</b>', |
| 244 | + 'mwe-upload_tab' => 'Upload file', |
| 245 | + 'rsd_layout' => 'Layout:', |
| 246 | + 'rsd_resource_edit' => 'Edit resource: $1', |
| 247 | + 'mwe-resource_description_page' => 'Resource description page', |
| 248 | + 'mwe-link' => 'link', |
| 249 | + 'rsd_do_insert' => 'Do insert', |
| 250 | + 'mwe-cc_title' => 'Creative Commons', |
| 251 | + 'mwe-cc_by_title' => 'Attribution', |
| 252 | + 'mwe-cc_nc_title' => 'Noncommercial', |
| 253 | + 'mwe-cc_nd_title' => 'No Derivative Works', |
| 254 | + 'mwe-cc_sa_title' => 'Share Alike', |
| 255 | + 'mwe-cc_pd_title' => 'Public Domain', |
| 256 | + 'mwe-unknown_license' => 'Unknown license', |
| 257 | + 'mwe-no-import-by-url' => 'This user or wiki <b>cannot</b> import assets from remote URLs.<p>Do you need to login?</p><p>Is upload_by_url permission set for you?<br />Does the wiki have $1 enabled?</p>', |
| 258 | + 'mwe-no-import-by-url-linktext' => '$wgAllowCopyUploads', |
| 259 | + 'mwe-results_from' => 'Results from $1', |
| 260 | + 'mwe-missing_desc_see_source' => 'This asset is missing a description. Please see the [$1 original source] and help describe it.', |
| 261 | + 'rsd_config_error' => 'Add media wizard configuration error: $1', |
| 262 | + 'mwe-your_recent_uploads' => 'Your recent uploads to $1', |
| 263 | + 'mwe-no_recent_uploads' => 'No recent uploads', |
| 264 | + 'mwe-not-logged-in-uploads' => 'You may not be logged in so no recent uploads can be displayed. $1 login and $2', |
| 265 | + 'mwe-loggin-link' => 'Please login', |
| 266 | + 'mwe-try-again-link' => 'try again', |
| 267 | + 'mwe-upload_a_file' => 'Upload a new file', |
| 268 | + 'mwe-resource_page_desc' => 'Resource page description:', |
| 269 | + 'mwe-edit_resource_desc' => 'Edit wiki text resource description:', |
| 270 | + 'mwe-local_resource_title' => 'Local resource title:', |
| 271 | + 'mwe-watch_this_page' => 'Watch this page', |
| 272 | + 'mwe-do_import_resource' => 'Import resource', |
| 273 | + 'mwe-update_preview' => 'Update resource page preview', |
| 274 | + 'mwe-return-search-results' => 'Return to search results', |
| 275 | + 'mwe-importing_asset' => 'Importing asset', |
| 276 | + 'mwe-preview_insert_resource' => 'Preview insert of resource: $1', |
| 277 | + 'mwe-do-more-modification' => 'Do More Modification', |
| 278 | + 'mwe-checking-resource' => 'Checking for resource', |
| 279 | + 'mwe-resource-needs-import' => 'Resource $1 needs to be imported to $2', |
| 280 | + 'mwe-ftype-svg' => 'SVG vector file', |
| 281 | + 'mwe-ftype-jpg' => 'JPEG image file', |
| 282 | + 'mwe-ftype-png' => 'PNG image file', |
| 283 | + 'mwe-ftype-oga' => 'Ogg audio file', |
| 284 | + 'mwe-ftype-ogg' => 'Ogg video file', |
| 285 | + 'mwe-ftype-unk' => 'Unknown file format', |
| 286 | + 'rsd-wiki_commons-title' => 'Wikimedia Commons', |
| 287 | + 'rsd-wiki_commons' => 'Wikimedia Commons, an archive of freely-licensed educational media content (images, sound and video clips)', |
| 288 | + 'rsd-kaltura-title' => 'All Sources', |
| 289 | + 'rsd-kaltura' => 'Kaltura agragated search for free-licensed media across multiple search providers', |
| 290 | + 'rsd-this_wiki-title' => 'This wiki', |
| 291 | + 'rsd-this_wiki-desc' => 'The local wiki', |
| 292 | + 'rsd-archive_org-title' => 'Archive.org', |
| 293 | + 'rsd-archive_org-desc' => 'The Internet Archive, a digital library of cultural artifacts', |
| 294 | + 'rsd-flickr-title' => 'Flickr.com', |
| 295 | + 'rsd-flickr-desc' => 'Flickr.com, a online photo sharing site', |
| 296 | + 'rsd-metavid-title' => 'Metavid.org', |
| 297 | + 'rsd-metavid-desc' => 'Metavid.org, a community archive of US House and Senate floor proceedings', |
| 298 | + 'rsd-search-timeout' => 'The search request did not complete. The server may be down experiencing heavy load. You can try again later', |
193 | 299 | |
194 | 300 | /* |
| 301 | + * js file: /modules/AddMedia/mw.UploadInterface.js |
| 302 | + */ |
| 303 | + 'mwe-upload-in-progress' => 'Upload in progress (do not close this window)', |
| 304 | + 'mwe-uploaded-status' => 'Uploaded', |
| 305 | + 'mwe-uploaded-time-remaining' => 'Time remaining: $1', |
| 306 | + |
| 307 | + /* |
195 | 308 | * js file: /modules/AddMedia/mw.UploadHandler.js |
196 | 309 | */ |
197 | 310 | 'mwe-upload-transcoded-status' => 'Transcoded', |
— | — | @@ -219,11 +332,72 @@ |
220 | 333 | 'filestatus' => 'Copyright status:', |
221 | 334 | |
222 | 335 | /* |
223 | | - * js file: /modules/AddMedia/loader.js |
| 336 | + * js file: /modules/AddMedia/mw.Firefogg.js |
224 | 337 | */ |
225 | | - 'mwe-loading-add-media-wiz' => 'Loading add media wizard', |
| 338 | + 'mwe-upload-transcode-in-progress' => 'Transcode and upload in progress (do not close this window)', |
| 339 | + 'fogg-transcoding' => 'Encoding video to ogg', |
| 340 | + 'fogg-select_file' => 'Select file', |
| 341 | + 'fogg-select_new_file' => 'Select new file', |
| 342 | + 'fogg-select_url' => 'Select URL', |
| 343 | + 'fogg-check_for_firefogg' => 'Checking for Firefogg...', |
| 344 | + 'fogg-installed' => 'Firefogg is installed,', |
| 345 | + 'fogg-not-installed' => 'Firefogg is not installed', |
| 346 | + 'fogg-for_improved_uploads' => 'For improved uploads:', |
| 347 | + 'fogg-please-install' => '$1. More $2', |
| 348 | + 'fogg-please-install-install-linktext' => 'Install firefogg', |
| 349 | + 'fogg-please-install-about-linktext' => 'about firefogg', |
| 350 | + 'fogg-use_latest_firefox' => 'Please first install <a href="http://www.mozilla.com/en-US/firefox/upgrade.html?from=firefogg">Firefox 3.5</a> (or later). <i>Then revisit this page to install the <b>Firefogg</b> extension.</i>', |
| 351 | + 'fogg-passthrough_mode' => 'Your selected file is already ogg or not a video file', |
| 352 | + 'fogg-encoding-done' => 'Encoding complete', |
| 353 | + 'fogg-badtoken' => 'Token is not valid', |
| 354 | + 'fogg-preview' => 'Preview video', |
| 355 | + 'fogg-hidepreview' => 'Hide preview', |
| 356 | + 'fogg-warning-firebug' => '<b>Firebug</b> can cause conflicts with <i>Firefogg</i>. Please disable <b>Firebug</b> for this page.', |
226 | 357 | |
227 | 358 | /* |
| 359 | + * js file: /modules/AddMedia/searchLibs/metavidSearch.js |
| 360 | + */ |
| 361 | + 'mwe-stream_title' => '$1 $2 to $3', |
| 362 | + |
| 363 | + /* |
| 364 | + * js file: /modules/AddMedia/searchLibs/kalturaSearch.js |
| 365 | + */ |
| 366 | + 'rsd-media-filter-title' => 'Media', |
| 367 | + 'rsd-media-filter-videos' => 'Videos', |
| 368 | + 'rsd-media-filter-images' => 'Images', |
| 369 | + 'rsd-provider-filter-title' => 'Providers', |
| 370 | + |
| 371 | + /* |
| 372 | + * js file: /modules/AddMedia/searchLibs/baseRemoteSearch.js |
| 373 | + */ |
| 374 | + 'mwe-imported_from' => '$1 imported from [$2 $3]. See the original [$4 resource page] for more information.', |
| 375 | + 'mwe-import-description' => '$1, imported from $2', |
| 376 | + |
| 377 | + /* |
| 378 | + * js file: /modules/AddMedia/jquery.dragDropFile.js |
| 379 | + */ |
| 380 | + 'mwe-upload-multi' => 'Upload {{PLURAL:$1|file|files}}', |
| 381 | + 'mwe-review-upload' => 'Review file {{PLURAL:$1|upload|uploads}}', |
| 382 | + |
| 383 | + /* |
| 384 | + * js file: /modules/AddMedia/mw.UploadForm.js |
| 385 | + */ |
| 386 | + 'mwe-select_file' => 'Select file', |
| 387 | + 'mwe-select_ownwork' => 'I am uploading entirely my own work, and licensing it under:', |
| 388 | + 'mwe-license_cc-by-sa' => 'Creative Commons Share Alike (3.0)', |
| 389 | + 'mwe-upload' => 'Upload file', |
| 390 | + 'mwe-destfilename' => 'Destination filename:', |
| 391 | + 'mwe-summary' => 'Summary', |
| 392 | + 'mwe-error_not_loggedin' => 'You do not appear to be logged in or do not have upload privileges.', |
| 393 | + 'mwe-watch-this-file' => 'Watch this file', |
| 394 | + 'mwe-ignore-any-warnings' => 'Ignore any warnings', |
| 395 | + 'mwe-i-would-like-to' => 'I would like to ...NOTE: upload links are still under development', |
| 396 | + 'mwe-upload-own-file' => 'Upload my own work to $1', |
| 397 | + 'mwe-upload-not-my-file' => 'Upload media that is not my own work to $1', |
| 398 | + 'mwe-upload-once-done' => 'Please upload in the new window or tab. Once you have completed your upload, $1', |
| 399 | + 'mwe-upload-refresh' => 'refresh your upload list', |
| 400 | + |
| 401 | + /* |
228 | 402 | * js file: /modules/AddMedia/mw.FirefoggGUI.js |
229 | 403 | */ |
230 | 404 | 'fogg-save_local_file' => 'Save Ogg', |
— | — | @@ -291,180 +465,11 @@ |
292 | 466 | 'fogg-contact-help' => 'Contact link', |
293 | 467 | |
294 | 468 | /* |
295 | | - * js file: /modules/AddMedia/searchLibs/metavidSearch.js |
| 469 | + * js file: /modules/AddMedia/loader.js |
296 | 470 | */ |
297 | | - 'mwe-stream_title' => '$1 $2 to $3', |
| 471 | + 'mwe-loading-add-media-wiz' => 'Loading add media wizard', |
298 | 472 | |
299 | 473 | /* |
300 | | - * js file: /modules/AddMedia/searchLibs/kalturaSearch.js |
301 | | - */ |
302 | | - 'rsd-media-filter-title' => 'Media', |
303 | | - 'rsd-media-filter-videos' => 'Videos', |
304 | | - 'rsd-media-filter-images' => 'Images', |
305 | | - 'rsd-provider-filter-title' => 'Providers', |
306 | | - |
307 | | - /* |
308 | | - * js file: /modules/AddMedia/searchLibs/baseRemoteSearch.js |
309 | | - */ |
310 | | - 'mwe-imported_from' => '$1 imported from [$2 $3]. See the original [$4 resource page] for more information.', |
311 | | - 'mwe-import-description' => '$1, imported from $2', |
312 | | - |
313 | | - /* |
314 | | - * js file: /modules/AddMedia/mw.UploadForm.js |
315 | | - */ |
316 | | - 'mwe-select_file' => 'Select file', |
317 | | - 'mwe-select_ownwork' => 'I am uploading entirely my own work, and licensing it under:', |
318 | | - 'mwe-license_cc-by-sa' => 'Creative Commons Share Alike (3.0)', |
319 | | - 'mwe-upload' => 'Upload file', |
320 | | - 'mwe-destfilename' => 'Destination filename:', |
321 | | - 'mwe-summary' => 'Summary', |
322 | | - 'mwe-error_not_loggedin' => 'You do not appear to be logged in or do not have upload privileges.', |
323 | | - 'mwe-watch-this-file' => 'Watch this file', |
324 | | - 'mwe-ignore-any-warnings' => 'Ignore any warnings', |
325 | | - 'mwe-i-would-like-to' => 'I would like to ...', |
326 | | - 'mwe-upload-own-file' => 'Upload my own work to $1', |
327 | | - 'mwe-upload-not-my-file' => 'Upload media that is not my own work to $1', |
328 | | - |
329 | | - /* |
330 | | - * js file: /modules/AddMedia/mw.RemoteSearchDriver.js |
331 | | - */ |
332 | | - 'mwe-add_media_wizard' => 'Add media wizard', |
333 | | - 'mwe-media_search' => 'Media search', |
334 | | - 'rsd_box_layout' => 'Box layout', |
335 | | - 'rsd_list_layout' => 'List layout', |
336 | | - 'rsd_results_desc' => 'Results $1 to $2', |
337 | | - 'rsd_results_desc_total' => 'Results $1 to $2 of $3', |
338 | | - 'rsd_results_next' => 'next', |
339 | | - 'rsd_results_prev' => 'previous', |
340 | | - 'rsd_no_results' => 'No search results for <b>$1</b>', |
341 | | - 'mwe-upload_tab' => 'Upload file', |
342 | | - 'rsd_layout' => 'Layout:', |
343 | | - 'rsd_resource_edit' => 'Edit resource: $1', |
344 | | - 'mwe-resource_description_page' => 'Resource description page', |
345 | | - 'mwe-link' => 'link', |
346 | | - 'rsd_do_insert' => 'Do insert', |
347 | | - 'mwe-cc_title' => 'Creative Commons', |
348 | | - 'mwe-cc_by_title' => 'Attribution', |
349 | | - 'mwe-cc_nc_title' => 'Noncommercial', |
350 | | - 'mwe-cc_nd_title' => 'No Derivative Works', |
351 | | - 'mwe-cc_sa_title' => 'Share Alike', |
352 | | - 'mwe-cc_pd_title' => 'Public Domain', |
353 | | - 'mwe-unknown_license' => 'Unknown license', |
354 | | - 'mwe-no-import-by-url' => 'This user or wiki <b>cannot</b> import assets from remote URLs.<p>Do you need to login?</p><p>Is upload_by_url permission set for you?<br />Does the wiki have $1 enabled?</p>', |
355 | | - 'mwe-no-import-by-url-linktext' => '$wgAllowCopyUploads', |
356 | | - 'mwe-results_from' => 'Results from $1', |
357 | | - 'mwe-missing_desc_see_source' => 'This asset is missing a description. Please see the [$1 original source] and help describe it.', |
358 | | - 'rsd_config_error' => 'Add media wizard configuration error: $1', |
359 | | - 'mwe-your_recent_uploads' => 'Your recent uploads to $1', |
360 | | - 'mwe-no_recent_uploads' => 'No recent uploads', |
361 | | - 'mwe-not-logged-in-uploads' => 'You may not be logged in so no recent uploads can be displayed. $1 login and try again', |
362 | | - 'mwe-loggin-link' => 'Please login', |
363 | | - 'mwe-upload_a_file' => 'Upload a new file', |
364 | | - 'mwe-resource_page_desc' => 'Resource page description:', |
365 | | - 'mwe-edit_resource_desc' => 'Edit wiki text resource description:', |
366 | | - 'mwe-local_resource_title' => 'Local resource title:', |
367 | | - 'mwe-watch_this_page' => 'Watch this page', |
368 | | - 'mwe-do_import_resource' => 'Import resource', |
369 | | - 'mwe-update_preview' => 'Update resource page preview', |
370 | | - 'mwe-return-search-results' => 'Return to search results', |
371 | | - 'mwe-importing_asset' => 'Importing asset', |
372 | | - 'mwe-preview_insert_resource' => 'Preview insert of resource: $1', |
373 | | - 'mwe-do-more-modification' => 'Do More Modification', |
374 | | - 'mwe-checking-resource' => 'Checking for resource', |
375 | | - 'mwe-resource-needs-import' => 'Resource $1 needs to be imported to $2', |
376 | | - 'mwe-ftype-svg' => 'SVG vector file', |
377 | | - 'mwe-ftype-jpg' => 'JPEG image file', |
378 | | - 'mwe-ftype-png' => 'PNG image file', |
379 | | - 'mwe-ftype-oga' => 'Ogg audio file', |
380 | | - 'mwe-ftype-ogg' => 'Ogg video file', |
381 | | - 'mwe-ftype-unk' => 'Unknown file format', |
382 | | - 'rsd-wiki_commons-title' => 'Wikimedia Commons', |
383 | | - 'rsd-wiki_commons' => 'Wikimedia Commons, an archive of freely-licensed educational media content (images, sound and video clips)', |
384 | | - 'rsd-kaltura-title' => 'All Sources', |
385 | | - 'rsd-kaltura' => 'Kaltura agragated search for free-licensed media across multiple search providers', |
386 | | - 'rsd-this_wiki-title' => 'This wiki', |
387 | | - 'rsd-this_wiki-desc' => 'The local wiki', |
388 | | - 'rsd-archive_org-title' => 'Archive.org', |
389 | | - 'rsd-archive_org-desc' => 'The Internet Archive, a digital library of cultural artifacts', |
390 | | - 'rsd-flickr-title' => 'Flickr.com', |
391 | | - 'rsd-flickr-desc' => 'Flickr.com, a online photo sharing site', |
392 | | - 'rsd-metavid-title' => 'Metavid.org', |
393 | | - 'rsd-metavid-desc' => 'Metavid.org, a community archive of US House and Senate floor proceedings', |
394 | | - 'rsd-search-timeout' => 'The search request did not complete. The server may be down experiencing heavy load. You can try again later', |
395 | | - |
396 | | - /* |
397 | | - * js file: /modules/AddMedia/mw.Firefogg.js |
398 | | - */ |
399 | | - 'mwe-upload-transcode-in-progress' => 'Transcode and upload in progress (do not close this window)', |
400 | | - 'fogg-transcoding' => 'Encoding video to ogg', |
401 | | - 'fogg-select_file' => 'Select file', |
402 | | - 'fogg-select_new_file' => 'Select new file', |
403 | | - 'fogg-select_url' => 'Select URL', |
404 | | - 'fogg-check_for_firefogg' => 'Checking for Firefogg...', |
405 | | - 'fogg-installed' => 'Firefogg is installed,', |
406 | | - 'fogg-not-installed' => 'Firefogg is not installed', |
407 | | - 'fogg-for_improved_uploads' => 'For improved uploads:', |
408 | | - 'fogg-please-install' => '$1. More $2', |
409 | | - 'fogg-please-install-install-linktext' => 'Install firefogg', |
410 | | - 'fogg-please-install-about-linktext' => 'about firefogg', |
411 | | - 'fogg-use_latest_firefox' => 'Please first install <a href="http://www.mozilla.com/en-US/firefox/upgrade.html?from=firefogg">Firefox 3.5</a> (or later). <i>Then revisit this page to install the <b>Firefogg</b> extension.</i>', |
412 | | - 'fogg-passthrough_mode' => 'Your selected file is already ogg or not a video file', |
413 | | - 'fogg-encoding-done' => 'Encoding complete', |
414 | | - 'fogg-badtoken' => 'Token is not valid', |
415 | | - 'fogg-preview' => 'Preview video', |
416 | | - 'fogg-hidepreview' => 'Hide preview', |
417 | | - 'fogg-warning-firebug' => '<b>Firebug</b> can cause conflicts with <i>Firefogg</i>. Please disable <b>Firebug</b> for this page.', |
418 | | - |
419 | | - /* |
420 | | - * js file: /modules/AddMedia/jquery.dragDropFile.js |
421 | | - */ |
422 | | - 'mwe-upload-multi' => 'Upload {{PLURAL:$1|file|files}}', |
423 | | - 'mwe-review-upload' => 'Review file {{PLURAL:$1|upload|uploads}}', |
424 | | - |
425 | | - /* |
426 | | - * js file: /modules/ClipEdit/mw.ClipEdit.js |
427 | | - */ |
428 | | - 'mwe-crop' => 'Crop image', |
429 | | - 'mwe-apply_crop' => 'Apply crop to image', |
430 | | - 'mwe-reset_crop' => 'Reset crop', |
431 | | - 'mwe-insert_image_page' => 'Insert into page', |
432 | | - 'mwe-insert_into_sequence' => 'Insert into sequence', |
433 | | - 'mwe-preview_insert' => 'Preview insert', |
434 | | - 'mwe-cancel_image_insert' => 'Cancel insert', |
435 | | - 'mwe-sc_attributes' => 'Clip detail edit', |
436 | | - 'mwe-sc_inoutpoints' => 'Set in-out points', |
437 | | - 'mwe-sc_overlays' => 'Overlays', |
438 | | - 'mwe-sc_audio' => 'Audio control', |
439 | | - 'mwe-sc_duration' => 'Duration', |
440 | | - 'mwe-template_properties' => 'Template properties', |
441 | | - 'mwe-custom_title' => 'Custom title', |
442 | | - 'mwe-edit_properties' => 'Edit properties', |
443 | | - 'mwe-other_properties' => 'Other properties', |
444 | | - 'mwe-resource_page' => 'Resource page:', |
445 | | - 'mwe-set_in_out_points' => 'Set in-out points', |
446 | | - 'mwe-start_time' => 'Start time', |
447 | | - 'mwe-end_time' => 'End time', |
448 | | - 'mwe-preview_inout' => 'Preview in-out points', |
449 | | - 'mwe-edit-tools' => 'Edit tools', |
450 | | - 'mwe-inline-description' => 'Caption', |
451 | | - 'mwe-edit-video-tools' => 'Edit video tools:', |
452 | | - 'mwe-duration' => 'Duration:', |
453 | | - 'mwe-layout' => 'Layout', |
454 | | - 'mwe-layout_right' => 'Right side image layout', |
455 | | - 'mwe-layout_left' => 'Left side image layout', |
456 | | - |
457 | | - /* |
458 | | - * js file: /modules/ApiProxy/mw.ApiProxy.js |
459 | | - */ |
460 | | - 'mwe-setting-up-proxy' => 'Setting up proxy...', |
461 | | - 'mwe-re-try' => 'Retry API request', |
462 | | - 'mwe-re-trying' => 'Retrying API request...', |
463 | | - 'mwe-proxy-not-ready' => 'Proxy is not configured', |
464 | | - 'mwe-please-login' => 'The request failed. Are you logged in on $1 ? Please $2 and try again', |
465 | | - 'mwe-log-in-link' => 'log in', |
466 | | - 'mwe-remember-loging' => 'General security reminder: Only login to web sites when your address bar displays that site\'s address.', |
467 | | - |
468 | | - /* |
469 | 474 | * js file: /mwEmbed.js |
470 | 475 | */ |
471 | 476 | 'mwe-loading_txt' => 'Loading ...', |
— | — | @@ -481,6 +486,11 @@ |
482 | 487 | 'mwe-enable-gadget-done' => 'mwEmbed gadget has been enabled', |
483 | 488 | 'mwe-must-login-gadget' => 'To enable gadget you must <a target="_new" href="$1">login</a>', |
484 | 489 | 'mwe-test-plural' => 'I ran {{PLURAL:$1|$1 test|$1 tests}}', |
| 490 | + |
| 491 | + /* |
| 492 | + * js file: /skins/kskin/kskinConfig.js |
| 493 | + */ |
| 494 | + 'mwe-credit-title' => 'Title: $1', |
485 | 495 | ); |
486 | 496 | |
487 | 497 | /** Afrikaans (Afrikaans) |
Index: branches/js2-work/phase3/js/mwEmbed/skins/ctrlBuilder.js |
— | — | @@ -1316,7 +1316,7 @@ |
1317 | 1317 | 'o': function( ctrlObj ) { |
1318 | 1318 | |
1319 | 1319 | // Setup "dobuleclick" fullscreen binding to embedPlayer |
1320 | | - $j( ctrlObj.embedPlayer ).bind("dblclick", function(){ |
| 1320 | + $j( ctrlObj.embedPlayer ).unbind("dblclick").bind("dblclick", function(){ |
1321 | 1321 | ctrlObj.embedPlayer.fullscreen(); |
1322 | 1322 | }); |
1323 | 1323 | |
Index: branches/js2-work/phase3/js/mwEmbed/skins/common/common.css |
— | — | @@ -100,6 +100,7 @@ |
101 | 101 | overflow: auto; |
102 | 102 | } |
103 | 103 | |
| 104 | + |
104 | 105 | .ui-filter-title { |
105 | 106 | font-weight: bold; |
106 | 107 | margin-top: 15px; |
— | — | @@ -126,12 +127,12 @@ |
127 | 128 | .rsd_cp_tab a{ |
128 | 129 | height:16px; |
129 | 130 | } |
130 | | -.rsd_results_container{ |
131 | | - left:2px; |
132 | | - right:2px; |
133 | | - top:2px; |
134 | | - bottom:2px; |
| 131 | + |
| 132 | +#rsd_results_container a{ |
| 133 | + text-decoration:underline; |
135 | 134 | } |
| 135 | + |
| 136 | + |
136 | 137 | #rsd_resource_edit{ |
137 | 138 | z-index:2; |
138 | 139 | } |
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/searchLibs/mediaWikiSearch.js |
— | — | @@ -303,8 +303,7 @@ |
304 | 304 | 'titles' : resource.titleKey, |
305 | 305 | 'prop':'imageinfo', |
306 | 306 | 'iiprop':'url|size|mime' |
307 | | - } |
308 | | - |
| 307 | + } |
309 | 308 | // Set the width: |
310 | 309 | if ( size.width ) { |
311 | 310 | request['iiurlwidth'] = size.width; |
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.UploadInterface.js |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | mw.addMessages({ |
18 | 18 | "mwe-upload-in-progress" : "Upload in progress (do not close this window)", |
19 | 19 | "mwe-uploaded-status" : "Uploaded", |
20 | | - "mwe-uploaded-time-remaining" : "Time remaining: $1", |
| 20 | + "mwe-uploaded-time-remaining" : "Time remaining: $1" |
21 | 21 | }); |
22 | 22 | /** |
23 | 23 | * Base UploadInterface object |
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.UploadForm.js |
— | — | @@ -15,9 +15,11 @@ |
16 | 16 | "mwe-watch-this-file" : "Watch this file", |
17 | 17 | "mwe-ignore-any-warnings" : "Ignore any warnings", |
18 | 18 | |
19 | | - "mwe-i-would-like-to" : "I would like to ...", |
| 19 | + "mwe-i-would-like-to" : "I would like to ...NOTE: upload links are still under development", |
20 | 20 | "mwe-upload-own-file" : "Upload my own work to $1", |
21 | | - "mwe-upload-not-my-file" : "Upload media that is not my own work to $1" |
| 21 | + "mwe-upload-not-my-file" : "Upload media that is not my own work to $1", |
| 22 | + "mwe-upload-once-done" : "Please upload in the new window or tab. Once you have completed your upload, $1", |
| 23 | + "mwe-upload-refresh" : "refresh your upload list" |
22 | 24 | } ); |
23 | 25 | |
24 | 26 | var default_form_options = { |
— | — | @@ -33,13 +35,22 @@ |
34 | 36 | * Add a upload target selection menu |
35 | 37 | * with binding to build update form target |
36 | 38 | */ |
| 39 | + var uploadMenuTarget = null; |
| 40 | + var remoteSearchDriver = null; |
37 | 41 | mw.UploadForm.getUploadMenu = function( options ){ |
38 | 42 | if( ! options.target ){ |
39 | 43 | mw.log("Error no target for upload menu" ); |
40 | 44 | return false; |
41 | 45 | } |
| 46 | + // Update local scope pointers: |
| 47 | + uploadMenuTarget = options.target; |
| 48 | + |
| 49 | + if( options.remoteSearchDriver ) { |
| 50 | + remoteSearchDriver = options.remoteSearchDriver |
| 51 | + } |
| 52 | + |
42 | 53 | // Build out the menu |
43 | | - $j( options.target ).empty().append( |
| 54 | + $j( uploadMenuTarget ).empty().append( |
44 | 55 | $j( '<span />' ) |
45 | 56 | .text( |
46 | 57 | gM('mwe-i-would-like-to' ) |
— | — | @@ -49,14 +60,13 @@ |
50 | 61 | ); |
51 | 62 | $uploadTargetsList = $j( '<ul />' ); |
52 | 63 | // Set provider Target |
53 | | - for( var i in options.uploadTargets ){ |
54 | | - var provider = options.uploadTargets[ i ] |
| 64 | + for( var uploadTargetId in options.uploadTargets ){ |
55 | 65 | $uploadTargetsList.append( |
56 | | - getProviderUploadLinks( provider ) |
| 66 | + getProviderUploadLinks( uploadTargetId ) |
57 | 67 | ); |
58 | 68 | } |
59 | 69 | |
60 | | - $j( options.target ).append( $uploadTargetsList ); |
| 70 | + $j( uploadMenuTarget ).append( $uploadTargetsList ); |
61 | 71 | }; |
62 | 72 | |
63 | 73 | /** |
— | — | @@ -189,9 +199,9 @@ |
190 | 200 | /** |
191 | 201 | * Get a provider upload links for local upload and remote |
192 | 202 | */ |
193 | | - function getProviderUploadLinks( provider ){ |
194 | | - var apiUrl = provider.apiUrl; |
195 | | - |
| 203 | + function getProviderUploadLinks( uploadTargetId ){ |
| 204 | + var uploadProvider = remoteSearchDriver.getUploadTargets()[ uploadTargetId ]; |
| 205 | + var apiUrl = uploadProvider.apiUrl; |
196 | 206 | $uploadLinks = $j( '<div />' ); |
197 | 207 | |
198 | 208 | // Upload your own file |
— | — | @@ -202,10 +212,10 @@ |
203 | 213 | 'href' : '#' |
204 | 214 | } ) |
205 | 215 | .text( |
206 | | - gM( 'mwe-upload-own-file', provider.title ) |
| 216 | + gM( 'mwe-upload-own-file', uploadProvider.title ) |
207 | 217 | ) |
208 | 218 | .click( function(){ |
209 | | - mw.log(" do interface for:" + provider.apiUrl ); |
| 219 | + mw.log(" do interface for:" + uploadProvider.apiUrl ); |
210 | 220 | }) |
211 | 221 | ) |
212 | 222 | ); |
— | — | @@ -215,12 +225,36 @@ |
216 | 226 | $j('<li />').append( |
217 | 227 | $j( '<a />' ) |
218 | 228 | .attr( { |
219 | | - 'href' : provider.uploadPage, |
| 229 | + 'href' : uploadProvider.uploadPage, |
220 | 230 | 'target' : '_new' |
221 | 231 | } ) |
222 | 232 | .text( |
223 | | - gM( 'mwe-upload-not-my-file', provider.title ) |
224 | | - ) |
| 233 | + gM( 'mwe-upload-not-my-file', uploadProvider.title ) |
| 234 | + ).click( function ( ) { |
| 235 | + //Show refresh link |
| 236 | + $j( uploadMenuTarget ).empty().html( |
| 237 | + gM( "mwe-upload-once-done", |
| 238 | + $j('<a />') |
| 239 | + .attr({ |
| 240 | + 'href' : '#' |
| 241 | + }) |
| 242 | + .addClass('user-upload-refresh') |
| 243 | + .text( |
| 244 | + gM('mwe-upload-refresh') |
| 245 | + ) |
| 246 | + ) |
| 247 | + ); |
| 248 | + // NOTE: if gM supported jquery object a bit better |
| 249 | + // we could bind the link above |
| 250 | + $j( uploadMenuTarget ).find( '.user-upload-refresh' ) |
| 251 | + .click( function( ) { |
| 252 | + remoteSearchDriver.showUserRecentUploads( uploadTargetId ); |
| 253 | + } ); |
| 254 | + |
| 255 | + // Follow the link to open a new tab |
| 256 | + return true; |
| 257 | + }) |
| 258 | + |
225 | 259 | ) |
226 | 260 | ); |
227 | 261 | |
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.RemoteSearchDriver.js |
— | — | @@ -38,8 +38,9 @@ |
39 | 39 | "mwe-your_recent_uploads" : "Your recent uploads to $1", |
40 | 40 | "mwe-no_recent_uploads" : "No recent uploads", |
41 | 41 | |
42 | | - "mwe-not-logged-in-uploads" : "You may not be logged in so no recent uploads can be displayed. $1 login and try again", |
| 42 | + "mwe-not-logged-in-uploads" : "You may not be logged in so no recent uploads can be displayed. $1 login and $2", |
43 | 43 | "mwe-loggin-link" : "Please login", |
| 44 | + "mwe-try-again-link" : "try again", |
44 | 45 | |
45 | 46 | "mwe-upload_a_file" : "Upload a new file", |
46 | 47 | "mwe-resource_page_desc" : "Resource page description:", |
— | — | @@ -523,9 +524,9 @@ |
524 | 525 | |
525 | 526 | var $licenseLink = $j( '<a />' ) |
526 | 527 | .attr( { |
527 | | - target: '_new', |
528 | | - href: licenseObj.lurl, |
529 | | - title: licenseObj.title |
| 528 | + 'target' : '_new', |
| 529 | + 'href' : licenseObj.lurl, |
| 530 | + 'title' : licenseObj.title |
530 | 531 | } ) |
531 | 532 | .append( licenseObj.img_html ); |
532 | 533 | |
— | — | @@ -1085,7 +1086,8 @@ |
1086 | 1087 | // Send the upload target menu from UploadForm class |
1087 | 1088 | mw.UploadForm.getUploadMenu( { |
1088 | 1089 | 'target': '#rsd_upload_form', |
1089 | | - 'uploadTargets' : _this.getUploadTargets() |
| 1090 | + 'uploadTargets' : _this.getUploadTargets(), |
| 1091 | + 'remoteSearchDriver' : this |
1090 | 1092 | } ); |
1091 | 1093 | |
1092 | 1094 | // Deal with the api form upload form directly: |
— | — | @@ -1173,10 +1175,28 @@ |
1174 | 1176 | $j( '#user-results-' + uploadTargetId ).html( |
1175 | 1177 | gM( "mwe-not-logged-in-uploads", |
1176 | 1178 | $j( '<a />' ) |
1177 | | - .attr( 'href', logInLink ) |
1178 | | - .append( gM( 'mwe-loggin-link' ) ) |
| 1179 | + .attr( { |
| 1180 | + 'href': logInLink, |
| 1181 | + 'target' : '_new' |
| 1182 | + }) |
| 1183 | + .append( gM( 'mwe-loggin-link' ) ), |
| 1184 | + |
| 1185 | + $j( '<a />' ) |
| 1186 | + .attr( { |
| 1187 | + 'href': '#' |
| 1188 | + }) |
| 1189 | + .addClass('try-again') |
| 1190 | + .append( gM( 'mwe-try-again-link' ) ) |
1179 | 1191 | ) |
1180 | 1192 | ); |
| 1193 | + // Note if we updated gM to return jQuery ojbects then we could |
| 1194 | + // bind above |
| 1195 | + $j( '#user-results-' + uploadTargetId ) |
| 1196 | + .find( '.try-again' ) |
| 1197 | + .click(function(){ |
| 1198 | + //Refresh the user uploads |
| 1199 | + _this.showUserRecentUploads( uploadTargetId ); |
| 1200 | + }) |
1181 | 1201 | } ); |
1182 | 1202 | } else { |
1183 | 1203 | // No user name, since every page outputs wgUserName assume the user is not logged in ) |
— | — | @@ -1256,13 +1276,13 @@ |
1257 | 1277 | |
1258 | 1278 | // Elese this_wiki accepts uploads setup upload links: |
1259 | 1279 | var thisWikiProvider = this.content_providers[ 'this_wiki' ]; |
1260 | | - /* uploadTargets[ 'this_wiki' ] = { |
| 1280 | + uploadTargets[ 'this_wiki' ] = { |
1261 | 1281 | 'apiUrl' : thisWikiProvider.apiUrl, |
1262 | 1282 | // Unfortunately mediaWiki pages don't expose the title of the wiki |
1263 | 1283 | // Could get in an api request ( just use domain for now) |
1264 | 1284 | 'title' : mw.parseUri( thisWikiProvider.apiUrl ).host, |
1265 | 1285 | 'uploadPage' : $uploadLink.attr('href') |
1266 | | - } */ |
| 1286 | + } |
1267 | 1287 | return uploadTargets; |
1268 | 1288 | }, |
1269 | 1289 | |
— | — | @@ -1750,9 +1770,9 @@ |
1751 | 1771 | .addClass( 'rsd_linkback ui-corner-all ui-state-default ui-widget-content' ) |
1752 | 1772 | .append( $j( '<a />' ) |
1753 | 1773 | .attr( { |
1754 | | - target: '_new', |
1755 | | - title: gM( 'mwe-resource_description_page' ), |
1756 | | - href: resource.link |
| 1774 | + 'target' : '_new', |
| 1775 | + 'title' : gM( 'mwe-resource_description_page' ), |
| 1776 | + 'href' : resource.link |
1757 | 1777 | } ) |
1758 | 1778 | .append( gM( 'mwe-link' ))); |
1759 | 1779 | |
— | — | @@ -1854,9 +1874,9 @@ |
1855 | 1875 | /** |
1856 | 1876 | * Add Resource edit layout and display a loader. |
1857 | 1877 | */ |
1858 | | - addResourceEditLoader: function( maxWidth ) { |
| 1878 | + addResourceEditLoader: function( ) { |
1859 | 1879 | var _this = this; |
1860 | | - if ( !maxWidth ) maxWidth = 400; |
| 1880 | + editWidth = 400; |
1861 | 1881 | // Remove any old instance: |
1862 | 1882 | $j( _this.target_container ).find( '#rsd_resource_edit' ).remove(); |
1863 | 1883 | |
— | — | @@ -1874,7 +1894,7 @@ |
1875 | 1895 | 'left' : '2px', |
1876 | 1896 | 'top' : '5px', |
1877 | 1897 | 'bottom' : '10px', |
1878 | | - 'width' : ( maxWidth + 5 ) + 'px', |
| 1898 | + 'width' : ( editWidth + 5 ) + 'px', |
1879 | 1899 | 'overflow' : 'auto', |
1880 | 1900 | 'padding' : '5px' |
1881 | 1901 | } ) |
— | — | @@ -1886,7 +1906,7 @@ |
1887 | 1907 | .css({ |
1888 | 1908 | 'position' : 'absolute', |
1889 | 1909 | 'overflow' : 'auto;', |
1890 | | - 'left' : ( maxWidth + 25 ) + 'px', |
| 1910 | + 'left' : ( editWidth + 25 ) + 'px', |
1891 | 1911 | 'right' :'0px', |
1892 | 1912 | 'top' : '5px', |
1893 | 1913 | 'bottom' : '10px', |
— | — | @@ -1964,10 +1984,14 @@ |
1965 | 1985 | // Remove any existing resource edit interface |
1966 | 1986 | _this.removeResourceEditor(); |
1967 | 1987 | |
| 1988 | + // Append to the top level of model window: |
| 1989 | + _this.addResourceEditLoader(); |
| 1990 | + |
1968 | 1991 | var mediaType = _this.getMediaType( resource ); |
1969 | 1992 | var width = _this.getMaxEditWidth( resource ); |
1970 | 1993 | |
1971 | 1994 | // if maxWidth makes height > available height resize request: |
| 1995 | + |
1972 | 1996 | var width = resource.width; |
1973 | 1997 | var height = parseInt( width * ( resource.width / resource.height ) ); |
1974 | 1998 | |
— | — | @@ -1981,11 +2005,8 @@ |
1982 | 2006 | width = height * ( height / width ); |
1983 | 2007 | } |
1984 | 2008 | mw.log(" set height to: " + height + ' width to: ' + width ); |
| 2009 | + |
1985 | 2010 | |
1986 | | - |
1987 | | - // Append to the top level of model window: |
1988 | | - _this.addResourceEditLoader( width ); |
1989 | | - |
1990 | 2011 | // Update add media wizard title: |
1991 | 2012 | var dialogTitle = gM( 'mwe-add_media_wizard' ) + ': ' + |
1992 | 2013 | gM( 'rsd_resource_edit', resource.title ); |
— | — | @@ -1996,7 +2017,8 @@ |
1997 | 2018 | |
1998 | 2019 | if ( mediaType == 'image' ) { |
1999 | 2020 | _this.loadHighQualityImage( |
2000 | | - resource, { |
| 2021 | + resource, |
| 2022 | + { |
2001 | 2023 | 'width': width |
2002 | 2024 | }, |
2003 | 2025 | 'rsd_edit_img', |
— | — | @@ -3075,7 +3097,7 @@ |
3076 | 3098 | ( parseInt( provider.offset ) + parseInt( search.num_results ) ) : |
3077 | 3099 | ( parseInt( provider.offset ) + parseInt( provider.limit ) ); |
3078 | 3100 | |
3079 | | - var $pagingControl = $j('<span />').attr({ |
| 3101 | + var $pagingControl = $j( '<span />' ).attr({ |
3080 | 3102 | id: 'rsd_paging_control' |
3081 | 3103 | }); |
3082 | 3104 | |
Index: branches/js2-work/phase3/js/mwEmbed/mwEmbed.js |
— | — | @@ -230,14 +230,18 @@ |
231 | 231 | // Check for missing message key |
232 | 232 | if ( ! messageCache[ msgKey ] ){ |
233 | 233 | return '<' + msgKey + '>'; |
234 | | - } |
235 | | - |
| 234 | + } |
236 | 235 | // Check if we need to do args replacements: |
237 | 236 | if( typeof args != 'undefined' ) { |
238 | | - // Make sure args are of type array |
239 | | - if ( typeof args == 'string' || typeof args == 'number' ) { |
| 237 | + |
| 238 | + // Make arg into an array if its not already an array |
| 239 | + if ( typeof args == 'string' |
| 240 | + || typeof args == 'number' |
| 241 | + || args instanceof jQuery) |
| 242 | + { |
240 | 243 | args = [ args ]; |
241 | 244 | } |
| 245 | + |
242 | 246 | // Put any extra arguments into the args array |
243 | 247 | var extraArgs = $j.makeArray( arguments ); |
244 | 248 | for(var i=2; i < extraArgs.length; i ++ ){ |
— | — | @@ -269,7 +273,7 @@ |
270 | 274 | */ |
271 | 275 | mw.lang.msgReplaceArgs = function( message , args ) { |
272 | 276 | // Replace Values |
273 | | - for ( var v =0; v < args.length; v++ ) { |
| 277 | + for ( var v = 0; v < args.length; v++ ) { |
274 | 278 | if( typeof args[v] == 'undefined' ) { |
275 | 279 | continue; |
276 | 280 | } |
— | — | @@ -282,9 +286,8 @@ |
283 | 287 | |
284 | 288 | // Message test replace arguments start at 1 instead of zero: |
285 | 289 | var rep = new RegExp( '\\$' + ( parseInt( v ) + 1 ), 'g' ); |
286 | | - |
287 | 290 | // Check if we got passed in a jQuery object: |
288 | | - if( typeof replaceValue[ 'tagName' ] != 'undefined' ) { |
| 291 | + if( replaceValue instanceof jQuery) { |
289 | 292 | message = message.replace( rep, $j('<div />').append( replaceValue ).html() ); |
290 | 293 | } else { |
291 | 294 | // Assume replaceValue is a string |