PDF rausgenommen

This commit is contained in:
aschwarz
2023-01-23 11:03:31 +01:00
parent 82d562a322
commit a6523903eb
28078 changed files with 4247552 additions and 2 deletions

View File

@ -0,0 +1,92 @@
/* global tinymce */
/**
* Included for back-compat.
* The default WindowManager in TinyMCE 4.0 supports three types of dialogs:
* - With HTML created from JS.
* - With inline HTML (like WPWindowManager).
* - Old type iframe based dialogs.
* For examples see the default plugins: https://github.com/tinymce/tinymce/tree/master/js/tinymce/plugins
*/
tinymce.WPWindowManager = tinymce.InlineWindowManager = function( editor ) {
if ( this.wp ) {
return this;
}
this.wp = {};
this.parent = editor.windowManager;
this.editor = editor;
tinymce.extend( this, this.parent );
this.open = function( args, params ) {
var $element,
self = this,
wp = this.wp;
if ( ! args.wpDialog ) {
return this.parent.open.apply( this, arguments );
} else if ( ! args.id ) {
return;
}
if ( typeof jQuery === 'undefined' || ! jQuery.wp || ! jQuery.wp.wpdialog ) {
// wpdialog.js is not loaded
if ( window.console && window.console.error ) {
window.console.error('wpdialog.js is not loaded. Please set "wpdialogs" as dependency for your script when calling wp_enqueue_script(). You may also want to enqueue the "wp-jquery-ui-dialog" stylesheet.');
}
return;
}
wp.$element = $element = jQuery( '#' + args.id );
if ( ! $element.length ) {
return;
}
if ( window.console && window.console.log ) {
window.console.log('tinymce.WPWindowManager is deprecated. Use the default editor.windowManager to open dialogs with inline HTML.');
}
wp.features = args;
wp.params = params;
// Store selection. Takes a snapshot in the FocusManager of the selection before focus is moved to the dialog.
editor.nodeChanged();
// Create the dialog if necessary
if ( ! $element.data('wpdialog') ) {
$element.wpdialog({
title: args.title,
width: args.width,
height: args.height,
modal: true,
dialogClass: 'wp-dialog',
zIndex: 300000
});
}
$element.wpdialog('open');
$element.on( 'wpdialogclose', function() {
if ( self.wp.$element ) {
self.wp = {};
}
});
};
this.close = function() {
if ( ! this.wp.features || ! this.wp.features.wpDialog ) {
return this.parent.close.apply( this, arguments );
}
this.wp.$element.wpdialog('close');
};
};
tinymce.PluginManager.add( 'wpdialogs', function( editor ) {
// Replace window manager
editor.on( 'init', function() {
editor.windowManager = new tinymce.WPWindowManager( editor );
});
});

View File

@ -0,0 +1 @@
tinymce.WPWindowManager=tinymce.InlineWindowManager=function(a){return this.wp?this:(this.wp={},this.parent=a.windowManager,this.editor=a,tinymce.extend(this,this.parent),this.open=function(b,c){var d,e=this,f=this.wp;if(!b.wpDialog)return this.parent.open.apply(this,arguments);if(b.id){if("undefined"==typeof jQuery||!jQuery.wp||!jQuery.wp.wpdialog)return void(window.console&&window.console.error&&window.console.error('wpdialog.js is not loaded. Please set "wpdialogs" as dependency for your script when calling wp_enqueue_script(). You may also want to enqueue the "wp-jquery-ui-dialog" stylesheet.'));f.$element=d=jQuery("#"+b.id),d.length&&(window.console&&window.console.log&&window.console.log("tinymce.WPWindowManager is deprecated. Use the default editor.windowManager to open dialogs with inline HTML."),f.features=b,f.params=c,a.nodeChanged(),d.data("wpdialog")||d.wpdialog({title:b.title,width:b.width,height:b.height,modal:!0,dialogClass:"wp-dialog",zIndex:3e5}),d.wpdialog("open"),d.on("wpdialogclose",function(){e.wp.$element&&(e.wp={})}))}},void(this.close=function(){return this.wp.features&&this.wp.features.wpDialog?void this.wp.$element.wpdialog("close"):this.parent.close.apply(this,arguments)}))},tinymce.PluginManager.add("wpdialogs",function(a){a.on("init",function(){a.windowManager=new tinymce.WPWindowManager(a)})});