Ticket #670: 670.patch
File 670.patch, 7.9 KB (added by , 15 years ago) |
---|
-
_source/internals/fckcommands.js
55 55 case 'AnchorDelete' : oCommand = new FCKAnchorDeleteCommand() ; break ; 56 56 case 'BulletedList' : oCommand = new FCKDialogCommand( 'BulletedList', FCKLang.BulletedListProp , 'dialog/fck_listprop.html?UL' , 370, 170 ) ; break ; 57 57 case 'NumberedList' : oCommand = new FCKDialogCommand( 'NumberedList', FCKLang.NumberedListProp , 'dialog/fck_listprop.html?OL' , 370, 170 ) ; break ; 58 case 'About' : oCommand = new FCKDialogCommand( 'About' , FCKLang.About , 'dialog/fck_about.html' , 400, 330 ) ; break ;58 case 'About' : oCommand = new FCKDialogCommand( 'About' , FCKLang.About , 'dialog/fck_about.html' , 400, 330, function(){ return FCK_TRISTATE_DISABLED ; } ) ; break ; 59 59 60 60 case 'Find' : oCommand = new FCKDialogCommand( 'Find' , FCKLang.DlgFindAndReplaceTitle , 'dialog/fck_replace.html' , 340, 250 ) ; break ; 61 61 case 'Replace' : oCommand = new FCKDialogCommand( 'Replace' , FCKLang.DlgFindAndReplaceTitle , 'dialog/fck_replace.html' , 340, 250 ) ; break ; -
_source/commandclasses/fcktextcolorcommand.js
75 75 76 76 FCKTextColorCommand.prototype.GetState = function() 77 77 { 78 if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) 79 return FCK_TRISTATE_DISABLED ; 78 80 return FCK_TRISTATE_OFF ; 79 81 } 80 82 -
_source/commandclasses/fcknamedcommand.js
33 33 34 34 FCKNamedCommand.prototype.GetState = function() 35 35 { 36 if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) 37 return FCK_TRISTATE_DISABLED ; 36 38 return FCK.GetNamedCommandState( this.Name ) ; 37 39 } -
_source/commandclasses/fckspellcheckcommand_gecko.js
35 35 36 36 FCKSpellCheckCommand.prototype.GetState = function() 37 37 { 38 if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) 39 return FCK_TRISTATE_DISABLED ; 38 40 return this.IsEnabled ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ; 39 } 40 No newline at end of file 41 } -
_source/commandclasses/fckspellcheckcommand_ie.js
63 63 64 64 FCKSpellCheckCommand.prototype.GetState = function() 65 65 { 66 if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) 67 return FCK_TRISTATE_DISABLED ; 66 68 return this.IsEnabled ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ; 67 } 68 No newline at end of file 69 } -
_source/commandclasses/fckstylecommand.js
45 45 46 46 GetState : function() 47 47 { 48 if ( !FCK.EditorDocument )48 if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG || !FCK.EditorDocument ) 49 49 return FCK_TRISTATE_DISABLED ; 50 50 51 51 if ( FCKSelection.GetType() == 'Control' ) -
_source/commandclasses/fck_othercommands.js
47 47 if ( this.GetStateFunction ) 48 48 return this.GetStateFunction( this.GetStateParam ) ; 49 49 else 50 return FCK _TRISTATE_OFF;50 return FCK.EditMode == FCK_EDITMODE_WYSIWYG ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ; 51 51 } 52 52 53 53 // Generic Undefined command (usually used when a command is under development). … … 79 79 80 80 GetState : function() 81 81 { 82 return FCK.EditorDocument ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ; 82 return FCK.EditorDocument ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ; 83 83 } 84 84 }; 85 85 … … 209 209 210 210 FCKUndoCommand.prototype.GetState = function() 211 211 { 212 if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) 213 return FCK_TRISTATE_DISABLED ; 212 214 return ( FCKUndo.CheckUndoState() ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ) ; 213 215 } 214 216 … … 225 227 226 228 FCKRedoCommand.prototype.GetState = function() 227 229 { 230 if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) 231 return FCK_TRISTATE_DISABLED ; 228 232 return ( FCKUndo.CheckRedoState() ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ) ; 229 233 } 230 234 … … 262 266 263 267 FCKPageBreakCommand.prototype.GetState = function() 264 268 { 269 if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) 270 return FCK_TRISTATE_DISABLED ; 265 271 return 0 ; // FCK_TRISTATE_OFF 266 272 } 267 273 … … 291 297 292 298 FCKUnlinkCommand.prototype.GetState = function() 293 299 { 300 if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) 301 return FCK_TRISTATE_DISABLED ; 294 302 var state = FCK.GetNamedCommandState( this.Name ) ; 295 303 296 304 // Check that it isn't an anchor … … 336 344 337 345 FCKSelectAllCommand.prototype.GetState = function() 338 346 { 347 if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) 348 return FCK_TRISTATE_DISABLED ; 339 349 return FCK_TRISTATE_OFF ; 340 350 } 341 351 … … 357 367 358 368 GetState : function() 359 369 { 370 if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) 371 return FCK_TRISTATE_DISABLED ; 360 372 return FCK.GetNamedCommandState( 'Paste' ) ; 361 373 } 362 374 } ; … … 377 389 378 390 GetState : function() 379 391 { 392 if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) 393 return FCK_TRISTATE_DISABLED ; 380 394 return FCK.GetNamedCommandState( 'InsertHorizontalRule' ) ; 381 395 } 382 396 } ; … … 396 410 397 411 GetState : function() 398 412 { 413 if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) 414 return FCK_TRISTATE_DISABLED ; 399 415 // Strangely, the cut command happens to have the correct states for both Copy and Cut in all browsers. 400 416 return FCK.GetNamedCommandState( 'Cut' ) ; 401 417 } … … 465 481 466 482 GetState : function() 467 483 { 484 if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) 485 return FCK_TRISTATE_DISABLED ; 468 486 return FCK.GetNamedCommandState( 'Unlink') ; 469 487 } 470 488 }; -
_source/commandclasses/fckpasteplaintextcommand.js
34 34 35 35 FCKPastePlainTextCommand.prototype.GetState = function() 36 36 { 37 if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) 38 return FCK_TRISTATE_DISABLED ; 37 39 return FCK.GetNamedCommandState( 'Paste' ) ; 38 40 } -
_source/commandclasses/fckpastewordcommand.js
33 33 34 34 FCKPasteWordCommand.prototype.GetState = function() 35 35 { 36 if ( FCK Config.ForcePasteAsPlainText )36 if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG || FCKConfig.ForcePasteAsPlainText ) 37 37 return FCK_TRISTATE_DISABLED ; 38 38 else 39 39 return FCK.GetNamedCommandState( 'Paste' ) ; -
_source/commandclasses/fckcorestylecommand.js
44 44 FCKStyles.ApplyStyle( this.StyleName ) ; 45 45 46 46 FCK.Focus() ; 47 FCK.Events.FireEvent( 'OnSelectionChange' ) ; 47 FCK.Events.FireEvent( 'OnSelectionChange' ) ; 48 48 }, 49 49 50 50 GetState : function() 51 51 { 52 if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) 53 return FCK_TRISTATE_DISABLED ; 52 54 return this.IsActive ? FCK_TRISTATE_ON : FCK_TRISTATE_OFF ; 53 55 }, 54 56