Blame view

sources/apps/calendar/js/on-event.js 3.08 KB
6d9380f96   Cédric Dupont   Update sources OC...
1
  $(document).on('click', '#newCalendar', function () {
d1bafeea1   Kload   [fix] Upgrade to ...
2
3
  	Calendar.UI.Calendar.newCalendar(this);
  });
6d9380f96   Cédric Dupont   Update sources OC...
4
  $(document).on('click', '#caldav_url_close', function () {
d1bafeea1   Kload   [fix] Upgrade to ...
5
6
  	$('#caldav_url').hide();$('#caldav_url_close').hide();
  });
6d9380f96   Cédric Dupont   Update sources OC...
7
  $(document).on('mouseover', '#caldav_url', function () {
d1bafeea1   Kload   [fix] Upgrade to ...
8
9
  	$('#caldav_url').select();
  });
6d9380f96   Cédric Dupont   Update sources OC...
10
11
12
13
14
15
16
  $(document).on('click', '#primarycaldav', function () {
  	$('#primarycaldav').select();
  });
  $(document).on('click', '#ioscaldav', function () {
  	$('#ioscaldav').select();
  });
  $(document).on('click', '#editCategories', function () {
d1bafeea1   Kload   [fix] Upgrade to ...
17
18
  	$(this).tipsy('hide');OC.Tags.edit('event');
  });
6d9380f96   Cédric Dupont   Update sources OC...
19
  $(document).on('click', '#allday_checkbox', function () {
d1bafeea1   Kload   [fix] Upgrade to ...
20
21
  	Calendar.UI.lockTime();
  });
6d9380f96   Cédric Dupont   Update sources OC...
22
  $(document).on('click', '#advanced_options_button', function () {
d1bafeea1   Kload   [fix] Upgrade to ...
23
24
  	Calendar.UI.showadvancedoptions();
  });
6d9380f96   Cédric Dupont   Update sources OC...
25
  $(document).on('click', '#advanced_options_button_repeat', function () {
d1bafeea1   Kload   [fix] Upgrade to ...
26
27
  	Calendar.UI.showadvancedoptionsforrepeating();
  });
6d9380f96   Cédric Dupont   Update sources OC...
28
  $(document).on('click', '#submitNewEvent', function () {
d1bafeea1   Kload   [fix] Upgrade to ...
29
30
  	Calendar.UI.validateEventForm($(this).data('link'));
  });
6d9380f96   Cédric Dupont   Update sources OC...
31
  $(document).on('click', '#chooseCalendar', function () {
d1bafeea1   Kload   [fix] Upgrade to ...
32
33
  	Calendar.UI.Calendar.newCalendar(this);
  });
6d9380f96   Cédric Dupont   Update sources OC...
34
  $(document).on('change', '.activeCalendar', function () {
d1bafeea1   Kload   [fix] Upgrade to ...
35
36
  	Calendar.UI.Calendar.activation(this,$(this).data('id'));
  });
6d9380f96   Cédric Dupont   Update sources OC...
37
38
39
40
  $(document).on('change', '#active_shared_events', function () {
  	Calendar.UI.Calendar.sharedEventsActivation(this);
  });
  $(document).on('click', '#allday_checkbox', function () {
d1bafeea1   Kload   [fix] Upgrade to ...
41
42
  	Calendar.UI.lockTime();
  });
6d9380f96   Cédric Dupont   Update sources OC...
43
  $(document).on('click', '#editEvent-submit', function () {
d1bafeea1   Kload   [fix] Upgrade to ...
44
45
46
  	console.log('submit-event');
  	Calendar.UI.validateEventForm($(this).data('link'));
  });
6d9380f96   Cédric Dupont   Update sources OC...
47
  $(document).on('click', '#editEvent-delete', function () {
d1bafeea1   Kload   [fix] Upgrade to ...
48
49
  	Calendar.UI.submitDeleteEventForm($(this).data('link'));
  });
6d9380f96   Cédric Dupont   Update sources OC...
50
  $(document).on('click', '#editEvent-export', function () {
d1bafeea1   Kload   [fix] Upgrade to ...
51
52
  	window.location = $(this).data('link');
  });
6d9380f96   Cédric Dupont   Update sources OC...
53
  $(document).on('click', '#chooseCalendar-showCalDAVURL', function () {
d1bafeea1   Kload   [fix] Upgrade to ...
54
55
  	Calendar.UI.showCalDAVUrl($(this).data('user'), $(this).data('caldav'));
  });
6d9380f96   Cédric Dupont   Update sources OC...
56
  $(document).on('click', '#chooseCalendar-edit', function () {
d1bafeea1   Kload   [fix] Upgrade to ...
57
58
  	Calendar.UI.Calendar.edit($(this), $(this).data('id'));
  });
6d9380f96   Cédric Dupont   Update sources OC...
59
  $(document).on('click', '#chooseCalendar-delete', function () {
d1bafeea1   Kload   [fix] Upgrade to ...
60
61
  	Calendar.UI.Calendar.deleteCalendar($(this).data('id'));
  });
6d9380f96   Cédric Dupont   Update sources OC...
62
  $(document).on('click', '#editCalendar-submit', function () {
d1bafeea1   Kload   [fix] Upgrade to ...
63
64
  	Calendar.UI.Calendar.submit($(this), $(this).data('id'));
  });
6d9380f96   Cédric Dupont   Update sources OC...
65
  $(document).on('click', '#editCalendar-cancel', function () {
d1bafeea1   Kload   [fix] Upgrade to ...
66
67
  	Calendar.UI.Calendar.cancel($(this), $(this).data('id'));
  });
6d9380f96   Cédric Dupont   Update sources OC...
68
  $(document).on('click', '.choosecalendar-rowfield-active', function () {
d1bafeea1   Kload   [fix] Upgrade to ...
69
  	Calendar.UI.Share.activation($(this), $(this).data('id'));
6d9380f96   Cédric Dupont   Update sources OC...
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
  });
  $(document).on('focus', "#event-location:not(.ui-autocomplete-input)", function (event) {
  	$(this).autocomplete({
  		source: OC.linkTo('calendar', 'ajax/search-location.php'),
  		minLength: 2
  	});
  });
  $(document).on('keydown', '#newcalendar_dialog #displayname_new', function(event){
  	if (event.which == 13){
  		$('#newcalendar_dialog #editCalendar-submit').click();
  	}
  });
  $(document).on('keydown', '#editcalendar_dialog > span > input:text', function(event){
  	if (event.which == 13){
  		$('#editcalendar_dialog #editCalendar-submit').click();
  	}
  });