Changeset 5609
- Timestamp:
- 06/12/10 14:15:33 (3 years ago)
- Location:
- CKEditor/branches/features/contenteditable
- Files:
-
- 11 edited
-
_source/plugins/clipboard/plugin.js (modified) (2 diffs)
-
_source/plugins/div/plugin.js (modified) (1 diff, 1 prop)
-
_source/plugins/flash/plugin.js (modified) (1 diff)
-
_source/plugins/forms/plugin.js (modified) (3 diffs)
-
_source/plugins/image/plugin.js (modified) (1 diff)
-
_source/plugins/link/plugin.js (modified) (1 diff)
-
_source/plugins/liststyle/plugin.js (modified) (1 diff)
-
_source/plugins/scayt/plugin.js (modified) (1 diff)
-
_source/plugins/table/plugin.js (modified) (2 diffs)
-
_source/plugins/tabletools/plugin.js (modified) (1 diff)
-
config.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/branches/features/contenteditable/_source/plugins/clipboard/plugin.js
r5534 r5609 1 /*1 /* 2 2 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. 3 3 For licensing, see LICENSE.html or http://ckeditor.com/license … … 387 387 } 388 388 389 editor.contextMenu.addListener( function( )389 editor.contextMenu.addListener( function( element, selection ) 390 390 { 391 var readOnly = selection.getCommonAncestor().isReadOnly(); 391 392 return { 392 cut : stateFromNamedCommand( 'Cut' ),393 cut : !readOnly && stateFromNamedCommand( 'Cut' ), 393 394 394 395 // Browser bug: 'Cut' has the correct states for both Copy and Cut. 395 396 copy : stateFromNamedCommand( 'Cut' ), 396 paste : CKEDITOR.env.webkit ? CKEDITOR.TRISTATE_OFF : stateFromNamedCommand( 'Paste')397 paste : !readOnly && ( CKEDITOR.env.webkit ? CKEDITOR.TRISTATE_OFF : stateFromNamedCommand( 'Paste' ) ) 397 398 }; 398 399 }); -
CKEditor/branches/features/contenteditable/_source/plugins/div/plugin.js
- Property svn:mergeinfo changed (with no actual effect on merging)
r5548 r5609 96 96 editor.contextMenu.addListener( function( element, selection ) 97 97 { 98 if ( !element )98 if ( !element || element.isReadOnly()) 99 99 return null; 100 100 -
CKEditor/branches/features/contenteditable/_source/plugins/flash/plugin.js
r5548 r5609 91 91 editor.contextMenu.addListener( function( element, selection ) 92 92 { 93 if ( element && element.is( 'img' ) && element.getAttribute( '_cke_real_element_type' ) == 'flash' ) 93 if ( element && element.is( 'img' ) && !element.isReadOnly() 94 && element.getAttribute( '_cke_real_element_type' ) == 'flash' ) 94 95 return { flash : CKEDITOR.TRISTATE_OFF }; 95 96 }); -
CKEditor/branches/features/contenteditable/_source/plugins/forms/plugin.js
r5548 r5609 1 /*1 /* 2 2 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. 3 3 For licensing, see LICENSE.html or http://ckeditor.com/license … … 132 132 editor.contextMenu.addListener( function( element ) 133 133 { 134 if ( element && element.hasAscendant( 'form', true ) )134 if ( element && element.hasAscendant( 'form', true ) && !element.isReadOnly() ) 135 135 return { form : CKEDITOR.TRISTATE_OFF }; 136 136 }); … … 138 138 editor.contextMenu.addListener( function( element ) 139 139 { 140 if ( element )140 if ( element && !element.isReadOnly() ) 141 141 { 142 142 var name = element.getName(); -
CKEditor/branches/features/contenteditable/_source/plugins/image/plugin.js
r5548 r5609 54 54 editor.contextMenu.addListener( function( element, selection ) 55 55 { 56 if ( !element || !element.is( 'img' ) || element.getAttribute( '_cke_realelement' ) )56 if ( !element || !element.is( 'img' ) || element.getAttribute( '_cke_realelement' ) || element.isReadOnly() ) 57 57 return null; 58 58 -
CKEditor/branches/features/contenteditable/_source/plugins/link/plugin.js
r5608 r5609 111 111 editor.contextMenu.addListener( function( element, selection ) 112 112 { 113 if ( !element )113 if ( !element || element.isReadOnly() ) 114 114 return null; 115 115 -
CKEditor/branches/features/contenteditable/_source/plugins/liststyle/plugin.js
r5534 r5609 43 43 editor.contextMenu.addListener( function( element, selection ) 44 44 { 45 if ( !element )45 if ( !element || element.isReadOnly() ) 46 46 return null; 47 47 -
CKEditor/branches/features/contenteditable/_source/plugins/scayt/plugin.js
r5534 r5609 627 627 if ( editor.contextMenu && editor.addMenuItems ) 628 628 { 629 editor.contextMenu.addListener( function( ) 630 { 631 if ( !plugin.isScaytEnabled( editor ) ) 629 editor.contextMenu.addListener( function( element, selection ) 630 { 631 if ( !plugin.isScaytEnabled( editor ) 632 || selection.getCommonAncestor().isReadOnly() ) 632 633 return null; 633 634 -
CKEditor/branches/features/contenteditable/_source/plugins/table/plugin.js
r5548 r5609 1 /*1 /* 2 2 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. 3 3 For licensing, see LICENSE.html or http://ckeditor.com/license … … 59 59 editor.contextMenu.addListener( function( element, selection ) 60 60 { 61 if ( !element )61 if ( !element || element.isReadOnly()) 62 62 return null; 63 63 -
CKEditor/branches/features/contenteditable/_source/plugins/tabletools/plugin.js
r5590 r5609 1089 1089 editor.contextMenu.addListener( function( element, selection ) 1090 1090 { 1091 if ( !element )1091 if ( !element || element.isReadOnly() ) 1092 1092 return null; 1093 1093 -
CKEditor/branches/features/contenteditable/config.js
r5592 r5609 9 9 // config.language = 'fr'; 10 10 // config.uiColor = '#AADC6E'; 11 config.scayt_autoStartup = false; 12 // config.emailProtection = 'mt(NAME,DOMAIN,SUBJECT,BODY)'; 13 // config.toolbar = [ ['Templates','-','Styles','Format','Font','FontSize'] ]; 14 // config.enterMode = 1; 15 // config.shiftEnterMode = 1; 16 // config.forceEnterMode = true; 17 // config.resize_dir = 'horizontal'; 11 18 };
Note: See TracChangeset
for help on using the changeset viewer.
