Plugin Developer Discussion

Discussion for FogBugz Plugin developers

Select All in tables

Is there a way to use/access the javascript used in the "Select all" features already found in some of the FB grids? I'd rather not roll my own if i don't have to.
tracstarr Send private email
Wednesday, January 13, 2010
 
 
I wouldn't depend on that Javascript to exist without changes - it is not formally part of the FogBugz API, and we can't guarantee that it will stay the same. However, you can be assured that jQuery will be present in FogBugz by default for the forseeable future, and 'select all' should be fairly straightforward in jQuery. (http://jetlogs.org/jquery/jquery_select_all.html)
Brett Kiefer Send private email
Wednesday, January 13, 2010
 
 
thanks, i actually tried that exact example using jquery, but couldn't get it to work. I'll have to play with it some more.
tracstarr Send private email
Wednesday, January 13, 2010
 
 
well, looks like i had been using code that no longer worked in the latest jquery version. Here is what I ended up using - in case anyone else is trying the same. Obviously you need to change id names as necessary:

$(document).ready(function() {
    $("input#interval_All").click(function() {
        if ($(this).attr('checked') == true) {
            $(':checkbox:not(this)').attr('checked', true);
        }
        else {
            $(':checkbox:not(this)').attr('checked', false);
        }
    });
});
tracstarr Send private email
Monday, January 25, 2010
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz