!function(a,b,c,d){function h(b,c,d){if("undefined"==typeof c)throw f+'Missing "dataList" property';this.dataList=c,this.element=b,this.options=a.extend({},g,d),this._defaults=g,this._name=e.toLowerCase(),this.init()}var e="rowSelector",f=e+"_plugin: ",g={li:{class:""},selected:null,selectedId:"selected-item",globalClass:"item_choice",defaultInput:"<input type='hidden' class='"+e.toLowerCase()+"-hidden'>",input:a("."+e.toLowerCase()+"-hidden")};h.prototype={strtoclass:function(a){return"."+a},getListItemHtml:function(a){return"<li class='"+this._name+"-item"+this.options.li.class+"' data-"+this._name+"-id='"+a.id+"'>"+a.name+"</li>"},getListHtml:function(){var b="<ul>";return a.each(this.dataList,a.proxy(function(a,c){b+=this.getListItemHtml(c)},this)),b+="</ul>"},setItemAsSelected:function(b){this.selected=a(b).data(this._name+"-id"),this.options.input.val(this.selected),console.log("Selected id: "+this.selected)},setElementStyle:function(b){a(this.element).find(this.strtoclass(this.options.selectedId)).removeClass(this.options.selectedId),a(b).addClass(this.options.selectedId)},clickItemHandler:function(a){this.setItemAsSelected(a.target),this.setElementStyle(a.target)},init:function(){a(this.element).addClass(this.options.globalClass),a(this.element).empty(),a(this.element).html(this.getListHtml()),1==this.selected&&(console.log("why you null"),this.setItemAsSelected()),"undefined"==typeof this.options.input&&a(this.element).parent().append(this.options.defaultInput),a(c.body).on("click",this.strtoclass(this._name+"-item"),a.proxy(function(a){this.clickItemHandler(a)},this))}},a.fn[e]=function(b,c){return this.each(function(){a.data(this,"plugin_"+e)||a.data(this,"plugin_"+e,new h(this,b,c))})}}(jQuery,window,document);
@@ -28,16 +28,18 @@
  h(b,c,d
+,h
 )%7Bif(%22un
@@ -99,23 +99,105 @@
 ty';
-this.dataList=c
+if(%22undefined%22==typeof d)throw f+'Missing %22hidden input%22 property';this.dataList=c,this.$hidden=d
 ,thi
@@ -235,17 +235,17 @@
 nd(%7B%7D,g,
-d
+h
 ),this._
@@ -924,34 +924,31 @@
 +%22-id%22),
+a(
 this.
-options.input
+$hidden)
 .val(thi
@@ -1265,16 +1265,125 @@
 arget)%7D,
+updateListData:function(b)%7Bthis.dataList=b,a(this.element).empty(),a(this.element).html(this.getListHtml())%7D,
 init:fun
@@ -1583,115 +1583,22 @@
 ()),
-%22undefined%22==typeof this.options.input&&a(this.element).parent().append(this.options.defaultInput),a(c.body
+a(this.element
 ).on
@@ -1694,16 +1694,113 @@
 %7D,this))
+,a(this.element).on(%22rowInput:update%22,a.proxy(function(a)%7Bthis.updateListData(a.dataList)%7D,this))
 %7D%7D,a.fn%5B
@@ -1814,16 +1814,18 @@
 tion(b,c
+,d
 )%7Breturn
@@ -1910,16 +1910,18 @@
 this,b,c
+,d
 ))%7D)%7D%7D(j

minify the js