Index: trunk/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js |
— | — | @@ -30,7 +30,7 @@ |
31 | 31 | "mwe-cc_sa_title" : "Share Alike", |
32 | 32 | "mwe-cc_pd_title" : "Public Domain", |
33 | 33 | "mwe-unknown_license" : "Unknown license", |
34 | | - "mwe-no_import_by_url" : "This user or wiki <b>can not<\/b> import assets from remote URLs.<p>Do you need to login?<\/p><p>If permissions are set, you may have to enable <a href=\"http:\/\/www.mediawiki.org\/wiki\/Manual:$wgAllowCopyUploads\">$wgAllowCopyUploads<\/a>.<\/p>", |
| 34 | + "mwe-no_import_by_url" : "This user or wiki <b>can not<\/b> import assets from remote URLs.<p>Do you need to login?<\/p><p>Is upload_by_url permission set for you?<\/br> Do you need may have to enable <a href=\"http:\/\/www.mediawiki.org\/wiki\/Manual:$wgAllowCopyUploads\">$wgAllowCopyUploads<\/a>.<\/p>", |
35 | 35 | "mwe-results_from" : "Results from <a href=\"$1\" target=\"_new\" >$2<\/a>", |
36 | 36 | "mwe-missing_desc_see_source" : "This asset is missing a description. Please see the [$1 orginal source] and help describe it.", |
37 | 37 | "rsd_config_error" : "Add media wizard configuration error: $1", |
— | — | @@ -46,7 +46,13 @@ |
47 | 47 | "mwe-importing_asset" : "Importing asset", |
48 | 48 | "mwe-preview_insert_resource" : "Preview insert of resource: $1", |
49 | 49 | "mwe-checking-resource": "Checking for resource", |
50 | | - "mwe-resource-needs-import": "Resource $1 needs to be imported" |
| 50 | + "mwe-resource-needs-import": "Resource $1 needs to be imported", |
| 51 | + "mwe-ftype-svg" : "SVG vector file", |
| 52 | + "mwe-ftype-jpg" : "JPEG image file", |
| 53 | + "mwe-ftype-png" : "PNG image file", |
| 54 | + "mwe-ftype-oga" : "Ogg audio file", |
| 55 | + "mwe-ftype-ogg" : "Ogg video file", |
| 56 | + "mwe-ftype-unk" : "Unknown File Format" |
51 | 57 | }); |
52 | 58 | |
53 | 59 | var default_remote_search_options = { |
— | — | @@ -269,6 +275,37 @@ |
270 | 276 | '</a>'+ |
271 | 277 | '</div>'; |
272 | 278 | }, |
| 279 | + /** |
| 280 | + * getTypeIcon |
| 281 | + * @param str mime type of the reqeusted file |
| 282 | + */ |
| 283 | + getTypeIcon:function( mimetype) { |
| 284 | + var typestr = 'unk'; |
| 285 | + switch( mimetype ){ |
| 286 | + case 'image/svg+xml': |
| 287 | + typestr = 'svg'; |
| 288 | + break; |
| 289 | + case 'image/jpeg': |
| 290 | + typestr = 'jpg' |
| 291 | + break; |
| 292 | + case 'image/png': |
| 293 | + typestr = 'png'; |
| 294 | + break; |
| 295 | + case 'audio/ogg': |
| 296 | + typestr = 'oga'; |
| 297 | + case 'video/ogg': |
| 298 | + case 'application/ogg': |
| 299 | + typestr = 'ogg'; |
| 300 | + break; |
| 301 | + } |
| 302 | + |
| 303 | + if(typestr=='unk') |
| 304 | + js_log("unkown ftype: " + mimetype ); |
| 305 | + |
| 306 | + return '<div class="rsd_file_type ui-corner-all ui-state-default ui-widget-content" title="' + gM('mwe-ftype-' + typestr) + '">' + |
| 307 | + typestr + |
| 308 | + '</div>' |
| 309 | + }, |
273 | 310 | /* |
274 | 311 | * getLicenceKeyFromKey |
275 | 312 | * @param license_key the key of the license (must be defined in: this.licenses.cc.licenses) |
— | — | @@ -966,9 +1003,16 @@ |
967 | 1004 | o+='<a target="_new" style="position:absolute;top:0px;right:0px" title="' + |
968 | 1005 | gM('mwe-resource_description_page') + |
969 | 1006 | '" href="' + rItem.link + '"><img src="http://upload.wikimedia.org/wikipedia/commons/6/6b/Magnify-clip.png"></a>'; |
| 1007 | + |
| 1008 | + //add file type icon if known |
| 1009 | + if( rItem.mime ){ |
| 1010 | + o+= _this.getTypeIcon( rItem.mime ); |
| 1011 | + } |
| 1012 | + |
970 | 1013 | //add license icons if present |
971 | 1014 | if( rItem.license ) |
972 | 1015 | o+= _this.getlicenseImgSet( rItem.license ); |
| 1016 | + |
973 | 1017 | o+='</div>'; |
974 | 1018 | }else if(_this.result_display_mode == 'list'){ |
975 | 1019 | o+='<div id="mv_result_' + rInx + '" class="mv_clip_list_result" style="width:90%">'; |
Index: trunk/phase3/js2/mwEmbed/skins/mvpcf/styles.css |
— | — | @@ -505,10 +505,17 @@ |
506 | 506 | #rsd_resource_edit{ |
507 | 507 | z-index:2; |
508 | 508 | } |
| 509 | +.rsd_file_type{ |
| 510 | + position : absolute; |
| 511 | + bottom : 0px; |
| 512 | + left : 3px; |
| 513 | + font-size: x-small; |
| 514 | + background:#FFF; |
| 515 | +} |
509 | 516 | .rsd_license{ |
510 | | - position:absolute; |
511 | | - bottom:0px; |
512 | | - left:0px; |
| 517 | + position : absolute; |
| 518 | + bottom : 0px; |
| 519 | + right : 0px; |
513 | 520 | } |
514 | 521 | .rsd_license img{ |
515 | 522 | float:left; |