edit/page: ctrl+S shortkey to save
[minimedit.git] / edit / page.js
index cdf1f211276f10ab13214fd0e38229c13de602f9..522d63e3c41d5b55f05b987ea5b05c6d7620b2b2 100644 (file)
@@ -39,6 +39,7 @@ CKEDITOR.plugins.add('inlinesave', {
                                ajaxpost.send(data);
                        },
                });
+               editor.setKeystroke(CKEDITOR.CTRL + 83 /*S*/, 'inlinesave');
                editor.ui.addButton( 'Inlinesave', {
                        command: 'inlinesave',
                        label: editor.lang.save.toolbar,
@@ -51,11 +52,24 @@ CKEDITOR.on('dialogDefinition', function (event) {
        switch (event.data.name) {
        case 'table':
                // override initial attribute values
-               var infoTab = event.data.definition.getContents('info');
-               infoTab.get('txtWidth').default = '';
-               infoTab.get('txtBorder').default = '0';
-               infoTab.get('txtCellSpace').default = '';
-               infoTab.get('txtCellPad').default = '';
+               var infotab = event.data.definition.getContents('info');
+               infotab.remove('txtWidth');
+               infotab.remove('txtHeight');
+               infotab.remove('txtBorder');
+               infotab.remove('txtCellSpace');
+               infotab.remove('txtCellPad');
+               infotab.remove('cmbAlign');
+
+               // horizontal repositioning of existing elements
+               var hbox = {
+                       id: 'hboxDimensions',
+                       type: 'hbox',
+                       children: [ infotab.get('txtCols'), infotab.get('txtRows') ],
+               };
+               infotab.add(hbox, 'selHeaders');
+               infotab.remove('txtCols');
+               infotab.remove('txtRows');
+
                break;
        case 'link':
                // hide unneeded widgets from the Link Info tab