12345678910111213141516171819202122232425262728293031323334353637 |
- CKEDITOR.plugins.add( 'chain', {
- requires: 'dialog,fakeobjects',
- icons: 'chain',
- init: function( editor ) {
- editor.addCommand( 'chain', new CKEDITOR.dialogCommand( 'chainDialog' ) );
- editor.ui.addButton( 'chain', {
- label: 'Âñòàâèòü òðàíñëÿöèþ',
- command: 'chain',
- toolbar: 'insert',
- icon : this.path + 'icons/chain.png'
- });
- if ( editor.contextMenu ) {
- // alert(this.path + 'icons/polls.png');
- // editor.addMenuGroup( 'pollGroup' );
- editor.addMenuItem( 'chainItem', {
- label: 'Ðåäàêòèðîâàòü òðàíñëÿöèþ ',
- icon: this.path + 'icons/chain.png',
- command: 'chain',
- group: 'others'
- });
- editor.on( 'doubleclick', function( evt ) {
- var element = evt.data.element;
- if ( $(element).attr('id') == 'widgetchain' )
- evt.data.dialog = 'chainDialog';
- } );
- editor.contextMenu.addListener( function( element ) {
- if ( element.getAscendant( 'chain', true ) ) {
- return { pollsItem: CKEDITOR.TRISTATE_OFF };
- }
- });
- }
- CKEDITOR.dialog.add( 'chainDialog', this.path + 'dialogs/chain.js' );
- }
- });
|