/** Select (dropdown) @class select @extends list @final @example **/ (function ($) { var Select = function (options) { this.init('select', options, Select.defaults); }; $.fn.editableutils.inherit(Select, $.fn.editabletypes.list); $.extend(Select.prototype, { renderList: function() { if(!$.isArray(this.sourceData)) { return; } for(var i=0; i', {value: this.sourceData[i].value}).text(this.sourceData[i].text)); } }, value2htmlFinal: function(value, element) { var text = '', item = this.itemByVal(value); if(item) { text = item.text; } Select.superclass.constructor.superclass.value2html(text, element); }, autosubmit: function() { this.$input.on('change', function(){ $(this).closest('form').submit(); }); } }); Select.defaults = $.extend({}, $.fn.editabletypes.list.defaults, { /** @property tpl @default **/ tpl:'' }); $.fn.editabletypes.select = Select; }(window.jQuery));