Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
aa1c3ab2
Commit
aa1c3ab2
authored
Dec 11, 2016
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some more eslint rules
parent
75ef84df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
app/assets/javascripts/preview_markdown.js
app/assets/javascripts/preview_markdown.js
+8
-6
No files found.
app/assets/javascripts/preview_markdown.js
View file @
aa1c3ab2
/* eslint-disable func-names, no-var, o
ne-var, one-var-declaration-per-line, object-shorthand, comma-dangle, prefer-arrow-callback, max-len
*/
/* eslint-disable func-names, no-var, o
bject-shorthand, comma-dangle, prefer-arrow-callback
*/
// MarkdownPreview
// MarkdownPreview
//
//
...
@@ -6,7 +6,10 @@
...
@@ -6,7 +6,10 @@
// and showing a warning when more than `x` users are referenced.
// and showing a warning when more than `x` users are referenced.
//
//
(
function
()
{
(
function
()
{
var
lastTextareaPreviewed
,
markdownPreview
,
previewButtonSelector
,
writeButtonSelector
;
var
lastTextareaPreviewed
;
var
markdownPreview
;
var
previewButtonSelector
;
var
writeButtonSelector
;
window
.
MarkdownPreview
=
(
function
()
{
window
.
MarkdownPreview
=
(
function
()
{
function
MarkdownPreview
()
{}
function
MarkdownPreview
()
{}
...
@@ -17,9 +20,8 @@
...
@@ -17,9 +20,8 @@
MarkdownPreview
.
prototype
.
ajaxCache
=
{};
MarkdownPreview
.
prototype
.
ajaxCache
=
{};
MarkdownPreview
.
prototype
.
showPreview
=
function
(
$form
)
{
MarkdownPreview
.
prototype
.
showPreview
=
function
(
$form
)
{
var
mdText
,
preview
;
var
preview
=
$form
.
find
(
'
.js-md-preview
'
);
preview
=
$form
.
find
(
'
.js-md-preview
'
);
var
mdText
=
$form
.
find
(
'
textarea.markdown-area
'
).
val
();
mdText
=
$form
.
find
(
'
textarea.markdown-area
'
).
val
();
if
(
mdText
.
trim
().
length
===
0
)
{
if
(
mdText
.
trim
().
length
===
0
)
{
preview
.
text
(
'
Nothing to preview.
'
);
preview
.
text
(
'
Nothing to preview.
'
);
this
.
hideReferencedUsers
(
$form
);
this
.
hideReferencedUsers
(
$form
);
...
@@ -151,4 +153,4 @@
...
@@ -151,4 +153,4 @@
$form
=
$
(
this
).
closest
(
'
form
'
);
$form
=
$
(
this
).
closest
(
'
form
'
);
$
(
document
).
triggerHandler
(
'
markdown-preview:hide
'
,
[
$form
]);
$
(
document
).
triggerHandler
(
'
markdown-preview:hide
'
,
[
$form
]);
});
});
}
).
call
(
this
);
}
()
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment