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

Сами запретим заходить в строку формул, когда выделен shape

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51552 954022d7-b5bf-4e40-9824-e11837661b57
parent c9bdd82f
......@@ -432,14 +432,18 @@
this.lastSendInfoRange = ar.clone(true);
this.lastSendInfoRange.startCol = ar.startCol;
this.lastSendInfoRange.startRow = ar.startRow;
this.lastSendInfoRange.isSelectOnShape = ws.isSelectOnShape;
this.lastSendInfoRange.isSelectOnShape = ws.getSelectionShape();
if (null === info) {
info = ws.getSelectionInfo();
}
// При редактировании ячейки не нужно пересылать изменения
if (false === ws.getCellEditMode()) {
this.input.prop("disabled", false);
// Сами запретим заходить в строку формул, когда выделен shape
if (this.lastSendInfoRange.isSelectOnShape)
this.input.prop("disabled", true);
else
this.input.prop("disabled", false);
this.input.val(info.text);
}
this.handlers.trigger("asc_onSelectionChanged", info);
......@@ -515,7 +519,8 @@
this._onSelectionNameChanged(ws.getSelectionName(/*bRangeText*/false));
// Проверим, нужно ли отсылать информацию о ячейке
var ar = ws.activeRange;
if (!this._isEqualRange(ar, ws.isSelectOnShape)) {
var isSelectOnShape = ws.getSelectionShape();
if (!this._isEqualRange(ar, isSelectOnShape)) {
this._onWSSelectionChanged(ws.getSelectionInfo());
}
......@@ -524,7 +529,7 @@
if ("hyperlink" === ct.target) {
// Проверим замерженность
var isHyperlinkClick = false;
if ( (ar.c1 === ar.c2 && ar.r1 === ar.r2) || ws.isSelectOnShape )
if ( (ar.c1 === ar.c2 && ar.r1 === ar.r2) || isSelectOnShape )
isHyperlinkClick = true;
else {
var mergedRange = ws.model.getMergedByCell(ar.r1, ar.c1);
......@@ -532,7 +537,7 @@
isHyperlinkClick = true;
}
if (isHyperlinkClick) {
if (false === ct.hyperlink.hyperlinkModel.getVisited() && !ws.isSelectOnShape) {
if (false === ct.hyperlink.hyperlinkModel.getVisited() && !isSelectOnShape) {
ct.hyperlink.hyperlinkModel.setVisited(true);
if (ct.hyperlink.hyperlinkModel.Ref)
ws.changeWorksheet("updateRange", {range: ct.hyperlink.hyperlinkModel.Ref.getBBox0(), isLockDraw: false, canChangeColWidth: false});
......
......@@ -5853,6 +5853,9 @@
this._trigger("selectionChanged", this.getSelectionInfo());
},
getSelectionShape: function () {
return this.isSelectOnShape;
},
setSelectionShape: function (isSelectOnShape) {
this.isSelectOnShape = isSelectOnShape;
// отправляем евент для получения свойств картинки, шейпа или группы
......
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