Move mod/cal.php and mod/events.php to Module
This commit is contained in:
parent
89fde911f9
commit
f13c91b320
41 changed files with 1054 additions and 1109 deletions
|
@ -7,7 +7,7 @@
|
|||
<script>
|
||||
function showEvent(eventid) {
|
||||
$.get(
|
||||
'{{$baseurl}}{{$module_url}}/?id='+eventid,
|
||||
'{{$event_api}}/'+eventid,
|
||||
function(data){
|
||||
$.colorbox({html:data});
|
||||
}
|
||||
|
@ -87,7 +87,7 @@
|
|||
week: '{{$i18n.week|escape:'quotes'}}',
|
||||
day: '{{$i18n.day|escape:'quotes'}}'
|
||||
},
|
||||
events: '{{$baseurl}}/calendar/json',
|
||||
events: '{{$calendar_api}}',
|
||||
header: {
|
||||
left: 'prev,next today',
|
||||
center: 'title',
|
||||
|
@ -99,7 +99,7 @@
|
|||
},
|
||||
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() { window.location.href='/calendar/event/new?start='+$(this).data('date'); });
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -133,18 +133,6 @@
|
|||
|
||||
})
|
||||
|
||||
// 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("-")
|
||||
if (hash.length==2 && hash[0]=="#link") showEvent(hash[1]);
|
|
@ -31,7 +31,7 @@
|
|||
</li>
|
||||
{{/if}}
|
||||
{{if $nav.events}}
|
||||
<li role="menuitem" id="nav-events-link" class="nav-menu {{$sel.events}}">
|
||||
<li role="menuitem" id="nav-calendar-link" class="nav-menu {{$sel.events}}">
|
||||
<a accesskey="e" class="{{$nav.events.2}} desktop-view" href="{{$nav.events.0}}" title="{{$nav.events.3}}">{{$nav.events.1}}</a>
|
||||
<a class="{{$nav.events.2}} mobile-view" href="{{$nav.events.0}}" title="{{$nav.events.3}}"><i class="icon s22 icon-calendar"></i></a>
|
||||
</li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue