Fix menu show in dialogs
This commit is contained in:
parent
3e352d5c80
commit
4ea5c2522e
|
@ -594,7 +594,7 @@ define([
|
|||
Common.UI.BaseView.prototype.initialize.call(this, this.initConfig);
|
||||
},
|
||||
|
||||
render : function() {
|
||||
render: function() {
|
||||
var renderto = this.initConfig.renderTo || document.body;
|
||||
$(renderto).append(
|
||||
_.template(template)(this.initConfig)
|
||||
|
@ -651,6 +651,22 @@ define([
|
|||
|
||||
this.initConfig.footerCls && this.$window.find('.footer').addClass(this.initConfig.footerCls);
|
||||
|
||||
this.menuAddAlign = function(menuRoot, left, top) {
|
||||
var self = this;
|
||||
if (!me.$window.hasClass('notransform')) {
|
||||
me.$window.addClass('notransform');
|
||||
menuRoot.addClass('hidden');
|
||||
setTimeout(function() {
|
||||
menuRoot.removeClass('hidden');
|
||||
menuRoot.css({left: left, top: top});
|
||||
self.options.additionalAlign = null;
|
||||
}, 300);
|
||||
} else {
|
||||
menuRoot.css({left: left, top: top});
|
||||
self.options.additionalAlign = null;
|
||||
}
|
||||
};
|
||||
|
||||
this.fireEvent('render:after',this);
|
||||
return this;
|
||||
},
|
||||
|
|
|
@ -107,22 +107,6 @@ define([
|
|||
this.content_panels = $window.find('.settings-panel');
|
||||
if (this.btnsCategory.length>0)
|
||||
this.btnsCategory[0].toggle(true, true);
|
||||
|
||||
me.menuAddAlign = function(menuRoot, left, top) {
|
||||
var self = this;
|
||||
if (!$window.hasClass('notransform')) {
|
||||
$window.addClass('notransform');
|
||||
menuRoot.addClass('hidden');
|
||||
setTimeout(function() {
|
||||
menuRoot.removeClass('hidden');
|
||||
menuRoot.css({left: left, top: top});
|
||||
self.options.additionalAlign = null;
|
||||
}, 300);
|
||||
} else {
|
||||
menuRoot.css({left: left, top: top});
|
||||
self.options.additionalAlign = null;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
setHeight: function(height) {
|
||||
|
|
|
@ -103,22 +103,6 @@ define([
|
|||
$window = this.getChild();
|
||||
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
|
||||
|
||||
this.menuAddAlign = function(menuRoot, left, top) {
|
||||
var self = this;
|
||||
if (!$window.hasClass('notransform')) {
|
||||
$window.addClass('notransform');
|
||||
menuRoot.addClass('hidden');
|
||||
setTimeout(function() {
|
||||
menuRoot.removeClass('hidden');
|
||||
menuRoot.css({left: left, top: top});
|
||||
self.options.additionalAlign = null;
|
||||
}, 300);
|
||||
} else {
|
||||
menuRoot.css({left: left, top: top});
|
||||
self.options.additionalAlign = null;
|
||||
}
|
||||
};
|
||||
|
||||
this.spnSize = new Common.UI.MetricSpinner({
|
||||
el : $window.find('#id-dlg-list-size'),
|
||||
step : 1,
|
||||
|
|
|
@ -154,22 +154,6 @@ define([
|
|||
$window = this.getChild();
|
||||
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
|
||||
|
||||
this.menuAddAlign = function(menuRoot, left, top) {
|
||||
var self = this;
|
||||
if (!$window.hasClass('notransform')) {
|
||||
$window.addClass('notransform');
|
||||
menuRoot.addClass('hidden');
|
||||
setTimeout(function() {
|
||||
menuRoot.removeClass('hidden');
|
||||
menuRoot.css({left: left, top: top});
|
||||
self.options.additionalAlign = null;
|
||||
}, 300);
|
||||
} else {
|
||||
menuRoot.css({left: left, top: top});
|
||||
self.options.additionalAlign = null;
|
||||
}
|
||||
};
|
||||
|
||||
this.btnColor = new Common.UI.ColorButton({
|
||||
style: 'width:45px;',
|
||||
menu : new Common.UI.Menu({
|
||||
|
|
|
@ -475,6 +475,7 @@ define([
|
|||
panel.btnPresetsTop.setMenu(new Common.UI.Menu({
|
||||
style: 'min-width: 100px;',
|
||||
maxHeight: 200,
|
||||
additionalAlign: panel.menuAddAlign,
|
||||
items: data
|
||||
}));
|
||||
data = ((selectdata) ? [{caption: this.textSelectRange + '...', value: 'select'}] : []).concat([
|
||||
|
@ -486,6 +487,7 @@ define([
|
|||
panel.btnPresetsLeft.setMenu(new Common.UI.Menu({
|
||||
style: 'min-width: 100px;',
|
||||
maxHeight: 200,
|
||||
additionalAlign: panel.menuAddAlign,
|
||||
items: data
|
||||
}));
|
||||
},
|
||||
|
@ -495,6 +497,9 @@ define([
|
|||
if (item.value == 'select') {
|
||||
var me = this;
|
||||
if (me.api) {
|
||||
panel.btnPresetsTop.menu.options.additionalAlign = panel.menuAddAlign;
|
||||
panel.btnPresetsLeft.menu.options.additionalAlign = panel.menuAddAlign;
|
||||
|
||||
var handlerDlg = function(dlg, result) {
|
||||
if (result == 'ok') {
|
||||
var valid = dlg.getSettings();
|
||||
|
|
|
@ -1512,6 +1512,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
|||
onSelectData: function() {
|
||||
var me = this;
|
||||
if (me.api) {
|
||||
me.btnChartType.menu.options.additionalAlign = me.menuAddAlign;
|
||||
me.btnSparkType.menu.options.additionalAlign = me.menuAddAlign;
|
||||
|
||||
var handlerDlg = function(dlg, result) {
|
||||
if (result == 'ok') {
|
||||
me.dataRangeValid = dlg.getSettings();
|
||||
|
|
|
@ -163,22 +163,6 @@ define([
|
|||
render: function() {
|
||||
Common.UI.Window.prototype.render.call(this);
|
||||
|
||||
this.menuAddAlign = function(menuRoot, left, top) {
|
||||
var self = this;
|
||||
if (!$window.hasClass('notransform')) {
|
||||
$window.addClass('notransform');
|
||||
menuRoot.addClass('hidden');
|
||||
setTimeout(function() {
|
||||
menuRoot.removeClass('hidden');
|
||||
menuRoot.css({left: left, top: top});
|
||||
self.options.additionalAlign = null;
|
||||
}, 300);
|
||||
} else {
|
||||
menuRoot.css({left: left, top: top});
|
||||
self.options.additionalAlign = null;
|
||||
}
|
||||
};
|
||||
|
||||
var me = this,
|
||||
$window = this.getChild();
|
||||
|
||||
|
|
|
@ -104,21 +104,6 @@ define([
|
|||
Common.UI.Window.prototype.render.call(this);
|
||||
|
||||
var me = this;
|
||||
this.menuAddAlign = function(menuRoot, left, top) {
|
||||
var self = this;
|
||||
if (!$window.hasClass('notransform')) {
|
||||
$window.addClass('notransform');
|
||||
menuRoot.addClass('hidden');
|
||||
setTimeout(function() {
|
||||
menuRoot.removeClass('hidden');
|
||||
menuRoot.css({left: left, top: top});
|
||||
self.options.additionalAlign = null;
|
||||
}, 300);
|
||||
} else {
|
||||
menuRoot.css({left: left, top: top});
|
||||
self.options.additionalAlign = null;
|
||||
}
|
||||
};
|
||||
|
||||
this.txtRangeTop = new Common.UI.InputFieldBtn({
|
||||
el : $('#print-titles-txt-top'),
|
||||
|
@ -256,6 +241,9 @@ define([
|
|||
if (item.value == 'select') {
|
||||
var me = this;
|
||||
if (me.api) {
|
||||
me.btnPresetsTop.menu.options.additionalAlign = me.menuAddAlign;
|
||||
me.btnPresetsLeft.menu.options.additionalAlign = me.menuAddAlign;
|
||||
|
||||
var handlerDlg = function(dlg, result) {
|
||||
if (result == 'ok') {
|
||||
var valid = dlg.getSettings();
|
||||
|
|
Loading…
Reference in a new issue