var ah = Ext.lib.Dom.getViewHeight();
var c = 0;
- if (w > 200 && this.originalWidth === 0)
- this.originalWidth = w;
- else if (resize && this.originalWidth) {
+ if (resize && this.originalWidth) {
w = this.originalWidth;
c = 1;
}
- if (h > 100 && this.originalHeight === 0)
- this.originalHeight = h;
- else if (resize && this.originalHeight) {
+ if (resize && this.originalHeight) {
h = this.originalHeight;
c = 1;
}
this.center();
} else if (resize) {
this.center();
+ } else {
+ return false;
}
+ return true;
+ },
+
+ setOriginSize : function(force) {
+ var w = this.getWidth();
+ var h = this.getHeight();
+ if (w > 200 && (force || this.originalWidth === 0))
+ this.originalWidth = w;
+ if (h > 100 && (force || this.originalHeight === 0))
+ this.originalHeight = h;
+ if (force && this.keepItVisible() === false)
+ this.center();
},
onShow : function() {
+ this.setOriginSize(false);
this.keepItVisible();
},
/* Buttons */
if (!conf.noButtons) {
+ if (conf.cancel) {
+ var cancelBtn = new Ext.Button({
+ text: _('Cancel'),
+ iconCls: 'cancel',
+ handler: conf.cancel
+ });
+ buttons.push(cancelBtn);
+ }
+
var saveBtn = new Ext.Button({
text: _('Save'),
iconCls: 'save',
});
buttons.push(saveBtn);
- if (conf.cancel) {
- var cancelBtn = new Ext.Button({
- text: _('Cancel'),
- iconCls: 'cancel',
- handler: conf.cancel
- });
- buttons.push(cancelBtn);
- }
-
if (conf.help) {
var helpBtn = new Ext.Button({
text: _('Help'),
{
var puuid = null;
var panel = null;
+ var win = null;
var pclass = null;
/* Buttons */
panel.remove(s);
tvheadend.idnode_editor_form(d, null, panel, { create: true, showpwd: true });
saveBtn.setVisible(true);
+ win.setOriginSize(true);
}
}
};
d = json_decode(d);
tvheadend.idnode_editor_form(d.props, d, panel, { create: true, showpwd: true });
saveBtn.setVisible(true);
+ win.setOriginSize(true);
}
});
};