Commit cc3f5af2 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Добавление нового листа теперь после активного. Баг http://bugzserver/show_bug.cgi?id=16499

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57285 954022d7-b5bf-4e40-9824-e11837661b57
parent 2dba41e7
...@@ -2007,6 +2007,14 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -2007,6 +2007,14 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this.collaborativeEditing.onEndCheckLock(callback); this.collaborativeEditing.onEndCheckLock(callback);
}, },
_addWorksheet: function (name, i) {
this.wbModel.createWorksheet(i, name);
this.wb.spliceWorksheet(i, 0, null);
this.asc_showWorksheet (i);
// Посылаем callback об изменении списка листов
this.sheetsChanged();
},
// Toolbar interface // Toolbar interface
/*asc_getEditorFonts: function () { /*asc_getEditorFonts: function () {
...@@ -2204,19 +2212,13 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -2204,19 +2212,13 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
}, },
asc_addWorksheet: function (name) { asc_addWorksheet: function (name) {
var active = this.wbModel.createWorksheet(null, name); var i = this.wbModel.getActive();
this.asc_showWorksheet (active); this._addWorksheet(name, i + 1);
// Посылаем callback об изменении списка листов
this.sheetsChanged();
}, },
asc_insertWorksheet: function (name) { asc_insertWorksheet: function (name) {
var i = this.wbModel.getActive(); var i = this.wbModel.getActive();
var j = this.wbModel.createWorksheet(i, name); this._addWorksheet(name, i);
this.wb.spliceWorksheet(i, 0, null);
this.asc_showWorksheet (i);
// Посылаем callback об изменении списка листов
this.sheetsChanged();
}, },
// Удаление листа // Удаление листа
......
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