[SSE] Изменение окна с фильтрами в соответствии с макетами: немодальное окно без заголовка, отображается в правом нижнем углу ячейки с фильтром.
This commit is contained in:
parent
f6eb2bdd33
commit
767ae2be56
|
@ -970,12 +970,13 @@ define([
|
|||
|
||||
onApiAutofilter: function(config) {
|
||||
var me = this;
|
||||
if (me.permissions.isEdit) {
|
||||
var dlgFilter = new SSE.Views.AutoFilterDialog({api: this.api}).on({
|
||||
if (me.permissions.isEdit && !me.dlgFilter) {
|
||||
me.dlgFilter = new SSE.Views.AutoFilterDialog({api: this.api}).on({
|
||||
'close': function () {
|
||||
if (me.api) {
|
||||
me.api.asc_enableKeyEvents(true);
|
||||
}
|
||||
me.dlgFilter = undefined;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -984,8 +985,11 @@ define([
|
|||
}
|
||||
|
||||
Common.UI.Menu.Manager.hideAll();
|
||||
dlgFilter.setSettings(config);
|
||||
dlgFilter.show();
|
||||
me.dlgFilter.setSettings(config);
|
||||
var offset = me.documentHolder.cmpEl.offset(),
|
||||
x = config.asc_getCellPosX() + offset.left,
|
||||
y = config.asc_getCellPosY() + offset.top;
|
||||
me.dlgFilter.show(x, y);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -472,17 +472,19 @@ define([
|
|||
|
||||
_.extend(_options, {
|
||||
width : 423,
|
||||
height : 301,
|
||||
height : 265,
|
||||
contentWidth : 400,
|
||||
header : true,
|
||||
header : false,
|
||||
cls : 'filter-dlg',
|
||||
contentTemplate : '',
|
||||
title : t.txtTitle,
|
||||
modal : false,
|
||||
animate : false,
|
||||
items : []
|
||||
}, options);
|
||||
|
||||
this.template = options.template || [
|
||||
'<div class="box" style="height:' + (_options.height - 36) + 'px;">',
|
||||
'<div class="box" style="height:' + _options.height + 'px;">',
|
||||
'<div class="content-panel" style="width: 250px;">',
|
||||
'<div class="">',
|
||||
'<div id="id-sd-cell-search" style="height:22px; margin-bottom:10px;"></div>',
|
||||
|
@ -770,10 +772,21 @@ define([
|
|||
|
||||
this.setupDataCells();
|
||||
this._setDefaults();
|
||||
|
||||
var checkDocumentClick = function(e) {
|
||||
if ($(e.target).closest('.filter-dlg').length<=0)
|
||||
me.close();
|
||||
};
|
||||
this.on('close',function() {
|
||||
$(document.body).off('mousedown', checkDocumentClick);
|
||||
});
|
||||
_.delay(function () {
|
||||
$(document.body).on('mousedown', checkDocumentClick);
|
||||
}, 100, this);
|
||||
},
|
||||
|
||||
show: function () {
|
||||
Common.UI.Window.prototype.show.call(this);
|
||||
show: function (x, y) {
|
||||
Common.UI.Window.prototype.show.call(this, x, y);
|
||||
|
||||
var me = this;
|
||||
if (this.input) {
|
||||
|
|
Loading…
Reference in a new issue