]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: Make "Edit columns" multiselect
authorBelen Barros <belen.barros.pena@intel.com>
Tue, 4 Feb 2014 15:23:10 +0000 (15:23 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 17 Feb 2014 15:38:26 +0000 (15:38 +0000)
Twitter Boostrap elements with the dropdown-menu class
close by default once a selection is performed. Such
behaviour is not appropriate for our "Edit columns" menu,
since users might want to check / uncheck several
columns.

This patch adds a call to the stopPropagation() jQuery
function to main.js to stop the "Edit columns" menu
from closing every time you change a checkbox.

Signed-off-by: Belen Barros <belen.barros.pena@intel.com>
lib/toaster/toastergui/static/js/main.js

index 032584d4e25918ca79de39fc9f9ba86617c18539..3710e59e92ba3828113d18d3285fc5303e2d407d 100644 (file)
@@ -15,6 +15,11 @@ $(document).ready(function() {
 
     /* Belen's additions */
 
+       // turn Edit columns dropdown into a multiselect menu
+       $('.dropdown-menu input, .dropdown-menu label').click(function(e) {
+               e.stopPropagation();
+       });
+
     // enable popovers in any table cells that contain an anchor with the
     // .btn class applied
        $('td > a.btn').popover({html:true, container:'body', placement:'left'});