Merge pull request #1596 from rabuzarus/event-preview
event preview for frost theme
This commit is contained in:
commit
3cb4f91807
|
@ -159,6 +159,11 @@ $(document).ready(function() {
|
||||||
eventClick: function(calEvent, jsEvent, view) {
|
eventClick: function(calEvent, jsEvent, view) {
|
||||||
showEvent(calEvent.id);
|
showEvent(calEvent.id);
|
||||||
},
|
},
|
||||||
|
loading: function(isLoading, view) {
|
||||||
|
if(!isLoading) {
|
||||||
|
$('td.fc-day').dblclick(function() { window.location.href='/events/new?start='+$(this).data('date'); });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
eventRender: function(event, element, view) {
|
eventRender: function(event, element, view) {
|
||||||
//console.log(view.name);
|
//console.log(view.name);
|
||||||
|
@ -353,6 +358,14 @@ function showEvent(eventid) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function doEventPreview() {
|
||||||
|
$('#event-edit-preview').val(1);
|
||||||
|
$.post('events',$('#event-edit-form').serialize(), function(data) {
|
||||||
|
$.colorbox({ html: data });
|
||||||
|
});
|
||||||
|
$('#event-edit-preview').val(0);
|
||||||
|
}
|
||||||
|
|
||||||
function initCrop() {
|
function initCrop() {
|
||||||
function onEndCrop( coords, dimensions ) {
|
function onEndCrop( coords, dimensions ) {
|
||||||
$PR( 'x1' ).value = coords.x1;
|
$PR( 'x1' ).value = coords.x1;
|
||||||
|
|
|
@ -5,11 +5,12 @@
|
||||||
{{$desc}}
|
{{$desc}}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<form action="{{$post}}" method="post" >
|
<form id="event-edit-form" action="{{$post}}" method="post" >
|
||||||
|
|
||||||
<input type="hidden" name="event_id" value="{{$eid}}" />
|
<input type="hidden" name="event_id" value="{{$eid}}" />
|
||||||
<input type="hidden" name="cid" value="{{$cid}}" />
|
<input type="hidden" name="cid" value="{{$cid}}" />
|
||||||
<input type="hidden" name="uri" value="{{$uri}}" />
|
<input type="hidden" name="uri" value="{{$uri}}" />
|
||||||
|
<input type="hidden" name="preview" id="event-edit-preview" value="0" />
|
||||||
|
|
||||||
<div id="event-start-text">{{$s_text}}</div>
|
<div id="event-start-text">{{$s_text}}</div>
|
||||||
{{$s_dsel}} {{$s_tsel}}
|
{{$s_dsel}} {{$s_tsel}}
|
||||||
|
@ -45,6 +46,7 @@
|
||||||
{{$acl}}
|
{{$acl}}
|
||||||
|
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
|
<input id="event-edit-preview" type="submit" name="preview" value="{{$preview|escape:'html'}}" onclick="doEventPreview(); return false;" />
|
||||||
<input id="event-submit" type="submit" name="submit" value="{{$submit}}" />
|
<input id="event-submit" type="submit" name="submit" value="{{$submit}}" />
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user