bitbake: toastergui: base Use removeAttr / attr
Use removeAttr and attr calls to enable and disable the build button and build input field. (Bitbake rev: c3753948bd00c3498ca3e76cb218eb6cf423c3e3) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
be2b4239f6
commit
10ffe1b8cc
|
@ -62,7 +62,9 @@ function basePageInit(ctx) {
|
|||
libtoaster.makeTypeahead(newBuildTargetInput, selectedProject.projectTargetsUrl, { format: "json" }, function (item) {
|
||||
/* successfully selected a target */
|
||||
selectedTarget = item;
|
||||
});
|
||||
newBuildTargetBuildBtn.removeAttr("disabled");
|
||||
});
|
||||
}
|
||||
|
||||
newBuildTargetInput.on('input', function () {
|
||||
if ($(this).val().length === 0) {
|
||||
|
@ -105,8 +107,8 @@ function basePageInit(ctx) {
|
|||
$("#new-build-button .alert").hide();
|
||||
|
||||
/* we can build this project; enable input fields */
|
||||
newBuildTargetInput.prop("disabled", false);
|
||||
newBuildTargetBuildBtn.prop("disabled", false);
|
||||
newBuildTargetInput.removeAttr("disabled");
|
||||
newBuildTargetBuildBtn.removeAttr("disabled");
|
||||
}
|
||||
}, null);
|
||||
}
|
||||
|
@ -144,13 +146,13 @@ function basePageInit(ctx) {
|
|||
/* Update the typeahead project_id paramater */
|
||||
_checkProjectBuildable();
|
||||
|
||||
newBuildTargetInput.prop("disabled", false);
|
||||
newBuildTargetBuildBtn.prop("disabled", false);
|
||||
newBuildTargetInput.removeAttr("disabled");
|
||||
|
||||
/* Update the typeahead to use the new selectedProject */
|
||||
libtoaster.makeTypeahead(newBuildTargetInput, selectedProject.projectTargetsUrl, { format: "json" }, function (item) {
|
||||
/* successfully selected a target */
|
||||
selectedTarget = item;
|
||||
newBuildTargetBuildBtn.removeAttr("disabled");
|
||||
});
|
||||
|
||||
newBuildTargetInput.val("");
|
||||
|
|
Loading…
Reference in New Issue