Mercurial > hg > soundsoftware-site
comparison public/javascripts/.svn/text-base/repository_navigation.js.svn-base @ 0:513646585e45
* Import Redmine trunk SVN rev 3859
author | Chris Cannam |
---|---|
date | Fri, 23 Jul 2010 15:52:44 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:513646585e45 |
---|---|
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 }) |