Mercurial > public > sg101
annotate media/js/gcalendar.js @ 131:5b69d6e01fd4
Creating a common way to display the smiley and markdown help dialogs for a markItUp textarea input form. Converted gcalendar over to it as a trial.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 26 Nov 2009 22:47:17 +0000 |
parents | c0d3b09c9b95 |
children | 4e1abeb593c2 |
rev | line source |
---|---|
gremmie@1 | 1 $(document).ready(function() { |
gremmie@1 | 2 $('#id_start_date').datepicker({constrainInput: true, |
gremmie@1 | 3 onClose: function () { |
gremmie@1 | 4 var end = $('#id_end_date'); |
gremmie@1 | 5 if (this.value > end.val()) |
gremmie@1 | 6 { |
gremmie@1 | 7 end.val(this.value); |
gremmie@1 | 8 } |
gremmie@1 | 9 } |
gremmie@1 | 10 }); |
gremmie@1 | 11 $('#id_end_date').datepicker({constrainInput: true, |
gremmie@1 | 12 onClose: function () { |
gremmie@1 | 13 var start = $('#id_start_date'); |
gremmie@1 | 14 if (this.value < start.val()) |
gremmie@1 | 15 { |
gremmie@1 | 16 start.val(this.value); |
gremmie@1 | 17 } |
gremmie@1 | 18 } |
gremmie@1 | 19 }); |
gremmie@1 | 20 if ($('#id_all_day:checked').length) |
gremmie@1 | 21 { |
gremmie@1 | 22 $('#id_start_time').hide(); |
gremmie@1 | 23 $('#id_end_time').hide(); |
gremmie@1 | 24 $('#id_tz_stuff').hide(); |
gremmie@1 | 25 } |
gremmie@1 | 26 $('#id_all_day').click(function () { |
gremmie@1 | 27 $('#id_start_time').toggle(); |
gremmie@1 | 28 $('#id_end_time').toggle(); |
gremmie@1 | 29 $('#id_tz_stuff').toggle(); |
gremmie@1 | 30 }); |
gremmie@1 | 31 }); |