define(["require","exports"],function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(){return function(e){this.$supporterHolder=e;var r=this.$supporterHolder.find("> ul");r.length>0&&Sortable.create(r[0],{draggable:"li"}),$(".supporterRowAdder").click(function(e){r.append($(this).data("content")),e.preventDefault()}),r.on("click",".delSupporter",function(e){e.preventDefault(),$(this).parents("li").first().remove()});var t=$("#fullTextHolder");e.find(".fullTextAdd").click(function(){for(var e=t.find("textarea").val().split(";"),n=$(".supporterRowAdder").data("content"),i=null,l=0;l<e.length;l++)if(""!=e[l]){var a=function(){for(var e=r.find("> li"),t=0;t<e.length;t++){var i=e.eq(t);if(""==i.find(".supporterName").val()&&""==i.find(".supporterOrga").val())return i}var l=$(n);return r.append(l),l}();if(null==i&&(i=a),a.find("input.supporterOrga").length>0){var o=e[l].split(",");a.find("input.supporterName").val(o[0].trim()),o.length>1&&a.find("input.supporterOrga").val(o[1].trim())}else a.find("input.supporterName").val(e[l])}t.find("textarea").select().focus(),i.scrollintoview()})}}();r.MotionSupporterEdit=t});
//# sourceMappingURL=MotionSupporterEdit.js.map
