To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / vendor / plugins / redmine_tags / assets / javascripts / projects_index.js @ 817:d338e072b97b
History | View | Annotate | Download (844 Bytes)
| 1 |
function toggleFieldsetWithState(this_field){ |
|---|---|
| 2 |
id = Element.up(this_field, 'fieldset').id;
|
| 3 |
// is the fieldset collapsed?
|
| 4 |
status = $(id).hasClassName("collapsed"); |
| 5 |
change_session(id, status); |
| 6 |
|
| 7 |
toggleFieldset(this_field); |
| 8 |
|
| 9 |
}; |
| 10 |
|
| 11 |
function submitForm(){ |
| 12 |
$('submitButton').click(); |
| 13 |
}; |
| 14 |
|
| 15 |
function change_session(id, nstatus) { |
| 16 |
var url = "projects/set_fieldset_status"; |
| 17 |
var request = new Ajax.Request(url, { |
| 18 |
method: 'post', |
| 19 |
parameters: {field_id: id, status: nstatus}, |
| 20 |
asynchronous: true |
| 21 |
}); |
| 22 |
} |
| 23 |
|
| 24 |
function keypressHandler (event){ |
| 25 |
var key = event.which || event.keyCode;
|
| 26 |
switch (key) {
|
| 27 |
default:
|
| 28 |
break;
|
| 29 |
case Event.KEY_RETURN:
|
| 30 |
$('submitButton').click(); return false; |
| 31 |
break;
|
| 32 |
}; |
| 33 |
}; |
| 34 |
|
| 35 |
document.observe("dom:loaded", function() { |
| 36 |
$('search-input').observe('keypress', keypressHandler); |
| 37 |
}); |