diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js/projecttopbar.js')
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/projecttopbar.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js b/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js index 69220aaf57..3f9e186708 100644 --- a/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js +++ b/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js | |||
@@ -14,6 +14,9 @@ function projectTopBarInit(ctx) { | |||
14 | var newBuildTargetBuildBtn = $("#build-button"); | 14 | var newBuildTargetBuildBtn = $("#build-button"); |
15 | var selectedTarget; | 15 | var selectedTarget; |
16 | 16 | ||
17 | var updateProjectBtn = $("#update-project-button"); | ||
18 | var cancelProjectBtn = $("#cancel-project-button"); | ||
19 | |||
17 | /* Project name change functionality */ | 20 | /* Project name change functionality */ |
18 | projectNameFormToggle.click(function(e){ | 21 | projectNameFormToggle.click(function(e){ |
19 | e.preventDefault(); | 22 | e.preventDefault(); |
@@ -89,6 +92,25 @@ function projectTopBarInit(ctx) { | |||
89 | }, null); | 92 | }, null); |
90 | }); | 93 | }); |
91 | 94 | ||
95 | updateProjectBtn.click(function (e) { | ||
96 | e.preventDefault(); | ||
97 | |||
98 | selectedTarget = { name: "_PROJECT_PREPARE_" }; | ||
99 | |||
100 | /* Save current default build image, fire off the build */ | ||
101 | libtoaster.updateProject(null, selectedTarget.name, newBuildTargetInput.val().trim(), | ||
102 | function(){ | ||
103 | window.location.replace(libtoaster.ctx.projectSpecificPageUrl); | ||
104 | }, null); | ||
105 | }); | ||
106 | |||
107 | cancelProjectBtn.click(function (e) { | ||
108 | e.preventDefault(); | ||
109 | |||
110 | /* redirect to 'done/canceled' landing page */ | ||
111 | window.location.replace(libtoaster.ctx.landingSpecificCancelURL); | ||
112 | }); | ||
113 | |||
92 | /* Call makeProjectNameValidation function */ | 114 | /* Call makeProjectNameValidation function */ |
93 | libtoaster.makeProjectNameValidation($("#project-name-change-input"), | 115 | libtoaster.makeProjectNameValidation($("#project-name-change-input"), |
94 | $("#hint-error-project-name"), $("#validate-project-name"), | 116 | $("#hint-error-project-name"), $("#validate-project-name"), |