diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-06-05 12:13:02 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-06-05 12:13:02 +0200 |
commit | 5256b5cc060338fb597e3519a18bf6a3faa4cf8c (patch) | |
tree | dde3ee5ef695e56b91a0530dc9931284cb71a083 | |
parent | 4ae67fcaefe7ca66e06933a18368e592d8ebc260 (diff) | |
download | gitlab-ce-5256b5cc060338fb597e3519a18bf6a3faa4cf8c.tar.gz |
Prefer jQuery on to bind, and don't use .js class.warn-about-referenced-users
-rw-r--r-- | app/assets/javascripts/dropzone_input.js.coffee | 10 | ||||
-rw-r--r-- | app/assets/stylesheets/generic/markdown_area.scss | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/generic/mobile.scss | 2 | ||||
-rw-r--r-- | app/views/projects/_md_preview.html.haml | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/app/assets/javascripts/dropzone_input.js.coffee b/app/assets/javascripts/dropzone_input.js.coffee index 7eed9a955c8..a7476146010 100644 --- a/app/assets/javascripts/dropzone_input.js.coffee +++ b/app/assets/javascripts/dropzone_input.js.coffee @@ -15,11 +15,11 @@ class @DropzoneInput form_textarea = $(form).find("textarea.markdown-area") form_textarea.wrap "<div class=\"div-dropzone\"></div>" - form_textarea.bind 'paste', (event) => + form_textarea.on 'paste', (event) => handlePaste(event) - form_textarea.bind "input", -> + form_textarea.on "input", -> hideReferencedUsers() - form_textarea.bind "blur", -> + form_textarea.on "blur", -> renderMarkdown() form_dropzone = $(form).find('.div-dropzone') @@ -130,11 +130,11 @@ class @DropzoneInput child = $(dropzone[0]).children("textarea") hideReferencedUsers = -> - referencedUsers = form.find(".js-referenced-users") + referencedUsers = form.find(".referenced-users") referencedUsers.hide() renderReferencedUsers = (users) -> - referencedUsers = form.find(".js-referenced-users") + referencedUsers = form.find(".referenced-users") if referencedUsers.length if users.length >= 10 diff --git a/app/assets/stylesheets/generic/markdown_area.scss b/app/assets/stylesheets/generic/markdown_area.scss index 8caa49e0e54..f94677d1925 100644 --- a/app/assets/stylesheets/generic/markdown_area.scss +++ b/app/assets/stylesheets/generic/markdown_area.scss @@ -60,7 +60,7 @@ float: left; } -.js-referenced-users { +.referenced-users { padding: 10px 0; color: #999; margin-left: 10px; diff --git a/app/assets/stylesheets/generic/mobile.scss b/app/assets/stylesheets/generic/mobile.scss index fa11785eed8..e61b39f1ac3 100644 --- a/app/assets/stylesheets/generic/mobile.scss +++ b/app/assets/stylesheets/generic/mobile.scss @@ -19,7 +19,7 @@ } } - .js-referenced-users { + .referenced-users { margin-right: 0; } diff --git a/app/views/projects/_md_preview.html.haml b/app/views/projects/_md_preview.html.haml index 30cddb9af2b..a831481cf80 100644 --- a/app/views/projects/_md_preview.html.haml +++ b/app/views/projects/_md_preview.html.haml @@ -9,7 +9,7 @@ Preview - if defined?(referenced_users) && referenced_users - %span.js-referenced-users.pull-left.hide + %span.referenced-users.pull-left.hide = icon('exclamation-triangle') You are about to add %strong |