Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
ckeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vanilla ckeditor-3.6.4
[ckeditor.git]
/
_source
/
plugins
/
tabletools
/
dialogs
/
tableCell.js
diff --git
a/_source/plugins/tabletools/dialogs/tableCell.js
b/_source/plugins/tabletools/dialogs/tableCell.js
index
7518ab1
..
d3ed5ce
100644
(file)
--- a/
_source/plugins/tabletools/dialogs/tableCell.js
+++ b/
_source/plugins/tabletools/dialogs/tableCell.js
@@
-1,5
+1,5
@@
/*
\r
/*
\r
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
\r
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
\r
For licensing, see LICENSE.html or http://ckeditor.com/license
\r
*/
\r
\r
For licensing, see LICENSE.html or http://ckeditor.com/license
\r
*/
\r
\r
@@
-12,7
+12,8
@@
CKEDITOR.dialog.add( 'cellProperties', function( editor )
widthPattern = /^(\d+(?:\.\d+)?)(px|%)$/,
\r
heightPattern = /^(\d+(?:\.\d+)?)px$/,
\r
bind = CKEDITOR.tools.bind,
\r
widthPattern = /^(\d+(?:\.\d+)?)(px|%)$/,
\r
heightPattern = /^(\d+(?:\.\d+)?)px$/,
\r
bind = CKEDITOR.tools.bind,
\r
- spacer = { type : 'html', html : ' ' };
\r
+ spacer = { type : 'html', html : ' ' },
\r
+ rtl = editor.lang.dir == 'rtl';
\r
\r
/**
\r
*
\r
\r
/**
\r
*
\r
@@
-24,11
+25,13
@@
CKEDITOR.dialog.add( 'cellProperties', function( editor )
var onOk = function()
\r
{
\r
releaseHandlers( this );
\r
var onOk = function()
\r
{
\r
releaseHandlers( this );
\r
- callback( this );
\r
+ callback( this, this._.parentDialog );
\r
+ this._.parentDialog.changeFocus();
\r
};
\r
var onCancel = function()
\r
{
\r
releaseHandlers( this );
\r
};
\r
var onCancel = function()
\r
{
\r
releaseHandlers( this );
\r
+ this._.parentDialog.changeFocus();
\r
};
\r
var releaseHandlers = function( dialog )
\r
{
\r
};
\r
var releaseHandlers = function( dialog )
\r
{
\r
@@
-69,8
+72,8
@@
CKEDITOR.dialog.add( 'cellProperties', function( editor )
\r
return {
\r
title : langCell.title,
\r
\r
return {
\r
title : langCell.title,
\r
- minWidth : CKEDITOR.env.ie && CKEDITOR.env.quirks ? 550 : 480,
\r
- minHeight : CKEDITOR.env.ie ? ( CKEDITOR.env.quirks ? 180 : 150 ) : 140,
\r
+ minWidth : CKEDITOR.env.ie && CKEDITOR.env.quirks? 450 : 410,
\r
+ minHeight : CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks )? 230 : 220,
\r
contents : [
\r
{
\r
id : 'info',
\r
contents : [
\r
{
\r
id : 'info',
\r
@@
-96,9
+99,8
@@
CKEDITOR.dialog.add( 'cellProperties', function( editor )
{
\r
type : 'text',
\r
id : 'width',
\r
{
\r
type : 'text',
\r
id : 'width',
\r
- label : langTable.width,
\r
- widths : [ '71%', '29%' ],
\r
- labelLayout : 'horizontal',
\r
+ width: '100px',
\r
+ label : langCommon.width,
\r
validate : validate[ 'number' ]( langCell.invalidWidth ),
\r
\r
// Extra labelling of width unit type.
\r
validate : validate[ 'number' ]( langCell.invalidWidth ),
\r
\r
// Extra labelling of width unit type.
\r
@@
-137,10
+139,8
@@
CKEDITOR.dialog.add( 'cellProperties', function( editor )
{
\r
type : 'select',
\r
id : 'widthType',
\r
{
\r
type : 'select',
\r
id : 'widthType',
\r
- labelLayout : 'horizontal',
\r
- widths : [ '0%', '100%' ],
\r
label : editor.lang.table.widthUnit,
\r
label : editor.lang.table.widthUnit,
\r
- labelStyle: 'display:none',
\r
+ labelStyle: 'visibility:hidden',
\r
'default' : 'px',
\r
items :
\r
[
\r
'default' : 'px',
\r
items :
\r
[
\r
@@
-164,10
+164,9
@@
CKEDITOR.dialog.add( 'cellProperties', function( editor )
{
\r
type : 'text',
\r
id : 'height',
\r
{
\r
type : 'text',
\r
id : 'height',
\r
- label : langTable.height,
\r
+ label : langCommon.height,
\r
+ width: '100px',
\r
'default' : '',
\r
'default' : '',
\r
- widths : [ '71%', '29%' ],
\r
- labelLayout : 'horizontal',
\r
validate : validate[ 'number' ]( langCell.invalidHeight ),
\r
\r
// Extra labelling of height unit type.
\r
validate : validate[ 'number' ]( langCell.invalidHeight ),
\r
\r
// Extra labelling of height unit type.
\r
@@
-204,7
+203,7
@@
CKEDITOR.dialog.add( 'cellProperties', function( editor )
{
\r
id : 'htmlHeightType',
\r
type : 'html',
\r
{
\r
id : 'htmlHeightType',
\r
type : 'html',
\r
- html : langTable.widthPx
\r
+ html : '<br />'+ langTable.widthPx
\r
}
\r
]
\r
},
\r
}
\r
]
\r
},
\r
@@
-212,9
+211,7
@@
CKEDITOR.dialog.add( 'cellProperties', function( editor )
{
\r
type : 'select',
\r
id : 'wordWrap',
\r
{
\r
type : 'select',
\r
id : 'wordWrap',
\r
- labelLayout : 'horizontal',
\r
label : langCell.wordWrap,
\r
label : langCell.wordWrap,
\r
- widths : [ '50%', '50%' ],
\r
'default' : 'yes',
\r
items :
\r
[
\r
'default' : 'yes',
\r
items :
\r
[
\r
@@
-243,16
+240,14
@@
CKEDITOR.dialog.add( 'cellProperties', function( editor )
{
\r
type : 'select',
\r
id : 'hAlign',
\r
{
\r
type : 'select',
\r
id : 'hAlign',
\r
- labelLayout : 'horizontal',
\r
label : langCell.hAlign,
\r
label : langCell.hAlign,
\r
- widths : [ '50%', '50%' ],
\r
'default' : '',
\r
items :
\r
[
\r
[ langCommon.notSet, '' ],
\r
'default' : '',
\r
items :
\r
[
\r
[ langCommon.notSet, '' ],
\r
- [ langTable.alignLeft, 'left' ],
\r
- [ langTable.alignCenter, 'center' ],
\r
- [ langTable.alignRight, 'right' ]
\r
+ [ langCommon.alignLeft, 'left' ],
\r
+ [ langCommon.alignCenter, 'center' ],
\r
+ [ langCommon.alignRight, 'right' ]
\r
],
\r
setup : function( element )
\r
{
\r
],
\r
setup : function( element )
\r
{
\r
@@
-276,16
+271,14
@@
CKEDITOR.dialog.add( 'cellProperties', function( editor )
{
\r
type : 'select',
\r
id : 'vAlign',
\r
{
\r
type : 'select',
\r
id : 'vAlign',
\r
- labelLayout : 'horizontal',
\r
label : langCell.vAlign,
\r
label : langCell.vAlign,
\r
- widths : [ '50%', '50%' ],
\r
'default' : '',
\r
items :
\r
[
\r
[ langCommon.notSet, '' ],
\r
'default' : '',
\r
items :
\r
[
\r
[ langCommon.notSet, '' ],
\r
- [ langCell.alignTop, 'top' ],
\r
- [ langCell.alignMiddle, 'middle' ],
\r
- [ langCell.alignBottom, 'bottom' ],
\r
+ [ langCommon.alignTop, 'top' ],
\r
+ [ langCommon.alignMiddle, 'middle' ],
\r
+ [ langCommon.alignBottom, 'bottom' ],
\r
[ langCell.alignBaseline, 'baseline' ]
\r
],
\r
setup : function( element )
\r
[ langCell.alignBaseline, 'baseline' ]
\r
],
\r
setup : function( element )
\r
@@
-331,8
+324,6
@@
CKEDITOR.dialog.add( 'cellProperties', function( editor )
type : 'select',
\r
id : 'cellType',
\r
label : langCell.cellType,
\r
type : 'select',
\r
id : 'cellType',
\r
label : langCell.cellType,
\r
- labelLayout : 'horizontal',
\r
- widths : [ '50%', '50%' ],
\r
'default' : 'td',
\r
items :
\r
[
\r
'default' : 'td',
\r
items :
\r
[
\r
@@
-353,8
+344,6
@@
CKEDITOR.dialog.add( 'cellProperties', function( editor )
type : 'text',
\r
id : 'rowSpan',
\r
label : langCell.rowSpan,
\r
type : 'text',
\r
id : 'rowSpan',
\r
label : langCell.rowSpan,
\r
- labelLayout : 'horizontal',
\r
- widths : [ '50%', '50%' ],
\r
'default' : '',
\r
validate : validate.integer( langCell.invalidRowSpan ),
\r
setup : function( selectedCell )
\r
'default' : '',
\r
validate : validate.integer( langCell.invalidRowSpan ),
\r
setup : function( selectedCell )
\r
@@
-376,8
+365,6
@@
CKEDITOR.dialog.add( 'cellProperties', function( editor )
type : 'text',
\r
id : 'colSpan',
\r
label : langCell.colSpan,
\r
type : 'text',
\r
id : 'colSpan',
\r
label : langCell.colSpan,
\r
- labelLayout : 'horizontal',
\r
- widths : [ '50%', '50%' ],
\r
'default' : '',
\r
validate : validate.integer( langCell.invalidColSpan ),
\r
setup : function( element )
\r
'default' : '',
\r
validate : validate.integer( langCell.invalidColSpan ),
\r
setup : function( element )
\r
@@
-399,15
+386,13
@@
CKEDITOR.dialog.add( 'cellProperties', function( editor )
{
\r
type : 'hbox',
\r
padding : 0,
\r
{
\r
type : 'hbox',
\r
padding : 0,
\r
- widths : [ '80%', '20%' ],
\r
+ widths : [ '60%', '40%' ],
\r
children :
\r
[
\r
{
\r
type : 'text',
\r
id : 'bgColor',
\r
label : langCell.bgColor,
\r
children :
\r
[
\r
{
\r
type : 'text',
\r
id : 'bgColor',
\r
label : langCell.bgColor,
\r
- labelLayout : 'horizontal',
\r
- widths : [ '70%', '30%' ],
\r
'default' : '',
\r
setup : function( element )
\r
{
\r
'default' : '',
\r
setup : function( element )
\r
{
\r
@@
-431,8
+416,13
@@
CKEDITOR.dialog.add( 'cellProperties', function( editor )
{
\r
type : 'button',
\r
id : 'bgColorChoose',
\r
{
\r
type : 'button',
\r
id : 'bgColorChoose',
\r
+ "class" : 'colorChooser',
\r
label : langCell.chooseColor,
\r
label : langCell.chooseColor,
\r
- style : 'margin-left: 10px',
\r
+ onLoad : function()
\r
+ {
\r
+ // Stick the element to the bottom (#5587)
\r
+ this.getElement().getParent().setStyle( 'vertical-align', 'bottom' );
\r
+ },
\r
onClick : function()
\r
{
\r
var self = this;
\r
onClick : function()
\r
{
\r
var self = this;
\r
@@
-450,15
+440,13
@@
CKEDITOR.dialog.add( 'cellProperties', function( editor )
{
\r
type : 'hbox',
\r
padding : 0,
\r
{
\r
type : 'hbox',
\r
padding : 0,
\r
- widths : [ '80%', '20%' ],
\r
+ widths : [ '60%', '40%' ],
\r
children :
\r
[
\r
{
\r
type : 'text',
\r
id : 'borderColor',
\r
label : langCell.borderColor,
\r
children :
\r
[
\r
{
\r
type : 'text',
\r
id : 'borderColor',
\r
label : langCell.borderColor,
\r
- labelLayout : 'horizontal',
\r
- widths : [ '70%', '30%' ],
\r
'default' : '',
\r
setup : function( element )
\r
{
\r
'default' : '',
\r
setup : function( element )
\r
{
\r
@@
-481,8
+469,14
@@
CKEDITOR.dialog.add( 'cellProperties', function( editor )
{
\r
type : 'button',
\r
id : 'borderColorChoose',
\r
{
\r
type : 'button',
\r
id : 'borderColorChoose',
\r
+ "class" : 'colorChooser',
\r
label : langCell.chooseColor,
\r
label : langCell.chooseColor,
\r
- style : 'margin-left: 10px',
\r
+ style : ( rtl ? 'margin-right' : 'margin-left' ) + ': 10px',
\r
+ onLoad : function()
\r
+ {
\r
+ // Stick the element to the bottom (#5587)
\r
+ this.getElement().getParent().setStyle( 'vertical-align', 'bottom' );
\r
+ },
\r
onClick : function()
\r
{
\r
var self = this;
\r
onClick : function()
\r
{
\r
var self = this;
\r
@@
-518,7
+512,9
@@
CKEDITOR.dialog.add( 'cellProperties', function( editor )
for ( var i = 0 ; i < cells.length ; i++ )
\r
this.commitContent( cells[ i ] );
\r
\r
for ( var i = 0 ; i < cells.length ; i++ )
\r
this.commitContent( cells[ i ] );
\r
\r
+ this._.editor.forceNextSelectionCheck();
\r
selection.selectBookmarks( bookmarks );
\r
selection.selectBookmarks( bookmarks );
\r
+ this._.editor.selectionChange();
\r
}
\r
};
\r
} );
\r
}
\r
};
\r
} );
\r