Navigation Menu

Skip to content

Commit

Permalink
fixes #2824 allowed networks now works properly
Browse files Browse the repository at this point in the history
  • Loading branch information
VinceMacBuche committed Aug 28, 2012
1 parent 3cc0919 commit 257987b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
Expand Up @@ -164,7 +164,7 @@ class EditPolicyServerAllowedNetwork extends DispatchSnippet with Loggable {
val id = "network_"+ i val id = "network_"+ i


( (
".deleteNetwork" #> SHtml.ajaxButton("-", () => delete(i),("type","button")) & ".deleteNetwork" #> SHtml.ajaxSubmit("-", () => delete(i)) &
"errorClass=error [id]" #> ("error" + id) & "errorClass=error [id]" #> ("error" + id) &
".networkField [name]" #> id andThen ".networkField [name]" #> id andThen
".networkField" #> SHtml.text(net, {x => ".networkField" #> SHtml.text(net, {x =>
Expand All @@ -173,9 +173,16 @@ class EditPolicyServerAllowedNetwork extends DispatchSnippet with Loggable {
)(xml) )(xml)
} }
} & } &
"#addNetworkButton" #> SHtml.ajaxButton("Add a network", add _,("type","button")) & "#addNetworkButton" #> SHtml.ajaxSubmit("Add a network", add _) &
"#submitAllowedNetwork" #> { "#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')
} );
""")
) )
} }
} }


Expand Down
Expand Up @@ -7,11 +7,11 @@
.deca input { .deca input {
width: 180px; width: 180px;
} }
.deca button { .deca input {
width: 180px; width: 180px;
} }


.deca button.deleteNetwork { .deca input.deleteNetwork {
width: 20px; width: 20px;
} }
</style> </style>
Expand Down
2 changes: 1 addition & 1 deletion rudder-web/src/main/webapp/style/rudder.css
Expand Up @@ -314,7 +314,7 @@ form input.removeLineButton {
width:18px !important; width:18px !important;
} }


button.deleteNetwork * { input.deleteNetwork * {
padding: 0 !important; padding: 0 !important;
} }
#lift__noticesContainer___notice ul { #lift__noticesContainer___notice ul {
Expand Down

0 comments on commit 257987b

Please sign in to comment.