Node.js based forum software built for the modern web
updated all alert-error to alert-danger (wtf did BS3 need to change that?)
psychobunny0f8aad52b21a
diff --git a/public/src/app.js b/public/src/app.jsindex 27b8bc50a7..9da3ef929f 100644--- a/public/src/app.js+++ b/public/src/app.js@@ -211,7 +211,7 @@ var socket,app.alert({title: 'Error',message: message,- type: 'error',+ type: 'danger',timeout: timeout});}diff --git a/public/src/forum/admin/footer.js b/public/src/forum/admin/footer.jsindex 2ed60171c4..9fc84c7325 100644--- a/public/src/forum/admin/footer.js+++ b/public/src/forum/admin/footer.js@@ -2,9 +2,9 @@var nodebb_admin = (function(nodebb_admin) {-+nodebb_admin.config = undefined;-+nodebb_admin.prepare = function() {// Come back in 500ms if the config isn't ready yetif (nodebb_admin.config === undefined) {@@ -67,10 +67,10 @@ var nodebb_admin = (function(nodebb_admin) {}});}-+nodebb_admin.remove = function(key) {- socket.emit('api:config.remove', key);- }+ socket.emit('api:config.remove', key);+ }jQuery('document').ready(function() {@@ -93,7 +93,7 @@ var nodebb_admin = (function(nodebb_admin) {socket.once('api:config.get', function(config) {nodebb_admin.config = config;});-+socket.emit('api:config.get');socket.on('api:config.set', function(data) {@@ -111,12 +111,12 @@ var nodebb_admin = (function(nodebb_admin) {timeout: 2500,title: 'Changes Not Saved',message: 'NodeBB encountered a problem saving your changes',- type: 'error'+ type: 'danger'});}});-+return nodebb_admin;-+}(nodebb_admin || {}));diff --git a/public/src/forum/topic.js b/public/src/forum/topic.jsindex c2a0a30479..4833a166b6 100644--- a/public/src/forum/topic.js+++ b/public/src/forum/topic.js@@ -124,7 +124,7 @@} else {app.alert({'alert_id': 'thread_move',- type: 'error',+ type: 'danger',title: 'Unable to Move Topic',message: 'This topic could not be moved to ' + targetCatLabel + '.<br />Please try again later',timeout: 5000@@ -183,7 +183,7 @@if (data.status && data.status === 'ok') set_follow_state(data.follow);else {app.alert({- type: 'error',+ type: 'danger',alert_id: 'topic_follow',title: 'Please Log In',message: 'Please register or log in in order to subscribe to this topic',diff --git a/public/src/modules/composer.js b/public/src/modules/composer.jsindex 760c8ae028..1e9e46a885 100644--- a/public/src/modules/composer.js+++ b/public/src/modules/composer.js@@ -30,9 +30,9 @@ define(['taskbar'], function(taskbar) {imagelist = $('.post-window .imagelist'),uuid = dropDiv.parents('[data-uuid]').attr('data-uuid'),posts = composer.posts[uuid];-+$(reader).on('loadend', function(e) {- var bin = this.result;+ var bin = this.result;bin = bin.split(',')[1];var img = {@@ -47,13 +47,13 @@ define(['taskbar'], function(taskbar) {imagelist.append(imageLabel);dropDiv.hide();});-+reader.readAsDataURL(file);}function initializeFileReader() {jQuery.event.props.push( "dataTransfer" );-+var draggingDocument = false;if(window.FileReader) {@@ -77,12 +77,12 @@ define(['taskbar'], function(taskbar) {drop.off('dragleave');});});-+function cancel(e) {e.preventDefault();return false;}-+drop.on('dragover', cancel);drop.on('dragenter', cancel);@@ -96,7 +96,7 @@ define(['taskbar'], function(taskbar) {for (var i=0; i<files.length; i++) {loadFile(files[i]);}-+if(!files.length)drop.hide();return false;@@ -157,7 +157,7 @@ define(['taskbar'], function(taskbar) {composer.load(uuid);} else {app.alert({- type: 'error',+ type: 'danger',timeout: 5000,alert_id: 'post_error',title: 'Please Log In to Post',@@ -284,7 +284,7 @@ define(['taskbar'], function(taskbar) {composer.reposition(post_uuid);composer.active = post_uuid;-+composer.postContainer.setAttribute('data-uuid', post_uuid);if (parseInt(post_data.tid) > 0) {titleEl.value = 'Replying to: ' + post_data.title;@@ -330,13 +330,13 @@ define(['taskbar'], function(taskbar) {var postData = composer.posts[post_uuid],titleEl = composer.postContainer.querySelector('input'),bodyEl = composer.postContainer.querySelector('textarea');-+titleEl.value = titleEl.value.trim();bodyEl.value = bodyEl.value.trim();-+if (titleEl.value.length < config.minimumTitleLength) {return app.alert({- type: 'error',+ type: 'danger',timeout: 2000,title: 'Title too short',message: "Please enter a longer title. At least " + config.minimumTitleLength+ " characters.",@@ -346,7 +346,7 @@ define(['taskbar'], function(taskbar) {if (bodyEl.value.length < config.minimumPostLength) {return app.alert({- type: 'error',+ type: 'danger',timeout: 2000,title: 'Content too short',message: "Please enter a longer post. At least " + config.minimumPostLength + " characters.",diff --git a/public/templates/install/footer.tpl b/public/templates/install/footer.tplindex 9aa8ccf75e..8fc558d4c8 100644--- a/public/templates/install/footer.tpl+++ b/public/templates/install/footer.tpl@@ -9,7 +9,7 @@// ajaxify.go('install/redis');// app.alert({// alert_id: 'config-ready',- // type: 'error',+ // type: 'danger',// timeout: 10000,// title: 'NodeBB Configuration Not Ready!',// message: 'NodeBB cannot proceed with setup at this time as Redis database information ' +@@ -134,7 +134,7 @@timeout: 2500,title: 'Configuration Not Saved',message: 'NodeBB encountered a problem saving your changes',- type: 'error'+ type: 'danger'});}});diff --git a/src/favourites.js b/src/favourites.jsindex 00d1fc40fd..f8b5bc3584 100644--- a/src/favourites.js+++ b/src/favourites.js@@ -10,7 +10,7 @@ var RDB = require('./redis.js'),alert_id: 'post_favourite',title: 'Not Logged In',message: 'Please log in in order to favourite this post',- type: 'error',+ type: 'danger',timeout: 5000});return;@@ -50,7 +50,7 @@ var RDB = require('./redis.js'),alert_id: 'post_favourite',title: 'Not Logged In',message: 'Please log in in order to favourite this post',- type: 'error',+ type: 'danger',timeout: 5000});return;diff --git a/src/posts.js b/src/posts.jsindex 3115dd8661..162c791458 100644--- a/src/posts.js+++ b/src/posts.js@@ -191,7 +191,7 @@ var RDB = require('./redis.js'),Posts.emitContentTooShortAlert = function(socket) {socket.emit('event:alert', {- type: 'error',+ type: 'danger',timeout: 2000,title: 'Content too short',message: "Please enter a longer post. At least " + meta.config.minimumPostLength + " characters.",@@ -203,7 +203,7 @@ var RDB = require('./redis.js'),socket.emit('event:alert', {title: 'Too many posts!',message: 'You can only post every '+ meta.config.postDelay/1000 + ' seconds.',- type: 'error',+ type: 'danger',timeout: 2000});}diff --git a/src/topics.js b/src/topics.jsindex aeabd10fb0..447038d584 100644--- a/src/topics.js+++ b/src/topics.js@@ -544,7 +544,7 @@ marked.setOptions({Topics.emitTitleTooShortAlert = function(socket) {socket.emit('event:alert', {- type: 'error',+ type: 'danger',timeout: 2000,title: 'Title too short',message: "Please enter a longer title. At least " + meta.config.minimumTitleLength + " characters.",diff --git a/src/websockets.js b/src/websockets.jsindex cb4f7b68dc..b3a005a266 100644--- a/src/websockets.js+++ b/src/websockets.js@@ -363,7 +363,7 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }),socket.emit('event:alert', {title: 'Reply Unsuccessful',message: 'You don't seem to be logged in, so you cannot reply.',- type: 'error',+ type: 'danger',timeout: 2000});return;