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
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
......
......@@ -60,7 +60,7 @@
float: left;
}
.js-referenced-users {
.referenced-users {
padding: 10px 0;
color: #999;
margin-left: 10px;
......
......@@ -19,7 +19,7 @@
}
}
.js-referenced-users {
.referenced-users {
margin-right: 0;
}
......
......@@ -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
......
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