Use redirectJSON

This commit is contained in:
Eelco Dolstra 2013-10-14 17:35:14 +02:00
parent c4e39d4769
commit 854d419b2c
2 changed files with 4 additions and 10 deletions

View file

@ -174,17 +174,14 @@
});
$("#submit-jobset").click(function() {
requestJSON({
redirectJSON({
[% IF create || clone %]
url: "[% c.uri_for('/jobset' project.name '.new') %]",
[% ELSE %]
url: "[% c.uri_for('/jobset' project.name jobset.name) %]",
[% END %]
data: $(this).parents("form").serialize(),
type: 'PUT',
success: function(data) {
window.location = data.redirect;
},
type: 'PUT'
});
return false;
});

View file

@ -66,17 +66,14 @@
<script type="text/javascript">
$("#submit-project").click(function() {
requestJSON({
redirectJSON({
[% IF create %]
url: "[% c.uri_for('/project' '.new') %]",
[% ELSE %]
url: "[% c.uri_for('/project' project.name) %]",
[% END %]
data: $(this).parents("form").serialize(),
type: 'PUT',
success: function(data) {
window.location = data.redirect;
},
type: 'PUT'
});
return false;
});