Skip to contentSkip to conversation

toaster: layerBtn avoid connecting handler to other build buttons

PATCH In review Michael Wood 3 participants 3 messages Jun 30, 2016 – Jul 4, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toaster: layerBtn avoid connecting handler to other build buttons

Some pages contain other build buttons which may have the same class attached. Make sure that we only select the buttons in the tables where layerBtn is used.

[YOCTO #9841]

---
 bitbake/lib/toaster/toastergui/static/js/layerBtn.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
bitbake/lib/toaster/toastergui/static/js/layerBtn.js +2 -2
index 259271d..9f9eda1 100644
@@ -55,8 +55,8 @@ function layerBtnsInit() {
     });
   });
 
-  $(".build-recipe-btn").unbind('click');
-  $(".build-recipe-btn").click(function(e){
+  $("td .build-recipe-btn").unbind('click');
+  $("td .build-recipe-btn").click(function(e){
     e.preventDefault();
     var recipe = $(this).data('recipe-name');
 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 5 lines · On 30/06/2016 18:19, "[email protected] on behalf of Michael…

Some pages contain other build buttons which may have the same class attached. Make sure that we only select the buttons in the tables where layerBtn is used.

[YOCTO #9841]

This works for me.

Thanks!

Belén

Quoted 30 lines

---
bitbake/lib/toaster/toastergui/static/js/layerBtn.js | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
bitbake/lib/toaster/toastergui/static/js/layerBtn.js +2 -2
index 259271d..9f9eda1 100644
@@ -55,8 +55,8 @@ function layerBtnsInit() {
    });
  });
 
-  $(".build-recipe-btn").unbind('click');
-  $(".build-recipe-btn").click(function(e){
+  $("td .build-recipe-btn").unbind('click');
+  $("td .build-recipe-btn").click(function(e){
    e.preventDefault();
    var recipe = $(this).data('recipe-name');
 
Signature · 7 lines
2.7.4

-- 
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster
#2 lore raw
Quoted 10 lines · Belen
Quoted 3 lines · On 30/06/2016 18:19, "[email protected] on behalf of Michael…

Some pages contain other build buttons which may have the same class attached. Make sure that we only select the buttons in the tables where layerBtn is used.

Upstreamed to bitbake-devel and pushed to toaster-next.

Thanks.
Elliot

Quoted 46 lines
Quoted 2 lines

[YOCTO #9841]

This works for me.

Thanks!

Belén

Quoted 25 lines

---
bitbake/lib/toaster/toastergui/static/js/layerBtn.js | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
bitbake/lib/toaster/toastergui/static/js/layerBtn.js +2 -3
index 259271d..9f9eda1 100644
@@ -55,8 +55,8 @@ function layerBtnsInit() {
    });
  });
 
-  $(".build-recipe-btn").unbind('click');
-  $(".build-recipe-btn").click(function(e){
+  $("td .build-recipe-btn").unbind('click');
+  $("td .build-recipe-btn").click(function(e){
    e.preventDefault();
    var recipe = $(this).data('recipe-name');
 
--

2.7.4

Quoted 5 lines

--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

Signature · 3 lines
Elliot Smith
Software Engineer
Intel Open Source Technology Centre