[SSE] Fix bugs from selver log (check cell info)
This commit is contained in:
parent
c7a67e0431
commit
df9a166c54
|
@ -153,7 +153,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiSelectionChanged: function(info) {
|
onApiSelectionChanged: function(info) {
|
||||||
if (this.viewmode) return; // signed file
|
if (this.viewmode || !info) return; // signed file
|
||||||
|
|
||||||
var seltype = info.asc_getSelectionType(),
|
var seltype = info.asc_getSelectionType(),
|
||||||
coauth_disable = (!this.mode.isEditMailMerge && !this.mode.isEditDiagram && !this.mode.isEditOle) ? (info.asc_getLocked() === true || info.asc_getLockedTable() === true || info.asc_getLockedPivotTable()===true) : false;
|
coauth_disable = (!this.mode.isEditMailMerge && !this.mode.isEditDiagram && !this.mode.isEditOle) ? (info.asc_getLocked() === true || info.asc_getLockedTable() === true || info.asc_getLockedPivotTable()===true) : false;
|
||||||
|
|
|
@ -1987,6 +1987,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
fillMenuProps: function(cellinfo, showMenu, event){
|
fillMenuProps: function(cellinfo, showMenu, event){
|
||||||
|
if (!cellinfo) return;
|
||||||
var iscellmenu, isrowmenu, iscolmenu, isallmenu, ischartmenu, isimagemenu, istextshapemenu, isshapemenu, istextchartmenu, isimageonly, isslicermenu,
|
var iscellmenu, isrowmenu, iscolmenu, isallmenu, ischartmenu, isimagemenu, istextshapemenu, isshapemenu, istextchartmenu, isimageonly, isslicermenu,
|
||||||
documentHolder = this.documentHolder,
|
documentHolder = this.documentHolder,
|
||||||
seltype = cellinfo.asc_getSelectionType(),
|
seltype = cellinfo.asc_getSelectionType(),
|
||||||
|
@ -2430,6 +2431,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
fillViewMenuProps: function(cellinfo, showMenu, event){
|
fillViewMenuProps: function(cellinfo, showMenu, event){
|
||||||
|
if (!cellinfo) return;
|
||||||
var documentHolder = this.documentHolder,
|
var documentHolder = this.documentHolder,
|
||||||
seltype = cellinfo.asc_getSelectionType(),
|
seltype = cellinfo.asc_getSelectionType(),
|
||||||
isCellLocked = cellinfo.asc_getLocked(),
|
isCellLocked = cellinfo.asc_getLocked(),
|
||||||
|
|
|
@ -669,6 +669,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onSelectionChanged: function(info){
|
onSelectionChanged: function(info){
|
||||||
|
if (!info) return;
|
||||||
if (!this._isChartDataReady && info.asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChart) {
|
if (!this._isChartDataReady && info.asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChart) {
|
||||||
this._isChartDataReady = true;
|
this._isChartDataReady = true;
|
||||||
Common.Gateway.internalMessage('chartDataReady');
|
Common.Gateway.internalMessage('chartDataReady');
|
||||||
|
|
|
@ -148,7 +148,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onSelectionChanged: function(info) {
|
onSelectionChanged: function(info) {
|
||||||
if (this.rangeSelectionMode) return;
|
if (this.rangeSelectionMode || !info) return;
|
||||||
|
|
||||||
var SelectedObjects = [],
|
var SelectedObjects = [],
|
||||||
selectType = info.asc_getSelectionType(),
|
selectType = info.asc_getSelectionType(),
|
||||||
|
|
|
@ -2814,7 +2814,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiSelectionChanged: function(info) {
|
onApiSelectionChanged: function(info) {
|
||||||
if (!this.editMode || $('.asc-window.enable-key-events:visible').length>0) return;
|
if (!this.editMode || $('.asc-window.enable-key-events:visible').length>0 || !info) return;
|
||||||
if ( this.toolbar.mode.isEditDiagram )
|
if ( this.toolbar.mode.isEditDiagram )
|
||||||
return this.onApiSelectionChanged_DiagramEditor(info); else
|
return this.onApiSelectionChanged_DiagramEditor(info); else
|
||||||
if ( this.toolbar.mode.isEditMailMerge )
|
if ( this.toolbar.mode.isEditMailMerge )
|
||||||
|
@ -3245,7 +3245,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiSelectionChangedRestricted: function(info) {
|
onApiSelectionChangedRestricted: function(info) {
|
||||||
if (!this.appConfig.isRestrictedEdit) return;
|
if (!this.appConfig.isRestrictedEdit || !info) return;
|
||||||
|
|
||||||
var selectionType = info.asc_getSelectionType();
|
var selectionType = info.asc_getSelectionType();
|
||||||
this.toolbar.lockToolbar(Common.enumLock.commentLock,
|
this.toolbar.lockToolbar(Common.enumLock.commentLock,
|
||||||
|
@ -3256,7 +3256,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiSelectionChanged_DiagramEditor: function(info) {
|
onApiSelectionChanged_DiagramEditor: function(info) {
|
||||||
if ( !this.editMode || this.api.isCellEdited || this.api.isRangeSelection) return;
|
if ( !this.editMode || this.api.isCellEdited || this.api.isRangeSelection || !info) return;
|
||||||
|
|
||||||
var me = this;
|
var me = this;
|
||||||
var _disableEditOptions = function(seltype, coauth_disable) {
|
var _disableEditOptions = function(seltype, coauth_disable) {
|
||||||
|
@ -3326,7 +3326,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiSelectionChanged_MailMergeEditor: function(info) {
|
onApiSelectionChanged_MailMergeEditor: function(info) {
|
||||||
if ( !this.editMode || this.api.isCellEdited || this.api.isRangeSelection) return;
|
if ( !this.editMode || this.api.isCellEdited || this.api.isRangeSelection || !info) return;
|
||||||
|
|
||||||
var me = this;
|
var me = this;
|
||||||
var _disableEditOptions = function(seltype, coauth_disable) {
|
var _disableEditOptions = function(seltype, coauth_disable) {
|
||||||
|
@ -3383,7 +3383,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiSelectionChanged_OleEditor: function(info) {
|
onApiSelectionChanged_OleEditor: function(info) {
|
||||||
if ( !this.editMode || this.api.isCellEdited || this.api.isRangeSelection) return;
|
if ( !this.editMode || this.api.isCellEdited || this.api.isRangeSelection || !info) return;
|
||||||
|
|
||||||
var me = this;
|
var me = this;
|
||||||
var _disableEditOptions = function(seltype, coauth_disable) {
|
var _disableEditOptions = function(seltype, coauth_disable) {
|
||||||
|
|
|
@ -329,7 +329,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiSelectionChanged: function(info) {
|
onApiSelectionChanged: function(info) {
|
||||||
if (!this.view) return;
|
if (!this.view || !info) return;
|
||||||
if ($('.asc-window.enable-key-events:visible').length>0) return;
|
if ($('.asc-window.enable-key-events:visible').length>0) return;
|
||||||
|
|
||||||
var selectionType = info.asc_getSelectionType();
|
var selectionType = info.asc_getSelectionType();
|
||||||
|
|
Loading…
Reference in a new issue