[bitbake-devel] [PATCH 4/9] toaster: disable add layer button on click

Elliot Smith elliot.smith at intel.com
Mon Feb 22 09:08:35 UTC 2016


From: Belen Barros Pena <belen.barros.pena at intel.com>

The 'add layer' button in the project configuration page remains enabled
after you add a layer. If you click it again, the same layer you just
added is added again.

This patch disables the 'add layer' button on click, to avoid this bit
of weirdness.

[YOCTO #8905]

Signed-off-by: Belen Barros Pena <belen.barros.pena at intel.com>
Signed-off-by: Elliot Smith <elliot.smith at intel.com>
---
 lib/toaster/toastergui/static/js/projectpage.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/toaster/toastergui/static/js/projectpage.js b/lib/toaster/toastergui/static/js/projectpage.js
index 4a482d7..0666bde 100644
--- a/lib/toaster/toastergui/static/js/projectpage.js
+++ b/lib/toaster/toastergui/static/js/projectpage.js
@@ -116,6 +116,8 @@ function projectPageInit(ctx) {
     addRmLayer(layerObj, true);
     /* Reset the text input */
     layerAddInput.val("");
+    /* Disable the add layer button*/
+    layerAddBtn.attr("disabled", "disabled");
   });
 
   function addRmLayer(layerObj, add){
-- 
1.9.3

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.




More information about the bitbake-devel mailing list