Sha256: 6997946a36c35d72b29e84971c02f38b05cddf26c3cb3fad2dc63af79aac7d68
Contents?: true
Size: 949 Bytes
Versions: 16
Compression:
Stored size: 949 Bytes
Contents
Luca.fields.ButtonField = Luca.core.Field.extend form_field: true readOnly: true events: "click input" : "click_handler" hooks:[ "button:click" ] className: 'luca-ui-field luca-ui-button-field' template: 'fields/button_field' click_handler: (e)-> me = my = $( e.currentTarget ) @trigger "button:click" initialize: (@options={})-> _.extend @options _.bindAll @, "click_handler" Luca.core.Field::initialize.apply @, arguments @template = "fields/button_field_link" if @icon_class?.length afterInitialize: ()-> @input_id ||= _.uniqueId('button') @input_name ||= @name ||= @input_id @input_value ||= @label ||= @text @input_type ||= "button" @input_class ||= @class @icon_class ||= "" @icon_class = "icon-#{ @icon_class }" if @icon_class.length and !@icon_class.match(/^icon-/) setValue: ()-> true Luca.register "button_field", "Luca.fields.ButtonField"
Version data entries
16 entries across 16 versions & 1 rubygems