Skip to content

Commit

Permalink
Redirect to project and issue after creating task
Browse files Browse the repository at this point in the history
  • Loading branch information
gorkalaucirica committed Apr 24, 2015
1 parent 7656d38 commit 7480646
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Kreta/Bundle/WebBundle/Resources/public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ $(() => {

App.currentUser.fetch();

new Router();
App.router = new Router();
new HeaderView();

App.views.main = new MainContentView();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import {IssueShowView} from '../views/page/issue/show';
import {CreateIssueView} from 'views/main/createIssue';
import {CreateIssueView} from '../views/page/issue/new';

export class IssueController extends Backbone.Controller {
initialize() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,11 @@ export class CreateIssueView extends Backbone.View {
formData[this.name] = this.value;
});

var projectId = formData['project'];

var issue = new Issue(formData);
issue.save(null, {success: function(model) {
App.router.navigate('/project/' + projectId, true);
App.router.navigate('/issue/' + model.get('id'), true);
}});
}
Expand Down

0 comments on commit 7480646

Please sign in to comment.