buttons: _this.cancel_button()
});
$j('#upProgressDialog').html(
- //set initial content:
+ //set initial content:
'<div id="up-pbar-container" style="width:90%;height:15px;" >' +
- '<div id="up-progressbar" style="height:15px;"></div>' +
+ '<div id="up-progressbar" style="height:15px;"></div>' +
'<div id="up-status-container">'+
'<span id="up-pstatus">0% - </span> ' +
'<span id="up-status-state">' + gM('mwe-uploaded-status') + '</span> ' +
}
}
};
+
+//add some jquery bindings:
+(function($) {
+ /**
+ * doDestCheck checks the destination
+ */
+ $.fn.doDestCheck = function( opt ){
+ var _this = this;
+ var destFile = this.selector;
+ //set up option defaults;
+ if(!opt.warn_target)
+ opt.warn_target = '#wpDestFile-warning';
+
+ //empty target warn:
+ $j(opt.warn_target).empty();
+
+ //show loading
+ $j(destFile).after('<img id = "mw-spinner-wpDestFile" src ="'+ stylepath + '/common/images/spinner.gif" />');
+ //try and get a thumb of the current file (check its destination)
+ do_api_req({
+ 'data':{
+ 'titles': 'File:' + $j(destFile).val(),//@@todo we may need a more clever way to get a the filename
+ 'prop': 'imageinfo',
+ 'iiprop':'url|mime|size',
+ 'iiurlwidth': 150
+ }
+ },function(data){
+ //remove spinner:
+ $j('#mw-spinner-wpDestFile').remove();
+ if(data && data.query && data.query.pages){
+ if( data.query.pages[-1] ){
+ //all good no file there
+ }else{
+ for(var page_id in data.query.pages){
+ var ntitle = ( data.query.normalized)? data.query.normalized[0].to : data.query.pages[ page_id ].title
+ var img = data.query.pages[ page_id ].imageinfo[0];
+ $j('#wpDestFile-warning').html(
+ '<ul>' +
+ '<li>'+
+ gM('mwe-fileexists', ntitle) +
+ '</li>'+
+ '<div class="thumb tright">' +
+ '<div style="width: ' + ( parseInt(img.thumbwidth)+2 ) + 'px;" class="thumbinner">' +
+ '<a title="' + ntitle + '" class="image" href="' + img.descriptionurl + '">' +
+ '<img width="' + img.thumbwidth + '" height="' + img.thumbheight + '" border="0" class="thumbimage" ' +
+ 'src="' + img.thumburl + '"' +
+ ' alt="' + ntitle + '"/>' +
+ '</a>' +
+ '<div class="thumbcaption">' +
+ '<div class="magnify">' +
+ '<a title="' + gM('thumbnail-more') + '" class="internal" ' +
+ 'href="' + img.descriptionurl +'"><img width="15" height="11" alt="" ' +
+ 'src="' + stylepath + "/common/images/magnify-clip.png\" />" +
+ '</a>'+
+ '</div>'+
+ gM('mwe-fileexists-thumb') +
+ '</div>' +
+ '</div>'+
+ '</div>' +
+ '</ul>'
+ );
+ }
+ }
+ }
+ });
+ }
+})(jQuery);
+
var go_to_url_txt = gM('mwe-go-to-resource');
if( typeof _this.done_upload_cb == 'function' ){
//if done action return 'true'
- if( _this.done_upload_cb() ){
+ if( _this.done_upload_cb( _this.formData ) ){
//update status
_this.updateProgressWin( gM('mwe-successfulupload'), gM( 'mwe-upload_done', apiResult.resultUrl),buttons);
}else{
"no_import_by_url" : "This user or wiki <b>can not<\/b> import assets from remote URLs.<\/p><p>Do you need to login?<\/p><p>If permissions are set, you may have to enable $wgAllowCopyUploads (<a href=\"http : \/\/www.mediawiki.org\/wiki\/Manual : $wgAllowCopyUploads\">more information<\/a>).<\/p>",
"results_from" : "Results from <a href=\"$1\" target=\"_new\" >$2<\/a>",
"missing_desc_see_soruce" : "This asset is missing a description. Please see the [$1 orginal source] and help describe it.",
- "rsd_config_error" : "Add media wizard configuration error : $1"
+ "rsd_config_error" : "Add media wizard configuration error : $1",
+ "uploaded_itmes" : "Uploaded Items:"
});
var default_remote_search_options = {
'profile':'mediawiki_edit',
'lib' : 'mediaWiki',
'local' : true,
'tab_img': false
- },
+ },
'wiki_commons':{
'enabled': 1,
'checked': 1,
//set the form action based on domain:
if( parseUri( document.URL ).host == parseUri( _this.upload_api_target ).host ){
mvJsLoader.doLoad(['$j.fn.simpleUploadForm'],function(){
- //deal with the api form upload form directly:
- $j('#tab-upload').simpleUploadForm({
- "api_target" : _this.upload_api_target ,
- "ondone_cb" : function( resultData ){
- var cat = resultData;
- debugger;
- return false;
- }
- })
+
+ //get extened info about the file
+ var cp = _this.content_providers['this_wiki'];
+ //check for "this_wiki" enabled
+ if(!cp.enabled){
+ $j('#tab-upload').html('error this_wiki not enabled (can\'t get uploaded file info)');
+ return false;
+ }
+
+ //load this_wiki search system to grab the rObj
+ _this.loadSearchLib(cp, function(){
+ //do basic layout form on left upload "bin" on right
+ $j('#tab-upload').html('<table>' +
+ '<tr>' +
+ '<td style="width:350px;padding:10px" id="upload_form">' + mv_get_loading_img() +'</td>' +
+ '<td valign="top" id="upload_bin"></td>' +
+ '</tr>' +
+ '</table>');
+
+
+ //fill in the user page:
+ if(typeof wgUserName != 'undefined' && wgUserName){
+ //load the upload bin with anything the current user has uploaded
+ cp.sObj.getUserRecentUploads( wgUserName, function(){
+ _this.drawOutputResults();
+ });
+ }else{
+ $j('#upload_bin').empty();
+ }
+
+ //deal with the api form upload form directly:
+ $j('#upload_form').simpleUploadForm({
+ "api_target" : _this.upload_api_target ,
+ "ondone_cb" : function( resultData ){
+ var wTitle = resultData['wpDestFile'];
+ //add a loading div
+ $j( _this.target_container ).append('<div id="temp_edit_loader" '+
+ 'style="position:absolute;top:0px;left:0px;bottom:5px;right:4px;background-color:#FFF;">' +
+ mv_get_loading_img('position:absolute;top:30px;left:30px') +
+ '</div>');
+ cp.sObj.getRObjByTitle( wTitle, function( rObj ){
+ $j( _this.target_container ).find('#temp_edit_loader').remove();
+ //append the image to the upload bin
+ });
+ //return false to close progress window:
+ return false;
+ }
+ })
+ });
});
}else{
//setup the proxy
$j('#tab-' + this.disp_item).html( '<div style="padding:10px">'+ gM('no_import_by_url') +'</div>');
}
return false;
- }
+ }
+ _this.loadSearchLib(cp, function(){
+ //do search
+ cp.sObj.getSearchResults();
+ _this.checkResultsDone();
+ });
+ },
+ loadSearchLib:function(cp, callback){
+ var _this = this;
//set up the library req:
mvJsLoader.doLoad( [
'baseRemoteSearch',
cp.lib +'Search'
], function(){
- js_log("loaded .. disp is: " + _this.disp_item);
+ js_log("loaded lib:: " + cp.lib );
//else we need to run the search:
var iObj = {'cp':cp, 'rsd':_this};
eval('cp.sObj = new '+cp.lib+'Search( iObj );');
- if(!cp.sObj)
+ if(!cp.sObj){
js_log('Error: could not find search lib for ' + cp_id);
+ return false;
+ }
//inherit defaults if not set:
cp.limit = (cp.limit) ? cp.limit : cp.sObj.limit;
cp.offset = (cp.offset) ? cp.offset : cp.sObj.offset;
-
- //do search
- cp.sObj.getSearchResults();
- _this.checkResultsDone();
+ callback();
});
},
/* check for all the results to finish */
js_log('f:drawOutputResults::' + this.disp_item);
var _this = this;
var o='';
-
+
var cp_id = this.disp_item;
- var cp = this.content_providers[this.disp_item];
-
+ var tab_target = '';
+ if(this.disp_item == 'upload'){
+ tab_target = '#upload_bin';
+ var cp = this.content_providers['this_wiki'];
+ }else{
+ var cp = this.content_providers[this.disp_item];
+ tab_target = '#tab-' + cp_id;
+ }
//empty the existing results:
- $j('#tab-' + cp_id).empty();
+ $j(tab_target).empty();
//output the results bar / controls
_this.setResultBarControl();
});
js_log('append to: ' + '#tab-' + cp_id);
//put in the tab output (plus clear the output)
- $j('#tab-' + cp_id).append( o + '<div style="clear:both"/>');
+ $j(tab_target).append( o + '<div style="clear:both"/>');
}
js_log( ' drawResultCount :: ' + drawResultCount + ' append: ' + $j('#rsd_q').val() );
_this.resourceEdit( rObj, this );
});
},
+ addResourceEditLoader:function(maxWidth, overflow_style){
+ var _this = this;
+ if(!maxWidth)maxWidth=400;
+ if(!overflow_style)overflow_style='overflow:auto;';
+ //hide the results container
+ $j('#rsd_results_container').hide();
+ //remove any old instance:
+ $j( _this.target_container ).find('#rsd_resource_edit').remove();
+ //add the edit layout window with loading place holders
+ $j( _this.target_container ).append('<div id="rsd_resource_edit" '+
+ 'style="position:absolute;top:0px;left:0px;bottom:5px;right:4px;background-color:#FFF;">' +
+ '<div id="clip_edit_disp" style="position:absolute;' + overflow_style + 'width:100%;height:100%;padding:5px;'+
+ 'width:' + (maxWidth) + 'px;" >' +
+ mv_get_loading_img('position:absolute;top:30px;left:30px') +
+ '</div>'+
+ '<div id="clip_edit_ctrl" class="ui-widget ui-widget-content ui-corner-all" style="position:absolute;'+
+ 'left:' + ( maxWidth + 10 ) +'px;top:5px;bottom:10px;right:0px;overflow:auto;padding:5px;">'+
+ mv_get_loading_img() +
+ '</div>'+
+ '</div>');
+ },
resourceEdit:function( rObj, rsdElement){
js_log('f:resourceEdit:' + rObj.title);
var _this = this;
//so that transcripts show ontop
var overflow_style = ( mediaType =='video' )?'':'overflow:auto;';
//append to the top level of model window:
- $j( _this.target_container ).append('<div id="rsd_resource_edit" '+
- 'style="position:absolute;top:0px;left:0px;bottom:5px;right:4px;background-color:#FFF;">' +
- '<div id="clip_edit_disp" style="position:absolute;' + overflow_style + 'width:100%;height:100%;padding:5px;'+
- 'width:' + (maxWidth) + 'px;" >' +
- mv_get_loading_img('position:absolute;top:30px;left:30px') +
- '</div>'+
- '<div id="clip_edit_ctrl" class="ui-widget ui-widget-content ui-corner-all" style="position:absolute;'+
- 'left:' + ( maxWidth + 10 ) +'px;top:5px;bottom:10px;right:0px;overflow:auto;padding:5px;">'+
- mv_get_loading_img() +
- '</div>'+
- '</div>');
+ _this.addResourceEditLoader(maxWidth, overflow_style);
//update add media wizard title:
$j( _this.target_container ).dialog( 'option', 'title', gM('add_media_wizard')+': '+ gM('rsd_resource_edit', rObj.title ) );
js_log('did append to: '+ _this.target_container );
var _this = this;
var b_target = _this.target_container + '~ .ui-dialog-buttonpane';
$j('#rsd_resource_edit').remove();
+ //restore the resource container:
+ $j('#rsd_results_container').show();
//restore the title:
$j( _this.target_container ).dialog( 'option', 'title', gM('add_media_wizard'));
js_log("should update: " + b_target + ' with: cancel');
//@@todo try to load over ajax if( _this.local_wiki_api_url ) is set
// (your on the api domain but are inserting from a normal page view)
if( _this.local_wiki_api_url){
-
+ get_mw_token(null, _this.local_wiki_api_url, function(token){
+ callback( token );
+ })
}
+ callback(false);
+ return false;
},
/**
* doImportSpecialPage
}
}
//inherit the cp settings for
+ },
+ //returns a rObj by title
+ getRObjByTitle:function( title , callback){
+ var _this = this;
+ var reqObj = {
+ 'action':'query',
+ 'titles':'File:'+title,
+ 'prop':'imageinfo|revisions|categories',
+ 'iiprop':'url|mime|size',
+ 'iiurlwidth': parseInt( this.rsd.thumb_width ),
+ 'rvprop':'content'
+ }
+ do_api_req( {
+ 'data':reqObj,
+ 'url':this.cp.api_url
+ }, function(data){
+ _this.clearResults();
+ //get results with rObj callback
+ _this.addResults(data);
+ //should only be one value:
+ for(var i in _this.resultsObj){
+ callback( _this.resultsObj[i] );
+ break;
+ }
+ }
+ );
+ },
+ clearResults:function(){
+ this.resultsObj = {};
+ this.last_query ='';
},
+ //update the resultObj with recently uploaded items by current User:
+ getUserRecentUploads:function(wgUser, callback){
+ var _this = this;
+ do_api_req({
+ 'data':{
+ 'action':'query',
+ 'list':'recentchanges',
+ 'rcnamespace':6, //only files
+ 'rcuser': wgUser,
+ 'rclimit':15, //get last 15 uploaded files
+ },
+ 'url':this.cp.api_url
+ },function(data){
+ var titleSet = {};
+ var titleStr=''
+ var pound='';
+ //loop over the data and group by title
+ if(data.query && data.query.recentchanges){
+ for(var i in data.query.recentchanges){
+ var rc = data.query.recentchanges[i];
+ if( !titleSet[ rc.title ] ){
+ titleSet[ rc.title ]=true;
+ titleStr+= pound + rc.title;
+ pound ='|';
+ }
+ }
+ }
+ //now run the actual query ( too bad we cant use recentchanges as a gennerator
+ do_api_req({
+ 'data' : {
+ 'action':'query',
+ 'titles':titleStr,
+ 'prop':'imageinfo|revisions|categories',
+ 'iiprop':'url|mime|size',
+ 'iiurlwidth': parseInt( _this.rsd.thumb_width ),
+ 'rvprop':'content'
+ },
+ 'url':_this.cp.api_url
+ },function(data){
+ _this.clearResults();
+ _this.addResults(data);
+ if(callback)
+ callback();
+ });
+ });
+ },
getSearchResults:function(){
//call parent:
this.parent_getSearchResults();
if( typeof data['query-continue'].search != 'undefined')
this.more_results = true;
}
- //make sure we have pages to iderate:
-
+ //make sure we have pages to iderate:
if(data.query && data.query.pages){
for(var page_id in data.query.pages){
var page = data.query.pages[ page_id ];
}
//make sure the page is not a redirect
- if(page.revisions[0]['*'].indexOf('#REDIRECT')===0){
+ if(page.revisions[0]['*'] && page.revisions[0]['*'].indexOf('#REDIRECT')===0){
//skip page is redirect
continue;
}
//skip if its an empty or missing imageinfo:
if( !page.imageinfo )
continue;
-
- this.resultsObj[page_id]={
+ var rObj = {
'titleKey' : page.title,
'link' : page.imageinfo[0].descriptionurl,
'title' : page.title.replace(/File:|.jpg|.png|.svg|.ogg|.ogv|.oga/ig, ''),
'meta':{
'categories':page.categories
}
- }
+ };
+
//attempt to parse out some stuff from the teplate:
- var desc = this.resultsObj[page_id].desc.match(/\|Description=(([^\n]*\n)*)\|Source=/)
+ var desc = rObj.desc.match(/\|Description=(([^\n]*\n)*)\|Source=/)
if( desc && desc[1] ){
- this.resultsObj[page_id].desc = $j.trim( desc[1] );
- }
-
-
+ rObj.desc = $j.trim( desc[1] );
+ }
//likely a audio clip if no poster and type application/ogg
//@@todo we should return audio/ogg for the mime type or some other way to specify its "audio"
- if( ! this.resultsObj[page_id].poster && this.resultsObj[page_id].mime == 'application/ogg' ){
- this.resultsObj[page_id].mime = 'audio/ogg';
- }
+ if( ! rObj.poster && rObj.mime == 'application/ogg' ){
+ rObj.mime = 'audio/ogg';
+ }
+
+ this.resultsObj[page_id]= rObj;
this.num_results++;
//for(var i in this.resultsObj[page_id]){
}
}else{
js_log('no results:' + data);
- }
+ }
},
//check request done used for when we have multiple requests to check before formating results.
checkRequestDone:function(){
return false;
}
- //build the api based upload form:
- var o = '<div style="margin: 0 auto;width:450px;">'+
+ //build an upload form:
+ var o = ''+
'<form id="suf-upload" enctype="multipart/form-data" action="' + opt.api_target + '" method="post">' +
//hidden input:
'<input type="hidden" name="action" value="upload">'+
'<input type="hidden" name="format" value="jsonfm">'+
'<input type="hidden" name="token" value="'+ eToken +'">' +
- //api form name set:
- '<label for="file">' + gM('select_file') + '</label><br>'+
- '<input type="file" style="display: inline;" name="file" size="15"/><br>' +
+ //form name set:
+ '<label for="wpUploadFile">' + gM('select_file') + '</label><br>'+
+ '<input type="file" style="display: inline;" name="wpUploadFile" size="15"/><br>' +
- '<label for="filename">' +gM('destfilename') + '</label><br>'+
- '<input type="text" name="filename" size="30" /><br>'+
-
- '<label for="comment">' + gM('summary') + ':</label><br>' +
- '<textarea cols="30" rows="3" name="comment" tabindex="3"/><br>'+
+ '<label for="wpDestFile">' +gM('destfilename') + '</label><br>'+
+ '<input type="text" name="wpDestFile" size="30" /><br>'+
+ '<label for="wpUploadDescription">' + gM('summary') + ':</label><br>' +
+ '<textarea cols="30" rows="3" name="wpUploadDescription" tabindex="3"/><br>'+
+
+ '<div id="wpDestFile-warning"></div>' +
+
gM('select_ownwork') + '<br>' +
'<input type="checkbox" id="wpLicence" name="wpLicence" value="cc-by-sa">' + gM('licence_cc-by-sa') + '<br>' +
'<input type="submit" accesskey="s" value="' + gM('upload') + '" name="wpUploadBtn" id="wpUploadBtn" tabindex="9"/>' +
//close the form and div
- '</form></div>';
+ '</form>';
//set the target with the form output:
$( _this.selector ).html( o );
//by default dissable:
$j('#wpUploadBtn').attr('disabled', 'disabled');
- //set up basic binding:
+ //set up basic licence binding:
$j('#wpLicence').click(function(){
if( $j(this).is(':checked') ){
$j('#wpUploadBtn').removeAttr('disabled');
opt.ondone_cb = false;
//set up the binding per the config
- if( opt.enable_fogg ){
- $j('#wpUploadFile').firefogg({
+ if( opt.enable_fogg ){
+ $j("#suf-upload [name='wpUploadFile']").firefogg({
//an api url (we won't submit directly to action of the form)
'api_url' : opt.api_target,
'form_rewrite': true,
'target_edit_from' : '#suf-upload',
'new_source_cb' : function( orgFilename, oggName ){
- $j('#wpDestFile').val( oggName );
- //@@TODO:
- //mwUploadHelper.doDestCheck();
+ $j("#suf-upload [name='wpDestFile']").val( oggName ).doDestCheck({
+ warn_target: "#wpDestFile-warning"
+ });
},
'done_upload_cb' : opt.ondone_cb
});
- }else{
- //simple web form rewrite
}
});
}
"download_clip" : "Download video",
"download_text" : "Download text (<a style=\"color:white\" title=\"cmml\" href=\"http:\/\/wiki.xiph.org\/index.php\/CMML\">CMML<\/a> xml):",
"download" : "Download",
- "share" : "Share",
+ "share" : "Share",
"credits" : "Credits",
"clip_linkback" : "Clip source page",
"chose_player" : "Choose Video Player",
"mv_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 \/>",
"mv_for_best_experience" : "For a better video playback experience we recommend:<br \/><b><a href=\"http:\/\/www.mozilla.com\/en-US\/firefox\/upgrade.html?from=mwEmbed\">Firefox 3.5<\/a>.<\/b>",
"mv_do_not_warn_again" : "Dissmiss for now.",
- "playerselect" : "Players"
+ "playerselect" : "Players",
+ "read_before_embed": 'Please <a href="http://mediawiki.org/wiki/Security_Notes_on_Remote_Embedding" target="_new">Read This</a> before embeding!',
+ "embed_site_or_blog": "Embed on your site or blog"
});
var default_video_attributes = {
showShare:function($target){
var embed_code = this.getEmbeddingHTML();
var o = '';
- //@todo: hook events to two a's for swapping in and out code for link vs. embed;
- // hook events for changing active class of li based on a.
- o+= '<h2>Share This Video</h2>\n' +
+ //@todo: hook events to two a's for swapping in and out code for link vs. embed;
+ // hook events for changing active class of li based on a.
+ o+= '<h2>' + gM('share_this_video') + '</h2>\n' +
' <ul>\n' +
- ' <li><a href="#" id="k-share-embed" class="active">Embed on your site or blog</a></li>\n';
+ ' <li><a href="#" id="k-share-embed" class="active">'+gM('embed_site_or_blog')+'</a></li>\n';
if(this.linkback) {
- o+= ' <li><a href="#" id="k-share-link">' + this.linkback + '</a></li>\n';
- }
+ o+= ' <li><a href="#" id="k-share-link">' + this.linkback + '</a></li>\n';
+ }
o+= ' </ul>\n' +
' <div class="k_field_wrap"><textarea>' + embed_code + '</textarea></div>\n' +
' <button class="ui-state-default ui-corner-all"> Copy Code </button>\n' +
- ' <div class="ui-state-highlight ui-corner-all"><a href="http://metavid.org/wiki/Security_Notes_on_Remote_Embedding" target="_blank">' +
- 'Read This</a> before embeding!</div>\n' +
+ ' <div class="ui-state-highlight ui-corner-all">'+gM('read_before_embed') + '</div>\n' +
'</div>'
// '<textarea onClick="this.select();" id="embedding_user_html_' + this.id + '" name="embed">' +
var this_id = (this.pc!=null)?this.pc.pp.id:this.id;
if(this.muted){
this.muted=false;
- $j( '#volume_control_' + this_id + ' span').removeClass('ui-icon-volume-off').addClass('ui-icon-volume-on');
- $j( '#volume_bar_' + this_id).slider('value', 100);
+ $j( '#'+ this_id + ' .volume_control span').removeClass('ui-icon-volume-off').addClass('ui-icon-volume-on');
+ $j( '#'+ this_id + ' .volume_bar' ).slider('value', 100);
this.updateVolumen(1);
}else{
this.muted=true;
- $j('#volume_control_'+this_id + ' span').removeClass('ui-icon-volume-on').addClass('ui-icon-volume-off');
- $j('#volume_bar_'+this_id).slider('value', 0);
+ $j( '#'+ this_id + ' .volume_control span').removeClass('ui-icon-volume-on').addClass('ui-icon-volume-off');
+ $j( '#'+ this_id + ' .volume_bar' ).slider('value', 0);
this.updateVolumen(0);
}
js_log('f:toggleMute::' + this.muted);
* @@ more config valuse on the way ;)
*/
var defaultMwConfig = {
- 'skin_name': 'kskin',
+ 'skin_name': 'mvpcf',
'jui_skin': 'redmond',
'video_size':'400x300'
}
this.callbacks.push(callback);
}
if( this.checkLoading() ){
- if( this.load_time++ > 1000){ //time out after ~80seconds
+ if( this.load_time++ > 2000){ //time out after ~80seconds
js_error( gM('error_load_lib') + this.missing_path );
- this.load_error=true;
+ this.load_error = true;
}else{
setTimeout( 'mvJsLoader.doLoad()', 20 );
}
});
} },
checkLoading:function(){
- var loading=0;
+ var loading=0;
var i=null;
for(var i in this.libs){ //for in loop oky on object
if( !this.checkObjPath( i ) ){
$j('#dc_'+ embedObj.id).hover(
function(){
if($j('#gnp_' + embedObj.id).length==0){
- $j(this).append('<div id="gnp_' + embedObj.id + '" class="ui-state-highlight ui-corner-all" ' +
+ $j(this).append('<div id="gnp_' + embedObj.id + '" class="ui-state-highlight ui-corner-all gnp-warning" ' +
'style="position:absolute;display:none;background:#FFF;top:10px;left:10px;right:10px;height:60px;">' +
gM('mv_for_best_experience') +
'<br><input id="ffwarn_'+embedObj.id+'" type=\"checkbox\">' +
});
//options binding:
- $j('#options_button_' + embedObj.id).unbind().btnBind().click(function(){
- $j('#' +embedObj.id).get(0).doOptionsHTML();
- });
+ //$j('#options_button_' + embedObj.id).unbind().btnBind().click(function(){
+ // $j('#' +embedObj.id).get(0).doOptionsHTML();
+ //});
//fullscreen binding:
- $j('#fullscreen_' + embedObj.id).unbind().btnBind().click(function(){
+ $tp.find('.k-fullscreen').unbind().btnBind().click(function(){
$j('#' +embedObj.id).get(0).fullscreen();
});
value: 80,
min: 0,
max: 100,
- slide: function(event, ui) {
- embedObj.updateVolumen(ui.value/100);
- },
+ slide: function(event, ui) {
+ embedObj.updateVolumen(ui.value/100);
+ },
change: function(event, ui){
var level = ui.value/100;
if (level==0) {
}
//options menu display:
- $tp.find('.k-options').click(function(){
- if($j('#' + embedObj.id + ' .k-menu').length == 0 )
+ $tp.find('.k-options').click(function(){
+ if($j('#' + embedObj.id + ' .k-menu').length == 0 ){
+ //stop the player if it does not support overlays:
+ if(!embedObj.supports['overlays'])
+ $tp.get(0).stop();
+ //add the options
addMvOptions();
+ }
//set up the text and menu:
- var $ktxt = $j(this).find('.ui-icon-k-menu');
+ var $ktxt = $j(this);
var $kmenu = $tp.find('.k-menu');
if( $kmenu.is(':visible') ){
$kmenu.fadeOut("fast",function(){
});
//volume binding:
- $tp.find('.k-volume').unbind().btnBind().click(function(){
- $tp.toggleMute();
+ $tp.find('.k-volume').unbind().btnBind().click(function(){
+ $tp.get(0).toggleMute();
});
var hoverOverDelay=false;
'volume_control':{
'w':40,
'o':function(){
- return '<button class="ui-state-default ui-corner-all k-volume">' +
+ return '<button class="ui-state-default ui-corner-all k-volume_control">' +
'<span class="ui-icon ui-icon-volume-on"></span>' +
'</button>' +
'<div class="ui-slider ui-slider-horizontal k-volume-slider"></div>';
.k-control-bar button, .k-control-bar div.ui-slider, .k-control-bar div.k-timer { float:left;}\r
.k-timer { margin-top:2px;}\r
.k-volume-slider { width:26px;}\r
-.k-control-bar .k-options { width:50px; height:22px; text-transform:uppercase; margin-top:-2px; border: solid 1px #aaa; border-top:none; float:right; font: bold 11px arial,sans-serif; color:#555;}\r
+.k-control-bar .k-options { width:50px; height:22px; text-transform:uppercase; margin-top:-2px; border: solid 1px #aaa; border-top:none; float:right; font: bold 11px arial,sans-serif; color:#555;}
+\r
span.ui-icon.ui-icon-k-menu { width:auto; padding-left:2px; background:none; outline:none; cursor:default;}\r
-.k-menu { z-index:1; width:400px; height:300px; background:#181818; position:absolute;opacity:0.9;filter:alpha(opacity=90); top:0px; left:0px; display:none} /* h, w, top inline via jq top:15px*/\r
+.k-menu { opacity:0.9; filter:alpha(opacity=90); z-index:1; width:400px; height:300px; background:#181818; position:absolute; top:0px; left:0px;} /* h, w, top inline via jq top:15px*/\r
ul.k-menu-bar{ height:128px; padding: 0 0 5px;position:absolute; bottom:5px;right:0px; list-style: none outside none; background: url(images/ksprite.png) -99px -104px no-repeat;} /* eventually: mtop inline via jq */\r
.k-menu-bar li a { display:block; width:49px; height:32px; margin-left:1px; text-indent:99999px; background: url(images/ksprite.png) -51px -110px no-repeat; overflow:hidden;}\r
.k-menu-bar li a:hover { background-position: -1px -110px;}\r
+
.k-menu-bar li.k-download-btn a { background-position: -51px -203px;}\r
.k-menu-bar li.k-download-btn a:hover { background-position: -1px -203px;}
\r
\r
.k-menu-bar li.k-credits-btn a { background-position: -51px -141px;}\r
.k-menu-bar li.k-credits-btn a:hover { background-position: -1px -141px;}\r
+
+
\r
.k-menu-screens { width:320px; padding: 13px 10px 15px 15px; float:left;} /* w & h inline via jq */\r
.k-menu-screens h2 { padding: 0 0 5px 1px; clear:both; font-size:12px; color:#666;}\r
.k-menu-screens li a:hover { background-position: -85px -260px;}\r
\r
.k-options.ui-state-hover { color:blue;}
+
+.k-player .ui-state-default .ui-icon, .k-player .ui-state-hover .ui-icon {background:transparent url(images/ksprite.png) no-repeat scroll 0 -48px;}
\r
.k-player .ui-state-default .ui-icon-arrow-4-diag { background-position: 0 -32px;} /* fullscreen */\r
.k-player .ui-state-hover .ui-icon-arrow-4-diag { background-position: -16px -32px;}\r
.k-player .ui-state-default .ui-icon-volume-on, .ui-state-hover .ui-icon-volume-off, { margin-left:-6px; background-position: -16px -48px;}\r
.k-player .ui-state-hover .ui-icon-volume-on, .ui-state-default .ui-icon-volume-off { margin-left:-6px; background-position: 0 -48px;}\r
+.k-player .ui-state-default .ui-icon-play { background:url(images/ksprite.png) no-repeat 0 0;}
+.k-player .ui-state-hover .ui-icon-play { background-position: -16px 0;}
+
+.k-player .ui-state-default .ui-icon-pause { background:url(images/ksprite.png) no-repeat 0 -17px;}
+.k-player .ui-state-hover .ui-icon-pause { background-position: -16px -17px;}
+
.k-control-bar .ui-slider { height:8px; border: solid 1px #eee; margin: 4px 10px 0 7px; position:relative; background:url(images/ksprite.png) repeat-x 0 -350px;}\r
.k-control-bar .ui-slider-handle { width:8px; height:8px; top:0px; border: solid 1px #888; margin: -1px 0 0 -5px; display:block; position:relative; background: url(images/ksprite.png) no-repeat -67px -341px; position:absolute;}\r
.k-control-bar .ui-slider-range { height:8px; position:absolute; background: url(images/ksprite.png) repeat-x 0 -368px; -moz-border-radius:5px; -webkit-border-radius:5px;}
.k-player { width:400px; height:340px; position:relative;} /* inline via jq */
.k-player * { padding:0; margin:0;} /* inline via jq */
- .k-edit-bar { }
- .k-edit-bar a { width:33px; padding: 1px 0 0; display:block; text-align:center; font-weight:bold; color:#888; text-decoration:none; background:#F2F2F2;}
-
- .k-video { width:400px; height:300px; background:#000; margin-bottom:1px;} /* h & w inline via jq */
- .k-control-bar { height:21px; padding: 2px 0 0 6px; border:none; margin-top:1px; background: url(images/ksprite.png) repeat-x 0 -81px; font: normal 11px arial,sans-serif; color:#555;}
- .k-control-bar button, .k-control-bar div.ui-slider, .k-control-bar div.k-timer { float:left;}
- .k-timer { width:36px; margin-top:2px; overflow:hidden;}
- .k-volume-slider { width:26px;}
- .k-control-bar .k-options { width:50px; height:22px; margin-top:-2px; border: solid 1px #aaa !important; border-top:none; float:right; font: bold 11px arial,sans-serif; color:#555;}
- .k-player span.ui-icon.ui-icon-k-menu { width:auto; padding-left:2px; text-indent:0; background:none; outline:none; cursor:default;}
-
- .k-menu { width:400px; height:300px; border:none; background:#181818; position:absolute; top:0; left:0; z-index:999; display:none} /* h, w, top inline via jq top:15px*/
- ul.k-menu-bar{ height:128px; padding: 0 0 5px;position:absolute; bottom:5px;right:0px; list-style: none outside none; background: url(images/ksprite.png) -99px -104px no-repeat;} /* eventually: mtop inline via jq */
- .k-menu-bar li a { display:block; width:49px; height:32px; margin-left:1px; text-indent:99999px; background: url(images/ksprite.png) -51px -110px no-repeat; overflow:hidden;}
- .k-menu-bar li a:hover { background-position: -1px -110px;}
- .k-menu-bar li.k-download-btn a { background-position: -51px -204px;}
- .k-menu-bar li.k-download-btn a:hover { background-position: -1px -204px;}
- .k-menu-bar li.k-share-btn a { background-position: -51px -172px;}
- .k-menu-bar li.k-share-btn a:hover { background-position: -1px -172px;}
- .k-menu-bar li.k-credits-btn a { background-position: -51px -141px;}
- .k-menu-bar li.k-credits-btn a:hover { background-position: -1px -141px;}
+.k-edit-bar { }
+.k-edit-bar a { width:33px; padding: 1px 0 0; display:block; text-align:center; font-weight:bold; color:#888; text-decoration:none; background:#F2F2F2;}
+
+.k-video { width:400px; height:300px; background:#000; margin-bottom:1px;} /* h & w inline via jq */
+.k-control-bar { height:21px; padding: 2px 0 0 6px; border:none; margin-top:1px; background: url(images/ksprite.png) repeat-x 0 -81px; font: normal 11px arial,sans-serif; color:#555;}
+.k-control-bar button, .k-control-bar div.ui-slider, .k-control-bar div.k-timer { float:left;}
+.k-timer { width:36px; margin-top:2px; overflow:hidden;}
+.k-volume-slider { width:26px;}
+.k-control-bar .k-options { width:50px; height:22px; margin-top:-2px; border: solid 1px #aaa !important; border-top:none; float:right; font: bold 11px arial,sans-serif; color:#555;}
+.k-player span.ui-icon.ui-icon-k-menu { width:auto; padding-left:2px; text-indent:0; background:none; outline:none; cursor:default;}
+
+.k-menu { opacity:0.9; filter:alpha(opacity=90); width:400px; height:300px; border:none; background:#181818; position:absolute; top:0; left:0; z-index:999; display:none} /* h, w, top inline via jq top:15px*/
+ul.k-menu-bar{ height:128px; padding: 0 0 5px;position:absolute; bottom:5px;right:0px; list-style: none outside none; background: url(images/ksprite.png) -99px -104px no-repeat;} /* eventually: mtop inline via jq */
+.k-menu-bar li a { display:block; width:49px; height:32px; margin-left:1px; text-indent:99999px; background: url(images/ksprite.png) -51px -110px no-repeat; overflow:hidden;}
+.k-menu-bar li a:hover { background-position: -1px -110px;}
+.k-menu-bar li.k-download-btn a { background-position: -51px -204px;}
+.k-menu-bar li.k-download-btn a:hover { background-position: -1px -204px;}
+.k-menu-bar li.k-share-btn a { background-position: -51px -172px;}
+.k-menu-bar li.k-share-btn a:hover { background-position: -1px -172px;}
+.k-menu-bar li.k-credits-btn a { background-position: -51px -141px;}
+.k-menu-bar li.k-credits-btn a:hover { background-position: -1px -141px;}
.k-menu-screens { width:320px; padding: 13px 10px 15px 15px; float:left; font-size:11px;} /* w & h inline via jq */
- .k-menu-screens h2 { padding: 0 0 5px 1px; clear:both; font-size:12px; color:#999;}
- .k-menu-screens p { margin: 6px 0;}
- .k-menu-screens a { color:#bbb;}
- .k-menu-screens a img { border:none;}
- .k-menu-screens ul { padding:0; margin: 6px 0 0; list-style: none outside none;}
+.k-menu-screens h2 { padding: 0 0 5px 1px; clear:both; font-size:12px; color:#999;}
+.k-menu-screens p { margin: 6px 0;}
+.k-menu-screens a { color:#bbb;}
+.k-menu-screens a img { border:none;}
+.k-menu-screens ul { padding:0; margin: 6px 0 0; list-style: none outside none;}
.k-edit-screen { width:370px; height:223px; padding-top:77px; text-align:center; background:#181818; color:#fff;}
- .k-edit-screen div { }
- .k-edit-screen a { color:#7BB8FC;}
- .k-edit-screen a img { border:none;}
+.k-edit-screen div { }
+.k-edit-screen a { color:#7BB8FC;}
+.k-edit-screen a img { border:none;}
/* end player */
.k-slide-window { overflow:hidden;}
.k-screen.k-credits ul { float:left;}
.k-screen.k-credits li { height:39px; padding: 11px 11px 11px 11px; margin-bottom:12px; display:block; background:#333;}
- .k-screen.k-credits li a { padding:0; background:none;}
- .k-screen.k-credits li img { float:left; background:blue;}
- .k-screen.k-credits li div { height:39px; padding-left:11px; overflow:hidden;}
+.k-screen.k-credits li a { padding:0; background:none;}
+.k-screen.k-credits li img { float:left; background:blue;}
+.k-screen.k-credits li div { height:39px; padding-left:11px; overflow:hidden;}
- a.k-prev-credit, a.k-next-credit { width:65px; height:28px; margin: -13px auto -6px; display:block; background: url(images/ksprite.png) 0px -320px no-repeat;}
- a.k-next-credit { margin: 0 0 1px; position:absolute; bottom:0; background-position: -0px -290px;}
- a:hover.k-prev-credit { background-position: 0px -238px;}
- a:hover.k-next-credit { background-position: 0px -260px;}
+a.k-prev-credit, a.k-next-credit { width:65px; height:28px; margin: -13px auto -6px; display:block; background: url(images/ksprite.png) 0px -320px no-repeat;}
+a.k-next-credit { margin: 0 0 1px; position:absolute; bottom:0; background-position: -0px -290px;}
+a:hover.k-prev-credit { background-position: 0px -238px;}
+a:hover.k-next-credit { background-position: 0px -260px;}
- .k-logo { margin:8px 0 0 1px; display:block;}
+.k-logo { margin:8px 0 0 1px; display:block;}
- .k_field_wrap { border: solid 1px #444; padding-right:4px; margin-bottom:7px;}
- .menu-screen.menu-share button { width:84px; height:24px; padding: 0px 5px 3px; border:1px solid #000; float:right; background: #D4D4D4 url(images/ksprite.png) no-repeat 0 -81px; color:#000; float:right;}
+.k_field_wrap { border: solid 1px #444; padding-right:4px; margin-bottom:7px;}
+.menu-screen.menu-share button { width:84px; height:24px; padding: 0px 5px 3px; border:1px solid #000; float:right; background: #D4D4D4 url(images/ksprite.png) no-repeat 0 -81px; color:#000; float:right;}
- .k-menu textarea { width:100%; height:15px; padding-left:2px; border: solid 2px #000; border-bottom:none; border-right:none; line-height:125%; background:transparent; font: normal 11px arial,sans-serif; color:#ccc; overflow:hidden;}
+.k-menu textarea { width:100%; height:15px; padding-left:2px; border: solid 2px #000; border-bottom:none; border-right:none; line-height:125%; background:transparent; font: normal 11px arial,sans-serif; color:#ccc; overflow:hidden;}
+.gnp-warning { font-size: 14px; padding: 4px;}
+.k-options { text-transform: uppercase; }
- .menu-screen.menu-share div.ui-state-highlight { width:90px; padding:2px 5px; border-color:#554926; float:left; background:none; color:#FFE96E;}
- .menu-screen.menu-share div.ui-state-highlight a { color:#FFE96E; font-weight:bold;}
- .menu-screen.menu-share div.ui-state-highlight a:hover { }
+.menu-screen.menu-share div.ui-state-highlight { padding:2px 5px; border-color:#554926; float:left; background:none; color:#FFE96E;}
+.menu-screen.menu-share div.ui-state-highlight a { color:#FFE96E; font-weight:bold;}
+.menu-screen.menu-share div.ui-state-highlight a:hover { }
.k-menu-screens li { height:14px; margin-bottom:6px;}
.k-menu-screens li a { padding-left:22px; background:url(images/ksprite.png) no-repeat -85px -274px; text-decoration:none;}
.k-player .ui-state-default .ui-icon-pause { background:url(images/ksprite.png) no-repeat 0 -17px;}
.k-player .ui-state-hover .ui-icon-pause { background-position: -16px -17px;}
- .k-player .ui-state-default .ui-icon-arrow-4-diag { background-position: 0 -32px;} /* fullscreen */
- .k-player .ui-state-hover .ui-icon-arrow-4-diag { background-position: -16px -32px;}
- .k-player .ui-state-default .ui-icon-volume-on, .k-player .ui-state-hover .ui-icon-volume-off { margin-left:-6px; background-position: -16px -48px;}
- .k-player .ui-state-hover .ui-icon-volume-on, .k-player .ui-state-default .ui-icon-volume-off { margin-left:-6px; background-position: 0 -48px;}
-
- .k-control-bar .ui-slider { height:8px; border: solid 1px #eee; margin: 4px 10px 0 7px; position:relative; background:url(images/ksprite.png) repeat-x 0 -350px;}
- .k-control-bar .ui-slider-handle { width:8px; height:8px; border: solid 1px #888; margin: -1px 0 0 -5px; display:block; position:relative; top:0; background: url(images/ksprite.png) no-repeat -67px -341px; position:absolute;}
- .k-control-bar .ui-slider-range { height:8px; position:absolute; background: url(images/ksprite.png) repeat-x 0 -368px; -moz-border-radius:5px; -webkit-border-radius:5px;}
- .k-control-bar .ui-slider-buffer { height:8px; position:absolute; background: url(images/ksprite.png) repeat-x 0 -359px; -moz-border-radius:5px; -webkit-border-radius:5px;}
-
- .k-control-bar .ui-slider.k-volume-slider { height:15px; margin: 2px 3px 0 -4px; /* ie = m: 3 3 0 -2 */ border:none; background-position: -66px -323px; -moz-border-radius:0px; -webkit-border-radius:0px;}
- .k-control-bar .k-volume-slider a.ui-slider-handle { width:8px; height:18px; margin: -3px 5px 0 -1px; border:none; display:block; position:absolute; background:none;}
- .k-control-bar .k-volume-slider a:hover.ui-slider-handle { border: solid 1px #999;}
- .k-control-bar .k-volume-slider .ui-slider-range { height:17px; position:absolute; background: url(images/ksprite.png) repeat-x -66px -306px; -moz-border-radius:0; -webkit-border-radius:0;}
+.k-player .ui-state-default .ui-icon-arrow-4-diag { background-position: 0 -32px;} /* fullscreen */
+.k-player .ui-state-hover .ui-icon-arrow-4-diag { background-position: -16px -32px;}
+.k-player .ui-state-default .ui-icon-volume-on, .k-player .ui-state-hover .ui-icon-volume-off { margin-left:-6px; background-position: -16px -48px;}
+.k-player .ui-state-hover .ui-icon-volume-on, .k-player .ui-state-default .ui-icon-volume-off { margin-left:-6px; background-position: 0 -48px;}
+
+.k-control-bar .ui-slider { height:8px; border: solid 1px #eee; margin: 4px 10px 0 7px; position:relative; background:url(images/ksprite.png) repeat-x 0 -350px;}
+.k-control-bar .ui-slider-handle { width:8px; height:8px; border: solid 1px #888; margin: -1px 0 0 -5px; display:block; position:relative; top:0; background: url(images/ksprite.png) no-repeat -67px -341px; position:absolute;}
+.k-control-bar .ui-slider-range { height:8px; position:absolute; background: url(images/ksprite.png) repeat-x 0 -368px; -moz-border-radius:5px; -webkit-border-radius:5px;}
+.k-control-bar .ui-slider-buffer { height:8px; position:absolute; background: url(images/ksprite.png) repeat-x 0 -359px; -moz-border-radius:5px; -webkit-border-radius:5px;}
- .play-btn-large { width:120px; height:55px; border:none; background: url(images/ksprite.png) no-repeat 28px -433px; position:absolute; cursor:pointer;} /*.ui-state-default */
- .play-btn-large.ui-state-hover { background: url(images/ksprite.png) no-repeat 28px -377px; }
+.k-control-bar .ui-slider.k-volume-slider { height:15px; margin: 2px 3px 0 -4px; /* ie = m: 3 3 0 -2 */ border:none; background-position: -66px -323px; -moz-border-radius:0px; -webkit-border-radius:0px;}
+.k-control-bar .k-volume-slider a.ui-slider-handle { width:8px; height:18px; margin: -3px 5px 0 -1px; border:none; display:block; position:absolute; background:none;}
+.k-control-bar .k-volume-slider a:hover.ui-slider-handle { border: solid 1px #999;}
+.k-control-bar .k-volume-slider .ui-slider-range { height:17px; position:absolute; background: url(images/ksprite.png) repeat-x -66px -306px; -moz-border-radius:0; -webkit-border-radius:0;}
- .k-volume.ui-state-hover { margin-left:6px; }
+.play-btn-large { width:120px; height:55px; border:none; background: url(images/ksprite.png) no-repeat 28px -433px; position:absolute; cursor:pointer;} /*.ui-state-default */
+.play-btn-large.ui-state-hover { background: url(images/ksprite.png) no-repeat 28px -377px; }
+.k-volume.ui-state-hover { margin-left:6px; }
- /* move to ie css */
- .k-volume-slider span, span.ui-icon-play, span.ui-icon-volume-on, button.k-fullscreen { *margin-top:-1px;}
- span.ui-icon-volume-on { *margin-left:0 !important;}
- .ui-state-hover.k-volume { *margin-left:0 !important;}
- span.ui-icon-k-menu { *margin-top:3px;}
- .k-control-bar .ui-slider.k-volume-slider { *margin-left:-2px;}
- /* end css */
- /* debug only ! */
- /* end debug */
+/* move to ie css */
+.k-volume-slider span, span.ui-icon-play, span.ui-icon-volume-on, button.k-fullscreen { *margin-top:-1px;}
+span.ui-icon-volume-on { *margin-left:0 !important;}
+.ui-state-hover.k-volume { *margin-left:0 !important;}
+span.ui-icon-k-menu { *margin-top:3px;}
+.k-control-bar .ui-slider.k-volume-slider { *margin-left:-2px;}
+/* end css */
+/* debug only ! */
+/* end debug */
+.ui-state-default, .ui-widget-content .ui-state-default {
+ border:none;
+}
/*** end player ***/
\ No newline at end of file
'new_source_cb' : function( orgFilename, oggName ){
if($j('#wpDestFile').val() == "")
$j('#wpDestFile').val( oggName );
- mwUploadHelper.doDestCheck();
+ $j('#wpDestFile').doDestCheck({
+ 'warn_target':'#wpDestFile-warning'
+ });
},
'detect_cb':function( fogg_installed ){
if(fogg_installed){
if( wgAjaxUploadDestCheck ){
//do destination check:
- $j('#wpDestFile').change( mwUploadHelper.doDestCheck );
+ $j('#wpDestFile').change(function(){
+ $j(this).doDestCheck({
+ 'warn_target':'#wpDestFile-warning'
+ });
+ });
}
//check if we have http enabled & setup enable/disable toggle:
'firefogg_form_action': $j('#wpSourceTypeFile').attr('checked')
});
}
- },
- /**
- * doDestCheck checks the destination
- */
- doDestCheck:function(){
- var _this = this;
- $j('#wpDestFile-warning').empty();
- //show loading
- $j('#wpDestFile').after('<img id = "mw-spinner-wpDestFile" src ="'+ stylepath + '/common/images/spinner.gif" />');
- //try and get a thumb of the current file (check its destination)
- do_api_req({
- 'data':{
- 'titles': 'File:' + $j('#wpDestFile').val(),//@@todo we may need a more clever way to get a the filename
- 'prop': 'imageinfo',
- 'iiprop':'url|mime|size',
- 'iiurlwidth': 150
- },
- 'url': _this.api_url
- },function(data){
- //remove spinner:
- $j('#mw-spinner-wpDestFile').remove();
- if(data && data.query && data.query.pages){
- if( data.query.pages[-1] ){
- //all good no file there
- }else{
- for(var page_id in data.query.pages){
- if( data.query.normalized){
- var ntitle = data.query.normalized[0].to;
- }else{
- var ntitle = data.query.pages[ page_id ].title;
- }
- var img = data.query.pages[ page_id ].imageinfo[0];
- $j('#wpDestFile-warning').html(
- '<ul>' +
- '<li>'+
- gM('mwe-fileexists', ntitle) +
- '</li>'+
- '<div class="thumb tright">' +
- '<div style="width: ' + ( parseInt(img.thumbwidth)+2 ) + 'px;" class="thumbinner">' +
- '<a title="' + ntitle + '" class="image" href="' + img.descriptionurl + '">' +
- '<img width="' + img.thumbwidth + '" height="' + img.thumbheight + '" border="0" class="thumbimage" ' +
- 'src="' + img.thumburl + '"' +
- ' alt="' + ntitle + '"/>' +
- '</a>' +
- '<div class="thumbcaption">' +
- '<div class="magnify">' +
- '<a title="' + gM('thumbnail-more') + '" class="internal" ' +
- 'href="' + img.descriptionurl +'"><img width="15" height="11" alt="" ' +
- 'src="' + stylepath + "/common/images/magnify-clip.png\" />" +
- '</a>'+
- '</div>'+
- gM('mwe-fileexists-thumb') +
- '</div>' +
- '</div>'+
- '</div>' +
- '</ul>'
- );
- }
- }
- }
- });
- },
+ },
/**
* doDestinationFill fills in a destination file-name based on a source asset name.
*/
- doDestinationFill:function( targetElm ){
+ doDestinationFill : function( targetElm ){
js_log("doDestinationFill")
//remove any previously flagged errors
$j('#mw-upload-permitted,#mw-upload-prohibited').hide();