Changeset 712
- Timestamp:
- 2007-08-23 11:22:52 (3 years ago)
- Location:
- FCKeditor/trunk
- Files:
-
- 4 modified
-
editor/_source/commandclasses/fckshowblocks.js (modified) (2 diffs)
-
editor/_source/internals/fckcommands.js (modified) (1 diff)
-
editor/_source/internals/fck.js (modified) (2 diffs)
-
fckconfig.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/editor/_source/commandclasses/fckshowblocks.js
r706 r712 22 22 */ 23 23 24 var FCKShowBlockCommand = function( name )24 var FCKShowBlockCommand = function( name, defaultState ) 25 25 { 26 26 this.Name = name ; 27 if ( defaultState != undefined ) 28 this._SavedState = defaultState ; 29 else 30 this._SavedState = null ; 27 31 } 28 32 … … 60 64 return FCK_TRISTATE_OFF ; 61 65 } 66 67 FCKShowBlockCommand.prototype.SaveState = function() 68 { 69 this._SavedState = this.GetState() ; 70 } 71 72 FCKShowBlockCommand.prototype.RestoreState = function() 73 { 74 if ( this._SavedState != null && this.GetState() != this._SavedState ) 75 this.Execute() ; 76 } -
FCKeditor/trunk/editor/_source/internals/fckcommands.js
r701 r712 116 116 case 'InsertOrderedList' : oCommand = new FCKListCommand( 'insertorderedlist' ) ; break ; 117 117 case 'InsertUnorderedList' : oCommand = new FCKListCommand( 'insertunorderedlist' ) ; break ; 118 case 'ShowBlocks' : oCommand = new FCKShowBlockCommand( 'ShowBlocks' ) ; break ;118 case 'ShowBlocks' : oCommand = new FCKShowBlockCommand( 'ShowBlocks', FCKConfig.StartupShowBlocks ? FCK_TRISTATE_ON : FCK_TRISTATE_OFF ) ; break ; 119 119 120 120 // Generic Undefined command (usually used when a command is under development). -
FCKeditor/trunk/editor/_source/internals/fck.js
r703 r712 550 550 if ( bIsWysiwyg ) 551 551 { 552 FCKCommands.GetCommand( 'ShowBlocks' ).SaveState() ; 552 553 if ( !noUndo && FCKBrowserInfo.IsIE ) 553 554 FCKUndo.SaveUndoStep() ; … … 813 814 FCK.OnAfterSetHTML() ; 814 815 816 // Restore show blocks status. 817 FCKCommands.GetCommand( 'ShowBlocks' ).RestoreState() ; 818 815 819 // Check if it is not a startup call, otherwise complete the startup. 816 820 if ( FCK.Status != FCK_STATUS_NOTLOADED ) -
FCKeditor/trunk/fckconfig.js
r701 r712 39 39 40 40 FCKConfig.FullPage = false ; 41 42 // The following option determines whether the "Show Blocks" feature is enabled or not at startup. 43 FCKConfig.StartupShowBlocks = false ; 41 44 42 45 FCKConfig.Debug = false ;