summaryrefslogtreecommitdiffstats
path: root/bitbake
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:26:12 +0100
commit10ffe1b8cc1fad3fb093fcf127b530011ecd3de4 (patch)
treecfe7c3080f5b9a97519d2826bf6d645e7f63685b /bitbake
parentbe2b4239f688e9ab747c48a1fbb2b1233d97689c (diff)
downloadpoky-10ffe1b8cc1fad3fb093fcf127b530011ecd3de4.tar.gz
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>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/base.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/base.js b/bitbake/lib/toaster/toastergui/static/js/base.js
index 0fb1f8b6bf..c99f8cdc54 100644
--- a/bitbake/lib/toaster/toastergui/static/js/base.js
+++ b/bitbake/lib/toaster/toastergui/static/js/base.js
@@ -62,7 +62,9 @@ function basePageInit(ctx) {
62 libtoaster.makeTypeahead(newBuildTargetInput, selectedProject.projectTargetsUrl, { format: "json" }, function (item) { 62 libtoaster.makeTypeahead(newBuildTargetInput, selectedProject.projectTargetsUrl, { format: "json" }, function (item) {
63 /* successfully selected a target */ 63 /* successfully selected a target */
64 selectedTarget = item; 64 selectedTarget = item;
65 }); 65 newBuildTargetBuildBtn.removeAttr("disabled");
66 });
67 }
66 68
67 newBuildTargetInput.on('input', function () { 69 newBuildTargetInput.on('input', function () {
68 if ($(this).val().length === 0) { 70 if ($(this).val().length === 0) {
@@ -105,8 +107,8 @@ function basePageInit(ctx) {
105 $("#new-build-button .alert").hide(); 107 $("#new-build-button .alert").hide();
106 108
107 /* we can build this project; enable input fields */ 109 /* we can build this project; enable input fields */
108 newBuildTargetInput.prop("disabled", false); 110 newBuildTargetInput.removeAttr("disabled");
109 newBuildTargetBuildBtn.prop("disabled", false); 111 newBuildTargetBuildBtn.removeAttr("disabled");
110 } 112 }
111 }, null); 113 }, null);
112 } 114 }
@@ -144,13 +146,13 @@ function basePageInit(ctx) {
144 /* Update the typeahead project_id paramater */ 146 /* Update the typeahead project_id paramater */
145 _checkProjectBuildable(); 147 _checkProjectBuildable();
146 148
147 newBuildTargetInput.prop("disabled", false); 149 newBuildTargetInput.removeAttr("disabled");
148 newBuildTargetBuildBtn.prop("disabled", false);
149 150
150 /* Update the typeahead to use the new selectedProject */ 151 /* Update the typeahead to use the new selectedProject */
151 libtoaster.makeTypeahead(newBuildTargetInput, selectedProject.projectTargetsUrl, { format: "json" }, function (item) { 152 libtoaster.makeTypeahead(newBuildTargetInput, selectedProject.projectTargetsUrl, { format: "json" }, function (item) {
152 /* successfully selected a target */ 153 /* successfully selected a target */
153 selectedTarget = item; 154 selectedTarget = item;
155 newBuildTargetBuildBtn.removeAttr("disabled");
154 }); 156 });
155 157
156 newBuildTargetInput.val(""); 158 newBuildTargetInput.val("");