mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +01:00
fix: #8734 make nprogress module
This commit is contained in:
@@ -54,6 +54,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
function setupNProgress() {
|
function setupNProgress() {
|
||||||
|
require(['nprogress'], function (NProgress) {
|
||||||
$(window).on('action:ajaxify.start', function () {
|
$(window).on('action:ajaxify.start', function () {
|
||||||
NProgress.set(0.7);
|
NProgress.set(0.7);
|
||||||
});
|
});
|
||||||
@@ -61,6 +62,7 @@
|
|||||||
$(window).on('action:ajaxify.end', function () {
|
$(window).on('action:ajaxify.end', function () {
|
||||||
NProgress.done();
|
NProgress.done();
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectMenuItem(url) {
|
function selectMenuItem(url) {
|
||||||
|
|||||||
@@ -94,7 +94,6 @@ JS.scripts = {
|
|||||||
'public/vendor/jquery/serializeObject/jquery.ba-serializeobject.min.js',
|
'public/vendor/jquery/serializeObject/jquery.ba-serializeobject.min.js',
|
||||||
'public/vendor/jquery/deserialize/jquery.deserialize.min.js',
|
'public/vendor/jquery/deserialize/jquery.deserialize.min.js',
|
||||||
'public/vendor/slideout/slideout.min.js',
|
'public/vendor/slideout/slideout.min.js',
|
||||||
'node_modules/nprogress/nprogress.js',
|
|
||||||
],
|
],
|
||||||
|
|
||||||
// modules listed below are built (/src/modules) so they can be defined anonymously
|
// modules listed below are built (/src/modules) so they can be defined anonymously
|
||||||
@@ -106,6 +105,7 @@ JS.scripts = {
|
|||||||
'zxcvbn.js': 'node_modules/zxcvbn/dist/zxcvbn.js',
|
'zxcvbn.js': 'node_modules/zxcvbn/dist/zxcvbn.js',
|
||||||
ace: 'node_modules/ace-builds/src-min',
|
ace: 'node_modules/ace-builds/src-min',
|
||||||
'clipboard.js': 'node_modules/clipboard/dist/clipboard.min.js',
|
'clipboard.js': 'node_modules/clipboard/dist/clipboard.min.js',
|
||||||
|
'nprogress.js': 'node_modules/nprogress/nprogress.js',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user