[DE] Draw/Erase table
This commit is contained in:
parent
e0cdf0eba8
commit
8c4d467b52
|
@ -382,6 +382,8 @@ define([
|
||||||
this.api.asc_registerCallback('asc_onChangeSdtGlobalSettings', _.bind(this.onChangeSdtGlobalSettings, this));
|
this.api.asc_registerCallback('asc_onChangeSdtGlobalSettings', _.bind(this.onChangeSdtGlobalSettings, this));
|
||||||
this.api.asc_registerCallback('asc_onTextLanguage', _.bind(this.onTextLanguage, this));
|
this.api.asc_registerCallback('asc_onTextLanguage', _.bind(this.onTextLanguage, this));
|
||||||
Common.NotificationCenter.on('fonts:change', _.bind(this.onApiChangeFont, this));
|
Common.NotificationCenter.on('fonts:change', _.bind(this.onApiChangeFont, this));
|
||||||
|
this.api.asc_registerCallback('asc_TableDrawModeCallback', _.bind(this.onTableDraw, this));
|
||||||
|
this.api.asc_registerCallback('asc_TableEraseModeCallback', _.bind(this.onTableErase, this));
|
||||||
} else if (this.mode.isRestrictedEdit) {
|
} else if (this.mode.isRestrictedEdit) {
|
||||||
this.api.asc_registerCallback('asc_onFocusObject', _.bind(this.onApiFocusObjectRestrictedEdit, this));
|
this.api.asc_registerCallback('asc_onFocusObject', _.bind(this.onApiFocusObjectRestrictedEdit, this));
|
||||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiCoAuthoringDisconnect, this));
|
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiCoAuthoringDisconnect, this));
|
||||||
|
@ -856,6 +858,13 @@ define([
|
||||||
this.modeAlwaysSetStyle = false;
|
this.modeAlwaysSetStyle = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onTableDraw: function(v) {
|
||||||
|
this.toolbar.mnuInsertTable && this.toolbar.mnuInsertTable.items[2].setChecked(!!v, true);
|
||||||
|
},
|
||||||
|
onTableErase: function(v) {
|
||||||
|
this.toolbar.mnuInsertTable && this.toolbar.mnuInsertTable.items[3].setChecked(!!v, true);
|
||||||
|
},
|
||||||
|
|
||||||
onApiParagraphStyleChange: function(name) {
|
onApiParagraphStyleChange: function(name) {
|
||||||
if (this._state.prstyle != name) {
|
if (this._state.prstyle != name) {
|
||||||
var listStyle = this.toolbar.listStyles,
|
var listStyle = this.toolbar.listStyles,
|
||||||
|
@ -1412,6 +1421,12 @@ define([
|
||||||
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
||||||
}
|
}
|
||||||
})).show();
|
})).show();
|
||||||
|
} else if (item.value == 'draw') {
|
||||||
|
item.isChecked() && menu.items[3].setChecked(false, true);
|
||||||
|
this.api.SetTableDrawMode(item.isChecked());
|
||||||
|
} else if (item.value == 'erase') {
|
||||||
|
item.isChecked() && menu.items[2].setChecked(false, true);
|
||||||
|
this.api.SetTableEraseMode(item.isChecked());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -480,7 +480,9 @@ define([
|
||||||
menu: new Common.UI.Menu({
|
menu: new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{template: _.template('<div id="id-toolbar-menu-tablepicker" class="dimension-picker" style="margin: 5px 10px;"></div>')},
|
{template: _.template('<div id="id-toolbar-menu-tablepicker" class="dimension-picker" style="margin: 5px 10px;"></div>')},
|
||||||
{caption: this.mniCustomTable, value: 'custom'}
|
{caption: this.mniCustomTable, value: 'custom'},
|
||||||
|
{caption: this.mniDrawTable, value: 'draw', checkable: true},
|
||||||
|
{caption: this.mniEraseTable, value: 'erase', checkable: true}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
@ -2318,7 +2320,9 @@ define([
|
||||||
textDateControl: 'Date',
|
textDateControl: 'Date',
|
||||||
capBtnAddComment: 'Add Comment',
|
capBtnAddComment: 'Add Comment',
|
||||||
capBtnInsSymbol: 'Symbol',
|
capBtnInsSymbol: 'Symbol',
|
||||||
tipInsertSymbol: 'Insert symbol'
|
tipInsertSymbol: 'Insert symbol',
|
||||||
|
mniDrawTable: 'Draw table',
|
||||||
|
mniEraseTable: 'Erase table'
|
||||||
}
|
}
|
||||||
})(), DE.Views.Toolbar || {}));
|
})(), DE.Views.Toolbar || {}));
|
||||||
});
|
});
|
||||||
|
|
|
@ -2305,6 +2305,8 @@
|
||||||
"DE.Views.Toolbar.textCheckboxControl": "Check box",
|
"DE.Views.Toolbar.textCheckboxControl": "Check box",
|
||||||
"DE.Views.Toolbar.textDropdownControl": "Drop-down list",
|
"DE.Views.Toolbar.textDropdownControl": "Drop-down list",
|
||||||
"DE.Views.Toolbar.textDateControl": "Date",
|
"DE.Views.Toolbar.textDateControl": "Date",
|
||||||
|
"DE.Views.Toolbar.mniDrawTable": "Draw table",
|
||||||
|
"DE.Views.Toolbar.mniEraseTable": "Erase table",
|
||||||
"DE.Views.WatermarkSettingsDialog.textAuto": "Auto",
|
"DE.Views.WatermarkSettingsDialog.textAuto": "Auto",
|
||||||
"DE.Views.WatermarkSettingsDialog.textBold": "Bold",
|
"DE.Views.WatermarkSettingsDialog.textBold": "Bold",
|
||||||
"DE.Views.WatermarkSettingsDialog.textColor": "Text color",
|
"DE.Views.WatermarkSettingsDialog.textColor": "Text color",
|
||||||
|
|
Loading…
Reference in a new issue