diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js index 04c2aca10..01dbba4b5 100644 --- a/apps/common/main/lib/controller/Plugins.js +++ b/apps/common/main/lib/controller/Plugins.js @@ -228,7 +228,7 @@ define([ arrBtns = variation.get_Buttons(), newBtns = {}, size = variation.get_Size(); - if (!size || size.length<2) size = [400, 400]; + if (!size || size.length<2) size = [800, 600]; if (_.isArray(arrBtns)) { _.each(arrBtns, function(b, index){ diff --git a/apps/common/main/lib/model/Plugin.js b/apps/common/main/lib/model/Plugin.js index 4a0841769..c4d47830b 100644 --- a/apps/common/main/lib/model/Plugin.js +++ b/apps/common/main/lib/model/Plugin.js @@ -64,7 +64,7 @@ define([ initData: "", isUpdateOleOnResize: false, buttons: [], - size: [400, 400], + size: [800, 600], maximumSize: [], minimumSize: [] } diff --git a/apps/common/main/lib/view/Plugins.js b/apps/common/main/lib/view/Plugins.js index 809dbdf70..cc99f6115 100644 --- a/apps/common/main/lib/view/Plugins.js +++ b/apps/common/main/lib/view/Plugins.js @@ -252,24 +252,23 @@ define([ setInnerSize: function(width, height) { var maxHeight = parseInt(window.innerHeight), maxWidth = parseInt(window.innerWidth), - header_footer = (this.options.buttons && _.size(this.options.buttons)>0) ? 85 : 34; - if (maxHeight0) ? 85 : 34, + borders_height = (parseInt(this.$window.css('border-top-width')) + parseInt(this.$window.css('border-bottom-width'))), + borders_width = (parseInt(this.$window.css('border-left-width')) + parseInt(this.$window.css('border-right-width'))); + if (maxHeight .box'); boxEl.css('height', height); - Common.UI.Window.prototype.setHeight.call(this, height + header_footer); - Common.UI.Window.prototype.setWidth.call(this, width); + Common.UI.Window.prototype.setHeight.call(this, height + header_footer + borders_height); + Common.UI.Window.prototype.setWidth.call(this, width + borders_width); - var top = ((maxHeight - height - header_footer) / 2) * 0.9; - var left = (maxWidth - width) / 2; - - this.$window.css('left',(maxWidth - width) / 2); - this.$window.css('top',((maxHeight - height - header_footer) / 2) * 0.9); + this.$window.css('left',(maxWidth - width - borders_width) / 2); + this.$window.css('top',((maxHeight - height - header_footer - borders_height) / 2) * 0.9); }, textLoading : 'Loading'