define("folder_picker",["jquery"],function(e){return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/components/",t(t.s="./assets/js/folder_picker.js")}({"./assets/js/folder_picker.js":function(e,t,n){var o,i;o=[n(0)],void 0!==(i=function(e){function t(e,t){this.element_id=e,this.extra_query=t,this.init()}return t.prototype.init=function(){this.$el=jq_$(this.element_id),this.$container=this.$el.closest(".js-folder-picker-wrapper");var e=this;this.$container.find(".js-select-button").on("click",function(){e.call_popup()}),this.$container.find(".js-unset-button").on("click",function(){e.unset()}),this.$el.on("blur",function(){e.set_active()})},t.prototype.call_popup=function(){var e=this.get_value();return window.open("/intranet/documents/pick_folder_popup.php?category="+e+"&selector_id="+this.selector_id+"&"+this.extra_query,"folder_picker_tree","dependent=yes,width=350,height=430,titlebar=yes,scrollbars=yes,status=yes,resizable=yes"),window.folder_picker_obj=this,!1},t.prototype.set_enabled=function(e){this.$el.prop("disabled",!e),this.$container.find(".js-select-button, .js-unset-button").prop("disabled",!e)},t.prototype.get_value=function(){var e=this.$el.val();return e||(e=0),e},t.prototype.set_active=function(){this.$el.find("option").prop("selected",!0)},t.prototype.unset=function(){this.$el.find("option").detach(),this.$el.trigger("change")},t.prototype.do_select=function(e){var t=e.getSelectedItemId(),n=e.getSelectedItemText();this.set_value(t,n)},t.prototype.set_value=function(e,t){this.$el.html('<option value="'+e+'" selected="selected">'+t+"</option>"),this.$el.trigger("change")},t}.apply(t,o))&&(e.exports=i)},0:function(t,n){t.exports=e}})});
//# sourceMappingURL=folder_picker.js.map