aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/event_head.tpl
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2015-11-28 16:23:17 +0100
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2015-11-28 16:23:17 +0100
commitcb7df797e1d5a87ff8b6dbb6c07faf68e3e725f7 (patch)
treed6d9a07a1358fb7b6acf030e268643cd667fd59b /view/tpl/event_head.tpl
parent2b2723cb74dd74fc449d76f29edd7797b16c7e84 (diff)
downloadvolse-hubzilla-cb7df797e1d5a87ff8b6dbb6c07faf68e3e725f7.tar.gz
volse-hubzilla-cb7df797e1d5a87ff8b6dbb6c07faf68e3e725f7.tar.bz2
volse-hubzilla-cb7df797e1d5a87ff8b6dbb6c07faf68e3e725f7.zip
Removed my version of jot.tpl
Diffstat (limited to 'view/tpl/event_head.tpl')
-rwxr-xr-xview/tpl/event_head.tpl52
1 files changed, 31 insertions, 21 deletions
diff --git a/view/tpl/event_head.tpl b/view/tpl/event_head.tpl
index ae5f21234..4362360d3 100755
--- a/view/tpl/event_head.tpl
+++ b/view/tpl/event_head.tpl
@@ -56,45 +56,51 @@
},
loading: function(isLoading, view) {
if(!isLoading) {
- $('td.fc-day').dblclick(function() { window.location.href='/events/new?start='+$(this).data('date'); });
+ $('td.fc-day').dblclick(function() {
+ openMenu('form');
+ //window.location.href='/events/new?start='+$(this).data('date');
+ });
}
},
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:10px;width:10px'>&nbsp;{1}: {2}".format(
event.item['author']['xchan_photo_s'],
event.item['author']['xchan_name'],
event.title
));
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:10px; width:10px'>&nbsp;{1}: {2}<p>{3}</p><p>{4}</p>".format(
event.item['author']['xchan_photo_s'],
event.item['author']['xchan_name'],
- event.item.desc,
+ event.title,
+ event.item.description,
event.item.location
));
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:10px;width:10px'>&nbsp;{1}: {2}<p>{3}</p><p>{4}</p>".format(
event.item['author']['xchan_photo_s'],
event.item['author']['xchan_name'],
- event.item.desc,
+ event.title,
+ event.item.description,
event.item.location
));
break;
}
}
- })
+ });
// center on date
var args=location.href.replace(baseurl,"").split("/");
@@ -110,26 +116,30 @@
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;
+ }
+ });
-
- });
-</script>
-
-
-<script>
- $(document).ready(function() {
-
+ // ACL
$('#id_share').change(function() {
if ($('#id_share').is(':checked')) {
- $('#event-permissions-button').show();
+ $('#dbtn-acl').show();
}
else {
- $('#event-permissions-button').hide();
+ $('#dbtn-acl').hide();
}
}).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() {