diff --git a/main/template/default/agenda/month.tpl b/main/template/default/agenda/month.tpl index 3f870a00bc..5d00514602 100644 --- a/main/template/default/agenda/month.tpl +++ b/main/template/default/agenda/month.tpl @@ -268,11 +268,23 @@ $(document).ready(function() { $("#dialog-form").dialog({ buttons: { - {"Edit"|get_lang} : function() { + '{"ExportiCalConfidential"|get_lang}' : function() { + url = "ical_export.php?id=" + calEvent.id+'&course_id='+calEvent.course_id+"&class=confidential"; + window.location.href = url; + + }, + '{"ExportiCalPrivate"|get_lang}': function() { + url = "ical_export.php?id=" + calEvent.id+'&course_id='+calEvent.course_id+"&class=private"; + window.location.href = url; + }, + '{"ExportiCalPublic"|get_lang}': function() { + url = "ical_export.php?id=" + calEvent.id+'&course_id='+calEvent.course_id+"&class=public"; + window.location.href = url; + }, + '{"Edit"|get_lang}' : function() { var bValid = true; - bValid = bValid && checkLength( title, "title", 1, 255 ); - //bValid = bValid && checkLength( content, "content", 1, 255 ); + bValid = bValid && checkLength( title, "title", 1, 255 ); var params = $("#add_event_form").serialize(); $.ajax({ @@ -293,7 +305,7 @@ $(document).ready(function() { } }); }, - {"Delete"|get_lang}: function() { + '{"Delete"|get_lang}': function() { $.ajax({ url: delete_url, success:function() { @@ -325,47 +337,21 @@ $(document).ready(function() { $("#simple_content").html(calEvent.description); $("#simple-dialog-form").dialog("open"); - $("#simple-dialog-form").dialog({ buttons: { - {"Export"|get_lang} : function() { - - - var params = $("#add_event_form").serialize(); - $.ajax({ - url: url+'&'+params, - success:function() { - calEvent.title = $("#title").val(); - calEvent.start = calEvent.start; - calEvent.end = calEvent.end; - calEvent.allDay = calEvent.allDay; - calEvent.description = $("#content").val(); - - calendar.fullCalendar('updateEvent', - calEvent, - true // make the event "stick" - ); - - $("#dialog-form").dialog("close"); - } - }); + '{"ExportiCalConfidential"|get_lang}' : function() { + url = "ical_export.php?id=" + calEvent.id+'&course_id='+calEvent.course_id+"&class=confidential"; + window.location.href = url; + }, - {"Export"|get_lang}: function() { - $.ajax({ - url: delete_url, - success:function() { - calendar.fullCalendar('removeEvents', - calEvent - ); - calendar.fullCalendar("refetchEvents"); - calendar.fullCalendar("rerenderEvents"); - $("#dialog-form").dialog( "close" ); - } - }); + '{"ExportiCalPrivate"|get_lang}': function() { + url = "ical_export.php?id=" + calEvent.id+'&course_id='+calEvent.course_id+"&class=private"; + window.location.href = url; + }, + '{"ExportiCalPublic"|get_lang}': function() { + url = "ical_export.php?id=" + calEvent.id+'&course_id='+calEvent.course_id+"&class=public"; + window.location.href = url; } - }, - close: function() { - } }); diff --git a/main/template/default/layout/layout_1_col.tpl b/main/template/default/layout/layout_1_col.tpl index 0b1705f3d2..557bd8b0e9 100644 --- a/main/template/default/layout/layout_1_col.tpl +++ b/main/template/default/layout/layout_1_col.tpl @@ -7,17 +7,10 @@ {/block} {* 1 column *} {block name=body} -
- {if !empty($plugin_content_top)} -
- {$plugin_content_top} -
- {/if} - {include file="default/layout/page_body.tpl"} -
- {* Main content *} - {$content} -
+
+ {include file="default/layout/page_body.tpl"} + {* Content bottom *} + {if !empty($plugin_content_bottom)}
diff --git a/main/template/default/layout/layout_2_col.tpl b/main/template/default/layout/layout_2_col.tpl index baec27fd28..2921da3c4e 100644 --- a/main/template/default/layout/layout_2_col.tpl +++ b/main/template/default/layout/layout_2_col.tpl @@ -14,15 +14,7 @@ {include file="default/layout/sniff.tpl"} {/if} -
- {* Content top*} - - {if !empty($plugin_content_top)} -
- {$plugin_content_top} -
- {/if} - +
{* ?? *}
{$home_page_block} @@ -31,12 +23,7 @@ {* ?? *} {$sniff_notification} - {include file="default/layout/page_body.tpl"} - - {* Main content*} -
- {$content} -
+ {include file="default/layout/page_body.tpl"} {* Announcements *}
@@ -48,13 +35,16 @@ {include file="default/layout/hot_courses.tpl"} {* fix the bug where the login is at the left side*}   -
+
- {if !empty($plugin_content_bottom)} + {* Content bottom *} + + {if !empty($plugin_content_bottom)} +
{$plugin_content_bottom}
- {/if} + {/if}
{* Right column *} diff --git a/main/template/default/layout/main_footer.tpl b/main/template/default/layout/main_footer.tpl index 47c1b15a3c..c854333668 100644 --- a/main/template/default/layout/main_footer.tpl +++ b/main/template/default/layout/main_footer.tpl @@ -1,4 +1,3 @@ -
diff --git a/main/template/default/layout/main_header.tpl b/main/template/default/layout/main_header.tpl index a985f86ffa..1c715674f7 100644 --- a/main/template/default/layout/main_header.tpl +++ b/main/template/default/layout/main_header.tpl @@ -101,8 +101,7 @@ /* »»'; createCookie('dokeos_menu_state',1,10); - } - else - { + } else { toolnavlist_el.style.display = 'none'; if (center_el) { @@ -154,7 +148,6 @@
{$show_course_navigation_menu} -
- +
{/if} {/if} \ No newline at end of file diff --git a/main/template/default/layout/page_body.tpl b/main/template/default/layout/page_body.tpl index 571216acb1..2248e8a13b 100644 --- a/main/template/default/layout/page_body.tpl +++ b/main/template/default/layout/page_body.tpl @@ -1,3 +1,11 @@ +{* Content top *} + +{if !empty($plugin_content_top)} +
+ {$plugin_content_top} +
+{/if} + {* Actions *} {if (!empty($actions)) }
@@ -15,4 +23,10 @@ {* Show messages*}
{$message} -
\ No newline at end of file + + +{* Main content*} +
+{$content} +
+ diff --git a/main/template/default/layout/show_footer.tpl b/main/template/default/layout/show_footer.tpl index 4609c1a67c..420ab6d0d3 100644 --- a/main/template/default/layout/show_footer.tpl +++ b/main/template/default/layout/show_footer.tpl @@ -5,4 +5,12 @@ {if $show_header}
{/if} +{* Content bottom *} + +{if !empty($plugin_content_bottom)} +
+
+ {$plugin_content_bottom} +
+{/if} {include file="default/layout/main_footer.tpl"} \ No newline at end of file