Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/searchLibs/kalturaSearch.js |
— | — | @@ -227,7 +227,7 @@ |
228 | 228 | } |
229 | 229 | |
230 | 230 | mw.log( "Kaltura::getProviderResults query: " + request['s'] + " page: " + request['page']); |
231 | | - $j.getJSON( this.provider.api_url + '?callback=?', request, function( data ) { |
| 231 | + mw.getJSON( this.provider.api_url + '?callback=?', request, function( data ) { |
232 | 232 | _this.addResults( data ); |
233 | 233 | callback( 'ok' ); |
234 | 234 | } ); |
— | — | @@ -250,16 +250,16 @@ |
251 | 251 | _this.resultsObj = {}; |
252 | 252 | this.num_results = 0; |
253 | 253 | |
254 | | - for ( var resource_id in data ) { |
255 | | - var result = data[ resource_id ]; |
| 254 | + for ( var resource_id in data ) { |
| 255 | + var result = data[ resource_id ]; |
256 | 256 | |
257 | 257 | // Update mappings: |
258 | 258 | result[ 'poster' ] = result[ 'thumbnail' ]; |
259 | 259 | result[ 'pSobj' ] = _this; |
260 | 260 | result[ 'link' ] = result[ 'item_details_page' ]; |
261 | 261 | |
262 | | - var fileExtension = _this.getMimeExtension( result[ 'mime' ] ); |
263 | | - result[ 'titleKey' ] = 'File:' + result[ 'title' ] + '.' + fileExtension; |
| 262 | + var fileExtension = _this.getMimeExtension( result[ 'mime' ] ); |
| 263 | + result[ 'titleKey' ] = result[ 'title' ] + '.' + fileExtension; |
264 | 264 | |
265 | 265 | this.num_results++; |
266 | 266 | _this.resultsObj[ resource_id ] = result; |
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.RemoteSearchDriver.js |
— | — | @@ -202,23 +202,23 @@ |
203 | 203 | * Content_providers documentation |
204 | 204 | * |
205 | 205 | * @enabled: whether the search provider can be selected |
206 | | - * |
| 206 | + * |
207 | 207 | * @default: default: if the current cp should be displayed (only one should be the default) |
208 | | - * |
| 208 | + * |
209 | 209 | * @title: the title of the search provider |
210 | | - * |
| 210 | + * |
211 | 211 | * @desc: can use html |
212 | | - * |
| 212 | + * |
213 | 213 | * @homepage: the homepage url for the search provider |
214 | 214 | * |
215 | 215 | * @api_url: the url to query against given the library type: |
216 | 216 | * |
217 | 217 | * @lib: the search library to use corresponding to the |
218 | | - * search object ie: 'mediaWiki' = new mediaWikiSearchSearch() |
219 | | - * |
| 218 | + * search object ie: 'mediaWiki' = new mediaWikiSearchSearch() |
| 219 | + * |
220 | 220 | * @tab_img: the tab image (if set to false use title text) |
221 | | - * if === "true" use standard location skin/images/{cp_id}_tab.png |
222 | | - * if === string use as url for image |
| 221 | + * if === "true" use standard location skin/images/{cp_id}_tab.png |
| 222 | + * if === string use as url for image |
223 | 223 | * |
224 | 224 | * @linkback_icon default is: /wiki/skins/common/images/magnify-clip.png |
225 | 225 | * |
— | — | @@ -237,7 +237,7 @@ |
238 | 238 | * Local wiki search |
239 | 239 | */ |
240 | 240 | 'this_wiki': { |
241 | | - 'enabled': 1, |
| 241 | + 'enabled': 1, |
242 | 242 | 'api_url': ( wgServer && wgScriptPath ) ? |
243 | 243 | wgServer + wgScriptPath + '/api.php' : null, |
244 | 244 | 'lib': 'mediaWiki', |
— | — | @@ -340,7 +340,7 @@ |
341 | 341 | * Special Upload tab provider |
342 | 342 | */ |
343 | 343 | 'upload': { |
344 | | - 'enabled': 1, |
| 344 | + 'enabled': 1, |
345 | 345 | 'title': 'Upload' |
346 | 346 | } |
347 | 347 | }, |
— | — | @@ -480,18 +480,18 @@ |
481 | 481 | } else { |
482 | 482 | _this.upload_api_target = _this.local_wiki_api_url; |
483 | 483 | } |
484 | | - } |
| 484 | + } |
485 | 485 | |
486 | 486 | // Set up the "add media wizard" button, which invokes this object |
487 | 487 | if ( !this.target_invoke_button || $j( this.target_invoke_button ).length == 0 ) { |
488 | 488 | mw.log( "RemoteSearchDriver:: no target invocation provided " + |
489 | | - "(will have to run your own createUI() )" ); |
| 489 | + "(will have to run your own createUI() )" ); |
490 | 490 | } else { |
491 | | - if ( this.target_invoke_button ) { |
| 491 | + if ( this.target_invoke_button ) { |
492 | 492 | $j( this.target_invoke_button ) |
493 | 493 | .css( 'cursor', 'pointer' ) |
494 | 494 | .attr( 'title', gM( 'mwe-add_media_wizard' ) ) |
495 | | - .click( function() { |
| 495 | + .click( function() { |
496 | 496 | _this.createUI(); |
497 | 497 | } ); |
498 | 498 | } |
— | — | @@ -510,7 +510,7 @@ |
511 | 511 | 'title="' + licenseObj.title + '">' + |
512 | 512 | licenseObj.img_html + |
513 | 513 | '</a>' + |
514 | | - '</div>'; |
| 514 | + '</div>'; |
515 | 515 | }, |
516 | 516 | |
517 | 517 | /** |
— | — | @@ -1085,7 +1085,7 @@ |
1086 | 1086 | this.$resultsContainer.html( mw.loading_spinner() ); |
1087 | 1087 | |
1088 | 1088 | // Make sure the search library is loaded and issue the search request |
1089 | | - this.performProviderSearch( provider ); |
| 1089 | + this.performProviderSearch( provider ); |
1090 | 1090 | }, |
1091 | 1091 | |
1092 | 1092 | /* |
— | — | @@ -1209,7 +1209,7 @@ |
1210 | 1210 | ) |
1211 | 1211 | } |
1212 | 1212 | return false; |
1213 | | - } |
| 1213 | + } |
1214 | 1214 | |
1215 | 1215 | if (!provider.sObj) { |
1216 | 1216 | this.loadSearchLib( provider, this.getProviderCallback() ); |
— | — | @@ -1228,9 +1228,9 @@ |
1229 | 1229 | var searchTime = d.getMilliseconds(); |
1230 | 1230 | |
1231 | 1231 | provider.sObj.getSearchResults( $j( '#rsd_q' ).val() , |
1232 | | - function( resultStatus ) { |
| 1232 | + function( resultStatus ) { |
1233 | 1233 | _this.showResults(); |
1234 | | - }); |
| 1234 | + }); |
1235 | 1235 | |
1236 | 1236 | // Set a timeout of 20 seconds |
1237 | 1237 | setTimeout( function() { |
— | — | @@ -1348,9 +1348,9 @@ |
1349 | 1349 | // Output all the results for the current current_provider |
1350 | 1350 | if ( typeof provider['sObj'] != 'undefined' ) { |
1351 | 1351 | $j.each( provider.sObj.resultsObj, function( resIndex, resource ) { |
1352 | | - o += _this.getResultHtml( provider, resIndex, resource ); |
| 1352 | + o += _this.getResultHtml( provider, resIndex, resource ); |
1353 | 1353 | numResults++; |
1354 | | - } ); |
| 1354 | + } ); |
1355 | 1355 | // Put in the tab output (plus clear the output) |
1356 | 1356 | $resultsContainer.append( o + '<div style="clear:both"/>' ); |
1357 | 1357 | } |
— | — | @@ -1395,7 +1395,7 @@ |
1396 | 1396 | return this.getResultHtmlBox( provider, resIndex, resource ); |
1397 | 1397 | }else{ |
1398 | 1398 | return this.getResultHtmlList( provider, resIndex, resource ); |
1399 | | - } |
| 1399 | + } |
1400 | 1400 | }, |
1401 | 1401 | |
1402 | 1402 | /** |
— | — | @@ -1518,7 +1518,7 @@ |
1519 | 1519 | |
1520 | 1520 | // Set up the interface compoents: |
1521 | 1521 | var $clipEditControl = $j('<div />') |
1522 | | - .attr( 'id', 'clip_edit_ctrl' ) |
| 1522 | + .attr( 'id', 'clip_edit_ctrl' ) |
1523 | 1523 | .addClass('ui-widget ui-widget-content ui-corner-all') |
1524 | 1524 | .css( { |
1525 | 1525 | 'position' : 'absolute', |
— | — | @@ -2576,7 +2576,7 @@ |
2577 | 2577 | mw.log( 'insertResource: ' + resource.title ); |
2578 | 2578 | var _this = this; |
2579 | 2579 | // Double check that the resource is present: |
2580 | | - this.isFileLocallyAvailable( resource, function( status ) { |
| 2580 | + this.isFileLocallyAvailable( resource, function( status ) { |
2581 | 2581 | if ( status === 'missing' ) { |
2582 | 2582 | _this.showImportUI( resource, function() { |
2583 | 2583 | _this.insertResourceToOutput( resource ); |
— | — | @@ -2586,7 +2586,7 @@ |
2587 | 2587 | if ( status === 'local' || status === 'shared' || status === 'imported' ) { |
2588 | 2588 | _this.insertResourceToOutput( resource ); |
2589 | 2589 | } |
2590 | | - //NOTE: should hanndle errors or other status states? |
| 2590 | + //NOTE: should hanndle errors or other status states? |
2591 | 2591 | } ); |
2592 | 2592 | }, |
2593 | 2593 | |
— | — | @@ -2630,11 +2630,11 @@ |
2631 | 2631 | mw.log( "close all:: " + _this.target_container ); |
2632 | 2632 | _this.onCancelClipEdit(); |
2633 | 2633 | |
2634 | | - $j( _this.target_container ).dialog( 'close' ); |
| 2634 | + $j( _this.target_container ).dialog( 'close' ); |
2635 | 2635 | // Give a chance for the events to complete |
2636 | 2636 | // (somehow at least in firefox a rare condition occurs where |
2637 | 2637 | // the modal of the edit-box stick around even after the |
2638 | | - // close request has been issued. ) |
| 2638 | + // close request has been issued. ) |
2639 | 2639 | setTimeout( |
2640 | 2640 | function() { |
2641 | 2641 | $j( _this.target_container ).dialog( 'close' ); |