mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +01:00
fix: no global bootbox (#9879)
* fix: require bootbox (easy ones) * fix: require bootbox (ugly ones) * fix(eslint): a lengthy line
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"maxerr" : 50, // {int} Maximum error before stopping
|
"maxerr" : 50, // {int} Maximum error before stopping
|
||||||
|
|
||||||
"esversion": 6,
|
"esversion": 9,
|
||||||
|
|
||||||
// Enforcing
|
// Enforcing
|
||||||
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
|
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
{
|
{
|
||||||
"maxerr" : 50, // {int} Maximum error before stopping
|
"maxerr" : 50, // {int} Maximum error before stopping
|
||||||
|
|
||||||
|
"esversion": 9,
|
||||||
|
|
||||||
// Enforcing
|
// Enforcing
|
||||||
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
|
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
|
||||||
"camelcase" : false, // true: Identifiers must be in camelCase
|
"camelcase" : false, // true: Identifiers must be in camelCase
|
||||||
@@ -42,7 +44,7 @@
|
|||||||
"evil" : false, // true: Tolerate use of `eval` and `new Function()`
|
"evil" : false, // true: Tolerate use of `eval` and `new Function()`
|
||||||
"expr" : false, // true: Tolerate `ExpressionStatement` as Programs
|
"expr" : false, // true: Tolerate `ExpressionStatement` as Programs
|
||||||
"funcscope" : false, // true: Tolerate defining variables inside control statements"
|
"funcscope" : false, // true: Tolerate defining variables inside control statements"
|
||||||
"globalstrict" : false, // true: Allow global "use strict" (also enables 'strict')
|
"globalstrict" : true, // true: Allow global "use strict" (also enables 'strict')
|
||||||
"iterator" : false, // true: Tolerate using the `__iterator__` property
|
"iterator" : false, // true: Tolerate using the `__iterator__` property
|
||||||
"lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block
|
"lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block
|
||||||
"laxbreak" : false, // true: Tolerate possibly unsafe line breakings
|
"laxbreak" : false, // true: Tolerate possibly unsafe line breakings
|
||||||
@@ -66,7 +68,6 @@
|
|||||||
"utils": true,
|
"utils": true,
|
||||||
"overrides": true,
|
"overrides": true,
|
||||||
"componentHandler": true,
|
"componentHandler": true,
|
||||||
"bootbox": true,
|
|
||||||
"templates": true,
|
"templates": true,
|
||||||
"Visibility": true,
|
"Visibility": true,
|
||||||
"Tinycon": true,
|
"Tinycon": true,
|
||||||
|
|||||||
@@ -20,12 +20,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
logoutTimer = setTimeout(function () {
|
logoutTimer = setTimeout(function () {
|
||||||
bootbox.alert({
|
require(['bootbox'], function (bootbox) {
|
||||||
closeButton: false,
|
bootbox.alert({
|
||||||
message: logoutMessage,
|
closeButton: false,
|
||||||
callback: function () {
|
message: logoutMessage,
|
||||||
window.location.reload();
|
callback: function () {
|
||||||
},
|
window.location.reload();
|
||||||
|
},
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}, 3600000);
|
}, 3600000);
|
||||||
}
|
}
|
||||||
@@ -141,22 +143,26 @@
|
|||||||
|
|
||||||
function setupRestartLinks() {
|
function setupRestartLinks() {
|
||||||
$('.rebuild-and-restart').off('click').on('click', function () {
|
$('.rebuild-and-restart').off('click').on('click', function () {
|
||||||
bootbox.confirm('[[admin/admin:alert.confirm-rebuild-and-restart]]', function (confirm) {
|
require(['bootbox'], function (bootbox) {
|
||||||
if (confirm) {
|
bootbox.confirm('[[admin/admin:alert.confirm-rebuild-and-restart]]', function (confirm) {
|
||||||
require(['admin/modules/instance'], function (instance) {
|
if (confirm) {
|
||||||
instance.rebuildAndRestart();
|
require(['admin/modules/instance'], function (instance) {
|
||||||
});
|
instance.rebuildAndRestart();
|
||||||
}
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.restart').off('click').on('click', function () {
|
$('.restart').off('click').on('click', function () {
|
||||||
bootbox.confirm('[[admin/admin:alert.confirm-restart]]', function (confirm) {
|
require(['bootbox'], function (bootbox) {
|
||||||
if (confirm) {
|
bootbox.confirm('[[admin/admin:alert.confirm-restart]]', function (confirm) {
|
||||||
require(['admin/modules/instance'], function (instance) {
|
if (confirm) {
|
||||||
instance.restart();
|
require(['admin/modules/instance'], function (instance) {
|
||||||
});
|
instance.restart();
|
||||||
}
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
define('admin/advanced/errors', ['Chart'], function (Chart) {
|
define('admin/advanced/errors', ['bootbox', 'Chart'], function (bootbox, Chart) {
|
||||||
var Errors = {};
|
var Errors = {};
|
||||||
|
|
||||||
Errors.init = function () {
|
Errors.init = function () {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
define('admin/appearance/themes', ['translator'], function (translator) {
|
define('admin/appearance/themes', ['bootbox', 'translator'], function (bootbox, translator) {
|
||||||
var Themes = {};
|
var Themes = {};
|
||||||
|
|
||||||
Themes.init = function () {
|
Themes.init = function () {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
define('admin/dashboard', ['Chart', 'translator', 'benchpress'], function (Chart, translator, Benchpress) {
|
define('admin/dashboard', ['Chart', 'translator', 'benchpress', 'bootbox'], function (Chart, translator, Benchpress, bootbox) {
|
||||||
var Admin = {};
|
var Admin = {};
|
||||||
var intervals = {
|
var intervals = {
|
||||||
rooms: false,
|
rooms: false,
|
||||||
|
|||||||
@@ -4,8 +4,9 @@
|
|||||||
define('admin/extend/plugins', [
|
define('admin/extend/plugins', [
|
||||||
'translator',
|
'translator',
|
||||||
'benchpress',
|
'benchpress',
|
||||||
|
'bootbox',
|
||||||
'jquery-ui/widgets/sortable',
|
'jquery-ui/widgets/sortable',
|
||||||
], function (translator, Benchpress) {
|
], function (translator, Benchpress, bootbox) {
|
||||||
var Plugins = {};
|
var Plugins = {};
|
||||||
Plugins.init = function () {
|
Plugins.init = function () {
|
||||||
var pluginsList = $('.plugins');
|
var pluginsList = $('.plugins');
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
|
|
||||||
|
|
||||||
define('admin/extend/widgets', [
|
define('admin/extend/widgets', [
|
||||||
|
'bootbox',
|
||||||
'jquery-ui/widgets/sortable',
|
'jquery-ui/widgets/sortable',
|
||||||
'jquery-ui/widgets/draggable',
|
'jquery-ui/widgets/draggable',
|
||||||
'jquery-ui/widgets/droppable',
|
'jquery-ui/widgets/droppable',
|
||||||
'jquery-ui/widgets/datepicker',
|
'jquery-ui/widgets/datepicker',
|
||||||
], function () {
|
], function (bootbox) {
|
||||||
var Widgets = {};
|
var Widgets = {};
|
||||||
|
|
||||||
Widgets.init = function () {
|
Widgets.init = function () {
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ define('admin/manage/category', [
|
|||||||
'categorySelector',
|
'categorySelector',
|
||||||
'benchpress',
|
'benchpress',
|
||||||
'api',
|
'api',
|
||||||
], function (uploader, iconSelect, categorySelector, Benchpress, api) {
|
'bootbox',
|
||||||
|
], function (uploader, iconSelect, categorySelector, Benchpress, api, bootbox) {
|
||||||
var Category = {};
|
var Category = {};
|
||||||
var updateHash = {};
|
var updateHash = {};
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
define('admin/manage/digest', function () {
|
define('admin/manage/digest', ['bootbox'], function (bootbox) {
|
||||||
var Digest = {};
|
var Digest = {};
|
||||||
|
|
||||||
Digest.init = function () {
|
Digest.init = function () {
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ define('admin/manage/group', [
|
|||||||
'groupSearch',
|
'groupSearch',
|
||||||
'slugify',
|
'slugify',
|
||||||
'api',
|
'api',
|
||||||
], function (memberList, iconSelect, translator, categorySelector, groupSearch, slugify, api) {
|
'bootbox',
|
||||||
|
], function (memberList, iconSelect, translator, categorySelector, groupSearch, slugify, api, bootbox) {
|
||||||
var Groups = {};
|
var Groups = {};
|
||||||
|
|
||||||
Groups.init = function () {
|
Groups.init = function () {
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ define('admin/manage/groups', [
|
|||||||
'categorySelector',
|
'categorySelector',
|
||||||
'slugify',
|
'slugify',
|
||||||
'api',
|
'api',
|
||||||
], function (categorySelector, slugify, api) {
|
'bootbox',
|
||||||
|
], function (categorySelector, slugify, api, bootbox) {
|
||||||
var Groups = {};
|
var Groups = {};
|
||||||
|
|
||||||
Groups.init = function () {
|
Groups.init = function () {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
define('admin/manage/registration', function () {
|
define('admin/manage/registration', ['bootbox'], function (bootbox) {
|
||||||
var Registration = {};
|
var Registration = {};
|
||||||
|
|
||||||
Registration.init = function () {
|
Registration.init = function () {
|
||||||
|
|||||||
@@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
|
|
||||||
define('admin/manage/tags', [
|
define('admin/manage/tags', [
|
||||||
|
'bootbox',
|
||||||
'forum/infinitescroll',
|
'forum/infinitescroll',
|
||||||
'admin/modules/selectable',
|
'admin/modules/selectable',
|
||||||
], function (infinitescroll, selectable) {
|
], function (bootbox, infinitescroll, selectable) {
|
||||||
var Tags = {};
|
var Tags = {};
|
||||||
|
|
||||||
Tags.init = function () {
|
Tags.init = function () {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
define('admin/modules/dashboard-line-graph', ['Chart', 'translator', 'benchpress', 'api', 'hooks'], function (Chart, translator, Benchpress, api, hooks) {
|
define('admin/modules/dashboard-line-graph', ['Chart', 'translator', 'benchpress', 'api', 'hooks', 'bootbox'], function (Chart, translator, Benchpress, api, hooks, bootbox) {
|
||||||
const Graph = {
|
const Graph = {
|
||||||
_current: null,
|
_current: null,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -545,11 +545,13 @@ $(document).ready(function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bootbox.confirm('[[global:unsaved-changes]]', function (navigate) {
|
require(['bootbox'], function (bootbox) {
|
||||||
if (navigate) {
|
bootbox.confirm('[[global:unsaved-changes]]', function (navigate) {
|
||||||
app.flags._unsaved = false;
|
if (navigate) {
|
||||||
process.call(_self);
|
app.flags._unsaved = false;
|
||||||
}
|
process.call(_self);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
return e.preventDefault();
|
return e.preventDefault();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -217,13 +217,15 @@ app.cacheBuster = null;
|
|||||||
app.handleInvalidSession = function () {
|
app.handleInvalidSession = function () {
|
||||||
socket.disconnect();
|
socket.disconnect();
|
||||||
app.logout(false);
|
app.logout(false);
|
||||||
bootbox.alert({
|
require(['bootbox'], function (bootbox) {
|
||||||
title: '[[error:invalid-session]]',
|
bootbox.alert({
|
||||||
message: '[[error:invalid-session-text]]',
|
title: '[[error:invalid-session]]',
|
||||||
closeButton: false,
|
message: '[[error:invalid-session-text]]',
|
||||||
callback: function () {
|
closeButton: false,
|
||||||
window.location.reload();
|
callback: function () {
|
||||||
},
|
window.location.reload();
|
||||||
|
},
|
||||||
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -233,13 +235,15 @@ app.cacheBuster = null;
|
|||||||
}
|
}
|
||||||
|
|
||||||
socket.disconnect();
|
socket.disconnect();
|
||||||
bootbox.alert({
|
require(['bootbox'], function (bootbox) {
|
||||||
title: '[[error:session-mismatch]]',
|
bootbox.alert({
|
||||||
message: '[[error:session-mismatch-text]]',
|
title: '[[error:session-mismatch]]',
|
||||||
closeButton: false,
|
message: '[[error:session-mismatch-text]]',
|
||||||
callback: function () {
|
closeButton: false,
|
||||||
window.location.reload();
|
callback: function () {
|
||||||
},
|
window.location.reload();
|
||||||
|
},
|
||||||
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -434,10 +438,12 @@ app.cacheBuster = null;
|
|||||||
if (!isDnD) {
|
if (!isDnD) {
|
||||||
return createChat();
|
return createChat();
|
||||||
}
|
}
|
||||||
bootbox.confirm('[[modules:chat.confirm-chat-with-dnd-user]]', function (ok) {
|
require(['bootbox'], function (bootbox) {
|
||||||
if (ok) {
|
bootbox.confirm('[[modules:chat.confirm-chat-with-dnd-user]]', function (ok) {
|
||||||
createChat();
|
if (ok) {
|
||||||
}
|
createChat();
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ define('forum/account/edit', [
|
|||||||
'translator',
|
'translator',
|
||||||
'api',
|
'api',
|
||||||
'hooks',
|
'hooks',
|
||||||
], function (header, picture, translator, api, hooks) {
|
'bootbox',
|
||||||
|
], function (header, picture, translator, api, hooks, bootbox) {
|
||||||
var AccountEdit = {};
|
var AccountEdit = {};
|
||||||
|
|
||||||
AccountEdit.init = function () {
|
AccountEdit.init = function () {
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ define('forum/account/header', [
|
|||||||
'benchpress',
|
'benchpress',
|
||||||
'accounts/delete',
|
'accounts/delete',
|
||||||
'api',
|
'api',
|
||||||
], function (coverPhoto, pictureCropper, components, translator, Benchpress, AccountsDelete, api) {
|
'bootbox',
|
||||||
|
], function (coverPhoto, pictureCropper, components, translator, Benchpress, AccountsDelete, api, bootbox) {
|
||||||
var AccountHeader = {};
|
var AccountHeader = {};
|
||||||
var isAdminOrSelfOrGlobalMod;
|
var isAdminOrSelfOrGlobalMod;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,12 @@ define('forum/chats', [
|
|||||||
'benchpress',
|
'benchpress',
|
||||||
'composer/autocomplete',
|
'composer/autocomplete',
|
||||||
'hooks',
|
'hooks',
|
||||||
], function (components, translator, mousetrap, recentChats, search, messages, Benchpress, autocomplete, hooks) {
|
'bootbox',
|
||||||
|
], function (
|
||||||
|
components, translator, mousetrap,
|
||||||
|
recentChats, search, messages, Benchpress,
|
||||||
|
autocomplete, hooks, bootbox
|
||||||
|
) {
|
||||||
var Chats = {
|
var Chats = {
|
||||||
initialised: false,
|
initialised: false,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
define('forum/chats/messages', ['components', 'translator', 'benchpress', 'hooks'], function (components, translator, Benchpress, hooks) {
|
define('forum/chats/messages', ['components', 'translator', 'benchpress', 'hooks', 'bootbox'], function (components, translator, Benchpress, hooks, bootbox) {
|
||||||
var messages = {};
|
var messages = {};
|
||||||
|
|
||||||
messages.sendMessage = function (roomId, inputEl) {
|
messages.sendMessage = function (roomId, inputEl) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
define('forum/flags/detail', ['forum/flags/list', 'components', 'translator', 'benchpress', 'forum/account/header', 'accounts/delete', 'api'], function (FlagsList, components, translator, Benchpress, AccountHeader, AccountsDelete, api) {
|
define('forum/flags/detail', ['forum/flags/list', 'components', 'translator', 'benchpress', 'forum/account/header', 'accounts/delete', 'api', 'bootbox'], function (FlagsList, components, translator, Benchpress, AccountHeader, AccountsDelete, api, bootbox) {
|
||||||
var Detail = {};
|
var Detail = {};
|
||||||
|
|
||||||
Detail.init = function () {
|
Detail.init = function () {
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ define('forum/groups/details', [
|
|||||||
'api',
|
'api',
|
||||||
'slugify',
|
'slugify',
|
||||||
'categorySelector',
|
'categorySelector',
|
||||||
|
'bootbox',
|
||||||
], function (
|
], function (
|
||||||
memberList,
|
memberList,
|
||||||
iconSelect,
|
iconSelect,
|
||||||
@@ -19,7 +20,8 @@ define('forum/groups/details', [
|
|||||||
translator,
|
translator,
|
||||||
api,
|
api,
|
||||||
slugify,
|
slugify,
|
||||||
categorySelector
|
categorySelector,
|
||||||
|
bootbox
|
||||||
) {
|
) {
|
||||||
var Details = {};
|
var Details = {};
|
||||||
var groupName;
|
var groupName;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
define('forum/groups/list', [
|
define('forum/groups/list', [
|
||||||
'forum/infinitescroll', 'benchpress', 'api',
|
'forum/infinitescroll', 'benchpress', 'api', 'bootbox',
|
||||||
], function (infinitescroll, Benchpress, api) {
|
], function (infinitescroll, Benchpress, api, bootbox) {
|
||||||
var Groups = {};
|
var Groups = {};
|
||||||
|
|
||||||
Groups.init = function () {
|
Groups.init = function () {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
define('forum/groups/memberlist', ['api'], function (api) {
|
define('forum/groups/memberlist', ['api', 'bootbox'], function (api, bootbox) {
|
||||||
var MemberList = {};
|
var MemberList = {};
|
||||||
var searchInterval;
|
var searchInterval;
|
||||||
var groupName;
|
var groupName;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
define('forum/ip-blacklist', ['Chart', 'benchpress'], function (Chart, Benchpress) {
|
define('forum/ip-blacklist', ['Chart', 'benchpress', 'bootbox'], function (Chart, Benchpress, bootbox) {
|
||||||
var Blacklist = {};
|
var Blacklist = {};
|
||||||
|
|
||||||
Blacklist.init = function () {
|
Blacklist.init = function () {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
define('forum/pagination', function () {
|
define('forum/pagination', ['bootbox'], function (bootbox) {
|
||||||
var pagination = {};
|
var pagination = {};
|
||||||
|
|
||||||
pagination.init = function () {
|
pagination.init = function () {
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
|
|
||||||
define('forum/register', [
|
define('forum/register', [
|
||||||
'translator', 'zxcvbn', 'slugify', 'api', 'forum/login', 'jquery-form',
|
'translator', 'zxcvbn', 'slugify', 'api', 'bootbox', 'forum/login', 'jquery-form',
|
||||||
], function (translator, zxcvbn, slugify, api, Login) {
|
], function (translator, zxcvbn, slugify, api, bootbox, Login) {
|
||||||
var Register = {};
|
var Register = {};
|
||||||
var validationError = false;
|
var validationError = false;
|
||||||
var successIcon = '';
|
var successIcon = '';
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ define('forum/topic/threadTools', [
|
|||||||
'forum/topic/posts',
|
'forum/topic/posts',
|
||||||
'api',
|
'api',
|
||||||
'hooks',
|
'hooks',
|
||||||
], function (components, translator, handleBack, posts, api, hooks) {
|
'bootbox',
|
||||||
|
], function (components, translator, handleBack, posts, api, hooks, bootbox) {
|
||||||
var ThreadTools = {};
|
var ThreadTools = {};
|
||||||
|
|
||||||
ThreadTools.init = function (tid, topicContainer) {
|
ThreadTools.init = function (tid, topicContainer) {
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
|
|
||||||
define('forum/topic/votes', [
|
define('forum/topic/votes', [
|
||||||
'components', 'translator', 'benchpress', 'api', 'hooks',
|
'components', 'translator', 'benchpress', 'api', 'hooks', 'bootbox',
|
||||||
], function (components, translator, Benchpress, api, hooks) {
|
], function (components, translator, Benchpress, api, hooks, bootbox) {
|
||||||
var Votes = {};
|
var Votes = {};
|
||||||
|
|
||||||
Votes.addVoteHandler = function () {
|
Votes.addVoteHandler = function () {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
define('accounts/delete', ['api', 'bootbox'], function (api) {
|
define('accounts/delete', ['api', 'bootbox'], function (api, bootbox) {
|
||||||
var Delete = {};
|
var Delete = {};
|
||||||
|
|
||||||
Delete.account = function (uid, callback) {
|
Delete.account = function (uid, callback) {
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
define('accounts/picture', [
|
define('accounts/picture', [
|
||||||
'pictureCropper',
|
'pictureCropper',
|
||||||
'api',
|
'api',
|
||||||
], (pictureCropper, api) => {
|
'bootbox',
|
||||||
|
], (pictureCropper, api, bootbox) => {
|
||||||
const Picture = {};
|
const Picture = {};
|
||||||
|
|
||||||
Picture.openChangeModal = () => {
|
Picture.openChangeModal = () => {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
define('iconSelect', ['benchpress'], function (Benchpress) {
|
define('iconSelect', ['benchpress', 'bootbox'], function (Benchpress, bootbox) {
|
||||||
var iconSelect = {};
|
var iconSelect = {};
|
||||||
|
|
||||||
iconSelect.init = function (el, onModified) {
|
iconSelect.init = function (el, onModified) {
|
||||||
|
|||||||
@@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
define('settings/sorted-list', [
|
define('settings/sorted-list', [
|
||||||
'benchpress',
|
'benchpress',
|
||||||
|
'bootbox',
|
||||||
'hooks',
|
'hooks',
|
||||||
'jquery-ui/widgets/sortable',
|
'jquery-ui/widgets/sortable',
|
||||||
], function (benchpress, hooks) {
|
], function (benchpress, bootbox, hooks) {
|
||||||
var SortedList;
|
var SortedList;
|
||||||
var Settings;
|
var Settings;
|
||||||
|
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ socket = window.socket;
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onEventBanned(data) {
|
function onEventBanned(data) {
|
||||||
require(['translator'], function (translator) {
|
require(['bootbox', 'translator'], function (bootbox, translator) {
|
||||||
var message = data.until ?
|
var message = data.until ?
|
||||||
translator.compile('error:user-banned-reason-until', (new Date(data.until).toLocaleString()), data.reason) :
|
translator.compile('error:user-banned-reason-until', (new Date(data.until).toLocaleString()), data.reason) :
|
||||||
'[[error:user-banned-reason, ' + data.reason + ']]';
|
'[[error:user-banned-reason, ' + data.reason + ']]';
|
||||||
|
|||||||
Reference in New Issue
Block a user