v1.18.x
psychobunny 9 years ago
commit 8fdd82cc72

@ -57,8 +57,8 @@
"nodebb-plugin-spam-be-gone": "0.4.9", "nodebb-plugin-spam-be-gone": "0.4.9",
"nodebb-rewards-essentials": "0.0.9", "nodebb-rewards-essentials": "0.0.9",
"nodebb-theme-lavender": "3.0.13", "nodebb-theme-lavender": "3.0.13",
"nodebb-theme-persona": "4.1.13", "nodebb-theme-persona": "4.1.14",
"nodebb-theme-vanilla": "5.1.4", "nodebb-theme-vanilla": "5.1.5",
"nodebb-widget-essentials": "2.0.10", "nodebb-widget-essentials": "2.0.10",
"nodemailer": "2.0.0", "nodemailer": "2.0.0",
"nodemailer-sendmail-transport": "1.0.0", "nodemailer-sendmail-transport": "1.0.0",

@ -101,6 +101,7 @@
"topic_will_be_moved_to": "This topic will be moved to the category", "topic_will_be_moved_to": "This topic will be moved to the category",
"fork_topic_instruction": "Click the posts you want to fork", "fork_topic_instruction": "Click the posts you want to fork",
"fork_no_pids": "No posts selected!", "fork_no_pids": "No posts selected!",
"fork_pid_count": "%1 post(s) selected",
"fork_success": "Successfully forked topic! Click here to go to the forked topic.", "fork_success": "Successfully forked topic! Click here to go to the forked topic.",
"delete_posts_instruction": "Click the posts you want to delete/purge", "delete_posts_instruction": "Click the posts you want to delete/purge",

@ -120,5 +120,5 @@
"no-users-in-room": "No hay usuarios en esta sala", "no-users-in-room": "No hay usuarios en esta sala",
"cant-kick-self": "No te puedes expulsar a ti mismo del grupo", "cant-kick-self": "No te puedes expulsar a ti mismo del grupo",
"no-users-selected": "Ningun usuario(s) seleccionado", "no-users-selected": "Ningun usuario(s) seleccionado",
"invalid-home-page-route": "Invalid home page route" "invalid-home-page-route": "Ruta de página de inicio invalida"
} }

@ -0,0 +1,13 @@
'use strict';
/* globals define */
define('forum/account/info', ['forum/account/header'], function(header) {
var Info = {};
Info.init = function() {
header.init();
};
return Info;
});

@ -16,16 +16,12 @@ define('forum/topic/fork', ['components', 'postSelect'], function(components, po
parseModal(function(html) { parseModal(function(html) {
forkModal = $(html); forkModal = $(html);
forkModal.on('hidden.bs.modal', function() {
forkModal.remove();
});
forkCommit = forkModal.find('#fork_thread_commit'); forkCommit = forkModal.find('#fork_thread_commit');
showForkModal(); $(document.body).append(forkModal);
forkModal.find('.close,#fork_thread_cancel').on('click', closeForkModal); forkModal.find('.close,#fork_thread_cancel').on('click', closeForkModal);
forkModal.find('#fork-title').on('change', checkForkButtonEnable); forkModal.find('#fork-title').on('keyup', checkForkButtonEnable);
postSelect.init(function() { postSelect.init(function() {
checkForkButtonEnable(); checkForkButtonEnable();
@ -43,14 +39,6 @@ define('forum/topic/fork', ['components', 'postSelect'], function(components, po
}); });
} }
function showForkModal() {
forkModal.modal({backdrop: false, show: true})
.css('position', 'fixed')
.css('left', Math.max(0, (($(window).width() - forkModal.outerWidth()) / 2) + $(window).scrollLeft()) + 'px')
.css('top', '0px')
.css('z-index', '2000');
}
function createTopicFromPosts() { function createTopicFromPosts() {
forkCommit.attr('disabled', true); forkCommit.attr('disabled', true);
socket.emit('topics.createTopicFromPosts', { socket.emit('topics.createTopicFromPosts', {
@ -88,14 +76,14 @@ define('forum/topic/fork', ['components', 'postSelect'], function(components, po
function showPostsSelected() { function showPostsSelected() {
if (postSelect.pids.length) { if (postSelect.pids.length) {
forkModal.find('#fork-pids').text(postSelect.pids.join(', ')); forkModal.find('#fork-pids').translateHtml('[[topic:fork_pid_count, ' + postSelect.pids.length + ']]');
} else { } else {
forkModal.find('#fork-pids').translateHtml('[[topic:fork_no_pids]]'); forkModal.find('#fork-pids').translateHtml('[[topic:fork_no_pids]]');
} }
} }
function checkForkButtonEnable() { function checkForkButtonEnable() {
if (forkModal.find('#fork-title').length && postSelect.pids.length) { if (forkModal.find('#fork-title').val().length && postSelect.pids.length) {
forkCommit.removeAttr('disabled'); forkCommit.removeAttr('disabled');
} else { } else {
forkCommit.attr('disabled', true); forkCommit.attr('disabled', true);
@ -104,10 +92,10 @@ define('forum/topic/fork', ['components', 'postSelect'], function(components, po
function closeForkModal() { function closeForkModal() {
postSelect.pids.forEach(function(pid) { postSelect.pids.forEach(function(pid) {
components.get('post', 'pid', pid).css('opacity', 1); components.get('post', 'pid', pid).toggleClass('bg-success', false);
}); });
forkModal.modal('hide'); forkModal.remove();
components.get('topic').off('click', '[data-pid]'); components.get('topic').off('click', '[data-pid]');
postSelect.enableClicksOnPosts(); postSelect.enableClicksOnPosts();

@ -27,10 +27,10 @@ define('postSelect', ['components'], function(components) {
var index = PostSelect.pids.indexOf(newPid); var index = PostSelect.pids.indexOf(newPid);
if(index === -1) { if(index === -1) {
PostSelect.pids.push(newPid); PostSelect.pids.push(newPid);
post.css('opacity', '0.5'); post.toggleClass('bg-success', true);
} else { } else {
PostSelect.pids.splice(index, 1); PostSelect.pids.splice(index, 1);
post.css('opacity', '1.0'); post.toggleClass('bg-success', false);
} }
if (PostSelect.pids.length) { if (PostSelect.pids.length) {

@ -33,6 +33,7 @@
name: 'mongo:password', name: 'mongo:password',
description: 'Password of your MongoDB database', description: 'Password of your MongoDB database',
hidden: true, hidden: true,
default: nconf.get('mongo:password') || '',
before: function(value) { value = value || nconf.get('mongo:password') || ''; return value; } before: function(value) { value = value || nconf.get('mongo:password') || ''; return value; }
}, },
{ {

@ -25,6 +25,7 @@
name: 'redis:password', name: 'redis:password',
description: 'Password of your Redis database', description: 'Password of your Redis database',
hidden: true, hidden: true,
default: nconf.get('redis:password') || '',
before: function(value) { value = value || nconf.get('redis:password') || ''; return value; } before: function(value) { value = value || nconf.get('redis:password') || ''; return value; }
}, },
{ {

@ -43,8 +43,8 @@ questions.optional = [
]; ];
function checkSetupFlag(next) { function checkSetupFlag(next) {
var envSetupKeys = ['database'], var setupVal;
setupVal;
try { try {
if (nconf.get('setup')) { if (nconf.get('setup')) {
setupVal = JSON.parse(nconf.get('setup')); setupVal = JSON.parse(nconf.get('setup'));
@ -74,14 +74,10 @@ function checkSetupFlag(next) {
process.exit(); process.exit();
} }
} else if (envSetupKeys.every(function(key) { } else if (nconf.get('database')) {
return nconf.stores.env.store.hasOwnProperty(key); install.values = {
})) { database: nconf.get('database')
install.values = envSetupKeys.reduce(function(config, key) { };
config[key] = nconf.stores.env.store[key];
return config;
}, {});
next(); next();
} else { } else {
next(); next();

Loading…
Cancel
Save