nodebb-plugin-composer-default 10.3.1 → 10.3.2
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/static/lib/composer/uploads.js +1 -1
- package/static/lib/composer.js +14 -18
package/package.json
CHANGED
|
@@ -226,7 +226,7 @@ define('composer/uploads', [
|
|
|
226
226
|
'[[error:parse-error]]';
|
|
227
227
|
|
|
228
228
|
if (xhr && xhr.status === 413) {
|
|
229
|
-
msg =
|
|
229
|
+
msg = '[[error:api.413]]';
|
|
230
230
|
}
|
|
231
231
|
alerts.error(msg);
|
|
232
232
|
$(window).trigger('action:composer.uploadError', {
|
package/static/lib/composer.js
CHANGED
|
@@ -52,16 +52,14 @@ define('composer', [
|
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
composer.posts[composer.active].modified = false;
|
|
55
|
+
composer.discardConfirm = bootbox.confirm('[[modules:composer.discard]]', function (confirm) {
|
|
56
|
+
if (confirm) {
|
|
57
|
+
composer.discard(composer.active);
|
|
58
|
+
} else {
|
|
59
|
+
composer.posts[composer.active].modified = true;
|
|
60
|
+
}
|
|
64
61
|
});
|
|
62
|
+
composer.posts[composer.active].modified = false;
|
|
65
63
|
}
|
|
66
64
|
});
|
|
67
65
|
|
|
@@ -378,15 +376,13 @@ define('composer', [
|
|
|
378
376
|
|
|
379
377
|
formatting.exitFullscreen();
|
|
380
378
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
btn.prop('disabled', false);
|
|
389
|
-
});
|
|
379
|
+
const btn = $(this).prop('disabled', true);
|
|
380
|
+
bootbox.confirm('[[modules:composer.discard]]', function (confirm) {
|
|
381
|
+
if (confirm) {
|
|
382
|
+
composer.discard(post_uuid);
|
|
383
|
+
removeComposerHistory();
|
|
384
|
+
}
|
|
385
|
+
btn.prop('disabled', false);
|
|
390
386
|
});
|
|
391
387
|
});
|
|
392
388
|
|