Sha256: 065fd67312e8cbfae90cd31cf2d181ad61562f76cbe50cb0b773c49d78f51366
Contents?: true
Size: 1.17 KB
Versions: 6
Compression:
Stored size: 1.17 KB
Contents
class App.ResourceForm constructor: (@el) -> # initialize some stuff # # make sure fields with values do not have their labels obscuring your view # setLabels: (selector) -> $(selector).each () -> try fld = '#'+$(this).attr('for') $(this).addClass('active') unless $(fld)[0].value.nil? catch #console.log this # # prepare the form - a data: {form_type: record } # kind of form that is prepare: -> try # # Initialize SELECT's # $('select').each () -> # remove span.caret's from previous 'runs' - however that happens $(this).parent().parent().find('span.caret').remove() $(this).material_select() # # make labels on fields with content move out of the way # @setLabels('.input-field label') # # Initialize INPUT TYPE='DATE' # # %input.datepicker{ type:"date" } # $('.datepicker').pickadate selectMonths: true, # Creates a dropdown to control month selectYears: 15 # Creates a dropdown of 15 years to control year catch error alert 'App.ResourceForm did not prepare!' console.log error
Version data entries
6 entries across 6 versions & 1 rubygems