isc.defineClass("GeWindow", "Window"); isc.GeWindow.addProperties({ isModal: true, showModalMask: true, autoCenter: true, autoDraw: false, autoSize: true, canDragReposition: true, showMinimizeButton: false, // Pane properties contentPane: null, buttonPaneProperties: null, optionPaneProperties: null, // Button properties approveButtonProperties: null, approveCallback: null, cancelButtonProperties: null, cancelCallback: null, // Override initWidget to populate the window layout with content and button pane initWidget : function () { this.Super("initWidget", arguments); // Create buttons var defaultApproveButtonProperties = { window: this, title: ge.message("speichern"), showRollOver: false, showDown: true, width: 120, height: 28, icon: "/img/icons/save.png", iconSize: 16, iconAlign: "left", prompt: ge.message("speichern"), hoverStyle: "toolTip", click: function() { return this.window.approve(); } }; var approveButton = isc.IButton.create( isc.addProperties({}, defaultApproveButtonProperties, this.approveButtonProperties)); var defaultCancelButtonProperties = { window: this, title: ge.message("schliessen"), showRollOver: false, showDown: true, width: 120, height: 28, icon: "/img/icons/close.png", iconSize: 16, iconAlign: "left", prompt: ge.message("schliessen"), hoverStyle: "toolTip", click: function() { return this.window.cancel(); } }; var cancelButton = isc.IButton.create( isc.addProperties({}, defaultCancelButtonProperties, this.cancelButtonProperties)); // Create Panes var contentPane = this.contentPane; if (!isc.isAn.Object(contentPane)) { contentPane = isc.Canvas.create({}); } var defaultButtonPaneProperties = { height:35, layoutMargin:10, membersMargin:10, align:"right", members:[approveButton, cancelButton] }; var buttonPane = isc.HStack.create( isc.addProperties({}, defaultButtonPaneProperties, this.buttonPaneProperties)); var defaultOptionPaneProperties = { width: "400", height: "200", overflow: "auto", members: [contentPane, buttonPane] }; var optionPane = isc.VLayout.create( isc.addProperties({}, defaultOptionPaneProperties, this.optionPaneProperties)); this.addItem(optionPane); } }); isc.GeWindow.addMethods({ approve: function () { var result = true; if (isc.isA.Function(this.approveCallback)) { result = this.approveCallback(); } if (result) { this.closeClick(); } return result; }, cancel: function () { var result = true; if (isc.isA.Function(this.cancelCallback)) { result = this.cancelCallback(); } if (result) { this.closeClick(); } return result; } });