X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Ftabletools%2Fdialogs%2FtableCell.js;h=7518ab152c55cc7cc9cd827ebe96b3de68e1e141;hb=055b6b0792ce7dc53d47af606b367c04b927c2ab;hp=c970727e3046caa1eecf44177610e37adf1efea3;hpb=66f4ae0bf0280ed56bf7c0f4ab175424dd1d47a0;p=ckeditor.git diff --git a/_source/plugins/tabletools/dialogs/tableCell.js b/_source/plugins/tabletools/dialogs/tableCell.js index c970727..7518ab1 100644 --- a/_source/plugins/tabletools/dialogs/tableCell.js +++ b/_source/plugins/tabletools/dialogs/tableCell.js @@ -5,18 +5,14 @@ For licensing, see LICENSE.html or http://ckeditor.com/license CKEDITOR.dialog.add( 'cellProperties', function( editor ) { - var langTable = editor.lang.table; - var langCell = langTable.cell; - var langCommon = editor.lang.common; - var validate = CKEDITOR.dialog.validate; - var widthPattern = /^(\d+(?:\.\d+)?)(px|%)$/, - heightPattern = /^(\d+(?:\.\d+)?)px$/; - var bind = CKEDITOR.tools.bind; - - function spacer() - { - return { type : 'html', html : ' ' }; - } + var langTable = editor.lang.table, + langCell = langTable.cell, + langCommon = editor.lang.common, + validate = CKEDITOR.dialog.validate, + widthPattern = /^(\d+(?:\.\d+)?)(px|%)$/, + heightPattern = /^(\d+(?:\.\d+)?)px$/, + bind = CKEDITOR.tools.bind, + spacer = { type : 'html', html : ' ' }; /** * @@ -34,16 +30,16 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) { releaseHandlers( this ); }; - var bindToDialog = function( dialog ) - { - dialog.on( 'ok', onOk ); - dialog.on( 'cancel', onCancel ); - }; var releaseHandlers = function( dialog ) { dialog.removeListener( 'ok', onOk ); dialog.removeListener( 'cancel', onCancel ); }; + var bindToDialog = function( dialog ) + { + dialog.on( 'ok', onOk ); + dialog.on( 'cancel', onCancel ); + }; editor.execCommand( dialogName ); if ( editor._.storedDialogs.colordialog ) bindToDialog( editor._.storedDialogs.colordialog ); @@ -153,7 +149,7 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) ], setup : function( selectedCell ) { - var widthMatch = widthPattern.exec( selectedCell.$.style.width ); + var widthMatch = widthPattern.exec( selectedCell.getStyle( 'width' ) || selectedCell.getAttribute( 'width' ) ); if ( widthMatch ) this.setValue( widthMatch[2] ); } @@ -212,7 +208,7 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) } ] }, - spacer(), + spacer, { type : 'select', id : 'wordWrap', @@ -243,7 +239,7 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) element.removeAttribute( 'noWrap' ); } }, - spacer(), + spacer, { type : 'select', id : 'hAlign', @@ -325,7 +321,7 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) } ] }, - spacer(), + spacer, { type : 'vbox', padding : 0, @@ -352,7 +348,7 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) selectedCell.renameNode( this.getValue() ); } }, - spacer(), + spacer, { type : 'text', id : 'rowSpan', @@ -399,7 +395,7 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) selectedCell.removeAttribute( 'colSpan' ); } }, - spacer(), + spacer, { type : 'hbox', padding : 0, @@ -450,7 +446,7 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) } ] }, - spacer(), + spacer, { type : 'hbox', padding : 0,