]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: disable add layer button on click
authorBelen Barros Pena <belen.barros.pena@intel.com>
Mon, 22 Feb 2016 09:08:35 +0000 (09:08 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 26 Feb 2016 17:17:24 +0000 (17:17 +0000)
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@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/toaster/toastergui/static/js/projectpage.js

index 4a482d78cae88416342c46f15fd21b4038997985..0666bde907f6a4c4ed94b629999f470f4819f149 100644 (file)
@@ -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){