|
1 | 1 | ({ |
2 | 2 | init: function () { |
3 | 3 | if (AVAIL("tt", "issue", "POST") && modules.tt.menuItem) { |
4 | | - $("#" + leftSideClick("far fa-fw fa-plus-square", i18n("tt.createIssue"), "tt", () => { |
5 | | - modules.tt.createIssue.createIssue($("#ttProjectSelect").val()); |
6 | | - })).after($("#" + modules.tt.menuItem)); |
| 4 | + $("#" + leftSide("far fa-fw fa-plus-square", i18n("tt.createIssue"), navigateUrl("tt.createIssue", false, { exclude: [ "_" ]}), "tt")). |
| 5 | + after($("#" + modules.tt.menuItem)); |
7 | 6 | } |
8 | 7 | moduleLoaded("tt.createIssue", this); |
9 | 8 | }, |
|
194 | 193 | navigateUrl("tt.createIssue", { project: result.project, workflow: result.workflow, catalog: result.catalog, parent: !!parent ? parent["issueId"] : false }, { run: true }); |
195 | 194 | // modules.tt.createIssueForm(result.project, result.workflow, result.catalog, (!!parent) ? encodeURIComponent(parent["issueId"]) : ""); |
196 | 195 | }, |
| 196 | + cancel: () => { |
| 197 | + window.history.back(); |
| 198 | + } |
197 | 199 | }); |
198 | 200 | }, |
199 | 201 |
|
|
360 | 362 | GET("tt", "tt", false, true). |
361 | 363 | done(modules.tt.tt). |
362 | 364 | done(() => { |
363 | | - modules.tt.createIssue.createIssueForm(params.project, params.workflow, params.catalog, params.parent); |
| 365 | + if (params.project && params.workflow) { |
| 366 | + modules.tt.createIssue.createIssueForm(params.project, params.workflow, params.catalog, params.parent); |
| 367 | + } else { |
| 368 | + loadingDone(); |
| 369 | + modules.tt.createIssue.createIssue($("#ttProjectSelect").val() ? $("#ttProjectSelect").val() : lStore("ttProject")); |
| 370 | + } |
364 | 371 | }). |
365 | 372 | fail(FAIL). |
366 | 373 | fail(loadingDone); |
|
0 commit comments