mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-17 16:15:24 +01:00
76296ef657
- Refactor swfupload.js to output a simple upload form, and handlers.js. - Delete the SWFUpload plugins directory and swfupload.swf. - Remove flash cookies "hack" from async-upload.php. See #41752. Built from https://develop.svn.wordpress.org/trunk@41554 git-svn-id: http://core.svn.wordpress.org/trunk@41387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
55 lines
1.4 KiB
JavaScript
55 lines
1.4 KiB
JavaScript
var topWin = window.dialogArguments || opener || parent || top;
|
|
|
|
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();
|
|
}
|
|
|
|
function swfuploadPreLoad() {
|
|
switchUploader();
|
|
}
|
|
|
|
function swfuploadLoadFailed() {
|
|
switchUploader();
|
|
}
|
|
|
|
jQuery(document).ready(function($){
|
|
$( 'input[type="radio"]', '#media-items' ).on( 'click', function(){
|
|
var tr = $(this).closest('tr');
|
|
|
|
if ( $(tr).hasClass('align') )
|
|
setUserSetting('align', $(this).val());
|
|
else if ( $(tr).hasClass('image-size') )
|
|
setUserSetting('imgsize', $(this).val());
|
|
});
|
|
|
|
$( 'button.button', '#media-items' ).on( 'click', function(){
|
|
var c = this.className || '';
|
|
c = c.match(/url([^ '"]+)/);
|
|
if ( c && c[1] ) {
|
|
setUserSetting('urlbutton', c[1]);
|
|
$(this).siblings('.urlfield').val( $(this).attr('title') );
|
|
}
|
|
});
|
|
});
|