Sha256: 259151ea9e819d509e03ff85ffb232f404228affba15dd4ccb0a8594b5477fa0
Contents?: true
Size: 989 Bytes
Versions: 3
Compression:
Stored size: 989 Bytes
Contents
# ----------------------------------------------------------------------------- # Author: Alexander Kravets <alex@slatestudio.com>, # Slate Studio (http://www.slatestudio.com) # ----------------------------------------------------------------------------- # INPUT URL # - depends on Loft character plugin for assets management # ----------------------------------------------------------------------------- class @InputUrl extends InputString _add_choose_button: -> @$actions =$ "<span class='input-actions'></span>" @$el.append @$actions @$chooseBtn =$ "<button>Pick a file</button>" @$actions.append @$chooseBtn @$chooseBtn.on 'click', (e) => chr.modules.loft.showModal 'all', false, (objects) => url = objects[0].file.url @updateValue(url) # PUBLIC ==================================================================== initialize: -> @_add_choose_button() @config.onInitialize?(this) chr.formInputs['url'] = InputUrl
Version data entries
3 entries across 3 versions & 1 rubygems