diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js index 9405cc200..063bed7bf 100644 --- a/apps/common/main/lib/component/Window.js +++ b/apps/common/main/lib/component/Window.js @@ -951,6 +951,13 @@ define([ this.$window.find('.resize-border').remove(); } this.resizable = resizable; + } else { + if (resizable) { + (minSize && minSize.length>1) && (this.initConfig.minwidth = minSize[0]); + (minSize && minSize.length>1) && (this.initConfig.minheight = minSize[1]); + (maxSize && maxSize.length>1) && (this.initConfig.maxwidth = maxSize[0]); + (maxSize && maxSize.length>1) && (this.initConfig.maxheight = maxSize[1]); + } } }, diff --git a/apps/spreadsheeteditor/main/app/view/AutoFilterDialog.js b/apps/spreadsheeteditor/main/app/view/AutoFilterDialog.js index 4cf0401c3..c01fb9108 100644 --- a/apps/spreadsheeteditor/main/app/view/AutoFilterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/AutoFilterDialog.js @@ -469,9 +469,11 @@ define([ SSE.Views.AutoFilterDialog = Common.UI.Window.extend(_.extend({ initialize: function (options) { + this.menuPanelWidth = 195; + var t = this, _options = {}, width = undefined, height = undefined; if (Common.Utils.InternalSettings.get('sse-settings-size-filter-window')) { - width = Common.Utils.InternalSettings.get('sse-settings-size-filter-window')[0]; + width = Common.Utils.InternalSettings.get('sse-settings-size-filter-window')[0] + this.menuPanelWidth; height = Common.Utils.InternalSettings.get('sse-settings-size-filter-window')[1]; } @@ -505,7 +507,7 @@ define([ '', '', '', - '
' @@ -685,6 +687,61 @@ define([ }); this.miReapply.on('click', _.bind(this.onReapply, this)); + this.miReapplySeparator = new Common.UI.MenuItem({ caption: '--' }); + + // pivot + this.miValueFilter = new Common.UI.MenuItem({ + caption : this.txtValueFilter, + toggleGroup : 'menufilterfilter', + checkable : true, + checked : false, + menu : new Common.UI.Menu({ + menuAlign: 'tl-tr', + items: [ + {value: Asc.c_oAscCustomAutoFilter.equals, caption: this.txtEquals, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivot: true}, + {value: Asc.c_oAscCustomAutoFilter.doesNotEqual, caption: this.txtNotEquals, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivot: true}, + {value: Asc.c_oAscCustomAutoFilter.isGreaterThan, caption: this.txtGreater, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivot: true}, + {value: Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo, caption: this.txtGreaterEquals,checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivot: true}, + {value: Asc.c_oAscCustomAutoFilter.isLessThan, caption: this.txtLess, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivot: true}, + {value: Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo, caption: this.txtLessEquals, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivot: true}, + {value: -2, caption: this.txtBetween, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivot: true}, + {value: Asc.c_oAscCustomAutoFilter.top10, caption: this.txtTop10, checkable: true, type: Asc.c_oAscAutoFilterTypes.Top10, pivot: true} + ] + }) + }); + var items = this.miNumFilter.menu.items; + for (var i=0; i