Job detail page now working. Form generator now supports 2 column layout and a status fields section.

This commit is contained in:
chouseknecht
2013-05-19 18:55:13 -04:00
parent f409db7778
commit 6b881a58bf
12 changed files with 537 additions and 69 deletions

View File

@@ -21,11 +21,15 @@ angular.module('JobTemplateHelper', [ 'RestServices', 'Utilities', 'CredentialFo
$('.password-field').each(function(index) {
pswd[$(this).attr('name')] = $(this).val();
});
console.log(pswd);
Rest.setUrl(start_url);
Rest.post(pswd)
.success( function(data) { alert('success!'); })
.error( function(data) { alert('fail!'); });
.success( function(data, status, headers, config) {
$location.path(GetBasPath('jobs'));
})
.error( function(data, status, headers, config) {
ProcessErrors(scope, data, status, null,
{ hdr: 'Error!', msg: 'Failed to start job. POST returned status: ' + status });
});
}
html += html += "<form class=\"form-horizontal\" name=\"password_form\" novalidate>\n";
@@ -75,7 +79,6 @@ angular.module('JobTemplateHelper', [ 'RestServices', 'Utilities', 'CredentialFo
html += "</div>\n";
}
html += "</form>\n";
console.log(html);
element = angular.element(document.getElementById('password-body'));
element.html(html);
$compile(element.contents())(scope);