mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-14 11:32:52 +01:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
@@ -73,7 +73,7 @@ define('admin/manage/category', [
|
||||
}
|
||||
|
||||
|
||||
$('form.category input, form.category select')
|
||||
$('form.category input, form.category select').not($('.privilege-table-container input'))
|
||||
.on('change', function (ev) {
|
||||
modified(ev.target);
|
||||
})
|
||||
|
||||
16
public/vendor/bootbox/wrapper.js
vendored
16
public/vendor/bootbox/wrapper.js
vendored
@@ -52,12 +52,16 @@ require(['translator'], function (shim) {
|
||||
]).then(function (ref) {
|
||||
var translated = ref[0];
|
||||
var translatedAttrs = ref[1];
|
||||
translated.split(' || ').forEach(function (html, i) {
|
||||
$(nodes[i]).replaceWith(html);
|
||||
});
|
||||
translatedAttrs.split(' || ').forEach(function (text, i) {
|
||||
attrNodes[i][1].setAttribute(attrNodes[i][0], text);
|
||||
});
|
||||
if (translated) {
|
||||
translated.split(' || ').forEach(function (html, i) {
|
||||
$(nodes[i]).replaceWith(html);
|
||||
});
|
||||
}
|
||||
if (translatedAttrs) {
|
||||
translatedAttrs.split(' || ').forEach(function (text, i) {
|
||||
attrNodes[i][1].setAttribute(attrNodes[i][0], text);
|
||||
});
|
||||
}
|
||||
if (show) {
|
||||
$elem.modal('show');
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ module.exports = function (Posts) {
|
||||
var tid = data.tid;
|
||||
var content = data.content.toString();
|
||||
var timestamp = data.timestamp || Date.now();
|
||||
var isMain = data.isMain || false;
|
||||
|
||||
if (!uid && parseInt(uid, 10) !== 0) {
|
||||
return callback(new Error('[[error:invalid-uid]]'));
|
||||
@@ -106,6 +107,7 @@ module.exports = function (Posts) {
|
||||
});
|
||||
},
|
||||
function (postData, next) {
|
||||
postData.isMain = isMain;
|
||||
plugins.fireHook('action:post.save', _.clone(postData));
|
||||
next(null, postData);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user