r61994 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61993‎ | r61994 | r61995 >
Date:22:28, 4 February 2010
Author:shmichael
Status:deferred
Tags:
Comment:
* Licenses are displayed for Kaltura searches
* Search filters now support localization
Modified paths:
  • /branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/searchLibs/kalturaSearch.js (modified) (history)

Diff [purge]

Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/searchLibs/kalturaSearch.js
@@ -2,6 +2,13 @@
33 * Kaltura aggregated search:
44 */
55
 6+mw.addMessages( {
 7+ 'rsd-media-filter-title': 'Media',
 8+ 'rsd-media-filter-videos': 'Videos',
 9+ 'rsd-media-filter-images': 'Images',
 10+ 'rsd-provider-filter-title': 'Providers'
 11+} );
 12+
613 var kalturaFilters = function ( options ) {
714 return this.init( options );
815 }
@@ -25,16 +32,18 @@
2633
2734 this.filterList = {};
2835
29 - this.buildFilter('media', 'Media', {
30 - movie: 'Videos',
31 - image: 'Images'
 36+ this.buildFilter('media',
 37+ gM( 'rsd-media-filter-title' ), {
 38+ movie: gM ( 'rsd-media-filter-videos' ),
 39+ image: gM ( 'rsd-media-filter-images' )
3240 });
3341
34 - this.buildFilter('providers', 'Providers', {
35 - wiki_commons: 'Wikipedia Commons',
36 - archive_org: 'The Internet Archive',
37 - metavid: 'Metavid',
38 - flickr: 'Flickr'
 42+ this.buildFilter('providers',
 43+ gM( 'rsd-provider-filter-title' ), {
 44+ wiki_commons: gM( 'rsd-wiki_commons-title'),
 45+ archive_org: gM( 'rsd-archive_org-title' ),
 46+ metavid: gM( 'rsd-metavid-title' ),
 47+ flickr: gM( 'rsd-flickr-title' )
3948 });
4049
4150 },
@@ -263,6 +272,10 @@
264273 var fileExtension = _this.getMimeExtension( result[ 'mime' ] );
265274 result[ 'titleKey' ] = result[ 'titleKey' ] || ( result[ 'title' ] + '.' + fileExtension );
266275
 276+ if ( result.license_url ) {
 277+ result[ 'license' ] = this.rsd.getLicenseFromUrl( result.license_url );
 278+ }
 279+
267280 this.num_results++;
268281 _this.resultsObj[ resource_id ] = result;
269282

Status & tagging log