Browse files

fixes #2824 allowed networks now works properly

  • Loading branch information...
1 parent 3cc0919 commit 257987bdfa3a796818fc92dc0db89e12b4e66b67 @VinceMacBuche VinceMacBuche committed Aug 28, 2012
View
13 ...cala/com/normation/rudder/web/snippet/administration/EditPolicyServerAllowedNetwork.scala
@@ -164,7 +164,7 @@ class EditPolicyServerAllowedNetwork extends DispatchSnippet with Loggable {
val id = "network_"+ i
(
- ".deleteNetwork" #> SHtml.ajaxButton("-", () => delete(i),("type","button")) &
+ ".deleteNetwork" #> SHtml.ajaxSubmit("-", () => delete(i)) &
"errorClass=error [id]" #> ("error" + id) &
".networkField [name]" #> id andThen
".networkField" #> SHtml.text(net, {x =>
@@ -173,9 +173,16 @@ class EditPolicyServerAllowedNetwork extends DispatchSnippet with Loggable {
)(xml)
}
} &
- "#addNetworkButton" #> SHtml.ajaxButton("Add a network", add _,("type","button")) &
+ "#addNetworkButton" #> SHtml.ajaxSubmit("Add a network", add _) &
"#submitAllowedNetwork" #> {
- SHtml.ajaxSubmit("Submit", process _) ++ Script(OnLoad(JsRaw(""" correctButtons(); """)))
+ SHtml.ajaxSubmit("Submit", process _,("id","submitAllowedNetwork")) ++ Script(
+ OnLoad (
+ JsRaw(""" correctButtons(); """) &
+ JsRaw("""$(".networkField").keydown( function(event) {
+ processKey(event , 'submitAllowedNetwork')
+ } );
+ """)
+ ) )
}
}
View
4 rudder-web/src/main/webapp/secure/administration/policyServerManagement.html
@@ -7,11 +7,11 @@
.deca input {
width: 180px;
}
- .deca button {
+ .deca input {
width: 180px;
}
- .deca button.deleteNetwork {
+ .deca input.deleteNetwork {
width: 20px;
}
</style>
View
2 rudder-web/src/main/webapp/style/rudder.css
@@ -314,7 +314,7 @@ form input.removeLineButton {
width:18px !important;
}
-button.deleteNetwork * {
+input.deleteNetwork * {
padding: 0 !important;
}
#lift__noticesContainer___notice ul {

0 comments on commit 257987b

Please sign in to comment.