Sha256: c96a6af8ae29b0d5774eeb0a123951ac79decf8a8b2b88aae56338c4c7edffa5
Contents?: true
Size: 1.11 KB
Versions: 2
Compression:
Stored size: 1.11 KB
Contents
#************************************************************************************* # TOCOMMENT #************************************************************************************* @caissonMod "FormCaisson", -> #************************************************************************************* # PUBLIC MODULE METHODS #************************************************************************************* @findFormById = (id) -> return form for form in @forms when form.id() is id @findFieldById = (id) -> return form.field(id) for form in @forms when form.hasField(id) @initForms = () -> $('form').each (i, form) => @forms.push new FormCaisson.Form $(form) @initHelpers = () -> $.fn.caisson = () -> switch $(this).data('caisson') when "form" then FormCaisson.findFormById $(this).attr('id') when "field" then FormCaisson.findFieldById $(this).attr('id') else FormCaisson.findFieldById $(this).closest('div[data-caisson]').attr('id') if $(this).closest('div[data-caisson]') @load = () -> @forms = [] @initForms() @initHelpers() @reload = () -> @load()
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
caisson-0.0.3 | app/assets/javascripts/caisson/form/form_caisson.coffee |
caisson-0.0.2 | app/assets/javascripts/caisson/form/form_caisson.coffee |