Commit 5256b5cc authored by Douwe Maan's avatar Douwe Maan

Prefer jQuery on to bind, and don't use .js class.

parent 4ae67fca
...@@ -15,11 +15,11 @@ class @DropzoneInput ...@@ -15,11 +15,11 @@ class @DropzoneInput
form_textarea = $(form).find("textarea.markdown-area") form_textarea = $(form).find("textarea.markdown-area")
form_textarea.wrap "<div class=\"div-dropzone\"></div>" form_textarea.wrap "<div class=\"div-dropzone\"></div>"
form_textarea.bind 'paste', (event) => form_textarea.on 'paste', (event) =>
handlePaste(event) handlePaste(event)
form_textarea.bind "input", -> form_textarea.on "input", ->
hideReferencedUsers() hideReferencedUsers()
form_textarea.bind "blur", -> form_textarea.on "blur", ->
renderMarkdown() renderMarkdown()
form_dropzone = $(form).find('.div-dropzone') form_dropzone = $(form).find('.div-dropzone')
...@@ -130,11 +130,11 @@ class @DropzoneInput ...@@ -130,11 +130,11 @@ class @DropzoneInput
child = $(dropzone[0]).children("textarea") child = $(dropzone[0]).children("textarea")
hideReferencedUsers = -> hideReferencedUsers = ->
referencedUsers = form.find(".js-referenced-users") referencedUsers = form.find(".referenced-users")
referencedUsers.hide() referencedUsers.hide()
renderReferencedUsers = (users) -> renderReferencedUsers = (users) ->
referencedUsers = form.find(".js-referenced-users") referencedUsers = form.find(".referenced-users")
if referencedUsers.length if referencedUsers.length
if users.length >= 10 if users.length >= 10
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
float: left; float: left;
} }
.js-referenced-users { .referenced-users {
padding: 10px 0; padding: 10px 0;
color: #999; color: #999;
margin-left: 10px; margin-left: 10px;
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
} }
} }
.js-referenced-users { .referenced-users {
margin-right: 0; margin-right: 0;
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
Preview Preview
- if defined?(referenced_users) && referenced_users - if defined?(referenced_users) && referenced_users
%span.js-referenced-users.pull-left.hide %span.referenced-users.pull-left.hide
= icon('exclamation-triangle') = icon('exclamation-triangle')
You are about to add You are about to add
%strong %strong
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment