Fix form js coffe data toggle-link helper function for toogle buttons
This commit is contained in:
@@ -15,6 +15,11 @@ App.Forms =
|
||||
toggleLink: ->
|
||||
$('.js-toggle-link').unbind('click').on('click', ->
|
||||
$($(this).data('toggle-selector')).toggle("down")
|
||||
if $(this).data('toggle-text') isnt undefined
|
||||
toggle_txt = $(this).text()
|
||||
$(this).text( $(this).data('toggle-text') )
|
||||
$(this).data('toggle-text', toggle_txt)
|
||||
|
||||
false
|
||||
)
|
||||
|
||||
@@ -22,4 +27,4 @@ App.Forms =
|
||||
App.Forms.disableEnter()
|
||||
App.Forms.submitOnChange()
|
||||
App.Forms.toggleLink()
|
||||
false
|
||||
false
|
||||
|
||||
Reference in New Issue
Block a user