Skip to content

Commit

Permalink
Merge pull request #352 from s-sab/master
Browse files Browse the repository at this point in the history
Fixed 'Restart when no job is running' button. Resolve issue HUDSON-9025.
  • Loading branch information
wjprakash committed Feb 6, 2012
2 parents 6943a59 + 580e263 commit 1628d81
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 28 deletions.
Expand Up @@ -103,12 +103,14 @@ THE SOFTWARE.

<j:if test="${it.isPluginUploaded()}">
<div style="margin: 1em; height: 1em">
<div class="error">
${%New plugins will take effect once you restart Hudson}
<j:if test="${app.lifecycle.canRestart()}">
<s:submit value="${%Restart Once No Jobs Are Running}" />
</j:if>
</div>
<form method="post" action="${rootURL}/safeRestart">
<div class="error">
${%New plugins will take effect once you restart Hudson}
<j:if test="${app.lifecycle.canRestart()}">
<s:submit value="${%Restart Once No Jobs Are Running}" />
</j:if>
</div>
</form>
</div>
</j:if>
<div class="warning" id="needRestart" style="display:none; margin: 1em; height: 1em">
Expand Down
Expand Up @@ -61,22 +61,6 @@ THE SOFTWARE.
<input style="margin-left:10px; width:75px" type="button" id="cancelButton" value="${%Cancel}" />

</form>
<style type="text/css">
#loginError, #loginMsg {
opacity:0;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
text-align:center;
font-weight:bold;
}
#loginError {
color: red;
}
#loginMsg {
color: black;
}
</style>

<div id="loginError">
${%Invalid login information. Please try again.}
</div>
Expand Down
Expand Up @@ -45,11 +45,13 @@ THE SOFTWARE.
title: 'Confirmation'
});
jQuery('j_username').focus();
jQuery('#loginMsg').hide();
jQuery('#loginError').hide();
}

function submitForm(){
jQuery('#loginMsg').css({ opacity: 1.0 });
jQuery('#loginError').css({ opacity: 0.0 });
jQuery('#loginMsg').show();
jQuery('#loginError').hide();
var dataString = jQuery("#loginForm").serialize();
jQuery.ajax({
type: 'POST',
Expand All @@ -59,8 +61,8 @@ THE SOFTWARE.
window.location.href="${from}";
},
error: function(){
jQuery('#loginError').css({ opacity: 1.0 });
jQuery('#loginMsg').css({ opacity: 0.0 });
jQuery('#loginError').show();
jQuery('#loginMsg').hide();
},
dataType: "html"
});
Expand Down Expand Up @@ -90,8 +92,8 @@ THE SOFTWARE.
jQuery.unblockUI();
jQuery('#j_username').attr({value:""});
jQuery('#j_password').attr({value:""});
jQuery('#loginError').css({ opacity: 0.0 });
jQuery('#loginMsg').css({ opacity: 0.0 });
jQuery('#loginError').hide();
jQuery('#loginMsg').hide();
return false;
});

Expand Down
13 changes: 13 additions & 0 deletions hudson-war/src/main/webapp/css/style.css
Expand Up @@ -1073,3 +1073,16 @@ table.configure > td {
border-collapse: collapse;
width: 450px;
}
/* === Login Dialog ==== */
#loginError, #loginMsg {
text-align:center;
font-weight:bold;
}
#loginError {
color: red;
display: none;
}
#loginMsg {
color: black;
display: none;
}

0 comments on commit 1628d81

Please sign in to comment.