Commit 767ae2be authored by Julia Radzhabova's avatar Julia Radzhabova

[SSE] Изменение окна с фильтрами в соответствии с макетами: немодальное окно...

[SSE] Изменение окна с фильтрами в соответствии с макетами: немодальное окно без заголовка, отображается в правом нижнем углу ячейки с фильтром.
parent f6eb2bdd
...@@ -970,12 +970,13 @@ define([ ...@@ -970,12 +970,13 @@ define([
onApiAutofilter: function(config) { onApiAutofilter: function(config) {
var me = this; var me = this;
if (me.permissions.isEdit) { if (me.permissions.isEdit && !me.dlgFilter) {
var dlgFilter = new SSE.Views.AutoFilterDialog({api: this.api}).on({ me.dlgFilter = new SSE.Views.AutoFilterDialog({api: this.api}).on({
'close': function () { 'close': function () {
if (me.api) { if (me.api) {
me.api.asc_enableKeyEvents(true); me.api.asc_enableKeyEvents(true);
} }
me.dlgFilter = undefined;
} }
}); });
...@@ -984,8 +985,11 @@ define([ ...@@ -984,8 +985,11 @@ define([
} }
Common.UI.Menu.Manager.hideAll(); Common.UI.Menu.Manager.hideAll();
dlgFilter.setSettings(config); me.dlgFilter.setSettings(config);
dlgFilter.show(); 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([ ...@@ -472,17 +472,19 @@ define([
_.extend(_options, { _.extend(_options, {
width : 423, width : 423,
height : 301, height : 265,
contentWidth : 400, contentWidth : 400,
header : true, header : false,
cls : 'filter-dlg', cls : 'filter-dlg',
contentTemplate : '', contentTemplate : '',
title : t.txtTitle, title : t.txtTitle,
modal : false,
animate : false,
items : [] items : []
}, options); }, options);
this.template = options.template || [ 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="content-panel" style="width: 250px;">',
'<div class="">', '<div class="">',
'<div id="id-sd-cell-search" style="height:22px; margin-bottom:10px;"></div>', '<div id="id-sd-cell-search" style="height:22px; margin-bottom:10px;"></div>',
...@@ -770,10 +772,21 @@ define([ ...@@ -770,10 +772,21 @@ define([
this.setupDataCells(); this.setupDataCells();
this._setDefaults(); 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 () { show: function (x, y) {
Common.UI.Window.prototype.show.call(this); Common.UI.Window.prototype.show.call(this, x, y);
var me = this; var me = this;
if (this.input) { if (this.input) {
......
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