aboutsummaryrefslogtreecommitdiffstats
path: root/lib/toaster/toastergui
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-11-24 11:19:55 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-30 15:47:46 +0000
commitbc8401e78cea140349bded228d38f72f628b3980 (patch)
tree5e5627dafdea97ee238b21b85a7a00d0780529d0 /lib/toaster/toastergui
parent1a7c356491b88c8decced39fb2039ef90065f2d2 (diff)
downloadbitbake-contrib-bc8401e78cea140349bded228d38f72f628b3980.tar.gz
toaster: customrecipejs Consume click event on 'a' link if disabled
Consume the click event on the download recipe link if it's disabled. To prevent the link from sending user to an error page. See http://getbootstrap.com/css/#forms-disabled-fieldsets and a link caveat. [YOCTO #10151] Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster/toastergui')
-rw-r--r--lib/toaster/toastergui/static/js/customrecipe.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/toaster/toastergui/static/js/customrecipe.js b/lib/toaster/toastergui/static/js/customrecipe.js
index 9ea960288..8b1c190df 100644
--- a/lib/toaster/toastergui/static/js/customrecipe.js
+++ b/lib/toaster/toastergui/static/js/customrecipe.js
@@ -312,5 +312,11 @@ function customRecipePageInit(ctx) {
});
});
+ /* Stop the download link from working if it is in disabled state
+ * http://getbootstrap.com/css/#forms-disabled-fieldsets
+ */
+ $("a[disabled=disabled]").click(function(e){
+ e.preventDefault();
+ });
}