Node.js based forum software built for the modern web
fixed alert-notify (and blanks) to alert-warning
psychobunnycc6e028b1df2
diff --git a/public/src/app.js b/public/src/app.jsindex 6882ea4235..9f106bf30d 100644--- a/public/src/app.js+++ b/public/src/app.js@@ -72,7 +72,7 @@ var socket,alert_id: 'connection_alert',title: 'Reconnecting',message: 'You have disconnected from NodeBB, we will try to reconnect you. <br/><i class="icon-refresh icon-spin"></i>',- type: 'notify',+ type: 'warning',timeout: 5000});});@@ -161,7 +161,7 @@ var socket,if(alert.length > 0) {alert.find('strong').html(params.title);alert.find('p').html(params.message);- alert.attr('class', "alert toaster-alert " + ((params.type=='warning') ? '' : "alert-" + params.type));+ alert.attr('class', "alert toaster-alert " + "alert-" + params.type);clearTimeout(alert.attr('timeoutId'));startTimeout(alert, params.timeout);@@ -175,7 +175,7 @@ var socket,p.innerHTML = params.message;strong.innerHTML = params.title;- div.className = "alert toaster-alert " + ((params.type=='warning') ? '' : "alert-" + params.type);+ div.className = "alert toaster-alert " + "alert-" + params.type;div.setAttribute('id', alert_id);div.appendChild(button);diff --git a/public/src/forum/admin/plugins.js b/public/src/forum/admin/plugins.jsindex 07907b14e0..a913cc9fe9 100644--- a/public/src/forum/admin/plugins.js+++ b/public/src/forum/admin/plugins.js@@ -21,7 +21,7 @@ var nodebb_admin = nodebb_admin || {};alert_id: 'plugin_toggled_' + status.id,title: 'Plugin Enabled',message: 'You may need to restart NodeBB in order for these changes to be reflected.',- type: 'notify',+ type: 'warning',timeout: 5000})});diff --git a/public/src/forum/footer.js b/public/src/forum/footer.jsindex 75ef3d499a..487c7ae0aa 100644--- a/public/src/forum/footer.js+++ b/public/src/forum/footer.js@@ -6,7 +6,7 @@user_label = document.getElementById('user_label'),active_record = document.getElementById('active_record'),right_menu = document.getElementById('right-menu');-+socket.emit('user.count', {});socket.on('user.count', function(data) {num_users.innerHTML = "We currently have <b>" + data.count + "</b> registered users.";@@ -28,22 +28,22 @@socket.emit('api:user.active.get');socket.on('api:user.active.get', function(data) {-+var plural_users = parseInt(data.users) !== 1,plural_anon = parseInt(data.anon) !== 1;active_users.innerHTML = 'There ' + (plural_users ? 'are' : 'is') + ' <strong>' + data.users + '</strong> user' + (plural_users ? 's' : '') + ' and <strong>' + data.anon + '</strong> guest' + (plural_anon ? 's' : '') + ' online';});-+socket.emit('api:user.active.get_record');socket.on('api:user.active.get_record', function(data) {active_record.innerHTML = "most users ever online was <strong>" + data.record + "</strong> on <strong>" + (new Date(parseInt(data.timestamp,10))).toUTCString() + "</strong>";});socket.emit('api:updateHeader', { fields: ['username', 'picture', 'userslug'] });-+socket.on('api:updateHeader', function(data) {-+var rightMenu = $('#right-menu'),isLoggedIn = data.uid > 0;@@ -149,7 +149,7 @@app.alert({title: 'New notification',message: 'You have unread notifications.',- type: 'notify',+ type: 'warning',timeout: 2000});utils.refreshTitle();@@ -160,12 +160,12 @@var username = data.username;var fromuid = data.fromuid;var message = data.message;-+require(['chat'], function(chat) {var chatModal = chat.createModalIfDoesntExist(username, fromuid);chatModal.show();chat.bringModalToTop(chatModal);-+chat.appendChatMessage(chatModal, message);});});diff --git a/src/websockets.js b/src/websockets.jsindex b3a005a266..0be9ae0864 100644--- a/src/websockets.js+++ b/src/websockets.js@@ -340,7 +340,7 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }),socket.emit('event:alert', {title: 'Thank you for posting',message: 'You have successfully posted. Click here to view your post.',- type: 'notify',+ type: 'warning',timeout: 2000});}@@ -379,7 +379,7 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }),socket.emit('event:alert', {title: 'Reply Unsuccessful',message: 'Your reply could not be posted at this time. Please try again later.',- type: 'notify',+ type: 'warning',timeout: 2000});}@@ -393,7 +393,7 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }),socket.emit('event:alert', {title: 'Reply Successful',message: 'You have successfully replied. Click here to view your reply.',- type: 'notify',+ type: 'warning',timeout: 2000});