1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

r21118: Looks a bit better ...

(This used to be commit e2d1f6d291602d56011c7099485ecd1a5767fca5)
This commit is contained in:
Simo Sorce 2007-02-01 23:53:27 +00:00 committed by Gerald (Jerry) Carter
parent 4da372c906
commit 11c9a98dc2

View File

@ -17,6 +17,7 @@ function(fsm)
this._mainArea = new qx.ui.layout.VerticalBoxLayout(); this._mainArea = new qx.ui.layout.VerticalBoxLayout();
this._mainArea.set({ this._mainArea.set({
overflow: "auto",
height: "1*", height: "1*",
spacing: 5 spacing: 5
}); });
@ -214,15 +215,19 @@ qx.Proto._addNewAttribute = function(name, value, before) {
hlayout.set({ width: "auto", height: "auto", spacing: 10 }); hlayout.set({ width: "auto", height: "auto", spacing: 10 });
var rButton = new qx.ui.form.Button("-"); var rButton = new qx.ui.form.Button("-");
rButton.set({ width: 15, height: 15});
rButton.addEventListener("execute", function() { rButton.addEventListener("execute", function() {
hlayout.setParent(null); hlayout.setParent(null);
}); });
var aLabel = new qx.ui.basic.Label(name); var aLabel = new qx.ui.basic.Label(name);
aLabel.setWidth(150);
var aTextField = new qx.ui.form.TextField(value); var aTextField = new qx.ui.form.TextField(value);
aTextField.setWidth(250);
var aButton = new qx.ui.form.Button("+"); var aButton = new qx.ui.form.Button("+");
aButton.set({ left: 5, width: 15, height: 15});
aButton.addEventListener("execute", function() { aButton.addEventListener("execute", function() {
this._addNewAttribute(name, null, hlayout); this._addNewAttribute(name, null, hlayout);
}, this); }, this);
@ -241,27 +246,34 @@ qx.Proto._createNewAttribute = function() {
var main = qx.ui.core.ClientDocument.getInstance(); var main = qx.ui.core.ClientDocument.getInstance();
var amw = new qx.ui.window.Window("New Attribute Name"); var amw = new qx.ui.window.Window("New Attribute Name");
amw.setSpace(100, 200, 100, 150); amw.set({
amw.setModal(true); width: 200,
amw.setShowMinimize(false); height: 70,
amw.setShowMaximize(false); modal: true,
amw.setShowClose(false); centered: true,
amw.setResizeable(false); restrictToPageOnOpen: true,
showMinimize: false,
showMaximize: false,
showClose: false,
resizeable: false
});
var hlayout = new qx.ui.layout.HorizontalBoxLayout();
hlayout.set({ width: "auto", height: "auto", spacing: 10 });
attrName = new qx.ui.form.TextField(); var attrName = new qx.ui.form.TextField();
attrName.addEventListener("execute", function() {
this._addNewAttribute(attrName.getValue());
amw.close();
}, this);
attrName.set({ top: 15, left: 10 });
amw.add(attrName);
var okButton = new qx.ui.form.Button("OK"); var okButton = new qx.ui.form.Button("OK");
okButton.addEventListener("execute", function() { okButton.addEventListener("execute", function() {
this._addNewAttribute(attrName.getValue()); this._addNewAttribute(attrName.getValue());
amw.close(); amw.close();
}, this); }, this);
okButton.set({ top: 12, left: 155 });
hlayout.add(attrName, okButton); amw.add(okButton);
amw.add(hlayout);
main.add(amw); main.add(amw);
@ -273,6 +285,7 @@ qx.Proto._createAttributesArea = function() {
this._attrArea = new qx.ui.layout.VerticalBoxLayout(); this._attrArea = new qx.ui.layout.VerticalBoxLayout();
this._attrAddButton = new qx.ui.form.Button("+"); this._attrAddButton = new qx.ui.form.Button("+");
this._attrAddButton.set({ width: 15, height: 15});
this._attrAddButton.addEventListener("execute", this._createNewAttribute, this); this._attrAddButton.addEventListener("execute", this._createNewAttribute, this);
this._attrArea.add(this._attrAddButton); this._attrArea.add(this._attrAddButton);