nodebb-plugin-dbsearch 5.1.0 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/admin.js +10 -10
package/package.json
CHANGED
package/public/admin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
define('admin/plugins/dbsearch', [], function () {
|
|
3
|
+
define('admin/plugins/dbsearch', ['alerts'], function (alerts) {
|
|
4
4
|
var dbsearch = {};
|
|
5
5
|
var intervalId = 0;
|
|
6
6
|
|
|
@@ -21,7 +21,7 @@ define('admin/plugins/dbsearch', [], function () {
|
|
|
21
21
|
excludeCategories: $('#exclude-categories').val(),
|
|
22
22
|
}, function (data) {
|
|
23
23
|
if (typeof data === 'string') {
|
|
24
|
-
|
|
24
|
+
alerts.success('Settings saved');
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
|
|
@@ -35,10 +35,10 @@ define('admin/plugins/dbsearch', [], function () {
|
|
|
35
35
|
}
|
|
36
36
|
socket.emit('admin.plugins.dbsearch.reindex', function (err) {
|
|
37
37
|
if (err) {
|
|
38
|
-
|
|
38
|
+
alerts.error(err);
|
|
39
39
|
return clearProgress();
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
alerts.success('Started indexing content! This might take a while. You can check the progress on this page.');
|
|
42
42
|
startProgress();
|
|
43
43
|
});
|
|
44
44
|
});
|
|
@@ -53,10 +53,10 @@ define('admin/plugins/dbsearch', [], function () {
|
|
|
53
53
|
}
|
|
54
54
|
socket.emit('admin.plugins.dbsearch.clearIndex', function (err) {
|
|
55
55
|
if (err) {
|
|
56
|
-
|
|
56
|
+
alerts.error(err);
|
|
57
57
|
return clearProgress();
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
alerts.success('Started clearing index! This might take a while. You can check the progress on this page.');
|
|
60
60
|
startProgress();
|
|
61
61
|
});
|
|
62
62
|
});
|
|
@@ -65,12 +65,12 @@ define('admin/plugins/dbsearch', [], function () {
|
|
|
65
65
|
|
|
66
66
|
$('#changeLanguage').on('click', function () {
|
|
67
67
|
var lang = $('#indexLanguage').val();
|
|
68
|
-
|
|
68
|
+
alerts.success('Changing index language to "' + lang + '".');
|
|
69
69
|
socket.emit('admin.plugins.dbsearch.changeLanguage', lang, function (err) {
|
|
70
70
|
if (err) {
|
|
71
|
-
return
|
|
71
|
+
return alerts.error(err);
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
alerts.success('Search index language changed!');
|
|
74
74
|
});
|
|
75
75
|
});
|
|
76
76
|
};
|
|
@@ -91,7 +91,7 @@ define('admin/plugins/dbsearch', [], function () {
|
|
|
91
91
|
socket.emit('admin.plugins.dbsearch.checkProgress', function (err, progress) {
|
|
92
92
|
if (err) {
|
|
93
93
|
clearProgress();
|
|
94
|
-
return
|
|
94
|
+
return alerts.error(err);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
var working = parseInt(progress.working, 10);
|