diff options
| author | Andrew MacBean <macbean@apache.org> | 2014-07-21 13:46:18 +0000 |
|---|---|---|
| committer | Andrew MacBean <macbean@apache.org> | 2014-07-21 13:46:18 +0000 |
| commit | 42f8cd66b05b7e0a7005c62ac4493c48b4b7b203 (patch) | |
| tree | d5b77f29b34c708546a50b9d23025c339ca72fc5 /qpid/java/bdbstore | |
| parent | 99c81b97860d64b476a40090231d823996db82a6 (diff) | |
| download | qpid-python-42f8cd66b05b7e0a7005c62ac4493c48b4b7b203.tar.gz | |
QPID-5413: [Java Broker] BDB HA VHN/VH UI text changes and improved JS validation add permitted nodes button
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1612269 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/bdbstore')
2 files changed, 7 insertions, 5 deletions
diff --git a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/newgroup/add.js b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/newgroup/add.js index d3578df60e..48a0677eb2 100644 --- a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/newgroup/add.js +++ b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/newgroup/add.js @@ -43,7 +43,7 @@ define(["dojo/_base/xhr", this.virtualHostNodeHelperAddress = registry.byId("addVirtualHostNode.helperAddress"); // add callback - virtualHostNodeAddress.on("change", function(address){that._addressChanged(address, that.virtualHostNodeHelperAddress);}); + virtualHostNodeAddress.on("change", function(address){that._changeAddress(address, that.virtualHostNodeHelperAddress);}); // list objects html node and dojo object this.addVirtualHostNodePermittedNodesList = dom.byId("addVirtualHostNode.permittedNodesList"); @@ -52,7 +52,7 @@ define(["dojo/_base/xhr", // permitted node text field this.addVirtualHostNodePermittedNode = registry.byId("addVirtualHostNode.permittedNode"); - this.addVirtualHostNodePermittedNode.on("input", function(event){that._inputPermittedNode(event);}); + this.addVirtualHostNodePermittedNode.on("change", function(value){that._changePermittedNode(value);}); // add and remove buttons & click handlers this.addVirtualHostNodePermittedNodeAddButton = registry.byId("addVirtualHostNode.permittedNodeAdd"); @@ -93,12 +93,13 @@ define(["dojo/_base/xhr", var hasSelection = this.addVirtualHostNodePermittedNodesListDojo.get("value").length > 0; this.addVirtualHostNodePermittedNodeRemoveButton.set("disabled", !hasSelection); }, - _inputPermittedNode: function(event) + _changePermittedNode: function(value) { - this.addVirtualHostNodePermittedNodeAddButton.set("disabled", false); + var fieldIsEmpty = (this.addVirtualHostNodePermittedNode.get("value") == ""); + this.addVirtualHostNodePermittedNodeAddButton.set("disabled", fieldIsEmpty); return true; }, - _addressChanged: function(address, virtualHostNodeHelperAddress) + _changeAddress: function(address, virtualHostNodeHelperAddress) { virtualHostNodeHelperAddress.set("value", address); }, diff --git a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html index f98e2d8616..d43ebbd064 100644 --- a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html +++ b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html @@ -101,6 +101,7 @@ name: 'permittedNode', placeHolder: 'host:port', title: 'Enter address', + intermediateChanges: true, pattern: '([0-9a-zA-Z.-_]|::)+:[0-9]{1,5}'" /> </div> <div class="formBoxButtons"> |
