updated all alert-error to alert-danger (wtf did BS3 need to change that?)

v1.18.x
psychobunny 12 years ago
parent b6a5cbf956
commit 0f8aad52b2

@ -211,7 +211,7 @@ var socket,
app.alert({ app.alert({
title: 'Error', title: 'Error',
message: message, message: message,
type: 'error', type: 'danger',
timeout: timeout timeout: timeout
}); });
} }

@ -2,9 +2,9 @@
var nodebb_admin = (function(nodebb_admin) { var nodebb_admin = (function(nodebb_admin) {
nodebb_admin.config = undefined; nodebb_admin.config = undefined;
nodebb_admin.prepare = function() { nodebb_admin.prepare = function() {
// Come back in 500ms if the config isn't ready yet // Come back in 500ms if the config isn't ready yet
if (nodebb_admin.config === undefined) { if (nodebb_admin.config === undefined) {
@ -67,10 +67,10 @@ var nodebb_admin = (function(nodebb_admin) {
} }
}); });
} }
nodebb_admin.remove = function(key) { nodebb_admin.remove = function(key) {
socket.emit('api:config.remove', key); socket.emit('api:config.remove', key);
} }
jQuery('document').ready(function() { jQuery('document').ready(function() {
@ -93,7 +93,7 @@ var nodebb_admin = (function(nodebb_admin) {
socket.once('api:config.get', function(config) { socket.once('api:config.get', function(config) {
nodebb_admin.config = config; nodebb_admin.config = config;
}); });
socket.emit('api:config.get'); socket.emit('api:config.get');
socket.on('api:config.set', function(data) { socket.on('api:config.set', function(data) {
@ -111,12 +111,12 @@ var nodebb_admin = (function(nodebb_admin) {
timeout: 2500, timeout: 2500,
title: 'Changes Not Saved', title: 'Changes Not Saved',
message: 'NodeBB encountered a problem saving your changes', message: 'NodeBB encountered a problem saving your changes',
type: 'error' type: 'danger'
}); });
} }
}); });
return nodebb_admin; return nodebb_admin;
}(nodebb_admin || {})); }(nodebb_admin || {}));

@ -124,7 +124,7 @@
} else { } else {
app.alert({ app.alert({
'alert_id': 'thread_move', 'alert_id': 'thread_move',
type: 'error', type: 'danger',
title: 'Unable to Move Topic', title: 'Unable to Move Topic',
message: 'This topic could not be moved to ' + targetCatLabel + '.<br />Please try again later', message: 'This topic could not be moved to ' + targetCatLabel + '.<br />Please try again later',
timeout: 5000 timeout: 5000
@ -183,7 +183,7 @@
if (data.status && data.status === 'ok') set_follow_state(data.follow); if (data.status && data.status === 'ok') set_follow_state(data.follow);
else { else {
app.alert({ app.alert({
type: 'error', type: 'danger',
alert_id: 'topic_follow', alert_id: 'topic_follow',
title: 'Please Log In', title: 'Please Log In',
message: 'Please register or log in in order to subscribe to this topic', message: 'Please register or log in in order to subscribe to this topic',

@ -30,9 +30,9 @@ define(['taskbar'], function(taskbar) {
imagelist = $('.post-window .imagelist'), imagelist = $('.post-window .imagelist'),
uuid = dropDiv.parents('[data-uuid]').attr('data-uuid'), uuid = dropDiv.parents('[data-uuid]').attr('data-uuid'),
posts = composer.posts[uuid]; posts = composer.posts[uuid];
$(reader).on('loadend', function(e) { $(reader).on('loadend', function(e) {
var bin = this.result; var bin = this.result;
bin = bin.split(',')[1]; bin = bin.split(',')[1];
var img = { var img = {
@ -47,13 +47,13 @@ define(['taskbar'], function(taskbar) {
imagelist.append(imageLabel); imagelist.append(imageLabel);
dropDiv.hide(); dropDiv.hide();
}); });
reader.readAsDataURL(file); reader.readAsDataURL(file);
} }
function initializeFileReader() { function initializeFileReader() {
jQuery.event.props.push( "dataTransfer" ); jQuery.event.props.push( "dataTransfer" );
var draggingDocument = false; var draggingDocument = false;
if(window.FileReader) { if(window.FileReader) {
@ -77,12 +77,12 @@ define(['taskbar'], function(taskbar) {
drop.off('dragleave'); drop.off('dragleave');
}); });
}); });
function cancel(e) { function cancel(e) {
e.preventDefault(); e.preventDefault();
return false; return false;
} }
drop.on('dragover', cancel); drop.on('dragover', cancel);
drop.on('dragenter', cancel); drop.on('dragenter', cancel);
@ -96,7 +96,7 @@ define(['taskbar'], function(taskbar) {
for (var i=0; i<files.length; i++) { for (var i=0; i<files.length; i++) {
loadFile(files[i]); loadFile(files[i]);
} }
if(!files.length) if(!files.length)
drop.hide(); drop.hide();
return false; return false;
@ -157,7 +157,7 @@ define(['taskbar'], function(taskbar) {
composer.load(uuid); composer.load(uuid);
} else { } else {
app.alert({ app.alert({
type: 'error', type: 'danger',
timeout: 5000, timeout: 5000,
alert_id: 'post_error', alert_id: 'post_error',
title: 'Please Log In to Post', title: 'Please Log In to Post',
@ -284,7 +284,7 @@ define(['taskbar'], function(taskbar) {
composer.reposition(post_uuid); composer.reposition(post_uuid);
composer.active = post_uuid; composer.active = post_uuid;
composer.postContainer.setAttribute('data-uuid', post_uuid); composer.postContainer.setAttribute('data-uuid', post_uuid);
if (parseInt(post_data.tid) > 0) { if (parseInt(post_data.tid) > 0) {
titleEl.value = 'Replying to: ' + post_data.title; titleEl.value = 'Replying to: ' + post_data.title;
@ -330,13 +330,13 @@ define(['taskbar'], function(taskbar) {
var postData = composer.posts[post_uuid], var postData = composer.posts[post_uuid],
titleEl = composer.postContainer.querySelector('input'), titleEl = composer.postContainer.querySelector('input'),
bodyEl = composer.postContainer.querySelector('textarea'); bodyEl = composer.postContainer.querySelector('textarea');
titleEl.value = titleEl.value.trim(); titleEl.value = titleEl.value.trim();
bodyEl.value = bodyEl.value.trim(); bodyEl.value = bodyEl.value.trim();
if (titleEl.value.length < config.minimumTitleLength) { if (titleEl.value.length < config.minimumTitleLength) {
return app.alert({ return app.alert({
type: 'error', type: 'danger',
timeout: 2000, timeout: 2000,
title: 'Title too short', title: 'Title too short',
message: "Please enter a longer title. At least " + config.minimumTitleLength+ " characters.", 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) { if (bodyEl.value.length < config.minimumPostLength) {
return app.alert({ return app.alert({
type: 'error', type: 'danger',
timeout: 2000, timeout: 2000,
title: 'Content too short', title: 'Content too short',
message: "Please enter a longer post. At least " + config.minimumPostLength + " characters.", message: "Please enter a longer post. At least " + config.minimumPostLength + " characters.",

@ -9,7 +9,7 @@
// ajaxify.go('install/redis'); // ajaxify.go('install/redis');
// app.alert({ // app.alert({
// alert_id: 'config-ready', // alert_id: 'config-ready',
// type: 'error', // type: 'danger',
// timeout: 10000, // timeout: 10000,
// title: 'NodeBB Configuration Not Ready!', // title: 'NodeBB Configuration Not Ready!',
// message: 'NodeBB cannot proceed with setup at this time as Redis database information ' + // message: 'NodeBB cannot proceed with setup at this time as Redis database information ' +
@ -134,7 +134,7 @@
timeout: 2500, timeout: 2500,
title: 'Configuration Not Saved', title: 'Configuration Not Saved',
message: 'NodeBB encountered a problem saving your changes', message: 'NodeBB encountered a problem saving your changes',
type: 'error' type: 'danger'
}); });
} }
}); });

@ -10,7 +10,7 @@ var RDB = require('./redis.js'),
alert_id: 'post_favourite', alert_id: 'post_favourite',
title: 'Not Logged In', title: 'Not Logged In',
message: 'Please log in in order to favourite this post', message: 'Please log in in order to favourite this post',
type: 'error', type: 'danger',
timeout: 5000 timeout: 5000
}); });
return; return;
@ -50,7 +50,7 @@ var RDB = require('./redis.js'),
alert_id: 'post_favourite', alert_id: 'post_favourite',
title: 'Not Logged In', title: 'Not Logged In',
message: 'Please log in in order to favourite this post', message: 'Please log in in order to favourite this post',
type: 'error', type: 'danger',
timeout: 5000 timeout: 5000
}); });
return; return;

@ -191,7 +191,7 @@ var RDB = require('./redis.js'),
Posts.emitContentTooShortAlert = function(socket) { Posts.emitContentTooShortAlert = function(socket) {
socket.emit('event:alert', { socket.emit('event:alert', {
type: 'error', type: 'danger',
timeout: 2000, timeout: 2000,
title: 'Content too short', title: 'Content too short',
message: "Please enter a longer post. At least " + meta.config.minimumPostLength + " characters.", 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', { socket.emit('event:alert', {
title: 'Too many posts!', title: 'Too many posts!',
message: 'You can only post every '+ meta.config.postDelay/1000 + ' seconds.', message: 'You can only post every '+ meta.config.postDelay/1000 + ' seconds.',
type: 'error', type: 'danger',
timeout: 2000 timeout: 2000
}); });
} }

@ -544,7 +544,7 @@ marked.setOptions({
Topics.emitTitleTooShortAlert = function(socket) { Topics.emitTitleTooShortAlert = function(socket) {
socket.emit('event:alert', { socket.emit('event:alert', {
type: 'error', type: 'danger',
timeout: 2000, timeout: 2000,
title: 'Title too short', title: 'Title too short',
message: "Please enter a longer title. At least " + meta.config.minimumTitleLength + " characters.", message: "Please enter a longer title. At least " + meta.config.minimumTitleLength + " characters.",

@ -363,7 +363,7 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }),
socket.emit('event:alert', { socket.emit('event:alert', {
title: 'Reply Unsuccessful', title: 'Reply Unsuccessful',
message: 'You don&apos;t seem to be logged in, so you cannot reply.', message: 'You don&apos;t seem to be logged in, so you cannot reply.',
type: 'error', type: 'danger',
timeout: 2000 timeout: 2000
}); });
return; return;

Loading…
Cancel
Save