]> git.mxchange.org Git - friendica.git/commitdiff
event preview for frost theme
authorrabuzarus <>
Sat, 23 May 2015 17:23:32 +0000 (19:23 +0200)
committerrabuzarus <>
Sat, 23 May 2015 17:23:32 +0000 (19:23 +0200)
view/templates/event_head.tpl
view/theme/frost/js/theme.js
view/theme/frost/templates/event_form.tpl

index 31f389d9e36ab79ec478fa14fd27191dafeb836e..4b34ee182fe3d5765892070592b829424dbe61fb 100644 (file)
        }
         
         function doEventPreview() {
-        $('#event-edit-preview').val(1);
-        $.post('events',$('#event-edit-form').serialize(), function(data) {
-                $.colorbox({ html: data });
-        });
-        $('#event-edit-preview').val(0);
+                $('#event-edit-preview').val(1);
+                $.post('events',$('#event-edit-form').serialize(), function(data) {
+                        $.colorbox({ html: data });
+                });
+                $('#event-edit-preview').val(0);
        }
 
        
index 5d61d5ae892987ae06b45897dbffbf4ddaff5638..1de9d3a96b2117ca191c2a97ab724423ecfc9a09 100644 (file)
@@ -353,6 +353,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 onEndCrop( coords, dimensions ) {
                $PR( 'x1' ).value = coords.x1;
index f8e1d65605dc50c8cbef94aefa9339685fcf8dbd..f348512b456b23d74c611daecb5677ff7d67a1a3 100644 (file)
@@ -5,11 +5,12 @@
 {{$desc}}
 </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="cid" value="{{$cid}}" />
 <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>
 {{$s_dsel}} {{$s_tsel}}
@@ -45,6 +46,7 @@
 {{$acl}}
 
 <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}}" />
 </form>