X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Ftable%2Fdialogs%2Ftable.js;h=38652d4a4d75a9158bbf7ab702f7b9a318aba371;hb=refs%2Ftags%2Fv3.2.2;hp=4675a0c6289f89ad0d218f392f8b8f5258cbbf1e;hpb=c6e377a02b54abc07129d72b632763c727476a15;p=ckeditor.git
diff --git a/_source/plugins/table/dialogs/table.js b/_source/plugins/table/dialogs/table.js
index 4675a0c..38652d4 100644
--- a/_source/plugins/table/dialogs/table.js
+++ b/_source/plugins/table/dialogs/table.js
@@ -43,6 +43,11 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
}
else if ( ranges.length > 0 )
{
+ // Webkit could report the following range on cell selection (#4948):
+ //
]
+ if ( CKEDITOR.env.webkit )
+ ranges[ 0 ].shrink( CKEDITOR.NODE_ELEMENT );
+
var rangeRoot = ranges[0].getCommonAncestor( true );
selectedTable = rangeRoot.getAscendant( 'table', true );
}
@@ -339,7 +344,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
label : editor.lang.table.align,
items :
[
- [ editor.lang.table.alignNotSet , ''],
+ [ editor.lang.common.notSet , ''],
[ editor.lang.table.alignLeft , 'left'],
[ editor.lang.table.alignCenter , 'center'],
[ editor.lang.table.alignRight , 'right']
@@ -375,6 +380,18 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
label : editor.lang.table.width,
'default' : 200,
validate : CKEDITOR.dialog.validate['number']( editor.lang.table.invalidWidth ),
+
+ // Extra labelling of width unit type.
+ onLoad : function()
+ {
+ var widthType = this.getDialog().getContentElement( 'info', 'cmbWidthType' ),
+ labelElement = widthType.getElement(),
+ inputElement = this.getInputElement(),
+ ariaLabelledByAttr = inputElement.getAttribute( 'aria-labelledby' );
+
+ inputElement.setAttribute( 'aria-labelledby', [ ariaLabelledByAttr, labelElement.$.id ].join( ' ' ) );
+ },
+
setup : function( selectedTable )
{
var widthMatch = widthPattern.exec( selectedTable.$.style.width );
@@ -388,7 +405,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
{
id : 'cmbWidthType',
type : 'select',
- label : ' ',
+ label : editor.lang.table.widthUnit,
+ labelStyle: 'visibility:hidden',
'default' : 'pixels',
items :
[
@@ -417,6 +435,18 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
label : editor.lang.table.height,
'default' : '',
validate : CKEDITOR.dialog.validate['number']( editor.lang.table.invalidHeight ),
+
+ // Extra labelling of height unit type.
+ onLoad : function()
+ {
+ var heightType = this.getDialog().getContentElement( 'info', 'htmlHeightType' ),
+ labelElement = heightType.getElement(),
+ inputElement = this.getInputElement(),
+ ariaLabelledByAttr = inputElement.getAttribute( 'aria-labelledby' );
+
+ inputElement.setAttribute( 'aria-labelledby', [ ariaLabelledByAttr, labelElement.$.id ].join( ' ' ) );
+ },
+
setup : function( selectedTable )
{
var heightMatch = heightPattern.exec( selectedTable.$.style.height );
@@ -426,8 +456,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
commit : commitValue
},
{
+ id : 'htmlHeightType',
type : 'html',
- html : '
' + editor.lang.table.widthPx
+ html : '
' + editor.lang.table.widthPx + '
'
}
]
},
@@ -542,6 +573,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
{
if ( this.getValue() )
selectedTable.setAttribute( 'summary', this.getValue() );
+ else
+ selectedTable.removeAttribute( 'summary' );
}
}
]