2012-08-23 02:04:18 +02:00
|
|
|
var topWin = window.dialogArguments || opener || parent || top;
|
|
|
|
|
2017-09-21 18:35:48 +02:00
|
|
|
function fileDialogStart() {}
|
|
|
|
function fileQueued() {}
|
|
|
|
function uploadStart() {}
|
|
|
|
function uploadProgress() {}
|
|
|
|
function prepareMediaItem() {}
|
|
|
|
function prepareMediaItemInit() {}
|
|
|
|
function itemAjaxError() {}
|
|
|
|
function deleteSuccess() {}
|
|
|
|
function deleteError() {}
|
|
|
|
function updateMediaForm() {}
|
|
|
|
function uploadSuccess() {}
|
|
|
|
function uploadComplete() {}
|
|
|
|
function wpQueueError() {}
|
|
|
|
function wpFileError() {}
|
|
|
|
function fileQueueError() {}
|
|
|
|
function fileDialogComplete() {}
|
|
|
|
function uploadError() {}
|
|
|
|
function cancelUpload() {}
|
|
|
|
|
|
|
|
function switchUploader() {
|
|
|
|
jQuery( '#' + swfu.customSettings.swfupload_element_id ).hide();
|
|
|
|
jQuery( '#' + swfu.customSettings.degraded_element_id ).show();
|
|
|
|
jQuery( '.upload-html-bypass' ).hide();
|
2012-08-23 02:04:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function swfuploadPreLoad() {
|
2017-09-21 18:35:48 +02:00
|
|
|
switchUploader();
|
2012-08-23 02:04:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function swfuploadLoadFailed() {
|
2017-09-21 18:35:48 +02:00
|
|
|
switchUploader();
|
2012-08-23 02:04:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
jQuery(document).ready(function($){
|
2017-04-14 18:43:44 +02:00
|
|
|
$( 'input[type="radio"]', '#media-items' ).on( 'click', function(){
|
2012-08-23 02:04:18 +02:00
|
|
|
var tr = $(this).closest('tr');
|
|
|
|
|
|
|
|
if ( $(tr).hasClass('align') )
|
|
|
|
setUserSetting('align', $(this).val());
|
|
|
|
else if ( $(tr).hasClass('image-size') )
|
|
|
|
setUserSetting('imgsize', $(this).val());
|
|
|
|
});
|
|
|
|
|
2017-04-14 18:43:44 +02:00
|
|
|
$( 'button.button', '#media-items' ).on( 'click', function(){
|
2012-08-23 02:04:18 +02:00
|
|
|
var c = this.className || '';
|
|
|
|
c = c.match(/url([^ '"]+)/);
|
|
|
|
if ( c && c[1] ) {
|
|
|
|
setUserSetting('urlbutton', c[1]);
|
|
|
|
$(this).siblings('.urlfield').val( $(this).attr('title') );
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|