text: +function(d){var b=function(f,e){this.$element=d(f);this.options=d.extend({},b.DEFAULTS,e);this.init()};b.VERSION="1.0.0";b.DEFAULTS={modalOverflow:true,width:"90%",forceReload:false,maxHeight:function(){return d(window).height()-70}};b.prototype.init=function(){var g=this;var f=this.options;var e=this.$element;if(f.url){e.on("click",function(){g.show()})}};b.prototype.show=function(g){var e=this.$element;var i=this;g=d.extend({},this.options,g);var f=function(){var m=i.$dialog;var k=m.attr("last-url");var o=m.attr("new-url");if(g.forceReload||!k||k!=o){var l=Util.smartParseURL(o);var n=m.find(".modal-ajaxify-body");n.ajaxGetUrl(l)}else{m.find("textarea[data-htmleditor]").each(function(){d(this).extTextareaHtmleditor()})}m.attr("last-url",o);m.attr("dismiss-confirmed",false)};if(!this.$dialog){if(g.title==undefined){g.title=e.attr("title")}if(g.title==undefined){g.title="对话框"}var h=[];h.push('<div class="modal fade" tabindex="-1" style="display: none;" >');h.push('    <div class="modal-content">');h.push('      <div class="modal-header">');h.push('        <button type="button" class="close"  data-dismiss="modal" aria-hidden="true" title="关闭对话框"></button>');h.push('        <button type="button" class="close btn-reload" title="刷新对话框"></button>');h.push('        <h4 class="modal-title">'+g.title+"</h4>");h.push("      </div>");h.push('      <div class="modal-body modal-ajaxify-body form"></div>');h.push('      <div class="modal-footer hide">');h.push('        <button type="button" class="btn default" data-dismiss="modal">关闭窗口</button>');h.push("      </div>");h.push("    </div>");h.push("</div>");var j=d(h.join(""));e.after(j);this.$dialog=j;if(g.dataGridId){j.attr("data-grid-id",g.dataGridId)}j.attr("new-url",g.url);j.on("shown.bs.modal",function(){f()});j.modal(g);j.draggable({handle:".modal-header",cancel:".modal-header > button",scroll:false});j.find(".modal-header > .btn-reload").click(function(){var k=Util.smartParseURL(j.attr("new-url"));j.find(".modal-ajaxify-body").ajaxGetUrl(k)});j.on("hide",function(l){var k=l.srcElement?l.srcElement:l.target;if(d(k).is("[data-picker]")){return}var m=false;if(j.attr("dismiss-confirmed")==undefined||j.attr("dismiss-confirmed")=="false"){m=j.find("form[method='post']:not(.form-track-disabled)[form-data-modified='true']:first")}if(m.size()){Global.confirm("操作确认","当前表单有修改数据未保存，确认离开当前表单吗？",function(){j.attr("dismiss-confirmed",true);m.attr("form-data-modified",false);j.find("textarea[data-htmleditor]").each(function(){d(this).extTextareaHtmleditor("remove")})},function(){j.attr("dismiss-confirmed",false);l.stopPropagation();l.preventDefault();return false})}else{j.find("textarea[data-htmleditor]").each(function(){d(this).extTextareaHtmleditor("remove")})}})}else{this.$dialog.attr("new-url",g.url);this.$dialog.modal(g);this.$dialog.find(".modal-header > .modal-title").html(g.title);f()}};function c(f){var e=arguments;return this.each(function(){var i=d(this);var h=i.data("ExtAjaxBootstrapModal");var g=typeof f=="object"&&f;if(!h){i.data("ExtAjaxBootstrapModal",(h=new b(this,g)))}if(typeof f=="string"){h[f].apply(h,d.makeArray(e).slice(1))}})}var a=d.fn.extAjaxBootstrapModal;d.fn.extAjaxBootstrapModal=c;d.fn.extAjaxBootstrapModal.Constructor=b;d.fn.extAjaxBootstrapModal.noConflict=function(){d.fn.extAjaxBootstrapModal=a;return this};Global.addComponent({name:"ExtAjaxBootstrapModal",plugin:c,expr:'a[data-toggle="modal-ajaxify"],a[target="modal-ajaxify"]'})}(jQuery);