nodebb-plugin-composer-default 7.0.20 → 7.0.21
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/less/medium.less +66 -66
- package/static/less/zen-mode.less +54 -54
- package/static/lib/composer/autocomplete.js +6 -4
- package/static/lib/composer/scheduler.js +0 -0
- package/static/lib/composer.js +6 -7
- package/static/templates/admin/plugins/composer-default.tpl +16 -16
- package/static/templates/modals/topic-scheduler.tpl +0 -0
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
package/static/less/medium.less
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
.composer {
|
|
2
|
-
min-height: 400px;
|
|
3
|
-
|
|
4
|
-
.resizer {
|
|
5
|
-
display: block;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.minimize {
|
|
9
|
-
display: block;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
&.reply .title-container {
|
|
13
|
-
display: flex;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.title-container {
|
|
17
|
-
border: 0;
|
|
18
|
-
|
|
19
|
-
.title, .handle {
|
|
20
|
-
font-size: 22px;
|
|
21
|
-
padding: 4px 18px;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.formatting-bar .formatting-group {
|
|
26
|
-
display: inline-block;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&.resizable {
|
|
30
|
-
.box-shadow(0px 6px 12px rgba(0, 0, 0, 0.5));
|
|
31
|
-
|
|
32
|
-
padding-top: 30px;
|
|
33
|
-
padding-left: 15px;
|
|
34
|
-
padding-right: 15px;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.category-tag-row {
|
|
38
|
-
margin-top: 5px;
|
|
39
|
-
margin-bottom: 8px;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.write-preview-container {
|
|
43
|
-
margin-bottom: 15px;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.write, .preview {
|
|
47
|
-
padding: 20px;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.write {
|
|
51
|
-
border: 1px solid #EDEDED;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.tags-container {
|
|
55
|
-
margin-top: 8px - 15px;
|
|
56
|
-
margin-bottom: 8px;
|
|
57
|
-
|
|
58
|
-
.bootstrap-tagsinput {
|
|
59
|
-
padding: 0;
|
|
60
|
-
|
|
61
|
-
input {
|
|
62
|
-
margin-left: -6px;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
1
|
+
.composer {
|
|
2
|
+
min-height: 400px;
|
|
3
|
+
|
|
4
|
+
.resizer {
|
|
5
|
+
display: block;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.minimize {
|
|
9
|
+
display: block;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&.reply .title-container {
|
|
13
|
+
display: flex;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.title-container {
|
|
17
|
+
border: 0;
|
|
18
|
+
|
|
19
|
+
.title, .handle {
|
|
20
|
+
font-size: 22px;
|
|
21
|
+
padding: 4px 18px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.formatting-bar .formatting-group {
|
|
26
|
+
display: inline-block;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.resizable {
|
|
30
|
+
.box-shadow(0px 6px 12px rgba(0, 0, 0, 0.5));
|
|
31
|
+
|
|
32
|
+
padding-top: 30px;
|
|
33
|
+
padding-left: 15px;
|
|
34
|
+
padding-right: 15px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.category-tag-row {
|
|
38
|
+
margin-top: 5px;
|
|
39
|
+
margin-bottom: 8px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.write-preview-container {
|
|
43
|
+
margin-bottom: 15px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.write, .preview {
|
|
47
|
+
padding: 20px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.write {
|
|
51
|
+
border: 1px solid #EDEDED;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.tags-container {
|
|
55
|
+
margin-top: 8px - 15px;
|
|
56
|
+
margin-bottom: 8px;
|
|
57
|
+
|
|
58
|
+
.bootstrap-tagsinput {
|
|
59
|
+
padding: 0;
|
|
60
|
+
|
|
61
|
+
input {
|
|
62
|
+
margin-left: -6px;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
html.zen-mode {
|
|
2
|
-
overflow: hidden;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.zen-mode .composer {
|
|
6
|
-
&.resizable {
|
|
7
|
-
padding-top: 0;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.composer-container {
|
|
11
|
-
padding-top: 5px;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.tag-row {
|
|
15
|
-
display: none;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.title-container .category-list-container {
|
|
19
|
-
margin-top: 3px;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.write, .preview {
|
|
23
|
-
border: none;
|
|
24
|
-
outline: none;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.resizer {
|
|
28
|
-
display: none;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&.reply {
|
|
32
|
-
.title-container {
|
|
33
|
-
display: none;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.category-tag-row {
|
|
37
|
-
margin-top: 3px;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@media (min-width: @screen-md-min) {
|
|
42
|
-
& {
|
|
43
|
-
padding-left: 15px;
|
|
44
|
-
padding-right: 15px;
|
|
45
|
-
}
|
|
46
|
-
.write-preview-container {
|
|
47
|
-
margin-bottom: 0;
|
|
48
|
-
|
|
49
|
-
> div {
|
|
50
|
-
padding: 0;
|
|
51
|
-
margin: 0;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
1
|
+
html.zen-mode {
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.zen-mode .composer {
|
|
6
|
+
&.resizable {
|
|
7
|
+
padding-top: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.composer-container {
|
|
11
|
+
padding-top: 5px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.tag-row {
|
|
15
|
+
display: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.title-container .category-list-container {
|
|
19
|
+
margin-top: 3px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.write, .preview {
|
|
23
|
+
border: none;
|
|
24
|
+
outline: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.resizer {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&.reply {
|
|
32
|
+
.title-container {
|
|
33
|
+
display: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.category-tag-row {
|
|
37
|
+
margin-top: 3px;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@media (min-width: @screen-md-min) {
|
|
42
|
+
& {
|
|
43
|
+
padding-left: 15px;
|
|
44
|
+
padding-right: 15px;
|
|
45
|
+
}
|
|
46
|
+
.write-preview-container {
|
|
47
|
+
margin-bottom: 0;
|
|
48
|
+
|
|
49
|
+
> div {
|
|
50
|
+
padding: 0;
|
|
51
|
+
margin: 0;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
55
|
}
|
|
@@ -42,12 +42,14 @@ define('composer/autocomplete', ['composer/preview'], function (preview) {
|
|
|
42
42
|
clearTimeout(timer);
|
|
43
43
|
timer = setTimeout(function () {
|
|
44
44
|
var dropdown = document.querySelector('.' + dropdownClass);
|
|
45
|
-
|
|
45
|
+
if (dropdown) {
|
|
46
|
+
var pos = dropdown.getBoundingClientRect();
|
|
46
47
|
|
|
47
|
-
|
|
48
|
+
var margin = parseFloat(dropdown.style.marginTop, 10) || 0;
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
var offset = window.innerHeight + margin - 10 - pos.bottom;
|
|
51
|
+
dropdown.style.marginTop = Math.min(offset, 0) + 'px';
|
|
52
|
+
}
|
|
51
53
|
}, 0);
|
|
52
54
|
});
|
|
53
55
|
|
|
File without changes
|
package/static/lib/composer.js
CHANGED
|
@@ -24,8 +24,7 @@ define('composer', [
|
|
|
24
24
|
'search',
|
|
25
25
|
], function (taskbar, translator, uploads, formatting, drafts, tags,
|
|
26
26
|
categoryList, preview, resize, autocomplete, scheduler, scrollStop,
|
|
27
|
-
topicThumbs, api, bootbox, alerts, hooks, messagesModule, search
|
|
28
|
-
) {
|
|
27
|
+
topicThumbs, api, bootbox, alerts, hooks, messagesModule, search) {
|
|
29
28
|
var composer = {
|
|
30
29
|
active: undefined,
|
|
31
30
|
posts: {},
|
|
@@ -175,7 +174,7 @@ define('composer', [
|
|
|
175
174
|
if (showAlert) {
|
|
176
175
|
alerts.alert({
|
|
177
176
|
type: 'danger',
|
|
178
|
-
timeout:
|
|
177
|
+
timeout: 10000,
|
|
179
178
|
title: '',
|
|
180
179
|
message: message,
|
|
181
180
|
alert_id: 'post_error',
|
|
@@ -198,7 +197,7 @@ define('composer', [
|
|
|
198
197
|
formatting.addButton(iconClass, onClick, title);
|
|
199
198
|
};
|
|
200
199
|
|
|
201
|
-
composer.newTopic =
|
|
200
|
+
composer.newTopic = async (data) => {
|
|
202
201
|
var pushData = {
|
|
203
202
|
action: 'topics.post',
|
|
204
203
|
cid: data.cid,
|
|
@@ -209,10 +208,10 @@ define('composer', [
|
|
|
209
208
|
isMain: true,
|
|
210
209
|
};
|
|
211
210
|
|
|
212
|
-
|
|
211
|
+
({ pushData } = await hooks.fire('filter:composer.topic.push', {
|
|
213
212
|
data: data,
|
|
214
213
|
pushData: pushData,
|
|
215
|
-
});
|
|
214
|
+
}));
|
|
216
215
|
|
|
217
216
|
push(pushData);
|
|
218
217
|
};
|
|
@@ -794,7 +793,7 @@ define('composer', [
|
|
|
794
793
|
removeComposerHistory();
|
|
795
794
|
}
|
|
796
795
|
|
|
797
|
-
|
|
796
|
+
hooks.fire('action:composer.' + action, { composerData: composerData, data: data });
|
|
798
797
|
})
|
|
799
798
|
.catch((err) => {
|
|
800
799
|
// Restore composer on error
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<form role="form" class="composer-default-settings">
|
|
2
|
-
<div class="row">
|
|
3
|
-
<div class="col-sm-2 col-xs-12 settings-header">General</div>
|
|
4
|
-
<div class="col-sm-10 col-xs-12">
|
|
5
|
-
<div class="checkbox">
|
|
6
|
-
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
|
|
7
|
-
<input class="mdl-switch__input" type="checkbox" name="composeRouteEnabled" />
|
|
8
|
-
<span class="mdl-switch__label"><strong>Use a separate route for the composer</strong></span>
|
|
9
|
-
</label>
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
</form>
|
|
14
|
-
|
|
15
|
-
<button id="save" class="floating-button mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">
|
|
16
|
-
<i class="material-icons">save</i>
|
|
1
|
+
<form role="form" class="composer-default-settings">
|
|
2
|
+
<div class="row">
|
|
3
|
+
<div class="col-sm-2 col-xs-12 settings-header">General</div>
|
|
4
|
+
<div class="col-sm-10 col-xs-12">
|
|
5
|
+
<div class="checkbox">
|
|
6
|
+
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
|
|
7
|
+
<input class="mdl-switch__input" type="checkbox" name="composeRouteEnabled" />
|
|
8
|
+
<span class="mdl-switch__label"><strong>Use a separate route for the composer</strong></span>
|
|
9
|
+
</label>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</form>
|
|
14
|
+
|
|
15
|
+
<button id="save" class="floating-button mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">
|
|
16
|
+
<i class="material-icons">save</i>
|
|
17
17
|
</button>
|
|
File without changes
|