2011-04-21 03:52:09 +00:00
|
|
|
@section TitleContent{
|
|
|
|
Settings
|
|
|
|
}
|
|
|
|
|
|
|
|
@section ActionMenu{
|
|
|
|
@{Html.RenderPartial("SubMenu");}
|
|
|
|
}
|
|
|
|
|
|
|
|
@section MainContent{
|
|
|
|
<script src="/Scripts/MicrosoftAjax.js" type="text/javascript"></script>
|
|
|
|
<script src="/Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script>
|
|
|
|
@{Html.RenderPartial(ViewData["viewName"].ToString());}
|
|
|
|
}
|
2011-06-30 05:22:34 +00:00
|
|
|
|
|
|
|
@section Scripts{
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function () {
|
|
|
|
var options = {
|
|
|
|
target: '#result',
|
|
|
|
beforeSubmit: showRequest,
|
|
|
|
success: showResponse,
|
|
|
|
type: 'post',
|
|
|
|
resetForm: false
|
|
|
|
};
|
|
|
|
$('#form').ajaxForm(options);
|
|
|
|
});
|
|
|
|
|
|
|
|
function showRequest(formData, jqForm, options) {
|
|
|
|
$("#result").empty().html('Saving...');
|
|
|
|
$("#form :input").attr("disabled", true);
|
|
|
|
$('#saveAjax').show();
|
|
|
|
}
|
|
|
|
|
|
|
|
function showResponse(responseText, statusText, xhr, $form) {
|
|
|
|
$("#result").empty().html(responseText);
|
|
|
|
$("#form :input").attr("disabled", false);
|
|
|
|
$('#saveAjax').hide();
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
}
|