Ticket #3162: 3162.patch
File 3162.patch, 2.5 KB (added by , 14 years ago) |
---|
-
_source/plugins/font/plugin.js
76 76 { 77 77 var currentValue = this.getValue(); 78 78 79 var elementPath = ev.data.path; 79 var elementPath = ev.data.path, 80 elements = elementPath.elements; 80 81 81 for ( var value in styles ) 82 // For each element into the elements path. 83 for ( var i = 0, element ; i < elements.length ; i++ ) 82 84 { 83 if ( styles[ value ].checkActive( elementPath ) ) 85 element = elements[i]; 86 87 // Check if the element is removable by any of 88 // the styles. 89 for ( var value in styles ) 84 90 { 85 if ( value != currentValue ) 86 this.setValue( value ); 87 return; 91 if ( styles[ value ].checkElementRemovable( element, true ) ) 92 { 93 if ( value != currentValue ) 94 this.setValue( value ); 95 return; 96 } 88 97 } 89 98 } 90 99 -
_source/plugins/stylescombo/plugin.js
1 /*1 /* 2 2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. 3 3 For licensing, see LICENSE.html or http://ckeditor.com/license 4 4 */ … … 124 124 { 125 125 editor.on( 'selectionChange', function( ev ) 126 126 { 127 var current Tag= this.getValue();127 var currentValue = this.getValue(); 128 128 129 129 var elementPath = ev.data.path; 130 elements = elementPath.elements; 130 131 131 for ( var tag in styles ) 132 // For each element into the elements path. 133 for ( var i = 0, element ; i < elements.length ; i++ ) 132 134 { 133 if ( styles[ tag ].checkActive( elementPath ) ) 135 element = elements[i]; 136 137 // Check if the element is removable by any of 138 // the styles. 139 for ( var value in styles ) 134 140 { 135 if ( tag != currentTag ) 136 this.setValue( tag ); 137 return; 141 if ( styles[ value ].checkElementRemovable( element, true ) ) 142 { 143 if ( value != currentValue ) 144 this.setValue( value ); 145 return; 146 } 138 147 } 139 148 } 140 149