[oe-commits] [bitbake] 07/19: toaster: customrecipejs Consume click event on 'a' link if disabled

git at git.openembedded.org git at git.openembedded.org
Mon Nov 28 14:24:48 UTC 2016


rpurdie pushed a commit to branch master-next
in repository bitbake.

commit 91922119daa8b14b40d4a4c4690176267fc30e25
Author: Michael Wood <michael.g.wood at intel.com>
AuthorDate: Thu Nov 24 11:19:55 2016 +0000

    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 at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/toaster/toastergui/static/js/customrecipe.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/toaster/toastergui/static/js/customrecipe.js b/lib/toaster/toastergui/static/js/customrecipe.js
index 9ea9602..8b1c190 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();
+ });
 
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list