Ticket #3207: 3207.patch
File 3207.patch, 6.5 KB (added by , 16 years ago) |
---|
-
_source/core/config.js
173 173 theme : 'default', 174 174 175 175 /** 176 * The skin to load. 176 * The skin to load. It may be the name of the skin folder inside the 177 * editor installation path, or the name and the path separated by a comma. 177 178 * @type String 178 179 * @default 'default' 179 180 * @example 180 181 * config.skin = 'v2'; 182 * @example 183 * config.skin = 'myskin,/customstuff/myskin/'; 181 184 */ 182 185 skin : 'default', 183 186 -
_source/core/editor.js
111 111 { 112 112 // Set config related properties. 113 113 114 var skin = editor.config.skin; 114 var skin = editor.config.skin.split( ',' ), 115 skinName = skin[ 0 ], 116 skinPath = CKEDITOR.getUrl( skin[ 1 ] || ( 117 '_source/' + // %REMOVE_LINE% 118 'skins/' + skinName + '/' ) ); 115 119 116 editor.skin Path = CKEDITOR.getUrl(117 '_source/' + // %REMOVE_LINE%118 'skins/' + skin + '/' );120 editor.skinName = skinName; 121 editor.skinPath = skinPath; 122 editor.skinClass = 'cke_skin_' + skinName; 119 123 120 editor.skinClass = 'cke_skin_' + skin;121 122 124 // Fire the "configLoaded" event. 123 125 editor.fireOnce( 'configLoaded' ); 124 126 … … 228 230 229 231 var loadSkin = function( editor ) 230 232 { 231 CKEDITOR.skins.load( editor .config.skin, 'editor', function()233 CKEDITOR.skins.load( editor, 'editor', function() 232 234 { 233 235 loadTheme( editor ); 234 236 }); -
_source/core/skins.js
18 18 // Holds the list of loaded skins. 19 19 var loaded = {}; 20 20 var preloaded = {}; 21 var paths = {}; 21 22 22 23 var loadedPart = function( skinName, part, callback ) 23 24 { … … 28 29 { 29 30 for ( var n = 0 ; n < fileNames.length ; n++ ) 30 31 { 31 fileNames[ n ] = CKEDITOR.getUrl( 32 '_source/' + // %REMOVE_LINE% 33 'skins/' + skinName + '/' + fileNames[ n ] ); 32 fileNames[ n ] = paths[ skinName ] + fileNames[ n ]; 34 33 } 35 34 }; 36 35 … … 133 132 { 134 133 loaded[ skinName ] = skinDefinition; 135 134 136 skinDefinition.skinPath = CKEDITOR.getUrl( 137 '_source/' + // %REMOVE_LINE% 138 'skins/' + skinName + '/' ); 135 skinDefinition.skinPath = paths[ skinName ]; 139 136 }, 140 137 141 138 /** … … 149 146 * part files are loaded. 150 147 * @example 151 148 */ 152 load : function( skinName, skinPart, callback )149 load : function( editor, skinPart, callback ) 153 150 { 151 var skinName = editor.skinName, 152 skinPath = editor.skinPath; 153 154 154 if ( loaded[ skinName ] ) 155 155 loadedPart( skinName, skinPart, callback ); 156 156 else 157 157 { 158 CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( 159 '_source/' + // %REMOVE_LINE% 160 'skins/' + skinName + '/skin.js' ), function() 158 paths[ skinName ] = skinPath; 159 CKEDITOR.scriptLoader.load( skinPath + 'skin.js', function() 161 160 { 162 161 loadedPart( skinName, skinPart, callback ); 163 } 162 }); 164 163 } 165 164 } 166 165 }; -
_source/plugins/dialog/plugin.js
399 399 this._.dummyText = CKEDITOR.dom.element.createFromHtml( '<input type="text" style="position: absolute; left: -100000px; top: -100000px" />' ); 400 400 this._.dummyText.appendTo( themeBuilt.element ); 401 401 402 CKEDITOR.skins.load( editor .config.skin, 'dialog' );402 CKEDITOR.skins.load( editor, 'dialog' ); 403 403 }; 404 404 405 405 CKEDITOR.dialog.prototype = … … 422 422 CKEDITOR.dialog.fire( 'resize', 423 423 { 424 424 dialog : this, 425 skin : this._.editor. config.skin,425 skin : this._.editor.skinName, 426 426 width : width, 427 427 height : height 428 428 }, this._.editor ); … … 1334 1334 element = dialog.getElement().getFirst(), 1335 1335 editor = dialog.getParentEditor(), 1336 1336 magnetDistance = editor.config.dialog_magnetDistance, 1337 margins = skinData[ editor. config.skin].margins || [ 0, 0, 0, 0 ];1337 margins = skinData[ editor.skinName ].margins || [ 0, 0, 0, 0 ]; 1338 1338 1339 1339 function mouseMoveHandler( evt ) 1340 1340 { … … 1407 1407 minWidth = definition.minWidth || 0, 1408 1408 minHeight = definition.minHeight || 0, 1409 1409 resizable = definition.resizable, 1410 margins = skinData[ dialog.getParentEditor(). config.skin].margins || [ 0, 0, 0, 0 ];1410 margins = skinData[ dialog.getParentEditor().skinName ].margins || [ 0, 0, 0, 0 ]; 1411 1411 1412 1412 function topSizer( coords, dy ) 1413 1413 { -
_source/plugins/image/dialogs/image.js
173 173 original.removeListener( 'abort', onImgLoadErrorEvent ); 174 174 175 175 // Set Error image. 176 var noimage = CKEDITOR.getUrl( 177 '_source/' + // %REMOVE_LINE% 178 'skins/' + editor.config.skin + '/images/dialog.noimage.gif' ); 176 var noimage = CKEDITOR.getUrl( editor.skinPath + 'images/dialog.noimage.gif' ); 179 177 180 178 if ( this.preview ) 181 179 this.preview.setAttribute( 'src', noimage ); -
_source/plugins/templates/dialogs/templates.js
98 98 CKEDITOR.dialog.add( 'templates', function( editor ) 99 99 { 100 100 // Load skin at first. 101 CKEDITOR.skins.load( 'default', 'templates' );101 CKEDITOR.skins.load( editor, 'templates' ); 102 102 103 103 /** 104 104 * Load templates once. -
_source/themes/default/theme.js
112 112 var baseIdNumber = CKEDITOR.tools.getNextNumber(); 113 113 114 114 var element = CKEDITOR.dom.element.createFromHtml( [ 115 '<div class="cke_skin_', editor. config.skin,115 '<div class="cke_skin_', editor.skinName, 116 116 ' ', browserCssClass, 117 117 ' ', CKEDITOR.env.quirks ? 'cke_mode_quirks' : 'cke_mode_standards', 118 118 ' cke_', editor.lang.dir,