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

переделал отправку эвентов на handlers вместо вызова options["name"]

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53325 954022d7-b5bf-4e40-9824-e11837661b57
parent 22a6bca9
...@@ -2559,6 +2559,7 @@ function DrawingObjects() { ...@@ -2559,6 +2559,7 @@ function DrawingObjects() {
var asc = window["Asc"]; var asc = window["Asc"];
var api = asc["editor"]; var api = asc["editor"];
var asc_Range = asc.Range; var asc_Range = asc.Range;
var asc_applyFunction = asc.applyFunction;
var chartRender = null; var chartRender = null;
if ( typeof ChartRender !== "undefined" ) if ( typeof ChartRender !== "undefined" )
...@@ -2918,7 +2919,7 @@ function DrawingObjects() { ...@@ -2918,7 +2919,7 @@ function DrawingObjects() {
_this.drawingDocument.TargetHtmlElement = document.getElementById('id_target_cursor'); _this.drawingDocument.TargetHtmlElement = document.getElementById('id_target_cursor');
_this.drawingDocument.InitGuiCanvasShape(api.shapeElementId); _this.drawingDocument.InitGuiCanvasShape(api.shapeElementId);
_this.isViewerMode = function() { return worksheet._trigger("getViewerMode"); }; _this.isViewerMode = function() { return worksheet.handlers.trigger("getViewerMode"); };
aObjects = []; aObjects = [];
aImagesSync = []; aImagesSync = [];
...@@ -3811,7 +3812,7 @@ function DrawingObjects() { ...@@ -3811,7 +3812,7 @@ function DrawingObjects() {
object.to.row = cellTo.row; object.to.row = cellTo.row;
object.to.rowOff = cellTo.rowOff; object.to.rowOff = cellTo.rowOff;
worksheet._trigger("reinitializeScroll"); worksheet.handlers.trigger("reinitializeScroll");
} }
function addImageObject(_image) { function addImageObject(_image) {
...@@ -4740,7 +4741,7 @@ function DrawingObjects() { ...@@ -4740,7 +4741,7 @@ function DrawingObjects() {
if ( isMaxCol() ) if ( isMaxCol() )
break; break;
worksheet.expandColsOnScroll(true); worksheet.expandColsOnScroll(true);
worksheet._trigger("reinitializeScrollX"); worksheet.handlers.trigger("reinitializeScrollX");
foundCol = worksheet._findColUnderCursor(mmToPt(x + w) + scrollX, true); foundCol = worksheet._findColUnderCursor(mmToPt(x + w) + scrollX, true);
} }
} }
...@@ -4752,7 +4753,7 @@ function DrawingObjects() { ...@@ -4752,7 +4753,7 @@ function DrawingObjects() {
if ( isMaxRow() ) if ( isMaxRow() )
break; break;
worksheet.expandRowsOnScroll(true); worksheet.expandRowsOnScroll(true);
worksheet._trigger("reinitializeScrollY"); worksheet.handlers.trigger("reinitializeScrollY");
foundRow = worksheet._findRowUnderCursor(mmToPt(y + h) + scrollY, true); foundRow = worksheet._findRowUnderCursor(mmToPt(y + h) + scrollY, true);
} }
} }
...@@ -4895,7 +4896,7 @@ function DrawingObjects() { ...@@ -4895,7 +4896,7 @@ function DrawingObjects() {
_this.sendGraphicObjectProps = function() { _this.sendGraphicObjectProps = function() {
if ( worksheet ) if ( worksheet )
worksheet._trigger("selectionChanged", worksheet.getSelectionInfo()); worksheet.handlers.trigger("selectionChanged", worksheet.getSelectionInfo());
} }
_this.setGraphicObjectProps = function(props) { _this.setGraphicObjectProps = function(props) {
...@@ -5385,6 +5386,8 @@ function DrawingObjects() { ...@@ -5385,6 +5386,8 @@ function DrawingObjects() {
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
function ObjectLocker(ws) { function ObjectLocker(ws) {
var asc = window["Asc"];
var asc_applyFunction = asc.applyFunction;
var _t = this; var _t = this;
var aObjectId = []; var aObjectId = [];
...@@ -5392,11 +5395,11 @@ function ObjectLocker(ws) { ...@@ -5392,11 +5395,11 @@ function ObjectLocker(ws) {
_t.reset = function() { _t.reset = function() {
aObjectId = []; aObjectId = [];
} };
_t.addObjectId = function(id) { _t.addObjectId = function(id) {
aObjectId.push(id); aObjectId.push(id);
} };
// For array of objects -=Use reset before use=- // For array of objects -=Use reset before use=-
_t.checkObjects = function(callback) { _t.checkObjects = function(callback) {
...@@ -5409,7 +5412,7 @@ function ObjectLocker(ws) { ...@@ -5409,7 +5412,7 @@ function ObjectLocker(ws) {
if ( !aObjectId.length || (false === worksheet.collaborativeEditing.isCoAuthoringExcellEnable()) ) { if ( !aObjectId.length || (false === worksheet.collaborativeEditing.isCoAuthoringExcellEnable()) ) {
// Запрещено совместное редактирование // Запрещено совместное редактирование
if ($.isFunction(callback)) {callbackEx(true);} asc_applyFunction(callbackEx, true);
return; return;
} }
...@@ -5421,7 +5424,7 @@ function ObjectLocker(ws) { ...@@ -5421,7 +5424,7 @@ function ObjectLocker(ws) {
if ( false === worksheet.collaborativeEditing.getCollaborativeEditing() ) { if ( false === worksheet.collaborativeEditing.getCollaborativeEditing() ) {
// Пользователь редактирует один: не ждем ответа, а сразу продолжаем редактирование // Пользователь редактирует один: не ждем ответа, а сразу продолжаем редактирование
if ($.isFunction(callback)) { callbackEx(true); } asc_applyFunction(callbackEx, true);
callback = undefined; callback = undefined;
} }
if ( false !== worksheet.collaborativeEditing.getLockIntersection(lockInfo, c_oAscLockTypes.kLockTypeMine) ) { if ( false !== worksheet.collaborativeEditing.getLockIntersection(lockInfo, c_oAscLockTypes.kLockTypeMine) ) {
...@@ -5430,7 +5433,7 @@ function ObjectLocker(ws) { ...@@ -5430,7 +5433,7 @@ function ObjectLocker(ws) {
} }
else if ( false !== worksheet.collaborativeEditing.getLockIntersection(lockInfo, c_oAscLockTypes.kLockTypeOther) ) { else if ( false !== worksheet.collaborativeEditing.getLockIntersection(lockInfo, c_oAscLockTypes.kLockTypeOther) ) {
// Уже ячейку кто-то редактирует // Уже ячейку кто-то редактирует
if ($.isFunction(callback)) {callbackEx(false);} asc_applyFunction(callbackEx, false);
return; return;
} }
worksheet.collaborativeEditing.addCheckLock(lockInfo); worksheet.collaborativeEditing.addCheckLock(lockInfo);
...@@ -5529,7 +5532,7 @@ function CoordsManager(ws, bLog) { ...@@ -5529,7 +5532,7 @@ function CoordsManager(ws, bLog) {
break; break;
} }
worksheet.expandColsOnScroll(true); worksheet.expandColsOnScroll(true);
worksheet._trigger("reinitializeScrollX"); worksheet.handlers.trigger("reinitializeScrollX");
col = worksheet._findColUnderCursor( xPt - offsetX + delta, true ); col = worksheet._findColUnderCursor( xPt - offsetX + delta, true );
if ( xPt - offsetX < 0 ) if ( xPt - offsetX < 0 )
delta++; delta++;
...@@ -5546,7 +5549,7 @@ function CoordsManager(ws, bLog) { ...@@ -5546,7 +5549,7 @@ function CoordsManager(ws, bLog) {
break; break;
} }
worksheet.expandRowsOnScroll(true); worksheet.expandRowsOnScroll(true);
worksheet._trigger("reinitializeScrollY"); worksheet.handlers.trigger("reinitializeScrollY");
row = worksheet._findRowUnderCursor( yPt - offsetY + delta, true ); row = worksheet._findRowUnderCursor( yPt - offsetY + delta, true );
if ( yPt - offsetY < 0 ) if ( yPt - offsetY < 0 )
delta++; delta++;
......
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