r63204 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63203‎ | r63204 | r63205 >
Date:15:05, 3 March 2010
Author:dale
Status:deferred
Tags:
Comment:
* more upload form improvements
* fixed mw.getMsg to work better with jquery objects
* updated language file
Modified paths:
  • /branches/js2-work/phase3/js/mwEmbed/languages/mwEmbed.i18n.php (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/loader.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.RemoteSearchDriver.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.UploadForm.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.UploadInterface.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/searchLibs/mediaWikiSearch.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/mwEmbed.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/skins/common/common.css (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/skins/ctrlBuilder.js (modified) (history)

Diff [purge]

Index: branches/js2-work/phase3/js/mwEmbed/loader.js
@@ -89,7 +89,7 @@
9090
9191 // Default request timeout ( for cases where we inlucde js and normal browser timeout can't be used )
9292 // stored in seconds
93 - 'defaultRequestTimeout' : 30,
 93+ 'defaultRequestTimeout' : 25,
9494
9595 // Default user language is "en" Can be overwritten by:
9696 // "uselang" url param
Index: branches/js2-work/phase3/js/mwEmbed/languages/mwEmbed.i18n.php
@@ -12,22 +12,67 @@
1313
1414 $messages['en'] = array(
1515 /*
16 - * js file: /skins/kskin/kskinConfig.js
 16+ * js file: /modules/EmbedPlayer/mw.EmbedPlayer.js
1717 */
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',
1975
2076 /*
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 - /*
3277 * js file: /modules/Sequencer/mw.Sequencer.js
3378 */
3479 'mwe-menu_clipedit' => 'Edit media',
@@ -66,12 +111,66 @@
67112 '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>).',
68113
69114 /*
 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+ /*
70126 * js file: /modules/Sequencer/remotes/RemoteMwSequencer.js
71127 */
72128 'mwe-no-sequence-create' => 'No sequence exists named $1, You can $2',
73129 'mwe-sequence-create-one' => 'start a sequence',
74130
75131 /*
 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+ /*
76175 * js file: /modules/TimedText/mw.TimedTextEdit.js
77176 */
78177 'mew-timedtext-editor' => 'Timed text editor',
@@ -130,67 +229,81 @@
131230 'mwe-language-no-subtitles-for-clip' => 'No $1 subtitles where found for clip: $2',
132231
133232 /*
134 - * js file: /modules/EmbedPlayer/mw.EmbedPlayer.js
 233+ * js file: /modules/AddMedia/mw.RemoteSearchDriver.js
135234 */
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',
193299
194300 /*
 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+ /*
195308 * js file: /modules/AddMedia/mw.UploadHandler.js
196309 */
197310 'mwe-upload-transcoded-status' => 'Transcoded',
@@ -219,11 +332,72 @@
220333 'filestatus' => 'Copyright status:',
221334
222335 /*
223 - * js file: /modules/AddMedia/loader.js
 336+ * js file: /modules/AddMedia/mw.Firefogg.js
224337 */
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.',
226357
227358 /*
 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+ /*
228402 * js file: /modules/AddMedia/mw.FirefoggGUI.js
229403 */
230404 'fogg-save_local_file' => 'Save Ogg',
@@ -291,180 +465,11 @@
292466 'fogg-contact-help' => 'Contact link',
293467
294468 /*
295 - * js file: /modules/AddMedia/searchLibs/metavidSearch.js
 469+ * js file: /modules/AddMedia/loader.js
296470 */
297 - 'mwe-stream_title' => '$1 $2 to $3',
 471+ 'mwe-loading-add-media-wiz' => 'Loading add media wizard',
298472
299473 /*
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 - /*
469474 * js file: /mwEmbed.js
470475 */
471476 'mwe-loading_txt' => 'Loading ...',
@@ -481,6 +486,11 @@
482487 'mwe-enable-gadget-done' => 'mwEmbed gadget has been enabled',
483488 'mwe-must-login-gadget' => 'To enable gadget you must <a target="_new" href="$1">login</a>',
484489 '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',
485495 );
486496
487497 /** Afrikaans (Afrikaans)
Index: branches/js2-work/phase3/js/mwEmbed/skins/ctrlBuilder.js
@@ -1316,7 +1316,7 @@
13171317 'o': function( ctrlObj ) {
13181318
13191319 // Setup "dobuleclick" fullscreen binding to embedPlayer
1320 - $j( ctrlObj.embedPlayer ).bind("dblclick", function(){
 1320+ $j( ctrlObj.embedPlayer ).unbind("dblclick").bind("dblclick", function(){
13211321 ctrlObj.embedPlayer.fullscreen();
13221322 });
13231323
Index: branches/js2-work/phase3/js/mwEmbed/skins/common/common.css
@@ -100,6 +100,7 @@
101101 overflow: auto;
102102 }
103103
 104+
104105 .ui-filter-title {
105106 font-weight: bold;
106107 margin-top: 15px;
@@ -126,12 +127,12 @@
127128 .rsd_cp_tab a{
128129 height:16px;
129130 }
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;
135134 }
 135+
 136+
136137 #rsd_resource_edit{
137138 z-index:2;
138139 }
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/searchLibs/mediaWikiSearch.js
@@ -303,8 +303,7 @@
304304 'titles' : resource.titleKey,
305305 'prop':'imageinfo',
306306 'iiprop':'url|size|mime'
307 - }
308 -
 307+ }
309308 // Set the width:
310309 if ( size.width ) {
311310 request['iiurlwidth'] = size.width;
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.UploadInterface.js
@@ -16,7 +16,7 @@
1717 mw.addMessages({
1818 "mwe-upload-in-progress" : "Upload in progress (do not close this window)",
1919 "mwe-uploaded-status" : "Uploaded",
20 - "mwe-uploaded-time-remaining" : "Time remaining: $1",
 20+ "mwe-uploaded-time-remaining" : "Time remaining: $1"
2121 });
2222 /**
2323 * Base UploadInterface object
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.UploadForm.js
@@ -15,9 +15,11 @@
1616 "mwe-watch-this-file" : "Watch this file",
1717 "mwe-ignore-any-warnings" : "Ignore any warnings",
1818
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",
2020 "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"
2224 } );
2325
2426 var default_form_options = {
@@ -33,13 +35,22 @@
3436 * Add a upload target selection menu
3537 * with binding to build update form target
3638 */
 39+ var uploadMenuTarget = null;
 40+ var remoteSearchDriver = null;
3741 mw.UploadForm.getUploadMenu = function( options ){
3842 if( ! options.target ){
3943 mw.log("Error no target for upload menu" );
4044 return false;
4145 }
 46+ // Update local scope pointers:
 47+ uploadMenuTarget = options.target;
 48+
 49+ if( options.remoteSearchDriver ) {
 50+ remoteSearchDriver = options.remoteSearchDriver
 51+ }
 52+
4253 // Build out the menu
43 - $j( options.target ).empty().append(
 54+ $j( uploadMenuTarget ).empty().append(
4455 $j( '<span />' )
4556 .text(
4657 gM('mwe-i-would-like-to' )
@@ -49,14 +60,13 @@
5061 );
5162 $uploadTargetsList = $j( '<ul />' );
5263 // Set provider Target
53 - for( var i in options.uploadTargets ){
54 - var provider = options.uploadTargets[ i ]
 64+ for( var uploadTargetId in options.uploadTargets ){
5565 $uploadTargetsList.append(
56 - getProviderUploadLinks( provider )
 66+ getProviderUploadLinks( uploadTargetId )
5767 );
5868 }
5969
60 - $j( options.target ).append( $uploadTargetsList );
 70+ $j( uploadMenuTarget ).append( $uploadTargetsList );
6171 };
6272
6373 /**
@@ -189,9 +199,9 @@
190200 /**
191201 * Get a provider upload links for local upload and remote
192202 */
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;
196206 $uploadLinks = $j( '<div />' );
197207
198208 // Upload your own file
@@ -202,10 +212,10 @@
203213 'href' : '#'
204214 } )
205215 .text(
206 - gM( 'mwe-upload-own-file', provider.title )
 216+ gM( 'mwe-upload-own-file', uploadProvider.title )
207217 )
208218 .click( function(){
209 - mw.log(" do interface for:" + provider.apiUrl );
 219+ mw.log(" do interface for:" + uploadProvider.apiUrl );
210220 })
211221 )
212222 );
@@ -215,12 +225,36 @@
216226 $j('<li />').append(
217227 $j( '<a />' )
218228 .attr( {
219 - 'href' : provider.uploadPage,
 229+ 'href' : uploadProvider.uploadPage,
220230 'target' : '_new'
221231 } )
222232 .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+
225259 )
226260 );
227261
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.RemoteSearchDriver.js
@@ -38,8 +38,9 @@
3939 "mwe-your_recent_uploads" : "Your recent uploads to $1",
4040 "mwe-no_recent_uploads" : "No recent uploads",
4141
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",
4343 "mwe-loggin-link" : "Please login",
 44+ "mwe-try-again-link" : "try again",
4445
4546 "mwe-upload_a_file" : "Upload a new file",
4647 "mwe-resource_page_desc" : "Resource page description:",
@@ -523,9 +524,9 @@
524525
525526 var $licenseLink = $j( '<a />' )
526527 .attr( {
527 - target: '_new',
528 - href: licenseObj.lurl,
529 - title: licenseObj.title
 528+ 'target' : '_new',
 529+ 'href' : licenseObj.lurl,
 530+ 'title' : licenseObj.title
530531 } )
531532 .append( licenseObj.img_html );
532533
@@ -1085,7 +1086,8 @@
10861087 // Send the upload target menu from UploadForm class
10871088 mw.UploadForm.getUploadMenu( {
10881089 'target': '#rsd_upload_form',
1089 - 'uploadTargets' : _this.getUploadTargets()
 1090+ 'uploadTargets' : _this.getUploadTargets(),
 1091+ 'remoteSearchDriver' : this
10901092 } );
10911093
10921094 // Deal with the api form upload form directly:
@@ -1173,10 +1175,28 @@
11741176 $j( '#user-results-' + uploadTargetId ).html(
11751177 gM( "mwe-not-logged-in-uploads",
11761178 $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' ) )
11791191 )
11801192 );
 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+ })
11811201 } );
11821202 } else {
11831203 // No user name, since every page outputs wgUserName assume the user is not logged in )
@@ -1256,13 +1276,13 @@
12571277
12581278 // Elese this_wiki accepts uploads setup upload links:
12591279 var thisWikiProvider = this.content_providers[ 'this_wiki' ];
1260 - /* uploadTargets[ 'this_wiki' ] = {
 1280+ uploadTargets[ 'this_wiki' ] = {
12611281 'apiUrl' : thisWikiProvider.apiUrl,
12621282 // Unfortunately mediaWiki pages don't expose the title of the wiki
12631283 // Could get in an api request ( just use domain for now)
12641284 'title' : mw.parseUri( thisWikiProvider.apiUrl ).host,
12651285 'uploadPage' : $uploadLink.attr('href')
1266 - } */
 1286+ }
12671287 return uploadTargets;
12681288 },
12691289
@@ -1750,9 +1770,9 @@
17511771 .addClass( 'rsd_linkback ui-corner-all ui-state-default ui-widget-content' )
17521772 .append( $j( '<a />' )
17531773 .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
17571777 } )
17581778 .append( gM( 'mwe-link' )));
17591779
@@ -1854,9 +1874,9 @@
18551875 /**
18561876 * Add Resource edit layout and display a loader.
18571877 */
1858 - addResourceEditLoader: function( maxWidth ) {
 1878+ addResourceEditLoader: function( ) {
18591879 var _this = this;
1860 - if ( !maxWidth ) maxWidth = 400;
 1880+ editWidth = 400;
18611881 // Remove any old instance:
18621882 $j( _this.target_container ).find( '#rsd_resource_edit' ).remove();
18631883
@@ -1874,7 +1894,7 @@
18751895 'left' : '2px',
18761896 'top' : '5px',
18771897 'bottom' : '10px',
1878 - 'width' : ( maxWidth + 5 ) + 'px',
 1898+ 'width' : ( editWidth + 5 ) + 'px',
18791899 'overflow' : 'auto',
18801900 'padding' : '5px'
18811901 } )
@@ -1886,7 +1906,7 @@
18871907 .css({
18881908 'position' : 'absolute',
18891909 'overflow' : 'auto;',
1890 - 'left' : ( maxWidth + 25 ) + 'px',
 1910+ 'left' : ( editWidth + 25 ) + 'px',
18911911 'right' :'0px',
18921912 'top' : '5px',
18931913 'bottom' : '10px',
@@ -1964,10 +1984,14 @@
19651985 // Remove any existing resource edit interface
19661986 _this.removeResourceEditor();
19671987
 1988+ // Append to the top level of model window:
 1989+ _this.addResourceEditLoader();
 1990+
19681991 var mediaType = _this.getMediaType( resource );
19691992 var width = _this.getMaxEditWidth( resource );
19701993
19711994 // if maxWidth makes height > available height resize request:
 1995+
19721996 var width = resource.width;
19731997 var height = parseInt( width * ( resource.width / resource.height ) );
19741998
@@ -1981,11 +2005,8 @@
19822006 width = height * ( height / width );
19832007 }
19842008 mw.log(" set height to: " + height + ' width to: ' + width );
 2009+
19852010
1986 -
1987 - // Append to the top level of model window:
1988 - _this.addResourceEditLoader( width );
1989 -
19902011 // Update add media wizard title:
19912012 var dialogTitle = gM( 'mwe-add_media_wizard' ) + ': ' +
19922013 gM( 'rsd_resource_edit', resource.title );
@@ -1996,7 +2017,8 @@
19972018
19982019 if ( mediaType == 'image' ) {
19992020 _this.loadHighQualityImage(
2000 - resource, {
 2021+ resource,
 2022+ {
20012023 'width': width
20022024 },
20032025 'rsd_edit_img',
@@ -3075,7 +3097,7 @@
30763098 ( parseInt( provider.offset ) + parseInt( search.num_results ) ) :
30773099 ( parseInt( provider.offset ) + parseInt( provider.limit ) );
30783100
3079 - var $pagingControl = $j('<span />').attr({
 3101+ var $pagingControl = $j( '<span />' ).attr({
30803102 id: 'rsd_paging_control'
30813103 });
30823104
Index: branches/js2-work/phase3/js/mwEmbed/mwEmbed.js
@@ -230,14 +230,18 @@
231231 // Check for missing message key
232232 if ( ! messageCache[ msgKey ] ){
233233 return '&lt;' + msgKey + '&gt;';
234 - }
235 -
 234+ }
236235 // Check if we need to do args replacements:
237236 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+ {
240243 args = [ args ];
241244 }
 245+
242246 // Put any extra arguments into the args array
243247 var extraArgs = $j.makeArray( arguments );
244248 for(var i=2; i < extraArgs.length; i ++ ){
@@ -269,7 +273,7 @@
270274 */
271275 mw.lang.msgReplaceArgs = function( message , args ) {
272276 // Replace Values
273 - for ( var v =0; v < args.length; v++ ) {
 277+ for ( var v = 0; v < args.length; v++ ) {
274278 if( typeof args[v] == 'undefined' ) {
275279 continue;
276280 }
@@ -282,9 +286,8 @@
283287
284288 // Message test replace arguments start at 1 instead of zero:
285289 var rep = new RegExp( '\\$' + ( parseInt( v ) + 1 ), 'g' );
286 -
287290 // Check if we got passed in a jQuery object:
288 - if( typeof replaceValue[ 'tagName' ] != 'undefined' ) {
 291+ if( replaceValue instanceof jQuery) {
289292 message = message.replace( rep, $j('<div />').append( replaceValue ).html() );
290293 } else {
291294 // Assume replaceValue is a string

Status & tagging log