Consistent styling

This commit is contained in:
Gregory Eremin
2013-07-12 14:34:38 +07:00
parent 624be69198
commit 9b1df758cf
5 changed files with 25 additions and 15 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ class Selector
self = this
@dropdown.on 'click', (e) ->
$(this).toggleClass('active')
$(this).toggleClass('active') unless $(this).hasClass('disabled')
false
@options.on 'click', (e) ->
+5 -2
View File
@@ -3,6 +3,7 @@ $ ->
$contents = $form.find('textarea')
$_button = $form.find('input[type="submit"]')
$button = $form.find('a[role="submit"]')
$syntax_selector = $('#syntax-selector')
# Hide generic button, show styled button
$_button.hide()
@@ -10,6 +11,8 @@ $ ->
$contents.focus()
# Binding submit event to new button
$button.on 'mouseup', ->
$form.submit()
$button.on 'click', (e) ->
$form.submit() unless $(this).hasClass('disabled')
$(this).addClass('disabled')
$syntax_selector.addClass('disabled')
false