annotate .svn/pristine/b9/b9c054d6539805d812fa35be587a1c5bf3159ea1.svn-base @ 1298:4f746d8966dd redmine_2.3_integration

Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
author Chris Cannam
date Fri, 14 Jun 2013 09:28:30 +0100
parents 622f24f53b42
children
rev   line source
Chris@1295 1 $(document).ready(function() {
Chris@1295 2 /*
Chris@1295 3 If we're viewing a tag or branch, don't display it in the
Chris@1295 4 revision box
Chris@1295 5 */
Chris@1295 6 var branch_selected = $('#branch').length > 0 && $('#rev').val() == $('#branch').val();
Chris@1295 7 var tag_selected = $('#tag').length > 0 && $('#rev').val() == $('#tag').val();
Chris@1295 8 if (branch_selected || tag_selected) {
Chris@1295 9 $('#rev').val('');
Chris@1295 10 }
Chris@1295 11
Chris@1295 12 /*
Chris@1295 13 Copy the branch/tag value into the revision box, then disable
Chris@1295 14 the dropdowns before submitting the form
Chris@1295 15 */
Chris@1295 16 $('#branch,#tag').change(function() {
Chris@1295 17 $('#rev').val($(this).val());
Chris@1295 18 $('#branch,#tag').attr('disabled', true);
Chris@1295 19 $(this).parent().submit();
Chris@1295 20 $('#branch,#tag').removeAttr('disabled');
Chris@1295 21 });
Chris@1295 22
Chris@1295 23 /*
Chris@1295 24 Disable the branch/tag dropdowns before submitting the revision form
Chris@1295 25 */
Chris@1295 26 $('#rev').keydown(function(e) {
Chris@1295 27 if (e.keyCode == 13) {
Chris@1295 28 $('#branch,#tag').attr('disabled', true);
Chris@1295 29 $(this).parent().submit();
Chris@1295 30 $('#branch,#tag').removeAttr('disabled');
Chris@1295 31 }
Chris@1295 32 });
Chris@1295 33 })