text: function getOwnerContext(){return document.body}(function($){if(!window.breeze){breeze={}}breeze.getBreezeContextPath=function(){var head=document.getElementsByTagName("head")[0]||document.documentElement,scripts=head.getElementsByTagName("script");for(var i=0,script,src,matcher;script=scripts[i];i++){if((src=script.src)&&(matcher=src.match(/\/jquery[^\/]*\.js$/i))){var contextPath="";if(!/(^\/)|(^http)/.test(script.getAttribute("src"))){contextPath=src.substring(0,src.lastIndexOf("/")+1)+"../"}else{src=src.substring(0,src.indexOf("/lib"));contextPath=src+"/"}return(breeze.getBreezeContextPath=function(){return contextPath})()}}throw new Error("miss jQuery lib,can not to analysis application context path.")};breeze.mask=new function(){var pageMask=null;this.showPageMask=function(){if(null==pageMask){var html=["<div class='breeze-pagemask'>"];html.push("<div class='chunkA'></div>");html.push("<div class='chunkB'></div>");html.push("<div class='chunkC'></div>");html.push("<div class='chunkD'></div>");html.push("</div>");pageMask=$(html.join(""));pageMask.appendTo("body")}pageMask.show();$(">.chunkA",pageMask).animate({width:"50%",height:"50%"},"slow");$(">.chunkB",pageMask).animate({width:"50%",height:"50%"},"slow");$(">.chunkC",pageMask).animate({width:"50%",height:"50%"},"slow");$(">.chunkD",pageMask).animate({width:"50%",height:"50%"},"slow")};this.hidePageMask=function(){if(null!=pageMask){$(">.chunkA",pageMask).animate({width:"0",height:"0"},"slow");$(">.chunkB",pageMask).animate({width:"0",height:"0"},"slow");$(">.chunkC",pageMask).animate({width:"0",height:"0"},"slow");$(">.chunkD",pageMask).animate({width:"0",height:"0"},"slow",function(){pageMask.hide()})}};var ajaxMask=null;this.showAjaxMask=function(){if(!ajaxMask){var html=["<div class='breeze-ajaxmask'>"];html.push("<div class='mask'></div>");html.push("<div class='detail'>");html.push("<div class='shift'>");html.push("<label>正在加载请稍候...</label>");html.push("</div>");html.push("</div>");html.push("</div>");ajaxMask=$(html.join("")).appendTo("body")}ajaxMask.show()};this.hideAjaxMask=function(){ajaxMask&&ajaxMask.hide()};this.showBoxLoading=function(box){box.append($("<div class='breeze-boxloading'></div>"))};this.hideBoxLoading=function(box){var loading=$(">.breeze-boxloading",box);loading.fadeOut("normal",function(){loading.remove()})}}();breeze.stopEvent=function(e){e.stopPropagation?e.stopPropagation():(e.cancelBubble=true)};breeze.trim=function(s){return s.replace(/(^\s+)|(\s+$)/g,"")};breeze.transformTemplate=function(templateString){var func=[],str=templateString,variants={},result,index,x=0;function parseString(s){return s.replace(/"/g,'\\"').replace(/[\n\r]+/g,"\\\n")}function parseBracket(s){var v=[],r,m=0;do{if(r=s.match(/[\(\)]+?/)){v.push(s.substring(0,r.index+1));s=s.substring(r.index+1);"("==r[0]?m++:m--}else{break}}while(m);return v.join("")}function parseExpression(s){var r,m,i;while(r=s.match(/\$[\w\.]+/)){if(i=r.index){func.push(s.substring(0,i))}m=r[0];s=s.substring(i+m.length);var keys=m.replace(/^\$/,""),firstKey=keys.split(".")[0];if(firstKey in variants){func.push(keys)}else{func.push("dataMap."+keys)}}func.push(s)}func.push('var html="";\n');while(result=str.match(/(#|\$)[\w\.]+/)){if(index=result.index){func.push(' html+="');func.push(parseString(str.substring(0,index)));func.push('";\n')}str=str.substring(index+result[0].length);switch(result[0]){case"#if":func.push(" if");result=parseBracket(str);str=str.substring(result.length);parseExpression(result);func.push("{\n");break;case"#else":func.push("}\nelse{\n");break;case"#set":result=parseBracket(str);str=str.substring(result.length);var entry=result.replace(/\(|\)/g,"").split("="),key=breeze.trim(entry[0]).replace(/^\$/,""),value=breeze.trim(entry[1]);func.push("var ");func.push(key);func.push("=");parseExpression(value);func.push(";\n");variants[key]=1;break;case"#expression":result=parseBracket(str);str=str.substring(result.length);func.push("html+=");parseExpression(result.replace(/^\(|\)$/g,""));func.push(";\n");break;case"#foreach":result=parseBracket(str);str=str.substring(result.length);if(/\sin\s/.test(result)){var entry=result.replace(/\(|\)/g,"").split(" in "),key=breeze.trim(entry[0]).replace(/^\$/,""),object=breeze.trim(entry[1]).replace(/^\$/,"");func.push("for(var ");func.push(key);func.push(" in ");var firstKey=object.split(".")[0];func.push(((firstKey in variants)?"":"dataMap.")+object);func.push(")");func.push("{\n");variants[key]=1}else{var entry=result.replace(/\(|\)/g,"").split(/[:,]/),key=breeze.trim(entry[0]).replace(/^\$/,""),array=breeze.trim(entry[1]).replace(/^\$/,""),index=entry[2]&&breeze.trim(entry[2]).replace(/^\$/,"");if(!isNaN(array)){func.push("for(var ");func.push(key);func.push("=0;");func.push(key);func.push("<");func.push(array);func.push(";");func.push(key);func.push("++)");func.push("{\n")}else{var lvar="x"+x,dataList="dataList"+x,len="len"+x;func.push("for(var ");func.push(lvar);func.push("=0,");func.push(dataList);func.push("=");var firstKey=array.split(".")[0];func.push(((firstKey in variants)?"":"dataMap.")+array);func.push(",");func.push(len);func.push("=");func.push(dataList);func.push(".length");func.push(",");if(null!=index){func.push(index);func.push(",")}func.push(key);func.push(";");func.push(lvar);func.push("<");func.push(len);func.push(";");func.push(lvar);func.push("++)");func.push("{\n");func.push(key);func.push("=");func.push(dataList);func.push("[");func.push(lvar);func.push("];\n");if(null!=index){func.push(index);func.push("=");func.push(lvar);func.push(";\n");variants[index]=1}x++}variants[key]=1}break;case"#end":func.push("}\n");break;default:var keys=result[0].replace(/^\$/,""),firstKey=keys.split(".")[0];if(firstKey in variants){func.push(" html+=");func.push(keys);func.push(";\n")}else{func.push(" html+=");func.push("dataMap."+keys);func.push(";\n")}}}func.push('html+="');func.push(parseString(str));func.push('";\n');func.push("return html;\n");return new Function("dataMap",func.join(""))};breeze.getPowerParent=function(node,power){while(power--){node=node.parentNode}return node};breeze.getTop=function(){var win=window.opener||window;try{win.top.navigator;return win.top}catch(e){try{do{var pwin=win.parent;pwin.navigator;win=pwin}while(win)}catch(e1){return win}}};breeze.array2obj=function(array){var obj={};for(var i=array.length-1;i>=0;i--){obj[array[i]]=1}return obj};breeze.getParameters=function(parameters){var data={};for(var name in parameters){data[name]=jQuery.isFunction(parameters[name])?parameters[name]():parameters[name]}return data};breeze.getBlankIcon=function(){return"data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="};breeze.ajax=function(data){$.ajax({url:data.url,data:data.data,asyn:data.asyn,dataType:data.dataTpye||"text",success:function(response){data.success&&data.success(response)},error:function(err){data.error&&data.error(err)}})};breeze.parent=function(element,className,context){context=$(context||document.body)[0];var node=$(element);do{if(node.hasClass(className)){return node}node=node.parent()}while(node[0]!=context);return null};breeze.parents=function(element,className,context){context=$(context||document.body)[0];var node=$(element).parent(),nodes=[];while(node[0]!=context){if(node.hasClass(className)){nodes.push(node)}node=node.parent()}return nodes};var opt=Object.prototype.toString;function isObject(o){return"[object Object]"==opt.call(o)}function extendOptions(o1,o2){for(var name in o2){if(name in o1){if(null!=o1[name]&&isObject(o1[name])&&isObject(o2[name])){extendOptions(o1[name],o2[name]);continue}}o1[name]=o2[name]}}$.Widget.prototype._createWidget=function(options,element){$.data(element,this.widgetName,this);this.element=$(element);this.options=$.extend(true,{},this.options,this._getCreateOptions());extendOptions(this.options,options);var self=this;this.element.bind("remove."+this.widgetName,function(){self.destroy()});this._create();this._trigger("create");this._init()};function copy2array(collection){var array=[];for(var i=0,l=collection.length;i<l;i++){array.push(collection[i])}return array}function evalScript(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,scriptElement=document.createElement("script");scriptElement.type="text/javascript";scriptElement.text=data;head.appendChild(scriptElement);head.removeChild(scriptElement)}var _loadedResources=null,autowire=["function getOwnerContext(){return ownerContext;}\n"];breeze.xhrload=function(data){if("string"==typeof(data)){data={url:data,context:document.body}}var url=data.url,parameters=data.parameters||{},load=data.load,context=$(data.context);context.empty();breeze.mask.showBoxLoading(context);$.ajax({url:url,dataType:"html",data:breeze.getParameters(parameters),error:function(){context.html("<div class='error'></div>");breeze.mask.hideBoxLoading(context)},success:function(html){var head=document.getElementsByTagName("head")[0]||document.documentElement,safeFragment=document.createDocumentFragment(),div=document.createElement("div");if(null==_loadedResources){_loadedResources={};var scripts=head.getElementsByTagName("script");for(var i=0,script;script=scripts[i];i++){if(script.src){_loadedResources[script.src]=1}}}safeFragment.appendChild(div);div.innerHTML="div<div>"+html+"</div>";div=div.lastChild;div.insertBefore(document.createTextNode(""),div.firstChild);var scripts=[],scriptElements=copy2array(div.getElementsByTagName("script"));for(var i=0;script=scriptElements[i];i++){script.parentNode.removeChild(script);if(script.src){var src=script.getAttribute("src");if(!/^\/|^http/.test(src)){script.setAttribute("src",url.substring(0,url.lastIndexOf("/")+1)+src);src=script.src}if(!(src in _loadedResources)){scripts.push(script);_loadedResources[src]=1}}else{scripts.push(script)}}while(div.hasChildNodes()){context.append(div.firstChild)}(function(i){var script=scripts[i];if(null==script){breeze.mask.hideBoxLoading(context);load&&load()}else{var func=arguments.callee,scriptContext=script.getAttribute("context"),src=script.src;if(src){if(scriptContext){$.ajax({url:src,dataType:"text",success:function(data){autowire[1]=data;(new Function("ownerContext",autowire.join("")))(context);func(i+1)},error:function(){func(i+1)}})}else{var scriptElement=document.createElement("script");scriptElement.type="text/javascript";scriptElement.src=src;scriptElement.onload=scriptElement.onreadystatechange=scriptElement.onerror=function(){if(!this.readyState||this.readyState==="loaded"||this.readyState==="complete"){this.onload=this.onreadystatechange=this.onerror=null;this.parentNode.removeChild(this);func(i+1)}};head.appendChild(scriptElement)}}else{var data=script.text||script.textContent||script.innerHTML||"";if(scriptContext){autowire[1]=data;(new Function("ownerContext",autowire.join("")))(context)}else{evalScript(data)}func(i+1)}}})(0)}})}})(jQuery);