aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-11-27 22:45:28 +0100
committerMario Vavti <mario@mariovavti.com>2015-11-27 22:45:28 +0100
commitbcfa72ed310f05dc9a5fca9e724c07b7216aa7fd (patch)
tree9af3ddbc4df8cf4aeff4ef9b8b4703da67403880
parentb92cc852d142940f0f8dd78ddf7be835dc8b9e07 (diff)
downloadvolse-hubzilla-bcfa72ed310f05dc9a5fca9e724c07b7216aa7fd.tar.gz
volse-hubzilla-bcfa72ed310f05dc9a5fca9e724c07b7216aa7fd.tar.bz2
volse-hubzilla-bcfa72ed310f05dc9a5fca9e724c07b7216aa7fd.zip
move events tools to aside widget
-rw-r--r--include/widgets.php16
-rw-r--r--view/css/mod_events.css18
-rw-r--r--view/pdl/mod_events.pdl1
-rwxr-xr-xview/tpl/events-js.tpl16
-rwxr-xr-xview/tpl/events_side.tpl8
5 files changed, 34 insertions, 25 deletions
diff --git a/include/widgets.php b/include/widgets.php
index a3f7444ec..d4f3d32e1 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -666,7 +666,7 @@ function widget_eventsmenu($arr) {
if (! local_channel())
return;
- return replace_macros(get_markup_template('events_side.tpl'), array(
+ return replace_macros(get_markup_template('events_menu_side.tpl'), array(
'$title' => t('Events Menu'),
'$day' => t('Day View'),
'$week' => t('Week View'),
@@ -677,6 +677,18 @@ function widget_eventsmenu($arr) {
));
}
+function widget_eventstools($arr) {
+ if (! local_channel())
+ return;
+
+ return replace_macros(get_markup_template('events_tools_side.tpl'), array(
+ '$title' => t('Events Tools'),
+ '$export' => t('Export Calendar'),
+ '$import' => t('Import Calendar'),
+ '$submit' => t('Submit')
+ ));
+}
+
function widget_design_tools($arr) {
$a = get_app();
@@ -1147,6 +1159,8 @@ function widget_forums($arr) {
function widget_tasklist($arr) {
+ if (! local_channel())
+ return;
require_once('include/event.php');
$o .= '<script>var tasksShowAll = 0; $(document).ready(function() { tasksFetch(); $("#tasklist-new-form").submit(function(event) { event.preventDefault(); $.post( "tasks/new", $("#tasklist-new-form").serialize(), function(data) { tasksFetch(); $("#tasklist-new-summary").val(""); } ); return false; } )});</script>';
diff --git a/view/css/mod_events.css b/view/css/mod_events.css
index dd1b8afd4..dc1dc902f 100644
--- a/view/css/mod_events.css
+++ b/view/css/mod_events.css
@@ -4,6 +4,16 @@
margin-bottom: -1px;
}
+.fc-unthemed th,
+.fc-unthemed td,
+.fc-unthemed thead,
+.fc-unthemed tbody,
+.fc-unthemed .fc-divider,
+.fc-unthemed .fc-row,
+.fc-unthemed .fc-popover {
+ border-color: #ccc !important;
+}
+
#events-spinner .spinner {
margin-top: 9px;
margin-bottom: -9px;
@@ -32,3 +42,11 @@
.event-description {
margin-top: 10px;
}
+
+#event-upload-form {
+ margin-top: 10px;
+}
+
+#event-upload-choose {
+ width: 100%;
+}
diff --git a/view/pdl/mod_events.pdl b/view/pdl/mod_events.pdl
index 5a71d88d9..a3bc0c019 100644
--- a/view/pdl/mod_events.pdl
+++ b/view/pdl/mod_events.pdl
@@ -1,4 +1,5 @@
[region=aside]
[widget=eventsmenu][/widget]
+[widget=eventstools][/widget]
[widget=tasklist][/widget]
[/region]
diff --git a/view/tpl/events-js.tpl b/view/tpl/events-js.tpl
index 2b6170ff4..08c8aa64a 100755
--- a/view/tpl/events-js.tpl
+++ b/view/tpl/events-js.tpl
@@ -1,10 +1,7 @@
<div class="generic-content-wrapper">
<div class="section-title-wrapper">
<div class="pull-right">
-
- <button class="btn btn-default btn-xs" onclick="openClose('event-tools'); closeMenu('form');"><i class="icon-cog"></i></button>
<button class="btn btn-success btn-xs" onclick="openClose('form'); closeMenu('event-tools');">{{$new_event.1}}</button>
-
<div class="btn-group">
<button class="btn btn-default btn-xs" onclick="changeView('prev', false);" title="{{$prev}}"><i class="icon-backward"></i></button>
<button id="events-spinner" class="btn btn-default btn-xs" onclick="changeView('today', false);" title="{{$today}}"><i class="icon-bullseye"></i></button>
@@ -17,19 +14,6 @@
<div id="form" class="section-content-tools-wrapper"{{if !$expandform}} style="display:none;"{{/if}}>
{{$form}}
</div>
- <div id="event-tools" class="section-content-tools-wrapper" style="display:none;">
- <div class="form-group">
- <button class="btn btn-primary btn-xs" onclick="exportDate(); return false;"><i class="icon-download"></i>&nbsp;{{$export.1}}</button>
- <button class="btn btn-primary btn-xs" onclick="openClose('event-upload-form');"><i class="icon-upload"></i>&nbsp;{{$upload}}</button>
- </div>
- <div id="event-upload-form" style="display:none;">
- <form action="events" enctype="multipart/form-data" method="post" name="event-upload-form" id="event-upload-form">
- <button id="dbtn-submit" class="btn btn-primary btn-sm pull-right" type="submit" name="submit" >{{$submit}}</button>
- <input id="event-upload-choose" type="file" name="userfile" />
-
- </form>
- </div>
- </div>
<div class="clear"></div>
<div class="section-content-wrapper-np">
<div id="events-calendar"></div>
diff --git a/view/tpl/events_side.tpl b/view/tpl/events_side.tpl
deleted file mode 100755
index b9a9062b1..000000000
--- a/view/tpl/events_side.tpl
+++ /dev/null
@@ -1,8 +0,0 @@
-<div class="widget">
- <h3>{{$title}}</h3>
- <ul class="nav nav-pills nav-stacked">
- <li><a href="#" onclick="changeView('changeView', 'month'); return false;">{{$month}}</a></li>
- <li><a href="#" onclick="changeView('changeView', 'agendaWeek'); return false;">{{$week}}</a></li>
- <li><a href="#" onclick="changeView('changeView', 'agendaDay'); return false;">{{$day}}</a></li>
- </ul>
-</div>