Refactoring
This commit is contained in:
parent
37c834b7e3
commit
2212b761d4
|
@ -9,7 +9,6 @@ SSE.CellEditorController = new(function(){
|
||||||
var me,
|
var me,
|
||||||
api,
|
api,
|
||||||
editor,
|
editor,
|
||||||
mode,
|
|
||||||
created=false;
|
created=false;
|
||||||
|
|
||||||
function onCellName(e){
|
function onCellName(e){
|
||||||
|
@ -71,8 +70,6 @@ SSE.CellEditorController = new(function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
function onApiEditCell(state) {
|
function onApiEditCell(state) {
|
||||||
if (this.viewmode) return; // signed file
|
|
||||||
|
|
||||||
if (state == Asc.c_oAscCellEditorState.editStart){
|
if (state == Asc.c_oAscCellEditorState.editStart){
|
||||||
api.isCellEdited = true;
|
api.isCellEdited = true;
|
||||||
editor.cell.nameDisabled(true);
|
editor.cell.nameDisabled(true);
|
||||||
|
@ -85,17 +82,12 @@ SSE.CellEditorController = new(function(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onApiDisconnect() {
|
|
||||||
mode.isEdit = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function setApi(apiF){
|
function setApi(apiF){
|
||||||
api=apiF;
|
api=apiF;
|
||||||
|
|
||||||
api.isCEditorFocused = false;
|
api.isCEditorFocused = false;
|
||||||
api.asc_registerCallback('asc_onSelectionNameChanged', onApiCellSelection);
|
api.asc_registerCallback('asc_onSelectionNameChanged', onApiCellSelection);
|
||||||
api.asc_registerCallback('asc_onEditCell', onApiEditCell);
|
api.asc_registerCallback('asc_onEditCell', onApiEditCell);
|
||||||
api.asc_registerCallback('asc_onCoAuthoringDisconnect', onApiDisconnect);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue