Skip to content

Commit

Permalink
Merge branch 't/10862' into major
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Oct 4, 2013
2 parents 1828df8 + 9e69dc5 commit 563c991
Show file tree
Hide file tree
Showing 29 changed files with 100 additions and 478 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -10,6 +10,7 @@ New Features:
Fixed Issues:

* [#10612](http://dev.ckeditor.com/ticket/10612): Internet Explorer 11 compatibility issues.
* [#10862](http://dev.ckeditor.com/ticket/10862): Placeholder plugin was rewritten as a widget in order to fix it.
* [#10831](http://dev.ckeditor.com/ticket/10831): Image2: Merged `image2inline` and `image2block` into `image2` widget.
* [#10835](http://dev.ckeditor.com/ticket/10835): Image2: Improved visibility of the resize handler.
* [#10836](http://dev.ckeditor.com/ticket/10836): Image2: Preserve custom mouse cursor while resizing the image.
Expand Down
84 changes: 36 additions & 48 deletions plugins/placeholder/dialogs/placeholder.js
@@ -1,61 +1,49 @@
/**

/**
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/

(function() {
function placeholderDialog( editor, isEdit ) {
/**
* @fileOverview Definition for placeholder plugin dialog.
*
*/

'use strict';

CKEDITOR.dialog.add( 'placeholder', function( editor ) {
var lang = editor.lang.placeholder,
generalLabel = editor.lang.common.generalTab,
validNameRegex = /^[^\[\]\<\>]+$/;

var lang = editor.lang.placeholder,
generalLabel = editor.lang.common.generalTab;
return {
title: lang.title,
minWidth: 300,
minHeight: 80,
contents: [
{
return {
title: lang.title,
minWidth: 300,
minHeight: 80,
contents: [
{
id: 'info',
label: generalLabel,
title: generalLabel,
elements: [
// Dialog window UI elements.
{
id: 'text',
type: 'text',
style: 'width: 100%;',
label: lang.text,
'default': '',
required: true,
validate: CKEDITOR.dialog.validate.notEmpty( lang.textMissing ),
setup: function( element ) {
if ( isEdit )
this.setValue( element.getText().slice( 2, -2 ) );
},
commit: function( element ) {
var text = '[[' + this.getValue() + ']]';
// The placeholder must be recreated.
CKEDITOR.plugins.placeholder.createPlaceholder( editor, element, text );
id: 'name',
type: 'text',
style: 'width: 100%;',
label: lang.name,
'default': '',
required: true,
validate: CKEDITOR.dialog.validate.regex( validNameRegex, lang.invalidName ),
setup: function( widget ) {
this.setValue( widget.data.name );
},
commit: function( widget ) {
widget.setData( 'name', this.getValue() );
}
}
}
]
}
],
onShow: function() {
if ( isEdit )
this._element = CKEDITOR.plugins.placeholder.getSelectedPlaceHolder( editor );

this.setupContent( this._element );
},
onOk: function() {
this.commitContent( this._element );
delete this._element;
}
};
}

CKEDITOR.dialog.add( 'createplaceholder', function( editor ) {
return placeholderDialog( editor );
});
CKEDITOR.dialog.add( 'editplaceholder', function( editor ) {
return placeholderDialog( editor, 1 );
});
})();
]
};
} );
26 changes: 0 additions & 26 deletions plugins/placeholder/lang/_translationstatus.txt

This file was deleted.

12 changes: 0 additions & 12 deletions plugins/placeholder/lang/bg.js

This file was deleted.

12 changes: 0 additions & 12 deletions plugins/placeholder/lang/cs.js

This file was deleted.

12 changes: 0 additions & 12 deletions plugins/placeholder/lang/cy.js

This file was deleted.

12 changes: 0 additions & 12 deletions plugins/placeholder/lang/da.js

This file was deleted.

12 changes: 0 additions & 12 deletions plugins/placeholder/lang/de.js

This file was deleted.

12 changes: 0 additions & 12 deletions plugins/placeholder/lang/el.js

This file was deleted.

9 changes: 4 additions & 5 deletions plugins/placeholder/lang/en.js
@@ -1,12 +1,11 @@
/**
/**
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/

CKEDITOR.plugins.setLang( 'placeholder', 'en', {
title: 'Placeholder Properties',
toolbar: 'Create Placeholder',
text: 'Placeholder Text',
edit: 'Edit Placeholder',
textMissing: 'The placeholder must contain text.'
toolbar: 'Placeholder',
name: 'Placeholder Name',
invalidName: 'The placeholder can not be empty and can not contain any of following characters: [, ], <, >'
});
12 changes: 0 additions & 12 deletions plugins/placeholder/lang/eo.js

This file was deleted.

12 changes: 0 additions & 12 deletions plugins/placeholder/lang/et.js

This file was deleted.

12 changes: 0 additions & 12 deletions plugins/placeholder/lang/fa.js

This file was deleted.

12 changes: 0 additions & 12 deletions plugins/placeholder/lang/fi.js

This file was deleted.

12 changes: 0 additions & 12 deletions plugins/placeholder/lang/fr.js

This file was deleted.

12 changes: 0 additions & 12 deletions plugins/placeholder/lang/he.js

This file was deleted.

12 changes: 0 additions & 12 deletions plugins/placeholder/lang/hr.js

This file was deleted.

12 changes: 0 additions & 12 deletions plugins/placeholder/lang/it.js

This file was deleted.

12 changes: 0 additions & 12 deletions plugins/placeholder/lang/nb.js

This file was deleted.

12 changes: 0 additions & 12 deletions plugins/placeholder/lang/nl.js

This file was deleted.

12 changes: 0 additions & 12 deletions plugins/placeholder/lang/no.js

This file was deleted.

12 changes: 0 additions & 12 deletions plugins/placeholder/lang/pl.js

This file was deleted.

12 changes: 0 additions & 12 deletions plugins/placeholder/lang/tr.js

This file was deleted.

0 comments on commit 563c991

Please sign in to comment.