aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2015-07-31 15:09:17 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-01 11:24:55 +0100
commitc3753948bd00c3498ca3e76cb218eb6cf423c3e3 (patch)
treed8eb679b39792e45502985749d1fd65c38bd60c4 /lib
parentbdea86ae8720ee5792a5617c6073d51922a224ff (diff)
downloadbitbake-c3753948bd00c3498ca3e76cb218eb6cf423c3e3.tar.gz
toastergui: base Use removeAttr / attr
Use removeAttr and attr calls to enable and disable the build button and build input field. 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>
Diffstat (limited to 'lib')
-rw-r--r--lib/toaster/toastergui/static/js/base.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/toaster/toastergui/static/js/base.js b/lib/toaster/toastergui/static/js/base.js
index 0fb1f8b6b..c99f8cdc5 100644
--- a/lib/toaster/toastergui/static/js/base.js
+++ b/lib/toaster/toastergui/static/js/base.js
@@ -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("");