Commit b26d42de authored by Dmitry.Shahtanov's avatar Dmitry.Shahtanov

для бага 30394

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@65021 954022d7-b5bf-4e40-9824-e11837661b57
parent 64ccca5a
......@@ -2082,6 +2082,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
dN.isLock = lockElem["UserId"];
this.handlers.trigger("asc_onRefreshDefNameList");
}
this.handlers.trigger("asc_onLockDefNameManager",c_oAscDefinedNameReason.LockDefNameManager);
}
spreadsheet_api.prototype._onUnlockDefName = function() {
......
......@@ -2878,6 +2878,7 @@ UndoRedoWorkbook.prototype = {
if(null != oConflictDefName)
oConflictDefName.renameDefNameToCollaborate(this.wb.getUniqueDefinedNameFrom(oConflictDefName, true));
}
this.wb.handlers.trigger("asc_onLockDefNameManager",c_oAscDefinedNameReason.OK);
}
this.wb.editDefinesNames( null, Data.newName, true );
this.wb.handlers.trigger("asc_onEditDefName", null, Data.newName);
......@@ -2903,6 +2904,7 @@ UndoRedoWorkbook.prototype = {
if(null != oConflictDefName)
oConflictDefName.renameDefNameToCollaborate(this.wb.getUniqueDefinedNameFrom(oConflictDefName, true));
}
this.wb.handlers.trigger("asc_onLockDefNameManager",c_oAscDefinedNameReason.OK);
}
oldName = Data.oldName;
newName = Data.newName;
......
......@@ -1982,29 +1982,35 @@
t._onSelectionNameChanged(ws.getSelectionName(/*bRangeText*/false));
};
// if( oldName ){
var editDefinedNamesCallback = function (res) {
if (res) {
t.model.editDefinesNames(oldName, newName);
t.handlers.trigger("asc_onEditDefName", oldName, newName);
t.handlers.trigger("asc_onRefreshDefNameList");
// t.handlers.trigger("asc_onLockDefNameManager",c_oAscDefinedNameReason.LockDefNameManager);
selectNameChange();
}
};
var defNameId
if( oldName ){
var editDefinedNamesCallback = function (res) {
if (res) {
t.model.editDefinesNames(oldName, newName);
t.handlers.trigger("asc_onEditDefName", oldName, newName);
t.handlers.trigger("asc_onRefreshDefNameList");
t.handlers.trigger("asc_onLockDefNameManager",c_oAscDefinedNameReason.LockDefNameManager);
selectNameChange();
}
};
var defNameId = t.model.getDefinedName(oldName).nodeId;
ws._isLockedDefNames(editDefinedNamesCallback, defNameId);
}
else{
this.model.editDefinesNames(oldName, newName);
this.handlers.trigger("asc_onDefName");
this.handlers.trigger("asc_onRefreshDefNameList");
this.handlers.trigger("asc_onLockDefNameManager",c_oAscDefinedNameReason.LockDefNameManager);
selectNameChange();
defNameId = t.model.getDefinedName(oldName).nodeId;
}
// else{
// defNameId = t.model.getDefinedName(newName).nodeId;
// }
ws._isLockedDefNames(editDefinedNamesCallback, defNameId);
// }
// else{
// this.model.editDefinesNames(oldName, newName);
// this.handlers.trigger("asc_onDefName");
// this.handlers.trigger("asc_onRefreshDefNameList");
//// this.handlers.trigger("asc_onLockDefNameManager",c_oAscDefinedNameReason.LockDefNameManager);
// selectNameChange();
// }
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment