[bitbake-devel] [PATCH 16/22] bitbake: toastergui: base Use removeAttr / attr
Ed Bartosh
ed.bartosh at linux.intel.com
Fri Jul 31 12:09:17 UTC 2015
From: Michael Wood <michael.g.wood at intel.com>
Use removeAttr and attr calls to enable and disable the build button and
build input field.
Signed-off-by: Michael Wood <michael.g.wood at intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
lib/toaster/toastergui/static/js/base.js | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/lib/toaster/toastergui/static/js/base.js b/lib/toaster/toastergui/static/js/base.js
index 0fb1f8b..c99f8cd 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("");
--
2.1.4
More information about the bitbake-devel
mailing list