aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/event_head.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl/event_head.tpl')
-rwxr-xr-xview/tpl/event_head.tpl48
1 files changed, 35 insertions, 13 deletions
diff --git a/view/tpl/event_head.tpl b/view/tpl/event_head.tpl
index d193696b7..dc98d14b3 100755
--- a/view/tpl/event_head.tpl
+++ b/view/tpl/event_head.tpl
@@ -55,7 +55,11 @@
showEvent(calEvent.id);
},
loading: function(isLoading, view) {
+ $('#events-spinner').spin('tiny');
+ $('#events-spinner > i').css('color', 'transparent');
if(!isLoading) {
+ $('#events-spinner').spin(false);
+ $('#events-spinner > i').css('color', '');
$('td.fc-day').dblclick(function() {
openMenu('form');
//window.location.href='/events/new?start='+$(this).data('date');
@@ -64,40 +68,45 @@
},
eventRender: function(event, element, view) {
+
//console.log(view.name);
if (event.item['author']['xchan_name']==null) return;
switch(view.name){
case "month":
- element.find(".fc-event-title").html(
- "<img src='{0}' style='height:10px;width:10px'>{1} : {2}".format(
+ element.find(".fc-title").html(
+ "<img src='{0}' style='height:12px;width:12px;' title='{1}'>&nbsp;<span title='{3}{4}'>{2}</span>".format(
event.item['author']['xchan_photo_s'],
event.item['author']['xchan_name'],
- event.title
+ event.title,
+ event.item.description ? event.item.description + "\r\n\r\n" : '',
+ event.item.location ? aStr['location'] + ': ' + event.item.location.replace(/(<([^>]+)>)/ig,"") : ''
));
break;
case "agendaWeek":
- element.find(".fc-event-title").html(
- "<img src='{0}' style='height:12px; width:12px'>{1}<p>{2}</p><p>{3}</p>".format(
+ element.find(".fc-title").html(
+ "<img src='{0}' style='height:12px;width:12px;'>&nbsp;{1}: <span title='{3}{4}'>{2}</span>".format(
event.item['author']['xchan_photo_s'],
event.item['author']['xchan_name'],
- event.item.desc,
- event.item.location
+ event.title,
+ event.item.description ? event.item.description + "\r\n\r\n" : '',
+ event.item.location ? aStr['location'] + ': ' + event.item.location.replace(/(<([^>]+)>)/ig,"") : ''
));
break;
case "agendaDay":
- element.find(".fc-event-title").html(
- "<img src='{0}' style='height:24px;width:24px'>{1}<p>{2}</p><p>{3}</p>".format(
+ element.find(".fc-title").html(
+ "<img src='{0}' style='height:12px;width:12px;'>&nbsp;{1}: <span title='{3}{4}'>{2}</span>".format(
event.item['author']['xchan_photo_s'],
event.item['author']['xchan_name'],
- event.item.desc,
- event.item.location
+ event.title,
+ event.item.description ? event.item.description + "\r\n\r\n" : '',
+ event.item.location ? aStr['location'] + ': ' + event.item.location.replace(/(<([^>]+)>)/ig,"") : ''
));
break;
}
}
- })
+ });
// center on date
var args=location.href.replace(baseurl,"").split("/");
@@ -113,6 +122,20 @@
var view = $('#events-calendar').fullCalendar('getView');
$('#title').text(view.title);
+ // shift the finish time date on start time date change automagically
+ var origsval = $('#id_start_text').val();
+ $('#id_start_text').change(function() {
+ var origfval = $('#id_finish_text').val();
+ if(origfval) {
+ var sval = $('#id_start_text').val();
+ var diff = moment(sval).diff(origsval);
+ var fval = moment(origfval).add(diff, 'millisecond').format("YYYY-MM-DD HH:mm");
+ $('#id_finish_text').val(fval);
+ origsval = sval;
+ }
+ });
+
+ // ACL
$('#id_share').change(function() {
if ($('#id_share').is(':checked')) {
@@ -123,7 +146,6 @@
}
}).trigger('change');
-
$('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
var selstr;
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {