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

scroll повесил на внешний div (иначе не было scroll-а на редакторе ячейки)....

scroll повесил на внешний div (иначе не было scroll-а на редакторе ячейки). Баг http://bugzserver/show_bug.cgi?id=23029

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@54396 954022d7-b5bf-4e40-9824-e11837661b57
parent d5b8d99e
...@@ -117,22 +117,19 @@ ...@@ -117,22 +117,19 @@
this._createScrollBars(); this._createScrollBars();
if( this.view.Api.isMobileVersion ){ if( this.view.Api.isMobileVersion ){
var __hasTouch = 'ontouchstart' in window; var __hasTouch = 'ontouchstart' in window;
if (__hasTouch) {
if (__hasTouch)
{
this.widget.addEventListener("touchstart" , function (e) {self._onTouchStart(e); return false;} , false); this.widget.addEventListener("touchstart" , function (e) {self._onTouchStart(e); return false;} , false);
this.widget.addEventListener("touchmove" , function (e) {self._onTouchMove(e); return false;} , false); this.widget.addEventListener("touchmove" , function (e) {self._onTouchMove(e); return false;} , false);
this.widget.addEventListener("touchend" , function (e) {self._onTouchEnd(e); return false;} , false); this.widget.addEventListener("touchend" , function (e) {self._onTouchEnd(e); return false;} , false);
} } else {
else{
this.widget.addEventListener("touchstart" , function (e) {self._onMouseDown(e.touches[0]); return false;} , false); this.widget.addEventListener("touchstart" , function (e) {self._onMouseDown(e.touches[0]); return false;} , false);
this.widget.addEventListener("touchmove" , function (e) {self._onMouseMove(e.touches[0]); return false;} , false); this.widget.addEventListener("touchmove" , function (e) {self._onMouseMove(e.touches[0]); return false;} , false);
this.widget.addEventListener("touchend" , function (e) {self._onMouseUp(e.changedTouches[0]); return false;} , false); this.widget.addEventListener("touchend" , function (e) {self._onMouseUp(e.changedTouches[0]); return false;} , false);
} }
/*раньше события на ресайз вызывался из меню через контроллер. теперь контроллер в меню не доступен, для ресайза подписываемся на глобальный ресайз от window.*/ /*раньше события на ресайз вызывался из меню через контроллер. теперь контроллер в меню не доступен, для ресайза подписываемся на глобальный ресайз от window.*/
window.addEventListener("resize", function () {self._onWindowResize.apply(self, arguments);}, false); window.addEventListener("resize", function () {self._onWindowResize.apply(self, arguments);}, false);
// this.element.addEventListener("dblclick" , function () {alert("123");/*return self._onMouseDblClick.apply(self, arguments);*/} , false); // this.element.addEventListener("dblclick" , function () {alert("123");/*return self._onMouseDblClick.apply(self, arguments);*/} , false);
return; return this;
} }
// initialize events // initialize events
...@@ -162,10 +159,11 @@ ...@@ -162,10 +159,11 @@
this.element.addEventListener("mousemove" , function () {return self._onMouseMove.apply(self, arguments);} , false); this.element.addEventListener("mousemove" , function () {return self._onMouseMove.apply(self, arguments);} , false);
this.element.addEventListener("mouseleave" , function () {return self._onMouseLeave.apply(self, arguments);} , false); this.element.addEventListener("mouseleave" , function () {return self._onMouseLeave.apply(self, arguments);} , false);
this.element.addEventListener("dblclick" , function () {return self._onMouseDblClick.apply(self, arguments);} , false); this.element.addEventListener("dblclick" , function () {return self._onMouseDblClick.apply(self, arguments);} , false);
}
this.element.addEventListener("mousewheel" , function () {return self._onMouseWheel.apply(self, arguments);} , false); if (this.widget.addEventListener) {
this.widget.addEventListener("mousewheel" , function () {return self._onMouseWheel.apply(self, arguments);} , false);
// for Mozilla Firefox (можно делать проверку на window.MouseScrollEvent || window.WheelEvent для FF) // for Mozilla Firefox (можно делать проверку на window.MouseScrollEvent || window.WheelEvent для FF)
this.element.addEventListener("DOMMouseScroll", function () {return self._onMouseWheel.apply(self, arguments);} , false); this.widget.addEventListener("DOMMouseScroll", function () {return self._onMouseWheel.apply(self, arguments);} , false);
} }
// Курсор для графических объектов. Определяем mousedown и mouseup для выделения текста. // Курсор для графических объектов. Определяем mousedown и mouseup для выделения текста.
......
...@@ -207,8 +207,8 @@ ...@@ -207,8 +207,8 @@
"moveRangeHandleDone": function () {self._onMoveRangeHandleDone.apply(self, arguments);}, "moveRangeHandleDone": function () {self._onMoveRangeHandleDone.apply(self, arguments);},
"moveResizeRangeHandle": function () {self._onMoveResizeRangeHandle.apply(self, arguments);}, "moveResizeRangeHandle": function () {self._onMoveResizeRangeHandle.apply(self, arguments);},
"moveResizeRangeHandleDone":function () {self._onMoveResizeRangeHandleDone.apply(self, arguments);}, "moveResizeRangeHandleDone":function () {self._onMoveResizeRangeHandleDone.apply(self, arguments);},
"editCell": function () {self._onEditCell.apply(self, arguments);}, "editCell": function () {self._onEditCell.apply(self, arguments);},
"stopCellEditing": function () {return self._onStopCellEditing.apply(self, arguments);}, "stopCellEditing": function () {return self._onStopCellEditing.apply(self, arguments);},
"empty": function () {self._onEmpty.apply(self, arguments);}, "empty": function () {self._onEmpty.apply(self, arguments);},
"canEnterCellRange": function () { "canEnterCellRange": function () {
self.cellEditor.setFocus(false); self.cellEditor.setFocus(false);
...@@ -223,32 +223,32 @@ ...@@ -223,32 +223,32 @@
"cut": function () {self.cutToClipboard.apply(self, arguments);}, "cut": function () {self.cutToClipboard.apply(self, arguments);},
"undo": function () {self.undo.apply(self, arguments);}, "undo": function () {self.undo.apply(self, arguments);},
"redo": function () {self.redo.apply(self, arguments);}, "redo": function () {self.redo.apply(self, arguments);},
"addColumn": function () {self._onAddColumn.apply(self, arguments);}, "addColumn": function () {self._onAddColumn.apply(self, arguments);},
"addRow": function () {self._onAddRow.apply(self, arguments);}, "addRow": function () {self._onAddRow.apply(self, arguments);},
"mouseDblClick": function () {self._onMouseDblClick.apply(self, arguments);}, "mouseDblClick": function () {self._onMouseDblClick.apply(self, arguments);},
"showNextPrevWorksheet": function () {self._onShowNextPrevWorksheet.apply(self, arguments);}, "showNextPrevWorksheet": function () {self._onShowNextPrevWorksheet.apply(self, arguments);},
"setFontAttributes": function () {self._onSetFontAttributes.apply(self, arguments);}, "setFontAttributes": function () {self._onSetFontAttributes.apply(self, arguments);},
"selectColumnsByRange": function () {self._onSelectColumnsByRange.apply(self, arguments);}, "selectColumnsByRange": function () {self._onSelectColumnsByRange.apply(self, arguments);},
"selectRowsByRange": function () {self._onSelectRowsByRange.apply(self, arguments);}, "selectRowsByRange": function () {self._onSelectRowsByRange.apply(self, arguments);},
"save": function () {self.Api.asc_Save();}, "save": function () {self.Api.asc_Save();},
"showCellEditorCursor": function () {self._onShowCellEditorCursor.apply(self, arguments);}, "showCellEditorCursor": function () {self._onShowCellEditorCursor.apply(self, arguments);},
"print": function () {self.Api.asc_Print();}, "print": function () {self.Api.asc_Print();},
"addFunction": function () {self.insertFormulaInEditor.apply(self, arguments);}, "addFunction": function () {self.insertFormulaInEditor.apply(self, arguments);},
"canvasClick": function () {self.enableKeyEventsHandler(true);}, "canvasClick": function () {self.enableKeyEventsHandler(true);},
"autoFiltersClick": function () {self._onAutoFiltersClick.apply(self, arguments);}, "autoFiltersClick": function () {self._onAutoFiltersClick.apply(self, arguments);},
"commentCellClick": function () {self._onCommentCellClick.apply(self, arguments);}, "commentCellClick": function () {self._onCommentCellClick.apply(self, arguments);},
"isGlobalLockEditCell": function () {return self.collaborativeEditing.getGlobalLockEditCell();}, "isGlobalLockEditCell": function () {return self.collaborativeEditing.getGlobalLockEditCell();},
"updateSelectionName": function () {self._onUpdateSelectionName.apply(self, arguments);}, "updateSelectionName": function () {self._onUpdateSelectionName.apply(self, arguments);},
// Shapes // Shapes
"graphicObjectMouseDown": function () {self._onGraphicObjectMouseDown.apply(self, arguments);}, "graphicObjectMouseDown": function () {self._onGraphicObjectMouseDown.apply(self, arguments);},
"graphicObjectMouseMove": function () {self._onGraphicObjectMouseMove.apply(self, arguments);}, "graphicObjectMouseMove": function () {self._onGraphicObjectMouseMove.apply(self, arguments);},
"graphicObjectMouseUp": function () {self._onGraphicObjectMouseUp.apply(self, arguments);}, "graphicObjectMouseUp": function () {self._onGraphicObjectMouseUp.apply(self, arguments);},
"graphicObjectMouseUpEx": function () {self._onGraphicObjectMouseUpEx.apply(self, arguments);}, "graphicObjectMouseUpEx": function () {self._onGraphicObjectMouseUpEx.apply(self, arguments);},
"graphicObjectWindowKeyDown": function () {return self._onGraphicObjectWindowKeyDown.apply(self, arguments);}, "graphicObjectWindowKeyDown": function () {return self._onGraphicObjectWindowKeyDown.apply(self, arguments);},
"graphicObjectWindowKeyPress": function () {return self._onGraphicObjectWindowKeyPress.apply(self, arguments);}, "graphicObjectWindowKeyPress": function () {return self._onGraphicObjectWindowKeyPress.apply(self, arguments);},
"getGraphicsInfo": function () {return self._onGetGraphicsInfo.apply(self, arguments);}, "getGraphicsInfo": function () {return self._onGetGraphicsInfo.apply(self, arguments);},
"getSelectedGraphicObjects": function () {return self._onGetSelectedGraphicObjects.apply(self, arguments);}, "getSelectedGraphicObjects": function () {return self._onGetSelectedGraphicObjects.apply(self, arguments);},
"updateSelectionShape": function () {return self._onUpdateSelectionShape.apply(self, arguments);} "updateSelectionShape": function () {return self._onUpdateSelectionShape.apply(self, arguments);}
}); });
......
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