mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 06:55:46 +01:00
fixed two bugs in admin, meta.buildTitle errors out because no notification icon is present; pagination element missing
& final less cleanup for today
This commit is contained in:
@@ -94,10 +94,10 @@ footer.footer {
|
|||||||
|
|
||||||
i {
|
i {
|
||||||
-webkit-transition: color 100ms linear;
|
-webkit-transition: color 100ms linear;
|
||||||
-moz-transition: color 100ms linear;
|
-moz-transition: color 100ms linear;
|
||||||
-ms-transition: color 100ms linear;
|
-ms-transition: color 100ms linear;
|
||||||
-o-transition: color 100ms linear;
|
-o-transition: color 100ms linear;
|
||||||
transition: color 100ms linear;
|
transition: color 100ms linear;
|
||||||
|
|
||||||
&.icon-twitter-sign:hover {
|
&.icon-twitter-sign:hover {
|
||||||
color: #4099FF;
|
color: #4099FF;
|
||||||
|
|||||||
@@ -25,12 +25,17 @@ var ajaxify = {};
|
|||||||
if (event !== null && event.state && event.state.url !== undefined) ajaxify.go(event.state.url, null, null, true);
|
if (event !== null && event.state && event.state.url !== undefined) ajaxify.go(event.state.url, null, null, true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var pagination;
|
||||||
|
|
||||||
ajaxify.go = function(url, callback, template, quiet) {
|
ajaxify.go = function(url, callback, template, quiet) {
|
||||||
// the following should be set like so: ajaxify.onchange(function(){}); where the code actually belongs
|
// start: the following should be set like so: ajaxify.onchange(function(){}); where the code actually belongs
|
||||||
$(window).off('scroll');
|
$(window).off('scroll');
|
||||||
app.enter_room('global');
|
app.enter_room('global');
|
||||||
document.getElementById('pagination').style.display = 'none';
|
|
||||||
|
pagination = pagination || document.getElementById('pagination');
|
||||||
|
if (pagination) pagination.style.display = 'none';
|
||||||
window.onscroll = null;
|
window.onscroll = null;
|
||||||
|
// end
|
||||||
|
|
||||||
|
|
||||||
var url = url.replace(/\/$/, "");
|
var url = url.replace(/\/$/, "");
|
||||||
|
|||||||
@@ -132,10 +132,12 @@
|
|||||||
a.href = document.location;
|
a.href = document.location;
|
||||||
url = a.pathname.slice(1);
|
url = a.pathname.slice(1);
|
||||||
}
|
}
|
||||||
|
var notificationIcon;
|
||||||
|
|
||||||
socket.emit('api:meta.buildTitle', url, function(title, numNotifications) {
|
socket.emit('api:meta.buildTitle', url, function(title, numNotifications) {
|
||||||
document.title = (numNotifications > 0 ? '(' + numNotifications + ') ' : '') + title;
|
document.title = (numNotifications > 0 ? '(' + numNotifications + ') ' : '') + title;
|
||||||
if (numNotifications > 0) document.querySelector('.notifications a i').className = 'icon-circle active';
|
notificationIcon = notificationIcon || document.querySelector('.notifications a i');
|
||||||
|
if (numNotifications > 0 && notificationIcon) notificationIcon.className = 'icon-circle active';
|
||||||
});
|
});
|
||||||
|
|
||||||
jQuery.getJSON(RELATIVE_PATH + '/api/unread/total', function(data) {
|
jQuery.getJSON(RELATIVE_PATH + '/api/unread/total', function(data) {
|
||||||
|
|||||||
@@ -102,4 +102,4 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div><!--/.well -->
|
</div><!--/.well -->
|
||||||
</div><!--/span-->
|
</div><!--/span-->
|
||||||
<div class="span9" id="content">
|
<div class="col-md-9" id="content">
|
||||||
Reference in New Issue
Block a user