this.doControlBindings();
},
getEditForm:function(){
- js_log('get form: action=' + $j(this.selector).parents().find("form").attr('action'));
- return $j(this.selector).parents().find("form").get(0);
+ if( this.target_edit_from )
+ return this.pe_getEditForm();
+ //else try to get the parent "from" of the file selector:
+ return $j(this.selector).parents('form:first').get(0);
},
selectFogg:function(){
var _this = this;
},
doUploadSwitch:function(){
var _this = this;
- js_log("firefogg: doUploadSwitch:: " + this.fogg_enabled);
+ js_log("firefogg: doUploadSwitch:: " + this.fogg_enabled + ' up mode:' + _this.upload_mode);
//make sure firefogg is enabled otherwise do parent UploadSwich:
if( !this.fogg_enabled || !this.firefogg_form_action )
return _this.pe_doUploadSwitch();
},
//doChunkUpload does both uploading and encoding at the same time and uploads one meg chunks as they are ready
doChunkUpload : function(){
+ js_log('doChunkUpload::');
var _this = this;
- _this.action_done = false;
-
+ _this.action_done = false;
//extension should already be ogg but since its user editable,
//check again
//we are transcoding so we know it will be an ogg
//build the api url:
var aReq ={
- 'action' : 'upload',
- 'format' : 'json',
- 'filename' : _this.formData['wpDestFile'],
- 'comment' : _this.formData['wpUploadDescription'],
- 'enablechunks': true
+ 'action' : 'upload',
+ 'format' : 'json',
+ 'filename' : _this.formData['wpDestFile'],
+ 'comment' : _this.formData['wpUploadDescription'],
+ 'enablechunks' : 'true'
};
//check for editToken:
if(!this.etoken)
this.etoken = _this.formData['wpEditToken'];
- if(this.etoken)
+ if( this.etoken )
aReq['token'] = this.etoken;
if( _this.formData['wpWatchthis'] )
var sstring = 'var wgTitle = "' + this.formData['wpDestFile'].replace('_',' ');
if(wgArticlePath){
- var result_txt = gM('mv_upload_done', wgArticlePath.replace(/\$1/, 'File:' + this.formData['wpDestFile'] ) );
+ var result_txt = gM('mv_upload_done', wgArticlePath.replace(/\$1/, 'File:' + _this.formData['wpDestFile'] ) );
}else{
result_txt = 'File has uploaded but api "done" url was provided. Check the log for result page output';
}
js_log( 'upload done got redirect found: ' + sstring + ' r:' + _this.upload_done_action );
if( _this.upload_done_action == 'redirect' ){
$j( '#dlbox-centered' ).html( '<h3>Upload Completed:</h3>' + result_txt + '<br>' + form_txt);
- window.location = wgArticlePath.replace( /\$1/, 'File:' + formData['wpDestFile'] );
+ window.location = wgArticlePath.replace( /\$1/, 'File:' + _this.formData['wpDestFile'] );
}else{
//check if the add_done_action is a callback:
if( typeof _this.upload_done_action == 'function' )
//ie8 does not play well with the jQuery video,audio,playlist selector use native:
if($j.browser.msie && $j.browser.version >= 8){
jtags = j_selector.split(',');
- for(var i=0;i<jtags.length;i++){
+ for( var i=0; i < jtags.length; i++){
$j( document.getElementsByTagName( jtags[i] )).each(function(){
eAction(this);
});
return false;
});
});
- },
- /*download list is too complicated ... rewrite for clarity: */
+ },
showVideoDownload:function(){
//load the roe if available (to populate out download options:
//js_log('f:showVideoDownload '+ this.roe + ' ' + this.media_element.addedROEData);
- if(this.roe && this.media_element.addedROEData==false){
+ if(this.roe && this.media_element.addedROEData == false){
var _this = this;
this.displayHTML(gM('loading_txt'));
do_request(this.roe, function(data)
},
/**
* doDestCheck checks the destination
- * @@todo we should be able to configure its "targets" via parent config
*/
doDestCheck:function(){
var _this = this;
'<div class="magnify">' +
'<a title="' + gM('thumbnail-more') + '" class="internal" ' +
'href="' + img.descriptionurl +'"><img width="15" height="11" alt="" ' +
- 'src="' + stylepath +"/>" +
+ 'src="' + stylepath + "/common/images/magnify-clip.png\" />" +
'</a>'+
'</div>'+
gM('fileexists-thumb') +
},
/**
* doDestinationFill fills in a destination file-name based on a source asset name.
- * @@todo we should be able to configure its "targets" via parent config
*/
doDestinationFill:function( targetElm ){
js_log("doDestinationFill")