define("datatable_form",["cla_angular","cla_select2","ng.cla.core.date_picker","ng.cla.core.group_picker","ng.cla.core.role_picker","ng.cla.core.sugre_picker","ng.cla.core.user_picker"],function(e,t,r,n,o,a,i){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/components/",t(t.s="./assets/js/datatable_form.js")}({"./assets/js/datatable/form/form.app.js":function(e,t,r){r(0).module("cla.core.dtform",["ngResource","cla.core.datatable","cla.core.user_picker","cla.core.date_picker","cla.core.group_picker","cla.core.role_picker","cla.core.sugre_picker"])},"./assets/js/datatable/form/form.controller.js":function(e,t,r){var n=r(0);!function(){"use strict";function e(e,t){function r(r,n){c=r,void 0!==n&&0!==n.length&&t(function(t){var r=e.get(c);for(var n in t)t.hasOwnProperty(n)&&(i.fields[n]=t[n]);r.filters=i.fields,r.build()},0,!0,n)}function n(){var t=e.get(c);t.filters=i.fields,t.build()}function o(t){if(t)return void window.location.reload();i.fields={};var r=e.get(c);r.filters=i.fields,r.build()}function a(){var t=e.get(c);t.filters=i.fields,t.download()}var i=this;i.init=r,i.filter=n,i.reset=o,i.download=a,i.fields={};var c}var t;try{t=n.module("cla.core.dtform")}catch(e){t=n.module("cla.core.dtform",[])}t.controller("DtFormController",e),e.$inject=["dtService","$timeout"]}()},"./assets/js/datatable_form.js":function(e,t,r){var n=r(0);window.angular=n,r("./web/intranet/js/user_picker.js"),r(3),r(11),r(7),r(8),r(9),r(10),r("./assets/js/datatable/form/form.app.js"),r("./assets/js/datatable/form/form.controller.js"),e.exports={init:function(e){void 0===n.element(e).scope()&&n.bootstrap(e,["cla.core.dtform"])}}},"./web/intranet/js/user_picker.js":function(e,t){window.UserPicker_SetUser=function(e,t,r){var n=jq_$(e);return n.html(),n.append('<option selected value="'+t+'">'+_.escape(r)+"</option>"),n.change(),n.trigger("cla-user-change"),!0},window.UserPicker_DeleteSelected=function(e){var t=jq_$(e);return t.val(""),t.trigger("change"),!1},window.UserPicker_InitSelect2Single=function(e,t,r,n){var o=jq_$(e),a=o.parent(".js-picker-input-group"),i=a.find(".js-input-group-append .js-input-btn"),c="calc(100% - "+i.getHiddenOffsetWidth()+"px)";o.select2({placeholder:r,minimumInputLength:3,allowClear:n,width:c,ajax:{url:"/intranet/common/user_picker_popup.php?json=1"+t,dataType:"json",delay:250,data:function(e){return{keywords:e.term,page:e.page,page_size:50,st:50*(e.page-1)}},processResults:function(e,t){return t.page=t.page||1,{results:e.data,pagination:{more:50*t.page<e.total}}},escapeMarkup:function(e){var t=document.createElement("span");return t.textContent=e,t.innerHTML}}})},window.UserPicker_InitSelect2SUGRE=function(e,t,r,n,o){var a=jq_$(e),i=String;if(o){i="calc(100% - "+(a.siblings(".js-input-btn").getHiddenOffsetWidth()+4)+"px)"}else i="100%";a.select2({placeholder:r,minimumInputLength:1,width:i,allowClear:n,ajax:{url:"/intranet/common/common_perms_owners_popup.php?json=1"+t,dataType:"json",data:function(e){return{query:e.term}},processResults:function(e){return jQuery.each(e.data,function(t,r){e.data[t]={id:r[0]+"_"+r[1],text:e.suggestions[t]}}),{results:e.data}},escapeMarkup:function(e){var t=document.createElement("span");return t.textContent=e,t.innerHTML}}})},window.UserPicker_InitSelect2=function(e,t,r){var n=jq_$(e);n.select2({placeholder:r,minimumInputLength:1,ajax:{url:"/intranet/common/user_picker_popup.php?json=1&multi=1"+t,dataType:"json",data:function(e){return{keywords:e.term,page:e.page,page_size:50,st:50*(e.page-1)}},processResults:function(e,t){return t.page=t.page||1,{results:e.data,pagination:{more:50*t.page<e.total}}},escapeMarkup:function(e){var t=document.createElement("span");return t.textContent=e,t.innerHTML}}})},window.UserPicker_AddUser=function(e,t,r){var n=jq_$(e),o=jQuery("option[value="+t+"]",n);if(o.size()>0){if(o.prop("selected"))return!1;o.prop("selected",!0)}else n.append(jQuery("<option>&nbsp; &nbsp; &nbsp; </option>").val(t).text(r).prop("selected",!0));return n.change(),n.trigger("cla-user-change"),!0}},0:function(t,r){t.exports=e},10:function(e,t){e.exports=a},11:function(e,t){e.exports=i},3:function(e,r){e.exports=t},7:function(e,t){e.exports=r},8:function(e,t){e.exports=n},9:function(e,t){e.exports=o}})});
//# sourceMappingURL=datatable_form.js.map