commit
fc6482e92e
|
@ -135,7 +135,7 @@ if (Common === undefined) {
|
||||||
|
|
||||||
var _onMessage = function(msg) {
|
var _onMessage = function(msg) {
|
||||||
// TODO: check message origin
|
// TODO: check message origin
|
||||||
if (msg.origin !== window.parentOrigin) return;
|
if (msg.origin !== window.parentOrigin && msg.origin !== window.location.origin) return;
|
||||||
|
|
||||||
var data = msg.data;
|
var data = msg.data;
|
||||||
if (Object.prototype.toString.apply(data) !== '[object String]' || !window.JSON) {
|
if (Object.prototype.toString.apply(data) !== '[object String]' || !window.JSON) {
|
||||||
|
|
|
@ -62,8 +62,10 @@ define([
|
||||||
|
|
||||||
function onTabDblclick(e) {
|
function onTabDblclick(e) {
|
||||||
var tab = $(e.currentTarget).find('> a[data-tab]').data('tab');
|
var tab = $(e.currentTarget).find('> a[data-tab]').data('tab');
|
||||||
if ( this.dblclick_el == tab )
|
if ( this.dblclick_el == tab ) {
|
||||||
this.fireEvent('change:compact', [tab]);
|
this.fireEvent('change:compact', [tab]);
|
||||||
|
this.dblclick_el = undefined;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onShowFullviewPanel(state) {
|
function onShowFullviewPanel(state) {
|
||||||
|
@ -237,14 +239,19 @@ define([
|
||||||
var me = this;
|
var me = this;
|
||||||
var $target = $(e.currentTarget);
|
var $target = $(e.currentTarget);
|
||||||
var tab = $target.find('> a[data-tab]').data('tab');
|
var tab = $target.find('> a[data-tab]').data('tab');
|
||||||
var islone = $target.hasClass('x-lone');
|
if ($target.hasClass('x-lone')) {
|
||||||
if ( me.isFolded ) {
|
me.isFolded && me.collapse();
|
||||||
if ( $target.hasClass('x-lone') ) {
|
} else {
|
||||||
me.collapse();
|
|
||||||
// me.fireEvent('')
|
|
||||||
} else
|
|
||||||
if ( $target.hasClass('active') ) {
|
if ( $target.hasClass('active') ) {
|
||||||
!me._timerSetTab && me.collapse();
|
if (!me._timerSetTab) {
|
||||||
|
me.dblclick_el = tab;
|
||||||
|
if ( me.isFolded ) {
|
||||||
|
me.collapse();
|
||||||
|
setTimeout(function(){
|
||||||
|
me.dblclick_el = undefined;
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
me._timerSetTab = true;
|
me._timerSetTab = true;
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
|
@ -252,11 +259,13 @@ define([
|
||||||
}, 500);
|
}, 500);
|
||||||
me.setTab(tab);
|
me.setTab(tab);
|
||||||
me.processPanelVisible(null, true);
|
me.processPanelVisible(null, true);
|
||||||
}
|
if ( !me.isFolded ) {
|
||||||
} else {
|
if ( me.dblclick_timer ) clearTimeout(me.dblclick_timer);
|
||||||
if ( !$target.hasClass('active') && !islone ) {
|
me.dblclick_timer = setTimeout(function () {
|
||||||
me.setTab(tab);
|
me.dblclick_el = tab;
|
||||||
me.processPanelVisible(null, true);
|
delete me.dblclick_timer;
|
||||||
|
},500);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -292,12 +301,6 @@ define([
|
||||||
$tp.addClass('active');
|
$tp.addClass('active');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( me.dblclick_timer ) clearTimeout(me.dblclick_timer);
|
|
||||||
me.dblclick_timer = setTimeout(function () {
|
|
||||||
me.dblclick_el = tab;
|
|
||||||
delete me.dblclick_timer;
|
|
||||||
},300);
|
|
||||||
|
|
||||||
this.fireEvent('tab:active', [tab]);
|
this.fireEvent('tab:active', [tab]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -772,7 +772,7 @@ define([
|
||||||
if ( type == Asc.c_oAscAsyncActionType.BlockInteraction &&
|
if ( type == Asc.c_oAscAsyncActionType.BlockInteraction &&
|
||||||
(!this.getApplication().getController('LeftMenu').dlgSearch || !this.getApplication().getController('LeftMenu').dlgSearch.isVisible()) &&
|
(!this.getApplication().getController('LeftMenu').dlgSearch || !this.getApplication().getController('LeftMenu').dlgSearch.isVisible()) &&
|
||||||
(!this.getApplication().getController('Toolbar').dlgSymbolTable || !this.getApplication().getController('Toolbar').dlgSymbolTable.isVisible()) &&
|
(!this.getApplication().getController('Toolbar').dlgSymbolTable || !this.getApplication().getController('Toolbar').dlgSymbolTable.isVisible()) &&
|
||||||
!((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.inTextareaControl || Common.Utils.ModalWindow.isVisible() || this.inFormControl)) ) {
|
!((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges'] || id == Asc.c_oAscAsyncAction['DownloadAs']) && (this.dontCloseDummyComment || this.inTextareaControl || Common.Utils.ModalWindow.isVisible() || this.inFormControl)) ) {
|
||||||
// this.onEditComplete(this.loadMask); //если делать фокус, то при принятии чужих изменений, заканчивается свой композитный ввод
|
// this.onEditComplete(this.loadMask); //если делать фокус, то при принятии чужих изменений, заканчивается свой композитный ввод
|
||||||
this.api.asc_enableKeyEvents(true);
|
this.api.asc_enableKeyEvents(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue