Changeset 1398 for FCKeditor/trunk
- Timestamp:
- 01/24/08 04:47:11 (5 years ago)
- Location:
- FCKeditor/trunk
- Files:
-
- 2 deleted
- 45 edited
- 25 copied
-
_dev/browserbugs/safari/1462_2_reduced.html (copied) (copied from FCKeditor/branches/features/floating_dialog/_dev/browserbugs/safari/1462_2_reduced.html)
-
_dev/browserbugs/safari/1462_reduced.html (copied) (copied from FCKeditor/branches/features/floating_dialog/_dev/browserbugs/safari/1462_reduced.html)
-
_test/manual/fckdialog (copied) (copied from FCKeditor/branches/features/floating_dialog/_test/manual/fckdialog)
-
_test/manual/fckdialog/flash.swf (copied) (copied from FCKeditor/branches/features/floating_dialog/_test/manual/fckdialog/flash.swf)
-
_test/manual/fckdialog/test1.css (copied) (copied from FCKeditor/branches/features/floating_dialog/_test/manual/fckdialog/test1.css)
-
_test/manual/fckdialog/test1.html (copied) (copied from FCKeditor/branches/features/floating_dialog/_test/manual/fckdialog/test1.html)
-
_test/manual/fckdialog/test2.html (copied) (copied from FCKeditor/branches/features/floating_dialog/_test/manual/fckdialog/test2.html)
-
_test/manual/testslist.html (modified) (1 diff)
-
editor/_source/classes/fckstyle.js (modified) (10 diffs)
-
editor/_source/commandclasses/fck_othercommands.js (modified) (3 diffs)
-
editor/_source/commandclasses/fcktextcolorcommand.js (modified) (1 diff)
-
editor/_source/internals/fck.js (modified) (1 diff)
-
editor/_source/internals/fckbrowserinfo.js (modified) (1 diff)
-
editor/_source/internals/fckcommands.js (modified) (2 diffs)
-
editor/_source/internals/fckdialog.js (modified) (1 diff)
-
editor/_source/internals/fckdialog_gecko.js (deleted)
-
editor/_source/internals/fckdialog_ie.js (deleted)
-
editor/_source/internals/fckdomtools.js (modified) (2 diffs)
-
editor/_source/internals/fcktools.js (modified) (3 diffs)
-
editor/_source/internals/fcktools_gecko.js (modified) (2 diffs)
-
editor/dialog/common/fck_dialog_common.js (modified) (1 diff)
-
editor/dialog/fck_anchor.html (modified) (2 diffs)
-
editor/dialog/fck_button.html (modified) (2 diffs)
-
editor/dialog/fck_checkbox.html (modified) (2 diffs)
-
editor/dialog/fck_colorselector.html (modified) (1 diff)
-
editor/dialog/fck_docprops.html (modified) (1 diff)
-
editor/dialog/fck_flash/fck_flash.js (modified) (6 diffs)
-
editor/dialog/fck_form.html (modified) (2 diffs)
-
editor/dialog/fck_hiddenfield.html (modified) (4 diffs)
-
editor/dialog/fck_image/fck_image.js (modified) (8 diffs)
-
editor/dialog/fck_link/fck_link.js (modified) (9 diffs)
-
editor/dialog/fck_listprop.html (modified) (3 diffs)
-
editor/dialog/fck_paste.html (modified) (1 diff)
-
editor/dialog/fck_radiobutton.html (modified) (2 diffs)
-
editor/dialog/fck_replace.html (modified) (8 diffs)
-
editor/dialog/fck_select.html (modified) (2 diffs)
-
editor/dialog/fck_smiley.html (modified) (3 diffs)
-
editor/dialog/fck_specialchar.html (modified) (1 diff)
-
editor/dialog/fck_table.html (modified) (3 diffs)
-
editor/dialog/fck_tablecell.html (modified) (4 diffs)
-
editor/dialog/fck_textarea.html (modified) (2 diffs)
-
editor/dialog/fck_textfield.html (modified) (2 diffs)
-
editor/dtd/fck_xhtml10strict.js (modified) (1 diff)
-
editor/dtd/fck_xhtml10transitional.js (modified) (1 diff)
-
editor/fckdialog.html (modified) (4 diffs)
-
editor/fckeditor.html (modified) (2 diffs)
-
editor/filemanager/connectors/aspx/connector.aspx (modified) (1 diff)
-
editor/filemanager/connectors/aspx/upload.aspx (modified) (1 diff)
-
editor/plugins/placeholder/fckplugin.js (modified) (1 diff)
-
editor/skins/default/fck_dialog.css (modified) (10 diffs)
-
editor/skins/default/fck_dialog_ie6.js (copied) (copied from FCKeditor/branches/features/floating_dialog/editor/skins/default/fck_dialog_ie6.js)
-
editor/skins/default/images/dialog.sides.gif (copied) (copied from FCKeditor/branches/features/floating_dialog/editor/skins/default/images/dialog.sides.gif)
-
editor/skins/default/images/dialog.sides.png (copied) (copied from FCKeditor/branches/features/floating_dialog/editor/skins/default/images/dialog.sides.png)
-
editor/skins/default/images/dialog.sides.rtl.png (copied) (copied from FCKeditor/branches/features/floating_dialog/editor/skins/default/images/dialog.sides.rtl.png)
-
editor/skins/default/images/sprites.gif (copied) (copied from FCKeditor/branches/features/floating_dialog/editor/skins/default/images/sprites.gif)
-
editor/skins/default/images/sprites.png (copied) (copied from FCKeditor/branches/features/floating_dialog/editor/skins/default/images/sprites.png)
-
editor/skins/office2003/fck_dialog.css (modified) (11 diffs)
-
editor/skins/office2003/fck_dialog_ie6.js (copied) (copied from FCKeditor/branches/features/floating_dialog/editor/skins/office2003/fck_dialog_ie6.js)
-
editor/skins/office2003/images/dialog.sides.gif (copied) (copied from FCKeditor/branches/features/floating_dialog/editor/skins/office2003/images/dialog.sides.gif)
-
editor/skins/office2003/images/dialog.sides.png (copied) (copied from FCKeditor/branches/features/floating_dialog/editor/skins/office2003/images/dialog.sides.png)
-
editor/skins/office2003/images/dialog.sides.rtl.png (copied) (copied from FCKeditor/branches/features/floating_dialog/editor/skins/office2003/images/dialog.sides.rtl.png)
-
editor/skins/office2003/images/sprites.gif (copied) (copied from FCKeditor/branches/features/floating_dialog/editor/skins/office2003/images/sprites.gif)
-
editor/skins/office2003/images/sprites.png (copied) (copied from FCKeditor/branches/features/floating_dialog/editor/skins/office2003/images/sprites.png)
-
editor/skins/silver/fck_dialog.css (modified) (10 diffs)
-
editor/skins/silver/fck_dialog_ie6.js (copied) (copied from FCKeditor/branches/features/floating_dialog/editor/skins/silver/fck_dialog_ie6.js)
-
editor/skins/silver/images/dialog.sides.gif (copied) (copied from FCKeditor/branches/features/floating_dialog/editor/skins/silver/images/dialog.sides.gif)
-
editor/skins/silver/images/dialog.sides.png (copied) (copied from FCKeditor/branches/features/floating_dialog/editor/skins/silver/images/dialog.sides.png)
-
editor/skins/silver/images/dialog.sides.rtl.png (copied) (copied from FCKeditor/branches/features/floating_dialog/editor/skins/silver/images/dialog.sides.rtl.png)
-
editor/skins/silver/images/sprites.gif (copied) (copied from FCKeditor/branches/features/floating_dialog/editor/skins/silver/images/sprites.gif)
-
editor/skins/silver/images/sprites.png (copied) (copied from FCKeditor/branches/features/floating_dialog/editor/skins/silver/images/sprites.png)
-
fckconfig.js (modified) (2 diffs)
-
fckpackager.xml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/_test/manual/testslist.html
r364 r1398 52 52 <option value="behaviors/showtableborders.html" selected="selected">Behaviors : Show table borders</option> 53 53 <option value="fckbrowserinfo/test1.html">fckbrowserinfo: test1</option> 54 <option value="fckdialog/test1.html">fckdialog: Memory leak test</option> 55 <option value="fckdialog/test2.html">fckdialog: Dialog/Flash z-placement test</option> 54 56 <option value="fckdomrange/test1.html">fckdomrange: test1</option> 55 57 <option value="fckdomtools/insertafternode.html">fckdomtools: insertafternode</option> -
FCKeditor/trunk/editor/_source/classes/fckstyle.js
r1378 r1398 95 95 * Apply the style to a FCKDomRange. 96 96 */ 97 ApplyToRange : function( range, selectIt )97 ApplyToRange : function( range, selectIt, updateRange ) 98 98 { 99 99 // ApplyToRange is not valid for FCK_STYLE_OBJECT types. … … 112 112 } 113 113 114 this.ApplyToRange( range, selectIt ) ;114 this.ApplyToRange( range, selectIt, updateRange ) ; 115 115 }, 116 116 … … 142 142 * effect. 143 143 */ 144 RemoveFromRange : function( range, selectIt )144 RemoveFromRange : function( range, selectIt, updateRange ) 145 145 { 146 146 var bookmark ; … … 277 277 range.SelectBookmark( bookmark ) ; 278 278 279 return ; 279 if ( updateRange ) 280 range.MoveToBookmark( bookmark ) ; 280 281 } 281 282 … … 402 403 if ( selectIt ) 403 404 range.SelectBookmark( bookmark ) ; 405 406 if ( updateRange ) 407 range.MoveToBookmark( bookmark ) ; 404 408 }, 405 409 … … 750 754 * - Properly handle block containers like <div> and <blockquote>. 751 755 */ 752 _ApplyBlockStyle : function( range, selectIt )756 _ApplyBlockStyle : function( range, selectIt, updateRange ) 753 757 { 754 758 // Bookmark the range so we can re-select it after processing. … … 769 773 // Move everything from the current node to the new one. 770 774 FCKDomTools.MoveChildren( block, newBlock ) ; 775 776 // If we're in a non-IE browser, and the newBlock is <pre>, and the old block is not <pre>, 777 // then we need to clear linebreaks and compress ANSI whitespaces so that we don't get disrupted 778 // output in <pre> mode. (Bug #1355) 779 if ( !FCKBrowserInfo.IsIE && newBlock.nodeName.IEquals( 'pre' ) && !block.nodeName.IEquals( 'pre' ) ) 780 { 781 // If the newBlock's first child is a text node, left-trim it since any ANSI whitespace 782 // after a non-pre block is meaningless. 783 if ( newBlock.firstChild && newBlock.firstChild.nodeType == 3 ) 784 newBlock.firstChild.nodeValue = newBlock.firstChild.nodeValue.LTrim() ; 785 786 // Ditto for the last child. 787 if ( newBlock.lastChild && newBlock.lastChild.nodeType == 3 ) 788 newBlock.lastChild.nodeValue = newBlock.lastChild.nodeValue.RTrim() ; 789 790 // DFS walk the newBlock to compress ANSI whitespaces and delete excessive linebreaks. 791 var currentNode = newBlock ; 792 while ( currentNode ) 793 { 794 currentNode = FCKDomTools.GetNextSourceNode( currentNode, false, 3, newBlock.parentNode ) ; 795 if ( currentNode ) 796 { 797 // If the text node ends with a line break, and its next sibling is a <BR>, 798 // then right-trim the text node. 799 if ( currentNode.nodeValue.charAt( currentNode.nodeValue.length - 1 ) == '\n' 800 && currentNode.nextSibling 801 && currentNode.nextSibling.nodeName.IEquals( 'br' ) ) 802 currentNode.nodeValue = currentNode.nodeValue.RTrim() ; 803 // If the text node begins with a line break, and its next sibling is a <BR>, 804 // then left-trim the text node. 805 if ( currentNode.nodeValue.charAt( 0 ) == '\n' 806 && currentNode.previousSibling 807 && currentNode.previousSibling.nodeName.IEquals( 'br' ) ) 808 currentNode.nodeValue = currentNode.nodeValue.LTrim() ; 809 // Compress any ANSI whitespaces left. 810 currentNode.nodeValue = currentNode.nodeValue.replace( /[\r\n\t ]+/g, ' ' ) ; 811 } 812 } 813 } 771 814 772 815 // Delete the current node. … … 777 820 if ( selectIt ) 778 821 range.SelectBookmark( bookmark ) ; 822 823 if ( updateRange ) 824 range.MoveToBookmark( range ) ; 779 825 }, 780 826 … … 789 835 * <span style="color: #ff0000;"><span style="background-color: #ffffff">XYZ</span></span> 790 836 */ 791 _ApplyInlineStyle : function( range, selectIt )837 _ApplyInlineStyle : function( range, selectIt, updateRange ) 792 838 { 793 839 var doc = range.Window.document ; … … 970 1016 if ( selectIt ) 971 1017 range.SelectBookmark( bookmark ) ; 1018 1019 if ( updateRange ) 1020 range.MoveToBookmark( bookmark ) ; 972 1021 }, 973 1022 -
FCKeditor/trunk/editor/_source/commandclasses/fck_othercommands.js
r1343 r1398 24 24 25 25 // ### General Dialog Box Commands. 26 var FCKDialogCommand = function( name, title, url, width, height, getStateFunction, getStateParam )26 var FCKDialogCommand = function( name, title, url, width, height, getStateFunction, getStateParam, customValue ) 27 27 { 28 28 this.Name = name ; … … 31 31 this.Width = width ; 32 32 this.Height = height ; 33 this.CustomValue = customValue ; 33 34 34 35 this.GetStateFunction = getStateFunction ; … … 40 41 FCKDialogCommand.prototype.Execute = function() 41 42 { 42 FCKDialog.OpenDialog( 'FCKDialog_' + this.Name , this.Title, this.Url, this.Width, this.Height, null, null, this.Resizable ) ;43 FCKDialog.OpenDialog( 'FCKDialog_' + this.Name , this.Title, this.Url, this.Width, this.Height, this.CustomValue, null, this.Resizable ) ; 43 44 } 44 45 -
FCKeditor/trunk/editor/_source/commandclasses/fcktextcolorcommand.js
r1343 r1398 109 109 this.className = 'ColorDeselected' ; 110 110 command._Panel.Hide() ; 111 FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, FCKTools.Hitch(command, 'SetColor') ) ; 111 FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, 112 FCKTools.Bind( command, command.SetColor ) ) ; 112 113 } 113 114 -
FCKeditor/trunk/editor/_source/internals/fck.js
r1388 r1398 957 957 return ; 958 958 959 if ( FCKConfig.Debug )960 FCKDebug._GetWindow() ;961 962 959 FCK.SetStatus( FCK_STATUS_ACTIVE ) ; 963 960 } -
FCKeditor/trunk/editor/_source/internals/fckbrowserinfo.js
r1191 r1398 28 28 IsIE : /*@cc_on!@*/false, 29 29 IsIE7 : /*@cc_on!@*/false && ( parseFloat( s.match( /msie ([\d|\.]+)/ )[1] ) >= 7 ), 30 IsIE6 : /*@cc_on!@*/false && ( parseFloat( s.match( /msie ([\d|\.]+)/ )[1] ) >= 6 ), 30 31 IsGecko : s.Contains('gecko/'), 31 32 IsSafari : s.Contains(' applewebkit/'), // Read "IsWebKit" -
FCKeditor/trunk/editor/_source/internals/fckcommands.js
r1343 r1398 48 48 case 'RemoveFormat' : oCommand = new FCKRemoveFormatCommand() ; break ; 49 49 50 case 'DocProps' : oCommand = new FCKDialogCommand( 'DocProps' , FCKLang.DocProps , 'dialog/fck_docprops.html' , 400, 3 90, FCKCommands.GetFullPageState ) ; break ;50 case 'DocProps' : oCommand = new FCKDialogCommand( 'DocProps' , FCKLang.DocProps , 'dialog/fck_docprops.html' , 400, 380, FCKCommands.GetFullPageState ) ; break ; 51 51 case 'Templates' : oCommand = new FCKDialogCommand( 'Templates' , FCKLang.DlgTemplatesTitle , 'dialog/fck_template.html' , 380, 450 ) ; break ; 52 case 'Link' : oCommand = new FCKDialogCommand( 'Link' , FCKLang.DlgLnkWindowTitle , 'dialog/fck_link.html' , 400, 3 30 ) ; break ;52 case 'Link' : oCommand = new FCKDialogCommand( 'Link' , FCKLang.DlgLnkWindowTitle , 'dialog/fck_link.html' , 400, 300 ) ; break ; 53 53 case 'Unlink' : oCommand = new FCKUnlinkCommand() ; break ; 54 case 'Anchor' : oCommand = new FCKDialogCommand( 'Anchor' , FCKLang.DlgAnchorTitle , 'dialog/fck_anchor.html' , 370, 1 70 ) ; break ;54 case 'Anchor' : oCommand = new FCKDialogCommand( 'Anchor' , FCKLang.DlgAnchorTitle , 'dialog/fck_anchor.html' , 370, 160 ) ; break ; 55 55 case 'AnchorDelete' : oCommand = new FCKAnchorDeleteCommand() ; break ; 56 case 'BulletedList' : oCommand = new FCKDialogCommand( 'BulletedList', FCKLang.BulletedListProp , 'dialog/fck_listprop.html?UL' , 370, 170 ) ; break ; 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, function(){ return FCK_TRISTATE_OFF ; } ) ; break ; 56 case 'BulletedList' : oCommand = new FCKDialogCommand( 'BulletedList', FCKLang.BulletedListProp , 'dialog/fck_listprop.html?UL' , 370, 160 ) ; break ; 57 case 'NumberedList' : oCommand = new FCKDialogCommand( 'NumberedList', FCKLang.NumberedListProp , 'dialog/fck_listprop.html?OL' , 370, 160 ) ; break ; 58 case 'About' : oCommand = new FCKDialogCommand( 'About' , FCKLang.About , 'dialog/fck_about.html' , 400, 310, function(){ return FCK_TRISTATE_OFF ; } ) ; break ; 59 case 'Find' : oCommand = new FCKDialogCommand( 'Find' , FCKLang.DlgFindAndReplaceTitle, 'dialog/fck_replace.html' , 340, 230, null, null, 'Find' ) ; break ; 60 case 'Replace' : oCommand = new FCKDialogCommand( 'Replace' , FCKLang.DlgFindAndReplaceTitle, 'dialog/fck_replace.html' , 340, 230, null, null, 'Replace' ) ; break ; 59 61 60 case 'Find' : oCommand = new FCKDialogCommand( 'Find' , FCKLang.DlgFindAndReplaceTitle , 'dialog/fck_replace.html' , 340, 250 ) ; break ; 61 case 'Replace' : oCommand = new FCKDialogCommand( 'Replace' , FCKLang.DlgFindAndReplaceTitle , 'dialog/fck_replace.html' , 340, 250 ) ; break ; 62 63 case 'Image' : oCommand = new FCKDialogCommand( 'Image' , FCKLang.DlgImgTitle , 'dialog/fck_image.html' , 450, 400 ) ; break ; 64 case 'Flash' : oCommand = new FCKDialogCommand( 'Flash' , FCKLang.DlgFlashTitle , 'dialog/fck_flash.html' , 450, 400 ) ; break ; 65 case 'SpecialChar' : oCommand = new FCKDialogCommand( 'SpecialChar', FCKLang.DlgSpecialCharTitle , 'dialog/fck_specialchar.html' , 400, 320 ) ; break ; 62 case 'Image' : oCommand = new FCKDialogCommand( 'Image' , FCKLang.DlgImgTitle , 'dialog/fck_image.html' , 450, 390 ) ; break ; 63 case 'Flash' : oCommand = new FCKDialogCommand( 'Flash' , FCKLang.DlgFlashTitle , 'dialog/fck_flash.html' , 450, 390 ) ; break ; 64 case 'SpecialChar' : oCommand = new FCKDialogCommand( 'SpecialChar', FCKLang.DlgSpecialCharTitle , 'dialog/fck_specialchar.html' , 400, 290 ) ; break ; 66 65 case 'Smiley' : oCommand = new FCKDialogCommand( 'Smiley' , FCKLang.DlgSmileyTitle , 'dialog/fck_smiley.html' , FCKConfig.SmileyWindowWidth, FCKConfig.SmileyWindowHeight ) ; break ; 67 66 case 'Table' : oCommand = new FCKDialogCommand( 'Table' , FCKLang.DlgTableTitle , 'dialog/fck_table.html' , 480, 250 ) ; break ; 68 67 case 'TableProp' : oCommand = new FCKDialogCommand( 'Table' , FCKLang.DlgTableTitle , 'dialog/fck_table.html?Parent', 480, 250 ) ; break ; 69 case 'TableCellProp': oCommand = new FCKDialogCommand( 'TableCell' , FCKLang.DlgCellTitle , 'dialog/fck_tablecell.html' , 550, 2 50 ) ; break ;68 case 'TableCellProp': oCommand = new FCKDialogCommand( 'TableCell' , FCKLang.DlgCellTitle , 'dialog/fck_tablecell.html' , 550, 240 ) ; break ; 70 69 71 70 case 'Style' : oCommand = new FCKStyleCommand() ; break ; … … 113 112 case 'TableDelete' : oCommand = new FCKTableCommand('TableDelete') ; break ; 114 113 115 case 'Form' : oCommand = new FCKDialogCommand( 'Form' , FCKLang.Form , 'dialog/fck_form.html' , 380, 2 30 ) ; break ;116 case 'Checkbox' : oCommand = new FCKDialogCommand( 'Checkbox' , FCKLang.Checkbox , 'dialog/fck_checkbox.html' , 380, 2 30 ) ; break ;117 case 'Radio' : oCommand = new FCKDialogCommand( 'Radio' , FCKLang.RadioButton , 'dialog/fck_radiobutton.html' , 380, 2 30 ) ; break ;118 case 'TextField' : oCommand = new FCKDialogCommand( 'TextField' , FCKLang.TextField , 'dialog/fck_textfield.html' , 380, 2 30 ) ; break ;119 case 'Textarea' : oCommand = new FCKDialogCommand( 'Textarea' , FCKLang.Textarea , 'dialog/fck_textarea.html' , 380, 2 30 ) ; break ;120 case 'HiddenField' : oCommand = new FCKDialogCommand( 'HiddenField', FCKLang.HiddenField , 'dialog/fck_hiddenfield.html' , 380, 230 ) ; break ;121 case 'Button' : oCommand = new FCKDialogCommand( 'Button' , FCKLang.Button , 'dialog/fck_button.html' , 380, 2 30 ) ; break ;122 case 'Select' : oCommand = new FCKDialogCommand( 'Select' , FCKLang.SelectionField, 'dialog/fck_select.html' , 400, 3 80 ) ; break ;123 case 'ImageButton' : oCommand = new FCKDialogCommand( 'ImageButton', FCKLang.ImageButton , 'dialog/fck_image.html?ImageButton', 450, 400 ) ; break ;114 case 'Form' : oCommand = new FCKDialogCommand( 'Form' , FCKLang.Form , 'dialog/fck_form.html' , 380, 210 ) ; break ; 115 case 'Checkbox' : oCommand = new FCKDialogCommand( 'Checkbox' , FCKLang.Checkbox , 'dialog/fck_checkbox.html' , 380, 200 ) ; break ; 116 case 'Radio' : oCommand = new FCKDialogCommand( 'Radio' , FCKLang.RadioButton , 'dialog/fck_radiobutton.html' , 380, 200 ) ; break ; 117 case 'TextField' : oCommand = new FCKDialogCommand( 'TextField' , FCKLang.TextField , 'dialog/fck_textfield.html' , 380, 210 ) ; break ; 118 case 'Textarea' : oCommand = new FCKDialogCommand( 'Textarea' , FCKLang.Textarea , 'dialog/fck_textarea.html' , 380, 210 ) ; break ; 119 case 'HiddenField' : oCommand = new FCKDialogCommand( 'HiddenField', FCKLang.HiddenField , 'dialog/fck_hiddenfield.html' , 380, 190 ) ; break ; 120 case 'Button' : oCommand = new FCKDialogCommand( 'Button' , FCKLang.Button , 'dialog/fck_button.html' , 380, 210 ) ; break ; 121 case 'Select' : oCommand = new FCKDialogCommand( 'Select' , FCKLang.SelectionField, 'dialog/fck_select.html' , 400, 340 ) ; break ; 122 case 'ImageButton' : oCommand = new FCKDialogCommand( 'ImageButton', FCKLang.ImageButton , 'dialog/fck_image.html?ImageButton', 450, 390 ) ; break ; 124 123 125 124 case 'SpellCheck' : oCommand = new FCKSpellCheckCommand() ; break ; -
FCKeditor/trunk/editor/_source/internals/fckdialog.js
r132 r1398 22 22 */ 23 23 24 var FCKDialog = new Object() ; 25 26 // This method opens a dialog window using the standard dialog template. 27 FCKDialog.OpenDialog = function( dialogName, dialogTitle, dialogPage, width, height, customValue, parentWindow, resizable ) 24 var FCKDialog = ( function() 28 25 { 29 // Setup the dialog info. 30 var oDialogInfo = new Object() ; 31 oDialogInfo.Title = dialogTitle ; 32 oDialogInfo.Page = dialogPage ; 33 oDialogInfo.Editor = window ; 34 oDialogInfo.CustomValue = customValue ; // Optional 35 36 var sUrl = FCKConfig.BasePath + 'fckdialog.html' ; 37 this.Show( oDialogInfo, dialogName, sUrl, width, height, parentWindow, resizable ) ; 38 } 26 var topDialog ; 27 var baseZIndex ; 28 var cover ; 29 30 // The document that holds the dialog. 31 var topWindow = window.parent ; 32 33 while ( topWindow.parent && topWindow.parent != topWindow ) 34 { 35 try 36 { 37 if ( topWindow.parent.document.domain != document.domain ) 38 break ; 39 if ( topWindow.parent.document.getElementsByTagName( 'frameset' ).length > 0 ) 40 break ; 41 } 42 catch ( e ) 43 { 44 break ; 45 } 46 topWindow = topWindow.parent ; 47 } 48 49 var topDocument = topWindow.document ; 50 51 var getZIndex = function() 52 { 53 if ( !baseZIndex ) 54 baseZIndex = FCKConfig.FloatingPanelsZIndex + 999 ; 55 return ++baseZIndex ; 56 } 57 58 // TODO : This logic is not actually working when reducing the window, only 59 // when enlarging it. 60 var resizeHandler = function() 61 { 62 if ( !cover ) 63 return ; 64 65 var documentElement = topDocument.documentElement ; 66 67 FCKDomTools.SetElementStyles( cover, 68 { 69 'width' : Math.max( documentElement.scrollWidth, 70 documentElement.clientWidth, 71 topDocument.scrollWidth || 0 ) - 1 + 'px', 72 'height' : Math.max( documentElement.scrollHeight, 73 documentElement.clientHeight, 74 topDocument.scrollHeight || 0 ) - 1 + 'px' 75 } ) ; 76 } 77 78 return { 79 SelectionData : null, 80 81 /** 82 * Opens a dialog window using the standard dialog template. 83 */ 84 OpenDialog : function( dialogName, dialogTitle, dialogPage, width, height, customValue, parentWindow, resizable ) 85 { 86 if ( !topDialog ) 87 this.DisplayMainCover() ; 88 89 // Setup the dialog info to be passed to the dialog. 90 var dialogInfo = 91 { 92 Title : dialogTitle, 93 Page : dialogPage, 94 Editor : window, 95 CustomValue : customValue, // Optional 96 SelectionData : null, 97 TopWindow : topWindow 98 } 99 100 var currentInstance = FCK.ToolbarSet.CurrentInstance ; 101 102 // IE doens't support multiple selections, even if in different 103 // IFRAMEs, like the dialog, so the current selection must be saved to 104 // be restored in the dialog code. 105 if ( FCKBrowserInfo.IsIE && !topDialog ) 106 { 107 var editorDocument = currentInstance.EditorDocument ; 108 var selection = editorDocument.selection ; 109 var range ; 110 111 if ( selection ) 112 { 113 range = selection.createRange() ; 114 115 // Ensure that the range comes from the editor document. 116 if ( range ) 117 { 118 if ( range.parentElement && FCKTools.GetElementDocument( range.parentElement() ) != editorDocument ) 119 range = null ; 120 else if ( range.item && FCKTools.GetElementDocument( range.item(0) )!= editorDocument ) 121 range = null ; 122 } 123 } 124 125 this.SelectionData = range ; 126 } 127 128 // Calculate the dialog position, centering it on the screen. 129 var viewSize = FCKTools.GetViewPaneSize( topWindow ) ; 130 var scrollPosition = FCKTools.GetScrollPosition( topWindow ) ; 131 var iTop = Math.max( scrollPosition.Y + ( viewSize.Height - height - 20 ) / 2, 0 ) ; 132 var iLeft = Math.max( scrollPosition.X + ( viewSize.Width - width - 20 ) / 2, 0 ) ; 133 134 // Setup the IFRAME that will hold the dialog. 135 var dialog = topDocument.createElement( 'iframe' ) ; 136 dialog.src = FCKConfig.BasePath + 'fckdialog.html' ; 137 138 // Dummy URL for testing whether the code in fckdialog.js alone leaks memory. 139 // dialog.src = 'about:blank'; 140 141 dialog.frameBorder = 0 ; 142 dialog.allowTransparency = true ; 143 FCKDomTools.SetElementStyles( dialog, 144 { 145 'position' : 'absolute', 146 'top' : iTop + 'px', 147 'left' : iLeft + 'px', 148 'width' : width + 'px', 149 'height' : height + 'px', 150 'zIndex' : getZIndex() 151 } ) ; 152 153 // Save the dialog info to be used by the dialog page once loaded. 154 dialog._DialogArguments = dialogInfo ; 155 156 // Append the IFRAME to the target document. 157 topDocument.body.appendChild( dialog ) ; 158 159 // Keep record of the dialog's parent/child relationships. 160 dialog._ParentDialog = topDialog ; 161 topDialog = dialog ; 162 }, 163 164 /** 165 * (For internal use) 166 * Called when the top dialog is closed. 167 */ 168 OnDialogClose : function( dialogWindow ) 169 { 170 var dialog = dialogWindow.frameElement ; 171 FCKDomTools.RemoveNode( dialog ) ; 172 173 if ( dialog._ParentDialog ) // Nested Dialog. 174 { 175 topDialog = dialog._ParentDialog ; 176 dialog._ParentDialog.contentWindow.SetEnabled( true ) ; 177 } 178 else // First Dialog. 179 { 180 // Set the Focus in the browser, so the "OnBlur" event is not 181 // fired. In IE, there is no need to d othat because the dialog 182 // already moved the selection to the editing area before 183 // closing (EnsureSelection). Also, the Focus() call here 184 // causes memory leak on IE7 (weird). 185 if ( !FCKBrowserInfo.IsIE ) 186 FCK.Focus() ; 187 188 this.HideMainCover() ; 189 topDialog = null ; 190 this.SelectionData = null ; 191 } 192 }, 193 194 DisplayMainCover : function() 195 { 196 // Setup the DIV that will be used to cover. 197 cover = topDocument.createElement( 'div' ) ; 198 FCKDomTools.SetElementStyles( cover, 199 { 200 'position' : 'absolute', 201 'zIndex' : getZIndex(), 202 'top' : '0px', 203 'left' : '0px', 204 'backgroundColor' : FCKConfig.BackgroundBlockerColor 205 } ) ; 206 FCKDomTools.SetOpacity( cover, FCKConfig.BackgroundBlockerOpacity ) ; 207 208 // For IE6-, we need to fill the cover with a transparent IFRAME, 209 // to properly block <select> fields. 210 if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 ) 211 { 212 var iframe = topDocument.createElement( 'iframe' ) ; 213 iframe.hideFocus = true ; 214 iframe.frameBorder = 0 ; 215 iframe.src = FCKTools.GetVoidUrl() ; 216 FCKDomTools.SetElementStyles( iframe, 217 { 218 'width' : '100%', 219 'height' : '100%', 220 'position' : 'absolute', 221 'left' : '0px', 222 'top' : '0px', 223 'filter' : 'progid:DXImageTransform.Microsoft.Alpha(opacity=0)' 224 } ) ; 225 cover.appendChild( iframe ) ; 226 } 227 228 // We need to manually adjust the cover size on resize. 229 FCKTools.AddEventListener( topWindow, 'resize', resizeHandler ) ; 230 resizeHandler() ; 231 232 topDocument.body.appendChild( cover ) ; 233 234 FCKFocusManager.Lock() ; 235 }, 236 237 HideMainCover : function() 238 { 239 FCKDomTools.RemoveNode( cover ) ; 240 FCKFocusManager.Unlock() ; 241 }, 242 243 GetCover : function() 244 { 245 return cover ; 246 } 247 } ; 248 } )() ; -
FCKeditor/trunk/editor/_source/internals/fckdomtools.js
r1384 r1398 925 925 }, 926 926 927 SetOpacity : function( element, opacity ) 928 { 929 if ( FCKBrowserInfo.IsIE ) 930 { 931 opacity = Math.round( opacity * 100 ) ; 932 element.style.filter = ( opacity > 100 ? '' : 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + opacity + ')' ) ; 933 } 934 else 935 element.style.opacity = opacity ; 936 }, 937 927 938 GetCurrentElementStyle : function( element, propertyName ) 928 939 { … … 936 947 { 937 948 var currentElement = element ; 949 938 950 while ( currentElement != FCKTools.GetElementDocument( currentElement ).documentElement ) 939 951 { 940 952 if ( this.GetCurrentElementStyle( currentElement, 'position' ) != 'static' ) 941 953 return currentElement ; 942 currentElement = currentElement.parentNode ; 943 } 954 955 if ( currentElement == FCKTools.GetElementDocument( currentElement ).documentElement 956 && currentWindow != w ) 957 currentElement = currentWindow.frameElement ; 958 else 959 currentElement = currentElement.parentNode ; 960 } 961 944 962 return null ; 945 963 }, -
FCKeditor/trunk/editor/_source/internals/fcktools.js
r1384 r1398 367 367 { 368 368 // There is no compatMode in Safari, but it seams that it always behave as 369 // CSS1Compat, so let's assume it as the default .370 return ( 'CSS1Compat' == ( document.compatMode || 'CSS1Compat') ) ;369 // CSS1Compat, so let's assume it as the default for that browser. 370 return ( 'CSS1Compat' == ( document.compatMode || ( FCKBrowserInfo.IsSafari ? 'CSS1Compat' : null ) ) ) ; 371 371 } 372 372 … … 452 452 prevNode = null ; 453 453 if ( curNode ) 454 curWindow = FCKTools.GetElementWindow( curNode );454 curWindow = curNode.contentWindow.parent ; 455 455 } 456 456 else … … 612 612 613 613 /** 614 * Utility function to wrap a call to an object's method, 615 * so it can be passed for example to an event handler, 616 * and then it will be executed with 'this' being the object. 617 */ 618 FCKTools.Hitch = function( obj, methodName ) 619 { 620 return function() { obj[methodName].apply(obj, arguments); } ; 621 } 614 * Binding the "this" reference to an object for a function. 615 */ 616 FCKTools.Bind = function( subject, func ) 617 { 618 return function(){ return func.apply( subject, arguments ) ; } ; 619 } 620 621 /** 622 * Retrieve the correct "empty iframe" URL for the current browser, which 623 * causes the minimum fuzz (e.g. security warnings in HTTPS, DNS error in 624 * IE5.5, etc.) for that browser, making the iframe ready to DOM use whithout 625 * having to loading an external file. 626 */ 627 FCKTools.GetVoidUrl = function() 628 { 629 if ( FCK_IS_CUSTOM_DOMAIN ) 630 return "javascript: void( function(){" + 631 "document.open();" + 632 "document.write('<html><head><title></title></head><body></body></html>');" + 633 "document.domain = '" + FCK_RUNTIME_DOMAIN + "';" + 634 "document.close();" + 635 "}() ) ;"; 636 637 if ( FCKBrowserInfo.IsIE ) 638 { 639 if ( FCKBrowserInfo.IsIE7 || !FCKBrowserInfo.IsIE6 ) 640 return "" ; // IE7+ / IE5.5 641 else 642 return "javascript: '';" ; // IE6+ 643 } 644 645 return "javascript: void(0);" ; // All other browsers. 646 } -
FCKeditor/trunk/editor/_source/internals/fcktools_gecko.js
r1192 r1398 31 31 { 32 32 if ( FCKBrowserInfo.IsGecko ) 33 element.style.MozUserSelect = 'none' ; // Gecko only. 33 element.style.MozUserSelect = 'none' ; // Gecko only. 34 else if ( FCKBrowserInfo.IsSafari ) 35 element.style.KhtmlUserSelect = 'none' ; // WebKit only. 34 36 else 35 element.style.userSelect = 'none' ; // CSS3 (not supported yet).37 element.style.userSelect = 'none' ; // CSS3 (not supported yet). 36 38 } 37 39 … … 224 226 targetWindow.$ = function( id ) 225 227 { 226 return t his.document.getElementById( id ) ;228 return targetWindow.document.getElementById( id ) ; 227 229 } ; 228 230 } -
FCKeditor/trunk/editor/dialog/common/fck_dialog_common.js
r1192 r1398 91 91 } 92 92 93 var KeyIdentifierMap = 94 { 95 End : 35, 96 Home : 36, 97 Left : 37, 98 Right : 39, 99 'U+00007F' : 46 // Delete 100 } 93 function SelectField( elementId ) 94 { 95 var element = GetE( elementId ) ; 96 element.focus() ; 97 element.select() ; 98 } 101 99 102 100 // Functions used by text fields to accept numbers only. 103 function IsDigit( e ) 104 { 105 if ( !e ) 106 e = event ; 107 108 var iCode = ( e.keyCode || e.charCode ) ; 109 110 if ( !iCode && e.keyIdentifier && ( e.keyIdentifier in KeyIdentifierMap ) ) 111 iCode = KeyIdentifierMap[ e.keyIdentifier ] ; 112 113 return ( 114 ( iCode >= 48 && iCode <= 57 ) // Numbers 115 || (iCode >= 35 && iCode <= 40) // Arrows, Home, End 116 || iCode == 8 // Backspace 117 || iCode == 46 // Delete 118 || iCode == 9 // Tab 119 ) ; 120 } 101 var IsDigit = ( function() 102 { 103 var KeyIdentifierMap = 104 { 105 End : 35, 106 Home : 36, 107 Left : 37, 108 Right : 39, 109 'U+00007F' : 46 // Delete 110 } ; 111 112 return function ( e ) 113 { 114 if ( !e ) 115 e = event ; 116 117 var iCode = ( e.keyCode || e.charCode ) ; 118 119 if ( !iCode && e.keyIdentifier && ( e.keyIdentifier in KeyIdentifierMap ) ) 120 iCode = KeyIdentifierMap[ e.keyIdentifier ] ; 121 122 return ( 123 ( iCode >= 48 && iCode <= 57 ) // Numbers 124 || (iCode >= 35 && iCode <= 40) // Arrows, Home, End 125 || iCode == 8 // Backspace 126 || iCode == 46 // Delete 127 || iCode == 9 // Tab 128 ) ; 129 } 130 } )() ; 121 131 122 132 String.prototype.Trim = function() -
FCKeditor/trunk/editor/dialog/fck_anchor.html
r1108 r1398 30 30 <script type="text/javascript"> 31 31 32 var oEditor = window.parent.InnerDialogLoaded() ; 33 var FCK = oEditor.FCK ; 34 var FCKBrowserInfo = oEditor.FCKBrowserInfo ; 35 var FCKTools = oEditor.FCKTools ; 36 var FCKRegexLib = oEditor.FCKRegexLib ; 37 38 // Gets the document DOM 39 var oDOM = oEditor.FCK.EditorDocument ; 40 41 var oFakeImage = FCK.Selection.GetSelectedElement() ; 32 var dialog = window.parent ; 33 var oEditor = dialog.InnerDialogLoaded() ; 34 35 var FCK = oEditor.FCK ; 36 var FCKBrowserInfo = oEditor.FCKBrowserInfo ; 37 var FCKTools = oEditor.FCKTools ; 38 var FCKRegexLib = oEditor.FCKRegexLib ; 39 40 var oDOM = FCK.EditorDocument ; 41 42 var oFakeImage = dialog.Selection.GetSelectedElement() ; 43 42 44 var oAnchor ; 43 45 … … 70 72 window.parent.SetOkButton( true ) ; 71 73 window.parent.SetAutoSize( true ) ; 74 75 SelectField( 'txtName' ) ; 72 76 } 73 77 -
FCKeditor/trunk/editor/dialog/fck_button.html
r1108 r1398 30 30 <script type="text/javascript"> 31 31 32 var oEditor = window.parent.InnerDialogLoaded() ; 32 var dialog = window.parent ; 33 var oEditor = dialog.InnerDialogLoaded() ; 33 34 34 35 // Gets the document DOM 35 36 var oDOM = oEditor.FCK.EditorDocument ; 36 37 37 var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;38 var oActiveEl = dialog.Selection.GetSelectedElement() ; 38 39 39 40 window.onload = function() … … 53 54 oActiveEl = null ; 54 55 55 window.parent.SetOkButton( true ) ; 56 window.parent.SetAutoSize( true ) ; 56 dialog.SetOkButton( true ) ; 57 dialog.SetAutoSize( true ) ; 58 SelectField( 'txtName' ) ; 57 59 } 58 60 -
FCKeditor/trunk/editor/dialog/fck_checkbox.html
r1108 r1398 30 30 <script type="text/javascript"> 31 31 32 var oEditor = window.parent.InnerDialogLoaded() ; 32 var dialog = window.parent ; 33 var oEditor = dialog.InnerDialogLoaded() ; 33 34 34 35 // Gets the document DOM 35 36 var oDOM = oEditor.FCK.EditorDocument ; 36 37 37 var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;38 var oActiveEl = dialog.Selection.GetSelectedElement() ; 38 39 39 40 window.onload = function() … … 51 52 oActiveEl = null ; 52 53 53 window.parent.SetOkButton( true ) ; 54 window.parent.SetAutoSize( true ) ; 54 dialog.SetOkButton( true ) ; 55 dialog.SetAutoSize( true ) ; 56 SelectField( 'txtName' ) ; 55 57 } 56 58 -
FCKeditor/trunk/editor/dialog/fck_colorselector.html
r1192 r1398 137 137 function Ok() 138 138 { 139 if ( typeof(window.parent. args.CustomValue) == 'function' )140 window.parent. args.CustomValue( document.getElementById('selcolor').value ) ;139 if ( typeof(window.parent.Args().CustomValue) == 'function' ) 140 window.parent.Args().CustomValue( document.getElementById('selcolor').value ) ; 141 141 142 142 return true ; -
FCKeditor/trunk/editor/dialog/fck_docprops.html
r644 r1398 375 375 switch ( wich ) 376 376 { 377 case 'Back' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 4 00, 330, SelectBackColor, window ) ; return ;378 case 'ColorText' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 4 00, 330, SelectColorText, window ) ; return ;379 case 'ColorLink' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 4 00, 330, SelectColorLink, window ) ; return ;380 case 'ColorVisited' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 4 00, 330, SelectColorVisited, window ) ; return ;381 case 'ColorActive' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 4 00, 330, SelectColorActive, window ) ; return ;377 case 'Back' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectBackColor, window ) ; return ; 378 case 'ColorText' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorText, window ) ; return ; 379 case 'ColorLink' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorLink, window ) ; return ; 380 case 'ColorVisited' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorVisited, window ) ; return ; 381 case 'ColorActive' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorActive, window ) ; return ; 382 382 } 383 383 } -
FCKeditor/trunk/editor/dialog/fck_flash/fck_flash.js
r1253 r1398 22 22 */ 23 23 24 var oEditor = window.parent.InnerDialogLoaded() ; 24 var dialog = window.parent ; 25 var oEditor = dialog.InnerDialogLoaded() ; 25 26 var FCK = oEditor.FCK ; 26 27 var FCKLang = oEditor.FCKLang ; … … 30 31 31 32 // Set the dialog tabs. 32 window.parent.AddTab( 'Info', oEditor.FCKLang.DlgInfoTab ) ;33 dialog.AddTab( 'Info', oEditor.FCKLang.DlgInfoTab ) ; 33 34 34 35 if ( FCKConfig.FlashUpload ) 35 window.parent.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ;36 dialog.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ; 36 37 37 38 if ( !FCKConfig.FlashDlgHideAdvanced ) 38 window.parent.AddTab( 'Advanced', oEditor.FCKLang.DlgAdvancedTag ) ;39 dialog.AddTab( 'Advanced', oEditor.FCKLang.DlgAdvancedTag ) ; 39 40 40 41 // Function called when a dialog tag is selected. … … 47 48 48 49 // Get the selected flash embed (if available). 49 var oFakeImage = FCK.Selection.GetSelectedElement() ;50 var oFakeImage = dialog.Selection.GetSelectedElement() ; 50 51 var oEmbed ; 51 52 … … 73 74 GetE('frmUpload').action = FCKConfig.FlashUploadURL ; 74 75 75 window.parent.SetAutoSize( true ) ;76 dialog.SetAutoSize( true ) ; 76 77 77 78 // Activate the "OK" button. 78 window.parent.SetOkButton( true ) ; 79 dialog.SetOkButton( true ) ; 80 81 SelectField( 'txtUrl' ) ; 79 82 } 80 83 … … 115 118 if ( GetE('txtUrl').value.length == 0 ) 116 119 { 117 window.parent.SetSelectedTab( 'Info' ) ;120 dialog.SetSelectedTab( 'Info' ) ; 118 121 GetE('txtUrl').focus() ; 119 122 … … 228 231 UpdatePreview() ; 229 232 230 window.parent.SetSelectedTab( 'Info' ) ;233 dialog.SetSelectedTab( 'Info' ) ; 231 234 } 232 235 -
FCKeditor/trunk/editor/dialog/fck_form.html
r1108 r1398 30 30 <script type="text/javascript"> 31 31 32 var oEditor = window.parent.InnerDialogLoaded() ; 32 var dialog = window.parent ; 33 var oEditor = dialog.InnerDialogLoaded() ; 33 34 34 35 // Gets the document DOM 35 36 var oDOM = oEditor.FCK.EditorDocument ; 36 37 37 var oActiveEl = oEditor.FCKSelection.MoveToAncestorNode( 'FORM' ) ;38 var oActiveEl = dialog.Selection.GetSelection().MoveToAncestorNode( 'FORM' ) ; 38 39 39 40 window.onload = function() … … 51 52 oActiveEl = null ; 52 53 53 window.parent.SetOkButton( true ) ; 54 window.parent.SetAutoSize( true ) ; 54 dialog.SetOkButton( true ) ; 55 dialog.SetAutoSize( true ) ; 56 SelectField( 'txtName' ) ; 55 57 } 56 58 -
FCKeditor/trunk/editor/dialog/fck_hiddenfield.html
r1108 r1398 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > 2 2 <!-- 3 3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net … … 30 30 <script type="text/javascript"> 31 31 32 var oEditor = window.parent.InnerDialogLoaded() ; 32 var dialog = window.parent ; 33 var oEditor = dialog.InnerDialogLoaded() ; 34 33 35 var FCK = oEditor.FCK ; 34 36 … … 37 39 38 40 // Get the selected flash embed (if available). 39 var oFakeImage = FCK.Selection.GetSelectedElement() ;41 var oFakeImage = dialog.Selection.GetSelectedElement() ; 40 42 var oActiveEl ; 41 43 … … 59 61 } 60 62 61 window.parent.SetOkButton( true ) ; 62 window.parent.SetAutoSize( true ) ; 63 dialog.SetOkButton( true ) ; 64 dialog.SetAutoSize( true ) ; 65 SelectField( 'txtName' ) ; 63 66 } 64 67 -
FCKeditor/trunk/editor/dialog/fck_image/fck_image.js
r1253 r1398 22 22 */ 23 23 24 var oEditor = window.parent.InnerDialogLoaded() ; 24 var dialog = window.parent ; 25 var oEditor = dialog.InnerDialogLoaded() ; 25 26 var FCK = oEditor.FCK ; 26 27 var FCKLang = oEditor.FCKLang ; … … 33 34 34 35 // Set the dialog tabs. 35 window.parent.AddTab( 'Info', FCKLang.DlgImgInfoTab ) ;36 dialog.AddTab( 'Info', FCKLang.DlgImgInfoTab ) ; 36 37 37 38 if ( !bImageButton && !FCKConfig.ImageDlgHideLink ) 38 window.parent.AddTab( 'Link', FCKLang.DlgImgLinkTab ) ;39 dialog.AddTab( 'Link', FCKLang.DlgImgLinkTab ) ; 39 40 40 41 if ( FCKConfig.ImageUpload ) 41 window.parent.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ;42 dialog.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ; 42 43 43 44 if ( !FCKConfig.ImageDlgHideAdvanced ) 44 window.parent.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ;45 dialog.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ; 45 46 46 47 // Function called when a dialog tag is selected. … … 54 55 55 56 // Get the selected image (if available). 56 var oImage = FCK.Selection.GetSelectedElement() ;57 var oImage = dialog.Selection.GetSelectedElement() ; 57 58 58 59 if ( oImage && oImage.tagName != 'IMG' && !( oImage.tagName == 'INPUT' && oImage.type == 'image' ) ) … … 60 61 61 62 // Get the active link. 62 var oLink = FCK.Selection.MoveToAncestorNode( 'A' ) ;63 var oLink = dialog.Selection.GetSelection().MoveToAncestorNode( 'A' ) ; 63 64 64 65 var oImageOriginal ; … … 112 113 GetE('frmUpload').action = FCKConfig.ImageUploadURL ; 113 114 114 window.parent.SetAutoSize( true ) ;115 dialog.SetAutoSize( true ) ; 115 116 116 117 // Activate the "OK" button. 117 window.parent.SetOkButton( true ) ; 118 dialog.SetOkButton( true ) ; 119 120 SelectField( 'txtUrl' ) ; 118 121 } 119 122 … … 198 201 if ( GetE('txtUrl').value.length == 0 ) 199 202 { 200 window.parent.SetSelectedTab( 'Info' ) ;203 dialog.SetSelectedTab( 'Info' ) ; 201 204 GetE('txtUrl').focus() ; 202 205 … … 247 250 else // Creating a new link. 248 251 { 252 dialog.Selection.EnsureSelection() ; 253 249 254 if ( !bHasImage ) 250 255 oEditor.FCKSelection.SelectNode( oImage ) ; … … 434 439 } 435 440 436 window.parent.SetSelectedTab( 'Info' ) ;441 dialog.SetSelectedTab( 'Info' ) ; 437 442 } 438 443 -
FCKeditor/trunk/editor/dialog/fck_link/fck_link.js
r1253 r1398 22 22 */ 23 23 24 var oEditor = window.parent.InnerDialogLoaded() ; 24 var dialog = window.parent ; 25 var oEditor = dialog.InnerDialogLoaded() ; 26 25 27 var FCK = oEditor.FCK ; 26 28 var FCKLang = oEditor.FCKLang ; … … 32 34 33 35 // Set the dialog tabs. 34 window.parent.AddTab( 'Info', FCKLang.DlgLnkInfoTab ) ;36 dialog.AddTab( 'Info', FCKLang.DlgLnkInfoTab ) ; 35 37 36 38 if ( !FCKConfig.LinkDlgHideTarget ) 37 window.parent.AddTab( 'Target', FCKLang.DlgLnkTargetTab, true ) ;39 dialog.AddTab( 'Target', FCKLang.DlgLnkTargetTab, true ) ; 38 40 39 41 if ( FCKConfig.LinkUpload ) 40 window.parent.AddTab( 'Upload', FCKLang.DlgLnkUpload, true ) ;42 dialog.AddTab( 'Upload', FCKLang.DlgLnkUpload, true ) ; 41 43 42 44 if ( !FCKConfig.LinkDlgHideAdvanced ) 43 window.parent.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ;45 dialog.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ; 44 46 45 47 // Function called when a dialog tag is selected. … … 51 53 ShowE('divAttribs' , ( tabCode == 'Advanced' ) ) ; 52 54 53 window.parent.SetAutoSize( true ) ;55 dialog.SetAutoSize( true ) ; 54 56 } 55 57 … … 125 127 126 128 // oLink: The actual selected link in the editor. 127 var oLink = FCK.Selection.MoveToAncestorNode( 'A' ) ;129 var oLink = dialog.Selection.GetSelection().MoveToAncestorNode( 'A' ) ; 128 130 if ( oLink ) 129 131 FCK.Selection.SelectNode( oLink ) ; … … 157 159 158 160 // Activate the "OK" button. 159 window.parent.SetOkButton( true ) ; 161 dialog.SetOkButton( true ) ; 162 SelectField( 'txtUrl' ) ; 160 163 } 161 164 … … 339 342 340 343 if ( !FCKConfig.LinkDlgHideTarget ) 341 window.parent.SetTabVisibility( 'Target' , (linkType == 'url') ) ;344 dialog.SetTabVisibility( 'Target' , (linkType == 'url') ) ; 342 345 343 346 if ( FCKConfig.LinkUpload ) 344 window.parent.SetTabVisibility( 'Upload' , (linkType == 'url') ) ;347 dialog.SetTabVisibility( 'Upload' , (linkType == 'url') ) ; 345 348 346 349 if ( !FCKConfig.LinkDlgHideAdvanced ) 347 window.parent.SetTabVisibility( 'Advanced' , (linkType != 'anchor' || bHasAnchors) ) ;350 dialog.SetTabVisibility( 'Advanced' , (linkType != 'anchor' || bHasAnchors) ) ; 348 351 349 352 if ( linkType == 'email' ) 350 window.parent.SetAutoSize( true ) ;353 dialog.SetAutoSize( true ) ; 351 354 } 352 355 … … 372 375 373 376 if ( targetType == 'popup' ) 374 window.parent.SetAutoSize( true ) ;377 dialog.SetAutoSize( true ) ; 375 378 } 376 379 … … 621 624 622 625 // Select the (first) link. 626 dialog.Selection.EnsureSelection() ; 623 627 oEditor.FCKSelection.SelectNode( aLinks[0] ); 624 628 … … 635 639 document.getElementById('txtUrl').value = url ; 636 640 OnUrlChange() ; 637 window.parent.SetSelectedTab( 'Info' ) ;641 dialog.SetSelectedTab( 'Info' ) ; 638 642 } 639 643 -
FCKeditor/trunk/editor/dialog/fck_listprop.html
r1108 r1398 30 30 <script type="text/javascript"> 31 31 32 var oEditor = window.parent.InnerDialogLoaded() ; 32 var dialog = window.parent ; 33 var oEditor = dialog.InnerDialogLoaded() ; 33 34 34 35 // Gets the document DOM … … 36 37 var sListType = ( location.search == '?OL' ? 'OL' : 'UL' ) ; 37 38 38 var oActiveEl = oEditor.FCKSelection.MoveToAncestorNode( sListType ) ;39 var oActiveEl = dialog.Selection.GetSelection().MoveToAncestorNode( sListType ) ; 39 40 var oActiveSel ; 40 41 … … 64 65 } 65 66 66 window.parent.SetOkButton( true ) ; 67 window.parent.SetAutoSize( true ) ; 67 dialog.SetOkButton( true ) ; 68 dialog.SetAutoSize( true ) ; 69 70 SelectField( 'txtStartPosition' ) ; 68 71 } 69 72 -
FCKeditor/trunk/editor/dialog/fck_paste.html
r1192 r1398 139 139 var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ; 140 140 var oDoc = oEditor.FCK.EditorDocument ; 141 dialog.Selection.EnsureSelection() ; 141 142 range.MoveToSelection() ; 142 143 range.DeleteContents() ; -
FCKeditor/trunk/editor/dialog/fck_radiobutton.html
r1108 r1398 30 30 <script type="text/javascript"> 31 31 32 var oEditor = window.parent.InnerDialogLoaded() ; 32 var dialog = window.parent ; 33 var oEditor = dialog.InnerDialogLoaded() ; 33 34 34 35 // Gets the document DOM 35 36 var oDOM = oEditor.FCK.EditorDocument ; 36 37 37 var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;38 var oActiveEl = dialog.Selection.GetSelectedElement() ; 38 39 39 40 window.onload = function() … … 51 52 oActiveEl = null ; 52 53 53 window.parent.SetOkButton( true ) ; 54 window.parent.SetAutoSize( true ) ; 54 dialog.SetOkButton( true ) ; 55 dialog.SetAutoSize( true ) ; 56 SelectField( 'txtName' ) ; 55 57 } 56 58 -
FCKeditor/trunk/editor/dialog/fck_replace.html
r1124 r1398 30 30 <script type="text/javascript"> 31 31 32 var oEditor = window.parent.InnerDialogLoaded() ; 32 var dialog = window.parent ; 33 var oEditor = dialog.InnerDialogLoaded() ; 34 var dialogArguments = dialog.Args() ; 35 33 36 var FCKLang = oEditor.FCKLang ; 34 37 35 window.parent.AddTab( 'Find', FCKLang.DlgFindTitle ) ;36 window.parent.AddTab( 'Replace', FCKLang.DlgReplaceTitle ) ;38 dialog.AddTab( 'Find', FCKLang.DlgFindTitle ) ; 39 dialog.AddTab( 'Replace', FCKLang.DlgReplaceTitle ) ; 37 40 var idMap = {} ; 38 41 … … 46 49 47 50 if ( tabCode == 'Replace' ) 48 window.parent.SetAutoSize( true ) ; 51 dialog.SetAutoSize( true ) ; 52 } 53 54 // Place a range at the start of document. 55 // This will be the starting point of our search. 56 var GlobalRange = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ; 57 GlobalRange.SetStart( oEditor.FCK.EditorDocument.body, 1 ) ; 58 GlobalRange.SetEnd( oEditor.FCK.EditorDocument.body, 1 ) ; 59 GlobalRange.Collapse( true ) ; 60 61 var HighlightRange = null ; 62 function Highlight() 63 { 64 if ( HighlightRange ) 65 ClearHighlight() ; 66 var cloneRange = GlobalRange.Clone() ; 67 oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' ).ApplyToRange( cloneRange, false, true ) ; 68 HighlightRange = cloneRange ; 69 GlobalRange = HighlightRange.Clone() ; 70 } 71 72 function ClearHighlight() 73 { 74 if ( HighlightRange ) 75 { 76 oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' ).RemoveFromRange( HighlightRange, false, true ) ; 77 HighlightRange = null ; 78 } 49 79 } 50 80 … … 54 84 oEditor.FCKLanguageManager.TranslatePage( document ) ; 55 85 56 // Place the cursor at the start of document.57 // This will be the starting point of our search.58 var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;59 range.SetStart( oEditor.FCK.EditorDocument.body, 1 ) ;60 range.SetEnd( oEditor.FCK.EditorDocument.body, 1 ) ;61 range.Collapse( true ) ;62 range.Select() ;63 64 86 // Show the appropriate tab at startup. 65 if ( window.parent.name.search( 'Replace' ) == -1)66 { 67 window.parent.SetSelectedTab( 'Find' ) ;68 window.parent.SetAutoSize( true ) ;87 if ( dialogArguments.CustomValue == 'Find' ) 88 { 89 dialog.SetSelectedTab( 'Find' ) ; 90 dialog.SetAutoSize( true ) ; 69 91 } 70 92 else 71 window.parent.SetSelectedTab( 'Replace' ) ; 72 93 dialog.SetSelectedTab( 'Replace' ) ; 94 95 SelectField( 'txtFind' + dialogArguments.CustomValue ) ; 73 96 } 74 97 … … 79 102 document.getElementById('btnFind').disabled = 80 103 ( document.getElementById(idMap["FindText"]).value.length == 0 ) ; 81 }82 83 function GetSelection()84 {85 var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;86 range.MoveToSelection() ;87 return range.CreateBookmark2() ;88 104 } 89 105 … … 262 278 // Start from the end of the current selection. 263 279 var matcher = new KmpMatch( GetSearchString(), ! GetCheckCase() ) ; 264 var cursor = G etSelection().End ;280 var cursor = GlobalRange.CreateBookmark2().End ; 265 281 var matchState = KMP_NOMATCH ; 266 282 var matchBookmark = null ; … … 342 358 } 343 359 344 // If we've found a match, select the match.360 // If we've found a match, highlight the match. 345 361 if ( matchState == KMP_MATCHED ) 346 362 { 347 var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ; 348 range.MoveToBookmark2( matchBookmark ) ; 349 range.Select() ; 350 var focus = range._Range.endContainer ; 363 GlobalRange.MoveToBookmark2( matchBookmark ) ; 364 Highlight() ; 365 var focus = GlobalRange._Range.endContainer ; 351 366 while ( focus && focus.nodeType != 1 ) 352 367 focus = focus.parentNode ; … … 368 383 function Find() 369 384 { 370 var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;371 range.MoveToSelection() ;372 range.Collapse( false ) ;373 range.Select() ;374 375 385 if ( ! _Find() ) 386 { 387 ClearHighlight() ; 376 388 alert( FCKLang.DlgFindNotFoundMsg ) ; 389 } 377 390 } 378 391 379 392 function Replace() 380 393 { 381 var selection = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ; 382 selection.MoveToSelection() ; 383 384 if ( selection.CheckIsCollapsed() ) 394 if ( GlobalRange.CheckIsCollapsed() ) 385 395 { 386 396 if (! _Find() ) 397 { 398 ClearHighlight() ; 387 399 alert( FCKLang.DlgFindNotFoundMsg ) ; 400 } 388 401 } 389 402 else 390 403 { 391 404 oEditor.FCKUndo.SaveUndoStep() ; 392 selection.DeleteContents() ; 393 selection.InsertNode( oEditor.FCK.EditorDocument.createTextNode( GetReplaceString() ) ) ; 394 selection.Collapse( false ) ; 395 selection.Select() ; 405 GlobalRange.DeleteContents() ; 406 GlobalRange.InsertNode( oEditor.FCK.EditorDocument.createTextNode( GetReplaceString() ) ) ; 407 GlobalRange.Collapse( false ) ; 396 408 } 397 409 } … … 400 412 { 401 413 oEditor.FCKUndo.SaveUndoStep() ; 402 var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;403 404 414 var replaceCount = 0 ; 405 415 406 416 while ( _Find() ) 407 417 { 408 range.MoveToSelection() ; 409 range.DeleteContents() ; 410 range.InsertNode( oEditor.FCK.EditorDocument.createTextNode( GetReplaceString() ) ) ; 411 range.Collapse( false ) ; 412 range.Select() ; 418 dialog.Selection.EnsureSelection() ; 419 GlobalRange.DeleteContents() ; 420 GlobalRange.InsertNode( oEditor.FCK.EditorDocument.createTextNode( GetReplaceString() ) ) ; 421 GlobalRange.Collapse( false ) ; 413 422 replaceCount++ ; 414 423 } 415 424 if ( replaceCount == 0 ) 425 { 426 ClearHighlight() ; 416 427 alert( FCKLang.DlgFindNotFoundMsg ) ; 417 window.parent.Cancel() ; 418 } 428 } 429 dialog.Cancel() ; 430 } 431 432 window.onunload = function(){ ClearHighlight() ; } 419 433 </script> 420 434 </head> -
FCKeditor/trunk/editor/dialog/fck_select.html
r1108 r1398 31 31 <script type="text/javascript"> 32 32 33 var oEditor = window.parent.InnerDialogLoaded() ; 33 var dialog = window.parent ; 34 var oEditor = dialog.InnerDialogLoaded() ; 34 35 35 36 // Gets the document DOM 36 37 var oDOM = oEditor.FCK.EditorDocument ; 37 38 38 var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;39 var oActiveEl = dialog.Selection.GetSelectedElement() ; 39 40 40 41 var oListText ; … … 69 70 oActiveEl = null ; 70 71 71 window.parent.SetOkButton( true ) ; 72 window.parent.SetAutoSize( true ) ; 72 dialog.SetOkButton( true ) ; 73 dialog.SetAutoSize( true ) ; 74 SelectField( 'txtName' ) ; 73 75 } 74 76 -
FCKeditor/trunk/editor/dialog/fck_smiley.html
r1192 r1398 37 37 <script type="text/javascript"> 38 38 39 var oEditor = window.parent.InnerDialogLoaded() ; 39 var dialog = window.parent ; 40 var oEditor = dialog.InnerDialogLoaded() ; 40 41 41 42 window.onload = function () … … 44 45 oEditor.FCKLanguageManager.TranslatePage(document) ; 45 46 46 window.parent.SetAutoSize( true ) ;47 dialog.SetAutoSize( true ) ; 47 48 } 48 49 49 50 function InsertSmiley( url ) 50 51 { 52 dialog.Selection.EnsureSelection() ; 53 51 54 oEditor.FCKUndo.SaveUndoStep() ; 55 52 56 var oImg = oEditor.FCK.InsertElement( 'img' ) ; 53 57 oImg.src = url ; … … 59 63 document.body.innerHTML = '' ; 60 64 61 window.parent.Cancel() ;65 dialog.Cancel() ; 62 66 } 63 67 -
FCKeditor/trunk/editor/dialog/fck_specialchar.html
r1283 r1398 44 44 { 45 45 oEditor.FCKUndo.SaveUndoStep() ; 46 parent.Selection.EnsureSelection() ; 46 47 oEditor.FCK.InsertHtml( charValue || "" ) ; 47 48 window.parent.Cancel() ; -
FCKeditor/trunk/editor/dialog/fck_table.html
r933 r1398 30 30 <script type="text/javascript"> 31 31 32 var oEditor = window.parent.InnerDialogLoaded() ; 32 var dialog = window.parent ; 33 var oEditor = dialog.InnerDialogLoaded() ; 34 var dialogArguments = dialog.Args() ; 33 35 34 36 // Gets the document DOM … … 37 39 // Gets the table if there is one selected. 38 40 var table ; 39 var e = oEditor.FCKSelection.GetSelectedElement() ;41 var e = dialog.Selection.GetSelectedElement() ; 40 42 41 43 if ( ( !e && document.location.search.substr(1) == 'Parent' ) || ( e && e.tagName != 'TABLE' ) ) … … 89 91 document.getElementById('txtRows').disabled = true ; 90 92 document.getElementById('txtColumns').disabled = true ; 91 } 92 93 window.parent.SetOkButton( true ) ; 94 window.parent.SetAutoSize( true ) ; 93 SelectField( 'txtWidth' ) ; 94 } 95 else 96 SelectField( 'txtRows' ) ; 97 98 dialog.SetOkButton( true ) ; 99 dialog.SetAutoSize( true ) ; 95 100 } 96 101 -
FCKeditor/trunk/editor/dialog/fck_tablecell.html
r453 r1398 30 30 <script type="text/javascript"> 31 31 32 var oEditor = window.parent.InnerDialogLoaded() ; 32 var dialog = window.parent ; 33 var oEditor = dialog.InnerDialogLoaded() ; 33 34 34 35 // Gets the document DOM … … 36 37 37 38 // Array of selected Cells 39 dialog.Selection.EnsureSelection() ; 38 40 var aCells = oEditor.FCKTableHandler.GetSelectedCells() ; 39 41 … … 45 47 SetStartupValue() ; 46 48 47 window.parent.SetOkButton( true ) ; 48 window.parent.SetAutoSize( true ) ; 49 dialog.SetOkButton( true ) ; 50 dialog.SetAutoSize( true ) ; 51 SelectField( 'txtWidth' ) ; 49 52 } 50 53 … … 119 122 function SelectColor( wich ) 120 123 { 121 oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', oEditor.FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 4 00, 330, wich == 'Back' ? SelectBackColor : SelectBorderColor, window ) ;124 oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', oEditor.FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, wich == 'Back' ? SelectBackColor : SelectBorderColor, window ) ; 122 125 } 123 126 -
FCKeditor/trunk/editor/dialog/fck_textarea.html
r1108 r1398 30 30 <script type="text/javascript"> 31 31 32 var oEditor = window.parent.InnerDialogLoaded() ; 32 var dialog = window.parent ; 33 var oEditor = dialog.InnerDialogLoaded() ; 33 34 34 35 // Gets the document DOM 35 36 var oDOM = oEditor.FCK.EditorDocument ; 36 37 37 var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;38 var oActiveEl = dialog.Selection.GetSelectedElement() ; 38 39 39 40 window.onload = function() … … 51 52 oActiveEl = null ; 52 53 53 window.parent.SetOkButton( true ) ; 54 window.parent.SetAutoSize( true ) ; 54 dialog.SetOkButton( true ) ; 55 dialog.SetAutoSize( true ) ; 56 SelectField( 'txtName' ) ; 55 57 } 56 58 -
FCKeditor/trunk/editor/dialog/fck_textfield.html
r1108 r1398 30 30 <script type="text/javascript"> 31 31 32 var oEditor = window.parent.InnerDialogLoaded() ; 32 var dialog = window.parent ; 33 var oEditor = dialog.InnerDialogLoaded() ; 33 34 34 35 // Gets the document DOM 35 36 var oDOM = oEditor.FCK.EditorDocument ; 36 37 37 var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;38 var oActiveEl = dialog.Selection.GetSelectedElement() ; 38 39 39 40 window.onload = function() … … 55 56 oActiveEl = null ; 56 57 57 window.parent.SetOkButton( true ) ; 58 window.parent.SetAutoSize( true ) ; 58 dialog.SetOkButton( true ) ; 59 dialog.SetAutoSize( true ) ; 60 SelectField( 'txtName' ) ; 59 61 } 60 62 -
FCKeditor/trunk/editor/dtd/fck_xhtml10strict.js
r1211 r1398 1 /*1 /* 2 2 * FCKeditor - The text editor for Internet - http://www.fckeditor.net 3 3 * Copyright (C) 2003-2007 Frederico Caldeira Knabben -
FCKeditor/trunk/editor/dtd/fck_xhtml10transitional.js
r1211 r1398 1 /*1 /* 2 2 * FCKeditor - The text editor for Internet - http://www.fckeditor.net 3 3 * Copyright (C) 2003-2007 Frederico Caldeira Knabben -
FCKeditor/trunk/editor/fckdialog.html
r1192 r1398 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 2 <!-- 3 3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net … … 24 24 <html xmlns="http://www.w3.org/1999/xhtml"> 25 25 <head> 26 <title></title> 26 27 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 27 28 <meta name="robots" content="noindex, nofollow" /> 28 29 <script type="text/javascript"> 29 30 30 var args = window.dialogArguments ; 31 32 // Automatically detect the correct document.domain (#123). 31 var E = frameElement._DialogArguments.Editor ; 32 33 // It seems referencing to frameElement._DialogArguments directly would lead to memory leaks in IE. 34 // So let's use functions to access its members instead. 35 function Args() 36 { 37 return frameElement._DialogArguments ; 38 } 39 40 function ParentDialog( dialog ) 41 { 42 return dialog ? dialog._ParentDialog : frameElement._ParentDialog ; 43 } 44 45 // Domain relaxation logic. 33 46 (function() 34 47 { … … 40 53 try 41 54 { 42 var parentDomain = window.opener ? window.opener.document.domain : args.Editor.document.domain ;43 55 var parentDomain = ( Args().TopWindow || E ).document.domain ; 56 44 57 if ( document.domain != parentDomain ) 45 58 document.domain = parentDomain ; 59 46 60 break ; 47 61 } 48 62 catch( e ) {} 49 63 50 64 // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... 51 65 d = d.replace( /.*?(?:\.|$)/, '' ) ; … … 53 67 if ( d.length == 0 ) 54 68 break ; // It was not able to detect the domain. 55 69 56 70 document.domain = d ; 57 71 } 58 })() ; 59 60 // On some Gecko browsers (probably over slow connections) the 61 // "dialogArguments" are not set so we must get it from the opener window. 62 if ( !args ) 63 args = window.dialogArguments = window.opener.FCKLastDialogInfo ; 72 })() ; 73 74 var FCK = E.FCK ; 75 var FCKTools = E.FCKTools ; 76 var FCKDomTools = E.FCKDomTools ; 77 var FCKDialog = E.FCKDialog ; 78 var FCKBrowserInfo = E.FCKBrowserInfo ; 79 var FCKConfig = E.FCKConfig ; 80 81 // Steal the focus so that the caret would no longer stay in the editor iframe. 82 window.focus() ; 64 83 65 84 // Sets the Skin CSS 66 document.write( '<link href="' + args.Editor.FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ;85 document.write( '<link href="' + FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ; 67 86 68 87 // Sets the language direction. 69 window.document.dir = args.Editor.FCKLang.Dir ; 70 71 // IE does not set the window name in showModalDialog(), let's set it here. 72 if ( args.Editor.FCKBrowserInfo.IsIE ) 73 window.name = args.DialogName ; 74 75 var sTitle = args.Title ; 76 document.write( '<title>' + sTitle + '<\/title>' ) ; 77 78 function LoadInnerDialog() 79 { 80 if ( window.onresize ) 81 window.onresize() ; 82 83 // First of all, translate the dialog box contents. 84 args.Editor.FCKLanguageManager.TranslatePage( document ) ; 85 86 document.getElementById( 'FrameCell' ).innerHTML = '<iframe id="frmMain" src="' + args.Page + '" name="frmMain" frameborder="0" height="100%" width="100%" scrolling="auto"></iframe>' ; 87 } 88 89 function InnerDialogLoaded() 90 { 91 var oInnerDoc = document.getElementById('frmMain').contentWindow.document ; 92 93 // Set the language direction. 94 oInnerDoc.dir = args.Editor.FCKLang.Dir ; 95 96 // Sets the Skin CSS. 97 oInnerDoc.write( '<link href="' + args.Editor.FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ; 98 99 SetOnKeyDown( oInnerDoc ) ; 100 DisableContextMenu( oInnerDoc ) ; 101 102 return args.Editor ; 103 } 104 105 function SetOkButton( showIt ) 106 { 107 document.getElementById('btnOk').style.visibility = ( showIt ? '' : 'hidden' ) ; 108 } 109 110 var bAutoSize = false ; 111 112 function SetAutoSize( autoSize ) 113 { 114 bAutoSize = autoSize ; 115 RefreshSize() ; 116 } 117 118 function RefreshSize() 119 { 120 if ( bAutoSize ) 121 { 122 var oInnerDoc = document.getElementById('frmMain').contentWindow.document ; 123 124 var iFrameHeight ; 125 if ( document.all ) 126 iFrameHeight = oInnerDoc.body.offsetHeight ; 88 var langDir = window.document.dir = E.FCKLang.Dir ; 89 90 // For IE6-, the fck_dialog_ie6.js is loaded, used to fix limitations in the browser. 91 if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 ) 92 document.write( '<' + 'script type="text/javascript" src="' + FCKConfig.SkinPath + 'fck_dialog_ie6.js"><' + '\/script>' ) ; 93 94 FCKTools.RegisterDollarFunction( window ) ; 95 96 // Resize related functions. 97 var Sizer = function() 98 { 99 var bAutoSize = false ; 100 101 var retval = { 102 // Sets whether the dialog should auto-resize according to its content's height. 103 SetAutoSize : function( autoSize ) 104 { 105 bAutoSize = autoSize ; 106 this.RefreshSize() ; 107 }, 108 109 // Fit the dialog container's layout to the inner iframe's external size. 110 RefreshContainerSize : function() 111 { 112 var frmMain = $( 'frmMain' ) ; 113 114 if ( frmMain ) 115 { 116 // Get the container size. 117 var height = $( 'contents' ).offsetHeight ; 118 119 // Subtract the size of other elements. 120 height -= $( 'TitleArea' ).offsetHeight ; 121 height -= $( 'TabsRow' ).offsetHeight ; 122 height -= $( 'DialogButtons' ).offsetHeight ; 123 124 frmMain.style.height = Math.max( height, 0 ) + 'px' ; 125 } 126 }, 127 128 // Resize and re-layout the dialog. 129 // Triggers the onresize event for the layout logic. 130 ResizeDialog : function( width, height ) 131 { 132 FCKDomTools.SetElementStyles( window.frameElement, 133 { 134 'width' : width + 'px', 135 'height' : height + 'px' 136 } ) ; 137 138 // If the skin have defined a function for resize fixes, call it now. 139 if ( typeof window.DoResizeFixes == 'function' ) 140 window.DoResizeFixes() ; 141 }, 142 143 // if bAutoSize is true, automatically fit the dialog size and layout to 144 // accomodate the inner iframe's internal height. 145 // if bAutoSize is false, then only the layout logic for the dialog decorations 146 // is run to accomodate the inner iframe's external height. 147 RefreshSize : function() 148 { 149 if ( bAutoSize ) 150 { 151 var frmMain = $( 'frmMain' ) ; 152 var innerDoc = frmMain.contentWindow.document ; 153 var isStrict = FCKTools.IsStrictMode( innerDoc ) ; 154 155 // Get the size of the frame contents. 156 var innerWidth = isStrict ? innerDoc.documentElement.scrollWidth : innerDoc.body.scrollWidth ; 157 var innerHeight = isStrict ? innerDoc.documentElement.scrollHeight : innerDoc.body.scrollHeight ; 158 159 // Get the current frame size. 160 var frameSize = FCKTools.GetViewPaneSize( frmMain.contentWindow ) ; 161 162 var deltaWidth = innerWidth - frameSize.Width ; 163 var deltaHeight = innerHeight - frameSize.Height ; 164 165 // If the contents fits the current size. 166 if ( deltaWidth <= 0 && deltaHeight <= 0 ) 167 return ; 168 169 var dialogWidth = frameElement.offsetWidth + Math.max( deltaWidth, 0 ) ; 170 var dialogHeight = frameElement.offsetHeight + Math.max( deltaHeight, 0 ) ; 171 172 this.ResizeDialog( dialogWidth, dialogHeight ) ; 173 } 174 this.RefreshContainerSize() ; 175 } 176 } 177 178 /** 179 * Safari seems to have a bug with the time when RefreshSize() is executed - it 180 * thinks frmMain's innerHeight is 0 if we query the value too soon after the 181 * page is loaded in some circumstances. (#1316) 182 * TODO : Maybe this is not needed anymore after #35. 183 */ 184 if ( FCKBrowserInfo.IsSafari ) 185 { 186 var originalRefreshSize = retval.RefreshSize ; 187 188 retval.RefreshSize = function() 189 { 190 window.setTimeout( originalRefreshSize, 1 ) ; 191 } 192 } 193 194 window.onresize = function() 195 { 196 retval.RefreshContainerSize() ; 197 } 198 199 window.SetAutoSize = FCKTools.Bind( retval, retval.SetAutoSize ) ; 200 201 return retval ; 202 }() ; 203 204 // Manages the throbber image that appears if the inner part of dialog is taking too long to load. 205 var Throbber = function() 206 { 207 var timer ; 208 209 var updateThrobber = function() 210 { 211 var throbberParent = $( 'throbberBlock' ) ; 212 var throbberBlocks = throbberParent.childNodes ; 213 var lastClass = throbberParent.lastChild.className ; 214 215 // From the last to the second one, copy the class from the previous one. 216 for ( var i = throbberBlocks.length - 1 ; i > 0 ; i-- ) 217 throbberBlocks[i].className = throbberBlocks[i-1].className ; 218 219 // For the first one, copy the last class (rotation). 220 throbberBlocks[0].className = lastClass ; 221 } 222 223 return { 224 Show : function( waitMilliseconds ) 225 { 226 // Auto-setup the Show function to be called again after the 227 // requested amount of time. 228 if ( waitMilliseconds && waitMilliseconds > 0 ) 229 { 230 timer = FCKTools.SetTimeout( this.Show, waitMilliseconds, this, null, window ) ; 231 return ; 232 } 233 234 var throbberParent = $( 'throbberBlock' ) ; 235 236 // Create the throbber blocks. 237 var classIds = [ 1,2,3,4,5,4,3,2 ] ; 238 while ( classIds.length > 0 ) 239 throbberParent.appendChild( document.createElement( 'div' ) ).className = ' throbber_' + classIds.shift() ; 240 241 // Center the throbber. 242 var frm = $( 'contents' ) ; 243 var frmCoords = FCKTools.GetDocumentPosition( window, frm ) ; 244 var x = frmCoords.x + ( frm.offsetWidth - throbberParent.offsetWidth ) / 2 ; 245 var y = frmCoords.y + ( frm.offsetHeight - throbberParent.offsetHeight ) / 2 ; 246 throbberParent.style.left = parseInt( x, 10 ) + 'px' ; 247 throbberParent.style.top = parseInt( y, 10 ) + 'px' ; 248 249 // Show it. 250 throbberParent.style.visibility = '' ; 251 252 // Setup the animation interval. 253 timer = setInterval( updateThrobber, 100 ) ; 254 }, 255 256 Hide : function() 257 { 258 if ( timer ) 259 { 260 clearInterval( timer ) ; 261 timer = null ; 262 } 263 264 var throbberParent = document.getElementById( 'throbberBlock' ) ; 265 if ( throbberParent ) 266 FCKDomTools.RemoveNode( throbberParent ) ; 267 } 268 } ; 269 }() ; 270 271 // Drag and drop handlers. 272 var DragAndDrop = function() 273 { 274 var registeredWindows = [] ; 275 var lastCoords ; 276 var currentPos ; 277 278 var cleanUpHandlers = function() 279 { 280 for ( var i = 0 ; i < registeredWindows.length ; i++ ) 281 { 282 FCKTools.RemoveEventListener( registeredWindows[i].document, 'mousemove', dragMouseMoveHandler ) ; 283 FCKTools.RemoveEventListener( registeredWindows[i].document, 'mouseup', dragMouseUpHandler ) ; 284 } 285 } 286 287 var dragMouseMoveHandler = function( evt ) 288 { 289 if ( !lastCoords ) 290 return ; 291 292 if ( !evt ) 293 evt = FCKTools.GetElementDocument( this ).parentWindow.event ; 294 295 // Updated the last coordinates. 296 var currentCoords = 297 { 298 x : evt.screenX, 299 y : evt.screenY 300 } ; 301 302 currentPos = 303 { 304 x : currentPos.x + ( currentCoords.x - lastCoords.x ), 305 y : currentPos.y + ( currentCoords.y - lastCoords.y ) 306 } ; 307 308 lastCoords = currentCoords ; 309 310 frameElement.style.left = currentPos.x + 'px' ; 311 frameElement.style.top = currentPos.y + 'px' ; 312 313 if ( evt.preventDefault ) 314 evt.preventDefault() ; 127 315 else 128 iFrameHeight = document.getElementById('frmMain').contentWindow.innerHeight ; 129 130 var iInnerHeight = oInnerDoc.body.scrollHeight ; 131 132 var iDiff = iInnerHeight - iFrameHeight ; 133 134 if ( iDiff > 0 ) 135 { 136 if ( document.all ) 137 window.dialogHeight = ( parseInt( window.dialogHeight, 10 ) + iDiff ) + 'px' ; 316 evt.returnValue = false ; 317 } 318 319 var dragMouseUpHandler = function( evt ) 320 { 321 if ( !lastCoords ) 322 return ; 323 if ( !evt ) 324 evt = FCKTools.GetElementDocument( this ).parentWindow.event ; 325 cleanUpHandlers() ; 326 lastCoords = null ; 327 } 328 329 return { 330 331 MouseDownHandler : function( evt ) 332 { 333 var view = null ; 334 if ( !evt ) 335 { 336 view = FCKTools.GetElementDocument( this ).parentWindow ; 337 evt = view.event ; 338 } 138 339 else 139 window.resizeBy( 0, iDiff ) ; 140 } 141 } 142 } 143 144 // Kludge for #1316: Safari seems to have a bug with the time when RefreshSize() is executed - it thinks frmMain's innerHeight 145 // is 0 if we query the value too soon after the page is loaded in some circumstances. 146 if ( args.Editor.FCKBrowserInfo.IsSafari ) 147 { 148 window.OriginalRefreshSize = RefreshSize ; 149 150 RefreshSize = function() 151 { 152 window.setTimeout( window.OriginalRefreshSize, 1 ); 153 } 154 } 155 156 function Ok() 157 { 158 if ( window.frames["frmMain"].Ok && window.frames["frmMain"].Ok() ) 159 Cancel() ; 160 } 161 162 function Cancel( dontFireChange ) 163 { 164 if ( !dontFireChange && !args.Editor.FCK.EditMode ) 165 { 166 // All dialog windows, by default, will fire the "OnSelectionChange" 167 // event, no matter the Ok or Cancel button has been pressed. 168 args.Editor.FCK.Events.FireEvent( 'OnSelectionChange' ) ; 169 } 170 window.close() ; 171 } 172 173 // Object that holds all available tabs. 174 var oTabs = new Object() ; 175 176 function TabDiv_OnClick() 177 { 178 SetSelectedTab( this.TabCode ) ; 179 } 180 181 function AddTab( tabCode, tabText, startHidden ) 182 { 183 if ( typeof( oTabs[ tabCode ] ) != 'undefined' ) 340 view = evt.view ; 341 342 var target = evt.srcElement || evt.target ; 343 if ( target.id == 'closeButton' || target.className == 'DialogTab' || target.className == 'DialogTabSelected' ) 344 return ; 345 346 lastCoords = 347 { 348 x : evt.screenX, 349 y : evt.screenY 350 } ; 351 352 // Save the current IFRAME position. 353 currentPos = 354 { 355 x : parseInt( FCKDomTools.GetCurrentElementStyle( frameElement, 'left' ), 10 ), 356 y : parseInt( FCKDomTools.GetCurrentElementStyle( frameElement, 'top' ), 10 ) 357 } ; 358 359 for ( var i = 0 ; i < registeredWindows.length ; i++ ) 360 { 361 FCKTools.AddEventListener( registeredWindows[i].document, 'mousemove', dragMouseMoveHandler ) ; 362 FCKTools.AddEventListener( registeredWindows[i].document, 'mouseup', dragMouseUpHandler ) ; 363 } 364 365 if ( evt.preventDefault ) 366 evt.preventDefault() ; 367 else 368 evt.returnValue = false ; 369 }, 370 371 RegisterHandlers : function( w ) 372 { 373 registeredWindows.push( w ) ; 374 } 375 } 376 }() ; 377 378 // Selection related functions. 379 var Selection = function() 380 { 381 return { 382 /** 383 * Ensures that the editing area contains an active selection. This is a 384 * requirement for IE, as it looses the selection when the focus moves to other 385 * frames. 386 */ 387 EnsureSelection : function() 388 { 389 if ( FCKDialog.SelectionData ) 390 FCKDialog.SelectionData.select() ; 391 }, 392 393 /** 394 * Get the FCKSelection object for the editor instance. 395 */ 396 GetSelection : function() 397 { 398 this.EnsureSelection() ; 399 return FCK.Selection ; 400 }, 401 402 /** 403 * Get the selected element in the editing area (for object selections). 404 */ 405 GetSelectedElement : function() 406 { 407 return this.GetSelection().GetSelectedElement() ; 408 } 409 } ; 410 }() ; 411 412 // Tab related functions. 413 var Tabs = function() 414 { 415 // Only element ids should be stored here instead of element references since setSelectedTab and TabDiv_OnClick 416 // would build circular references with the element references inside and cause memory leaks in IE6. 417 var oTabs = new Object() ; 418 419 var setSelectedTab = function( tabCode ) 420 { 421 for ( var sCode in oTabs ) 422 { 423 if ( sCode == tabCode ) 424 $( oTabs[sCode] ).className = 'DialogTabSelected' ; 425 else 426 $( oTabs[sCode] ).className = 'DialogTab' ; 427 } 428 429 if ( typeof( window.frames["frmMain"].OnDialogTabChange ) == 'function' ) 430 window.frames["frmMain"].OnDialogTabChange( tabCode ) ; 431 } 432 433 function TabDiv_OnClick() 434 { 435 setSelectedTab( this.TabCode ) ; 436 } 437 438 window.AddTab = function( tabCode, tabText, startHidden ) 439 { 440 if ( typeof( oTabs[ tabCode ] ) != 'undefined' ) 441 return ; 442 443 var eTabsRow = $( 'Tabs' ) ; 444 445 var oCell = eTabsRow.insertCell( eTabsRow.cells.length - 1 ) ; 446 oCell.noWrap = true ; 447 448 var oDiv = document.createElement( 'DIV' ) ; 449 oDiv.className = 'DialogTab' ; 450 oDiv.innerHTML = tabText ; 451 oDiv.TabCode = tabCode ; 452 oDiv.onclick = TabDiv_OnClick ; 453 oDiv.id = Math.random() ; 454 455 if ( startHidden ) 456 oDiv.style.display = 'none' ; 457 458 eTabsRow = $( 'TabsRow' ) ; 459 460 oCell.appendChild( oDiv ) ; 461 462 if ( eTabsRow.style.display == 'none' ) 463 { 464 var eTitleArea = $( 'TitleArea' ) ; 465 eTitleArea.className = 'DialogTitle' ; 466 467 oDiv.className = 'DialogTabSelected' ; 468 eTabsRow.style.display = '' ; 469 470 if ( window.onresize ) 471 window.onresize() ; 472 } 473 474 oTabs[ tabCode ] = oDiv.id ; 475 476 FCKTools.DisableSelection( oDiv ) ; 477 } ; 478 479 window.SetSelectedTab = setSelectedTab ; 480 481 window.SetTabVisibility = function( tabCode, isVisible ) 482 { 483 var oTab = $( oTabs[ tabCode ] ) ; 484 oTab.style.display = isVisible ? '' : 'none' ; 485 486 if ( ! isVisible && oTab.className == 'DialogTabSelected' ) 487 { 488 for ( var sCode in oTabs ) 489 { 490 if ( $( oTabs[sCode] ).style.display != 'none' ) 491 { 492 setSelectedTab( sCode ) ; 493 break ; 494 } 495 } 496 } 497 } ; 498 }() ; 499 500 // readystatechange handler for registering drag and drop handlers in cover 501 // iframes, defined out here to avoid memory leak. 502 // Do NOT put this function as a private function as it will induce memory leak 503 // in IE and it's not detectable with Drip or sIEve and undetectable leaks are 504 // really nasty (sigh). 505 var onReadyRegister = function() 506 { 507 if ( this.readyState != 'complete' ) 184 508 return ; 185 186 var eTabsRow = document.getElementById( 'Tabs' ) ; 187 188 var oCell = eTabsRow.insertCell( eTabsRow.cells.length - 1 ) ; 189 oCell.noWrap = true ; 190 191 var oDiv = document.createElement( 'DIV' ) ; 192 oDiv.className = 'PopupTab' ; 193 oDiv.innerHTML = tabText ; 194 oDiv.TabCode = tabCode ; 195 oDiv.onclick = TabDiv_OnClick ; 196 197 if ( startHidden ) 198 oDiv.style.display = 'none' ; 199 200 eTabsRow = document.getElementById( 'TabsRow' ) ; 201 202 oCell.appendChild( oDiv ) ; 203 204 if ( eTabsRow.style.display == 'none' ) 205 { 206 var eTitleArea = document.getElementById( 'TitleArea' ) ; 207 eTitleArea.className = 'PopupTitle' ; 208 209 oDiv.className = 'PopupTabSelected' ; 210 eTabsRow.style.display = '' ; 211 212 if ( window.onresize ) 213 window.onresize() ; 214 } 215 216 oTabs[ tabCode ] = oDiv ; 217 } 218 219 function SetSelectedTab( tabCode ) 220 { 221 for ( var sCode in oTabs ) 222 { 223 if ( sCode == tabCode ) 224 oTabs[sCode].className = 'PopupTabSelected' ; 225 else 226 oTabs[sCode].className = 'PopupTab' ; 227 } 228 229 if ( typeof( window.frames["frmMain"].OnDialogTabChange ) == 'function' ) 230 window.frames["frmMain"].OnDialogTabChange( tabCode ) ; 231 } 232 233 function SetTabVisibility( tabCode, isVisible ) 234 { 235 var oTab = oTabs[ tabCode ] ; 236 oTab.style.display = isVisible ? '' : 'none' ; 237 238 if ( ! isVisible && oTab.className == 'PopupTabSelected' ) 239 { 240 for ( var sCode in oTabs ) 241 { 242 if ( oTabs[sCode].style.display != 'none' ) 243 { 244 SetSelectedTab( sCode ) ; 245 break ; 246 } 247 } 248 } 249 } 250 251 function SetOnKeyDown( targetDocument ) 252 { 253 targetDocument.onkeydown = function ( e ) 254 { 255 e = e || event || this.parentWindow.event ; 256 switch ( e.keyCode ) 257 { 258 case 13 : // ENTER 259 var oTarget = e.srcElement || e.target ; 260 if ( oTarget.tagName == 'TEXTAREA' ) 261 return true ; 262 Ok() ; 263 return false ; 264 case 27 : // ESC 265 Cancel() ; 266 return false ; 267 break ; 268 } 269 return true ; 270 } 271 } 272 SetOnKeyDown( document ) ; 273 274 function DisableContextMenu( targetDocument ) 275 { 276 if ( args.Editor.FCKBrowserInfo.IsIE ) return ; 277 278 // Disable Right-Click 279 var oOnContextMenu = function( e ) 509 DragAndDrop.RegisterHandlers( this.contentWindow ) ; 510 } ; 511 512 // The business logic of the dialog, dealing with operational things like 513 // dialog open/dialog close/enable/disable/etc. 514 (function() 515 { 516 var setOnKeyDown = function( targetDocument ) 517 { 518 targetDocument.onkeydown = function ( e ) 519 { 520 e = e || event || this.parentWindow.event ; 521 switch ( e.keyCode ) 522 { 523 case 13 : // ENTER 524 var oTarget = e.srcElement || e.target ; 525 if ( oTarget.tagName == 'TEXTAREA' ) 526 return true ; 527 Ok() ; 528 return false ; 529 530 case 27 : // ESC 531 Cancel() ; 532 return false ; 533 } 534 return true ; 535 } 536 } ; 537 538 var contextMenuBlocker = function( e ) 280 539 { 281 540 var sTagName = e.target.tagName ; 282 541 if ( ! ( ( sTagName == "INPUT" && e.target.type == "text" ) || sTagName == "TEXTAREA" ) ) 283 542 e.preventDefault() ; 284 } 285 targetDocument.addEventListener( 'contextmenu', oOnContextMenu, true ) ; 286 } 287 DisableContextMenu( document ) ; 288 289 if ( args.Editor.FCKBrowserInfo.IsGecko && !args.Editor.FCKBrowserInfo.IsOpera ) 290 { 291 window.onresize = function( e ) 292 { 293 // Running in Chrome makes the window receive the event including subframes. 294 // we care only about this window. Ticket #1642 295 if ( e && e.originalTarget !== document ) 296 return ; 297 298 var oFrame = document.getElementById("frmMain") ; 299 300 if ( ! oFrame ) 543 } ; 544 545 var disableContextMenu = function( targetDocument ) 546 { 547 if ( FCKBrowserInfo.IsIE ) 301 548 return ; 302 549 303 oFrame.height = 0 ; 304 305 var oCell = document.getElementById("FrameCell") ; 306 var iHeight = oCell.offsetHeight ; 307 308 oFrame.height = iHeight - 2 ; 309 } 310 } 311 312 if ( args.Editor.FCKBrowserInfo.IsIE ) 313 { 314 function Window_OnBeforeUnload() 315 { 316 for ( var t in oTabs ) 317 oTabs[t] = null ; 318 319 args.Editor = null ; 320 } 321 window.attachEvent( "onbeforeunload", Window_OnBeforeUnload ) ; 322 } 323 324 function Window_OnClose() 325 { 326 args.Editor.FCKFocusManager.Unlock() ; 327 } 328 329 if ( window.addEventListener ) 330 window.addEventListener( 'unload', Window_OnClose, false ) ; 331 550 targetDocument.addEventListener( 'contextmenu', contextMenuBlocker, true ) ; 551 } ; 552 553 // Program entry point. 554 window.Init = function() 555 { 556 // Start the throbber timer. 557 Throbber.Show( 1000 ) ; 558 559 Sizer.RefreshContainerSize() ; 560 LoadInnerDialog() ; 561 562 FCKTools.DisableSelection( document.body ) ; 563 564 // Make the title area draggable. 565 var titleElement = $( 'header' ) ; 566 titleElement.onmousedown = DragAndDrop.MouseDownHandler ; 567 568 // Connect mousemove and mouseup events from dialog frame and outer window to dialog dragging logic. 569 DragAndDrop.RegisterHandlers( window ) ; 570 DragAndDrop.RegisterHandlers( Args().TopWindow ) ; 571 572 // Disable the previous dialog if it exists. 573 if ( ParentDialog() ) 574 { 575 ParentDialog().contentWindow.SetEnabled( false ) ; 576 if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 ) 577 { 578 var currentParent = ParentDialog() ; 579 while ( currentParent ) 580 { 581 var blockerFrame = currentParent.contentWindow.$( 'blocker' ) ; 582 if ( blockerFrame.readyState == 'complete' ) 583 DragAndDrop.RegisterHandlers( blockerFrame.contentWindow ) ; 584 else 585 blockerFrame.onreadystatechange = onReadyRegister ; 586 currentParent = ParentDialog( currentParent ) ; 587 } 588 } 589 else 590 { 591 var currentParent = ParentDialog() ; 592 while ( currentParent ) 593 { 594 DragAndDrop.RegisterHandlers( currentParent.contentWindow ) ; 595 currentParent = ParentDialog( currentParent ) ; 596 } 597 } 598 } 599 600 // If this is the only dialog on screen, enable the background cover. 601 if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 ) 602 { 603 var blockerFrame = FCKDialog.GetCover().firstChild ; 604 if ( blockerFrame.readyState == 'complete' ) 605 DragAndDrop.RegisterHandlers( blockerFrame.contentWindow ) ; 606 else 607 blockerFrame.onreadystatechange = onReadyRegister; 608 } 609 610 // Add Enter/Esc hotkeys and disable context menu for the dialog. 611 setOnKeyDown( document ) ; 612 disableContextMenu( document ) ; 613 } ; 614 615 window.LoadInnerDialog = function() 616 { 617 if ( window.onresize ) 618 window.onresize() ; 619 620 // First of all, translate the dialog box contents. 621 E.FCKLanguageManager.TranslatePage( document ) ; 622 623 // Create the IFRAME that holds the dialog contents. 624 $( 'innerContents' ).innerHTML = '<iframe id="frmMain" src="' + Args().Page + '" name="frmMain" frameborder="0" width="100%" height="100%" scrolling="auto" style="visibility: hidden;" allowtransparency="true"></iframe>' ; 625 } ; 626 627 window.InnerDialogLoaded = function() 628 { 629 // If the dialog has been closed before the iframe is loaded, do nothing. 630 if ( !frameElement.parentNode ) 631 return null ; 632 633 Throbber.Hide() ; 634 635 var frmMain = $('frmMain') ; 636 var innerWindow = frmMain.contentWindow ; 637 var innerDoc = innerWindow.document ; 638 639 // Show the loaded iframe. 640 frmMain.style.visibility = '' ; 641 642 // Set the language direction. 643 innerDoc.dir = langDir ; 644 645 // Sets the Skin CSS. 646 innerDoc.write( '<link href="' + FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ; 647 648 setOnKeyDown( innerDoc ) ; 649 disableContextMenu( innerDoc ) ; 650 651 Sizer.RefreshContainerSize(); 652 653 DragAndDrop.RegisterHandlers( innerWindow ) ; 654 655 innerWindow.focus() ; 656 657 return E ; 658 } ; 659 660 window.SetOkButton = function( showIt ) 661 { 662 $('btnOk').style.visibility = ( showIt ? '' : 'hidden' ) ; 663 } ; 664 665 window.Ok = function() 666 { 667 Selection.EnsureSelection() ; 668 669 var frmMain = window.frames["frmMain"] ; 670 671 if ( frmMain.Ok && frmMain.Ok() ) 672 CloseDialog() ; 673 else 674 frmMain.focus() ; 675 } ; 676 677 window.Cancel = function( dontFireChange ) 678 { 679 return CloseDialog( dontFireChange ) ; 680 } ; 681 682 window.CloseDialog = function( dontFireChange ) 683 { 684 Throbber.Hide() ; 685 686 Selection.EnsureSelection() ; 687 688 // Points the src to a non-existent location to avoid loading errors later, in case the dialog 689 // haven't been completed loaded at this point. 690 if ( $( 'frmMain' ) ) 691 $( 'frmMain' ).src = FCKTools.GetVoidUrl() ; 692 693 if ( !dontFireChange && !FCK.EditMode ) 694 { 695 // All dialog windows, by default, will fire the "OnSelectionChange" 696 // event, no matter the Ok or Cancel button has been pressed. 697 FCK.Events.FireEvent( 'OnSelectionChange' ) ; 698 } 699 700 FCKDialog.OnDialogClose( window ) ; 701 } ; 702 703 window.SetEnabled = function( isEnabled ) 704 { 705 var cover = $( 'cover' ) ; 706 cover.style.display = isEnabled ? 'none' : '' ; 707 708 if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 ) 709 { 710 if ( !isEnabled ) 711 { 712 // Inser the blocker IFRAME before the cover. 713 var blocker = document.createElement( 'iframe' ) ; 714 blocker.src = FCKTools.GetVoidUrl() ; 715 blocker.hideFocus = true ; 716 blocker.frameBorder = 0 ; 717 blocker.id = blocker.className = 'blocker' ; 718 cover.appendChild( blocker ) ; 719 } 720 else 721 { 722 var blocker = $( 'blocker' ) ; 723 if ( blocker && blocker.parentNode ) 724 blocker.parentNode.removeChild( blocker ) ; 725 } 726 } 727 } ; 728 })() ; 332 729 </script> 333 730 </head> 334 <body onload=" LoadInnerDialog();" class="PopupBody">335 < table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">336 < tr>337 < td id="TitleArea" class="PopupTitle PopupTitleBorder">731 <body onload="Init();" class="DialogBody"> 732 <div class="contents" id="contents"> 733 <div id="header"> 734 <div id="TitleArea" class="DialogTitle DialogTitleBorder"> 338 735 <script type="text/javascript"> 339 document.write( sTitle ) ;736 document.write( Args().Title ) ; 340 737 </script> 341 </td> 342 </tr> 343 <tr id="TabsRow" style="DISPLAY: none"> 344 <td class="PopupTabArea"> 738 <div id="closeButton" onclick="Cancel();"></div> 739 </div> 740 <div id="TabsRow" class="DialogTabArea" style="display: none"> 345 741 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 346 <tr id="Tabs" onselectstart="return false;">347 <td class=" PopupTabEmptyArea"> </td>348 <td class=" PopupTabEmptyArea" width="100%"> </td>742 <tr id="Tabs"> 743 <td class="DialogTabEmptyArea"> </td> 744 <td class="DialogTabEmptyArea" width="100%"> </td> 349 745 </tr> 350 746 </table> 351 </td> 352 </tr> 353 <tr> 354 <td id="FrameCell" height="100%" valign="top"> 355 356 </td> 357 </tr> 358 <tr> 359 <td class="PopupButtons"> 360 <table border="0" cellpadding="0" cellspacing="0"> 361 <tr> 362 <td width="100%"> </td> 363 <td nowrap="nowrap"> 364 <input id="btnOk" style="VISIBILITY: hidden;" type="button" value="Ok" class="Button" onclick="Ok();" fckLang="DlgBtnOK" /> 365 366 <input id="btnCancel" type="button" value="Cancel" class="Button" onclick="Cancel();" fckLang="DlgBtnCancel" /> 367 </td> 368 </tr> 369 </table> 370 </td> 371 </tr> 372 </table> 747 </div> 748 </div> 749 <div id="innerContents"></div> 750 <div id="DialogButtons" class="DialogButtons"> 751 <table border="0" cellpadding="0" cellspacing="0"> 752 <tr> 753 <td width="100%"> </td> 754 <td nowrap="nowrap"> 755 <input id="btnOk" style="visibility: hidden;" type="button" value="Ok" class="Button" onclick="Ok();" fckLang="DlgBtnOK" /> 756 757 <input id="btnCancel" type="button" value="Cancel" class="Button" onclick="Cancel();" fckLang="DlgBtnCancel" /> 758 </td> 759 </tr> 760 </table> 761 </div> 762 </div> 763 <div class="tl"></div> 764 <div class="tc"></div> 765 <div class="tr"></div> 766 <div class="ml"></div> 767 <div class="mr"></div> 768 <div class="bl"></div> 769 <div class="bc"></div> 770 <div class="br"></div> 771 <div class="cover" id="cover" style="display:none"></div> 772 <div id="throbberBlock" style="position: absolute; visibility: hidden"></div> 773 <script type="text/javascript"> 774 // Set the class name for language direction. 775 document.body.className += ' ' + langDir ; 776 777 var cover = $( 'cover' ) ; 778 cover.style.backgroundColor = FCKConfig.BackgroundBlockerColor ; 779 FCKDomTools.SetOpacity( cover, FCKConfig.BackgroundBlockerOpacity ) ; 780 </script> 373 781 </body> 374 782 </html> -
FCKeditor/trunk/editor/fckeditor.html
r1300 r1398 182 182 LoadScript( '_source/internals/fcktoolbarset.js' ) ; 183 183 LoadScript( '_source/internals/fckdialog.js' ) ; 184 LoadScript( '_source/internals/fckdialog_' + sSuffix + '.js' ) ;185 184 LoadScript( '_source/classes/fckmenuitem.js' ) ; 186 185 LoadScript( '_source/classes/fckmenublock.js' ) ; … … 238 237 239 238 FCKConfig_PreProcess() ; 239 240 // Popup the debug window if debug mode is set to true. It guarantees that the 241 // first debug message will not be lost. 242 if ( FCKConfig.Debug ) 243 FCKDebug._GetWindow() ; 240 244 241 245 // Load the active skin CSS. -
FCKeditor/trunk/editor/filemanager/connectors/aspx/connector.aspx
r1203 r1398 1 <%@ Page Language="c#" Trace="false" Inherits="FredCK.FCKeditorV2.FileBrowser.Connector" AutoEventWireup="false" %>1 <%@ Page Language="c#" Trace="false" Inherits="FredCK.FCKeditorV2.FileBrowser.Connector" AutoEventWireup="false" %> 2 2 <%@ Register Src="config.ascx" TagName="Config" TagPrefix="FCKeditor" %> 3 3 <%-- -
FCKeditor/trunk/editor/filemanager/connectors/aspx/upload.aspx
r1203 r1398 1 <%@ Page Language="c#" Trace="false" Inherits="FredCK.FCKeditorV2.FileBrowser.Uploader" AutoEventWireup="false" %>1 <%@ Page Language="c#" Trace="false" Inherits="FredCK.FCKeditorV2.FileBrowser.Uploader" AutoEventWireup="false" %> 2 2 <%@ Register Src="config.ascx" TagName="Config" TagPrefix="FCKeditor" %> 3 3 <%-- -
FCKeditor/trunk/editor/plugins/placeholder/fckplugin.js
r308 r1398 23 23 24 24 // Register the related command. 25 FCKCommands.RegisterCommand( 'Placeholder', new FCKDialogCommand( 'Placeholder', FCKLang.PlaceholderDlgTitle, FCKPlugins.Items['placeholder'].Path + 'fck_placeholder.html', 340, 1 70 ) ) ;25 FCKCommands.RegisterCommand( 'Placeholder', new FCKDialogCommand( 'Placeholder', FCKLang.PlaceholderDlgTitle, FCKPlugins.Items['placeholder'].Path + 'fck_placeholder.html', 340, 160 ) ) ; 26 26 27 27 // Create the "Plaholder" toolbar button. -
FCKeditor/trunk/editor/skins/default/fck_dialog.css
r447 r1398 1 /*1 /* 2 2 * FCKeditor - The text editor for Internet - http://www.fckeditor.net 3 3 * Copyright (C) 2003-2007 Frederico Caldeira Knabben … … 22 22 */ 23 23 24 html, body 25 { 26 background-color: transparent; 27 margin: 0px; 28 padding: 0px; 29 } 30 24 31 body 25 32 { 26 margin: 0px;27 33 padding: 10px; 28 34 } … … 39 45 } 40 46 41 .PopupBody 42 { 43 margin: 0px; 47 .DialogBody 48 { 49 height: 100%; 50 width: 100%; 51 overflow: hidden; 52 background-color: transparent; 44 53 padding: 0px; 45 54 } 46 55 47 .PopupTitle 56 #header 57 { 58 cursor: move; 59 } 60 61 .DialogTitle 48 62 { 49 63 font-weight: bold; … … 54 68 } 55 69 56 .PopupButtons 57 { 70 .DialogButtons 71 { 72 position: absolute; 73 bottom: 0px; 58 74 border-top: #d5d59d 1px solid; 59 75 background-color: #e3e3c7; … … 83 99 } 84 100 85 . PopupTitleBorder101 .DialogTitleBorder 86 102 { 87 103 border-bottom: #d5d59d 1px solid; 88 104 } 89 105 90 . PopupTabArea106 .DialogTabArea 91 107 { 92 108 color: #737357; … … 94 110 } 95 111 96 . PopupTabEmptyArea97 { 98 padding-left: 10px ;112 .DialogTabEmptyArea 113 { 114 padding-left: 10px; 99 115 border-bottom: #d5d59d 1px solid; 100 116 } 101 117 102 . PopupTab, .PopupTabSelected118 .DialogTab, .DialogTabSelected 103 119 { 104 120 border-right: #d5d59d 1px solid; … … 109 125 } 110 126 111 . PopupTab127 .DialogTab 112 128 { 113 129 margin-top: 1px; … … 117 133 } 118 134 119 . PopupTabSelected120 { 121 font-weight: bold;135 .DialogTabSelected 136 { 137 font-weight: bold; 122 138 cursor: default; 123 139 padding-top: 4px; … … 126 142 } 127 143 128 . PopupSelectionBox144 .DialogSelectionBox 129 145 { 130 146 border: #ff9933 1px solid !important; … … 134 150 } 135 151 136 #tdBrowse 152 #tdBrowse 137 153 { 138 154 vertical-align: bottom; 139 155 } 156 157 /** 158 * Dialog frame related styles. 159 */ 160 161 .contents 162 { 163 position: absolute; 164 top: 2px; 165 left: 16px; 166 right: 16px; 167 bottom: 20px; 168 background-color: #f1f1e3; 169 overflow: hidden; 170 z-index: 1; 171 } 172 173 .tl, .tr, .tc, .bl, .br, .bc 174 { 175 position: absolute; 176 background-image: url(images/sprites.png); 177 background-repeat: no-repeat; 178 } 179 180 * html .tl, * html .tr, * html .tc, * html .bl, * html .br, * html .bc 181 { 182 background-image: url(images/sprites.gif); 183 } 184 185 .ml, .mr 186 { 187 position: absolute; 188 background-image: url(images/dialog.sides.png); 189 background-repeat: repeat-y; 190 } 191 192 * html .ml, * html .mr 193 { 194 background-image: url(images/dialog.sides.gif); 195 } 196 197 .rtl .ml, .rtl .mr 198 { 199 position: absolute; 200 background-image: url(images/dialog.sides.rtl.png); 201 background-repeat: repeat-y; 202 } 203 204 * html .rtl .ml, * html .rtl .mr 205 { 206 background-image: url(images/dialog.sides.gif); 207 } 208 209 .tl 210 { 211 top: 0px; 212 left: 0px; 213 width: 16px; 214 height: 16px; 215 background-position: -16px -16px; 216 } 217 218 .rtl .tl 219 { 220 background-position: -16px -397px; 221 } 222 223 .tr 224 { 225 top: 0px; 226 right: 0px; 227 width: 16px; 228 height: 16px; 229 background-position: -16px -76px; 230 } 231 232 .rtl .tr 233 { 234 background-position: -16px -457px; 235 } 236 237 .tc 238 { 239 top: 0px; 240 right: 16px; 241 left: 16px; 242 height: 16px; 243 background-position: 0px -136px; 244 background-repeat: repeat-x; 245 } 246 247 .ml 248 { 249 top: 16px; 250 left: 0px; 251 width: 16px; 252 bottom: 51px; 253 background-position: 0px 0px; 254 } 255 256 .mr 257 { 258 top: 16px; 259 right: 0px; 260 width: 16px; 261 bottom: 51px; 262 background-position: -16px 0px; 263 } 264 265 .bl 266 { 267 bottom: 0px; 268 left: 0px; 269 width: 30px; 270 height: 51px; 271 background-position: -16px -196px; 272 } 273 274 .rtl .bl 275 { 276 background-position: -16px -517px; 277 } 278 279 .br 280 { 281 bottom: 0px; 282 right: 0px; 283 width: 30px; 284 height: 51px; 285 background-position: -16px -263px; 286 } 287 288 .rtl .br 289 { 290 background-position: -16px -584px; 291 } 292 293 .bc 294 { 295 bottom: 0px; 296 right: 30px; 297 left: 30px; 298 height: 51px; 299 background-position: 0px -330px; 300 background-repeat: repeat-x; 301 } 302 303 /* For IE6. Do not change it. */ 304 * html .blocker 305 { 306 position: absolute; 307 width: 100%; 308 height: 100%; 309 z-index: 12; 310 filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0); 311 } 312 313 /* The layer used to cover the dialog when opening a child dialog. */ 314 .cover 315 { 316 position: absolute; 317 top: 0px; 318 left: 14px; 319 right: 14px; 320 bottom: 18px; 321 z-index: 11; 322 } 323 324 #closeButton 325 { 326 position: absolute; 327 right: 0px; 328 top: 0px; 329 margin-top: 5px; 330 margin-right: 10px; 331 width: 20px; 332 height: 20px; 333 cursor: pointer; 334 background-image: url(images/sprites.png); 335 background-repeat: no-repeat; 336 background-position: -16px -651px; 337 } 338 339 * html #closeButton 340 { 341 cursor: hand; 342 background-image: url(images/sprites.gif); 343 } 344 345 .rtl #closeButton 346 { 347 right: auto; 348 left: 0px; 349 margin-left: 10px; 350 } 351 352 #closeButton:hover 353 { 354 background-position: -16px -687px; 355 } 356 357 #throbberBlock 358 { 359 z-index: 10; 360 } 361 362 #throbberBlock div 363 { 364 float: left; 365 width: 8px; 366 height: 9px; 367 margin-left: 2px; 368 margin-right: 2px; 369 font-size: 1px; /* IE6 */ 370 } 371 372 /* 373 Color Gradient Generator: 374 http://www.herethere.net/~samson/php/color_gradient/?cbegin=737357&cend=E3E3C7&steps=4 375 */ 376 377 .throbber_1 378 { 379 background-color: #737357; 380 } 381 382 .throbber_2 383 { 384 background-color: #8f8f73; 385 } 386 387 .throbber_3 388 { 389 background-color: #abab8f; 390 } 391 392 .throbber_4 393 { 394 background-color: #c7c7ab; 395 } 396 397 .throbber_5 398 { 399 background-color: #e3e3c7; 400 } -
FCKeditor/trunk/editor/skins/office2003/fck_dialog.css
r447 r1398 1 /*1 /* 2 2 * FCKeditor - The text editor for Internet - http://www.fckeditor.net 3 3 * Copyright (C) 2003-2007 Frederico Caldeira Knabben … … 22 22 */ 23 23 24 html, body 25 { 26 background-color: transparent; 27 margin: 0px; 28 padding: 0px; 29 } 30 24 31 body 25 32 { 26 margin: 0px;27 33 padding: 10px; 28 background-color: #f7f8fd;29 34 } 30 35 … … 40 45 } 41 46 42 .PopupBody 43 { 44 margin: 0px; 47 .DialogBody 48 { 49 height: 100%; 50 width: 100%; 51 overflow: hidden; 52 background-color: transparent; 45 53 padding: 0px; 46 54 } 47 55 48 .PopupTitle 56 #header 57 { 58 cursor: move; 59 } 60 61 .DialogTitle 49 62 { 50 63 font-weight: bold; … … 55 68 } 56 69 57 .PopupButtons 58 { 70 .DialogButtons 71 { 72 position: absolute; 73 bottom: 0px; 59 74 border-top: #466ca6 1px solid; 60 75 background-color: #8cb2fd; … … 84 99 } 85 100 86 . PopupTitleBorder101 .DialogTitleBorder 87 102 { 88 103 border-bottom: #d5d59d 1px solid; 89 104 } 90 105 91 . PopupTabArea106 .DialogTabArea 92 107 { 93 108 color: #0e3460; … … 95 110 } 96 111 97 . PopupTabEmptyArea112 .DialogTabEmptyArea 98 113 { 99 114 padding-left: 10px ; … … 101 116 } 102 117 103 . PopupTab, .PopupTabSelected118 .DialogTab, .DialogTabSelected 104 119 { 105 120 border-right: #466ca6 1px solid; … … 110 125 } 111 126 112 . PopupTab127 .DialogTab 113 128 { 114 129 margin-top: 1px; … … 118 133 } 119 134 120 . PopupTabSelected121 { 122 font-weight: bold;135 .DialogTabSelected 136 { 137 font-weight: bold; 123 138 cursor: default; 124 139 padding-top: 4px; … … 127 142 } 128 143 129 . PopupSelectionBox144 .DialogSelectionBox 130 145 { 131 146 border: #1e90ff 1px solid !important; … … 139 154 vertical-align: bottom; 140 155 } 156 157 /** 158 * Dialog frame related styles. 159 */ 160 161 .contents 162 { 163 position: absolute; 164 top: 2px; 165 left: 16px; 166 right: 16px; 167 bottom: 20px; 168 background-color: #f7f8fD; 169 overflow: hidden; 170 z-index: 1; 171 } 172 173 .tl, .tr, .tc, .bl, .br, .bc 174 { 175 position: absolute; 176 background-image: url(images/sprites.png); 177 background-repeat: no-repeat; 178 } 179 180 * html .tl, * html .tr, * html .tc, * html .bl, * html .br, * html .bc 181 { 182 background-image: url(images/sprites.gif); 183 } 184 185 .ml, .mr 186 { 187 position: absolute; 188 background-image: url(images/dialog.sides.png); 189 background-repeat: repeat-y; 190 } 191 192 * html .ml, * html .mr 193 { 194 background-image: url(images/dialog.sides.gif); 195 } 196 197 .rtl .ml, .rtl .mr 198 { 199 position: absolute; 200 background-image: url(images/dialog.sides.rtl.png); 201 background-repeat: repeat-y; 202 } 203 204 * html .rtl .ml, * html .rtl .mr 205 { 206 background-image: url(images/dialog.sides.gif); 207 } 208 209 .tl 210 { 211 top: 0px; 212 left: 0px; 213 width: 16px; 214 height: 16px; 215 background-position: -16px -16px; 216 } 217 218 .rtl .tl 219 { 220 background-position: -16px -397px; 221 } 222 223 .tr 224 { 225 top: 0px; 226 right: 0px; 227 width: 16px; 228 height: 16px; 229 background-position: -16px -76px; 230 } 231 232 .rtl .tr 233 { 234 background-position: -16px -457px; 235 } 236 237 .tc 238 { 239 top: 0px; 240 right: 16px; 241 left: 16px; 242 height: 16px; 243 background-position: 0px -136px; 244 background-repeat: repeat-x; 245 } 246 247 .ml 248 { 249 top: 16px; 250 left: 0px; 251 width: 16px; 252 bottom: 51px; 253 background-position: 0px 0px; 254 } 255 256 .mr 257 { 258 top: 16px; 259 right: 0px; 260 width: 16px; 261 bottom: 51px; 262 background-position: -16px 0px; 263 } 264 265 .bl 266 { 267 bottom: 0px; 268 left: 0px; 269 width: 30px; 270 height: 51px; 271 background-position: -16px -196px; 272 } 273 274 .rtl .bl 275 { 276 background-position: -16px -517px; 277 } 278 279 .br 280 { 281 bottom: 0px; 282 right: 0px; 283 width: 30px; 284 height: 51px; 285 background-position: -16px -263px; 286 } 287 288 .rtl .br 289 { 290 background-position: -16px -584px; 291 } 292 293 .bc 294 { 295 bottom: 0px; 296 right: 30px; 297 left: 30px; 298 height: 51px; 299 background-position: 0px -330px; 300 background-repeat: repeat-x; 301 } 302 303 /* For IE6. Do not change it. */ 304 * html .blocker 305 { 306 position: absolute; 307 width: 100%; 308 height: 100%; 309 z-index: 12; 310 filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0); 311 } 312 313 /* The layer used to cover the dialog when opening a child dialog. */ 314 .cover 315 { 316 position: absolute; 317 top: 0px; 318 left: 14px; 319 right: 14px; 320 bottom: 18px; 321 z-index: 11; 322 } 323 324 #closeButton 325 { 326 position: absolute; 327 right: 0px; 328 top: 0px; 329 margin-top: 5px; 330 margin-right: 10px; 331 width: 20px; 332 height: 20px; 333 cursor: pointer; 334 background-image: url(images/sprites.png); 335 background-repeat: no-repeat; 336 background-position: -16px -651px; 337 } 338 339 * html #closeButton 340 { 341 cursor: hand; 342 background-image: url(images/sprites.gif); 343 } 344 345 .rtl #closeButton 346 { 347 right: auto; 348 left: 0px; 349 margin-left: 10px; 350 } 351 352 #closeButton:hover 353 { 354 background-position: -16px -687px; 355 } 356 357 #throbberBlock 358 { 359 z-index: 10; 360 } 361 362 #throbberBlock div 363 { 364 float: left; 365 width: 8px; 366 height: 9px; 367 margin-left: 2px; 368 margin-right: 2px; 369 font-size: 1px; /* IE6 */ 370 } 371 372 /* 373 Color Gradient Generator: 374 http://www.herethere.net/~samson/php/color_gradient/?cbegin=0E3460&cend=8cb2fd&steps=4 375 */ 376 377 .throbber_1 378 { 379 background-color: #0E3460; 380 } 381 382 .throbber_2 383 { 384 background-color: #2D5387; 385 } 386 387 .throbber_3 388 { 389 background-color: #4D73AE; 390 } 391 392 .throbber_4 393 { 394 background-color: #6C92D5; 395 } 396 397 .throbber_5 398 { 399 background-color: #8CB2FD; 400 } -
FCKeditor/trunk/editor/skins/silver/fck_dialog.css
r447 r1398 1 /*1 /* 2 2 * FCKeditor - The text editor for Internet - http://www.fckeditor.net 3 3 * Copyright (C) 2003-2007 Frederico Caldeira Knabben … … 22 22 */ 23 23 24 html, body 25 { 26 background-color: transparent; 27 margin: 0px; 28 padding: 0px; 29 } 30 24 31 body 25 32 { 26 margin: 0px;27 33 padding: 10px; 28 background-color: #f7f7f7;29 34 } 30 35 … … 40 45 } 41 46 42 .PopupBody 43 { 44 margin: 0px; 47 .DialogBody 48 { 49 height: 100%; 50 width: 100%; 51 overflow: hidden; 52 background-color: transparent; 45 53 padding: 0px; 46 54 } 47 55 48 .PopupTitle 49 { 50 padding-right: 10px; 51 padding-left: 10px; 56 #header 57 { 58 cursor: move; 59 } 60 61 .DialogTitle 62 { 52 63 font-weight: bold; 53 64 font-size: 14pt; 54 padding-bottom: 3px;55 65 color: #504845; 56 padding-top: 3px;57 66 background-color: #dedede; 58 } 59 60 .PopupButtons 61 { 67 padding: 3px 10px 3px 10px; 68 } 69 70 .DialogButtons 71 { 72 position: absolute; 73 bottom: 0px; 62 74 border-top: #cec6b5 1px solid; 63 75 background-color: #DEDEDE; … … 87 99 } 88 100 89 . PopupTitleBorder101 .DialogTitleBorder 90 102 { 91 103 border-bottom: #cec6b5 1px solid; 92 104 } 93 105 94 . PopupTabArea106 .DialogTabArea 95 107 { 96 108 color: #504845; … … 98 110 } 99 111 100 . PopupTabEmptyArea112 .DialogTabEmptyArea 101 113 { 102 114 padding-left: 10px ; … … 104 116 } 105 117 106 . PopupTab, .PopupTabSelected118 .DialogTab, .DialogTabSelected 107 119 { 108 120 border-right: #cec6b5 1px solid; … … 113 125 } 114 126 115 . PopupTab127 .DialogTab 116 128 { 117 129 margin-top: 1px; … … 121 133 } 122 134 123 . PopupTabSelected135 .DialogTabSelected 124 136 { 125 137 font-weight:bold; … … 130 142 } 131 143 132 . PopupSelectionBox144 .DialogSelectionBox 133 145 { 134 146 border: #a9a9a9 1px solid !important; … … 142 154 vertical-align: bottom; 143 155 } 156 157 /** 158 * Dialog frame related styles. 159 */ 160 161 .contents 162 { 163 position: absolute; 164 top: 2px; 165 left: 16px; 166 right: 16px; 167 bottom: 20px; 168 background-color: #f7f7f7; 169 overflow: hidden; 170 z-index: 1; 171 } 172 173 .tl, .tr, .tc, .bl, .br, .bc 174 { 175 position: absolute; 176 background-image: url(images/sprites.png); 177 background-repeat: no-repeat; 178 } 179 180 * html .tl, * html .tr, * html .tc, * html .bl, * html .br, * html .bc 181 { 182 background-image: url(images/sprites.gif); 183 } 184 185 .ml, .mr 186 { 187 position: absolute; 188 background-image: url(images/dialog.sides.png); 189 background-repeat: repeat-y; 190 } 191 192 * html .ml, * html .mr 193 { 194 background-image: url(images/dialog.sides.gif); 195 } 196 197 .rtl .ml, .rtl .mr 198 { 199 position: absolute; 200 background-image: url(images/dialog.sides.rtl.png); 201 background-repeat: repeat-y; 202 } 203 204 * html .rtl .ml, * html .rtl .mr 205 { 206 background-image: url(images/dialog.sides.gif); 207 } 208 209 .tl 210 { 211 top: 0px; 212 left: 0px; 213 width: 16px; 214 height: 16px; 215 background-position: -16px -16px; 216 } 217 218 .rtl .tl 219 { 220 background-position: -16px -397px; 221 } 222 223 .tr 224 { 225 top: 0px; 226 right: 0px; 227 width: 16px; 228 height: 16px; 229 background-position: -16px -76px; 230 } 231 232 .rtl .tr 233 { 234 background-position: -16px -457px; 235 } 236 237 .tc 238 { 239 top: 0px; 240 right: 16px; 241 left: 16px; 242 height: 16px; 243 background-position: 0px -136px; 244 background-repeat: repeat-x; 245 } 246 247 .ml 248 { 249 top: 16px; 250 left: 0px; 251 width: 16px; 252 bottom: 51px; 253 background-position: 0px 0px; 254 } 255 256 .mr 257 { 258 top: 16px; 259 right: 0px; 260 width: 16px; 261 bottom: 51px; 262 background-position: -16px 0px; 263 } 264 265 .bl 266 { 267 bottom: 0px; 268 left: 0px; 269 width: 30px; 270 height: 51px; 271 background-position: -16px -196px; 272 } 273 274 .rtl .bl 275 { 276 background-position: -16px -517px; 277 } 278 279 .br 280 { 281 bottom: 0px; 282 right: 0px; 283 width: 30px; 284 height: 51px; 285 background-position: -16px -263px; 286 } 287 288 .rtl .br 289 { 290 background-position: -16px -584px; 291 } 292 293 .bc 294 { 295 bottom: 0px; 296 right: 30px; 297 left: 30px; 298 height: 51px; 299 background-position: 0px -330px; 300 background-repeat: repeat-x; 301 } 302 303 /* For IE6. Do not change it. */ 304 * html .blocker 305 { 306 position: absolute; 307 width: 100%; 308 height: 100%; 309 z-index: 12; 310 filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0); 311 } 312 313 /* The layer used to cover the dialog when opening a child dialog. */ 314 .cover 315 { 316 position: absolute; 317 top: 0px; 318 left: 14px; 319 right: 14px; 320 bottom: 18px; 321 z-index: 11; 322 } 323 324 #closeButton 325 { 326 position: absolute; 327 right: 0px; 328 top: 0px; 329 margin-top: 5px; 330 margin-right: 10px; 331 width: 20px; 332 height: 20px; 333 cursor: pointer; 334 background-image: url(images/sprites.png); 335 background-repeat: no-repeat; 336 background-position: -16px -651px; 337 } 338 339 * html #closeButton 340 { 341 cursor: hand; 342 background-image: url(images/sprites.gif); 343 } 344 345 .rtl #closeButton 346 { 347 right: auto; 348 left: 0px; 349 margin-left: 10px; 350 } 351 352 #closeButton:hover 353 { 354 background-position: -16px -687px; 355 } 356 357 #throbberBlock 358 { 359 z-index: 10; 360 } 361 362 #throbberBlock div 363 { 364 float: left; 365 width: 8px; 366 height: 9px; 367 margin-left: 2px; 368 margin-right: 2px; 369 font-size: 1px; /* IE6 */ 370 } 371 372 /* 373 Color Gradient Generator: 374 http://www.herethere.net/~samson/php/color_gradient/?cbegin=504845&cend=DEDEDE&steps=4 375 */ 376 377 .throbber_1 378 { 379 background-color: #504845; 380 } 381 382 .throbber_2 383 { 384 background-color: #736D6B; 385 } 386 387 .throbber_3 388 { 389 background-color: #979391; 390 } 391 392 .throbber_4 393 { 394 background-color: #BAB8B7; 395 } 396 397 .throbber_5 398 { 399 background-color: #DEDEDE; 400 } -
FCKeditor/trunk/fckconfig.js
r1170 r1398 240 240 }, 241 241 242 'BackColor' : { Element : 'span', Styles : { 'background-color' : '#("Color","color")' } } 242 'BackColor' : { Element : 'span', Styles : { 'background-color' : '#("Color","color")' } }, 243 244 'SelectionHighlight' : { Element : 'span', Styles : { 'background-color' : 'navy', 'color' : 'white' } } 243 245 }; 244 246 … … 303 305 FCKConfig.SmileyColumns = 8 ; 304 306 FCKConfig.SmileyWindowWidth = 320 ; 305 FCKConfig.SmileyWindowHeight = 240 ; 306 307 FCKConfig.SmileyWindowHeight = 210 ; 308 309 FCKConfig.BackgroundBlockerColor = '#ffffff' ; 310 FCKConfig.BackgroundBlockerOpacity = 0.50 ; -
FCKeditor/trunk/fckpackager.xml
r851 r1398 152 152 <File path="editor/_source/internals/fcktoolbarset.js" /> 153 153 <File path="editor/_source/internals/fckdialog.js" /> 154 <File path="editor/_source/internals/fckdialog_ie.js" />155 154 156 155 <File path="editor/_source/classes/fckmenuitem.js" /> … … 248 247 <File path="editor/_source/internals/fcktoolbarset.js" /> 249 248 <File path="editor/_source/internals/fckdialog.js" /> 250 <File path="editor/_source/internals/fckdialog_gecko.js" />251 249 252 250 <File path="editor/_source/classes/fckmenuitem.js" />
Note: See TracChangeset
for help on using the changeset viewer.
