Merge pull request #2623 from rabuzarus/1906-event-test
implement a public calendar for vistors of someones profile page
This commit is contained in:
commit
9aa5c2f821
10 changed files with 542 additions and 141 deletions
|
|
@ -6,7 +6,7 @@
|
|||
<script>
|
||||
function showEvent(eventid) {
|
||||
$.get(
|
||||
'{{$baseurl}}/events/?id='+eventid,
|
||||
'{{$baseurl}}{{$module_url}}/?id='+eventid,
|
||||
function(data){
|
||||
$.colorbox({html:data});
|
||||
}
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
week: '{{$i18n.week}}',
|
||||
day: '{{$i18n.day}}'
|
||||
},
|
||||
events: '{{$baseurl}}/events/json/',
|
||||
events: '{{$baseurl}}{{$module_url}}/json/',
|
||||
header: {
|
||||
left: 'prev,next today',
|
||||
center: 'title',
|
||||
|
|
@ -100,9 +100,15 @@
|
|||
|
||||
// center on date
|
||||
var args=location.href.replace(baseurl,"").split("/");
|
||||
{{if $modparams == 2}}
|
||||
if (args.length>=5) {
|
||||
$("#events-calendar").fullCalendar('gotoDate',args[3] , args[4]-1);
|
||||
}
|
||||
{{else}}
|
||||
if (args.length>=4) {
|
||||
$("#events-calendar").fullCalendar('gotoDate',args[2] , args[3]-1);
|
||||
}
|
||||
}
|
||||
{{/if}}
|
||||
|
||||
// show event popup
|
||||
var hash = location.hash.split("-")
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<script>
|
||||
// loads the event into a modal
|
||||
function showEvent(eventid) {
|
||||
addToModal('{{$baseurl}}/events/?id='+eventid);
|
||||
addToModal('{{$baseurl}}{{$module_url}}/?id='+eventid);
|
||||
}
|
||||
|
||||
function changeView(action, viewName) {
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
week: '{{$i18n.week}}',
|
||||
day: '{{$i18n.day}}'
|
||||
},
|
||||
events: '{{$baseurl}}/events/json/',
|
||||
events: '{{$baseurl}}{{$module_url}}/json/',
|
||||
header: {
|
||||
left: '',
|
||||
// center: 'title',
|
||||
|
|
@ -83,12 +83,18 @@
|
|||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
// center on date
|
||||
var args=location.href.replace(baseurl,"").split("/");
|
||||
{{if $modparams == 2}}
|
||||
if (args.length>=5) {
|
||||
$("#events-calendar").fullCalendar('gotoDate',args[3] , args[4]-1);
|
||||
}
|
||||
{{else}}
|
||||
if (args.length>=4) {
|
||||
$("#events-calendar").fullCalendar('gotoDate',args[2] , args[3]-1);
|
||||
}
|
||||
}
|
||||
{{/if}}
|
||||
|
||||
// echo the title
|
||||
var view = $('#events-calendar').fullCalendar('getView');
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ $(document).ready(function() {
|
|||
|
||||
if(window.aclType == "event_head") {
|
||||
$('#events-calendar').fullCalendar({
|
||||
events: baseurl + '/events/json/',
|
||||
events: baseurl + window.eventModuleUrl +'/json/',
|
||||
header: {
|
||||
left: 'prev,next today',
|
||||
center: 'title',
|
||||
|
|
@ -204,9 +204,11 @@ $(document).ready(function() {
|
|||
|
||||
// center on date
|
||||
var args=location.href.replace(baseurl,"").split("/");
|
||||
if (args.length>=4) {
|
||||
if (args.length>=5 && window.eventModeParams == 2) {
|
||||
$("#events-calendar").fullCalendar('gotoDate',args[3] , args[4]-1);
|
||||
} else if (args.length>=4 && window.eventModeParams == 1) {
|
||||
$("#events-calendar").fullCalendar('gotoDate',args[2] , args[3]-1);
|
||||
}
|
||||
}
|
||||
|
||||
// show event popup
|
||||
var hash = location.hash.split("-")
|
||||
|
|
@ -264,7 +266,7 @@ function initCrop() {
|
|||
|
||||
function showEvent(eventid) {
|
||||
/* $.get(
|
||||
baseurl + '/events/?id='+eventid,
|
||||
baseurl + window.eventModuleUrl + '/?id=' + eventid,
|
||||
function(data){
|
||||
$.colorbox({html:data});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,5 +3,7 @@
|
|||
|
||||
<script language="javascript" type="text/javascript">
|
||||
window.aclType = 'event_head';
|
||||
window.eventModuleUrl = "{{$module_url}}";
|
||||
window.eventModeParams = "{{$modparams}}" ;
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ $(document).ready(function() {
|
|||
|
||||
if(window.aclType == "event_head") {
|
||||
$('#events-calendar').fullCalendar({
|
||||
events: baseurl + '/events/json/',
|
||||
events: baseurl + window.eventModuleUrl +'/json/',
|
||||
header: {
|
||||
left: 'prev,next today',
|
||||
center: 'title',
|
||||
|
|
@ -202,10 +202,12 @@ $(document).ready(function() {
|
|||
|
||||
// center on date
|
||||
var args=location.href.replace(baseurl,"").split("/");
|
||||
if (args.length>=4) {
|
||||
if (args.length>=5 && window.eventModeParams == 2) {
|
||||
$("#events-calendar").fullCalendar('gotoDate',args[3] , args[4]-1);
|
||||
} else if (args.length>=4 && window.eventModeParams == 1) {
|
||||
$("#events-calendar").fullCalendar('gotoDate',args[2] , args[3]-1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// show event popup
|
||||
var hash = location.hash.split("-")
|
||||
if (hash.length==2 && hash[0]=="#link") showEvent(hash[1]);
|
||||
|
|
@ -352,7 +354,7 @@ if(typeof window.photoEdit != 'undefined') {
|
|||
|
||||
function showEvent(eventid) {
|
||||
$.get(
|
||||
baseurl + '/events/?id='+eventid,
|
||||
baseurl + window.eventModuleUrl + '/?id=' + eventid,
|
||||
function(data){
|
||||
$.colorbox({html:data});
|
||||
$.colorbox.resize();
|
||||
|
|
|
|||
|
|
@ -4,5 +4,7 @@
|
|||
<script language="javascript" type="text/javascript">
|
||||
window.aclType = 'event_head';
|
||||
window.editSelect = "{{$editselect}}";
|
||||
window.eventModuleUrl = "{{$module_url}}";
|
||||
window.eventModeParams = "{{$modparams}}" ;
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue