##// END OF EJS Templates
Code cleanup....
Jean-Philippe Lang -
r9910:1a088fb31e5c
parent child
Show More
@@ -1,35 +1,33
1 1 $(document).ready(function() {
2 2 /*
3 3 If we're viewing a tag or branch, don't display it in the
4 4 revision box
5 5 */
6 6 var branch_selected = $('#branch').length > 0 && $('#rev').val() == $('#branch').val();
7 7 var tag_selected = $('#tag').length > 0 && $('#rev').val() == $('#tag').val();
8 8 if (branch_selected || tag_selected) {
9 9 $('#rev').val('');
10 10 }
11 11
12 12 /*
13 13 Copy the branch/tag value into the revision box, then disable
14 14 the dropdowns before submitting the form
15 15 */
16 $('#branch,#tag').each(function() {
17 $(this).change(function() {
18 $('#rev').val($(this).val());
19 $('#branch,#tag').attr('disabled', true);
20 $(this).parent().submit();
21 $('#branch,#tag').removeAttr('disabled');
22 });
16 $('#branch,#tag').change(function() {
17 $('#rev').val($(this).val());
18 $('#branch,#tag').attr('disabled', true);
19 $(this).parent().submit();
20 $('#branch,#tag').removeAttr('disabled');
23 21 });
24 22
25 23 /*
26 24 Disable the branch/tag dropdowns before submitting the revision form
27 25 */
28 26 $('#rev').keydown(function(e) {
29 27 if (e.keyCode == 13) {
30 28 $('#branch,#tag').attr('disabled', true);
31 29 $(this).parent().submit();
32 30 $('#branch,#tag').removeAttr('disabled');
33 31 }
34 32 });
35 33 })
General Comments 0
You need to be logged in to leave comments. Login now