fix some more eslint rules
This commit is contained in:
parent
75ef84df95
commit
aa1c3ab227
1 changed files with 8 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* eslint-disable func-names, no-var, one-var, one-var-declaration-per-line, object-shorthand, comma-dangle, prefer-arrow-callback, max-len */
|
/* eslint-disable func-names, no-var, object-shorthand, comma-dangle, prefer-arrow-callback */
|
||||||
|
|
||||||
// MarkdownPreview
|
// MarkdownPreview
|
||||||
//
|
//
|
||||||
|
@ -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 @@
|
||||||
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 @@
|
||||||
$form = $(this).closest('form');
|
$form = $(this).closest('form');
|
||||||
$(document).triggerHandler('markdown-preview:hide', [$form]);
|
$(document).triggerHandler('markdown-preview:hide', [$form]);
|
||||||
});
|
});
|
||||||
}).call(this);
|
}());
|
||||||
|
|
Loading…
Reference in a new issue