From 987619130b99bf4548d5d31ac453cdf48c818eff Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 24 Nov 2015 14:15:28 +0100 Subject: some event heavy lifting - please test and report issues --- view/css/conversation.css | 1 - view/css/mod_events.css | 55 ------- view/js/mod_events.js | 34 ++--- view/theme/redbasic/css/style.css | 25 ---- view/tpl/event.tpl | 24 ++-- view/tpl/event_form.tpl | 291 ++++++++++++++++---------------------- view/tpl/event_head.tpl | 13 +- view/tpl/events-js.tpl | 7 +- view/tpl/jot.tpl | 10 +- 9 files changed, 154 insertions(+), 306 deletions(-) (limited to 'view') diff --git a/view/css/conversation.css b/view/css/conversation.css index 6f1d4b899..08b51d2fa 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -178,7 +178,6 @@ a.wall-item-name-link { /* comment_item */ .comment-edit-text-empty, .comment-edit-text-full { - float: left; width: 100%; } diff --git a/view/css/mod_events.css b/view/css/mod_events.css index ef8a0c4f7..86776f400 100644 --- a/view/css/mod_events.css +++ b/view/css/mod_events.css @@ -3,58 +3,3 @@ margin-left: -1px; margin-bottom: -1px; } - -#event-desc-textarea, #event-location-textarea { - width: 400px; -} - -#event-summary-text, #event-start-text, #event-finish-text { - width: 200px; - float: left; -} - -#event-summary, #start_text { - width: 95%; - float: left; -} - -#finish_text { - width: 100%; - float: left; -} - - -#event-category-wrap { - margin-top: 15px; -} - -.event-cats { - margin-top: 15px; -} - -.bootstrap-tagsinput { - width: 100%; -} - - -.required { - float: left; - cursor: default; -} - -#event-datetime-break { - clear: both; -} - -#event-nofinish-break { - margin-bottom: 10px; -} - -#event-desc-text, #event-location-text, .event-form-location-end { - margin-top: 15px; -} - -#event-edit-preview-btn { - margin-right: 15px; -} - diff --git a/view/js/mod_events.js b/view/js/mod_events.js index 270bf798b..0b7b3d24c 100644 --- a/view/js/mod_events.js +++ b/view/js/mod_events.js @@ -2,33 +2,15 @@ * JavaScript for mod/events */ -$(document).ready( function() { showHideFinishDate(); }); +$(document).ready( function() { -function showHideFinishDate() { + enableDisableFinishDate(); + +}); + +function enableDisableFinishDate() { if( $('#id_nofinish').is(':checked')) - $('#event-finish-wrapper').hide(); + $('#id_finish_text').prop("disabled", true); else - $('#event-finish-wrapper').show(); -} -function eventGetStart() { - //reply = prompt("{{$expirewhen}}", $('#jot-expire').val()); - $('#startModal').modal(); - $('#start-modal-OKButton').on('click', function() { - reply=$('#start-date').val(); - if(reply && reply.length) { - $('#start-text').val(reply); - $('#startModal').modal('hide'); - } - }); + $('#id_finish_text').prop("disabled", false); } -function eventGetFinish() { - //reply = prompt("{{$expirewhen}}", $('#jot-expire').val()); - $('#finishModal').modal(); - $('#finish-modal-OKButton').on('click', function() { - reply=$('#finish-date').val(); - if(reply && reply.length) { - $('#finish-text').val(reply); - $('#finishModal').modal('hide'); - } - }); -} \ No newline at end of file diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 0b5b6ef80..74d106fe3 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1123,31 +1123,6 @@ nav .acpopup { color: #ff0000; } - -#event-start-text, #event-finish-text { - margin-top: 10px; - margin-bottom: 5px; -} - -#event-nofinish-checkbox, #event-nofinish-text, #event-adjust-checkbox, #event-adjust-text { - float: left; -} -#event-datetime-break { - margin-bottom: 10px; -} - -#event-nofinish-break, #event-adjust-break { - clear: both; -} - -#event-desc-text, #event-location-text { - margin-top: 15px; - margin-bottom: 5px; -} -#event-submit { - margin-top: 10px; -} - #item-delete-selected { margin-top: 30px; } diff --git a/view/tpl/event.tpl b/view/tpl/event.tpl index 5dfc91ebe..c1793c3e7 100755 --- a/view/tpl/event.tpl +++ b/view/tpl/event.tpl @@ -1,16 +1,16 @@ {{foreach $events as $event}}
-
-
- {{if $event.item.author.xchan_name}}{{$event.item.author.xchan_name}}{{/if}} -
- {{$event.html}} -
- {{if $event.item.plink}}{{/if}} - {{if $event.edit}}{{/if}} - {{if $event.drop}}{{/if}} -
-
-
+
+
+ {{if $event.item.author.xchan_name}}{{$event.item.author.xchan_name}}{{/if}} +
+ {{$event.html}} +
+ {{if $event.item.plink}}{{/if}} + {{if $event.edit}}{{/if}} + {{if $event.drop}}{{/if}} +
+
+
{{/foreach}} diff --git a/view/tpl/event_form.tpl b/view/tpl/event_form.tpl index 15505397b..e74aabc68 100755 --- a/view/tpl/event_form.tpl +++ b/view/tpl/event_form.tpl @@ -1,177 +1,130 @@ -
- -

{{$title}}

- -

-{{$desc}} -

-
- - - - - - - -
{{$t_text}}
-{{$required}} - -
- -
{{$s_text}}
- -{{$s_dsel}} - -

- -
- -
-
-
- -
- -
-
{{$f_text}}
-{{$f_dsel}} -
- -
- -{{include file="field_checkbox.tpl" field=$adjust}} - -
- - - -{{if $catsenabled}} -
- -
-{{/if}} - - - -
{{$d_text}}
- - -
-
-
-
- - - - - -
- -
- - - -
- -
-
- -
- -
{{$l_text}}
- - - -
-
-
-
- - - - - -
- -
- - - - + + + + + + + + + {{include file="field_input.tpl" field=$summary}} + + {{$s_dsel}} + + {{$f_dsel}} + + {{include file="field_checkbox.tpl" field=$nofinish}} + + - -
- - -
- - - -
-
+
-{{if ! $eid}} + {{if ! $eid}} + {{include file="field_checkbox.tpl" field=$share}} + {{$acl}} + {{/if}} -
- -
-
-
+
- -
- - - - -{{$acl}} - -{{/if}} - -
- - - - + +
+ + {{if ! $eid}} + + {{/if}} + +
- -
diff --git a/view/tpl/event_head.tpl b/view/tpl/event_head.tpl index ae5f21234..0fc3da5bc 100755 --- a/view/tpl/event_head.tpl +++ b/view/tpl/event_head.tpl @@ -110,22 +110,13 @@ var view = $('#events-calendar').fullCalendar('getView'); $('#title').text(view.title); - - - }); - - - -