[silva.core.editor][Emiliano D'Alterio] Removed fields and chang...
| Newsgroups | gmane.comp.web.zope.silva.cvs |
|---|---|
| Message-ID | <[email protected]> |
author: Emiliano D'Alterio
date: Fri Aug 16 17:23:29 2013 +0200
revision: 260:aa4887c4e70d in silva.core.editor
branch:
details: https://hg.infrae.com/silva.core.editor?cmd=changeset;node=aa4887c4e70d
modified: src/silva/core/editor/static/plugins/silvadialog/plugin.js
added:
removed:
log: Removed fields and changed default values in Table dialog in
CKEditor.
diffstat:
src/silva/core/editor/static/plugins/silvadialog/plugin.js | 19 +++++++++----
1 files changed, 13 insertions(+), 6 deletions(-)
diffs (40 lines):
diff -r 89db23ef193f -r aa4887c4e70d src/silva/core/editor/static/plugins/silvadialog/plugin.js
--- a/src/silva/core/editor/static/plugins/silvadialog/plugin.js Wed Aug 14 15:08:53 2013 +0200
+++ b/src/silva/core/editor/static/plugins/silvadialog/plugin.js Fri Aug 16 17:23:29 2013 +0200
@@ -1,23 +1,30 @@
// http://peterpetrik.com/blog/remove-tabs-and-elements-from-ckeditor-dialog-window
-(function($) {
+(function($) {
CKEDITOR.plugins.add('silvadialog', {
init: function(editor) {
- if (editor.config.disable_colors ) {
CKEDITOR.on( 'dialogDefinition', function(ev) {
var dialogName = ev.data.name;
-
- if (dialogName == 'cellProperties') {
- var dialogDefinition = ev.data.definition;
+ var dialogDefinition = ev.data.definition;
+ if (editor.config.disable_colors && dialogName == 'cellProperties') {
var infoTab = dialogDefinition.getContents('info');
infoTab.remove('bgColor');
infoTab.remove('bgColorChoose');
infoTab.remove('borderColor');
infoTab.remove('borderColorChoose');
}
+ if (dialogName == 'table') {
+ var advancedTab = dialogDefinition.getContents('advanced');
+ advancedTab.remove('advCSSClasses');
+ var infoTableTab = dialogDefinition.getContents('info');
+ infoTableTab.get('txtWidth')['default'] = '';
+ infoTableTab.remove('txtCellSpace');
+ infoTableTab.remove('txtCellPad');
+ infoTableTab.remove('txtBorder');
+ infoTableTab.remove('cmbAlign');
+ }
});
- }
}
});
})(jQuery);