aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/mod_events.js
blob: 0ce128fcc0ad0d7ef032d6200b04194cda4692b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
$(document).ready( function() { showHideFinishDate(); });

function showHideFinishDate() {
	if( $('#event-nofinish-checkbox').is(':checked'))
		$('#event-finish-wrapper').hide();
	else
		$('#event-finish-wrapper').show();
}



	function eventGetStart() {
		//reply = prompt("{{$expirewhen}}", $('#jot-expire').val());
		$('#startModal').modal();
		$('#start-modal-OKButton').on('click', function() {
    	reply=$('#start-date').val();
    	if(reply && reply.length) {
			$('#start-text').val(reply);
			$('#startModal').modal('hide');
		}
		})
		
		
	}
	function eventGetFinish() {
		//reply = prompt("{{$expirewhen}}", $('#jot-expire').val());
		$('#finishModal').modal();
		$('#finish-modal-OKButton').on('click', function() {
    	reply=$('#finish-date').val();
    	if(reply && reply.length) {
			$('#finish-text').val(reply);
			$('#finishModal').modal('hide');
		}
		})
				
	}