To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / vendor / plugins / redmine_tags / assets / javascripts / projects_index.js @ 791:b5e8049ded56

History | View | Annotate | Download (865 Bytes)

1 776:af852d82b00b luis
function toggleFieldsetWithState(this_field){
2 777:facded821cee luis
        id = Element.up(this_field, 'fieldset').id;
3 776:af852d82b00b luis
        // is the fieldset collapsed?
4
        status = $(id).hasClassName("collapsed");
5 777:facded821cee luis
        change_session(id, status);
6 776:af852d82b00b luis
7 777:facded821cee luis
        toggleFieldset(this_field);
8 776:af852d82b00b luis
};
9
10
function change_session(id, nstatus) {
11
        var url = "projects/set_fieldset_status";
12
         var request = new Ajax.Request(url, {
13
                method: 'post',
14
                 parameters: {field_id: id, status: nstatus},
15 777:facded821cee luis
            asynchronous: true
16
          });
17 781:62a8d632451c luis
}
18 782:eb3e9e1ffc13 luis
19
function submitForm(){
20
        $('submitButton').click(); return false;
21 791:b5e8049ded56 luis
}
22
23
function keypressHandler (event){
24
    var key = event.which || event.keyCode;
25
    switch (key) {
26
        default:
27
        break;
28
        case Event.KEY_RETURN:
29
            $('submitButton').click(); return false;
30
        break;
31
    }
32
}
33
34
document.observe("dom:loaded", function() {
35
        $('search-input').observe('keypress', keypressHandler);
36
});