+\r
+ var advTab = dialogDefinition.getContents( 'advanced' ),\r
+ classField = advTab && advTab.get( 'advCSSClasses' );\r
+\r
+ if ( classField )\r
+ {\r
+ classField.setup = CKEDITOR.tools.override( classField.setup, function( originalSetup )\r
+ {\r
+ return function()\r
+ {\r
+ originalSetup.apply( this, arguments );\r
+ this.setValue( this.getValue().replace( /cke_show_border/, '' ) );\r
+ };\r
+ });\r
+\r
+ classField.commit = CKEDITOR.tools.override( classField.commit, function( originalCommit )\r
+ {\r
+ return function( data, element )\r
+ {\r
+ originalCommit.apply( this, arguments );\r
+\r
+ if ( !parseInt( element.getAttribute( 'border' ), 10 ) )\r
+ element.addClass( 'cke_show_border' );\r
+ };\r
+ });\r
+ }\r