class IuguUI.Combobox defaults: none: false displayCurrentSelection: false markSelected: false el: undefined @load: ( context ) -> selector = "[data-type='iux.form.combobox']" if context elements = context.find(selector) else elements = $(selector) return if elements.length == 0 elements.each -> return if $(@).data("iux.initialized") == true new IuguUI.Combobox el: @ $(@).data "iux.initialized", true constructor: ( options ) -> @initialize( options ) prepare_select: -> if IS_DESKTOP # Convert to DIV (Only in Desktop) or USE as DIV (If not select, normal render) @input_holder = @el @input_holder.on "change", @change_select @caller_element = $('', html: @input_holder.find("option:selected").text() "data-value": @input_holder.find("option:selected").val() ) @root_element = $('
', "data-display-selection": true "data-mark-selected": true ) ul_element = $('