diff options
Diffstat (limited to 'view')
-rw-r--r-- | view/css/mod_cal.css | 4 | ||||
-rw-r--r-- | view/css/mod_events.css | 4 | ||||
-rw-r--r-- | view/css/widgets.css | 1 | ||||
-rw-r--r-- | view/js/main.js | 5 | ||||
-rw-r--r-- | view/js/mod_events.js | 9 | ||||
-rw-r--r-- | view/pdl/mod_events.pdl | 1 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 17 | ||||
-rw-r--r-- | view/theme/redbasic/js/redbasic.js | 4 | ||||
-rw-r--r-- | view/tpl/dreport.tpl | 21 | ||||
-rwxr-xr-x | view/tpl/event_head.tpl | 8 | ||||
-rwxr-xr-x | view/tpl/events-js.tpl | 22 | ||||
-rw-r--r-- | view/tpl/force_image_reload.tpl | 72 | ||||
-rwxr-xr-x | view/tpl/jot-header.tpl | 2 | ||||
-rwxr-xr-x | view/tpl/register.tpl | 3 | ||||
-rw-r--r-- | view/tpl/wiki.tpl | 2 |
15 files changed, 146 insertions, 29 deletions
diff --git a/view/css/mod_cal.css b/view/css/mod_cal.css index 184227a91..f0b5c0166 100644 --- a/view/css/mod_cal.css +++ b/view/css/mod_cal.css @@ -1,7 +1,3 @@ -.fc-scroller { - overflow: hidden !important; -} - /* fix borders */ .fc th:first-child, diff --git a/view/css/mod_events.css b/view/css/mod_events.css index 184227a91..f0b5c0166 100644 --- a/view/css/mod_events.css +++ b/view/css/mod_events.css @@ -1,7 +1,3 @@ -.fc-scroller { - overflow: hidden !important; -} - /* fix borders */ .fc th:first-child, diff --git a/view/css/widgets.css b/view/css/widgets.css index 38809896c..2a7c57f53 100644 --- a/view/css/widgets.css +++ b/view/css/widgets.css @@ -11,6 +11,7 @@ width: 100%; border-top-right-radius: 0px; border-bottom-right-radius: 0px; + border-right: 0px; } .tags { diff --git a/view/js/main.js b/view/js/main.js index f279417d9..2caf5a1dd 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -941,6 +941,11 @@ function dropItem(url, object) { $('body').css('cursor', 'auto'); }); }); + return true; + + } + else { + return false; } } diff --git a/view/js/mod_events.js b/view/js/mod_events.js index 66cf81ddd..a507a84d7 100644 --- a/view/js/mod_events.js +++ b/view/js/mod_events.js @@ -19,15 +19,10 @@ function enableDisableFinishDate() { } function on_fullscreen() { - var view = $('#events-calendar').fullCalendar('getView'); - if(view.type === 'month') { - $('#events-calendar').fullCalendar('option', 'height', $(window).height() - $('.section-title-wrapper').outerHeight(true) - 2); // -2 is for border width (top and bottom) of .generic-content-wrapper - } + $('#events-calendar').fullCalendar('option', 'height', $(window).height() - $('.section-title-wrapper').outerHeight(true) - 2); // -2 is for border width (.generic-content-wrapper top and bottom) of .generic-content-wrapper } function on_inline() { var view = $('#events-calendar').fullCalendar('getView'); - if(view.type === 'month') { - $('#events-calendar').fullCalendar('option', 'height', ''); - } + ((view.type === 'month') ? $('#events-calendar').fullCalendar('option', 'height', '') : $('#events-calendar').fullCalendar('option', 'height', 'auto')); } diff --git a/view/pdl/mod_events.pdl b/view/pdl/mod_events.pdl index a3bc0c019..8347d4c59 100644 --- a/view/pdl/mod_events.pdl +++ b/view/pdl/mod_events.pdl @@ -1,5 +1,4 @@ [region=aside] -[widget=eventsmenu][/widget] [widget=eventstools][/widget] [widget=tasklist][/widget] [/region] diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index c9c85daa3..5768ccbd9 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1136,18 +1136,31 @@ margin-right: 50px; list-style-type: none; } +.generic-icons { + font-size: 1.2em; + color: $toolicon_colour; + margin-right: 7px; +} + +.generic-icons:hover { + color: $toolicon_colour; +} + .admin-icons { font-size: 1.2em; color: $toolicon_colour; - margin-right: 10px; + margin-right: 7px; } +.drop-icons, a .drop-icons { color: $toolicon_colour; font-size: 1.2em; text-decoration: none; + cursor: pointer; } - + +.drop-icons:hover, a .drop-icons:hover { color: #FF0000; } diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 58c2a9ceb..5209ad945 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -56,13 +56,13 @@ $(document).ready(function() { function makeFullScreen(full) { if(typeof full=='undefined' || full == true) { $('main').css({'transition': 'none'}).addClass('fullscreen'); - $('#fullscreen-btn, header, nav, aside').css({'display': 'none'}); + $('#fullscreen-btn, header, nav, aside, #tabs-collapse-1').css({'visibility': 'hidden'}); $('#inline-btn').show(); } else { $('main').removeClass('fullscreen'); - $('#fullscreen-btn, header, nav, aside').css({'display': ''}); + $('#fullscreen-btn, header, nav, aside, #tabs-collapse-1').css({'visibility': ''}); $('#inline-btn').hide(); $('main').css({'transition': ''}); } diff --git a/view/tpl/dreport.tpl b/view/tpl/dreport.tpl new file mode 100644 index 000000000..7d5524a6a --- /dev/null +++ b/view/tpl/dreport.tpl @@ -0,0 +1,21 @@ +<div class="generic-content-wrapper"> + <div class="section-title-wrapper"> + {{if $table == 'item'}} + <a href="dreport/push/{{$mid}}"><button class="btn btn-default btn-xs pull-right">{{$push}}</button></a> + {{/if}} + <h2>{{$title}}</h2> + </div> + + <div> + <table> + {{if $entries}} + {{foreach $entries as $e}} + <tr> + <td width="40%">{{$e.name}}</td> + <td width="20%">{{$e.result}}</td> + <td width="20%">{{$e.time}}</td> + </tr> + {{/foreach}} + {{/if}} + </table> +</div> diff --git a/view/tpl/event_head.tpl b/view/tpl/event_head.tpl index 762bdcbb8..fee4f17a3 100755 --- a/view/tpl/event_head.tpl +++ b/view/tpl/event_head.tpl @@ -30,12 +30,18 @@ function changeView(action, viewName) { $('#events-calendar').fullCalendar(action, viewName); var view = $('#events-calendar').fullCalendar('getView'); - if(view.type === 'agendaDay' || view.type === 'agendaWeek') { + + if(view.type !== 'month' && !$('main').hasClass('fullscreen')) { $('#events-calendar').fullCalendar('option', 'height', 'auto'); } else { $('#events-calendar').fullCalendar('option', 'height', ''); } + + if($('main').hasClass('fullscreen')) { + $('#events-calendar').fullCalendar('option', 'height', $(window).height() - $('.section-title-wrapper').outerHeight(true) - 2); // -2 is for border width (.generic-content-wrapper top and bottom) of .generic-content-wrapper + } + $('#title').text(view.title); } diff --git a/view/tpl/events-js.tpl b/view/tpl/events-js.tpl index 7d5258ecd..3397411a8 100755 --- a/view/tpl/events-js.tpl +++ b/view/tpl/events-js.tpl @@ -1,13 +1,21 @@ <div class="generic-content-wrapper"> <div class="section-title-wrapper"> <div class="pull-right"> - <button id="fullscreen-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen();"><i class="fa fa-expand"></i></button> - <button id="inline-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen(false);"><i class="fa fa-compress"></i></button> - <button class="btn btn-success btn-xs" onclick="openClose('form');">{{$new_event.1}}</button> - <div class="btn-group"> - <button class="btn btn-default btn-xs" onclick="changeView('prev', false);" title="{{$prev}}"><i class="fa fa-backward"></i></button> - <button id="events-spinner" class="btn btn-default btn-xs" onclick="changeView('today', false);" title="{{$today}}"><i class="fa fa-bullseye"></i></button> - <button class="btn btn-default btn-xs" onclick="changeView('next', false);" title="{{$next}}"><i class="fa fa-forward"></i></button> + <div class="dropdown"> + <button id="fullscreen-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen();"><i class="fa fa-expand"></i></button> + <button id="inline-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen(false);"><i class="fa fa-compress"></i></button> + <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown"><i class="fa fa-caret-down"></i> {{$view_label}}</button> + <ul class="dropdown-menu"> + <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> + <button class="btn btn-success btn-xs" onclick="openClose('form');">{{$new_event.1}}</button> + <div class="btn-group"> + <button class="btn btn-default btn-xs" onclick="changeView('prev', false);" title="{{$prev}}"><i class="fa fa-backward"></i></button> + <button id="events-spinner" class="btn btn-default btn-xs" onclick="changeView('today', false);" title="{{$today}}"><i class="fa fa-bullseye"></i></button> + <button class="btn btn-default btn-xs" onclick="changeView('next', false);" title="{{$next}}"><i class="fa fa-forward"></i></button> + </div> </div> </div> <h2 id="title"></h2> diff --git a/view/tpl/force_image_reload.tpl b/view/tpl/force_image_reload.tpl new file mode 100644 index 000000000..839bd22b5 --- /dev/null +++ b/view/tpl/force_image_reload.tpl @@ -0,0 +1,72 @@ +{{* +Force the browser to reload an image from the server instead of the cache. +based on an answer from http://stackoverflow.com/a/22429796/3343347 + +Usage: Set $imgUrl to the src url you want to be re-fetched from the server + +*}} + +<script> + $(document).ready( + function() { + forceImgReload("{{$imgUrl}}"); + } + ); + + {{* + * find and return any existing img tags with a matching src url, and set them to an intermediate + * src url so they can later be reverted back once the cached version has been updated. + *}} + function prepareImagesForReload(srcUrl) { + + var result = $("img[src='" + srcUrl + "']").get(); + + for (i = 0; i < result.length; i++) { + {{* + * Set the image to a reloading image, in this case an animated "reloading" svg + * Ideally this wont be displayed long enough to matter. + *}} + result[i].src = "data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid' class='uil-reload'%3E%3Cpath fill='none' class='bk' d='M0 0h100v100H0z'/%3E%3Cg%3E%3Cpath d='M50 15a35 35 0 1 0 24.787 10.213' fill='none' stroke='%23777' stroke-width='12'/%3E%3Cpath d='M50 0v30l16-15L50 0' fill='%23777'/%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 50 50' to='360 50 50' dur='1s' repeatCount='indefinite'/%3E%3C/g%3E%3C/svg%3E"; + } + + return result; + } + + function restoreImages(srcUrl, imgList) { + + for (i = 0; i < imgList.length; i++) { + imgList[i].src = srcUrl; + } + } + + function forceImgReload(srcUrl) { + var imgList; + var step = 0; + var iframe = window.document.createElement("iframe"); // Hidden iframe, in which to perform the load+reload. + + {{* Callback function, called after iframe load+reload completes (or fails). + Will be called TWICE unless twostage-mode process is cancelled. (Once after load, once after reload). *}} + var iframeLoadCallback = function(e) { + + if (step === 0) { + // initial load just completed. Note that it doesn't actually matter if this load succeeded or not. + + step = 1; + imgList = prepareImagesForReload(srcUrl); + iframe.contentWindow.location.reload(true); // initiate forced-reload! + + } else if (step === 1) { + // forced re-load is done + + restoreImages(srcUrl, imgList); + if (iframe.parentNode) iframe.parentNode.removeChild(iframe); + } + } + + iframe.style.display = "none"; + window.parent.document.body.appendChild(iframe); {{* NOTE: if this is done AFTER setting src, Firefox MAY fail to fire the load event! *}} + iframe.addEventListener("load", iframeLoadCallback, false); + iframe.addEventListener("error", iframeLoadCallback, false); + iframe.src = srcUrl; + } +</script> diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index f3dd8cafe..9953875ef 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -7,6 +7,7 @@ var pretext = '{{$pretext}}'; function initEditor(cb){ if (editor==false){ $("#profile-jot-text-loading").spin('small').show(); + {{$geotag}} if(plaintext == 'none') { $("#profile-jot-text-loading").spin(false).hide(); $("#profile-jot-text").css({ 'height': 200, 'color': '#000', 'line-height': 'inherit' }); @@ -362,7 +363,6 @@ function enableOnUser(){ $('#profile-nolocation-wrapper').attr('disabled', true); } - {{$geotag}} var initializeEmbedPhotoDialog = function () { $('.embed-photo-selected-photo').each(function (index) { diff --git a/view/tpl/register.tpl b/view/tpl/register.tpl index 4a827ca16..c84934626 100755 --- a/view/tpl/register.tpl +++ b/view/tpl/register.tpl @@ -54,5 +54,8 @@ <button class="btn btn-primary" type="submit" name="submit" id="newchannel-submit-button" value="{{$submit}}">{{$submit}}</button> <div id="register-submit-end" class="register-field-end"></div> </form> + <br /> + <div class="descriptive-text">{{$verify_note}}</div> + </div> </div> diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl index 1d8570828..7617808f4 100644 --- a/view/tpl/wiki.tpl +++ b/view/tpl/wiki.tpl @@ -190,6 +190,7 @@ $(document).ready(function () { wiki_refresh_page_list(); + $("#wiki-toc").toc({content: "#wiki-preview", headings: "h1,h2,h3,h4"}); // Show Edit tab first. Otherwise the Ace editor does not load. $("#wiki-nav-tabs li:eq(1) a").tab('show'); }); @@ -203,6 +204,7 @@ $.post("wiki/{{$channel}}/preview", {content: editor.getValue(), resource_id: window.wiki_resource_id}, function (data) { if (data.success) { $('#wiki-preview').html(data.html); + $("#wiki-toc").toc({content: "#wiki-preview", headings: "h1,h2,h3,h4"}); } else { window.console.log('Error previewing page.'); } |