Commit 675ef1fb authored by Julia Radzhabova's avatar Julia Radzhabova

Resize plugin window.

parent 520aa3ee
......@@ -73,6 +73,7 @@ define([
this.api.asc_registerCallback("asc_onPluginShow", _.bind(this.onPluginShow, this));
this.api.asc_registerCallback("asc_onPluginClose", _.bind(this.onPluginClose, this));
this.api.asc_registerCallback("asc_onPluginResize", _.bind(this.onPluginResize, this));
return this;
},
......@@ -233,6 +234,14 @@ define([
this.panelPlugins.closeInsideMode();
},
onPluginResize: function(width, height, callback) {
if (this.pluginDlg) {
this.pluginDlg.setInnerSize(width, height);
if (callback)
callback.call();
}
},
onDlgBtnClick: function(event) {
var state = event.currentTarget.attributes['result'].value;
this.api.asc_pluginButtonClick(parseInt(state));
......
......@@ -273,6 +273,15 @@ define([
}
},
setInnerSize: function(width, height) {
var $window = this.getChild();
var boxEl = $window.find('.body > .box');
boxEl.css('height', height);
Common.UI.Window.prototype.setHeight.call(this, height + 85);
Common.UI.Window.prototype.setWidth.call(this, width);
},
textLoading : 'Loading'
}, Common.Views.PluginDlg || {}));
});
\ No newline at end of file
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