Sha256: bbcdefc22f0693b8c9b9b3de7345cce335cd5a018e1333e37b0b50351c64b253
Contents?: true
Size: 1.1 KB
Versions: 2
Compression:
Stored size: 1.1 KB
Contents
# ----------------------------------------------------------------------------- # Author: Alexander Kravets <alex@slatestudio.com>, # Slate Studio (http://www.slatestudio.com) # ----------------------------------------------------------------------------- # INPUT INVERTER VERSION SELECT # ----------------------------------------------------------------------------- class @InputInverterVersion extends InputSelect _create_el: -> @config.optionsHashFieldName = '_document_versions' @config.ignoreOnSubmission = true @config.default = 0 @url = "#{ @config.path }/#{ @object._id }.json" @$el =$ "<div class='input-#{ @config.type } #{ @config.klass } #{ @config.klassName }'>" _add_input: -> @$input =$ """<select name='#{ @name }'></select>""" @$el.append @$input @$input.on 'change', (e) => @_load_version() @_add_options() _load_version: -> version = @$input.val() $.get @url, { version: version }, (object) -> chr.module.view.form.updateValues(object) formagicInputs['inverter-version'] = InputInverterVersion
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
inverter-0.5.1 | app/assets/javascripts/inputs/inverter-version.coffee |
inverter-0.5.0 | app/assets/javascripts/inputs/inverter-version.coffee |