nodebb-plugin-composer-default 10.0.45 → 10.0.47
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/.gitattributes +22 -22
- package/.jshintrc +85 -85
- package/LICENSE +6 -6
- package/README.md +10 -10
- package/package.json +1 -1
- package/static/lib/composer/scheduler.js +8 -0
- package/static/lib/composer.js +9 -7
- package/static/templates/modals/topic-scheduler.tpl +0 -0
- package/static/templates/partials/composer-title-container.tpl +14 -13
package/.gitattributes
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
# Auto detect text files and perform LF normalization
|
|
2
|
-
* text=auto
|
|
3
|
-
|
|
4
|
-
# Custom for Visual Studio
|
|
5
|
-
*.cs diff=csharp
|
|
6
|
-
*.sln merge=union
|
|
7
|
-
*.csproj merge=union
|
|
8
|
-
*.vbproj merge=union
|
|
9
|
-
*.fsproj merge=union
|
|
10
|
-
*.dbproj merge=union
|
|
11
|
-
|
|
12
|
-
# Standard to msysgit
|
|
13
|
-
*.doc diff=astextplain
|
|
14
|
-
*.DOC diff=astextplain
|
|
15
|
-
*.docx diff=astextplain
|
|
16
|
-
*.DOCX diff=astextplain
|
|
17
|
-
*.dot diff=astextplain
|
|
18
|
-
*.DOT diff=astextplain
|
|
19
|
-
*.pdf diff=astextplain
|
|
20
|
-
*.PDF diff=astextplain
|
|
21
|
-
*.rtf diff=astextplain
|
|
22
|
-
*.RTF diff=astextplain
|
|
1
|
+
# Auto detect text files and perform LF normalization
|
|
2
|
+
* text=auto
|
|
3
|
+
|
|
4
|
+
# Custom for Visual Studio
|
|
5
|
+
*.cs diff=csharp
|
|
6
|
+
*.sln merge=union
|
|
7
|
+
*.csproj merge=union
|
|
8
|
+
*.vbproj merge=union
|
|
9
|
+
*.fsproj merge=union
|
|
10
|
+
*.dbproj merge=union
|
|
11
|
+
|
|
12
|
+
# Standard to msysgit
|
|
13
|
+
*.doc diff=astextplain
|
|
14
|
+
*.DOC diff=astextplain
|
|
15
|
+
*.docx diff=astextplain
|
|
16
|
+
*.DOCX diff=astextplain
|
|
17
|
+
*.dot diff=astextplain
|
|
18
|
+
*.DOT diff=astextplain
|
|
19
|
+
*.pdf diff=astextplain
|
|
20
|
+
*.PDF diff=astextplain
|
|
21
|
+
*.rtf diff=astextplain
|
|
22
|
+
*.RTF diff=astextplain
|
package/.jshintrc
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
{
|
|
2
|
-
// JSHint Default Configuration File (as on JSHint website)
|
|
3
|
-
// See http://jshint.com/docs/ for more details
|
|
4
|
-
|
|
5
|
-
"maxerr" : 50, // {int} Maximum error before stopping
|
|
6
|
-
|
|
7
|
-
// Enforcing
|
|
8
|
-
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
|
|
9
|
-
"camelcase" : false, // true: Identifiers must be in camelCase
|
|
10
|
-
"curly" : true, // true: Require {} for every new block or scope
|
|
11
|
-
"eqeqeq" : true, // true: Require triple equals (===) for comparison
|
|
12
|
-
"forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty()
|
|
13
|
-
"immed" : false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());`
|
|
14
|
-
"indent" : 4, // {int} Number of spaces to use for indentation
|
|
15
|
-
"latedef" : false, // true: Require variables/functions to be defined before being used
|
|
16
|
-
"newcap" : false, // true: Require capitalization of all constructor functions e.g. `new F()`
|
|
17
|
-
"noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee`
|
|
18
|
-
"noempty" : true, // true: Prohibit use of empty blocks
|
|
19
|
-
"nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment)
|
|
20
|
-
"plusplus" : false, // true: Prohibit use of `++` & `--`
|
|
21
|
-
"quotmark" : false, // Quotation mark consistency:
|
|
22
|
-
// false : do nothing (default)
|
|
23
|
-
// true : ensure whatever is used is consistent
|
|
24
|
-
// "single" : require single quotes
|
|
25
|
-
// "double" : require double quotes
|
|
26
|
-
"undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
|
|
27
|
-
"unused" : true, // true: Require all defined variables be used
|
|
28
|
-
"strict" : true, // true: Requires all functions run in ES5 Strict Mode
|
|
29
|
-
"trailing" : false, // true: Prohibit trailing whitespaces
|
|
30
|
-
"maxparams" : false, // {int} Max number of formal params allowed per function
|
|
31
|
-
"maxdepth" : false, // {int} Max depth of nested blocks (within functions)
|
|
32
|
-
"maxstatements" : false, // {int} Max number statements per function
|
|
33
|
-
"maxcomplexity" : false, // {int} Max cyclomatic complexity per function
|
|
34
|
-
"maxlen" : false, // {int} Max number of characters per line
|
|
35
|
-
|
|
36
|
-
// Relaxing
|
|
37
|
-
"asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
|
|
38
|
-
"boss" : false, // true: Tolerate assignments where comparisons would be expected
|
|
39
|
-
"debug" : false, // true: Allow debugger statements e.g. browser breakpoints.
|
|
40
|
-
"eqnull" : false, // true: Tolerate use of `== null`
|
|
41
|
-
"es5" : false, // true: Allow ES5 syntax (ex: getters and setters)
|
|
42
|
-
"esnext" : false, // true: Allow ES.next (ES6) syntax (ex: `const`)
|
|
43
|
-
"moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features)
|
|
44
|
-
// (ex: `for each`, multiple try/catch, function expression…)
|
|
45
|
-
"evil" : false, // true: Tolerate use of `eval` and `new Function()`
|
|
46
|
-
"expr" : false, // true: Tolerate `ExpressionStatement` as Programs
|
|
47
|
-
"funcscope" : false, // true: Tolerate defining variables inside control statements"
|
|
48
|
-
"globalstrict" : false, // true: Allow global "use strict" (also enables 'strict')
|
|
49
|
-
"iterator" : false, // true: Tolerate using the `__iterator__` property
|
|
50
|
-
"lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block
|
|
51
|
-
"laxbreak" : false, // true: Tolerate possibly unsafe line breakings
|
|
52
|
-
"laxcomma" : false, // true: Tolerate comma-first style coding
|
|
53
|
-
"loopfunc" : false, // true: Tolerate functions being defined in loops
|
|
54
|
-
"multistr" : false, // true: Tolerate multi-line strings
|
|
55
|
-
"proto" : false, // true: Tolerate using the `__proto__` property
|
|
56
|
-
"scripturl" : false, // true: Tolerate script-targeted URLs
|
|
57
|
-
"smarttabs" : false, // true: Tolerate mixed tabs/spaces when used for alignment
|
|
58
|
-
"shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;`
|
|
59
|
-
"sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
|
|
60
|
-
"supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;`
|
|
61
|
-
"validthis" : false, // true: Tolerate using this in a non-constructor function
|
|
62
|
-
|
|
63
|
-
// Environments
|
|
64
|
-
"browser" : true, // Web Browser (window, document, etc)
|
|
65
|
-
"couch" : false, // CouchDB
|
|
66
|
-
"devel" : true, // Development/debugging (alert, confirm, etc)
|
|
67
|
-
"dojo" : false, // Dojo Toolkit
|
|
68
|
-
"jquery" : true, // jQuery
|
|
69
|
-
"mootools" : false, // MooTools
|
|
70
|
-
"node" : true, // Node.js
|
|
71
|
-
"nonstandard" : false, // Widely adopted globals (escape, unescape, etc)
|
|
72
|
-
"prototypejs" : false, // Prototype and Scriptaculous
|
|
73
|
-
"rhino" : false, // Rhino
|
|
74
|
-
"worker" : false, // Web Workers
|
|
75
|
-
"wsh" : false, // Windows Scripting Host
|
|
76
|
-
"yui" : false, // Yahoo User Interface
|
|
77
|
-
|
|
78
|
-
// Legacy
|
|
79
|
-
"nomen" : false, // true: Prohibit dangling `_` in variables
|
|
80
|
-
"onevar" : false, // true: Allow only one `var` statement per function
|
|
81
|
-
"passfail" : false, // true: Stop on first error
|
|
82
|
-
"white" : false, // true: Check against strict whitespace and indentation rules
|
|
83
|
-
|
|
84
|
-
// Custom Globals
|
|
85
|
-
"globals" : {} // additional predefined global variables
|
|
1
|
+
{
|
|
2
|
+
// JSHint Default Configuration File (as on JSHint website)
|
|
3
|
+
// See http://jshint.com/docs/ for more details
|
|
4
|
+
|
|
5
|
+
"maxerr" : 50, // {int} Maximum error before stopping
|
|
6
|
+
|
|
7
|
+
// Enforcing
|
|
8
|
+
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
|
|
9
|
+
"camelcase" : false, // true: Identifiers must be in camelCase
|
|
10
|
+
"curly" : true, // true: Require {} for every new block or scope
|
|
11
|
+
"eqeqeq" : true, // true: Require triple equals (===) for comparison
|
|
12
|
+
"forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty()
|
|
13
|
+
"immed" : false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());`
|
|
14
|
+
"indent" : 4, // {int} Number of spaces to use for indentation
|
|
15
|
+
"latedef" : false, // true: Require variables/functions to be defined before being used
|
|
16
|
+
"newcap" : false, // true: Require capitalization of all constructor functions e.g. `new F()`
|
|
17
|
+
"noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee`
|
|
18
|
+
"noempty" : true, // true: Prohibit use of empty blocks
|
|
19
|
+
"nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment)
|
|
20
|
+
"plusplus" : false, // true: Prohibit use of `++` & `--`
|
|
21
|
+
"quotmark" : false, // Quotation mark consistency:
|
|
22
|
+
// false : do nothing (default)
|
|
23
|
+
// true : ensure whatever is used is consistent
|
|
24
|
+
// "single" : require single quotes
|
|
25
|
+
// "double" : require double quotes
|
|
26
|
+
"undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
|
|
27
|
+
"unused" : true, // true: Require all defined variables be used
|
|
28
|
+
"strict" : true, // true: Requires all functions run in ES5 Strict Mode
|
|
29
|
+
"trailing" : false, // true: Prohibit trailing whitespaces
|
|
30
|
+
"maxparams" : false, // {int} Max number of formal params allowed per function
|
|
31
|
+
"maxdepth" : false, // {int} Max depth of nested blocks (within functions)
|
|
32
|
+
"maxstatements" : false, // {int} Max number statements per function
|
|
33
|
+
"maxcomplexity" : false, // {int} Max cyclomatic complexity per function
|
|
34
|
+
"maxlen" : false, // {int} Max number of characters per line
|
|
35
|
+
|
|
36
|
+
// Relaxing
|
|
37
|
+
"asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
|
|
38
|
+
"boss" : false, // true: Tolerate assignments where comparisons would be expected
|
|
39
|
+
"debug" : false, // true: Allow debugger statements e.g. browser breakpoints.
|
|
40
|
+
"eqnull" : false, // true: Tolerate use of `== null`
|
|
41
|
+
"es5" : false, // true: Allow ES5 syntax (ex: getters and setters)
|
|
42
|
+
"esnext" : false, // true: Allow ES.next (ES6) syntax (ex: `const`)
|
|
43
|
+
"moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features)
|
|
44
|
+
// (ex: `for each`, multiple try/catch, function expression…)
|
|
45
|
+
"evil" : false, // true: Tolerate use of `eval` and `new Function()`
|
|
46
|
+
"expr" : false, // true: Tolerate `ExpressionStatement` as Programs
|
|
47
|
+
"funcscope" : false, // true: Tolerate defining variables inside control statements"
|
|
48
|
+
"globalstrict" : false, // true: Allow global "use strict" (also enables 'strict')
|
|
49
|
+
"iterator" : false, // true: Tolerate using the `__iterator__` property
|
|
50
|
+
"lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block
|
|
51
|
+
"laxbreak" : false, // true: Tolerate possibly unsafe line breakings
|
|
52
|
+
"laxcomma" : false, // true: Tolerate comma-first style coding
|
|
53
|
+
"loopfunc" : false, // true: Tolerate functions being defined in loops
|
|
54
|
+
"multistr" : false, // true: Tolerate multi-line strings
|
|
55
|
+
"proto" : false, // true: Tolerate using the `__proto__` property
|
|
56
|
+
"scripturl" : false, // true: Tolerate script-targeted URLs
|
|
57
|
+
"smarttabs" : false, // true: Tolerate mixed tabs/spaces when used for alignment
|
|
58
|
+
"shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;`
|
|
59
|
+
"sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
|
|
60
|
+
"supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;`
|
|
61
|
+
"validthis" : false, // true: Tolerate using this in a non-constructor function
|
|
62
|
+
|
|
63
|
+
// Environments
|
|
64
|
+
"browser" : true, // Web Browser (window, document, etc)
|
|
65
|
+
"couch" : false, // CouchDB
|
|
66
|
+
"devel" : true, // Development/debugging (alert, confirm, etc)
|
|
67
|
+
"dojo" : false, // Dojo Toolkit
|
|
68
|
+
"jquery" : true, // jQuery
|
|
69
|
+
"mootools" : false, // MooTools
|
|
70
|
+
"node" : true, // Node.js
|
|
71
|
+
"nonstandard" : false, // Widely adopted globals (escape, unescape, etc)
|
|
72
|
+
"prototypejs" : false, // Prototype and Scriptaculous
|
|
73
|
+
"rhino" : false, // Rhino
|
|
74
|
+
"worker" : false, // Web Workers
|
|
75
|
+
"wsh" : false, // Windows Scripting Host
|
|
76
|
+
"yui" : false, // Yahoo User Interface
|
|
77
|
+
|
|
78
|
+
// Legacy
|
|
79
|
+
"nomen" : false, // true: Prohibit dangling `_` in variables
|
|
80
|
+
"onevar" : false, // true: Allow only one `var` statement per function
|
|
81
|
+
"passfail" : false, // true: Stop on first error
|
|
82
|
+
"white" : false, // true: Check against strict whitespace and indentation rules
|
|
83
|
+
|
|
84
|
+
// Custom Globals
|
|
85
|
+
"globals" : {} // additional predefined global variables
|
|
86
86
|
}
|
package/LICENSE
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
Copyright (c) 2016 NodeBB Inc.
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
-
|
|
5
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
-
|
|
1
|
+
Copyright (c) 2016 NodeBB Inc.
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
7
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# Default Composer for NodeBB
|
|
2
|
-
|
|
3
|
-
This plugin activates the default composer for NodeBB. It is activated by default, but can be swapped out as necessary.
|
|
4
|
-
|
|
5
|
-
## Screenshots
|
|
6
|
-
|
|
7
|
-
### Desktop
|
|
8
|
-

|
|
9
|
-
|
|
10
|
-
### Mobile Devices
|
|
1
|
+
# Default Composer for NodeBB
|
|
2
|
+
|
|
3
|
+
This plugin activates the default composer for NodeBB. It is activated by default, but can be swapped out as necessary.
|
|
4
|
+
|
|
5
|
+
## Screenshots
|
|
6
|
+
|
|
7
|
+
### Desktop
|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
### Mobile Devices
|
|
11
11
|

|
package/package.json
CHANGED
|
@@ -10,6 +10,9 @@ define('composer/scheduler', ['benchpress', 'bootbox', 'alerts'], function (Benc
|
|
|
10
10
|
};
|
|
11
11
|
let displayBtnCons = [];
|
|
12
12
|
let displayBtns;
|
|
13
|
+
let submitContainer;
|
|
14
|
+
let submitOptionsCon;
|
|
15
|
+
|
|
13
16
|
const submitBtn = {
|
|
14
17
|
el: null,
|
|
15
18
|
icon: null,
|
|
@@ -27,6 +30,8 @@ define('composer/scheduler', ['benchpress', 'bootbox', 'alerts'], function (Benc
|
|
|
27
30
|
|
|
28
31
|
displayBtnCons = $postContainer[0].querySelectorAll('.display-scheduler');
|
|
29
32
|
displayBtns = $postContainer[0].querySelectorAll('.display-scheduler i');
|
|
33
|
+
submitContainer = $postContainer.find('[component="composer/submit/container"]');
|
|
34
|
+
submitOptionsCon = $postContainer.find('[component="composer/submit/options/container"]');
|
|
30
35
|
|
|
31
36
|
submitBtn.el = $postContainer[0].querySelector('.composer-submit:not(.btn-sm)');
|
|
32
37
|
submitBtn.icon = submitBtn.el.querySelector('i');
|
|
@@ -58,6 +63,9 @@ define('composer/scheduler', ['benchpress', 'bootbox', 'alerts'], function (Benc
|
|
|
58
63
|
scheduler.onChangeCategory = function (categoryData) {
|
|
59
64
|
toggleDisplayButtons(categoryData.privileges['topics:schedule']);
|
|
60
65
|
toggleItems(false);
|
|
66
|
+
const optionsVisible = categoryData.privileges['topics:schedule'] || submitOptionsCon.attr('data-submit-options') > 0;
|
|
67
|
+
submitContainer.find('.composer-submit').toggleClass('rounded-1', !optionsVisible);
|
|
68
|
+
submitOptionsCon.toggleClass('hidden', !optionsVisible);
|
|
61
69
|
scheduler.reset();
|
|
62
70
|
};
|
|
63
71
|
|
package/static/lib/composer.js
CHANGED
|
@@ -131,6 +131,10 @@ define('composer', [
|
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
function push(post) {
|
|
134
|
+
if (!post) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
|
|
134
138
|
var uuid = utils.generateUUID();
|
|
135
139
|
var existingUUID = alreadyOpen(post);
|
|
136
140
|
|
|
@@ -332,9 +336,6 @@ define('composer', [
|
|
|
332
336
|
postContainer.attr('data-uuid', post_uuid);
|
|
333
337
|
}
|
|
334
338
|
|
|
335
|
-
var bodyEl = postContainer.find('textarea');
|
|
336
|
-
var submitBtn = postContainer.find('.composer-submit');
|
|
337
|
-
|
|
338
339
|
categoryList.init(postContainer, composer.posts[post_uuid]);
|
|
339
340
|
scheduler.init(postContainer, composer.posts);
|
|
340
341
|
|
|
@@ -350,7 +351,7 @@ define('composer', [
|
|
|
350
351
|
composer.posts[post_uuid].modified = true;
|
|
351
352
|
});
|
|
352
353
|
|
|
353
|
-
|
|
354
|
+
postContainer.on('click', '.composer-submit', function (e) {
|
|
354
355
|
e.preventDefault();
|
|
355
356
|
e.stopPropagation(); // Other click events bring composer back to active state which is undesired on submit
|
|
356
357
|
|
|
@@ -360,7 +361,7 @@ define('composer', [
|
|
|
360
361
|
|
|
361
362
|
require(['mousetrap'], function (mousetrap) {
|
|
362
363
|
mousetrap(postContainer.get(0)).bind('mod+enter', function () {
|
|
363
|
-
|
|
364
|
+
postContainer.find('.composer-submit').attr('disabled', true);
|
|
364
365
|
post(post_uuid);
|
|
365
366
|
});
|
|
366
367
|
});
|
|
@@ -393,11 +394,12 @@ define('composer', [
|
|
|
393
394
|
composer.minimize(post_uuid);
|
|
394
395
|
});
|
|
395
396
|
|
|
396
|
-
|
|
397
|
+
const textareaEl = postContainer.find('textarea');
|
|
398
|
+
textareaEl.on('input propertychange', utils.debounce(function () {
|
|
397
399
|
preview.render(postContainer);
|
|
398
400
|
}, 250));
|
|
399
401
|
|
|
400
|
-
|
|
402
|
+
textareaEl.on('scroll', function () {
|
|
401
403
|
preview.matchScroll(postContainer);
|
|
402
404
|
});
|
|
403
405
|
|
|
File without changes
|
|
@@ -25,19 +25,20 @@
|
|
|
25
25
|
<div class="d-none d-md-flex action-bar gap-1 align-items-center">
|
|
26
26
|
<button class="btn btn-sm btn-link text-body fw-semibold composer-minimize" data-action="hide" tabindex="-1"><i class="fa fa-angle-down"></i> [[topic:composer.hide]]</button>
|
|
27
27
|
<button class="btn btn-sm btn-link composer-discard text-body fw-semibold" data-action="discard" tabindex="-1"><i class="fa fa-trash"></i> [[topic:composer.discard]]</button>
|
|
28
|
-
<div class="btn-group btn-group-sm">
|
|
29
|
-
<button class="btn btn-primary composer-submit fw-bold" data-action="post" tabindex="6" data-text-variant=" [[topic:composer.schedule]]"><i class="fa fa-check"></i> [[topic:composer.submit]]</button>
|
|
30
|
-
{{{ if (submitOptions.length || canSchedule) }}}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
<div class="btn-group btn-group-sm" component="composer/submit/container">
|
|
29
|
+
<button class="btn btn-primary composer-submit fw-bold {{{ if !(submitOptions.length || canSchedule) }}}rounded-1{{{ end }}}" data-action="post" tabindex="6" data-text-variant=" [[topic:composer.schedule]]"><i class="fa fa-check"></i> [[topic:composer.submit]]</button>
|
|
30
|
+
<div component="composer/submit/options/container" data-submit-options="{submitOptions.length}" class="btn-group btn-group-sm {{{ if !(submitOptions.length || canSchedule) }}}hidden{{{ end }}}">
|
|
31
|
+
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
32
|
+
<i class="fa fa-caret-down"></i>
|
|
33
|
+
<span class="sr-only">[[topic:composer.additional-options]]</span>
|
|
34
|
+
</button>
|
|
35
|
+
<ul class="dropdown-menu dropdown-menu-end p-1">
|
|
36
|
+
<li><a class="dropdown-item rounded-1 display-scheduler {{{ if !canSchedule }}}hidden{{{ end }}}">[[topic:composer.post-later]]</a></li>
|
|
37
|
+
{{{ each submitOptions }}}
|
|
38
|
+
<li><a class="dropdown-item rounded-1" href="#" data-action="{./action}">{./text}</a></li>
|
|
39
|
+
{{{ end }}}
|
|
40
|
+
</ul>
|
|
41
|
+
</div>
|
|
41
42
|
</div>
|
|
42
43
|
</div>
|
|
43
44
|
</div>
|