Changeset 5149
- Timestamp:
- 02/18/10 13:34:57 (3 years ago)
- Location:
- CKEditor/trunk
- Files:
-
- 37 edited
-
_dev/fixlineends/fixlineends.php (modified) (1 diff)
-
_source/core/command.js (modified) (1 diff)
-
_source/core/dom/element.js (modified) (1 diff)
-
_source/core/dom/range.js (modified) (2 diffs)
-
_source/core/dom/window.js (modified) (1 diff)
-
_source/core/editor.js (modified) (1 diff)
-
_source/core/editor_basic.js (modified) (1 diff)
-
_source/core/htmlparser.js (modified) (1 diff)
-
_source/core/htmlparser/element.js (modified) (4 diffs)
-
_source/core/htmlparser/filter.js (modified) (1 diff)
-
_source/core/htmlparser/fragment.js (modified) (2 diffs)
-
_source/plugins/clipboard/plugin.js (modified) (1 diff)
-
_source/plugins/contextmenu/plugin.js (modified) (3 diffs)
-
_source/plugins/div/dialogs/div.js (modified) (5 diffs)
-
_source/plugins/div/plugin.js (modified) (1 diff)
-
_source/plugins/find/dialogs/find.js (modified) (6 diffs)
-
_source/plugins/floatpanel/plugin.js (modified) (2 diffs)
-
_source/plugins/forms/dialogs/select.js (modified) (1 diff)
-
_source/plugins/forms/plugin.js (modified) (2 diffs)
-
_source/plugins/image/dialogs/image.js (modified) (8 diffs)
-
_source/plugins/indent/plugin.js (modified) (1 diff)
-
_source/plugins/link/dialogs/link.js (modified) (3 diffs)
-
_source/plugins/list/plugin.js (modified) (2 diffs)
-
_source/plugins/pastefromword/filter/default.js (modified) (22 diffs)
-
_source/plugins/pastefromword/plugin.js (modified) (2 diffs)
-
_source/plugins/pastetext/plugin.js (modified) (1 diff)
-
_source/plugins/scayt/dialogs/options.js (modified) (2 diffs)
-
_source/plugins/selection/plugin.js (modified) (1 diff)
-
_source/plugins/showborders/plugin.js (modified) (2 diffs)
-
_source/plugins/styles/plugin.js (modified) (5 diffs)
-
_source/plugins/table/dialogs/table.js (modified) (1 diff)
-
_source/plugins/tabletools/dialogs/tableCell.js (modified) (2 diffs)
-
_source/plugins/tabletools/plugin.js (modified) (17 diffs)
-
_source/plugins/undo/plugin.js (modified) (2 diffs)
-
_source/plugins/wsc/dialogs/ciframe.html (modified) (1 diff)
-
_source/plugins/wysiwygarea/plugin.js (modified) (11 diffs)
-
_source/skins/kama/skin.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/trunk/_dev/fixlineends/fixlineends.php
r4858 r5149 287 287 288 288 case 'LF': 289 if (substr($line, -2) === CRLF) {289 if (substr($line, -2) === CRLF) { 290 290 $line = substr($line, 0, -2) . LF; 291 291 $modified = true; -
CKEditor/trunk/_source/core/command.js
r4858 r5149 13 13 return false; 14 14 15 if ( this.editorFocus ) // Give editor focus if necessary (#4355).15 if ( this.editorFocus ) // Give editor focus if necessary (#4355). 16 16 editor.focus(); 17 17 -
CKEditor/trunk/_source/core/dom/element.js
r4919 r5149 1349 1349 continue; 1350 1350 1351 if ( attrName == 'checked' && ( attrValue = this.getAttribute( attrName ) ) )1351 if ( attrName == 'checked' && ( attrValue = this.getAttribute( attrName ) ) ) 1352 1352 dest.setAttribute( attrName, attrValue ); 1353 1353 // IE BUG: value attribute is never specified even if it exists. -
CKEditor/trunk/_source/core/dom/range.js
r5099 r5149 253 253 254 254 // Cleanup any marked node. 255 if ( removeStartNode )255 if ( removeStartNode ) 256 256 startNode.remove(); 257 257 258 if ( removeEndNode && endNode.$.parentNode )258 if ( removeEndNode && endNode.$.parentNode ) 259 259 endNode.remove(); 260 260 }; … … 279 279 return false; 280 280 } 281 else if ( node.type == CKEDITOR.NODE_ELEMENT )281 else if ( node.type == CKEDITOR.NODE_ELEMENT ) 282 282 { 283 283 // If there are non-empty inline elements (e.g. <img />), then we're not -
CKEditor/trunk/_source/core/dom/window.js
r4858 r5149 37 37 { 38 38 // Webkit is sometimes failed to focus iframe, blur it first(#3835). 39 if ( CKEDITOR.env.webkit && this.$.parent )39 if ( CKEDITOR.env.webkit && this.$.parent ) 40 40 this.$.parent.focus(); 41 41 this.$.focus(); -
CKEditor/trunk/_source/core/editor.js
r5142 r5149 664 664 var data = this.getData(); 665 665 666 if ( this.config.htmlEncodeOutput )666 if ( this.config.htmlEncodeOutput ) 667 667 data = CKEDITOR.tools.htmlEncode( data ); 668 668 -
CKEditor/trunk/_source/core/editor_basic.js
r4858 r5149 137 137 element = document.getElementById( elementOrId ); 138 138 139 if ( !element )139 if ( !element ) 140 140 throw '[CKEDITOR.editor.appendTo] The element with id "' + elementOrId + '" was not found.'; 141 141 } -
CKEditor/trunk/_source/core/htmlparser.js
r4858 r5149 202 202 203 203 // Comment 204 if ( ( tagName = parts[ 2 ] ) )204 if ( ( tagName = parts[ 2 ] ) ) 205 205 this.onComment( tagName ); 206 206 } -
CKEditor/trunk/_source/core/htmlparser/element.js
r4858 r5149 115 115 element.filterChildren = function() 116 116 { 117 if ( !isChildrenFiltered )117 if ( !isChildrenFiltered ) 118 118 { 119 119 var writer = new CKEDITOR.htmlParser.basicWriter(); … … 178 178 newAttrName = a; 179 179 value = attributes[ a ]; 180 if ( i == 1 )180 if ( i == 1 ) 181 181 attribsArray.push( [ a, value ] ); 182 182 else if ( filter ) … … 189 189 break; 190 190 } 191 else if ( newAttrName != a )191 else if ( newAttrName != a ) 192 192 { 193 193 delete attributes[ a ]; … … 198 198 break; 199 199 } 200 if ( newAttrName )200 if ( newAttrName ) 201 201 { 202 if ( ( value = filter.onAttribute( element, newAttrName, value ) ) === false )202 if ( ( value = filter.onAttribute( element, newAttrName, value ) ) === false ) 203 203 delete attributes[ newAttrName ]; 204 204 else -
CKEditor/trunk/_source/core/htmlparser/filter.js
r4858 r5149 151 151 function addItemsToList( list, items, priority ) 152 152 { 153 if ( typeof items == 'function' )153 if ( typeof items == 'function' ) 154 154 items = [ items ]; 155 155 -
CKEditor/trunk/_source/core/htmlparser/fragment.js
r5103 r5149 218 218 219 219 // Fixing malformed nested lists by moving it into a previous list item. (#3828) 220 if ( tagName in listBlocks220 if ( tagName in listBlocks 221 221 && currentName in listBlocks ) 222 222 { … … 261 261 } 262 262 263 if ( addPoint )263 if ( addPoint ) 264 264 currentNode = addPoint; 265 265 // Try adding it to the return point, or the parent element. -
CKEditor/trunk/_source/plugins/clipboard/plugin.js
r5118 r5149 322 322 function( evt ) 323 323 { 324 if ( depressBeforePasteEvent )324 if ( depressBeforePasteEvent ) 325 325 return; 326 326 -
CKEditor/trunk/_source/plugins/contextmenu/plugin.js
r5006 r5149 131 131 { 132 132 evt = evt.data; 133 if ( evt.$.button != 2 )133 if ( evt.$.button != 2 ) 134 134 { 135 135 if ( evt.getKeystroke() == CKEDITOR.CTRL + 1 ) … … 144 144 var target = evt.getTarget(); 145 145 146 if ( !contextMenuOverrideButton )146 if ( !contextMenuOverrideButton ) 147 147 { 148 148 var ownerDoc = target.getDocument(); … … 203 203 this ); 204 204 205 if ( CKEDITOR.env.webkit )205 if ( CKEDITOR.env.webkit ) 206 206 { 207 207 var holdCtrlKey, -
CKEditor/trunk/_source/plugins/div/dialogs/div.js
r4858 r5149 31 31 { 32 32 var child = children.getItem( i ); 33 if ( ! ( child.type === CKEDITOR.NODE_TEXT33 if ( ! ( child.type === CKEDITOR.NODE_TEXT 34 34 && ( /^[ \t\n\r]+$/ ).test( child.getText() ) ) ) 35 35 retval.push( child ); … … 56 56 57 57 // Exclude 'td' and 'th' when 'wrapping table' 58 if ( editor.config.div_wrapTable )58 if ( editor.config.div_wrapTable ) 59 59 { 60 60 delete definition.td; … … 95 95 { 96 96 // Exclude layout container elements 97 if ( /^(?!vbox|hbox)/.test( field.type ) )97 if ( /^(?!vbox|hbox)/.test( field.type ) ) 98 98 { 99 99 if ( !field.setup ) … … 156 156 { 157 157 // include contents of blockLimit elements. 158 if ( block.getName() in divLimitDefinition )158 if ( block.getName() in divLimitDefinition ) 159 159 { 160 160 var j, childNodes = block.getChildren(); … … 411 411 onOk : function() 412 412 { 413 if ( command == 'editdiv' )413 if ( command == 'editdiv' ) 414 414 containers = [ this._element ]; 415 415 else -
CKEditor/trunk/_source/plugins/div/plugin.js
r4858 r5149 48 48 { 49 49 range = ranges[ i ]; 50 if ( range.collapsed )50 if ( range.collapsed ) 51 51 findDiv( selection.getStartElement() ); 52 52 else -
CKEditor/trunk/_source/plugins/find/dialogs/find.js
r5013 r5149 108 108 var currentTextNode = this.textNode; 109 109 // Already at the end of document, no more character available. 110 if ( currentTextNode === null )110 if ( currentTextNode === null ) 111 111 return cursorStep.call( this ); 112 112 … … 114 114 115 115 // There are more characters in the text node, step forward. 116 if ( currentTextNode116 if ( currentTextNode 117 117 && rtl 118 118 && this.offset > 0 ) … … 121 121 return cursorStep.call( this ); 122 122 } 123 else if ( currentTextNode123 else if ( currentTextNode 124 124 && this.offset < currentTextNode.getLength() - 1 ) 125 125 { … … 143 143 144 144 // Marking as match character boundaries. 145 if ( !currentTextNode145 if ( !currentTextNode 146 146 && checkCharactersBoundary( this._.walker.current ) ) 147 147 this._.matchBoundary = true; … … 431 431 find : function( pattern, matchCase, matchWord, matchCyclic, highlightMatched, cyclicRerun ) 432 432 { 433 if ( !this.matchRange )433 if ( !this.matchRange ) 434 434 this.matchRange = 435 435 new characterRange( … … 805 805 } 806 806 807 if ( isUserSelect )807 if ( isUserSelect ) 808 808 // synchronize fields on tab switch. 809 809 syncFieldsBetweenTabs.call( this, pageId ); -
CKEditor/trunk/_source/plugins/floatpanel/plugin.js
r5095 r5149 256 256 257 257 // Vertical off screen is simpler. 258 if ( top + panelSize.height > viewportSize.height + windowScroll.y )258 if ( top + panelSize.height > viewportSize.height + windowScroll.y ) 259 259 top -= panelSize.height; 260 260 … … 376 376 var panel = panels[ i ]; 377 377 // Safe to destroy it since there're no more instances.(#4241) 378 if ( isLastInstance )378 if ( isLastInstance ) 379 379 panel.destroy(); 380 380 // Panel might be used by other instances, just hide them.(#4552) -
CKEditor/trunk/_source/plugins/forms/dialogs/select.js
r4858 r5149 163 163 { 164 164 editor.insertElement(element); 165 if ( CKEDITOR.env.ie )165 if ( CKEDITOR.env.ie ) 166 166 { 167 167 var sel = editor.getSelection(), -
CKEditor/trunk/_source/plugins/forms/plugin.js
r4858 r5149 167 167 { 168 168 // Cleanup certain IE form elements default values. 169 if ( CKEDITOR.env.ie )169 if ( CKEDITOR.env.ie ) 170 170 { 171 171 var dataProcessor = editor.dataProcessor, … … 180 180 var attrs = input.attributes, 181 181 type = attrs.type; 182 if ( type == 'checkbox' || type == 'radio' )182 if ( type == 'checkbox' || type == 'radio' ) 183 183 attrs.value == 'on' && delete attrs.value; 184 184 } -
CKEditor/trunk/_source/plugins/image/dialogs/image.js
r5145 r5149 86 86 function commitInternally( targetFields ) 87 87 { 88 if ( incommit )88 if ( incommit ) 89 89 return; 90 90 … … 93 93 var dialog = this.getDialog(), 94 94 element = dialog.imageElement; 95 if ( element )95 if ( element ) 96 96 { 97 97 // Commit this field and broadcast to target fields. … … 386 386 387 387 // Remove empty style attribute. 388 if ( !this.imageElement.getAttribute( 'style' ) )388 if ( !this.imageElement.getAttribute( 'style' ) ) 389 389 this.imageElement.removeAttribute( 'style' ); 390 390 … … 683 683 element.removeStyle( 'height' ); 684 684 685 if ( !internalCommit && type == IMAGE )685 if ( !internalCommit && type == IMAGE ) 686 686 element.removeAttribute( 'height' ); 687 687 } … … 824 824 } 825 825 826 if ( !internalCommit && type == IMAGE )826 if ( !internalCommit && type == IMAGE ) 827 827 element.removeAttribute( 'border' ); 828 828 } … … 893 893 } 894 894 895 if ( !internalCommit && type == IMAGE )895 if ( !internalCommit && type == IMAGE ) 896 896 element.removeAttribute( 'hspace' ); 897 897 } … … 960 960 } 961 961 962 if ( !internalCommit && type == IMAGE )962 if ( !internalCommit && type == IMAGE ) 963 963 element.removeAttribute( 'vspace' ); 964 964 } … … 1026 1026 element.removeStyle( 'float' ); 1027 1027 1028 if ( !internalCommit && type == IMAGE )1028 if ( !internalCommit && type == IMAGE ) 1029 1029 { 1030 1030 value = ( element.getAttribute( 'align' ) || '' ).toLowerCase(); -
CKEditor/trunk/_source/plugins/indent/plugin.js
r4858 r5149 160 160 for ( i = count - 1 ; i >= 0 ; i-- ) 161 161 { 162 if ( ( child = children.getItem( i ) ) && child.is && child.is( 'li' ) )162 if ( ( child = children.getItem( i ) ) && child.is && child.is( 'li' ) ) 163 163 pendingLis.push( child ); 164 164 } -
CKEditor/trunk/_source/plugins/link/dialogs/link.js
r5145 r5149 118 118 href.replace( functionCallProtectedEmailLinkRegex, function( match, funcName, funcArgs ) 119 119 { 120 if ( funcName == compiledProtectionFunction.name )120 if ( funcName == compiledProtectionFunction.name ) 121 121 { 122 122 retval.type = 'email'; … … 142 142 } 143 143 144 if ( !retval.type )144 if ( !retval.type ) 145 145 { 146 146 if ( ( anchorMatch = href.match( anchorRegex ) ) ) … … 310 310 311 311 // Compile the protection function pattern. 312 if ( emailProtection && emailProtection != 'encode' )312 if ( emailProtection && emailProtection != 'encode' ) 313 313 { 314 314 var compiledProtectionFunction = {}; -
CKEditor/trunk/_source/plugins/list/plugin.js
r4858 r5149 571 571 tailNbspmatch; 572 572 573 if ( nodeBefore573 if ( nodeBefore 574 574 && ( nodeBefore.name && nodeBefore.name == 'br' 575 575 || nodeBefore.value && ( tailNbspmatch = nodeBefore.value.match( tailNbspRegex ) ) ) ) … … 632 632 { 633 633 var dataProcessor = editor.dataProcessor; 634 if ( dataProcessor )634 if ( dataProcessor ) 635 635 { 636 636 dataProcessor.dataFilter.addRules( defaultListDataFilterRules ); -
CKEditor/trunk/_source/plugins/pastefromword/filter/default.js
r4895 r5149 26 26 { 27 27 child = children[ i ]; 28 if ( !child.name )28 if ( !child.name ) 29 29 continue; 30 30 … … 83 83 for( var style in name ) 84 84 { 85 if ( name.hasOwnProperty( style ) )85 if ( name.hasOwnProperty( style ) ) 86 86 addingStyleText += style + ':' + name[ style ] + ';'; 87 87 } … … 94 94 } 95 95 96 if ( !this.attributes )96 if ( !this.attributes ) 97 97 this.attributes = {}; 98 98 … … 187 187 { 188 188 var styleText = element.attributes && element.attributes.style; 189 if ( /mso-list\s*:\s*Ignore/i.test( styleText ) )189 if ( /mso-list\s*:\s*Ignore/i.test( styleText ) ) 190 190 return true; 191 191 }, … … 258 258 return function( cssLength ) 259 259 { 260 if ( cssLengthRelativeUnit.test( cssLength ) )260 if ( cssLengthRelativeUnit.test( cssLength ) ) 261 261 { 262 262 calculator.setStyle( 'width', cssLength ); … … 329 329 var attributes = child.attributes; 330 330 331 if ( child.name in CKEDITOR.dtd.$listItem )331 if ( child.name in CKEDITOR.dtd.$listItem ) 332 332 { 333 333 var listItemChildren = child.children, … … 336 336 337 337 // Move out nested list. 338 if ( last.name in CKEDITOR.dtd.$list )338 if ( last.name in CKEDITOR.dtd.$list ) 339 339 { 340 340 children.splice( i + 1, 0, last ); … … 480 480 for( var i = 0 ; i < styles.length; i++ ) 481 481 { 482 if ( styles[ i ] )482 if ( styles[ i ] ) 483 483 { 484 484 namePattern = styles[ i ][ 0 ]; … … 493 493 whitelist && ( newValue = newValue || value ); 494 494 495 if ( typeof newValue == 'function' )495 if ( typeof newValue == 'function' ) 496 496 newValue = newValue( value, element, name ); 497 497 498 498 // Return an couple indicate both name and value 499 499 // changed. 500 if ( newValue && newValue.push )500 if ( newValue && newValue.push ) 501 501 name = newValue[ 0 ], newValue = newValue[ 1 ]; 502 502 503 if ( typeof newValue == 'string' )503 if ( typeof newValue == 'string' ) 504 504 rules.push( [ name, newValue ] ); 505 505 return; … … 568 568 bogusAttrFilter : function( value, element ) 569 569 { 570 if ( element.name.indexOf( 'cke:' ) == -1 )570 if ( element.name.indexOf( 'cke:' ) == -1 ) 571 571 return false; 572 572 }, … … 646 646 element.filterChildren(); 647 647 // Is the heading actually a list item? 648 if ( resolveListItem( element ) )648 if ( resolveListItem( element ) ) 649 649 return; 650 650 … … 721 721 722 722 // Reject MS-Word Normal styles. 723 if ( className.match( /MsoNormal/ ) )723 if ( className.match( /MsoNormal/ ) ) 724 724 return; 725 725 726 if ( !rules[ tagName ] )726 if ( !rules[ tagName ] ) 727 727 rules[ tagName ] = {}; 728 if ( className )728 if ( className ) 729 729 rules[ tagName ][ className ] = styleBlock; 730 730 else … … 739 739 className = element.attributes && element.attributes[ 'class' ], 740 740 style; 741 if ( name in rules )741 if ( name in rules ) 742 742 { 743 743 style = rules[ name ]; 744 if ( typeof style == 'object' )744 if ( typeof style == 'object' ) 745 745 style = style[ className ]; 746 746 // Maintain style rules priorities. … … 783 783 // Instead we use a clear-float div after the table to properly achieve the same layout. 784 784 var singleChild = element.onlyChild(); 785 if ( singleChild && singleChild.name == 'table' )785 if ( singleChild && singleChild.name == 'table' ) 786 786 { 787 787 var attrs = element.attributes; … … 925 925 { 926 926 var attrs = element.attributes; 927 if ( attrs && !attrs.href && attrs.name )927 if ( attrs && !attrs.href && attrs.name ) 928 928 delete element.name; 929 929 }, … … 984 984 function( value, element ) 985 985 { 986 if ( element.name == 'img' )986 if ( element.name == 'img' ) 987 987 return value; 988 988 } ], … … 991 991 function( value, element ) 992 992 { 993 if ( element.name in { table : 1, td : 1, th : 1, img : 1 } )993 if ( element.name in { table : 1, td : 1, th : 1, img : 1 } ) 994 994 return value; 995 995 } ] … … 1001 1001 [ ( /-color$/ ), null, function( value ) 1002 1002 { 1003 if ( value == 'transparent' )1003 if ( value == 'transparent' ) 1004 1004 return false; 1005 if ( CKEDITOR.env.gecko )1005 if ( CKEDITOR.env.gecko ) 1006 1006 return value.replace( /-moz-use-text-color/g, 'transparent' ); 1007 1007 } ], … … 1018 1018 'width' : function( value, element ) 1019 1019 { 1020 if ( element.name in dtd.$tableContent )1020 if ( element.name in dtd.$tableContent ) 1021 1021 return false; 1022 1022 }, … … 1024 1024 'border' : function( value, element ) 1025 1025 { 1026 if ( element.name in dtd.$tableContent )1026 if ( element.name in dtd.$tableContent ) 1027 1027 return false; 1028 1028 }, … … 1065 1065 1066 1066 // Reveal the <img> element in conditional comments for Firefox. 1067 if ( CKEDITOR.env.gecko && imageInfo )1067 if ( CKEDITOR.env.gecko && imageInfo ) 1068 1068 { 1069 1069 var img = CKEDITOR.htmlParser.fragment.fromHtml( imageInfo[ 0 ] ).children[ 0 ], … … 1108 1108 // comments, fixing them first( convert it to upperlevel-revealed one ). 1109 1109 // e.g. <![if !vml]>...<![endif]> 1110 if ( CKEDITOR.env.gecko )1110 if ( CKEDITOR.env.gecko ) 1111 1111 data = data.replace( /(<!--\[if[^<]*?\])-->([\S\s]*?)<!--(\[endif\]-->)/gi, '$1$2$3' ); 1112 1112 -
CKEditor/trunk/_source/plugins/pastefromword/plugin.js
r4895 r5149 28 28 { 29 29 forceFromWord = 1; 30 if ( editor.execCommand( 'paste' ) === false )30 if ( editor.execCommand( 'paste' ) === false ) 31 31 { 32 32 editor.on( 'dialogHide', function ( evt ) … … 60 60 if ( isLazyLoad ) 61 61 editor.fire( 'paste', data ); 62 else if ( !editor.config.pasteFromWordPromptCleanup62 else if ( !editor.config.pasteFromWordPromptCleanup 63 63 || ( forceFromWord || confirm( editor.lang.pastefromword.confirmCleanup ) ) ) 64 64 { -
CKEditor/trunk/_source/plugins/pastetext/plugin.js
r4858 r5149 58 58 { 59 59 // Native text insertion. 60 if ( CKEDITOR.env.ie )60 if ( CKEDITOR.env.ie ) 61 61 { 62 62 var selection = doc.selection; -
CKEditor/trunk/_source/plugins/scayt/dialogs/options.js
r4858 r5149 31 31 32 32 function setCheckedValue(radioObj, newValue) { 33 if (!radioObj)33 if (!radioObj) 34 34 return; 35 35 var radioLength = radioObj.length; 36 if (radioLength == undefined) {36 if (radioLength == undefined) { 37 37 radioObj.checked = (radioObj.value == newValue.toString()); 38 38 return; … … 40 40 for(var i = 0; i < radioLength; i++) { 41 41 radioObj[i].checked = false; 42 if (radioObj[i].value == newValue.toString()) {42 if (radioObj[i].value == newValue.toString()) { 43 43 radioObj[i].checked = true; 44 44 } -
CKEditor/trunk/_source/plugins/selection/plugin.js
r5145 r5149 150 150 && savedRange.parentElement(); 151 151 152 if ( !( parent && parent.tagName.toLowerCase() in CKEDITOR.dtd.$tableContent ) )152 if ( !( parent && parent.tagName.toLowerCase() in CKEDITOR.dtd.$tableContent ) ) 153 153 editor.document.$.selection.empty(); 154 154 } -
CKEditor/trunk/_source/plugins/showborders/plugin.js
r4858 r5149 111 111 } 112 112 113 if ( htmlFilter )113 if ( htmlFilter ) 114 114 { 115 115 htmlFilter.addRules( … … 134 134 CKEDITOR.on( 'dialogDefinition', function( ev ) 135 135 { 136 if ( ev.editor != editor )136 if ( ev.editor != editor ) 137 137 return; 138 138 -
CKEditor/trunk/_source/plugins/styles/plugin.js
r5009 r5149 210 210 return false; 211 211 } 212 if ( fullMatch )212 if ( fullMatch ) 213 213 return true; 214 214 } … … 581 581 break; 582 582 // Avoid copying any matched element. 583 else if ( newElement.match )583 else if ( newElement.match ) 584 584 continue; 585 585 else … … 651 651 { 652 652 // Remove style from element or overriding element. 653 if ( currentNode.getName() == this.element )653 if ( currentNode.getName() == this.element ) 654 654 removeFromElement( this, currentNode ); 655 655 else … … 896 896 // Now remove override styles on the element. 897 897 attributes = overrides[ element.getName() ]; 898 if ( attributes )898 if ( attributes ) 899 899 removeAttrs(); 900 900 removeNoAttribsElement( element ); … … 1132 1132 function getOverrides( style ) 1133 1133 { 1134 if ( style._.overrides )1134 if ( style._.overrides ) 1135 1135 return style._.overrides; 1136 1136 -
CKEditor/trunk/_source/plugins/table/dialogs/table.js
r4968 r5149 193 193 table.removeStyle( 'width' ); 194 194 195 if ( !table.getAttribute( 'style' ) )195 if ( !table.getAttribute( 'style' ) ) 196 196 table.removeAttribute( 'style' ); 197 197 } -
CKEditor/trunk/_source/plugins/tabletools/dialogs/tableCell.js
r5101 r5149 339 339 { 340 340 var attrVal = parseInt( selectedCell.getAttribute( 'rowSpan' ), 10 ); 341 if ( attrVal && attrVal != 1 )341 if ( attrVal && attrVal != 1 ) 342 342 this.setValue( attrVal ); 343 343 }, … … 362 362 { 363 363 var attrVal = parseInt( element.getAttribute( 'colSpan' ), 10 ); 364 if ( attrVal && attrVal != 1 )364 if ( attrVal && attrVal != 1 ) 365 365 this.setValue( attrVal ); 366 366 }, -
CKEditor/trunk/_source/plugins/tabletools/plugin.js
r5095 r5149 357 357 { 358 358 var oRow = tableMap[ rowIndex ]; 359 if ( typeof cell == 'undefined' )359 if ( typeof cell == 'undefined' ) 360 360 return oRow; 361 361 … … 364 364 if ( cell.is && oRow[c] == cell.$ ) 365 365 return c; 366 else if ( c == cell )366 else if ( c == cell ) 367 367 return new CKEDITOR.dom.element( oRow[ c ] ); 368 368 } … … 376 376 { 377 377 var row = tableMap[ r ]; 378 if ( typeof cell == 'undefined' )378 if ( typeof cell == 'undefined' ) 379 379 oCol.push( row[ colIndex ] ); 380 else if ( cell.is && row[ colIndex ] == cell.$ )380 else if ( cell.is && row[ colIndex ] == cell.$ ) 381 381 return r; 382 else if ( r == cell )382 else if ( r == cell ) 383 383 return new CKEDITOR.dom.element( row[ colIndex ] ); 384 384 } … … 413 413 startColumn = cellInRow( map, startRow, firstCell ); 414 414 415 if ( mergeDirection )415 if ( mergeDirection ) 416 416 { 417 417 var targetCell; … … 434 434 // 1. No cell could be merged. 435 435 // 2. Same cell actually. 436 if ( !targetCell || firstCell.$ == targetCell )436 if ( !targetCell || firstCell.$ == targetCell ) 437 437 return false; 438 438 … … 471 471 { 472 472 // Trim all cell fillers and check to remove empty cells. 473 if ( trimCell( cell ), cell.getChildren().count() )473 if ( trimCell( cell ), cell.getChildren().count() ) 474 474 { 475 475 // Merge vertically cells as two separated paragraphs. 476 if ( rowIndex != lastRowIndex476 if ( rowIndex != lastRowIndex 477 477 && cellFirstChild 478 478 && !( cellFirstChild.isBlockBoundary … … 480 480 { 481 481 var last = frag.getLast( CKEDITOR.dom.walker.whitespaces( true ) ); 482 if ( last && !( last.is && last.is( 'br' ) ) )482 if ( last && !( last.is && last.is( 'br' ) ) ) 483 483 frag.append( new CKEDITOR.dom.element( 'br' ) ); 484 484 } … … 495 495 frag.moveChildren( firstCell ); 496 496 497 if ( !CKEDITOR.env.ie )497 if ( !CKEDITOR.env.ie ) 498 498 firstCell.appendBogus(); 499 499 500 if ( totalColSpan >= mapWidth )500 if ( totalColSpan >= mapWidth ) 501 501 firstCell.removeAttribute( 'rowSpan' ); 502 502 else 503 503 firstCell.$.rowSpan = totalRowSpan; 504 504 505 if ( totalRowSpan >= mapHeight )505 if ( totalRowSpan >= mapHeight ) 506 506 firstCell.removeAttribute( 'colSpan' ); 507 507 else … … 515 515 { 516 516 var tailTr = trs.getItem( i ); 517 if ( !tailTr.$.cells.length )517 if ( !tailTr.$.cells.length ) 518 518 { 519 519 tailTr.remove(); … … 534 534 { 535 535 var cells = getSelectedCells( selection ); 536 if ( cells.length > 1 )536 if ( cells.length > 1 ) 537 537 return false; 538 else if ( isDetect )538 else if ( isDetect ) 539 539 return true; 540 540 … … 551 551 newRowIndex; 552 552 553 if ( rowSpan > 1 )553 if ( rowSpan > 1 ) 554 554 { 555 555 newRowSpan = Math.ceil( rowSpan / 2 ); … … 567 567 candidateCell = newCellRow[ c ]; 568 568 // Catch first cell actually following the column. 569 if ( candidateCell.parentNode == newCellTr.$569 if ( candidateCell.parentNode == newCellTr.$ 570 570 && c > colIndex ) 571 571 { … … 578 578 579 579 // The destination row is empty, append at will. 580 if ( !candidateCell )580 if ( !candidateCell ) 581 581 newCellTr.append( newCell, true ); 582 582 } … … 594 594 } 595 595 596 if ( !CKEDITOR.env.ie )596 if ( !CKEDITOR.env.ie ) 597 597 newCell.appendBogus(); 598 598 599 599 cell.$.rowSpan = newRowSpan; 600 600 newCell.$.rowSpan = newCellRowSpan; 601 if ( newRowSpan == 1 )601 if ( newRowSpan == 1 ) 602 602 cell.removeAttribute( 'rowSpan' ); 603 if ( newCellRowSpan == 1 )603 if ( newCellRowSpan == 1 ) 604 604 newCell.removeAttribute( 'rowSpan' ); 605 605 … … 610 610 { 611 611 var cells = getSelectedCells( selection ); 612 if ( cells.length > 1 )612 if ( cells.length > 1 ) 613 613 return false; 614 else if ( isDetect )614 else if ( isDetect ) 615 615 return true; 616 616 … … 626 626 newCellColSpan; 627 627 628 if ( colSpan > 1 )628 if ( colSpan > 1 ) 629 629 { 630 630 newColSpan = Math.ceil( colSpan / 2 ); … … 640 640 newCell = cell.clone(); 641 641 newCell.insertAfter( cell ); 642 if ( !CKEDITOR.env.ie )642 if ( !CKEDITOR.env.ie ) 643 643 newCell.appendBogus(); 644 644 645 645 cell.$.colSpan = newColSpan; 646 646 newCell.$.colSpan = newCellColSpan; 647 if ( newColSpan == 1 )647 if ( newColSpan == 1 ) 648 648 cell.removeAttribute( 'colSpan' ); 649 if ( newCellColSpan == 1 )649 if ( newCellColSpan == 1 ) 650 650 newCell.removeAttribute( 'colSpan' ); 651 651 -
CKEditor/trunk/_source/plugins/undo/plugin.js
r5146 r5149 142 142 143 143 // For IE6/7 : Comparing only the protected attribute values but not the original ones.(#4522) 144 if ( CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) )144 if ( CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) ) 145 145 { 146 146 thisContents = thisContents.replace( protectedAttrs, '' ); … … 148 148 } 149 149 150 if ( thisContents != otherContents )150 if ( thisContents != otherContents ) 151 151 return false; 152 152 -
CKEditor/trunk/_source/plugins/wsc/dialogs/ciframe.html
r4858 r5149 17 17 var results = regex.exec( window.location.href ) ; 18 18 19 if ( results )19 if ( results ) 20 20 return results[ 1 ] ; 21 21 else -
CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js
r5109 r5149 144 144 function restoreDirty( editor ) 145 145 { 146 if ( !editor.checkDirty() )146 if ( !editor.checkDirty() ) 147 147 setTimeout( function(){ editor.resetDirty(); } ); 148 148 } … … 196 196 // If the fixed block is blank and already followed by a exitable 197 197 // block, we should revert the fix. (#3684) 198 if ( fixedBlock.getOuterHtml().match( emptyParagraphRegexp ) )198 if ( fixedBlock.getOuterHtml().match( emptyParagraphRegexp ) ) 199 199 { 200 200 var previousElement = fixedBlock.getPrevious( isNotWhitespace ), … … 215 215 range.select(); 216 216 // Notify non-IE that selection has changed. 217 if ( !CKEDITOR.env.ie )217 if ( !CKEDITOR.env.ie ) 218 218 editor.selectionChange(); 219 219 } … … 226 226 { 227 227 restoreDirty( editor ); 228 if ( !CKEDITOR.env.ie )228 if ( !CKEDITOR.env.ie ) 229 229 body.appendBogus(); 230 230 else … … 418 418 // IE standard compliant in editing frame doesn't focus the editor when 419 419 // clicking outside actual content, manually apply the focus. (#1659) 420 if ( CKEDITOR.env.ie420 if ( CKEDITOR.env.ie 421 421 && domDocument.$.compatMode == 'CSS1Compat' ) 422 422 { … … 450 450 first = first.firstChild; 451 451 452 if ( !first.nextSibling452 if ( !first.nextSibling 453 453 && ( 'BR' == first.tagName ) 454 454 && first.hasAttribute( '_moz_editor_bogus_node' ) ) … … 510 510 // PageUp/PageDown scrolling is broken in document 511 511 // with standard doctype, manually fix it. (#4736) 512 if ( domDocument.$.compatMode == 'CSS1Compat' )512 if ( domDocument.$.compatMode == 'CSS1Compat' ) 513 513 { 514 514 var pageUpDownKeys = { 33 : 1, 34 : 1 }; 515 515 domDocument.on( 'keydown', function( evt ) 516 516 { 517 if ( evt.data.getKeystroke() in pageUpDownKeys )517 if ( evt.data.getKeystroke() in pageUpDownKeys ) 518 518 { 519 519 setTimeout( function () … … 761 761 762 762 // Create an invisible element to grab focus. 763 if ( CKEDITOR.env.ie )763 if ( CKEDITOR.env.ie ) 764 764 { 765 765 var ieFocusGrabber; … … 779 779 780 780 // Fixing Firefox 'Back-Forward Cache' break design mode. (#4514) 781 if ( CKEDITOR.env.gecko )781 if ( CKEDITOR.env.gecko ) 782 782 { 783 783 ( function () … … 785 785 var body = document.body; 786 786 787 if ( !body )787 if ( !body ) 788 788 window.addEventListener( 'load', arguments.callee, false ); 789 789 else … … 800 800 editor = allInstances[ i ]; 801 801 doc = editor.document; 802 if ( doc )802 if ( doc ) 803 803 { 804 804 doc.$.designMode = 'off'; -
CKEditor/trunk/_source/skins/kama/skin.js
r4868 r5149 94 94 { 95 95 var node = document.getById( uiColorStylesheetId ); 96 if ( !node )96 if ( !node ) 97 97 { 98 98 node = document.getHead().append( 'style' );
Note: See TracChangeset
for help on using the changeset viewer.
