Skip to content

Instantly share code, notes, and snippets.

@byteSamurai
Created October 22, 2014 14:50
Show Gist options
  • Select an option

  • Save byteSamurai/b93180f050d0e9a96a07 to your computer and use it in GitHub Desktop.

Select an option

Save byteSamurai/b93180f050d0e9a96a07 to your computer and use it in GitHub Desktop.
replaced <input> with <button>, closes #83
Index: coffee/vex.dialog.coffee
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- coffee/vex.dialog.coffee (date 1412904515000)
+++ coffee/vex.dialog.coffee (revision )
@@ -126,8 +126,8 @@
$buttons = $('<div class="vex-dialog-buttons" />')
$.each buttons, (index, button) ->
- $button = $("""<input type="#{button.type}" />""")
- .val(button.text)
+ $button = $("""<button type="#{button.type}" />""")
+ .val(button.text).text(button.text)
.addClass(button.className + ' vex-dialog-button ' + (if index is 0 then 'vex-first ' else '') + (if index is buttons.length - 1 then 'vex-last ' else ''))
.bind('click.vex', (e) -> button.click($(@).parents(".#{vex.baseClassNames.content}"), e) if button.click)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment