Updates
This commit is contained in:
@ -1,48 +1,48 @@
|
||||
/**
|
||||
* Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'myDialog', function( editor ) {
|
||||
return {
|
||||
title: 'My Dialog',
|
||||
minWidth: 400,
|
||||
minHeight: 200,
|
||||
contents: [
|
||||
{
|
||||
id: 'tab1',
|
||||
label: 'First Tab',
|
||||
title: 'First Tab',
|
||||
elements: [
|
||||
{
|
||||
id: 'input1',
|
||||
type: 'text',
|
||||
label: 'Text Field'
|
||||
},
|
||||
{
|
||||
id: 'select1',
|
||||
type: 'select',
|
||||
label: 'Select Field',
|
||||
items: [
|
||||
[ 'option1', 'value1' ],
|
||||
[ 'option2', 'value2' ]
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'tab2',
|
||||
label: 'Second Tab',
|
||||
title: 'Second Tab',
|
||||
elements: [
|
||||
{
|
||||
id: 'button1',
|
||||
type: 'button',
|
||||
label: 'Button Field'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
} );
|
||||
|
||||
/**
|
||||
* Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'myDialog', function( editor ) {
|
||||
return {
|
||||
title: 'My Dialog',
|
||||
minWidth: 400,
|
||||
minHeight: 200,
|
||||
contents: [
|
||||
{
|
||||
id: 'tab1',
|
||||
label: 'First Tab',
|
||||
title: 'First Tab',
|
||||
elements: [
|
||||
{
|
||||
id: 'input1',
|
||||
type: 'text',
|
||||
label: 'Text Field'
|
||||
},
|
||||
{
|
||||
id: 'select1',
|
||||
type: 'select',
|
||||
label: 'Select Field',
|
||||
items: [
|
||||
[ 'option1', 'value1' ],
|
||||
[ 'option2', 'value2' ]
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'tab2',
|
||||
label: 'Second Tab',
|
||||
title: 'Second Tab',
|
||||
elements: [
|
||||
{
|
||||
id: 'button1',
|
||||
type: 'button',
|
||||
label: 'Button Field'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
} );
|
||||
|
||||
|
@ -1,50 +1,50 @@
|
||||
/**
|
||||
* Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
// Tool scripts for the sample pages.
|
||||
// This file can be ignored and is not required to make use of CKEditor.
|
||||
|
||||
( function() {
|
||||
CKEDITOR.on( 'instanceReady', function( ev ) {
|
||||
// Check for sample compliance.
|
||||
var editor = ev.editor,
|
||||
meta = CKEDITOR.document.$.getElementsByName( 'ckeditor-sample-required-plugins' ),
|
||||
requires = meta.length ? CKEDITOR.dom.element.get( meta[ 0 ] ).getAttribute( 'content' ).split( ',' ) : [],
|
||||
missing = [],
|
||||
i;
|
||||
|
||||
if ( requires.length ) {
|
||||
for ( i = 0; i < requires.length; i++ ) {
|
||||
if ( !editor.plugins[ requires[ i ] ] )
|
||||
missing.push( '<code>' + requires[ i ] + '</code>' );
|
||||
}
|
||||
|
||||
if ( missing.length ) {
|
||||
var warn = CKEDITOR.dom.element.createFromHtml(
|
||||
'<div class="warning">' +
|
||||
'<span>To fully experience this demo, the ' + missing.join( ', ' ) + ' plugin' + ( missing.length > 1 ? 's are' : ' is' ) + ' required.</span>' +
|
||||
'</div>'
|
||||
);
|
||||
warn.insertBefore( editor.container );
|
||||
}
|
||||
}
|
||||
|
||||
// Set icons.
|
||||
var doc = new CKEDITOR.dom.document( document ),
|
||||
icons = doc.find( '.button_icon' );
|
||||
|
||||
for ( i = 0; i < icons.count(); i++ ) {
|
||||
var icon = icons.getItem( i ),
|
||||
name = icon.getAttribute( 'data-icon' ),
|
||||
style = CKEDITOR.skin.getIconStyle( name, ( CKEDITOR.lang.dir == 'rtl' ) );
|
||||
|
||||
icon.addClass( 'cke_button_icon' );
|
||||
icon.addClass( 'cke_button__' + name + '_icon' );
|
||||
icon.setAttribute( 'style', style );
|
||||
icon.setStyle( 'float', 'none' );
|
||||
|
||||
}
|
||||
} );
|
||||
} )();
|
||||
/**
|
||||
* Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
// Tool scripts for the sample pages.
|
||||
// This file can be ignored and is not required to make use of CKEditor.
|
||||
|
||||
( function() {
|
||||
CKEDITOR.on( 'instanceReady', function( ev ) {
|
||||
// Check for sample compliance.
|
||||
var editor = ev.editor,
|
||||
meta = CKEDITOR.document.$.getElementsByName( 'ckeditor-sample-required-plugins' ),
|
||||
requires = meta.length ? CKEDITOR.dom.element.get( meta[ 0 ] ).getAttribute( 'content' ).split( ',' ) : [],
|
||||
missing = [],
|
||||
i;
|
||||
|
||||
if ( requires.length ) {
|
||||
for ( i = 0; i < requires.length; i++ ) {
|
||||
if ( !editor.plugins[ requires[ i ] ] )
|
||||
missing.push( '<code>' + requires[ i ] + '</code>' );
|
||||
}
|
||||
|
||||
if ( missing.length ) {
|
||||
var warn = CKEDITOR.dom.element.createFromHtml(
|
||||
'<div class="warning">' +
|
||||
'<span>To fully experience this demo, the ' + missing.join( ', ' ) + ' plugin' + ( missing.length > 1 ? 's are' : ' is' ) + ' required.</span>' +
|
||||
'</div>'
|
||||
);
|
||||
warn.insertBefore( editor.container );
|
||||
}
|
||||
}
|
||||
|
||||
// Set icons.
|
||||
var doc = new CKEDITOR.dom.document( document ),
|
||||
icons = doc.find( '.button_icon' );
|
||||
|
||||
for ( i = 0; i < icons.count(); i++ ) {
|
||||
var icon = icons.getItem( i ),
|
||||
name = icon.getAttribute( 'data-icon' ),
|
||||
style = CKEDITOR.skin.getIconStyle( name, ( CKEDITOR.lang.dir == 'rtl' ) );
|
||||
|
||||
icon.addClass( 'cke_button_icon' );
|
||||
icon.addClass( 'cke_button__' + name + '_icon' );
|
||||
icon.setAttribute( 'style', style );
|
||||
icon.setStyle( 'float', 'none' );
|
||||
|
||||
}
|
||||
} );
|
||||
} )();
|
||||
|
Reference in New Issue
Block a user