diff options
Diffstat (limited to 'view')
-rw-r--r-- | view/js/mod_hq.js | 4 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 15 | ||||
-rw-r--r-- | view/tpl/cloud_directory.tpl | 4 | ||||
-rw-r--r-- | view/tpl/notifications_widget.tpl | 42 |
4 files changed, 44 insertions, 21 deletions
diff --git a/view/js/mod_hq.js b/view/js/mod_hq.js index cf7ec941c..8bbd5e3ad 100644 --- a/view/js/mod_hq.js +++ b/view/js/mod_hq.js @@ -1,4 +1,4 @@ -function hqLiveUpdate(notify_id, b64mid) { +function hqLiveUpdate(notify_id) { if(typeof profile_uid === 'undefined') profile_uid = false; /* Should probably be unified with channelId defined in head.tpl */ if((src === null) || (stopped) || (! profile_uid)) { $('.like-rotator').hide(); return; } @@ -65,7 +65,7 @@ function hqLiveUpdate(notify_id, b64mid) { // else data was valid - reset the recursion counter liveRecurse = 0; - if(notify_id !== 'undefined') { + if(notify_id !== 'undefined') { $.post( "hq", { diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index b3cd9c9f8..82687db17 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -105,9 +105,6 @@ a, color: $link_colour; } -.cloud-icon.tiles i { - color: #aaa; -} a:hover, a:focus, @@ -1735,13 +1732,23 @@ dl.bb-dl > dd > li { margin: 5px; } +.cloud-icon-container { + width: 48px; + height: 48px; + border: 1px solid #eee; + border-radius: $radius; +} + .cloud-icon i { - font-size: 48px; + font-size: 32px; + color: #aaa; + margin-top: 8px; } .cloud-icon img { width: 48px; height: 48px; + border-radius: $radius; } .cloud-title { diff --git a/view/tpl/cloud_directory.tpl b/view/tpl/cloud_directory.tpl index a9840a0b8..88b6bf563 100644 --- a/view/tpl/cloud_directory.tpl +++ b/view/tpl/cloud_directory.tpl @@ -4,7 +4,7 @@ {{if $parentpath}} <div class="cloud-container" > <div class="cloud-icon tiles"><a href="{{$parentpath.path}}"> - <i class="fa fa-fw fa-level-up" ></i> + <div class="cloud-icon-container"><i class="fa fa-fw fa-level-up" ></i></div> </a> </div> <div class="cloud-title"><a href="{{$parentpath.path}}">..</a> @@ -18,7 +18,7 @@ {{if $item.photo_icon}} <img src="{{$item.photo_icon}}" title="{{$item.type}}" > {{else}} - <i class="fa fa-fw {{$item.iconFromType}}" title="{{$item.type}}"></i> + <div class="cloud-icon-container"><i class="fa fa-fw {{$item.iconFromType}}" title="{{$item.type}}"></i></div> {{/if}} </a> </div> diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index 8168866ad..8ab9a79a0 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -1,5 +1,6 @@ <script> var notifications_parent; + $(document).ready(function() { notifications_parent = $('#notifications_wrapper')[0].parentElement.id; $('.notifications-btn').click(function() { @@ -13,6 +14,11 @@ $('#navbar-collapse-2').removeClass('show'); } }); + + window.onpopstate = function(e) { + if(e.state !== null) + getData(e.state.b64mid, ''); + }; }); {{if $module == 'display' || $module == 'hq'}} @@ -20,8 +26,14 @@ var b64mid = $(this).data('b64mid'); var notify_id = $(this).data('notify_id'); var path = $(this)[0].pathname.substr(1,7); + var stateObj = { b64mid: b64mid }; - console.log(path); + {{if $module == 'display'}} + history.pushState(stateObj, '', 'display/' + b64mid); + {{/if}} + {{if $module == 'hq'}} + history.pushState(stateObj, '', 'hq/' + b64mid); + {{/if}} {{if $module == 'hq'}} if(b64mid !== 'undefined' && path !== 'pubstre') { @@ -31,25 +43,29 @@ e.preventDefault(); e.stopPropagation(); - $('.thread-wrapper').remove(); - - if(! page_load) + if(! page_load) { $(this).fadeOut(); - - bParam_mid = b64mid; - mode = 'replace'; - page_load = true; - {{if $module == 'hq'}} - hqLiveUpdate(notify_id); - {{else}} - liveUpdate(); - {{/if}} + getData(b64mid, notify_id); + } if($('#notifications_wrapper').hasClass('fs')) $('#notifications_wrapper').prependTo('#' + notifications_parent).removeClass('fs'); } }); {{/if}} + + function getData(b64mid, notify_id) { + $('.thread-wrapper').remove(); + bParam_mid = b64mid; + mode = 'replace'; + page_load = true; + {{if $module == 'hq'}} + hqLiveUpdate(notify_id); + {{/if}} + {{if $module == 'display'}} + liveUpdate(); + {{/if}} + } </script> |