Mercurial > hg > soundsoftware-site
comparison .svn/pristine/db/dbbe02344b02394382c3153c6c0b7b7ba7f46fe0.svn-base @ 909:cbb26bc654de redmine-1.3
Update to Redmine 1.3-stable branch (Redmine SVN rev 8964)
author | Chris Cannam |
---|---|
date | Fri, 24 Feb 2012 19:09:32 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
908:c6c2cbd0afee | 909:cbb26bc654de |
---|---|
1 Event.observe(window,'load',function() { | |
2 /* | |
3 If we're viewing a tag or branch, don't display it in the | |
4 revision box | |
5 */ | |
6 var branch_selected = $('branch') && $('rev').getValue() == $('branch').getValue(); | |
7 var tag_selected = $('tag') && $('rev').getValue() == $('tag').getValue(); | |
8 if (branch_selected || tag_selected) { | |
9 $('rev').setValue(''); | |
10 } | |
11 | |
12 /* | |
13 Copy the branch/tag value into the revision box, then disable | |
14 the dropdowns before submitting the form | |
15 */ | |
16 $$('#branch,#tag').each(function(e) { | |
17 e.observe('change',function(e) { | |
18 $('rev').setValue(e.element().getValue()); | |
19 $$('#branch,#tag').invoke('disable'); | |
20 e.element().parentNode.submit(); | |
21 $$('#branch,#tag').invoke('enable'); | |
22 }); | |
23 }); | |
24 | |
25 /* | |
26 Disable the branch/tag dropdowns before submitting the revision form | |
27 */ | |
28 $('rev').observe('keydown', function(e) { | |
29 if (e.keyCode == 13) { | |
30 $$('#branch,#tag').invoke('disable'); | |
31 e.element().parentNode.submit(); | |
32 $$('#branch,#tag').invoke('enable'); | |
33 } | |
34 }); | |
35 }) |