From 8e30fbf41dabee082aafb60fe0639b504497674d Mon Sep 17 00:00:00 2001 From: AvinashS Date: Wed, 30 Aug 2017 18:39:12 +0530 Subject: vnfsdk market place seed code refactoring cleanup the package names and a test file correction Change-Id: Icc5a3b48189824dfe5cb84f05ce2c496bcfa3eab IssueId: VNFSDK-74 Signed-off-by: AvinashS --- .../webapp/thirdparty/js/angular-ui-router.min.js | 8 - .../src/main/webapp/thirdparty/js/angular.min.js | 295 - .../js/bootstrap-table-filter-control.min.js | 7 - .../webapp/thirdparty/js/bootstrap-table.min.js | 8 - .../src/main/webapp/thirdparty/js/bootstrap.min.js | 6 - common/src/main/webapp/thirdparty/js/core/const.js | 46 - .../src/main/webapp/thirdparty/js/core/hk.min.js | 819 - .../webapp/thirdparty/js/core/load_menuList.js | 70 - .../webapp/thirdparty/js/core/openoFrameWork.js | 3701 ---- .../src/main/webapp/thirdparty/js/core/pym.min.js | 16 - common/src/main/webapp/thirdparty/js/jquery-ui.js | 18706 ------------------- .../src/main/webapp/thirdparty/js/jquery.cookie.js | 117 - .../webapp/thirdparty/js/jquery.ztree.core-3.5.js | 70 - .../main/webapp/thirdparty/js/jquery_1.12.4.min.js | 5 - common/src/main/webapp/thirdparty/js/mustache.js | 630 - .../src/main/webapp/thirdparty/js/ng-table.min.js | 2 - common/src/main/webapp/thirdparty/js/tools.js | 1021 - 17 files changed, 25527 deletions(-) delete mode 100755 common/src/main/webapp/thirdparty/js/angular-ui-router.min.js delete mode 100755 common/src/main/webapp/thirdparty/js/angular.min.js delete mode 100755 common/src/main/webapp/thirdparty/js/bootstrap-table-filter-control.min.js delete mode 100755 common/src/main/webapp/thirdparty/js/bootstrap-table.min.js delete mode 100755 common/src/main/webapp/thirdparty/js/bootstrap.min.js delete mode 100755 common/src/main/webapp/thirdparty/js/core/const.js delete mode 100755 common/src/main/webapp/thirdparty/js/core/hk.min.js delete mode 100755 common/src/main/webapp/thirdparty/js/core/load_menuList.js delete mode 100755 common/src/main/webapp/thirdparty/js/core/openoFrameWork.js delete mode 100755 common/src/main/webapp/thirdparty/js/core/pym.min.js delete mode 100755 common/src/main/webapp/thirdparty/js/jquery-ui.js delete mode 100755 common/src/main/webapp/thirdparty/js/jquery.cookie.js delete mode 100755 common/src/main/webapp/thirdparty/js/jquery.ztree.core-3.5.js delete mode 100755 common/src/main/webapp/thirdparty/js/jquery_1.12.4.min.js delete mode 100755 common/src/main/webapp/thirdparty/js/mustache.js delete mode 100755 common/src/main/webapp/thirdparty/js/ng-table.min.js delete mode 100755 common/src/main/webapp/thirdparty/js/tools.js (limited to 'common/src/main/webapp/thirdparty/js') diff --git a/common/src/main/webapp/thirdparty/js/angular-ui-router.min.js b/common/src/main/webapp/thirdparty/js/angular-ui-router.min.js deleted file mode 100755 index d3202953..00000000 --- a/common/src/main/webapp/thirdparty/js/angular-ui-router.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * State-based routing for AngularJS - * @version v0.3.1 - * @link http://angular-ui.github.com/ - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(a,b,c){"use strict";function d(a,b){return R(new(R(function(){},{prototype:a})),b)}function e(a){return Q(arguments,function(b){b!==a&&Q(b,function(b,c){a.hasOwnProperty(c)||(a[c]=b)})}),a}function f(a,b){var c=[];for(var d in a.path){if(a.path[d]!==b.path[d])break;c.push(a.path[d])}return c}function g(a){if(Object.keys)return Object.keys(a);var b=[];return Q(a,function(a,c){b.push(c)}),b}function h(a,b){if(Array.prototype.indexOf)return a.indexOf(b,Number(arguments[2])||0);var c=a.length>>>0,d=Number(arguments[2])||0;for(d=0>d?Math.ceil(d):Math.floor(d),0>d&&(d+=c);c>d;d++)if(d in a&&a[d]===b)return d;return-1}function i(a,b,c,d){var e,i=f(c,d),j={},k=[];for(var l in i)if(i[l]&&i[l].params&&(e=g(i[l].params),e.length))for(var m in e)h(k,e[m])>=0||(k.push(e[m]),j[e[m]]=a[e[m]]);return R({},j,b)}function j(a,b,c){if(!c){c=[];for(var d in a)c.push(d)}for(var e=0;e "));if(s[c]=d,N(a))q.push(c,[function(){return b.get(a)}],j);else{var e=b.annotate(a);Q(e,function(a){a!==c&&i.hasOwnProperty(a)&&n(i[a],a)}),q.push(c,a,e)}r.pop(),s[c]=f}}function o(a){return O(a)&&a.then&&a.$$promises}if(!O(i))throw new Error("'invocables' must be an object");var p=g(i||{}),q=[],r=[],s={};return Q(i,n),i=r=s=null,function(d,f,g){function h(){--u||(v||e(t,f.$$values),r.$$values=t,r.$$promises=r.$$promises||!0,delete r.$$inheritedValues,n.resolve(t))}function i(a){r.$$failure=a,n.reject(a)}function j(c,e,f){function j(a){l.reject(a),i(a)}function k(){if(!L(r.$$failure))try{l.resolve(b.invoke(e,g,t)),l.promise.then(function(a){t[c]=a,h()},j)}catch(a){j(a)}}var l=a.defer(),m=0;Q(f,function(a){s.hasOwnProperty(a)&&!d.hasOwnProperty(a)&&(m++,s[a].then(function(b){t[a]=b,--m||k()},j))}),m||k(),s[c]=l.promise}if(o(d)&&g===c&&(g=f,f=d,d=null),d){if(!O(d))throw new Error("'locals' must be an object")}else d=k;if(f){if(!o(f))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else f=l;var n=a.defer(),r=n.promise,s=r.$$promises={},t=R({},d),u=1+q.length/3,v=!1;if(L(f.$$failure))return i(f.$$failure),r;f.$$inheritedValues&&e(t,m(f.$$inheritedValues,p)),R(s,f.$$promises),f.$$values?(v=e(t,m(f.$$values,p)),r.$$inheritedValues=m(f.$$values,p),h()):(f.$$inheritedValues&&(r.$$inheritedValues=m(f.$$inheritedValues,p)),f.then(h,i));for(var w=0,x=q.length;x>w;w+=3)d.hasOwnProperty(q[w])?h():j(q[w],q[w+1],q[w+2]);return r}},this.resolve=function(a,b,c,d){return this.study(a)(b,c,d)}}function q(a,b,c){this.fromConfig=function(a,b,c){return L(a.template)?this.fromString(a.template,b):L(a.templateUrl)?this.fromUrl(a.templateUrl,b):L(a.templateProvider)?this.fromProvider(a.templateProvider,b,c):null},this.fromString=function(a,b){return M(a)?a(b):a},this.fromUrl=function(c,d){return M(c)&&(c=c(d)),null==c?null:a.get(c,{cache:b,headers:{Accept:"text/html"}}).then(function(a){return a.data})},this.fromProvider=function(a,b,d){return c.invoke(a,null,d||{params:b})}}function r(a,b,e){function f(b,c,d,e){if(q.push(b),o[b])return o[b];if(!/^\w+([-.]+\w+)*(?:\[\])?$/.test(b))throw new Error("Invalid parameter name '"+b+"' in pattern '"+a+"'");if(p[b])throw new Error("Duplicate parameter name '"+b+"' in pattern '"+a+"'");return p[b]=new U.Param(b,c,d,e),p[b]}function g(a,b,c,d){var e=["",""],f=a.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!b)return f;switch(c){case!1:e=["(",")"+(d?"?":"")];break;case!0:f=f.replace(/\/$/,""),e=["(?:/(",")|/)?"];break;default:e=["("+c+"|",")?"]}return f+e[0]+b+e[1]}function h(e,f){var g,h,i,j,k;return g=e[2]||e[3],k=b.params[g],i=a.substring(m,e.index),h=f?e[4]:e[4]||("*"==e[1]?".*":null),h&&(j=U.type(h)||d(U.type("string"),{pattern:new RegExp(h,b.caseInsensitive?"i":c)})),{id:g,regexp:h,segment:i,type:j,cfg:k}}b=R({params:{}},O(b)?b:{});var i,j=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,k=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,l="^",m=0,n=this.segments=[],o=e?e.params:{},p=this.params=e?e.params.$$new():new U.ParamSet,q=[];this.source=a;for(var r,s,t;(i=j.exec(a))&&(r=h(i,!1),!(r.segment.indexOf("?")>=0));)s=f(r.id,r.type,r.cfg,"path"),l+=g(r.segment,s.type.pattern.source,s.squash,s.isOptional),n.push(r.segment),m=j.lastIndex;t=a.substring(m);var u=t.indexOf("?");if(u>=0){var v=this.sourceSearch=t.substring(u);if(t=t.substring(0,u),this.sourcePath=a.substring(0,m+u),v.length>0)for(m=0;i=k.exec(v);)r=h(i,!0),s=f(r.id,r.type,r.cfg,"search"),m=j.lastIndex}else this.sourcePath=a,this.sourceSearch="";l+=g(t)+(b.strict===!1?"/?":"")+"$",n.push(t),this.regexp=new RegExp(l,b.caseInsensitive?"i":c),this.prefix=n[0],this.$$paramNames=q}function s(a){R(this,a)}function t(){function a(a){return null!=a?a.toString().replace(/~/g,"~~").replace(/\//g,"~2F"):a}function e(a){return null!=a?a.toString().replace(/~2F/g,"/").replace(/~~/g,"~"):a}function f(){return{strict:p,caseInsensitive:m}}function i(a){return M(a)||P(a)&&M(a[a.length-1])}function j(){for(;w.length;){var a=w.shift();if(a.pattern)throw new Error("You cannot override a type's .pattern at runtime.");b.extend(u[a.name],l.invoke(a.def))}}function k(a){R(this,a||{})}U=this;var l,m=!1,p=!0,q=!1,u={},v=!0,w=[],x={string:{encode:a,decode:e,is:function(a){return null==a||!L(a)||"string"==typeof a},pattern:/[^\/]*/},"int":{encode:a,decode:function(a){return parseInt(a,10)},is:function(a){return L(a)&&this.decode(a.toString())===a},pattern:/\d+/},bool:{encode:function(a){return a?1:0},decode:function(a){return 0!==parseInt(a,10)},is:function(a){return a===!0||a===!1},pattern:/0|1/},date:{encode:function(a){return this.is(a)?[a.getFullYear(),("0"+(a.getMonth()+1)).slice(-2),("0"+a.getDate()).slice(-2)].join("-"):c},decode:function(a){if(this.is(a))return a;var b=this.capture.exec(a);return b?new Date(b[1],b[2]-1,b[3]):c},is:function(a){return a instanceof Date&&!isNaN(a.valueOf())},equals:function(a,b){return this.is(a)&&this.is(b)&&a.toISOString()===b.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:b.toJson,decode:b.fromJson,is:b.isObject,equals:b.equals,pattern:/[^\/]*/},any:{encode:b.identity,decode:b.identity,equals:b.equals,pattern:/.*/}};t.$$getDefaultValue=function(a){if(!i(a.value))return a.value;if(!l)throw new Error("Injectable functions cannot be called at configuration time");return l.invoke(a.value)},this.caseInsensitive=function(a){return L(a)&&(m=a),m},this.strictMode=function(a){return L(a)&&(p=a),p},this.defaultSquashPolicy=function(a){if(!L(a))return q;if(a!==!0&&a!==!1&&!N(a))throw new Error("Invalid squash policy: "+a+". Valid policies: false, true, arbitrary-string");return q=a,a},this.compile=function(a,b){return new r(a,R(f(),b))},this.isMatcher=function(a){if(!O(a))return!1;var b=!0;return Q(r.prototype,function(c,d){M(c)&&(b=b&&L(a[d])&&M(a[d]))}),b},this.type=function(a,b,c){if(!L(b))return u[a];if(u.hasOwnProperty(a))throw new Error("A type named '"+a+"' has already been defined.");return u[a]=new s(R({name:a},b)),c&&(w.push({name:a,def:c}),v||j()),this},Q(x,function(a,b){u[b]=new s(R({name:b},a))}),u=d(u,{}),this.$get=["$injector",function(a){return l=a,v=!1,j(),Q(x,function(a,b){u[b]||(u[b]=new s(a))}),this}],this.Param=function(a,d,e,f){function j(a){var b=O(a)?g(a):[],c=-1===h(b,"value")&&-1===h(b,"type")&&-1===h(b,"squash")&&-1===h(b,"array");return c&&(a={value:a}),a.$$fn=i(a.value)?a.value:function(){return a.value},a}function k(c,d,e){if(c.type&&d)throw new Error("Param '"+a+"' has two type configurations.");return d?d:c.type?b.isString(c.type)?u[c.type]:c.type instanceof s?c.type:new s(c.type):"config"===e?u.any:u.string}function m(){var b={array:"search"===f?"auto":!1},c=a.match(/\[\]$/)?{array:!0}:{};return R(b,c,e).array}function p(a,b){var c=a.squash;if(!b||c===!1)return!1;if(!L(c)||null==c)return q;if(c===!0||N(c))return c;throw new Error("Invalid squash policy: '"+c+"'. Valid policies: false, true, or arbitrary string")}function r(a,b,d,e){var f,g,i=[{from:"",to:d||b?c:""},{from:null,to:d||b?c:""}];return f=P(a.replace)?a.replace:[],N(e)&&f.push({from:e,to:c}),g=o(f,function(a){return a.from}),n(i,function(a){return-1===h(g,a.from)}).concat(f)}function t(){if(!l)throw new Error("Injectable functions cannot be called at configuration time");var a=l.invoke(e.$$fn);if(null!==a&&a!==c&&!x.type.is(a))throw new Error("Default value ("+a+") for parameter '"+x.id+"' is not an instance of Type ("+x.type.name+")");return a}function v(a){function b(a){return function(b){return b.from===a}}function c(a){var c=o(n(x.replace,b(a)),function(a){return a.to});return c.length?c[0]:a}return a=c(a),L(a)?x.type.$normalize(a):t()}function w(){return"{Param:"+a+" "+d+" squash: '"+A+"' optional: "+z+"}"}var x=this;e=j(e),d=k(e,d,f);var y=m();d=y?d.$asArray(y,"search"===f):d,"string"!==d.name||y||"path"!==f||e.value!==c||(e.value="");var z=e.value!==c,A=p(e,z),B=r(e,y,z,A);R(this,{id:a,type:d,location:f,array:y,squash:A,replace:B,isOptional:z,value:v,dynamic:c,config:e,toString:w})},k.prototype={$$new:function(){return d(this,R(new k,{$$parent:this}))},$$keys:function(){for(var a=[],b=[],c=this,d=g(k.prototype);c;)b.push(c),c=c.$$parent;return b.reverse(),Q(b,function(b){Q(g(b),function(b){-1===h(a,b)&&-1===h(d,b)&&a.push(b)})}),a},$$values:function(a){var b={},c=this;return Q(c.$$keys(),function(d){b[d]=c[d].value(a&&a[d])}),b},$$equals:function(a,b){var c=!0,d=this;return Q(d.$$keys(),function(e){var f=a&&a[e],g=b&&b[e];d[e].type.equals(f,g)||(c=!1)}),c},$$validates:function(a){var d,e,f,g,h,i=this.$$keys();for(d=0;de;e++)if(b(j[e]))return;k&&b(k)}}function o(){return i=i||e.$on("$locationChangeSuccess",n)}var p,q=g.baseHref(),r=d.url();return l||o(),{sync:function(){n()},listen:function(){return o()},update:function(a){return a?void(r=d.url()):void(d.url()!==r&&(d.url(r),d.replace()))},push:function(a,b,e){var f=a.format(b||{});null!==f&&b&&b["#"]&&(f+="#"+b["#"]),d.url(f),p=e&&e.$$avoidResync?d.url():c,e&&e.replace&&d.replace()},href:function(c,e,f){if(!c.validates(e))return null;var g=a.html5Mode();b.isObject(g)&&(g=g.enabled),g=g&&h.history;var i=c.format(e);if(f=f||{},g||null===i||(i="#"+a.hashPrefix()+i),null!==i&&e&&e["#"]&&(i+="#"+e["#"]),i=m(i,g,f.absolute),!f.absolute||!i)return i;var j=!g&&i?"/":"",k=d.port();return k=80===k||443===k?"":":"+k,[d.protocol(),"://",d.host(),k,j,i].join("")}}}var i,j=[],k=null,l=!1;this.rule=function(a){if(!M(a))throw new Error("'rule' must be a function");return j.push(a),this},this.otherwise=function(a){if(N(a)){var b=a;a=function(){return b}}else if(!M(a))throw new Error("'rule' must be a function");return k=a,this},this.when=function(a,b){var c,h=N(b);if(N(a)&&(a=d.compile(a)),!h&&!M(b)&&!P(b))throw new Error("invalid 'handler' in when()");var i={matcher:function(a,b){return h&&(c=d.compile(b),b=["$match",function(a){return c.format(a)}]),R(function(c,d){return g(c,b,a.exec(d.path(),d.search()))},{prefix:N(a.prefix)?a.prefix:""})},regex:function(a,b){if(a.global||a.sticky)throw new Error("when() RegExp must not be global or sticky");return h&&(c=b,b=["$match",function(a){return f(c,a)}]),R(function(c,d){return g(c,b,a.exec(d.path()))},{prefix:e(a)})}},j={matcher:d.isMatcher(a),regex:a instanceof RegExp};for(var k in j)if(j[k])return this.rule(i[k](a,b));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(a){a===c&&(a=!0),l=a},this.$get=h,h.$inject=["$location","$rootScope","$injector","$browser","$sniffer"]}function v(a,e){function f(a){return 0===a.indexOf(".")||0===a.indexOf("^")}function m(a,b){if(!a)return c;var d=N(a),e=d?a:a.name,g=f(e);if(g){if(!b)throw new Error("No reference point given for path '"+e+"'");b=m(b);for(var h=e.split("."),i=0,j=h.length,k=b;j>i;i++)if(""!==h[i]||0!==i){if("^"!==h[i])break;if(!k.parent)throw new Error("Path '"+e+"' not valid for state '"+b.name+"'");k=k.parent}else k=b;h=h.slice(i).join("."),e=k.name+(k.name&&h?".":"")+h}var l=z[e];return!l||!d&&(d||l!==a&&l.self!==a)?c:l}function n(a,b){A[a]||(A[a]=[]),A[a].push(b)}function p(a){for(var b=A[a]||[];b.length;)q(b.shift())}function q(b){b=d(b,{self:b,resolve:b.resolve||{},toString:function(){return this.name}});var c=b.name;if(!N(c)||c.indexOf("@")>=0)throw new Error("State must have a valid name");if(z.hasOwnProperty(c))throw new Error("State '"+c+"' is already defined");var e=-1!==c.indexOf(".")?c.substring(0,c.lastIndexOf(".")):N(b.parent)?b.parent:O(b.parent)&&N(b.parent.name)?b.parent.name:"";if(e&&!z[e])return n(e,b.self);for(var f in C)M(C[f])&&(b[f]=C[f](b,C.$delegates[f]));return z[c]=b,!b[B]&&b.url&&a.when(b.url,["$match","$stateParams",function(a,c){y.$current.navigable==b&&j(a,c)||y.transitionTo(b,a,{inherit:!0,location:!1})}]),p(c),b}function r(a){return a.indexOf("*")>-1}function s(a){for(var b=a.split("."),c=y.$current.name.split("."),d=0,e=b.length;e>d;d++)"*"===b[d]&&(c[d]="*");return"**"===b[0]&&(c=c.slice(h(c,b[1])),c.unshift("**")),"**"===b[b.length-1]&&(c.splice(h(c,b[b.length-2])+1,Number.MAX_VALUE),c.push("**")),b.length!=c.length?!1:c.join("")===b.join("")}function t(a,b){return N(a)&&!L(b)?C[a]:M(b)&&N(a)?(C[a]&&!C.$delegates[a]&&(C.$delegates[a]=C[a]),C[a]=b,this):this}function u(a,b){return O(a)?b=a:b.name=a,q(b),this}function v(a,e,f,h,l,n,p,q,t){function u(b,c,d,f){var g=a.$broadcast("$stateNotFound",b,c,d);if(g.defaultPrevented)return p.update(),D;if(!g.retry)return null;if(f.$retry)return p.update(),E;var h=y.transition=e.when(g.retry);return h.then(function(){return h!==y.transition?A:(b.options.$retry=!0,y.transitionTo(b.to,b.toParams,b.options))},function(){return D}),p.update(),h}function v(a,c,d,g,i,j){function m(){var c=[];return Q(a.views,function(d,e){var g=d.resolve&&d.resolve!==a.resolve?d.resolve:{};g.$template=[function(){return f.load(e,{view:d,locals:i.globals,params:n,notify:j.notify})||""}],c.push(l.resolve(g,i.globals,i.resolve,a).then(function(c){if(M(d.controllerProvider)||P(d.controllerProvider)){var f=b.extend({},g,i.globals);c.$$controller=h.invoke(d.controllerProvider,null,f)}else c.$$controller=d.controller;c.$$state=a,c.$$controllerAs=d.controllerAs,c.$$resolveAs=d.resolveAs,i[e]=c}))}),e.all(c).then(function(){return i.globals})}var n=d?c:k(a.params.$$keys(),c),o={$stateParams:n};i.resolve=l.resolve(a.resolve,o,i.resolve,a);var p=[i.resolve.then(function(a){i.globals=a})];return g&&p.push(g),e.all(p).then(m).then(function(a){return i})}var A=e.reject(new Error("transition superseded")),C=e.reject(new Error("transition prevented")),D=e.reject(new Error("transition aborted")),E=e.reject(new Error("transition failed"));return x.locals={resolve:null,globals:{$stateParams:{}}},y={params:{},current:x.self,$current:x,transition:null},y.reload=function(a){return y.transitionTo(y.current,n,{reload:a||!0,inherit:!1,notify:!0})},y.go=function(a,b,c){return y.transitionTo(a,b,R({inherit:!0,relative:y.$current},c))},y.transitionTo=function(b,c,f){c=c||{},f=R({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},f||{});var g,j=y.$current,l=y.params,o=j.path,q=m(b,f.relative),r=c["#"];if(!L(q)){var s={to:b,toParams:c,options:f},t=u(s,j.self,l,f);if(t)return t;if(b=s.to,c=s.toParams,f=s.options,q=m(b,f.relative),!L(q)){if(!f.relative)throw new Error("No such state '"+b+"'");throw new Error("Could not resolve '"+b+"' from state '"+f.relative+"'")}}if(q[B])throw new Error("Cannot transition to abstract state '"+b+"'");if(f.inherit&&(c=i(n,c||{},y.$current,q)),!q.params.$$validates(c))return E;c=q.params.$$values(c),b=q;var z=b.path,D=0,F=z[D],G=x.locals,H=[];if(f.reload){if(N(f.reload)||O(f.reload)){if(O(f.reload)&&!f.reload.name)throw new Error("Invalid reload state object");var I=f.reload===!0?o[0]:m(f.reload);if(f.reload&&!I)throw new Error("No such reload state '"+(N(f.reload)?f.reload:f.reload.name)+"'");for(;F&&F===o[D]&&F!==I;)G=H[D]=F.locals,D++,F=z[D]}}else for(;F&&F===o[D]&&F.ownParams.$$equals(c,l);)G=H[D]=F.locals,D++,F=z[D];if(w(b,c,j,l,G,f))return r&&(c["#"]=r),y.params=c,S(y.params,n),S(k(b.params.$$keys(),n),b.locals.globals.$stateParams),f.location&&b.navigable&&b.navigable.url&&(p.push(b.navigable.url,c,{$$avoidResync:!0,replace:"replace"===f.location}),p.update(!0)),y.transition=null,e.when(y.current);if(c=k(b.params.$$keys(),c||{}),r&&(c["#"]=r),f.notify&&a.$broadcast("$stateChangeStart",b.self,c,j.self,l,f).defaultPrevented)return a.$broadcast("$stateChangeCancel",b.self,c,j.self,l),null==y.transition&&p.update(),C;for(var J=e.when(G),K=D;K=D;d--)g=o[d],g.self.onExit&&h.invoke(g.self.onExit,g.self,g.locals.globals),g.locals=null;for(d=D;d2?k.enter(a,null,c).then(d):k.enter(a,null,c,d)},leave:function(a,c){b.version.minor>2?k.leave(a).then(c):k.leave(a,c)}};if(j){var e=j&&j(c,a);return{enter:function(a,b,c){e.enter(a,null,b),c()},leave:function(a,b){e.leave(a),b()}}}return d()}var i=g(),j=i("$animator"),k=i("$animate"),l={restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(c,g,i){return function(c,g,j){function k(){if(m&&(m.remove(),m=null),o&&(o.$destroy(),o=null),n){var a=n.data("$uiViewAnim");s.leave(n,function(){a.$$animLeave.resolve(),m=null}),m=n,n=null}}function l(h){var l,m=A(c,j,g,e),t=m&&a.$current&&a.$current.locals[m];if(h||t!==p){l=c.$new(),p=a.$current.locals[m],l.$emit("$viewContentLoading",m);var u=i(l,function(a){var e=f.defer(),h=f.defer(),i={$animEnter:e.promise,$animLeave:h.promise,$$animLeave:h};a.data("$uiViewAnim",i),s.enter(a,g,function(){e.resolve(),o&&o.$emit("$viewContentAnimationEnded"),(b.isDefined(r)&&!r||c.$eval(r))&&d(a)}),k()});n=u,o=l,o.$emit("$viewContentLoaded",m),o.$eval(q)}}var m,n,o,p,q=j.onload||"",r=j.autoscroll,s=h(j,c);g.inheritedData("$uiView");c.$on("$stateChangeSuccess",function(){l(!1)}),l(!0)}}};return l}function z(a,c,d,e){return{restrict:"ECA",priority:-400,compile:function(f){var g=f.html();return function(f,h,i){var j=d.$current,k=A(f,i,h,e),l=j&&j.locals[k];if(l){h.data("$uiView",{name:k,state:l.$$state}),h.html(l.$template?l.$template:g);var m=b.extend({},l);f[l.$$resolveAs]=m;var n=a(h.contents());if(l.$$controller){l.$scope=f,l.$element=h;var o=c(l.$$controller,l);l.$$controllerAs&&(f[l.$$controllerAs]=o,f[l.$$controllerAs][l.$$resolveAs]=m),M(o.$onInit)&&o.$onInit(),h.data("$ngControllerController",o),h.children().data("$ngControllerController",o)}n(f)}}}}}function A(a,b,c,d){var e=d(b.uiView||b.name||"")(a),f=c.inheritedData("$uiView");return e.indexOf("@")>=0?e:e+"@"+(f?f.state.name:"")}function B(a,b){var c,d=a.match(/^\s*({[^}]*})\s*$/);if(d&&(a=b+"("+d[1]+")"),c=a.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!c||4!==c.length)throw new Error("Invalid state ref '"+a+"'");return{state:c[1],paramExpr:c[3]||null}}function C(a){var b=a.parent().inheritedData("$uiView");return b&&b.state&&b.state.name?b.state:void 0}function D(a){var b="[object SVGAnimatedString]"===Object.prototype.toString.call(a.prop("href")),c="FORM"===a[0].nodeName;return{attr:c?"action":b?"xlink:href":"href",isAnchor:"A"===a.prop("tagName").toUpperCase(),clickable:!c}}function E(a,b,c,d,e){return function(f){var g=f.which||f.button,h=e();if(!(g>1||f.ctrlKey||f.metaKey||f.shiftKey||a.attr("target"))){var i=c(function(){b.go(h.state,h.params,h.options)});f.preventDefault();var j=d.isAnchor&&!h.href?1:0;f.preventDefault=function(){j--<=0&&c.cancel(i)}}}}function F(a,b){return{relative:C(a)||b.$current,inherit:!0}}function G(a,c){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(d,e,f,g){var h,i=B(f.uiSref,a.current.name),j={state:i.state,href:null,params:null},k=D(e),l=g[1]||g[0],m=null;j.options=R(F(e,a),f.uiSrefOpts?d.$eval(f.uiSrefOpts):{});var n=function(c){c&&(j.params=b.copy(c)),j.href=a.href(i.state,j.params,j.options),m&&m(),l&&(m=l.$$addStateInfo(i.state,j.params)),null!==j.href&&f.$set(k.attr,j.href)};i.paramExpr&&(d.$watch(i.paramExpr,function(a){a!==j.params&&n(a)},!0),j.params=b.copy(d.$eval(i.paramExpr))),n(),k.clickable&&(h=E(e,a,c,k,function(){return j}),e.bind("click",h),d.$on("$destroy",function(){e.unbind("click",h)}))}}}function H(a,b){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(c,d,e,f){function g(b){m.state=b[0],m.params=b[1],m.options=b[2],m.href=a.href(m.state,m.params,m.options),n&&n(),j&&(n=j.$$addStateInfo(m.state,m.params)),m.href&&e.$set(i.attr,m.href)}var h,i=D(d),j=f[1]||f[0],k=[e.uiState,e.uiStateParams||null,e.uiStateOpts||null],l="["+k.map(function(a){return a||"null"}).join(", ")+"]",m={state:null,params:null,options:null,href:null},n=null;c.$watch(l,g,!0),g(c.$eval(l)),i.clickable&&(h=E(d,a,b,i,function(){return m}),d.bind("click",h),c.$on("$destroy",function(){d.unbind("click",h)}))}}}function I(a,b,c){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(b,d,e,f){function g(b,c,e){var f=a.get(b,C(d)),g=h(b,c),i={state:f||{name:b},params:c,hash:g};return p.push(i),q[g]=e,function(){var a=p.indexOf(i);-1!==a&&p.splice(a,1)}}function h(a,c){if(!N(a))throw new Error("state should be a string");return O(c)?a+T(c):(c=b.$eval(c),O(c)?a+T(c):a)}function i(){for(var a=0;a0)){var c=g(a,b,o);return i(),c}},b.$on("$stateChangeSuccess",i),i()}]}}function J(a){var b=function(b,c){return a.is(b,c)};return b.$stateful=!0,b}function K(a){var b=function(b,c,d){return a.includes(b,c,d)};return b.$stateful=!0,b}var L=b.isDefined,M=b.isFunction,N=b.isString,O=b.isObject,P=b.isArray,Q=b.forEach,R=b.extend,S=b.copy,T=b.toJson;b.module("ui.router.util",["ng"]),b.module("ui.router.router",["ui.router.util"]),b.module("ui.router.state",["ui.router.router","ui.router.util"]),b.module("ui.router",["ui.router.state"]),b.module("ui.router.compat",["ui.router"]),p.$inject=["$q","$injector"],b.module("ui.router.util").service("$resolve",p),q.$inject=["$http","$templateCache","$injector"],b.module("ui.router.util").service("$templateFactory",q);var U;r.prototype.concat=function(a,b){var c={caseInsensitive:U.caseInsensitive(),strict:U.strictMode(),squash:U.defaultSquashPolicy()};return new r(this.sourcePath+a+this.sourceSearch,R(c,b),this)},r.prototype.toString=function(){return this.source},r.prototype.exec=function(a,b){function c(a){function b(a){return a.split("").reverse().join("")}function c(a){return a.replace(/\\-/g,"-")}var d=b(a).split(/-(?!\\)/),e=o(d,b);return o(e,c).reverse()}var d=this.regexp.exec(a);if(!d)return null;b=b||{};var e,f,g,h=this.parameters(),i=h.length,j=this.segments.length-1,k={};if(j!==d.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");var l,m;for(e=0;j>e;e++){for(g=h[e],l=this.params[g],m=d[e+1],f=0;fe;e++){for(g=h[e],k[g]=this.params[g].value(b[g]),l=this.params[g],m=b[g],f=0;ff;f++){var k=h>f,l=d[f],m=e[l],n=m.value(a[l]),p=m.isOptional&&m.type.equals(m.value(),n),q=p?m.squash:!1,r=m.type.encode(n);if(k){var s=c[f+1],t=f+1===h;if(q===!1)null!=r&&(j+=P(r)?o(r,b).join("-"):encodeURIComponent(r)),j+=s;else if(q===!0){var u=j.match(/\/$/)?/\/?(.*)/:/(.*)/;j+=s.match(u)[1]}else N(q)&&(j+=q+s);t&&m.squash===!0&&"/"===j.slice(-1)&&(j=j.slice(0,-1))}else{if(null==r||p&&q!==!1)continue;if(P(r)||(r=[r]),0===r.length)continue;r=o(r,encodeURIComponent).join("&"+l+"="),j+=(g?"&":"?")+(l+"="+r),g=!0}}return j},s.prototype.is=function(a,b){return!0},s.prototype.encode=function(a,b){return a},s.prototype.decode=function(a,b){return a},s.prototype.equals=function(a,b){return a==b},s.prototype.$subPattern=function(){var a=this.pattern.toString();return a.substr(1,a.length-2)},s.prototype.pattern=/.*/,s.prototype.toString=function(){return"{Type:"+this.name+"}"},s.prototype.$normalize=function(a){return this.is(a)?a:this.decode(a)},s.prototype.$asArray=function(a,b){function d(a,b){function d(a,b){return function(){return a[b].apply(a,arguments)}}function e(a){return P(a)?a:L(a)?[a]:[]}function f(a){switch(a.length){case 0:return c;case 1:return"auto"===b?a[0]:a;default:return a}}function g(a){return!a}function h(a,b){return function(c){if(P(c)&&0===c.length)return c;c=e(c);var d=o(c,a);return b===!0?0===n(d,g).length:f(d)}}function i(a){return function(b,c){var d=e(b),f=e(c);if(d.length!==f.length)return!1;for(var g=0;g").append(a).html();try{return a[0].nodeType===Na?F(d):d.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+F(b)})}catch(c){return F(d)}}function wc(a){try{return decodeURIComponent(a)}catch(b){}} - function xc(a){var b={};n((a||"").split("&"),function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=wc(e),y(e)&&(f=y(f)?wc(f):!0,qa.call(b,e)?I(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function Qb(a){var b=[];n(a,function(a,c){I(a)?n(a,function(a){b.push(ja(c,!0)+(!0===a?"":"="+ja(a,!0)))}):b.push(ja(c,!0)+(!0===a?"":"="+ja(a,!0)))});return b.length?b.join("&"):""}function ob(a){return ja(a,!0).replace(/%26/gi,"&").replace(/%3D/gi, - "=").replace(/%2B/gi,"+")}function ja(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function Yd(a,b){var d,c,e=Oa.length;for(c=0;c/,">"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]);b.unshift("ng");c=eb(b,d.strictDi);c.invoke(["$rootScope", - "$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;S&&e.test(S.name)&&(d.debugInfoEnabled=!0,S.name=S.name.replace(e,""));if(S&&!f.test(S.name))return c();S.name=S.name.replace(f,"");fa.resumeBootstrap=function(a){n(a,function(a){b.push(a)});return c()};z(fa.resumeDeferredBootstrap)&&fa.resumeDeferredBootstrap()}function $d(){S.name="NG_ENABLE_DEBUG_INFO!"+S.name;S.location.reload()} - function ae(a){a=fa.element(a).injector();if(!a)throw Aa("test");return a.get("$$testability")}function zc(a,b){b=b||"_";return a.replace(be,function(a,c){return(c?b:"")+a.toLowerCase()})}function ce(){var a;if(!Ac){var b=pb();(oa=q(b)?S.jQuery:b?S[b]:u)&&oa.fn.on?(B=oa,M(oa.fn,{scope:Pa.scope,isolateScope:Pa.isolateScope,controller:Pa.controller,injector:Pa.injector,inheritedData:Pa.inheritedData}),a=oa.cleanData,oa.cleanData=function(b){var c;if(Rb)Rb=!1;else for(var e=0,f;null!=(f=b[e]);e++)(c= - oa._data(f,"events"))&&c.$destroy&&oa(f).triggerHandler("$destroy");a(b)}):B=N;fa.element=B;Ac=!0}}function qb(a,b,d){if(!a)throw Aa("areq",b||"?",d||"required");return a}function Qa(a,b,d){d&&I(a)&&(a=a[a.length-1]);qb(z(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Ra(a,b){if("hasOwnProperty"===a)throw Aa("badname",b);}function Bc(a,b,d){if(!b)return a;b=b.split(".");for(var c,e=a,f=b.length,g=0;g")+c[2];for(c=c[0];c--;)d=d.lastChild;f=cb(f,d.childNodes);d=e.firstChild;d.textContent=""}else f.push(b.createTextNode(a));e.textContent="";e.innerHTML="";n(f,function(a){e.appendChild(a)});return e}function N(a){if(a instanceof N)return a;var b;E(a)&&(a=U(a), - b=!0);if(!(this instanceof N)){if(b&&"<"!=a.charAt(0))throw Ub("nosel");return new N(a)}if(b){b=X;var d;a=(d=Ef.exec(a))?[b.createElement(d[1])]:(d=Lc(a,b))?d.childNodes:[]}Mc(this,a)}function Vb(a){return a.cloneNode(!0)}function ub(a,b){b||vb(a);if(a.querySelectorAll)for(var d=a.querySelectorAll("*"),c=0,e=d.length;cl&&this.remove(t.key);return b}},get:function(a){if(l").parent()[0])});var f=O(a,b,a,c,d,e);K.$$addScopeClass(a);var g=null;return function(b,c,d){qb(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var h=d.parentBoundTranscludeFn,k=d.transcludeControllers;d=d.futureParentElement;h&&h.$$boundTransclude&&(h=h.$$boundTransclude);g||(g=(d= - d&&d[0])?"foreignobject"!==ta(d)&&d.toString().match(/SVG/)?"svg":"html":"html");d="html"!==g?B(Yb(g,B("
").append(a).html())):c?Pa.clone.call(a):a;if(k)for(var l in k)d.data("$"+l+"Controller",k[l].instance);K.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,h);return d}}function O(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,m,t,w,D;if(p)for(D=Array(c.length),m=0;mq.priority)break;if(P=q.scope)q.templateUrl||(H(P)?(Ua("new/isolated scope",O||R,q,Z),O=q):Ua("new/isolated scope",O,q,Z)),R=R||q;x=q.name;!q.templateUrl&&q.controller&&(P=q.controller,T=T||$(),Ua("'"+x+"' controller",T[x],q,Z),T[x]=q);if(P=q.transclude)ga=!0,q.$$tlb||(Ua("transclusion",n,q,Z),n=q),"element"==P?(aa=!0,A=q.priority,P=Z,Z=d.$$element=B(X.createComment(" "+x+": "+d[x]+" ")),b=Z[0],Y(f,ra.call(P,0), - b),Ia=K(P,e,A,g&&g.name,{nonTlbTranscludeDirective:n})):(P=B(Vb(b)).contents(),Z.empty(),Ia=K(P,e,u,u,{needsNewScope:q.$$isolateScope||q.$$newScope}));if(q.template)if(L=!0,Ua("template",J,q,Z),J=q,P=z(q.template)?q.template(Z,d):q.template,P=ja(P),q.replace){g=q;P=Tb.test(P)?Xc(Yb(q.templateNamespace,U(P))):[];b=P[0];if(1!=P.length||1!==b.nodeType)throw ha("tplrt",x,"");Y(f,Z,b);P={$attr:{}};var Wc=V(b,[],P),W=a.splice(F+1,a.length-(F+1));(O||R)&&y(Wc,O,R);a=a.concat(Wc).concat(W);S(d,P);M=a.length}else Z.html(P); - if(q.templateUrl)L=!0,Ua("template",J,q,Z),J=q,q.replace&&(g=q),D=Of(a.splice(F,a.length-F),Z,d,f,ga&&Ia,h,l,{controllerDirectives:T,newScopeDirective:R!==q&&R,newIsolateScopeDirective:O,templateDirective:J,nonTlbTranscludeDirective:n}),M=a.length;else if(q.compile)try{G=q.compile(Z,d,Ia),z(G)?t(null,G,N,Q):G&&t(G.pre,G.post,N,Q)}catch(da){c(da,ua(Z))}q.terminal&&(D.terminal=!0,A=Math.max(A,q.priority))}D.scope=R&&!0===R.scope;D.transcludeOnThisElement=ga;D.templateOnThisElement=L;D.transclude=Ia; - m.hasElementTranscludeDirective=aa;return D}function y(a,b,c){for(var d=0,e=a.length;dm.priority)&&-1!=m.restrict.indexOf(f)&&(k&&(m=Ob(m,{$$start:k,$$end:l})),b.push(m),h=m)}catch(D){c(D)}}return h}function G(b){if(e.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,f=c.length;d"+b+"";return c.childNodes[0].childNodes;default:return b}}function Q(a,b){if("srcdoc"==b)return L.HTML;var c=ta(a);if("xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b))return L.RESOURCE_URL}function W(a,c,d,e,f){var g=Q(a,e);f=h[e]||f;var k=b(d,!0,g,f);if(k){if("multiple"===e&&"select"===ta(a))throw ha("selmulti",ua(a));c.push({priority:100,compile:function(){return{pre:function(a,c,h){c=h.$$observers||(h.$$observers=$());if(l.test(e))throw ha("nodomevents"); - var m=h[e];m!==d&&(k=m&&b(m,!0,g,f),d=m);k&&(h[e]=k(a),(c[e]||(c[e]=[])).$$inter=!0,(h.$$observers&&h.$$observers[e].$$scope||a).$watch(k,function(a,b){"class"===e&&a!=b?h.$updateClass(a,b):h.$set(e,a)}))}}}})}}function Y(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g=b)return a;for(;b--;)8===a[b].nodeType&&Pf.call(a,b,1);return a}function Xe(){var a={},b=!1;this.register=function(b,c){Ra(b,"controller");H(b)?M(a,b):a[b]=c};this.allowGlobals=function(){b=!0};this.$get=["$injector","$window",function(d,c){function e(a,b,c,d){if(!a||!H(a.$scope))throw G("$controller")("noscp", - d,b);a.$scope[b]=c}return function(f,g,h,k){var l,m,r;h=!0===h;k&&E(k)&&(r=k);if(E(f)){k=f.match(Uc);if(!k)throw Qf("ctrlfmt",f);m=k[1];r=r||k[3];f=a.hasOwnProperty(m)?a[m]:Bc(g.$scope,m,!0)||(b?Bc(c,m,!0):u);Qa(f,m,!0)}if(h)return h=(I(f)?f[f.length-1]:f).prototype,l=Object.create(h||null),r&&e(g,r,l,m||f.name),M(function(){var a=d.invoke(f,l,g,m);a!==l&&(H(a)||z(a))&&(l=a,r&&e(g,r,l,m||f.name));return l},{instance:l,identifier:r});l=d.instantiate(f,g,m);r&&e(g,r,l,m||f.name);return l}}]}function Ye(){this.$get= - ["$window",function(a){return B(a.document)}]}function Ze(){this.$get=["$log",function(a){return function(b,d){a.error.apply(a,arguments)}}]}function Zb(a){return H(a)?da(a)?a.toISOString():db(a):a}function df(){this.$get=function(){return function(a){if(!a)return"";var b=[];oc(a,function(a,c){null===a||q(a)||(I(a)?n(a,function(a,d){b.push(ja(c)+"="+ja(Zb(a)))}):b.push(ja(c)+"="+ja(Zb(a))))});return b.join("&")}}}function ef(){this.$get=function(){return function(a){function b(a,e,f){null===a||q(a)|| - (I(a)?n(a,function(a,c){b(a,e+"["+(H(a)?c:"")+"]")}):H(a)&&!da(a)?oc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):d.push(ja(e)+"="+ja(Zb(a))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function $b(a,b){if(E(a)){var d=a.replace(Rf,"").trim();if(d){var c=b("Content-Type");(c=c&&0===c.indexOf($c))||(c=(c=d.match(Sf))&&Tf[c[0]].test(d));c&&(a=uc(d))}}return a}function ad(a){var b=$(),d;E(a)?n(a.split("\n"),function(a){d=a.indexOf(":");var e=F(U(a.substr(0,d)));a=U(a.substr(d+1));e&& - (b[e]=b[e]?b[e]+", "+a:a)}):H(a)&&n(a,function(a,d){var f=F(d),g=U(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function bd(a){var b;return function(d){b||(b=ad(a));return d?(d=b[F(d)],void 0===d&&(d=null),d):b}}function cd(a,b,d,c){if(z(c))return c(a,b,d);n(c,function(c){a=c(a,b,d)});return a}function cf(){var a=this.defaults={transformResponse:[$b],transformRequest:[function(a){return H(a)&&"[object File]"!==sa.call(a)&&"[object Blob]"!==sa.call(a)&&"[object FormData]"!==sa.call(a)?db(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"}, - post:ia(ac),put:ia(ac),patch:ia(ac)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},b=!1;this.useApplyAsync=function(a){return y(a)?(b=!!a,this):b};var d=!0;this.useLegacyPromiseExtensions=function(a){return y(a)?(d=!!a,this):d};var c=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(e,f,g,h,k,l){function m(b){function c(a){var b=M({},a);b.data=cd(a.data,a.headers,a.status,f.transformResponse); - a=a.status;return 200<=a&&300>a?b:k.reject(b)}function e(a,b){var c,d={};n(a,function(a,e){z(a)?(c=a(b),null!=c&&(d[e]=c)):d[e]=a});return d}if(!fa.isObject(b))throw G("$http")("badreq",b);var f=M({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},b);f.headers=function(b){var c=a.headers,d=M({},b.headers),f,g,h,c=M({},c.common,c[F(b.method)]);a:for(f in c){g=F(f);for(h in d)if(F(h)===g)continue a;d[f]=c[f]}return e(d,ia(b))}(b); - f.method=sb(f.method);f.paramSerializer=E(f.paramSerializer)?l.get(f.paramSerializer):f.paramSerializer;var g=[function(b){var d=b.headers,e=cd(b.data,bd(d),u,b.transformRequest);q(e)&&n(d,function(a,b){"content-type"===F(b)&&delete d[b]});q(b.withCredentials)&&!q(a.withCredentials)&&(b.withCredentials=a.withCredentials);return r(b,e).then(c,c)},u],h=k.when(f);for(n(v,function(a){(a.request||a.requestError)&&g.unshift(a.request,a.requestError);(a.response||a.responseError)&&g.push(a.response,a.responseError)});g.length;){b= - g.shift();var m=g.shift(),h=h.then(b,m)}d?(h.success=function(a){Qa(a,"fn");h.then(function(b){a(b.data,b.status,b.headers,f)});return h},h.error=function(a){Qa(a,"fn");h.then(null,function(b){a(b.data,b.status,b.headers,f)});return h}):(h.success=dd("success"),h.error=dd("error"));return h}function r(c,d){function g(a,c,d,e){function f(){l(c,a,d,e)}J&&(200<=a&&300>a?J.put(R,[a,c,ad(d),e]):J.remove(R));b?h.$applyAsync(f):(f(),h.$$phase||h.$apply())}function l(a,b,d,e){b=-1<=b?b:0;(200<=b&&300>b?n.resolve: - n.reject)({data:a,status:b,headers:bd(d),config:c,statusText:e})}function r(a){l(a.data,a.status,ia(a.headers()),a.statusText)}function v(){var a=m.pendingRequests.indexOf(c);-1!==a&&m.pendingRequests.splice(a,1)}var n=k.defer(),D=n.promise,J,K,O=c.headers,R=t(c.url,c.paramSerializer(c.params));m.pendingRequests.push(c);D.then(v,v);!c.cache&&!a.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(J=H(c.cache)?c.cache:H(a.cache)?a.cache:A);J&&(K=J.get(R),y(K)?K&&z(K.then)?K.then(r,r):I(K)?l(K[1], - K[0],ia(K[2]),K[3]):l(K,200,{},"OK"):J.put(R,D));q(K)&&((K=ed(c.url)?f()[c.xsrfCookieName||a.xsrfCookieName]:u)&&(O[c.xsrfHeaderName||a.xsrfHeaderName]=K),e(c.method,R,d,g,O,c.timeout,c.withCredentials,c.responseType));return D}function t(a,b){0=k&&(p.resolve(v),A(C.$$intervalId),delete f[C.$$intervalId]);n||a.$apply()},h);f[C.$$intervalId]=p;return C}var f={};e.cancel=function(a){return a&&a.$$intervalId in f?(f[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete f[a.$$intervalId],!0):!1};return e}]}function bc(a){a=a.split("/");for(var b=a.length;b--;)a[b]=ob(a[b]);return a.join("/")}function fd(a,b){var d=wa(a);b.$$protocol=d.protocol;b.$$host=d.hostname;b.$$port=ea(d.port)||Vf[d.protocol]|| - null}function gd(a,b){var d="/"!==a.charAt(0);d&&(a="/"+a);var c=wa(a);b.$$path=decodeURIComponent(d&&"/"===c.pathname.charAt(0)?c.pathname.substring(1):c.pathname);b.$$search=xc(c.search);b.$$hash=decodeURIComponent(c.hash);b.$$path&&"/"!=b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function pa(a,b){if(0===b.indexOf(a))return b.substr(a.length)}function Fa(a){var b=a.indexOf("#");return-1==b?a:a.substr(0,b)}function ib(a){return a.replace(/(#.+)|#$/,"$1")}function cc(a,b,d){this.$$html5=!0;d=d||""; - fd(a,this);this.$$parse=function(a){var d=pa(b,a);if(!E(d))throw Db("ipthprfx",a,b);gd(d,this);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Qb(this.$$search),d=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=bc(this.$$path)+(a?"?"+a:"")+d;this.$$absUrl=b+this.$$url.substr(1)};this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;y(f=pa(a,c))?(g=f,g=y(f=pa(d,f))?b+(pa("/",f)||f):a+g):y(f=pa(b,c))?g=b+f:b==c+"/"&&(g=b);g&&this.$$parse(g); - return!!g}}function dc(a,b,d){fd(a,this);this.$$parse=function(c){var e=pa(a,c)||pa(b,c),f;q(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",q(e)&&(a=c,this.replace())):(f=pa(d,e),q(f)&&(f=e));gd(f,this);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;0===f.indexOf(e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?f[1]:c);this.$$path=c;this.$$compose()};this.$$compose=function(){var b=Qb(this.$$search),e=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=bc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+(this.$$url? - d+this.$$url:"")};this.$$parseLinkUrl=function(b,d){return Fa(a)==Fa(b)?(this.$$parse(b),!0):!1}}function hd(a,b,d){this.$$html5=!0;dc.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a==Fa(c)?f=c:(g=pa(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$compose=function(){var b=Qb(this.$$search),e=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=bc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+d+this.$$url}}function Eb(a){return function(){return this[a]}} - function id(a,b){return function(d){if(q(d))return this[a];this[a]=b(d);this.$$compose();return this}}function hf(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return y(b)?(a=b,this):a};this.html5Mode=function(a){return $a(a)?(b.enabled=a,this):H(a)?($a(a.enabled)&&(b.enabled=a.enabled),$a(a.requireBase)&&(b.requireBase=a.requireBase),$a(a.rewriteLinks)&&(b.rewriteLinks=a.rewriteLinks),this):b};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window", - function(d,c,e,f,g){function h(a,b,d){var e=l.url(),f=l.$$state;try{c.url(a,b,d),l.$$state=c.state()}catch(g){throw l.url(e),l.$$state=f,g;}}function k(a,b){d.$broadcast("$locationChangeSuccess",l.absUrl(),a,l.$$state,b)}var l,m;m=c.baseHref();var r=c.url(),t;if(b.enabled){if(!m&&b.requireBase)throw Db("nobase");t=r.substring(0,r.indexOf("/",r.indexOf("//")+2))+(m||"/");m=e.history?cc:hd}else t=Fa(r),m=dc;var A=t.substr(0,Fa(t).lastIndexOf("/")+1);l=new m(t,A,"#"+a);l.$$parseLinkUrl(r,r);l.$$state= - c.state();var v=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(b.rewriteLinks&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!=a.which&&2!=a.button){for(var e=B(a.target);"a"!==ta(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),k=e.attr("href")||e.attr("xlink:href");H(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=wa(h.animVal).href);v.test(h)||!h||e.attr("target")||a.isDefaultPrevented()||!l.$$parseLinkUrl(h,k)||(a.preventDefault(),l.absUrl()!=c.url()&&(d.$apply(),g.angular["ff-684208-preventDefault"]= - !0))}});ib(l.absUrl())!=ib(r)&&c.url(l.absUrl(),!0);var n=!0;c.onUrlChange(function(a,b){q(pa(A,a))?g.location.href=a:(d.$evalAsync(function(){var c=l.absUrl(),e=l.$$state,f;a=ib(a);l.$$parse(a);l.$$state=b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;l.absUrl()===a&&(f?(l.$$parse(c),l.$$state=e,h(c,!1,e)):(n=!1,k(c,e)))}),d.$$phase||d.$digest())});d.$watch(function(){var a=ib(c.url()),b=ib(l.absUrl()),f=c.state(),g=l.$$replace,m=a!==b||l.$$html5&&e.history&&f!==l.$$state;if(n|| - m)n=!1,d.$evalAsync(function(){var b=l.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,l.$$state,f).defaultPrevented;l.absUrl()===b&&(c?(l.$$parse(a),l.$$state=f):(m&&h(b,g,f===l.$$state?null:l.$$state),k(a,f)))});l.$$replace=!1});return l}]}function jf(){var a=!0,b=this;this.debugEnabled=function(b){return y(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&& - (a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||x;a=!1;try{a=!!e.apply}catch(k){}return a?function(){var a=[];n(arguments,function(b){a.push(c(b))});return e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function Va(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"=== - a||"__proto__"===a)throw ba("isecfld",b);return a}function jd(a,b){a+="";if(!E(a))throw ba("iseccst",b);return a}function xa(a,b){if(a){if(a.constructor===a)throw ba("isecfn",b);if(a.window===a)throw ba("isecwindow",b);if(a.children&&(a.nodeName||a.prop&&a.attr&&a.find))throw ba("isecdom",b);if(a===Object)throw ba("isecobj",b);}return a}function kd(a,b){if(a){if(a.constructor===a)throw ba("isecfn",b);if(a===Wf||a===Xf||a===Yf)throw ba("isecff",b);}}function ld(a,b){if(a&&(a===(0).constructor||a=== - (!1).constructor||a==="".constructor||a==={}.constructor||a===[].constructor||a===Function.constructor))throw ba("isecaf",b);}function Zf(a,b){return"undefined"!==typeof a?a:b}function md(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function W(a,b){var d,c;switch(a.type){case s.Program:d=!0;n(a.body,function(a){W(a.expression,b);d=d&&a.expression.constant});a.constant=d;break;case s.Literal:a.constant=!0;a.toWatch=[];break;case s.UnaryExpression:W(a.argument,b);a.constant=a.argument.constant; - a.toWatch=a.argument.toWatch;break;case s.BinaryExpression:W(a.left,b);W(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case s.LogicalExpression:W(a.left,b);W(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case s.ConditionalExpression:W(a.test,b);W(a.alternate,b);W(a.consequent,b);a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case s.Identifier:a.constant= - !1;a.toWatch=[a];break;case s.MemberExpression:W(a.object,b);a.computed&&W(a.property,b);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=[a];break;case s.CallExpression:d=a.filter?!b(a.callee.name).$stateful:!1;c=[];n(a.arguments,function(a){W(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});a.constant=d;a.toWatch=a.filter&&!b(a.callee.name).$stateful?c:[a];break;case s.AssignmentExpression:W(a.left,b);W(a.right,b);a.constant=a.left.constant&&a.right.constant; - a.toWatch=[a];break;case s.ArrayExpression:d=!0;c=[];n(a.elements,function(a){W(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});a.constant=d;a.toWatch=c;break;case s.ObjectExpression:d=!0;c=[];n(a.properties,function(a){W(a.value,b);d=d&&a.value.constant;a.value.constant||c.push.apply(c,a.value.toWatch)});a.constant=d;a.toWatch=c;break;case s.ThisExpression:a.constant=!1,a.toWatch=[]}}function nd(a){if(1==a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:u}} - function od(a){return a.type===s.Identifier||a.type===s.MemberExpression}function pd(a){if(1===a.body.length&&od(a.body[0].expression))return{type:s.AssignmentExpression,left:a.body[0].expression,right:{type:s.NGValueParameter},operator:"="}}function qd(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===s.Literal||a.body[0].expression.type===s.ArrayExpression||a.body[0].expression.type===s.ObjectExpression)}function rd(a,b){this.astBuilder=a;this.$filter=b}function sd(a, - b){this.astBuilder=a;this.$filter=b}function Fb(a){return"constructor"==a}function ec(a){return z(a.valueOf)?a.valueOf():$f.call(a)}function kf(){var a=$(),b=$();this.$get=["$filter",function(d){function c(a,b){return null==a||null==b?a===b:"object"===typeof a&&(a=ec(a),"object"===typeof a)?!1:a===b||a!==a&&b!==b}function e(a,b,d,e,f){var g=e.inputs,h;if(1===g.length){var k=c,g=g[0];return a.$watch(function(a){var b=g(a);c(b,k)||(h=e(a,u,u,[b]),k=b&&ec(b));return h},b,d,f)}for(var l=[],m=[],r=0,n= - g.length;r=this.promise.$$state.status&&d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;fa)for(b in l++,f)qa.call(e,b)||(n--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$stateful=!0;var d=this,e,f,g,k=1n&&(v=4-n,q[v]||(q[v]=[]),q[v].push({msg:z(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:f,oldVal:h}));else if(a===c){r=!1;break a}}catch(y){g(y)}if(!(l=A.$$watchersCount&&A.$$childHead||A!==this&&A.$$nextSibling))for(;A!==this&&!(l=A.$$nextSibling);)A=A.$parent}while(A=l);if((r||u.length)&&!n--)throw w.$$phase=null,d("infdig", - b,q);}while(r||u.length);for(w.$$phase=null;L.length;)try{L.shift()()}catch(x){g(x)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===w&&k.$$applicationDestroyed();A(this,-this.$$watchersCount);for(var b in this.$$listenerCount)v(this,this.$$listenerCount[b],b);a&&a.$$childHead==this&&(a.$$childHead=this.$$nextSibling);a&&a.$$childTail==this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling= - this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=x;this.$on=this.$watch=this.$watchGroup=function(){return x};this.$$listeners={};this.$$nextSibling=null;m(this)}},$eval:function(a,b){return h(a)(this,b)},$evalAsync:function(a,b){w.$$phase||u.length||k.defer(function(){u.length&&w.$digest()});u.push({scope:this,expression:a,locals:b})},$$postDigest:function(a){L.push(a)},$apply:function(a){try{t("$apply"); - try{return this.$eval(a)}finally{w.$$phase=null}}catch(b){g(b)}finally{try{w.$digest()}catch(c){throw g(c),c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&aa.push(b);C()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(c[d]=null,v(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,f=!1,h= - {name:a,targetScope:e,stopPropagation:function(){f=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},k=cb([h],arguments,1),l,m;do{d=e.$$listeners[a]||c;h.currentScope=e;l=0;for(m=d.length;lHa)throw ya("iequirks");var c=ia(la);c.isEnabled=function(){return a};c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=Ya);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;n(la,function(a, - b){var d=F(b);c[fb("parse_as_"+d)]=function(b){return e(a,b)};c[fb("get_trusted_"+d)]=function(b){return f(a,b)};c[fb("trust_as_"+d)]=function(b){return g(a,b)}});return c}]}function qf(){this.$get=["$window","$document",function(a,b){var d={},c=ea((/android (\d+)/.exec(F((a.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((a.navigator||{}).userAgent),f=b[0]||{},g,h=/^(Moz|webkit|ms)(?=[A-Z])/,k=f.body&&f.body.style,l=!1,m=!1;if(k){for(var r in k)if(l=h.exec(r)){g=l[0];g=g.substr(0,1).toUpperCase()+ - g.substr(1);break}g||(g="WebkitOpacity"in k&&"webkit");l=!!("transition"in k||g+"Transition"in k);m=!!("animation"in k||g+"Animation"in k);!c||l&&m||(l=E(k.webkitTransition),m=E(k.webkitAnimation))}return{history:!(!a.history||!a.history.pushState||4>c||e),hasEvent:function(a){if("input"===a&&11>=Ha)return!1;if(q(d[a])){var b=f.createElement("div");d[a]="on"+a in b}return d[a]},csp:Ba(),vendorPrefix:g,transitions:l,animations:m,android:c}}]}function sf(){this.$get=["$templateCache","$http","$q","$sce", - function(a,b,d,c){function e(f,g){e.totalPendingRequests++;E(f)&&a.get(f)||(f=c.getTrustedResourceUrl(f));var h=b.defaults&&b.defaults.transformResponse;I(h)?h=h.filter(function(a){return a!==$b}):h===$b&&(h=null);return b.get(f,{cache:a,transformResponse:h})["finally"](function(){e.totalPendingRequests--}).then(function(b){a.put(f,b.data);return b.data},function(a){if(!g)throw ha("tpload",f,a.status,a.statusText);return d.reject(a)})}e.totalPendingRequests=0;return e}]}function tf(){this.$get=["$rootScope", - "$browser","$location",function(a,b,d){return{findBindings:function(a,b,d){a=a.getElementsByClassName("ng-binding");var g=[];n(a,function(a){var c=fa.element(a).data("$binding");c&&n(c,function(c){d?(new RegExp("(^|\\s)"+ud(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!=c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-","data-ng-","ng\\:"],h=0;ha;a=Math.abs(a);var g=Infinity===a;if(!g&&!isFinite(a))return"";var h=a+"",k="",l=!1,m=[];g&&(k="\u221e");if(!g&&-1!==h.indexOf("e")){var r=h.match(/([\d\.]+)e(-?)(\d+)/);r&&"-"==r[2]&&r[3]>e+1?a=0:(k=h,l=!0)}if(g||l)0a&&(k=a.toFixed(e),a=parseFloat(k),k=k.replace(ic,c));else{g=(h.split(ic)[1]||"").length; - q(e)&&(e=Math.min(Math.max(b.minFrac,g),b.maxFrac));a=+(Math.round(+(a.toString()+"e"+e)).toString()+"e"+-e);var g=(""+a).split(ic),h=g[0],g=g[1]||"",r=0,t=b.lgSize,n=b.gSize;if(h.length>=t+n)for(r=h.length-t,l=0;la&&(c="-",a=-a);for(a=""+a;a.length-d)e+=d;0===e&&-12==d&&(e=12);return Gb(e,b,c)}}function Hb(a,b){return function(d,c){var e=d["get"+a](),f=sb(b?"SHORT"+a:a);return c[f][e]}}function Dd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Ed(a){return function(b){var d=Dd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))- - +d;b=1+Math.round(b/6048E5);return Gb(b,a)}}function jc(a,b){return 0>=a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function zd(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,h=b[8]?a.setUTCFullYear:a.setFullYear,k=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=ea(b[9]+b[10]),g=ea(b[9]+b[11]));h.call(a,ea(b[1]),ea(b[2])-1,ea(b[3]));f=ea(b[4]||0)-f;g=ea(b[5]||0)-g;h=ea(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));k.call(a,f,g,h,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/; - return function(c,d,f){var g="",h=[],k,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;E(c)&&(c=hg.test(c)?ea(c):b(c));Q(c)&&(c=new Date(c));if(!da(c)||!isFinite(c.getTime()))return c;for(;d;)(l=ig.exec(d))?(h=cb(h,l,1),d=h.pop()):(h.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=vc(f,c.getTimezoneOffset()),c=Pb(c,f,!0));n(h,function(b){k=jg[b];g+=k?k(c,a.DATETIME_FORMATS,m):b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function cg(){return function(a,b){q(b)&&(b=2);return db(a,b)}}function dg(){return function(a, - b,d){b=Infinity===Math.abs(Number(b))?Number(b):ea(b);if(isNaN(b))return a;Q(a)&&(a=a.toString());if(!I(a)&&!E(a))return a;d=!d||isNaN(d)?0:ea(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?a.slice(d,d+b):0===d?a.slice(b,a.length):a.slice(Math.max(0,d+b),d)}}function Bd(a){function b(b,d){d=d?-1:1;return b.map(function(b){var c=1,h=Ya;if(z(b))h=b;else if(E(b)){if("+"==b.charAt(0)||"-"==b.charAt(0))c="-"==b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(h=a(b),h.constant))var k=h(),h=function(a){return a[k]}}return{get:h, - descending:c*d}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}return function(a,e,f){if(!za(a))return a;I(e)||(e=[e]);0===e.length&&(e=["+"]);var g=b(e,f);g.push({get:function(){return{}},descending:f?-1:1});a=Array.prototype.map.call(a,function(a,b){return{value:a,predicateValues:g.map(function(c){var e=c.get(a);c=typeof e;if(null===e)c="string",e="null";else if("string"===c)e=e.toLowerCase();else if("object"===c)a:{if("function"===typeof e.valueOf&& - (e=e.valueOf(),d(e)))break a;if(qc(e)&&(e=e.toString(),d(e)))break a;e=b}return{value:e,type:c}})}});a.sort(function(a,b){for(var c=0,d=0,e=g.length;db||37<=b&&40>=b||m(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut", - m)}b.on("change",k);c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Kb(a,b){return function(d,c){var e,f;if(da(d))return d;if(E(d)){'"'==d.charAt(0)&&'"'==d.charAt(d.length-1)&&(d=d.substring(1,d.length-1));if(kg.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0, - mm:0,ss:0,sss:0},n(e,function(a,c){c=s};g.$observe("min",function(a){s=n(a);h.$validate()})}if(y(g.max)||g.ngMax){var p;h.$validators.max=function(a){return!r(a)||q(p)||d(a)<=p};g.$observe("max",function(a){p=n(a);h.$validate()})}}}function Hd(a,b,d,c){(c.$$hasNativeValidators=H(b[0].validity))&&c.$parsers.push(function(a){var c=b.prop("validity")||{}; - return c.badInput&&!c.typeMismatch?u:a})}function Id(a,b,d,c,e){if(y(c)){a=a(c);if(!a.constant)throw lb("constexpr",d,c);return a(b)}return e}function lc(a,b){a="ngClass"+a;return["$animate",function(d){function c(a,b){var c=[],d=0;a:for(;d(?:<\/\1>|)$/,Tb=/<|&#?\w+;/, - Cf=/<([\w:-]+)/,Df=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ka={option:[1,'"],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ka.optgroup=ka.option;ka.tbody=ka.tfoot=ka.colgroup=ka.caption=ka.thead;ka.th=ka.td;var Kf=Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)& - 16)},Pa=N.prototype={ready:function(a){function b(){d||(d=!0,a())}var d=!1;"complete"===X.readyState?setTimeout(b):(this.on("DOMContentLoaded",b),N(S).on("load",b))},toString:function(){var a=[];n(this,function(b){a.push(""+b)});return"["+a.join(", ")+"]"},eq:function(a){return 0<=a?B(this[a]):B(this[this.length+a])},length:0,push:mg,sort:[].sort,splice:[].splice},Cb={};n("multiple selected checked disabled readOnly required open".split(" "),function(a){Cb[F(a)]=a});var Rc={};n("input select option textarea button form details".split(" "), - function(a){Rc[a]=!0});var Zc={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};n({data:Wb,removeData:vb,hasData:function(a){for(var b in gb[a.ng339])return!0;return!1}},function(a,b){N[b]=a});n({data:Wb,inheritedData:Bb,scope:function(a){return B.data(a,"$scope")||Bb(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return B.data(a,"$isolateScope")||B.data(a,"$isolateScopeNoTemplate")},controller:Oc,injector:function(a){return Bb(a, - "$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:yb,css:function(a,b,d){b=fb(b);if(y(d))a.style[b]=d;else return a.style[b]},attr:function(a,b,d){var c=a.nodeType;if(c!==Na&&2!==c&&8!==c)if(c=F(b),Cb[c])if(y(d))d?(a[b]=!0,a.setAttribute(b,c)):(a[b]=!1,a.removeAttribute(c));else return a[b]||(a.attributes.getNamedItem(b)||x).specified?c:u;else if(y(d))a.setAttribute(b,d);else if(a.getAttribute)return a=a.getAttribute(b,2),null===a?u:a},prop:function(a,b,d){if(y(d))a[b]=d;else return a[b]}, - text:function(){function a(a,d){if(q(d)){var c=a.nodeType;return 1===c||c===Na?a.textContent:""}a.textContent=d}a.$dv="";return a}(),val:function(a,b){if(q(b)){if(a.multiple&&"select"===ta(a)){var d=[];n(a.options,function(a){a.selected&&d.push(a.value||a.text)});return 0===d.length?null:d}return a.value}a.value=b},html:function(a,b){if(q(b))return a.innerHTML;ub(a,!0);a.innerHTML=b},empty:Pc},function(a,b){N.prototype[b]=function(b,c){var e,f,g=this.length;if(a!==Pc&&q(2==a.length&&a!==yb&&a!==Oc? - b:c)){if(H(b)){for(e=0;e <= >= && || ! = |".split(" "),function(a){Lb[a]=!0});var sg={n:"\n",f:"\f",r:"\r", - t:"\t",v:"\v","'":"'",'"':'"'},fc=function(a){this.options=a};fc.prototype={constructor:fc,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index=a&&"string"===typeof a},isWhitespace:function(a){return" "===a||"\r"===a|| - "\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdent:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b=y(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw ba("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index","<=",">=");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:s.BinaryExpression,operator:b.text, - left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:s.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.constants.hasOwnProperty(this.peek().text)?a=bb(this.constants[this.consume().text]):this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant(): - this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:s.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:s.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:s.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:s.CallExpression,callee:this.identifier(), - arguments:a,filter:!0};this.expect(":");)a.push(this.expression());return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.expression());while(this.expect(","))}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:s.Identifier,name:a.text}},constant:function(){return{type:s.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break; - a.push(this.expression())}while(this.expect(","))}this.consume("]");return{type:s.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;b={type:s.Property,kind:"init"};this.peek().constant?b.key=this.constant():this.peek().identifier?b.key=this.identifier():this.throwError("invalid key",this.peek());this.consume(":");b.value=this.expression();a.push(b)}while(this.expect(","))}this.consume("}");return{type:s.ObjectExpression,properties:a}}, - throwError:function(a,b){throw ba("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw ba("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw ba("ueoe",this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,e){if(this.tokens.length>a){a=this.tokens[a]; - var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},constants:{"true":{type:s.Literal,value:!0},"false":{type:s.Literal,value:!1},"null":{type:s.Literal,value:null},undefined:{type:s.Literal,value:u},"this":{type:s.ThisExpression}}};rd.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[], - body:[],own:{}},inputs:[]};W(c,d.$filter);var e="",f;this.stage="assign";if(f=pd(c))this.state.computing="assign",e=this.nextId(),this.recurse(f,e),this.return_(e),e="fn.assign="+this.generateFunction("assign","s,v,l");f=nd(c.body);d.stage="inputs";n(f,function(a,b){var c="fn"+b;d.state[c]={vars:[],body:[],own:{}};d.state.computing=c;var e=d.nextId();d.recurse(a,e);d.return_(e);d.state.inputs.push(c);a.watchId=b});this.state.computing="fn";this.stage="main";this.recurse(c);e='"'+this.USE+" "+this.STRICT+ - '";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+e+this.watchFns()+"return fn;";e=(new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",e))(this.$filter,Va,xa,kd,jd,ld,Zf,md,a);this.state=this.stage=u;e.literal=qd(c);e.constant=c.constant;return e},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;n(b,function(b){a.push("var "+b+"="+d.generateFunction(b, - "s"))});b.length&&a.push("fn.inputs=["+b.join(",")+"];");return a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;n(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b, - d,c,e,f){var g,h,k=this,l,m;c=c||x;if(!f&&y(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case s.Program:n(a.body,function(b,c){k.recurse(b.expression,u,u,function(a){h=a});c!==a.body.length-1?k.current().body.push(h,";"):k.return_(h)});break;case s.Literal:m=this.escape(a.value);this.assign(b,m);c(m);break;case s.UnaryExpression:this.recurse(a.argument,u,u,function(a){h=a});m=a.operator+"("+this.ifDefined(h, - 0)+")";this.assign(b,m);c(m);break;case s.BinaryExpression:this.recurse(a.left,u,u,function(a){g=a});this.recurse(a.right,u,u,function(a){h=a});m="+"===a.operator?this.plus(g,h):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(h,0):"("+g+")"+a.operator+"("+h+")";this.assign(b,m);c(m);break;case s.LogicalExpression:b=b||this.nextId();k.recurse(a.left,b);k.if_("&&"===a.operator?b:k.not(b),k.lazyRecurse(a.right,b));c(b);break;case s.ConditionalExpression:b=b||this.nextId();k.recurse(a.test, - b);k.if_(b,k.lazyRecurse(a.alternate,b),k.lazyRecurse(a.consequent,b));c(b);break;case s.Identifier:b=b||this.nextId();d&&(d.context="inputs"===k.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);Va(a.name);k.if_("inputs"===k.stage||k.not(k.getHasOwnProperty("l",a.name)),function(){k.if_("inputs"===k.stage||"s",function(){e&&1!==e&&k.if_(k.not(k.nonComputedMember("s",a.name)),k.lazyAssign(k.nonComputedMember("s",a.name),"{}"));k.assign(b,k.nonComputedMember("s", - a.name))})},b&&k.lazyAssign(b,k.nonComputedMember("l",a.name)));(k.state.expensiveChecks||Fb(a.name))&&k.addEnsureSafeObject(b);c(b);break;case s.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();k.recurse(a.object,g,u,function(){k.if_(k.notNull(g),function(){if(a.computed)h=k.nextId(),k.recurse(a.property,h),k.getStringValue(h),k.addEnsureSafeMemberName(h),e&&1!==e&&k.if_(k.not(k.computedMember(g,h)),k.lazyAssign(k.computedMember(g,h),"{}")),m=k.ensureSafeObject(k.computedMember(g, - h)),k.assign(b,m),d&&(d.computed=!0,d.name=h);else{Va(a.property.name);e&&1!==e&&k.if_(k.not(k.nonComputedMember(g,a.property.name)),k.lazyAssign(k.nonComputedMember(g,a.property.name),"{}"));m=k.nonComputedMember(g,a.property.name);if(k.state.expensiveChecks||Fb(a.property.name))m=k.ensureSafeObject(m);k.assign(b,m);d&&(d.computed=!1,d.name=a.property.name)}},function(){k.assign(b,"undefined")});c(b)},!!e);break;case s.CallExpression:b=b||this.nextId();a.filter?(h=k.filter(a.callee.name),l=[],n(a.arguments, - function(a){var b=k.nextId();k.recurse(a,b);l.push(b)}),m=h+"("+l.join(",")+")",k.assign(b,m),c(b)):(h=k.nextId(),g={},l=[],k.recurse(a.callee,h,g,function(){k.if_(k.notNull(h),function(){k.addEnsureSafeFunction(h);n(a.arguments,function(a){k.recurse(a,k.nextId(),u,function(a){l.push(k.ensureSafeObject(a))})});g.name?(k.state.expensiveChecks||k.addEnsureSafeObject(g.context),m=k.member(g.context,g.name,g.computed)+"("+l.join(",")+")"):m=h+"("+l.join(",")+")";m=k.ensureSafeObject(m);k.assign(b,m)}, - function(){k.assign(b,"undefined")});c(b)}));break;case s.AssignmentExpression:h=this.nextId();g={};if(!od(a.left))throw ba("lval");this.recurse(a.left,u,g,function(){k.if_(k.notNull(g.context),function(){k.recurse(a.right,h);k.addEnsureSafeObject(k.member(g.context,g.name,g.computed));k.addEnsureSafeAssignContext(g.context);m=k.member(g.context,g.name,g.computed)+a.operator+h;k.assign(b,m);c(b||m)})},1);break;case s.ArrayExpression:l=[];n(a.elements,function(a){k.recurse(a,k.nextId(),u,function(a){l.push(a)})}); - m="["+l.join(",")+"]";this.assign(b,m);c(m);break;case s.ObjectExpression:l=[];n(a.properties,function(a){k.recurse(a.value,k.nextId(),u,function(b){l.push(k.escape(a.key.type===s.Identifier?a.key.name:""+a.key.value)+":"+b)})});m="{"+l.join(",")+"}";this.assign(b,m);c(m);break;case s.ThisExpression:this.assign(b,"s");c("s");break;case s.NGValueParameter:this.assign(b,"v"),c("v")}},getHasOwnProperty:function(a,b){var d=a+"."+b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+ - this.escape(b)+" in "+a+")"));return c[d]},assign:function(a,b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a, - "){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){return a+"."+b},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")}, - addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a),";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+",text)")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+ - a+",text)"},lazyRecurse:function(a,b,d,c,e,f){var g=this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(E(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(Q(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if("undefined"=== - typeof a)return"undefined";throw ba("esc");},nextId:function(a,b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};sd.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.expression=a;this.expensiveChecks=b;W(c,d.$filter);var e,f;if(e=pd(c))f=this.recurse(e);e=nd(c.body);var g;e&&(g=[],n(e,function(a,b){var c=d.recurse(a);a.input=c;g.push(c);a.watchId=b}));var h=[];n(c.body,function(a){h.push(d.recurse(a.expression))}); - e=0===c.body.length?function(){}:1===c.body.length?h[0]:function(a,b){var c;n(h,function(d){c=d(a,b)});return c};f&&(e.assign=function(a,b,c){return f(a,c,b)});g&&(e.inputs=g);e.literal=qd(c);e.constant=c.constant;return e},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case s.Literal:return this.value(a.value,b);case s.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case s.BinaryExpression:return c=this.recurse(a.left), - e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case s.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case s.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case s.Identifier:return Va(a.name,f.expression),f.identifier(a.name,f.expensiveChecks||Fb(a.name),b,d,f.expression);case s.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(Va(a.property.name, - f.expression),e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c,e,b,d,f.expression):this.nonComputedMember(c,e,f.expensiveChecks,b,d,f.expression);case s.CallExpression:return g=[],n(a.arguments,function(a){g.push(f.recurse(a))}),a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var r=[],n=0;n":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c, - e,f,g){c=a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,h){e=a(e,f,g,h)?b(e,f,g,h):d(e,f,g,h);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:u,name:u,value:a}:a}},identifier:function(a,b,d,c,e){return function(f,g,h,k){f= - g&&a in g?g:f;c&&1!==c&&f&&!f[a]&&(f[a]={});g=f?f[a]:u;b&&xa(g,e);return d?{context:f,name:a,value:g}:g}},computedMember:function(a,b,d,c,e){return function(f,g,h,k){var l=a(f,g,h,k),m,n;null!=l&&(m=b(f,g,h,k),m=jd(m),Va(m,e),c&&1!==c&&l&&!l[m]&&(l[m]={}),n=l[m],xa(n,e));return d?{context:l,name:m,value:n}:n}},nonComputedMember:function(a,b,d,c,e,f){return function(g,h,k,l){g=a(g,h,k,l);e&&1!==e&&g&&!g[b]&&(g[b]={});h=null!=g?g[b]:u;(d||Fb(b))&&xa(h,f);return c?{context:g,name:b,value:h}:h}},inputs:function(a, - b){return function(d,c,e,f){return f?f[b]:a(d,c,e)}}};var gc=function(a,b,d){this.lexer=a;this.$filter=b;this.options=d;this.ast=new s(this.lexer);this.astCompiler=d.csp?new sd(this.ast,b):new rd(this.ast,b)};gc.prototype={constructor:gc,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};$();$();var $f=Object.prototype.valueOf,ya=G("$sce"),la={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},ha=G("$compile"),Y=X.createElement("a"),wd=wa(S.location.href); - xd.$inject=["$document"];Jc.$inject=["$provide"];yd.$inject=["$locale"];Ad.$inject=["$locale"];var ic=".",jg={yyyy:ca("FullYear",4),yy:ca("FullYear",2,0,!0),y:ca("FullYear",1),MMMM:Hb("Month"),MMM:Hb("Month",!0),MM:ca("Month",2,1),M:ca("Month",1,1),dd:ca("Date",2),d:ca("Date",1),HH:ca("Hours",2),H:ca("Hours",1),hh:ca("Hours",2,-12),h:ca("Hours",1,-12),mm:ca("Minutes",2),m:ca("Minutes",1),ss:ca("Seconds",2),s:ca("Seconds",1),sss:ca("Milliseconds",3),EEEE:Hb("Day"),EEE:Hb("Day",!0),a:function(a,b){return 12> - a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Gb(Math[0=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},ig=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,hg=/^\-?\d+$/;zd.$inject=["$locale"];var eg=na(F),fg=na(sb);Bd.$inject=["$parse"];var he=na({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a, - b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===sa.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),tb={};n(Cb,function(a,b){function d(a,d,e){a.$watch(e[c],function(a){e.$set(b,!!a)})}if("multiple"!=a){var c=va("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});tb[c]=function(){return{restrict:"A",priority:100,link:e}}}});n(Zc,function(a,b){tb[b]=function(){return{priority:100,link:function(a, - c,e){if("ngPattern"===b&&"/"==e.ngPattern.charAt(0)&&(c=e.ngPattern.match(lg))){e.$set("ngPattern",new RegExp(c[1],c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});n(["src","srcset","href"],function(a){var b=va("ng-"+a);tb[b]=function(){return{priority:99,link:function(d,c,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===sa.call(c.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null);e.$observe(b,function(b){b?(e.$set(g,b),Ha&&f&&c.prop(f,e[g])):"href"===a&&e.$set(g,null)})}}}}); - var Ib={$addControl:x,$$renameControl:function(a,b){a.$name=b},$removeControl:x,$setValidity:x,$setDirty:x,$setPristine:x,$setSubmitted:x};Fd.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Nd=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||x}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Fd,compile:function(d,f){d.addClass(Wa).addClass(mb);var g=f.name?"name":a&&f.ngForm?"ngForm": - !1;return{pre:function(a,d,e,f){var n=f[0];if(!("action"in e)){var q=function(b){a.$apply(function(){n.$commitViewValue();n.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",q,!1);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",q,!1)},0,!1)})}(f[1]||n.$$parentForm).$addControl(n);var s=g?c(n.$name):x;g&&(s(a,n),e.$observe(g,function(b){n.$name!==b&&(s(a,u),n.$$parentForm.$$renameControl(n,b),s=c(n.$name),s(a,n))}));d.on("$destroy",function(){n.$$parentForm.$removeControl(n); - s(a,u);M(n,Ib)})}}}}}]},ie=Nd(),ve=Nd(!0),kg=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,tg=/^[A-Za-z][A-Za-z\d.+-]*:\/*(?:\w+(?::\w+)?@)?[^\s/]+(?::\d+)?(?:\/[\w#!:.?+=&%@\-/]*)?$/,ug=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,vg=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Od=/^(\d{4})-(\d{2})-(\d{2})$/,Pd=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,mc=/^(\d{4})-W(\d\d)$/,Qd=/^(\d{4})-(\d\d)$/, - Rd=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Sd={text:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);kc(c)},date:kb("date",Od,Kb(Od,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":kb("datetimelocal",Pd,Kb(Pd,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:kb("time",Rd,Kb(Rd,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:kb("week",mc,function(a,b){if(da(a))return a;if(E(a)){mc.lastIndex=0;var d=mc.exec(a);if(d){var c=+d[1],e=+d[2],f=d=0,g=0,h=0,k=Dd(c),e=7*(e-1);b&&(d=b.getHours(),f= - b.getMinutes(),g=b.getSeconds(),h=b.getMilliseconds());return new Date(c,0,k.getDate()+e,d,f,g,h)}}return NaN},"yyyy-Www"),month:kb("month",Qd,Kb(Qd,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f){Hd(a,b,d,c);jb(a,b,d,c,e,f);c.$$parserName="number";c.$parsers.push(function(a){return c.$isEmpty(a)?null:vg.test(a)?parseFloat(a):u});c.$formatters.push(function(a){if(!c.$isEmpty(a)){if(!Q(a))throw lb("numfmt",a);a=a.toString()}return a});if(y(d.min)||d.ngMin){var g;c.$validators.min=function(a){return c.$isEmpty(a)|| - q(g)||a>=g};d.$observe("min",function(a){y(a)&&!Q(a)&&(a=parseFloat(a,10));g=Q(a)&&!isNaN(a)?a:u;c.$validate()})}if(y(d.max)||d.ngMax){var h;c.$validators.max=function(a){return c.$isEmpty(a)||q(h)||a<=h};d.$observe("max",function(a){y(a)&&!Q(a)&&(a=parseFloat(a,10));h=Q(a)&&!isNaN(a)?a:u;c.$validate()})}},url:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);kc(c);c.$$parserName="url";c.$validators.url=function(a,b){var d=a||b;return c.$isEmpty(d)||tg.test(d)}},email:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);kc(c); - c.$$parserName="email";c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||ug.test(d)}},radio:function(a,b,d,c){q(d.name)&&b.attr("name",++nb);b.on("click",function(a){b[0].checked&&c.$setViewValue(d.value,a&&a.type)});c.$render=function(){b[0].checked=d.value==c.$viewValue};d.$observe("value",c.$render)},checkbox:function(a,b,d,c,e,f,g,h){var k=Id(h,a,"ngTrueValue",d.ngTrueValue,!0),l=Id(h,a,"ngFalseValue",d.ngFalseValue,!1);b.on("click",function(a){c.$setViewValue(b[0].checked,a&& - a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty=function(a){return!1===a};c.$formatters.push(function(a){return ma(a,k)});c.$parsers.push(function(a){return a?k:l})},hidden:x,button:x,submit:x,reset:x,file:x},Dc=["$browser","$sniffer","$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){h[0]&&(Sd[F(g.type)]||Sd.text)(e,f,g,h[0],b,a,d,c)}}}}],wg=/^(true|false|\d+)$/,Ne=function(){return{restrict:"A",priority:100,compile:function(a, - b){return wg.test(b.ngValue)?function(a,b,e){e.$set("value",a.$eval(e.ngValue))}:function(a,b,e){a.$watch(e.ngValue,function(a){e.$set("value",a)})}}}},ne=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0];b.$watch(e.ngBind,function(a){c.textContent=q(a)?"":a})}}}}],pe=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate)); - b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=q(a)?"":a})}}}}],oe=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(a){return(a||"").toString()});d.$$addBindingClass(c);return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){c.html(a.getTrustedHtml(f(b))||"")})}}}}],Me=na({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}), - qe=lc("",!0),se=lc("Odd",0),re=lc("Even",1),te=La({compile:function(a,b){b.$set("ngCloak",u);a.removeClass("ng-cloak")}}),ue=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Ic={},xg={blur:!0,focus:!0};n("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=va("ng-"+a);Ic[b]=["$parse","$rootScope",function(d,c){return{restrict:"A",compile:function(e,f){var g= - d(f[b],null,!0);return function(b,d){d.on(a,function(d){var e=function(){g(b,{$event:d})};xg[a]&&c.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var xe=["$animate",function(a){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(b,d,c,e,f){var g,h,k;b.$watch(c.ngIf,function(b){b?h||f(function(b,e){h=e;b[b.length++]=X.createComment(" end ngIf: "+c.ngIf+" ");g={clone:b};a.enter(b,d.parent(),d)}):(k&&(k.remove(),k=null),h&&(h.$destroy(),h=null),g&&(k= - rb(g.clone),a.leave(k).then(function(){k=null}),g=null))})}}}],ye=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:fa.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(c,e,m,n,q){var s=0,v,u,p,C=function(){u&&(u.remove(),u=null);v&&(v.$destroy(),v=null);p&&(d.leave(p).then(function(){u=null}),u=p,p=null)};c.$watch(f,function(f){var m=function(){!y(h)||h&&!c.$eval(h)|| - b()},u=++s;f?(a(f,!0).then(function(a){if(u===s){var b=c.$new();n.template=a;a=q(b,function(a){C();d.enter(a,null,e).then(m)});v=b;p=a;v.$emit("$includeContentLoaded",f);c.$eval(g)}},function(){u===s&&(C(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(C(),n.template=null)})}}}}],Pe=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){/SVG/.test(d[0].toString())?(d.empty(),a(Lc(e.template,X).childNodes)(b,function(a){d.append(a)}, - {futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],ze=La({priority:450,compile:function(){return{pre:function(a,b,d){a.$eval(d.ngInit)}}}}),Le=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=b.attr(d.$attr.ngList)||", ",f="false"!==d.ngTrim,g=f?U(e):e;c.$parsers.push(function(a){if(!q(a)){var b=[];a&&n(a.split(g),function(a){a&&b.push(f?U(a):a)});return b}});c.$formatters.push(function(a){return I(a)?a.join(e):u});c.$isEmpty=function(a){return!a|| - !a.length}}}},mb="ng-valid",Jd="ng-invalid",Wa="ng-pristine",Jb="ng-dirty",Ld="ng-pending",lb=G("ngModel"),yg=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,d,c,e,f,g,h,k,l){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=u;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1; - this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=u;this.$name=l(d.name||"",!1)(a);this.$$parentForm=Ib;var m=e(d.ngModel),r=m.assign,t=m,s=r,v=null,B,p=this;this.$$setOptions=function(a){if((p.$options=a)&&a.getterSetter){var b=e(d.ngModel+"()"),f=e(d.ngModel+"($$$p)");t=function(a){var c=m(a);z(c)&&(c=b(a));return c};s=function(a,b){z(m(a))?f(a,{$$$p:p.$modelValue}):r(a,p.$modelValue)}}else if(!m.assign)throw lb("nonassign",d.ngModel,ua(c));};this.$render=x;this.$isEmpty= - function(a){return q(a)||""===a||null===a||a!==a};var C=0;Gd({ctrl:this,$element:c,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:f});this.$setPristine=function(){p.$dirty=!1;p.$pristine=!0;f.removeClass(c,Jb);f.addClass(c,Wa)};this.$setDirty=function(){p.$dirty=!0;p.$pristine=!1;f.removeClass(c,Wa);f.addClass(c,Jb);p.$$parentForm.$setDirty()};this.$setUntouched=function(){p.$touched=!1;p.$untouched=!0;f.setClass(c,"ng-untouched","ng-touched")};this.$setTouched=function(){p.$touched= - !0;p.$untouched=!1;f.setClass(c,"ng-touched","ng-untouched")};this.$rollbackViewValue=function(){g.cancel(v);p.$viewValue=p.$$lastCommittedViewValue;p.$render()};this.$validate=function(){if(!Q(p.$modelValue)||!isNaN(p.$modelValue)){var a=p.$$rawModelValue,b=p.$valid,c=p.$modelValue,d=p.$options&&p.$options.allowInvalid;p.$$runValidators(a,p.$$lastCommittedViewValue,function(e){d||b===e||(p.$modelValue=e?a:u,p.$modelValue!==c&&p.$$writeModelToScope())})}};this.$$runValidators=function(a,b,c){function d(){var c= - !0;n(p.$validators,function(d,e){var g=d(a,b);c=c&&g;f(e,g)});return c?!0:(n(p.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;n(p.$asyncValidators,function(e,g){var h=e(a,b);if(!h||!z(h.then))throw lb("$asyncValidators",h);f(g,u);c.push(h.then(function(){f(g,!0)},function(a){d=!1;f(g,!1)}))});c.length?k.all(c).then(function(){g(d)},x):g(!0)}function f(a,b){h===C&&p.$setValidity(a,b)}function g(a){h===C&&c(a)}C++;var h=C;(function(){var a=p.$$parserName||"parse";if(q(B))f(a, - null);else return B||(n(p.$validators,function(a,b){f(b,null)}),n(p.$asyncValidators,function(a,b){f(b,null)})),f(a,B),B;return!0})()?d()?e():g(!1):g(!1)};this.$commitViewValue=function(){var a=p.$viewValue;g.cancel(v);if(p.$$lastCommittedViewValue!==a||""===a&&p.$$hasNativeValidators)p.$$lastCommittedViewValue=a,p.$pristine&&this.$setDirty(),this.$$parseAndValidate()};this.$$parseAndValidate=function(){var b=p.$$lastCommittedViewValue;if(B=q(b)?u:!0)for(var c=0;ce||c.$isEmpty(b)||b.length<=e}}}}},Gc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e=0;d.$observe("minlength",function(a){e=ea(a)||0;c.$validate()});c.$validators.minlength=function(a,b){return c.$isEmpty(b)||b.length>=e}}}}};S.angular.bootstrap? - console.log("WARNING: Tried to load angular more than once."):(ce(),ee(fa),fa.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "), - SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-\u00a4", - negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",pluralCat:function(a,c){var e=a|0,f=c;u===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),B(X).ready(function(){Zd(X,yc)}))})(window,document);!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend(''); -//# sourceMappingURL=angular.min.js.map diff --git a/common/src/main/webapp/thirdparty/js/bootstrap-table-filter-control.min.js b/common/src/main/webapp/thirdparty/js/bootstrap-table-filter-control.min.js deleted file mode 100755 index 78dfa703..00000000 --- a/common/src/main/webapp/thirdparty/js/bootstrap-table-filter-control.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * bootstrap-table - v1.11.0 - 2016-07-02 - * https://github.com/wenzhixin/bootstrap-table - * Copyright (c) 2016 zhixin wen - * Licensed MIT License - */ -!function(a){"use strict";var b=a.fn.bootstrapTable.utils.sprintf,c=a.fn.bootstrapTable.utils.objectKeys,d=function(b,c,d){c=a.trim(c),b=a(b.get(b.length-1)),f(b,c)||b.append(a("").attr("value",c).text(a("
").html(d).text()))},e=function(b){var c=b.find("option:gt(0)");c.sort(function(b,c){return b=a(b).text().toLowerCase(),c=a(c).text().toLowerCase(),a.isNumeric(b)&&a.isNumeric(c)&&(b=parseFloat(b),c=parseFloat(c)),b>c?1:c>b?-1:0}),b.find("option:gt(0)").remove(),b.append(c)},f=function(a,b){for(var c=a.get(a.length-1).options,d=0;d0&&e.find(f).each(function(){c=a(this).closest("[data-field]").data("field"),d=a.grep(b.options.valuesFilterControl,function(a){return a.field===c}),d.length>0&&(a(this).val(d[0].value),k(a(this).get(0),d[0].position))})},n=function(){var b=[],c=document.cookie.match(/(?:bs.table.)(\w*)/g);return c?(a.each(c,function(c,d){/./.test(d)&&(d=d.split(".").pop()),-1===a.inArray(d,b)&&b.push(d)}),b):void 0},o=function(b){var c=b.options.data,f=(b.pageTo0},i=b.options.pagination?"server"===b.options.sidePagination?b.pageTo:b.options.totalRows:b.pageTo;a.each(b.header.fields,function(j,k){var l=b.columns[a.fn.bootstrapTable.utils.getFieldIndex(b.columns,k)],m=a(".bootstrap-table-filter-control-"+p(l.field));if(f(l)&&g(l)&&h(m)){0===m.get(m.length-1).options.length&&d(m,"","");for(var n={},o=0;i>o;o++){var q=c[o][k],r=a.fn.bootstrapTable.utils.calculateObjectValue(b.header,b.header.formatters[j],[q,c[o],o],q);n[r]=q}for(var s in n)d(m,n[s],s);e(m)}})},p=function(a){return String(a).replace(/(:|\.|\[|\]|,)/g,"\\$1")},q=function(b,c){var f,g,h=!1,i=0;a.each(b.columns,function(i,j){if(f="hidden",g=[],j.visible){if(j.filterControl){g.push('
');var k=j.filterControl.toLowerCase();j.searchable&&b.options.filterTemplate[k]&&(h=!0,f="visible",g.push(b.options.filterTemplate[k](b,j.field,f)))}else g.push('
');if(a.each(c.children().children(),function(b,c){return c=a(c),c.data("field")===j.field?(c.find(".fht-cell").append(g.join("")),!1):void 0}),void 0!==j.filterData&&"column"!==j.filterData.toLowerCase()){var l,m,n=t(s,j.filterData.substring(0,j.filterData.indexOf(":")));if(null===n)throw new SyntaxError('Error. You should use any of these allowed filter data methods: var, json, url. Use like this: var: {key: "value"}');l=j.filterData.substring(j.filterData.indexOf(":")+1,j.filterData.length),m=a(".bootstrap-table-filter-control-"+p(j.field)),d(m,"",""),n(l,m);var o,q;switch(n){case"url":a.ajax({url:l,dataType:"json",success:function(a){for(var b in a)d(m,b,a[b]);e(m)}});break;case"var":o=window[l];for(q in o)d(m,q,o[q]);e(m);break;case"jso":o=JSON.parse(l);for(q in o)d(m,q,o[q]);e(m)}}}}),h?(c.off("keyup","input").on("keyup","input",function(a){clearTimeout(i),i=setTimeout(function(){b.onColumnSearch(a)},b.options.searchTimeOut)}),c.off("change","select").on("change","select",function(a){clearTimeout(i),i=setTimeout(function(){b.onColumnSearch(a)},b.options.searchTimeOut)}),c.off("mouseup","input").on("mouseup","input",function(c){var d=a(this),e=d.val();""!==e&&setTimeout(function(){var a=d.val();""===a&&(clearTimeout(i),i=setTimeout(function(){b.onColumnSearch(c)},b.options.searchTimeOut))},1)}),c.find(".date-filter-control").length>0&&a.each(b.columns,function(b,d){void 0!==d.filterControl&&"datepicker"===d.filterControl.toLowerCase()&&c.find(".date-filter-control.bootstrap-table-filter-control-"+d.field).datepicker(d.filterDatepickerOptions).on("changeDate",function(b){a(b.currentTarget).keyup()})})):c.find(".filterControl").hide()},r=function(a){switch(a=void 0===a?"left":a.toLowerCase()){case"left":return"ltr";case"right":return"rtl";case"auto":return"auto";default:return"ltr"}},s={"var":function(a,b){var c=window[a];for(var f in c)d(b,f,c[f]);e(b)},url:function(b,c){a.ajax({url:b,dataType:"json",success:function(a){for(var b in a)d(c,b,a[b]);e(c)}})},json:function(a,b){var c=JSON.parse(a);for(var f in c)d(b,f,c[f]);e(b)}},t=function(a,b){for(var c=Object.keys(a),d=0;d',c,d)},select:function(a,c,d){return b('',c,d,r(a.options.alignmentSelectControlOptions))},datepicker:function(a,c,d){return b('',c,d)}},valuesFilterControl:[]}),a.extend(a.fn.bootstrapTable.COLUMN_DEFAULTS,{filterControl:void 0,filterData:void 0,filterDatepickerOptions:void 0,filterStrictSearch:!1,filterStartsWithSearch:!1}),a.extend(a.fn.bootstrapTable.Constructor.EVENTS,{"column-search.bs.table":"onColumnSearch"}),a.extend(a.fn.bootstrapTable.defaults.icons,{clear:"glyphicon-trash icon-clear"}),a.extend(a.fn.bootstrapTable.locales,{formatClearFilters:function(){return"Clear Filters"}}),a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales);var u=a.fn.bootstrapTable.Constructor,v=u.prototype.init,w=u.prototype.initToolbar,x=u.prototype.initHeader,y=u.prototype.initBody,z=u.prototype.initSearch;u.prototype.init=function(){if(this.options.filterControl){var a=this;Object.keys||c(),this.options.valuesFilterControl=[],this.$el.on("reset-view.bs.table",function(){a.options.height&&(a.$tableHeader.find("select").length>0||a.$tableHeader.find("input").length>0||q(a,a.$tableHeader))}).on("post-header.bs.table",function(){m(a)}).on("post-body.bs.table",function(){a.options.height&&g(a)}).on("column-switch.bs.table",function(){m(a)})}v.apply(this,Array.prototype.slice.apply(arguments))},u.prototype.initToolbar=function(){if(this.showToolbar=this.options.filterControl&&this.options.filterShowClear,w.apply(this,Array.prototype.slice.apply(arguments)),this.options.filterControl&&this.options.filterShowClear){var c=this.$toolbar.find(">.btn-group"),d=c.find(".filter-show-clear");d.length||(d=a(['"].join("")).appendTo(c),d.off("click").on("click",a.proxy(this.clearFilterControl,this)))}},u.prototype.initHeader=function(){x.apply(this,Array.prototype.slice.apply(arguments)),this.options.filterControl&&q(this,this.$header)},u.prototype.initBody=function(){y.apply(this,Array.prototype.slice.apply(arguments)),o(this)},u.prototype.initSearch=function(){if(z.apply(this,Array.prototype.slice.apply(arguments)),"server"!==this.options.sidePagination){var b=this,c=a.isEmptyObject(this.filterColumnsPartial)?null:this.filterColumnsPartial;this.data=c?a.grep(this.data,function(d,e){for(var f in c){var g=b.columns[a.fn.bootstrapTable.utils.getFieldIndex(b.columns,f)],h=c[f].toLowerCase(),i=d[f];if(g&&g.searchFormatter&&(i=a.fn.bootstrapTable.utils.calculateObjectValue(b.header,b.header.formatters[a.inArray(f,b.header.fields)],[i,d,e],i)),g.filterStrictSearch){if(-1===a.inArray(f,b.header.fields)||"string"!=typeof i&&"number"!=typeof i||i.toString().toLowerCase()!==h.toString().toLowerCase())return!1}else if(g.filterStartsWithSearch){if(-1===a.inArray(f,b.header.fields)||"string"!=typeof i&&"number"!=typeof i||0!==(i+"").toLowerCase().indexOf(h))return!1}else if(-1===a.inArray(f,b.header.fields)||"string"!=typeof i&&"number"!=typeof i||-1===(i+"").toLowerCase().indexOf(h))return!1}return!0}):this.data}},u.prototype.initColumnSearch=function(a){if(l(this),a){this.filterColumnsPartial=a,this.updatePagination();for(var b in a)this.trigger("column-search",b,a[b])}},u.prototype.onColumnSearch=function(b){if(!(a.inArray(b.keyCode,[37,38,39,40])>-1)){l(this);var c=a.trim(a(b.currentTarget).val()),d=a(b.currentTarget).closest("[data-field]").data("field");a.isEmptyObject(this.filterColumnsPartial)&&(this.filterColumnsPartial={}),c?this.filterColumnsPartial[d]=c:delete this.filterColumnsPartial[d],this.searchText+="randomText",this.options.pageNumber=1,this.onSearch(b),this.trigger("column-search",d,c)}},u.prototype.clearFilterControl=function(){if(this.options.filterControl&&this.options.filterShowClear){var c=this,d=n(),e=h(c),f=e.closest("table"),g=e.find(i(c)),j=c.$toolbar.find(".search input"),k=0;if(a.each(c.options.valuesFilterControl,function(a,b){b.value=""}),m(c),!(g.length>0))return;if(this.filterColumnsPartial={},a(g[0]).trigger("INPUT"===g[0].tagName?"keyup":"change"),j.length>0&&c.resetSearch(),c.options.sortName!==f.data("sortName")||c.options.sortOrder!==f.data("sortOrder")){var l=e.find(b('[data-field="%s"]',a(g[0]).closest("table").data("sortName")));l.length>0&&(c.onSort(f.data("sortName"),f.data("sortName")),a(l).find(".sortable").trigger("click"))}clearTimeout(k),k=setTimeout(function(){d&&d.length>0&&a.each(d,function(a,b){void 0!==c.deleteCookie&&c.deleteCookie(b)})},c.options.searchTimeOut)}}}(jQuery); \ No newline at end of file diff --git a/common/src/main/webapp/thirdparty/js/bootstrap-table.min.js b/common/src/main/webapp/thirdparty/js/bootstrap-table.min.js deleted file mode 100755 index b6602c3f..00000000 --- a/common/src/main/webapp/thirdparty/js/bootstrap-table.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/* -* bootstrap-table - v1.11.0 - 2016-07-02 -* https://github.com/wenzhixin/bootstrap-table -* Copyright 2016 zhixin wen -* Licensed MIT License -*/ -!function(a){"use strict";var b=null,c=function(a){var b=arguments,c=!0,d=1;return a=a.replace(/%s/g,function(){var a=b[d++];return"undefined"==typeof a?(c=!1,""):a}),c?a:""},d=function(b,c,d,e){var f="";return a.each(b,function(a,b){return b[c]===e?(f=b[d],!1):!0}),f},e=function(b,c){var d=-1;return a.each(b,function(a,b){return b.field===c?(d=a,!1):!0}),d},f=function(b){var c,d,e,f=0,g=[];for(c=0;cd;d++)g[c][d]=!1;for(c=0;ce;e++)g[c+e][k]=!0;for(e=0;j>e;e++)g[c][k+e]=!0}},g=function(){if(null===b){var c,d,e=a("

").addClass("fixed-table-scroll-inner"),f=a("

").addClass("fixed-table-scroll-outer");f.append(e),a("body").append(f),c=e[0].offsetWidth,f.css("overflow","scroll"),d=e[0].offsetWidth,c===d&&(d=f[0].clientWidth),f.remove(),b=c-d}return b},h=function(b,d,e,f){var g=d;if("string"==typeof d){var h=d.split(".");h.length>1?(g=window,a.each(h,function(a,b){g=g[b]})):g=window[d]}return"object"==typeof g?g:"function"==typeof g?g.apply(b,e):!g&&"string"==typeof d&&c.apply(this,[d].concat(e))?c.apply(this,[d].concat(e)):f},i=function(b,c,d){var e=Object.getOwnPropertyNames(b),f=Object.getOwnPropertyNames(c),g="";if(d&&e.length!==f.length)return!1;for(var h=0;h-1&&b[g]!==c[g])return!1;return!0},j=function(a){return"string"==typeof a?a.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`"):a},k=function(b){var c=0;return b.children().each(function(){c0||navigator.userAgent.match(/Trident.*rv\:11\./))},o=function(){Object.keys||(Object.keys=function(){var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=c.length;return function(e){if("object"!=typeof e&&("function"!=typeof e||null===e))throw new TypeError("Object.keys called on non-object");var f,g,h=[];for(f in e)a.call(e,f)&&h.push(f);if(b)for(g=0;d>g;g++)a.call(e,c[g])&&h.push(c[g]);return h}}())},p=function(b,c){this.options=c,this.$el=a(b),this.$el_=this.$el.clone(),this.timeoutId_=0,this.timeoutFooter_=0,this.init()};p.DEFAULTS={classes:"table table-hover",locale:void 0,height:void 0,undefinedText:"-",sortName:void 0,sortOrder:"asc",sortStable:!1,striped:!1,columns:[[]],data:[],dataField:"rows",method:"get",url:void 0,ajax:void 0,cache:!0,contentType:"application/json",dataType:"json",ajaxOptions:{},queryParams:function(a){return a},queryParamsType:"limit",responseHandler:function(a){return a},pagination:!1,onlyInfoPagination:!1,sidePagination:"client",totalRows:0,pageNumber:1,pageSize:10,pageList:[10,25,50,100],paginationHAlign:"right",paginationVAlign:"bottom",paginationDetailHAlign:"left",paginationPreText:"‹",paginationNextText:"›",search:!1,searchOnEnterKey:!1,strictSearch:!1,searchAlign:"right",selectItemName:"btSelectItem",showHeader:!0,showFooter:!1,showColumns:!1,showPaginationSwitch:!1,showRefresh:!1,showToggle:!1,buttonsAlign:"right",smartDisplay:!0,escape:!1,minimumCountColumns:1,idField:void 0,uniqueId:void 0,cardView:!1,detailView:!1,detailFormatter:function(){return""},trimOnSearch:!0,clickToSelect:!1,singleSelect:!1,toolbar:void 0,toolbarAlign:"left",checkboxHeader:!0,sortable:!0,silentSort:!0,maintainSelected:!1,searchTimeOut:500,searchText:"",iconSize:void 0,buttonsClass:"default",iconsPrefix:"glyphicon",icons:{paginationSwitchDown:"glyphicon-collapse-down icon-chevron-down",paginationSwitchUp:"glyphicon-collapse-up icon-chevron-up",refresh:"glyphicon-refresh icon-refresh",toggle:"glyphicon-list-alt icon-list-alt",columns:"glyphicon-th icon-th",detailOpen:"glyphicon-plus icon-plus",detailClose:"glyphicon-minus icon-minus"},customSearch:a.noop,customSort:a.noop,rowStyle:function(){return{}},rowAttributes:function(){return{}},footerStyle:function(){return{}},onAll:function(){return!1},onClickCell:function(){return!1},onDblClickCell:function(){return!1},onClickRow:function(){return!1},onDblClickRow:function(){return!1},onSort:function(){return!1},onCheck:function(){return!1},onUncheck:function(){return!1},onCheckAll:function(){return!1},onUncheckAll:function(){return!1},onCheckSome:function(){return!1},onUncheckSome:function(){return!1},onLoadSuccess:function(){return!1},onLoadError:function(){return!1},onColumnSwitch:function(){return!1},onPageChange:function(){return!1},onSearch:function(){return!1},onToggle:function(){return!1},onPreBody:function(){return!1},onPostBody:function(){return!1},onPostHeader:function(){return!1},onExpandRow:function(){return!1},onCollapseRow:function(){return!1},onRefreshOptions:function(){return!1},onRefresh:function(){return!1},onResetView:function(){return!1}},p.LOCALES={},p.LOCALES["en-US"]=p.LOCALES.en={formatLoadingMessage:function(){return"Loading, please wait..."},formatRecordsPerPage:function(a){return c("%s rows per page",a)},formatShowingRows:function(a,b,d){return c("Showing %s to %s of %s rows",a,b,d)},formatDetailPagination:function(a){return c("Showing %s rows",a)},formatSearch:function(){return"Search"},formatNoMatches:function(){return"No matching records found"},formatPaginationSwitch:function(){return"Hide/Show pagination"},formatRefresh:function(){return"Refresh"},formatToggle:function(){return"Toggle"},formatColumns:function(){return"Columns"},formatAllRows:function(){return"All"}},a.extend(p.DEFAULTS,p.LOCALES["en-US"]),p.COLUMN_DEFAULTS={radio:!1,checkbox:!1,checkboxEnabled:!0,field:void 0,title:void 0,titleTooltip:void 0,"class":void 0,align:void 0,halign:void 0,falign:void 0,valign:void 0,width:void 0,sortable:!1,order:"asc",visible:!0,switchable:!0,clickToSelect:!0,formatter:void 0,footerFormatter:void 0,events:void 0,sorter:void 0,sortName:void 0,cellStyle:void 0,searchable:!0,searchFormatter:!0,cardVisible:!0},p.EVENTS={"all.bs.table":"onAll","click-cell.bs.table":"onClickCell","dbl-click-cell.bs.table":"onDblClickCell","click-row.bs.table":"onClickRow","dbl-click-row.bs.table":"onDblClickRow","sort.bs.table":"onSort","check.bs.table":"onCheck","uncheck.bs.table":"onUncheck","check-all.bs.table":"onCheckAll","uncheck-all.bs.table":"onUncheckAll","check-some.bs.table":"onCheckSome","uncheck-some.bs.table":"onUncheckSome","load-success.bs.table":"onLoadSuccess","load-error.bs.table":"onLoadError","column-switch.bs.table":"onColumnSwitch","page-change.bs.table":"onPageChange","search.bs.table":"onSearch","toggle.bs.table":"onToggle","pre-body.bs.table":"onPreBody","post-body.bs.table":"onPostBody","post-header.bs.table":"onPostHeader","expand-row.bs.table":"onExpandRow","collapse-row.bs.table":"onCollapseRow","refresh-options.bs.table":"onRefreshOptions","reset-view.bs.table":"onResetView","refresh.bs.table":"onRefresh"},p.prototype.init=function(){this.initLocale(),this.initContainer(),this.initTable(),this.initHeader(),this.initData(),this.initFooter(),this.initToolbar(),this.initPagination(),this.initBody(),this.initSearchText(),this.initServer()},p.prototype.initLocale=function(){if(this.options.locale){var b=this.options.locale.split(/-|_/);b[0].toLowerCase(),b[1]&&b[1].toUpperCase(),a.fn.bootstrapTable.locales[this.options.locale]?a.extend(this.options,a.fn.bootstrapTable.locales[this.options.locale]):a.fn.bootstrapTable.locales[b.join("-")]?a.extend(this.options,a.fn.bootstrapTable.locales[b.join("-")]):a.fn.bootstrapTable.locales[b[0]]&&a.extend(this.options,a.fn.bootstrapTable.locales[b[0]])}},p.prototype.initContainer=function(){this.$container=a(['
','
',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'
':"",'
','
','
','
',this.options.formatLoadingMessage(),"
","
",'',"bottom"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'
':"","
","
"].join("")),this.$container.insertAfter(this.$el),this.$tableContainer=this.$container.find(".fixed-table-container"),this.$tableHeader=this.$container.find(".fixed-table-header"),this.$tableBody=this.$container.find(".fixed-table-body"),this.$tableLoading=this.$container.find(".fixed-table-loading"),this.$tableFooter=this.$container.find(".fixed-table-footer"),this.$toolbar=this.$container.find(".fixed-table-toolbar"),this.$pagination=this.$container.find(".fixed-table-pagination"),this.$tableBody.append(this.$el),this.$container.after('
'),this.$el.addClass(this.options.classes),this.options.striped&&this.$el.addClass("table-striped"),-1!==a.inArray("table-no-bordered",this.options.classes.split(" "))&&this.$tableContainer.addClass("table-no-bordered")},p.prototype.initTable=function(){var b=this,c=[],d=[];if(this.$header=this.$el.find(">thead"),this.$header.length||(this.$header=a("").appendTo(this.$el)),this.$header.find("tr").each(function(){var b=[];a(this).find("th").each(function(){"undefined"!=typeof a(this).data("field")&&a(this).data("field",a(this).data("field")+""),b.push(a.extend({},{title:a(this).html(),"class":a(this).attr("class"),titleTooltip:a(this).attr("title"),rowspan:a(this).attr("rowspan")?+a(this).attr("rowspan"):void 0,colspan:a(this).attr("colspan")?+a(this).attr("colspan"):void 0},a(this).data()))}),c.push(b)}),a.isArray(this.options.columns[0])||(this.options.columns=[this.options.columns]),this.options.columns=a.extend(!0,[],c,this.options.columns),this.columns=[],f(this.options.columns),a.each(this.options.columns,function(c,d){a.each(d,function(d,e){e=a.extend({},p.COLUMN_DEFAULTS,e),"undefined"!=typeof e.fieldIndex&&(b.columns[e.fieldIndex]=e),b.options.columns[c][d]=e})}),!this.options.data.length){var e=[];this.$el.find(">tbody>tr").each(function(c){var f={};f._id=a(this).attr("id"),f._class=a(this).attr("class"),f._data=l(a(this).data()),a(this).find(">td").each(function(d){for(var g,h,i=a(this),j=+i.attr("colspan")||1,k=+i.attr("rowspan")||1;e[c]&&e[c][d];d++);for(g=d;d+j>g;g++)for(h=c;c+k>h;h++)e[h]||(e[h]=[]),e[h][g]=!0;var m=b.columns[d].field;f[m]=a(this).html(),f["_"+m+"_id"]=a(this).attr("id"),f["_"+m+"_class"]=a(this).attr("class"),f["_"+m+"_rowspan"]=a(this).attr("rowspan"),f["_"+m+"_colspan"]=a(this).attr("colspan"),f["_"+m+"_title"]=a(this).attr("title"),f["_"+m+"_data"]=l(a(this).data())}),d.push(f)}),this.options.data=d,d.length&&(this.fromHtml=!0)}},p.prototype.initHeader=function(){var b=this,d={},e=[];this.header={fields:[],styles:[],classes:[],formatters:[],events:[],sorters:[],sortNames:[],cellStyles:[],searchables:[]},a.each(this.options.columns,function(f,g){e.push(""),0===f&&!b.options.cardView&&b.options.detailView&&e.push(c('
',b.options.columns.length)),a.each(g,function(a,f){var g="",h="",i="",j="",k=c(' class="%s"',f["class"]),l=(b.options.sortOrder||f.order,"px"),m=f.width;if(void 0===f.width||b.options.cardView||"string"==typeof f.width&&-1!==f.width.indexOf("%")&&(l="%"),f.width&&"string"==typeof f.width&&(m=f.width.replace("%","").replace("px","")),h=c("text-align: %s; ",f.halign?f.halign:f.align),i=c("text-align: %s; ",f.align),j=c("vertical-align: %s; ",f.valign),j+=c("width: %s; ",!f.checkbox&&!f.radio||m?m?m+l:void 0:"36px"),"undefined"!=typeof f.fieldIndex){if(b.header.fields[f.fieldIndex]=f.field,b.header.styles[f.fieldIndex]=i+j,b.header.classes[f.fieldIndex]=k,b.header.formatters[f.fieldIndex]=f.formatter,b.header.events[f.fieldIndex]=f.events,b.header.sorters[f.fieldIndex]=f.sorter,b.header.sortNames[f.fieldIndex]=f.sortName,b.header.cellStyles[f.fieldIndex]=f.cellStyle,b.header.searchables[f.fieldIndex]=f.searchable,!f.visible)return;if(b.options.cardView&&!f.cardVisible)return;d[f.field]=f}e.push(""),e.push(c('
',b.options.sortable&&f.sortable?"sortable both":"")),g=f.title,f.checkbox&&(!b.options.singleSelect&&b.options.checkboxHeader&&(g=''),b.header.stateField=f.field),f.radio&&(g="",b.header.stateField=f.field,b.options.singleSelect=!0),e.push(g),e.push("
"),e.push('
'),e.push("
"),e.push("")}),e.push("")}),this.$header.html(e.join("")),this.$header.find("th[data-field]").each(function(){a(this).data(d[a(this).data("field")])}),this.$container.off("click",".th-inner").on("click",".th-inner",function(c){var d=a(this);return b.options.detailView&&d.closest(".bootstrap-table")[0]!==b.$container[0]?!1:void(b.options.sortable&&d.parent().data().sortable&&b.onSort(c))}),this.$header.children().children().off("keypress").on("keypress",function(c){if(b.options.sortable&&a(this).data().sortable){var d=c.keyCode||c.which;13==d&&b.onSort(c)}}),a(window).off("resize.bootstrap-table"),!this.options.showHeader||this.options.cardView?(this.$header.hide(),this.$tableHeader.hide(),this.$tableLoading.css("top",0)):(this.$header.show(),this.$tableHeader.show(),this.$tableLoading.css("top",this.$header.outerHeight()+1),this.getCaret(),a(window).on("resize.bootstrap-table",a.proxy(this.resetWidth,this))),this.$selectAll=this.$header.find('[name="btSelectAll"]'),this.$selectAll.off("click").on("click",function(){var c=a(this).prop("checked");b[c?"checkAll":"uncheckAll"](),b.updateSelected()})},p.prototype.initFooter=function(){!this.options.showFooter||this.options.cardView?this.$tableFooter.hide():this.$tableFooter.show()},p.prototype.initData=function(a,b){this.data="append"===b?this.data.concat(a):"prepend"===b?[].concat(a).concat(this.data):a||this.options.data,this.options.data="append"===b?this.options.data.concat(a):"prepend"===b?[].concat(a).concat(this.options.data):this.data,"server"!==this.options.sidePagination&&this.initSort()},p.prototype.initSort=function(){var b=this,c=this.options.sortName,d="desc"===this.options.sortOrder?-1:1,e=a.inArray(this.options.sortName,this.header.fields);return this.options.customSort!==a.noop?void this.options.customSort.apply(this,[this.options.sortName,this.options.sortOrder]):void(-1!==e&&(this.options.sortStable&&a.each(this.data,function(a,b){b.hasOwnProperty("_position")||(b._position=a)}),this.data.sort(function(f,g){b.header.sortNames[e]&&(c=b.header.sortNames[e]);var i=m(f,c,b.options.escape),j=m(g,c,b.options.escape),k=h(b.header,b.header.sorters[e],[i,j]);return void 0!==k?d*k:((void 0===i||null===i)&&(i=""),(void 0===j||null===j)&&(j=""),b.options.sortStable&&i===j&&(i=f._position,j=g._position),a.isNumeric(i)&&a.isNumeric(j)?(i=parseFloat(i),j=parseFloat(j),j>i?-1*d:d):i===j?0:("string"!=typeof i&&(i=i.toString()),-1===i.localeCompare(j)?-1*d:d))})))},p.prototype.onSort=function(b){var c="keypress"===b.type?a(b.currentTarget):a(b.currentTarget).parent(),d=this.$header.find("th").eq(c.index());return this.$header.add(this.$header_).find("span.order").remove(),this.options.sortName===c.data("field")?this.options.sortOrder="asc"===this.options.sortOrder?"desc":"asc":(this.options.sortName=c.data("field"),this.options.sortOrder="asc"===c.data("order")?"desc":"asc"),this.trigger("sort",this.options.sortName,this.options.sortOrder),c.add(d).data("order",this.options.sortOrder),this.getCaret(),"server"===this.options.sidePagination?void this.initServer(this.options.silentSort):(this.initSort(),void this.initBody())},p.prototype.initToolbar=function(){var b,d,e=this,f=[],g=0,i=0;this.$toolbar.find(".bs-bars").children().length&&a("body").append(a(this.options.toolbar)),this.$toolbar.html(""),("string"==typeof this.options.toolbar||"object"==typeof this.options.toolbar)&&a(c('
',this.options.toolbarAlign)).appendTo(this.$toolbar).append(a(this.options.toolbar)),f=[c('
',this.options.buttonsAlign,this.options.buttonsAlign)],"string"==typeof this.options.icons&&(this.options.icons=h(null,this.options.icons)),this.options.showPaginationSwitch&&f.push(c('"),this.options.showRefresh&&f.push(c('"),this.options.showToggle&&f.push(c('"),this.options.showColumns&&(f.push(c('
',this.options.formatColumns()),'",'","
")),f.push("
"),(this.showToolbar||f.length>2)&&this.$toolbar.append(f.join("")),this.options.showPaginationSwitch&&this.$toolbar.find('button[name="paginationSwitch"]').off("click").on("click",a.proxy(this.togglePagination,this)),this.options.showRefresh&&this.$toolbar.find('button[name="refresh"]').off("click").on("click",a.proxy(this.refresh,this)),this.options.showToggle&&this.$toolbar.find('button[name="toggle"]').off("click").on("click",function(){e.toggleView()}),this.options.showColumns&&(b=this.$toolbar.find(".keep-open"),i<=this.options.minimumCountColumns&&b.find("input").prop("disabled",!0),b.find("li").off("click").on("click",function(a){a.stopImmediatePropagation()}),b.find("input").off("click").on("click",function(){var b=a(this);e.toggleColumn(a(this).val(),b.prop("checked"),!1),e.trigger("column-switch",a(this).data("field"),b.prop("checked"))})),this.options.search&&(f=[],f.push('"),this.$toolbar.append(f.join("")),d=this.$toolbar.find(".search input"),d.off("keyup drop").on("keyup drop",function(b){e.options.searchOnEnterKey&&13!==b.keyCode||a.inArray(b.keyCode,[37,38,39,40])>-1||(clearTimeout(g),g=setTimeout(function(){e.onSearch(b)},e.options.searchTimeOut))}),n()&&d.off("mouseup").on("mouseup",function(a){clearTimeout(g),g=setTimeout(function(){e.onSearch(a)},e.options.searchTimeOut)}))},p.prototype.onSearch=function(b){var c=a.trim(a(b.currentTarget).val());this.options.trimOnSearch&&a(b.currentTarget).val()!==c&&a(b.currentTarget).val(c),c!==this.searchText&&(this.searchText=c,this.options.searchText=c,this.options.pageNumber=1,this.initSearch(),this.updatePagination(),this.trigger("search",c))},p.prototype.initSearch=function(){var b=this;if("server"!==this.options.sidePagination){if(this.options.customSearch!==a.noop)return void this.options.customSearch.apply(this,[this.searchText]);var c=this.searchText&&(this.options.escape?j(this.searchText):this.searchText).toLowerCase(),d=a.isEmptyObject(this.filterColumns)?null:this.filterColumns;this.data=d?a.grep(this.options.data,function(b){for(var c in d)if(a.isArray(d[c])&&-1===a.inArray(b[c],d[c])||b[c]!==d[c])return!1;return!0}):this.options.data,this.data=c?a.grep(this.data,function(d,f){for(var g=0;g-1&&(n=!0)}this.totalPages=~~((this.options.totalRows-1)/this.options.pageSize)+1,this.options.totalPages=this.totalPages}if(this.totalPages>0&&this.options.pageNumber>this.totalPages&&(this.options.pageNumber=this.totalPages),this.pageFrom=(this.options.pageNumber-1)*this.options.pageSize+1,this.pageTo=this.options.pageNumber*this.options.pageSize,this.pageTo>this.options.totalRows&&(this.pageTo=this.options.totalRows),m.push('
','',this.options.onlyInfoPagination?this.options.formatDetailPagination(this.options.totalRows):this.options.formatShowingRows(this.pageFrom,this.pageTo,this.options.totalRows),""),!this.options.onlyInfoPagination){m.push('');var r=[c('',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?"dropdown":"dropup"),'",'"),m.push(this.options.formatRecordsPerPage(r.join(""))),m.push(""),m.push("
",'")}this.$pagination.html(m.join("")),this.options.onlyInfoPagination||(f=this.$pagination.find(".page-list a"),g=this.$pagination.find(".page-first"),h=this.$pagination.find(".page-pre"),i=this.$pagination.find(".page-next"),j=this.$pagination.find(".page-last"),k=this.$pagination.find(".page-number"),this.options.smartDisplay&&(this.totalPages<=1&&this.$pagination.find("div.pagination").hide(),(p.length<2||this.options.totalRows<=p[0])&&this.$pagination.find("span.page-list").hide(),this.$pagination[this.getData().length?"show":"hide"]()),n&&(this.options.pageSize=this.options.formatAllRows()),f.off("click").on("click",a.proxy(this.onPageListChange,this)),g.off("click").on("click",a.proxy(this.onPageFirst,this)),h.off("click").on("click",a.proxy(this.onPagePre,this)),i.off("click").on("click",a.proxy(this.onPageNext,this)),j.off("click").on("click",a.proxy(this.onPageLast,this)),k.off("click").on("click",a.proxy(this.onPageNumber,this)))},p.prototype.updatePagination=function(b){b&&a(b.currentTarget).hasClass("disabled")||(this.options.maintainSelected||this.resetRows(),this.initPagination(),"server"===this.options.sidePagination?this.initServer():this.initBody(),this.trigger("page-change",this.options.pageNumber,this.options.pageSize))},p.prototype.onPageListChange=function(b){var c=a(b.currentTarget);c.parent().addClass("active").siblings().removeClass("active"),this.options.pageSize=c.text().toUpperCase()===this.options.formatAllRows().toUpperCase()?this.options.formatAllRows():+c.text(),this.$toolbar.find(".page-size").text(this.options.pageSize),this.updatePagination(b)},p.prototype.onPageFirst=function(a){this.options.pageNumber=1,this.updatePagination(a)},p.prototype.onPagePre=function(a){this.options.pageNumber-1===0?this.options.pageNumber=this.options.totalPages:this.options.pageNumber--,this.updatePagination(a)},p.prototype.onPageNext=function(a){this.options.pageNumber+1>this.options.totalPages?this.options.pageNumber=1:this.options.pageNumber++,this.updatePagination(a)},p.prototype.onPageLast=function(a){this.options.pageNumber=this.totalPages,this.updatePagination(a)},p.prototype.onPageNumber=function(b){this.options.pageNumber!==+a(b.currentTarget).text()&&(this.options.pageNumber=+a(b.currentTarget).text(),this.updatePagination(b))},p.prototype.initBody=function(b){var f=this,g=[],i=this.getData();this.trigger("pre-body",i),this.$body=this.$el.find(">tbody"),this.$body.length||(this.$body=a("").appendTo(this.$el)),this.options.pagination&&"server"!==this.options.sidePagination||(this.pageFrom=1,this.pageTo=i.length);for(var k=this.pageFrom-1;k"),this.options.cardView&&g.push(c('
',this.header.fields.length)),!this.options.cardView&&this.options.detailView&&g.push("",'',c('',this.options.iconsPrefix,this.options.icons.detailOpen),"",""),a.each(this.header.fields,function(b,e){var i="",j=m(n,e,f.options.escape),l="",q={},r="",s=f.header.classes[b],t="",u="",v="",w="",x=f.columns[b];if(!(f.fromHtml&&"undefined"==typeof j||!x.visible||f.options.cardView&&!x.cardVisible)){if(o=c('style="%s"',p.concat(f.header.styles[b]).join("; ")),n["_"+e+"_id"]&&(r=c(' id="%s"',n["_"+e+"_id"])),n["_"+e+"_class"]&&(s=c(' class="%s"',n["_"+e+"_class"])),n["_"+e+"_rowspan"]&&(u=c(' rowspan="%s"',n["_"+e+"_rowspan"])),n["_"+e+"_colspan"]&&(v=c(' colspan="%s"',n["_"+e+"_colspan"])),n["_"+e+"_title"]&&(w=c(' title="%s"',n["_"+e+"_title"])),q=h(f.header,f.header.cellStyles[b],[j,n,k,e],q),q.classes&&(s=c(' class="%s"',q.classes)),q.css){var y=[];for(var z in q.css)y.push(z+": "+q.css[z]);o=c('style="%s"',y.concat(f.header.styles[b]).join("; "))}j=h(x,f.header.formatters[b],[j,n,k],j),n["_"+e+"_data"]&&!a.isEmptyObject(n["_"+e+"_data"])&&a.each(n["_"+e+"_data"],function(a,b){"index"!==a&&(t+=c(' data-%s="%s"',a,b))}),x.checkbox||x.radio?(l=x.checkbox?"checkbox":l,l=x.radio?"radio":l,i=[c(f.options.cardView?'
':'',x["class"]||""),"",f.header.formatters[b]&&"string"==typeof j?j:"",f.options.cardView?"
":""].join(""),n[f.header.stateField]=j===!0||j&&j.checked):(j="undefined"==typeof j||null===j?f.options.undefinedText:j,i=f.options.cardView?['
',f.options.showHeader?c('%s',o,d(f.columns,"field","title",e)):"",c('%s',j),"
"].join(""):[c("",r,s,o,t,u,v,w),j,""].join(""),f.options.cardView&&f.options.smartDisplay&&""===j&&(i='
')),g.push(i)}}),this.options.cardView&&g.push("
"),g.push("")}g.length||g.push('',c('%s',this.$header.find("th").length,this.options.formatNoMatches()),""),this.$body.html(g.join("")),b||this.scrollTo(0),this.$body.find("> tr[data-index] > td").off("click dblclick").on("click dblclick",function(b){var d=a(this),g=d.parent(),h=f.data[g.data("index")],i=d[0].cellIndex,j=f.getVisibleFields(),k=j[f.options.detailView&&!f.options.cardView?i-1:i],l=f.columns[e(f.columns,k)],n=m(h,k,f.options.escape);if(!d.find(".detail-icon").length&&(f.trigger("click"===b.type?"click-cell":"dbl-click-cell",k,n,h,d),f.trigger("click"===b.type?"click-row":"dbl-click-row",h,g,k), -"click"===b.type&&f.options.clickToSelect&&l.clickToSelect)){var o=g.find(c('[name="%s"]',f.options.selectItemName));o.length&&o[0].click()}}),this.$body.find("> tr[data-index] > td > .detail-icon").off("click").on("click",function(){var b=a(this),d=b.parent().parent(),e=d.data("index"),g=i[e];if(d.next().is("tr.detail-view"))b.find("i").attr("class",c("%s %s",f.options.iconsPrefix,f.options.icons.detailOpen)),d.next().remove(),f.trigger("collapse-row",e,g);else{b.find("i").attr("class",c("%s %s",f.options.iconsPrefix,f.options.icons.detailClose)),d.after(c('',d.find("td").length));var j=d.next().find("td"),k=h(f.options,f.options.detailFormatter,[e,g,j],"");1===j.length&&j.append(k),f.trigger("expand-row",e,g,j)}f.resetView()}),this.$selectItem=this.$body.find(c('[name="%s"]',this.options.selectItemName)),this.$selectItem.off("click").on("click",function(b){b.stopImmediatePropagation();var c=a(this),d=c.prop("checked"),e=f.data[c.data("index")];f.options.maintainSelected&&a(this).is(":radio")&&a.each(f.options.data,function(a,b){b[f.header.stateField]=!1}),e[f.header.stateField]=d,f.options.singleSelect&&(f.$selectItem.not(this).each(function(){f.data[a(this).data("index")][f.header.stateField]=!1}),f.$selectItem.filter(":checked").not(this).prop("checked",!1)),f.updateSelected(),f.trigger(d?"check":"uncheck",e,c)}),a.each(this.header.events,function(b,c){if(c){"string"==typeof c&&(c=h(null,c));var d=f.header.fields[b],e=a.inArray(d,f.getVisibleFields());f.options.detailView&&!f.options.cardView&&(e+=1);for(var g in c)f.$body.find(">tr:not(.no-records-found)").each(function(){var b=a(this),h=b.find(f.options.cardView?".card-view":"td").eq(e),i=g.indexOf(" "),j=g.substring(0,i),k=g.substring(i+1),l=c[g];h.find(k).off(j).on(j,function(a){var c=b.data("index"),e=f.data[c],g=e[d];l.apply(this,[a,g,e,c])})})}}),this.updateSelected(),this.resetView(),this.trigger("post-body",i)},p.prototype.initServer=function(b,c,d){var e,f=this,g={},i={searchText:this.searchText,sortName:this.options.sortName,sortOrder:this.options.sortOrder};this.options.pagination&&(i.pageSize=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize,i.pageNumber=this.options.pageNumber),(d||this.options.url||this.options.ajax)&&("limit"===this.options.queryParamsType&&(i={search:i.searchText,sort:i.sortName,order:i.sortOrder},this.options.pagination&&(i.offset=this.options.pageSize===this.options.formatAllRows()?0:this.options.pageSize*(this.options.pageNumber-1),i.limit=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize)),a.isEmptyObject(this.filterColumnsPartial)||(i.filter=JSON.stringify(this.filterColumnsPartial,null)),g=h(this.options,this.options.queryParams,[i],g),a.extend(g,c||{}),g!==!1&&(b||this.$tableLoading.show(),e=a.extend({},h(null,this.options.ajaxOptions),{type:this.options.method,url:d||this.options.url,data:"application/json"===this.options.contentType&&"post"===this.options.method?JSON.stringify(g):g,cache:this.options.cache,contentType:this.options.contentType,dataType:this.options.dataType,success:function(a){a=h(f.options,f.options.responseHandler,[a],a),f.load(a),f.trigger("load-success",a),b||f.$tableLoading.hide()},error:function(a){f.trigger("load-error",a.status,a),b||f.$tableLoading.hide()}}),this.options.ajax?h(this,this.options.ajax,[e],null):(this._xhr&&4!==this._xhr.readyState&&this._xhr.abort(),this._xhr=a.ajax(e))))},p.prototype.initSearchText=function(){if(this.options.search&&""!==this.options.searchText){var a=this.$toolbar.find(".search input");a.val(this.options.searchText),this.onSearch({currentTarget:a})}},p.prototype.getCaret=function(){var b=this;a.each(this.$header.find("th"),function(c,d){a(d).find(".sortable").removeClass("desc asc").addClass(a(d).data("field")===b.options.sortName?b.options.sortOrder:"both")})},p.prototype.updateSelected=function(){var b=this.$selectItem.filter(":enabled").length&&this.$selectItem.filter(":enabled").length===this.$selectItem.filter(":enabled").filter(":checked").length;this.$selectAll.add(this.$selectAll_).prop("checked",b),this.$selectItem.each(function(){a(this).closest("tr")[a(this).prop("checked")?"addClass":"removeClass"]("selected")})},p.prototype.updateRows=function(){var b=this;this.$selectItem.each(function(){b.data[a(this).data("index")][b.header.stateField]=a(this).prop("checked")})},p.prototype.resetRows=function(){var b=this;a.each(this.data,function(a,c){b.$selectAll.prop("checked",!1),b.$selectItem.prop("checked",!1),b.header.stateField&&(c[b.header.stateField]=!1)})},p.prototype.trigger=function(b){var c=Array.prototype.slice.call(arguments,1);b+=".bs.table",this.options[p.EVENTS[b]].apply(this.options,c),this.$el.trigger(a.Event(b),c),this.options.onAll(b,c),this.$el.trigger(a.Event("all.bs.table"),[b,c])},p.prototype.resetHeader=function(){clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(a.proxy(this.fitHeader,this),this.$el.is(":hidden")?100:0)},p.prototype.fitHeader=function(){var b,d,e,f,h=this;if(h.$el.is(":hidden"))return void(h.timeoutId_=setTimeout(a.proxy(h.fitHeader,h),100));if(b=this.$tableBody.get(0),d=b.scrollWidth>b.clientWidth&&b.scrollHeight>b.clientHeight+this.$header.outerHeight()?g():0,this.$el.css("margin-top",-this.$header.outerHeight()),e=a(":focus"),e.length>0){var i=e.parents("th");if(i.length>0){var j=i.attr("data-field");if(void 0!==j){var k=this.$header.find("[data-field='"+j+"']");k.length>0&&k.find(":input").addClass("focus-temp")}}}this.$header_=this.$header.clone(!0,!0),this.$selectAll_=this.$header_.find('[name="btSelectAll"]'),this.$tableHeader.css({"margin-right":d}).find("table").css("width",this.$el.outerWidth()).html("").attr("class",this.$el.attr("class")).append(this.$header_),f=a(".focus-temp:visible:eq(0)"),f.length>0&&(f.focus(),this.$header.find(".focus-temp").removeClass("focus-temp")),this.$header.find("th[data-field]").each(function(){h.$header_.find(c('th[data-field="%s"]',a(this).data("field"))).data(a(this).data())});var l=this.getVisibleFields(),m=this.$header_.find("th");this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(b){var d=a(this),e=b;h.options.detailView&&!h.options.cardView&&(0===b&&h.$header_.find("th.detail").find(".fht-cell").width(d.innerWidth()),e=b-1);var f=h.$header_.find(c('th[data-field="%s"]',l[e]));f.length>1&&(f=a(m[d[0].cellIndex])),f.find(".fht-cell").width(d.innerWidth())}),this.$tableBody.off("scroll").on("scroll",function(){h.$tableHeader.scrollLeft(a(this).scrollLeft()),h.options.showFooter&&!h.options.cardView&&h.$tableFooter.scrollLeft(a(this).scrollLeft())}),h.trigger("post-header")},p.prototype.resetFooter=function(){var b=this,d=b.getData(),e=[];this.options.showFooter&&!this.options.cardView&&(!this.options.cardView&&this.options.detailView&&e.push('
 
'),a.each(this.columns,function(a,f){var g,i="",j="",k=[],l={},m=c(' class="%s"',f["class"]);if(f.visible&&(!b.options.cardView||f.cardVisible)){if(i=c("text-align: %s; ",f.falign?f.falign:f.align),j=c("vertical-align: %s; ",f.valign),l=h(null,b.options.footerStyle),l&&l.css)for(g in l.css)k.push(g+": "+l.css[g]);e.push(""),e.push('
'),e.push(h(f,f.footerFormatter,[d]," ")||" "),e.push("
"),e.push('
'),e.push("
"),e.push("")}}),this.$tableFooter.find("tr").html(e.join("")),this.$tableFooter.show(),clearTimeout(this.timeoutFooter_),this.timeoutFooter_=setTimeout(a.proxy(this.fitFooter,this),this.$el.is(":hidden")?100:0))},p.prototype.fitFooter=function(){var b,c,d;return clearTimeout(this.timeoutFooter_),this.$el.is(":hidden")?void(this.timeoutFooter_=setTimeout(a.proxy(this.fitFooter,this),100)):(c=this.$el.css("width"),d=c>this.$tableBody.width()?g():0,this.$tableFooter.css({"margin-right":d}).find("table").css("width",c).attr("class",this.$el.attr("class")),b=this.$tableFooter.find("td"),void this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(c){var d=a(this);b.eq(c).find(".fht-cell").width(d.innerWidth())}))},p.prototype.toggleColumn=function(a,b,d){if(-1!==a&&(this.columns[a].visible=b,this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns)){var e=this.$toolbar.find(".keep-open input").prop("disabled",!1);d&&e.filter(c('[value="%s"]',a)).prop("checked",b),e.filter(":checked").length<=this.options.minimumCountColumns&&e.filter(":checked").prop("disabled",!0)}},p.prototype.toggleRow=function(a,b,d){-1!==a&&this.$body.find("undefined"!=typeof a?c('tr[data-index="%s"]',a):c('tr[data-uniqueid="%s"]',b))[d?"show":"hide"]()},p.prototype.getVisibleFields=function(){var b=this,c=[];return a.each(this.header.fields,function(a,d){var f=b.columns[e(b.columns,d)];f.visible&&c.push(d)}),c},p.prototype.resetView=function(a){var b=0;if(a&&a.height&&(this.options.height=a.height),this.$selectAll.prop("checked",this.$selectItem.length>0&&this.$selectItem.length===this.$selectItem.filter(":checked").length),this.options.height){var c=k(this.$toolbar),d=k(this.$pagination),e=this.options.height-c-d;this.$tableContainer.css("height",e+"px")}return this.options.cardView?(this.$el.css("margin-top","0"),this.$tableContainer.css("padding-bottom","0"),void this.$tableFooter.hide()):(this.options.showHeader&&this.options.height?(this.$tableHeader.show(),this.resetHeader(),b+=this.$header.outerHeight()):(this.$tableHeader.hide(),this.trigger("post-header")),this.options.showFooter&&(this.resetFooter(),this.options.height&&(b+=this.$tableFooter.outerHeight()+1)),this.getCaret(),this.$tableContainer.css("padding-bottom",b+"px"),void this.trigger("reset-view"))},p.prototype.getData=function(b){return!this.searchText&&a.isEmptyObject(this.filterColumns)&&a.isEmptyObject(this.filterColumnsPartial)?b?this.options.data.slice(this.pageFrom-1,this.pageTo):this.options.data:b?this.data.slice(this.pageFrom-1,this.pageTo):this.data},p.prototype.load=function(b){var c=!1;"server"===this.options.sidePagination?(this.options.totalRows=b.total,c=b.fixedScroll,b=b[this.options.dataField]):a.isArray(b)||(c=b.fixedScroll,b=b.data),this.initData(b),this.initSearch(),this.initPagination(),this.initBody(c)},p.prototype.append=function(a){this.initData(a,"append"),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},p.prototype.prepend=function(a){this.initData(a,"prepend"),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},p.prototype.remove=function(b){var c,d,e=this.options.data.length;if(b.hasOwnProperty("field")&&b.hasOwnProperty("values")){for(c=e-1;c>=0;c--)d=this.options.data[c],d.hasOwnProperty(b.field)&&-1!==a.inArray(d[b.field],b.values)&&this.options.data.splice(c,1);e!==this.options.data.length&&(this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0))}},p.prototype.removeAll=function(){this.options.data.length>0&&(this.options.data.splice(0,this.options.data.length),this.initSearch(),this.initPagination(),this.initBody(!0))},p.prototype.getRowByUniqueId=function(a){var b,c,d,e=this.options.uniqueId,f=this.options.data.length,g=null;for(b=f-1;b>=0;b--){if(c=this.options.data[b],c.hasOwnProperty(e))d=c[e];else{if(!c._data.hasOwnProperty(e))continue;d=c._data[e]}if("string"==typeof d?a=a.toString():"number"==typeof d&&(Number(d)===d&&d%1===0?a=parseInt(a):d===Number(d)&&0!==d&&(a=parseFloat(a))),d===a){g=c;break}}return g},p.prototype.removeByUniqueId=function(a){var b=this.options.data.length,c=this.getRowByUniqueId(a);c&&this.options.data.splice(this.options.data.indexOf(c),1),b!==this.options.data.length&&(this.initSearch(),this.initPagination(),this.initBody(!0))},p.prototype.updateByUniqueId=function(b){var c=this,d=a.isArray(b)?b:[b];a.each(d,function(b,d){var e;d.hasOwnProperty("id")&&d.hasOwnProperty("row")&&(e=a.inArray(c.getRowByUniqueId(d.id),c.options.data),-1!==e&&a.extend(c.options.data[e],d.row))}),this.initSearch(),this.initSort(),this.initBody(!0)},p.prototype.insertRow=function(a){a.hasOwnProperty("index")&&a.hasOwnProperty("row")&&(this.data.splice(a.index,0,a.row),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0))},p.prototype.updateRow=function(b){var c=this,d=a.isArray(b)?b:[b];a.each(d,function(b,d){d.hasOwnProperty("index")&&d.hasOwnProperty("row")&&a.extend(c.options.data[d.index],d.row)}),this.initSearch(),this.initSort(),this.initBody(!0)},p.prototype.showRow=function(a){(a.hasOwnProperty("index")||a.hasOwnProperty("uniqueId"))&&this.toggleRow(a.index,a.uniqueId,!0)},p.prototype.hideRow=function(a){(a.hasOwnProperty("index")||a.hasOwnProperty("uniqueId"))&&this.toggleRow(a.index,a.uniqueId,!1)},p.prototype.getRowsHidden=function(b){var c=a(this.$body[0]).children().filter(":hidden"),d=0;if(b)for(;dtr");if(this.options.detailView&&!this.options.cardView&&(g+=1),e=j.eq(f).find(">td").eq(g),!(0>f||0>g||f>=this.data.length)){for(c=f;f+h>c;c++)for(d=g;g+i>d;d++)j.eq(c).find(">td").eq(d).hide();e.attr("rowspan",h).attr("colspan",i).show()}},p.prototype.updateCell=function(a){a.hasOwnProperty("index")&&a.hasOwnProperty("field")&&a.hasOwnProperty("value")&&(this.data[a.index][a.field]=a.value,a.reinit!==!1&&(this.initSort(),this.initBody(!0)))},p.prototype.getOptions=function(){return this.options},p.prototype.getSelections=function(){var b=this;return a.grep(this.options.data,function(a){return a[b.header.stateField]})},p.prototype.getAllSelections=function(){var b=this;return a.grep(this.options.data,function(a){return a[b.header.stateField]})},p.prototype.checkAll=function(){this.checkAll_(!0)},p.prototype.uncheckAll=function(){this.checkAll_(!1)},p.prototype.checkInvert=function(){var b=this,c=b.$selectItem.filter(":enabled"),d=c.filter(":checked");c.each(function(){a(this).prop("checked",!a(this).prop("checked"))}),b.updateRows(),b.updateSelected(),b.trigger("uncheck-some",d),d=b.getSelections(),b.trigger("check-some",d)},p.prototype.checkAll_=function(a){var b;a||(b=this.getSelections()),this.$selectAll.add(this.$selectAll_).prop("checked",a),this.$selectItem.filter(":enabled").prop("checked",a),this.updateRows(),a&&(b=this.getSelections()),this.trigger(a?"check-all":"uncheck-all",b)},p.prototype.check=function(a){this.check_(!0,a)},p.prototype.uncheck=function(a){this.check_(!1,a)},p.prototype.check_=function(a,b){var d=this.$selectItem.filter(c('[data-index="%s"]',b)).prop("checked",a);this.data[b][this.header.stateField]=a,this.updateSelected(),this.trigger(a?"check":"uncheck",this.data[b],d)},p.prototype.checkBy=function(a){this.checkBy_(!0,a)},p.prototype.uncheckBy=function(a){this.checkBy_(!1,a)},p.prototype.checkBy_=function(b,d){if(d.hasOwnProperty("field")&&d.hasOwnProperty("values")){var e=this,f=[];a.each(this.options.data,function(g,h){if(!h.hasOwnProperty(d.field))return!1;if(-1!==a.inArray(h[d.field],d.values)){var i=e.$selectItem.filter(":enabled").filter(c('[data-index="%s"]',g)).prop("checked",b);h[e.header.stateField]=b,f.push(h),e.trigger(b?"check":"uncheck",h,i)}}),this.updateSelected(),this.trigger(b?"check-some":"uncheck-some",f)}},p.prototype.destroy=function(){this.$el.insertBefore(this.$container),a(this.options.toolbar).insertBefore(this.$el),this.$container.next().remove(),this.$container.remove(),this.$el.html(this.$el_.html()).css("margin-top","0").attr("class",this.$el_.attr("class")||"")},p.prototype.showLoading=function(){this.$tableLoading.show()},p.prototype.hideLoading=function(){this.$tableLoading.hide()},p.prototype.togglePagination=function(){this.options.pagination=!this.options.pagination;var a=this.$toolbar.find('button[name="paginationSwitch"] i');this.options.pagination?a.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchDown):a.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchUp),this.updatePagination()},p.prototype.refresh=function(a){a&&a.url&&(this.options.pageNumber=1),this.initServer(a&&a.silent,a&&a.query,a&&a.url),this.trigger("refresh",a)},p.prototype.resetWidth=function(){this.options.showHeader&&this.options.height&&this.fitHeader(),this.options.showFooter&&this.fitFooter()},p.prototype.showColumn=function(a){this.toggleColumn(e(this.columns,a),!0,!0)},p.prototype.hideColumn=function(a){this.toggleColumn(e(this.columns,a),!1,!0)},p.prototype.getHiddenColumns=function(){return a.grep(this.columns,function(a){return!a.visible})},p.prototype.getVisibleColumns=function(){return a.grep(this.columns,function(a){return a.visible})},p.prototype.toggleAllColumns=function(b){if(a.each(this.columns,function(a){this.columns[a].visible=b}),this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns){var c=this.$toolbar.find(".keep-open input").prop("disabled",!1);c.filter(":checked").length<=this.options.minimumCountColumns&&c.filter(":checked").prop("disabled",!0)}},p.prototype.showAllColumns=function(){this.toggleAllColumns(!0)},p.prototype.hideAllColumns=function(){this.toggleAllColumns(!1)},p.prototype.filterBy=function(b){this.filterColumns=a.isEmptyObject(b)?{}:b,this.options.pageNumber=1,this.initSearch(),this.updatePagination()},p.prototype.scrollTo=function(a){return"string"==typeof a&&(a="bottom"===a?this.$tableBody[0].scrollHeight:0),"number"==typeof a&&this.$tableBody.scrollTop(a),"undefined"==typeof a?this.$tableBody.scrollTop():void 0},p.prototype.getScrollPosition=function(){return this.scrollTo()},p.prototype.selectPage=function(a){a>0&&a<=this.options.totalPages&&(this.options.pageNumber=a,this.updatePagination())},p.prototype.prevPage=function(){this.options.pageNumber>1&&(this.options.pageNumber--,this.updatePagination())},p.prototype.nextPage=function(){this.options.pageNumber tr[data-index="%s"]',b));d.next().is("tr.detail-view")===(a?!1:!0)&&d.find("> td > .detail-icon").click()},p.prototype.expandRow=function(a){this.expandRow_(!0,a)},p.prototype.collapseRow=function(a){this.expandRow_(!1,a)},p.prototype.expandAllRows=function(b){if(b){var d=this.$body.find(c('> tr[data-index="%s"]',0)),e=this,f=null,g=!1,h=-1;if(d.next().is("tr.detail-view")?d.next().next().is("tr.detail-view")||(d.next().find(".detail-icon").click(),g=!0):(d.find("> td > .detail-icon").click(),g=!0),g)try{h=setInterval(function(){f=e.$body.find("tr.detail-view").last().find(".detail-icon"),f.length>0?f.click():clearInterval(h)},1)}catch(i){clearInterval(h)}}else for(var j=this.$body.children(),k=0;kthis.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); \ No newline at end of file diff --git a/common/src/main/webapp/thirdparty/js/core/const.js b/common/src/main/webapp/thirdparty/js/core/const.js deleted file mode 100755 index 66bee91a..00000000 --- a/common/src/main/webapp/thirdparty/js/core/const.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2016, CMCC Technologies Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var fMenuSiderDivId = 'page-f-sidebar-menu'; -var ICTFRAME_CONST_SPINNER_GIF_PATH="image/loading-spinner-grey.gif"; -var ICTFRAME_CONST_IFRAME_HEIGHT_AJUST = 10; -var ICTFRAME_CONST_IFRAME_HEIGHT_AJUST_IE = 5; -var ICTFRAME_CONST_THEME_COLOR_CSS_PREFFIX = "css/themes/"; -var ICTFRAME_CONST_DEFAULTPAGE_PATH = "default.html?"; -var ICTFRAME_CONST_DATABACKUP_PATH = 'menus/dataBackup-mysql.html'; -var IS_V5_TESTVERSION = true; - -var FrameConst={}; -//Ĭϵ¼ɹתҳ -FrameConst.DEFAULT_LOGINSKIP_PAGE = "common/main-page.html"; -FrameConst.DEFAULT_PAGE = "default.html"; - -FrameConst.do_heartbeat = false; -FrameConst.change_pass = false; -//Ƿ -FrameConst.isEncypt = "false"; -FrameConst.REST_FRAMECOMMIFO = "../../api/uiframe/v1/frameCommInfo"; -FrameConst.REST_HEARTBEAT = "../../api/uiframe/v1/heartbeat"; -FrameConst.REST_GETLICENSEINFO = "../../api/uiframe/v1/licensevalueinfo"; -FrameConst.REST_CHECKRIGHT = "../../api/uiframe/v1/checkRight"; -FrameConst.REST_LOGIN = "../../api/uiframe/v1/login"; -FrameConst.REST_GET_FRAME_MENUDIRECTION = "../../api/uiframe/v1/confByKey?key=usf.mainframe.web.navigation.direction"; -FrameConst.REST_GET_USERNAME = "../../api/uiframe/v1/userName"; - - -FrameConst.REST_GET_VERSIONINFO = "../../api/uiframe/v1/versionInfo"; -var zte_http_headers=new Array(); -zte_http_headers.push({"key":"ICTAuthentication","value":"icttka","store":true}); -zte_http_headers.push({"key":"isFromWeb","value":"1","store":false}); \ No newline at end of file diff --git a/common/src/main/webapp/thirdparty/js/core/hk.min.js b/common/src/main/webapp/thirdparty/js/core/hk.min.js deleted file mode 100755 index 73ab7f2c..00000000 --- a/common/src/main/webapp/thirdparty/js/core/hk.min.js +++ /dev/null @@ -1,819 +0,0 @@ -/* - * Copyright 2016, CMCC Technologies Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -;(function(window, define) { - var _ = { - version: "2.3.0", - areas: {}, - apis: {}, - - // utilities - inherit: function(api, o) { - for (var p in api) { - if (!o.hasOwnProperty(p)) { - o[p] = api[p]; - } - } - return o; - }, - stringify: function(d) { - return d === undefined || typeof d === "function" ? d+'' : JSON.stringify(d); - }, - parse: function(s) { - // if it doesn't parse, return as is - try{ return JSON.parse(s); }catch(e){ return s; } - }, - - // extension hooks - fn: function(name, fn) { - _.storeAPI[name] = fn; - for (var api in _.apis) { - _.apis[api][name] = fn; - } - }, - get: function(area, key){ return area.getItem(key); }, - set: function(area, key, string){ area.setItem(key, string); }, - remove: function(area, key){ area.removeItem(key); }, - key: function(area, i){ return area.key(i); }, - length: function(area){ return area.length; }, - clear: function(area){ area.clear(); }, - - // core functions - Store: function(id, area, namespace) { - var store = _.inherit(_.storeAPI, function(key, data, overwrite) { - if (arguments.length === 0){ return store.getAll(); } - if (data !== undefined){ return store.set(key, data, overwrite); } - if (typeof key === "string"){ return store.get(key); } - if (!key){ return store.clear(); } - return store.setAll(key, data);// overwrite=data, data=key - }); - store._id = id; - try { - var testKey = '_safariPrivate_'; - area.setItem(testKey, 'sucks'); - store._area = area; - area.removeItem(testKey); - } catch (e) {} - if (!store._area) { - store._area = _.inherit(_.storageAPI, { items: {}, name: 'fake' }); - } - store._ns = namespace || ''; - if (!_.areas[id]) { - _.areas[id] = store._area; - } - if (!_.apis[store._ns+store._id]) { - _.apis[store._ns+store._id] = store; - } - return store; - }, - storeAPI: { - // admin functions - area: function(id, area) { - var store = this[id]; - if (!store || !store.area) { - store = _.Store(id, area, this._ns);//new area-specific api in this namespace - if (!this[id]){ this[id] = store; } - } - return store; - }, - namespace: function(namespace, noSession) { - if (!namespace){ - return this._ns ? this._ns.substring(0,this._ns.length-1) : ''; - } - var ns = namespace, store = this[ns]; - if (!store || !store.namespace) { - store = _.Store(this._id, this._area, this._ns+ns+'.');//new namespaced api - if (!this[ns]){ this[ns] = store; } - if (!noSession){ store.area('session', _.areas.session); } - } - return store; - }, - isFake: function(){ return this._area.name === 'fake'; }, - toString: function() { - return 'store'+(this._ns?'.'+this.namespace():'')+'['+this._id+']'; - }, - - // storage functions - has: function(key) { - if (this._area.has) { - return this._area.has(this._in(key));//extension hook - } - return !!(this._in(key) in this._area); - }, - size: function(){ return this.keys().length; }, - each: function(fn, and) { - for (var i=0, m=_.length(this._area); i _.length(this._area)) { m--; i--; }// in case of removeItem - } - return and || this; - }, - keys: function() { - return this.each(function(k, list){ list.push(k); }, []); - }, - get: function(key, alt) { - var s = _.get(this._area, this._in(key)); - return s !== null ? _.parse(s) : alt || s;// support alt for easy default mgmt - }, - getAll: function() { - return this.each(function(k, all){ all[k] = this.get(k); }, {}); - }, - set: function(key, data, overwrite) { - var d = this.get(key); - if (d != null && overwrite === false) { - return data; - } - return _.set(this._area, this._in(key), _.stringify(data), overwrite) || d; - }, - setAll: function(data, overwrite) { - var changed, val; - for (var key in data) { - val = data[key]; - if (this.set(key, val, overwrite) !== val) { - changed = true; - } - } - return changed; - }, - remove: function(key) { - var d = this.get(key); - _.remove(this._area, this._in(key)); - return d; - }, - clear: function() { - if (!this._ns) { - _.clear(this._area); - } else { - this.each(function(k){ _.remove(this._area, this._in(k)); }, 1); - } - return this; - }, - clearAll: function() { - var area = this._area; - for (var id in _.areas) { - if (_.areas.hasOwnProperty(id)) { - this._area = _.areas[id]; - this.clear(); - } - } - this._area = area; - return this; - }, - - // internal use functions - _in: function(k) { - if (typeof k !== "string"){ k = _.stringify(k); } - return this._ns ? this._ns + k : k; - }, - _out: function(k) { - return this._ns ? - k && k.indexOf(this._ns) === 0 ? - k.substring(this._ns.length) : - undefined : // so each() knows to skip it - k; - } - },// end _.storeAPI - storageAPI: { - length: 0, - has: function(k){ return this.items.hasOwnProperty(k); }, - key: function(i) { - var c = 0; - for (var k in this.items){ - if (this.has(k) && i === c++) { - return k; - } - } - }, - setItem: function(k, v) { - if (!this.has(k)) { - this.length++; - } - this.items[k] = v; - }, - removeItem: function(k) { - if (this.has(k)) { - delete this.items[k]; - this.length--; - } - }, - getItem: function(k){ return this.has(k) ? this.items[k] : null; }, - clear: function(){ for (var k in this.list){ this.removeItem(k); } }, - toString: function(){ return this.length+' items in '+this.name+'Storage'; } - }// end _.storageAPI - }; - - // setup the primary store fn - if (window.store){ _.conflict = window.store; } - var store = - // safely set this up (throws error in IE10/32bit mode for local files) - _.Store("local", (function(){try{ return localStorage; }catch(e){}})()); - store.local = store;// for completeness - store._ = _;// for extenders and debuggers... - // safely setup store.session (throws exception in FF for file:/// urls) - store.area("session", (function(){try{ return sessionStorage; }catch(e){}})()); - - //Expose store to the global object - window.store = store; - - if (typeof define === 'function' && define.amd !== undefined) { - define(function () { - return store; - }); - } else if (typeof module !== 'undefined' && module.exports) { - module.exports = store; - } - -})(this, null); - -// XHook - v1.3.3 - https://github.com/jpillora/xhook -// Jaime Pillora - MIT Copyright 2015 -(function(window,undefined) { -var AFTER, BEFORE, COMMON_EVENTS, EventEmitter, FIRE, FormData, NativeFormData, NativeXMLHttp, OFF, ON, READY_STATE, UPLOAD_EVENTS, XHookFormData, XHookHttpRequest, XMLHTTP, convertHeaders, depricatedProp, document, fakeEvent, mergeObjects, msie, proxyEvents, slice, xhook, _base, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - -document = window.document; - -BEFORE = 'before'; - -AFTER = 'after'; - -READY_STATE = 'readyState'; - -ON = 'addEventListener'; - -OFF = 'removeEventListener'; - -FIRE = 'dispatchEvent'; - -XMLHTTP = 'XMLHttpRequest'; - -FormData = 'FormData'; - -UPLOAD_EVENTS = ['load', 'loadend', 'loadstart']; - -COMMON_EVENTS = ['progress', 'abort', 'error', 'timeout']; - -msie = parseInt((/msie (\d+)/.exec(navigator.userAgent.toLowerCase()) || [])[1]); - -if (isNaN(msie)) { - msie = parseInt((/trident\/.*; rv:(\d+)/.exec(navigator.userAgent.toLowerCase()) || [])[1]); -} - -(_base = Array.prototype).indexOf || (_base.indexOf = function(item) { - var i, x, _i, _len; - for (i = _i = 0, _len = this.length; _i < _len; i = ++_i) { - x = this[i]; - if (x === item) { - return i; - } - } - return -1; -}); - -slice = function(o, n) { - return Array.prototype.slice.call(o, n); -}; - -depricatedProp = function(p) { - return p === "returnValue" || p === "totalSize" || p === "position"; -}; - -mergeObjects = function(src, dst) { - var k, v; - for (k in src) { - v = src[k]; - if (depricatedProp(k)) { - continue; - } - try { - dst[k] = src[k]; - } catch (_error) {} - } - return dst; -}; - -proxyEvents = function(events, src, dst) { - var event, p, _i, _len; - p = function(event) { - return function(e) { - var clone, k, val; - clone = {}; - for (k in e) { - if (depricatedProp(k)) { - continue; - } - val = e[k]; - clone[k] = val === src ? dst : val; - } - return dst[FIRE](event, clone); - }; - }; - for (_i = 0, _len = events.length; _i < _len; _i++) { - event = events[_i]; - if (dst._has(event)) { - src["on" + event] = p(event); - } - } -}; - -fakeEvent = function(type) { - var msieEventObject; - if (document.createEventObject != null) { - msieEventObject = document.createEventObject(); - msieEventObject.type = type; - return msieEventObject; - } else { - try { - return new Event(type); - } catch (_error) { - return { - type: type - }; - } - } -}; - -EventEmitter = function(nodeStyle) { - var emitter, events, listeners; - events = {}; - listeners = function(event) { - return events[event] || []; - }; - emitter = {}; - emitter[ON] = function(event, callback, i) { - events[event] = listeners(event); - if (events[event].indexOf(callback) >= 0) { - return; - } - i = i === undefined ? events[event].length : i; - events[event].splice(i, 0, callback); - }; - emitter[OFF] = function(event, callback) { - var i; - if (event === undefined) { - events = {}; - return; - } - if (callback === undefined) { - events[event] = []; - } - i = listeners(event).indexOf(callback); - if (i === -1) { - return; - } - listeners(event).splice(i, 1); - }; - emitter[FIRE] = function() { - var args, event, i, legacylistener, listener, _i, _len, _ref; - args = slice(arguments); - event = args.shift(); - if (!nodeStyle) { - args[0] = mergeObjects(args[0], fakeEvent(event)); - } - legacylistener = emitter["on" + event]; - if (legacylistener) { - legacylistener.apply(undefined, args); - } - _ref = listeners(event).concat(listeners("*")); - for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { - listener = _ref[i]; - listener.apply(undefined, args); - } - }; - emitter._has = function(event) { - return !!(events[event] || emitter["on" + event]); - }; - if (nodeStyle) { - emitter.listeners = function(event) { - return slice(listeners(event)); - }; - emitter.on = emitter[ON]; - emitter.off = emitter[OFF]; - emitter.fire = emitter[FIRE]; - emitter.once = function(e, fn) { - var fire; - fire = function() { - emitter.off(e, fire); - return fn.apply(null, arguments); - }; - return emitter.on(e, fire); - }; - emitter.destroy = function() { - return events = {}; - }; - } - return emitter; -}; - -xhook = EventEmitter(true); - -xhook.EventEmitter = EventEmitter; - -xhook[BEFORE] = function(handler, i) { - if (handler.length < 1 || handler.length > 2) { - throw "invalid hook"; - } - return xhook[ON](BEFORE, handler, i); -}; - -xhook[AFTER] = function(handler, i) { - if (handler.length < 2 || handler.length > 3) { - throw "invalid hook"; - } - return xhook[ON](AFTER, handler, i); -}; - -xhook.enable = function() { - window[XMLHTTP] = XHookHttpRequest; - if (NativeFormData) { - window[FormData] = XHookFormData; - } -}; - -xhook.disable = function() { - window[XMLHTTP] = xhook[XMLHTTP]; - window[FormData] = NativeFormData; -}; - -convertHeaders = xhook.headers = function(h, dest) { - var header, headers, k, name, v, value, _i, _len, _ref; - if (dest == null) { - dest = {}; - } - switch (typeof h) { - case "object": - headers = []; - for (k in h) { - v = h[k]; - name = k.toLowerCase(); - headers.push("" + name + ":\t" + v); - } - return headers.join('\n'); - case "string": - headers = h.split('\n'); - for (_i = 0, _len = headers.length; _i < _len; _i++) { - header = headers[_i]; - if (/([^:]+):\s*(.+)/.test(header)) { - name = (_ref = RegExp.$1) != null ? _ref.toLowerCase() : void 0; - value = RegExp.$2; - if (dest[name] == null) { - dest[name] = value; - } - } - } - return dest; - } -}; - -NativeFormData = window[FormData]; - -XHookFormData = function(form) { - var entries; - this.fd = form ? new NativeFormData(form) : new NativeFormData(); - this.form = form; - entries = []; - Object.defineProperty(this, 'entries', { - get: function() { - var fentries; - fentries = !form ? [] : slice(form.querySelectorAll("input,select")).filter(function(e) { - var _ref; - return ((_ref = e.type) !== 'checkbox' && _ref !== 'radio') || e.checked; - }).map(function(e) { - return [e.name, e.type === "file" ? e.files : e.value]; - }); - return fentries.concat(entries); - } - }); - this.append = (function(_this) { - return function() { - var args; - args = slice(arguments); - entries.push(args); - return _this.fd.append.apply(_this.fd, args); - }; - })(this); -}; - -if (NativeFormData) { - xhook[FormData] = NativeFormData; - window[FormData] = XHookFormData; -} - -NativeXMLHttp = window[XMLHTTP]; - -xhook[XMLHTTP] = NativeXMLHttp; - -XHookHttpRequest = window[XMLHTTP] = function() { - var ABORTED, currentState, emitFinal, emitReadyState, facade, hasError, hasErrorHandler, readBody, readHead, request, response, setReadyState, status, transiting, writeBody, writeHead, xhr; - ABORTED = -1; - xhr = new xhook[XMLHTTP](); - request = {}; - status = null; - hasError = void 0; - transiting = void 0; - response = void 0; - readHead = function() { - var key, name, val, _ref; - response.status = status || xhr.status; - if (!(status === ABORTED && msie < 10)) { - response.statusText = xhr.statusText; - } - if (status !== ABORTED) { - _ref = convertHeaders(xhr.getAllResponseHeaders()); - for (key in _ref) { - val = _ref[key]; - if (!response.headers[key]) { - name = key.toLowerCase(); - response.headers[name] = val; - } - } - } - }; - readBody = function() { - if (!xhr.responseType || xhr.responseType === "text") { - response.text = xhr.responseText; - response.data = xhr.responseText; - } else if (xhr.responseType === "document") { - response.xml = xhr.responseXML; - response.data = xhr.responseXML; - } else { - response.data = xhr.response; - } - if ("responseURL" in xhr) { - response.finalUrl = xhr.responseURL; - } - }; - writeHead = function() { - facade.status = response.status; - facade.statusText = response.statusText; - }; - writeBody = function() { - if ('text' in response) { - facade.responseText = response.text; - } - if ('xml' in response) { - facade.responseXML = response.xml; - } - if ('data' in response) { - facade.response = response.data; - } - if ('finalUrl' in response) { - facade.responseURL = response.finalUrl; - } - }; - emitReadyState = function(n) { - while (n > currentState && currentState < 4) { - facade[READY_STATE] = ++currentState; - if (currentState === 1) { - facade[FIRE]("loadstart", {}); - } - if (currentState === 2) { - writeHead(); - } - if (currentState === 4) { - writeHead(); - writeBody(); - } - facade[FIRE]("readystatechange", {}); - if (currentState === 4) { - setTimeout(emitFinal, 0); - } - } - }; - emitFinal = function() { - if (!hasError) { - facade[FIRE]("load", {}); - } - facade[FIRE]("loadend", {}); - if (hasError) { - facade[READY_STATE] = 0; - } - }; - currentState = 0; - setReadyState = function(n) { - var hooks, process; - if (n !== 4) { - emitReadyState(n); - return; - } - hooks = xhook.listeners(AFTER); - process = function() { - var hook; - if (!hooks.length) { - return emitReadyState(4); - } - hook = hooks.shift(); - if (hook.length === 2) { - hook(request, response); - return process(); - } else if (hook.length === 3 && request.async) { - return hook(request, response, process); - } else { - return process(); - } - }; - process(); - }; - facade = request.xhr = EventEmitter(); - xhr.onreadystatechange = function(event) { - try { - if (xhr[READY_STATE] === 2) { - readHead(); - } - } catch (_error) {} - if (xhr[READY_STATE] === 4) { - transiting = false; - readHead(); - readBody(); - } - setReadyState(xhr[READY_STATE]); - }; - hasErrorHandler = function() { - hasError = true; - }; - facade[ON]('error', hasErrorHandler); - facade[ON]('timeout', hasErrorHandler); - facade[ON]('abort', hasErrorHandler); - facade[ON]('progress', function() { - if (currentState < 3) { - setReadyState(3); - } else { - facade[FIRE]("readystatechange", {}); - } - }); - if ('withCredentials' in xhr || xhook.addWithCredentials) { - facade.withCredentials = false; - } - facade.status = 0; - facade.open = function(method, url, async, user, pass) { - currentState = 0; - hasError = false; - transiting = false; - request.headers = {}; - request.headerNames = {}; - request.status = 0; - response = {}; - response.headers = {}; - request.method = method; - request.url = url; - request.async = async !== false; - request.user = user; - request.pass = pass; - setReadyState(1); - }; - facade.send = function(body) { - var hooks, k, modk, process, send, _i, _len, _ref; - _ref = ['type', 'timeout', 'withCredentials']; - if(navigator.userAgent.indexOf("Firefox/") != -1){http://atmosphere-framework.2306103.n4.nabble.com/Atmosphere-js-withCredentials-true-does-not-work-in-Firefox-td4656661.html - _ref = ['type', 'timeout']; - } - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - k = _ref[_i]; - modk = k === "type" ? "responseType" : k; - if (modk in facade) { - request[k] = facade[modk]; - } - } - request.body = body; - send = function() { - var header, value, _j, _len1, _ref1, _ref2; - proxyEvents(COMMON_EVENTS, xhr, facade); - if (facade.upload) { - proxyEvents(COMMON_EVENTS.concat(UPLOAD_EVENTS), xhr.upload, facade.upload); - } - transiting = true; - xhr.open(request.method, request.url, request.async, request.user, request.pass); - _ref1 = ['type', 'timeout', 'withCredentials']; - if(navigator.userAgent.indexOf("Firefox/") != -1){//http://atmosphere-framework.2306103.n4.nabble.com/Atmosphere-js-withCredentials-true-does-not-work-in-Firefox-td4656661.html - _ref1 = ['type', 'timeout']; - } - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - k = _ref1[_j]; - modk = k === "type" ? "responseType" : k; - if (k in request) { - xhr[modk] = request[k]; - } - } - _ref2 = request.headers; - for (header in _ref2) { - value = _ref2[header]; - xhr.setRequestHeader(header, value); - } - if (request.body instanceof XHookFormData) { - request.body = request.body.fd; - } - xhr.send(request.body); - }; - hooks = xhook.listeners(BEFORE); - process = function() { - var done, hook; - if (!hooks.length) { - return send(); - } - done = function(userResponse) { - if (typeof userResponse === 'object' && (typeof userResponse.status === 'number' || typeof response.status === 'number')) { - mergeObjects(userResponse, response); - if (__indexOf.call(userResponse, 'data') < 0) { - userResponse.data = userResponse.response || userResponse.text; - } - setReadyState(4); - return; - } - process(); - }; - done.head = function(userResponse) { - mergeObjects(userResponse, response); - return setReadyState(2); - }; - done.progress = function(userResponse) { - mergeObjects(userResponse, response); - return setReadyState(3); - }; - hook = hooks.shift(); - if (hook.length === 1) { - return done(hook(request)); - } else if (hook.length === 2 && request.async) { - return hook(request, done); - } else { - return done(); - } - }; - process(); - }; - facade.abort = function() { - status = ABORTED; - if (transiting) { - xhr.abort(); - } else { - facade[FIRE]('abort', {}); - } - }; - facade.setRequestHeader = function(header, value) { - var lName, name; - lName = header != null ? header.toLowerCase() : void 0; - name = request.headerNames[lName] = request.headerNames[lName] || header; - if (request.headers[name]) { - value = request.headers[name] + ', ' + value; - } - request.headers[name] = value; - }; - facade.getResponseHeader = function(header) { - var name; - name = header != null ? header.toLowerCase() : void 0; - return response.headers[name]; - }; - facade.getAllResponseHeaders = function() { - return convertHeaders(response.headers); - }; - if (xhr.overrideMimeType) { - facade.overrideMimeType = function() { - return xhr.overrideMimeType.apply(xhr, arguments); - }; - } - if (xhr.upload) { - facade.upload = request.upload = EventEmitter(); - } - return facade; -}; -/* -if (typeof this.define === "function" && this.define.amd) { - define("xhook", [], function() { - return xhook; - }); -} else {*/ - (this.exports || this).xhook = xhook; -//} - -}.call(this,window)); - -xhook.before(function(request) { - var zte_headers = store('zte_http_headers'); - if (zte_headers && zte_headers.length > 0) { - for (i = 0; i < zte_headers.length; i++) { - if (zte_headers[i].store === true) { - if ( !! store(zte_headers[i].value)) { - request.headers[zte_headers[i].key] = store(zte_headers[i].value).toUpperCase() - } - } else { - request.headers[zte_headers[i].key] = zte_headers[i].value - } - } - } -}); \ No newline at end of file diff --git a/common/src/main/webapp/thirdparty/js/core/load_menuList.js b/common/src/main/webapp/thirdparty/js/core/load_menuList.js deleted file mode 100755 index 972e782b..00000000 --- a/common/src/main/webapp/thirdparty/js/core/load_menuList.js +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2016, CMCC Technologies Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var initLeftMenu = function() { - var i18nName = "openo_frame_left_menu_i18n"; - var parentMenus; - var childMenus; - - $.ajax({ - async : false, - "type" : "GET", - url : "json/menu_list.json", - dataType : "json", - "success" : function (res, textStatus, jqXHR) { - parentMenus = res.parentMenus; - childMenus = res.childMenus; - }, - error : function () { - } - }); - - var templateParent = "" + - "" + - "" + - "" + - "" + - ""; - - var templateChild = "
  • " + - "" + - "" + - "" + - "" + - "
  • "; - - var menuContent = ""; - for (var i = 0; i < parentMenus.length; i++) { - var parentMenuContent = templateParent.replace("{id}", parentMenus[i].id) - .replace("{iconClass}", parentMenus[i].iconClass) - .replace("{i18nName}", i18nName); - - var childMenuContent = ""; - for (var j = 0; j < childMenus.length; j++) { - if (childMenus[j].parentId == parentMenus[i].id) { - childMenuContent = childMenuContent + templateChild.replace("{id}", childMenus[j].id) - .replace("{url}", childMenus[j].url) - .replace("{iconClass}", childMenus[j].iconClass) - .replace("{hrefId}", childMenus[j].id + "_href") - .replace("{i18nName}", i18nName); - } - } - childMenuContent = ""; - - menuContent = menuContent + "
  • " + parentMenuContent + childMenuContent + "
  • "; - } - - return menuContent; -} \ No newline at end of file diff --git a/common/src/main/webapp/thirdparty/js/core/openoFrameWork.js b/common/src/main/webapp/thirdparty/js/core/openoFrameWork.js deleted file mode 100755 index 3b7e4b38..00000000 --- a/common/src/main/webapp/thirdparty/js/core/openoFrameWork.js +++ /dev/null @@ -1,3701 +0,0 @@ -/* -主框架 -*/ -/*string类型的去前后空格和format方法*/ -String.prototype.trim = function() { - return this.replace(/(^\s*)|(\s*$)/g, ""); -}; -String.prototype.format=function() { - if(arguments.length==0) return this; - for(var s=this, i=0; i ul > li', panel).each(function () { - var color = $(this).attr("data-style"); - if (color == configColor) { - // 匹配上了才重设默认主题 - $(this).addClass("current"); - $('#style_color').attr("href", "css/themes/" + color + ".css"); - //if (store) { - store('style_color', color); - //} - } - }); -}; - -function setFrameWorkByConf() { - //设置用户相关的框架下拉菜单是否可用 - var helpMenuItem = openoFrameWork_conf.helpMenuItem; - var aboutMenuItem = openoFrameWork_conf.aboutMenuItem; - var flightMenuItem = openoFrameWork_conf.flightMenuItem; - var fullscreenMenuItem = openoFrameWork_conf.fullscreenMenuItem; - var logoutMenuItem = openoFrameWork_conf.logoutMenuItem; - var changePassMenuItem = openoFrameWork_conf.changePassMenuItem; - if (!helpMenuItem || helpMenuItem === "false") { - $('#uep_ict_help_url').parent('li').remove(); - } - if (!aboutMenuItem|| aboutMenuItem === "false") { - $('[data-target="#aboutDlg"]').parent('li').remove(); - } - if (!helpMenuItem && !aboutMenuItem) { - $('#uep_ict_help_div').remove(); - } - if (!flightMenuItem|| flightMenuItem === "false") { - $('#header_notification_bar').html("
          
    "); - } - if (!fullscreenMenuItem|| fullscreenMenuItem === "false") { - //$('#trigger_fullscreen').parent().css("display", "none"); - $('#trigger_fullscreen_div').html(""); - } - if (!logoutMenuItem || logoutMenuItem === "false") { - //$('#trigger_logout').parent().css("display", "none"); - $('#trigger_logout_div').html(""); - } - if ((!fullscreenMenuItem && !logoutMenuItem) || (fullscreenMenuItem === "false" && logoutMenuItem === "false")) { - $('#full_logout_divider').css("display", "none"); - } - if (!changePassMenuItem ) { - $('#changePwd_labellink').css('display','none'); - $('#full_logout_divider').css('display','none'); - } - - //设置二次开发者选择的框架皮肤 - var defaultColor = openoFrameWork_conf.defaultThemeColor; - var panel = $('.zte-theme-panel'); - $('ul > li', panel).removeClass("current"); - if (store && !store('style_color')) { // cookie没有才设置默认主题 - setThemeColor(defaultColor); - } else { - setThemeColor(store('style_color')); - } -}; - -/*新增的hashtabel实现类,用户后续iframe的缓存,前进后退时打开过的页面的菜单id的缓存等*/ -function Hashtable() -{ - this._hash = {}; - this._count = 0; - this.add = function(key, value) - { - if (this._hash.hasOwnProperty(key)) - return false; - else { - this._hash[key] = value; this._count++; return true; - } - } ; - this.hash = function() { return this._hash; }; - this.remove = function(key) { delete this._hash[key]; this._count--; } ; - this.count = function() { return this._count; }; - this.items = function(key) { if (this.contains(key)) return this._hash[key]; }; - this.contains = function(key) { return this._hash.hasOwnProperty(key); }; - this.clear = function() { this._hash = {}; this._count = 0; }; - this.replace = function(key, value) - { //有则删除后增加///相当于更新 - if(this.contains(key)){ - this.remove(key); - } - return this.add(key, value); - } ; -}; - -var fMenuSiderDivId = 'page-f-sidebar-menu'; -var fMenuMegaDivId = 'f_hormenu'; -var megaSiderDivId = 'page-megachild-sidebar-menu'; -var megaDivId = 'main_hormenu'; -var openoFrameWork_menu_horizontal = "horizontal"; -var openoFrameWork_menu_vertical = "vertical"; -var openoFrameWork_menu_fmenu = "fmenu"; -var openoFrameWork_showNav = "true"; -var openoFrameWork_smallView = 960;//原来为992,但是在投影仪上不准(投影仪设置为1024,但是实际尺寸比1024小),边栏菜单也会被移除,这个设置一个稍小的值。 - -/*下面是主框架的核心*/ -var openoFrameWork = function () { - var defaultLanage=getLanguage(); - var isRTL = false;//文档顺序 - var isTouch=function(){ - try { - document.createEvent("TouchEvent"); - return true; - } catch (e) { - return false; - } - }; - var isDesktop = !isTouch; - var isIE8 = false; - var isIE9 = false; - var isIE10 = false; - var gdocTitle=""; - var _sidebarWidth = 225; - var _sidebarCollapsedWidth = 35; - var responsiveHandlers = []; - var cachedIframes=new Hashtable(); - var cachedIframesObject=new Hashtable(); - var breadcrumbBtnMenus=new Hashtable(); - var _menuCategorys=new Hashtable(); - var _iframe="page-mainIframe"; //全局变量保存的是当前正在打开使用的iframe - var _sceneURLRootPath=""; - var _hashSource="";//信号量 - var _isClicked=false;//信号量 - //var _breadcrumbSource=false; - - // 皮肤颜色 - var layoutColorCodes = { - 'blue': '#4b8df8', - 'red': '#e02222', - 'green': '#35aa47', - 'purple': '#852b99', - 'grey': '#555555', - 'light-grey': '#fafafa', - 'yellow': '#ffb848', - 'ztebluelight': '#3366cc' - }; - // 获取真实的设备窗口大小,参考了 http://andylangton.co.uk/articles/javascript/get-viewport-size-javascript/ - var _getViewPort = function () { - var e = window, a = 'inner'; - if (!('innerWidth' in window)) { - a = 'client'; - e = document.documentElement || document.body; - } - return { - width: e[a + 'Width'], - height: e[a + 'Height'] - } - } - // 初始化 - var dealInit = function () { - var sence = '0'; - var menuSence = getUrlParam("menu"); - var confSence = 0; - if (menuSence) { - sence = menuSence; - } else { - sence = confSence; - } - switch (sence) { - case "1": - gdocTitle = $('#com_zte_ums_ict_framework_ui_page_title_1').text().trim(); - break; - case "2": - gdocTitle = $('#com_zte_ums_ict_framework_ui_page_title_2').text().trim(); - break; - case "3": - gdocTitle = $('#com_zte_ums_ict_framework_ui_page_title_3').text().trim(); - break; - case "0": - default: - gdocTitle = $('#com_zte_ums_ict_framework_ui_page_title').text().trim(); - break; - } - if ($('body').css('direction') === 'rtl') { - isRTL = true; - } - isIE8 = !! navigator.userAgent.match(/MSIE 8.0/); - isIE9 = !! navigator.userAgent.match(/MSIE 9.0/); - isIE10 = !! navigator.userAgent.match(/MSIE 10.0/); - if (isIE10) { - $('html').addClass('ie10'); // IE10 - } - if (isIE10 || isIE9 || isIE8) { - $('html').addClass('ie'); // IE10 - } - var deviceAgent = navigator.userAgent.toLowerCase(); - if (deviceAgent.match(/(iphone|ipod|ipad)/)) { - $(document).on('focus', 'input, textarea', function () { - $('.page-header').hide(); - if($('.page-footer')&&$('.page-footer').length>0) - $('.page-footer').hide(); - }); - $(document).on('blur', 'input, textarea', function () { - $('.page-header').show(); - if($('.page-footer')&&$('.page-footer').length>0) - $('.page-footer').show(); - }); - } else { - $(document).on('focus', 'input, textarea', function () { - if($('.page-footer')&&$('.page-footer').length>0) - $('.page-footer').hide(); - }); - $(document).on('blur', 'input, textarea', function () { - if($('.page-footer')&&$('.page-footer').length>0) - $('.page-footer').show(); - }); - } - } - //处理滚动到 - var dealScrollTo=function (el, offeset) { - - } - var dealstartPageLoading=function(message) { - $('.page-loading').remove(); - $('body').append('
      ' + (message ? message : $.i18n.prop('com_zte_ums_ict_framework_ui_loading')) + '
    '); - } - var dealstopPageLoading=function() { - $('.page-loading').remove(); - } - var dealSidebarState = function () { - // 窗体宽度小尺寸(平板和iphone模式下)时移出左边栏 - var viewport = _getViewPort(); - if (viewport.width < openoFrameWork_smallView) { - $('body').removeClass("page-sidebar-closed"); - }else{ - if (getCookie('sidebar_closed') === '1') { - $('body').addClass('page-sidebar-closed'); - } - } - } - // openoFrameWork.addResponsiveHandler()回调函数. - var runResponsiveHandlers = function () { - //重新初始化其他订阅的元素elements - for (var i = 0; i < responsiveHandlers.length; i++) { - var each = responsiveHandlers[i]; - each.call(); - } - } - // 窗体重新调整大小时初始化调整边栏状态高度 - var dealResponsive = function () { - dealSidebarState(); - ajustHorMenuDropDirection(); - dealSidebarAndContentHeight(); - dealFixedSidebar(); - runResponsiveHandlers(); - } - // 页面重载入时初始化调整内部布局 - var dealResponsiveOnInit = function () { - dealSidebarState(); - dealSidebarAndContentHeight(); - setTimeout(function () { - ajustHorMenuDropDirection(true); - }, 100); - } - // 窗体重新调整大小时初始化调整布局 - var dealResponsiveOnResize = function () { - var resize; - if (isIE8) { - var currheight; - $(window).resize(function () { - if (currheight == document.documentElement.clientHeight) { - return; - } - if (resize) { - clearTimeout(resize); - } - resize = setTimeout(function () { - dealResponsive(); - }, 50); - currheight = document.documentElement.clientHeight; - }); - } else { - $(window).resize(function () { - if (resize) { - clearTimeout(resize); - } - resize = setTimeout(function () { - dealResponsive(); - }, 50); - }); - } - } - var changeSiderBar = function(hideAllMenu){ - var siderbarpos = $(".nav-pos-direction", $(".zte-theme-panel")).val(); - var sidermenu = $("#page-sidebar-menu"); - var hormenu = $("#main_hormenu"); - var fhorMenu = $("#" + fMenuMegaDivId); - var fsiderMenu = $("#" + fMenuSiderDivId); - if(hideAllMenu){ - sidermenu.css('display','block');// 侧边栏显示 - hormenu.css("display", "none");//隐藏水平菜单栏 - fhorMenu.css('display','none'); - fsiderMenu.css('display','none'); - return; - } - - sidermenu.css('display','none'); - hormenu.css("display", "none"); - fhorMenu.css('display','block'); - fsiderMenu.css('display','block'); - //除了toggle按钮之外,是否还有其他儿子是要显示的,如果没有,那么竖菜单不显示;反之,显示。 - var lis = fsiderMenu.children(".sidebar-toggler-wrapper").siblings(); - if(lis.length > 0 && lis.css('display') != "none"){ - fsiderMenu.css('display','block'); - $("body").removeClass("page-full-width"); - if ($('body').hasClass("page-sidebar-closed")) { - $(".page-content").css("marginLeft", _sidebarCollapsedWidth); - } else { - $(".page-content").css("marginLeft", _sidebarWidth); - } - } - } - //根据当前菜单在屏幕的位置,和一级菜单下二级菜单的排列,来决定菜单是向左展开还是向右展开 - var ajustHorMenuDropDirection = function( isInit ){ - //获取屏幕宽度 - var bodyWidth = document.body.clientWidth; - //循环,获取每个一级菜单在屏幕中的位置 - var levelOneAdropdowns = $('a.dropdown-toggle', '#main_hormenu' ); - //每一个文字span的图标、他父亲的margin\padding等占用的位置 - var marginCount = 5 * 2 + 17.5 + 2 * 2 + 30 + 15 * 2 + 3; - for( var i = 0 ; i < levelOneAdropdowns.length ; i++ ){ - var a = $(levelOneAdropdowns[i]); - var leftOffset = a.offset().left; - //获取二级菜单的数量 - var ul = a.parent().children('.dropdown-menu'); - var groupDivs = $('.zteDivWidth' , ul); - var widthOfDropDownMenu = 0; - for(var j = 0 ; j < groupDivs.length && groupDivs.length >0 ; j++ ){//循环获取每个分组的宽度 - var eachDiv = groupDivs[j]; - var maxLengthText = ""; - var maxLength = 0; - var spans = $('span' , eachDiv).each(function(){ - var innerText = this.innerText; - if( innerText.length > maxLength ){ - maxLength= innerText.length; - maxLengthText = innerText; - } - }); - widthOfDropDownMenu = widthOfDropDownMenu + getStringWidth(maxLengthText , 14) + marginCount; - } - //预估每个组占宽度150PX,多预计一点 - if( widthOfDropDownMenu + leftOffset > bodyWidth ){ - console.log("ajust class dropdown-menu-right ,id = "+ a.attr("id") ); - ul.addClass('dropdown-menu-right'); - //var right = bodyWidth - (leftOffset + a.width() + 15); - //ul.attr('style' ,'right:' + right ); - }else{ - ul.removeClass('dropdown-menu-right'); - //ul.removeAttr('style'); - } - } - } - // 屏幕大小发生变化或者移动设备旋转屏幕时处理响应式布局. - var dealSidebarAndContentHeight = function (isToggler) { - var content = $('.page-content'); - var contentbody = $('.page-content-body'); - var sidebar = $('.page-sidebar'); - var body = $('body'); - var height; - var viewport = _getViewPort(); - var scrAvaHeight=Math.min(window.screen.availHeight,viewport.height)-5; - var footer=$('.footer'); - var pgbread=$('.page-breadcrumb'); - var pageableDiv=$('#pageableDiv'); - console.log("pageableDiv height:"+pageableDiv.outerHeight(true)); - var pheader=$('.header'); - var childPagetype=!!cachedIframesObject.items(_iframe)?cachedIframesObject.items(_iframe).childpageType:""; - if(childPagetype==="isc")//smartclient的子页面固定高度为视口可用内容区高度 - { - $('.sidebar-option', panel).val("fixed"); - } - dealShownav(); - var available_height =scrAvaHeight - ((!footer||footer.length<=0)?0:footer.outerHeight(true)) - pheader.outerHeight(true); - var _pageableDivHeight=(!pageableDiv||pageableDiv.length<=0||pageableDiv.is(":visible")==false)?0:pageableDiv.outerHeight(true); - var h= scrAvaHeight-pheader.outerHeight(true)-((!footer||footer.length<=0||footer.is(":visible")==false)?0:footer.outerHeight(true))-pgbread.outerHeight(true)-_pageableDivHeight-(contentbody.outerHeight(true)-contentbody.height()); - var miframe=_iframe==""?"page-mainIframe": _iframe; - var pagemyIframe=$('.page-content .page-content-body .'+miframe); //.page-mainIframe - if(pagemyIframe&&pagemyIframe.length>0){ - //处理iframe,下面计算中间iframe的高度 - var deviceAgent = navigator.userAgent.toLowerCase(); - if (deviceAgent.match(/(iphone|ipod|ipad)/)) { //||viewport.height<=480 - var w=viewport.width-content.offset().left-(pagemyIframe.offset().left-content.offset().left)*2;//宽度=总宽度-左边栏宽度-内容区内边距。左右两个 - pagemyIframe.width(w); - } - //对桌面必须计算高度 - var tmp_style = sidebar.attr('style');// firefox下执行 sidebar.height()会改变style样式,这里缓存下执行前的style样式,执行完后重新赋给页面元素 - console.log("pym:parent iframe "+miframe+" sidebar.height:"+sidebar.height()+" h:"+h); - h=sidebar.height()>h?sidebar.height():h; - //IE下,把iframe的高度再减掉7,因为IE10及以下版本,计算的高度会比IE实际显示区域大,导致出现IE滚动条。 - /*h=h-ICTFRAME_CONST_IFRAME_HEIGHT_AJUST; - if(isIE){ - h=h-ICTFRAME_CONST_IFRAME_HEIGHT_AJUST_IE; - }*/ - sidebar.attr('style',tmp_style); - if (isDesktop) { - //pagemyIframe.attr("height",h); - if(cachedIframesObject.items(miframe).setMinHeight){ - var minHeight=Math.min(scrAvaHeight,h); - console.log("pym:parent iframe "+miframe+" window.screen.availHeight:"+scrAvaHeight+" viewport.height:"+viewport.height+" h:"+h+" minHeight:"+minHeight); - cachedIframesObject.items(miframe).setMinHeight(minHeight); - } - }else{ - //pagemyIframe.attr("height","100%");//去掉这里错误的设置,ipad上测试高度不正确 - var _h=h; - try{ - _h=pagemyIframe.contents().height(); - }catch(e){} - h=_h>h?_h:h; - if(cachedIframesObject.items(miframe).setMinHeight){ - var minHeight=Math.min(scrAvaHeight,h); - console.log("pym:parent iframe "+miframe+" window.screen.availHeight:"+scrAvaHeight+" viewport.height:"+viewport.height+" h:"+h+" minHeight:"+minHeight); - cachedIframesObject.items(miframe).setMinHeight(minHeight); - } - } - } - - if (body.hasClass("page-footer-fixed") === true && body.hasClass("page-sidebar-fixed") === true) { - if (content.height() < available_height) { - //content.attr('style', 'min-height:' + available_height + 'px !important'); - dealAddStyle(content,'min-height',available_height + 'px',true); - } - } else{ - if (body.hasClass("page-footer-fixed") === true && body.hasClass("page-sidebar-fixed") === false) { - if (content.height() < available_height) { - //content.attr('style', 'min-height:' + available_height + 'px !important'); - dealAddStyle(content,'min-height',available_height + 'px',true); - } - } else { - if (body.hasClass('page-sidebar-fixed')) { - height = _calculateFixedSidebarViewportHeight(); - } else { - // firefox下执行 sidebar.height()会改变style样式,这里缓存下执行前的style样式,执行完后重新赋给页面元素 - var tmp_style = sidebar.attr('style'); - // height = sidebar.height() + 20; - sidebar.attr('style',tmp_style); - var headerHeight = pheader.outerHeight(true); - var footerHeight = (!footer||footer.length<=0)?0:footer.outerHeight(true); - if ($(window).width() > 1024 && (height + headerHeight + footerHeight) < scrAvaHeight) { - height = scrAvaHeight - headerHeight - footerHeight; - } - } - if (height <= content.height()) {//这里为了避免内容区域很小的时候出现内容区域无法充满屏幕,把min-height修改为height - //content.attr('style', 'min-height:' + height + 'px !important'); - dealAddStyle(content,'min-height',height + 'px',true); - } - } - } - // 屏幕小尺寸时会隐藏边栏,这时菜单由小屏幕右上图标控制,当屏幕变化到大尺寸屏幕时, - // 需要按原菜单出现方式恢复菜单显示。 - var screenwidth = $(window).width(); - if(screenwidth >= openoFrameWork_smallView){ - changeSiderBar(); - if($(".page-sidebar-menu li").css('display') != "none"){ - if ($('body').hasClass("page-sidebar-closed") && $(".sidebar-toggler").hasClass("close-by-viewportChange")) { - if( !isToggler ){ - $(".sidebar-toggler")[1].click(); - } - $(".sidebar-toggler").removeClass("close-by-viewportChange"); - } - } - } - else { - changeSiderBar(true); - } - } - var showIframe=function(iframe){ - var resize,pagemainIframe; - if (cachedIframes.count()>0) { - for (var i in cachedIframes.hash()) { - cachedIframes.replace(i,0); - var pagemyIframe=$('.page-content .page-content-body .'+i); - if(pagemyIframe&&pagemyIframe.length>0){ - if(iframe==i){ - pagemyIframe.show(); - cachedIframes.replace(i,1); - } else{ - if("page-mainIframe"===i){//2015年12月10日 wimax要求页面切换后删除没有配置cacheNum的缓存页面 - pagemainIframe=i; - pagemyIframe.attr("src",""); - pagemyIframe.remove(); - }else{ - pagemyIframe.hide(); - } - cachedIframes.replace(i,0); - } - } - } - } - if(pagemainIframe){ - delete cachedIframes._hash[pagemainIframe]; - delete cachedIframesObject._hash[pagemainIframe]; - } - if (!cachedIframes.contains(iframe)) { - cachedIframes.add(iframe,1); - //增加的iframe加载完毕后 停止加载中提示信息 - myIframe=$('.'+iframe); - myIframe.show(); - myIframe.load(function(){ - /*if (!isDesktop) { - if (resize) { - clearInterval(resize); - } - resize = setInterval(dealIframeHeight, 400,$(this)); - }*/ - openoFrameWork.stopPageLoading(); - }); - } - } - var hidemenu=function(){ - $('.hor-menu').hide(); - dealAddStyle($('.page-content'),'margin-left','0px',true); - dealAddStyle($('.page-sidebar'),'display','none',true); - var fsiderMenu = $("#" + fMenuSiderDivId); - fsiderMenu.children().css('display' , 'none'); - } - var hideAlarmLight=function(){ - //$('#header_notification_bar').hide(); - //$('#header_notification_bar').empty(); - $('#header_notification_bar').html("
          
    "); - } - var dealShownav=function(){ - var showNav=openoFrameWork.getLocationURLParameter('showNav'); - if( showNav=="false"){ - openoFrameWork_showNav = showNav; - hidemenu(); - hideAlarmLight(); - } - } - /* 点击菜单时,处理对应该菜单项的横,左菜单项 */ - var dealRelateMenu = function(source) { - // 点击子菜单时,对应的横竖菜单项也联动为选择样式,(高亮,箭头变化) - var panel = $('.zte-theme-panel'); - var navPosOption = $('.nav-pos-direction', panel).val(); - var targetsource = null; - var targetContainer = null; - if (navPosOption === "vertical") { - // 当前是左菜单,则处理对应的横菜单 - targetsource = $("#"+source.attr("id"), $("#main_hormenu")); - targetContainer = $(".header ul"); - } else if (navPosOption === "horizontal") { - var rtn = dealMgaBarRelated(source); - dealFMenuRelated(source , megaSiderDivId); - targetContainer = rtn[0]; - targetsource = rtn[1]; - }else if(navPosOption === openoFrameWork_menu_fmenu){ - dealFMenuRelated(source , fMenuSiderDivId); - } - if (targetContainer) { - // 移除原有菜单项的活动及箭头样式 - targetContainer.children('li.active').removeClass('active'); - targetContainer.find('.arrow.open').removeClass('open'); - } - if (targetsource) { - // 增加活动及箭头样式 - targetsource.parents('li').each(function () { - $(this).addClass('iframe active'); - $(this).find('a > span.arrow').addClass('open'); - }); - targetsource.parents('li').addClass('active'); - if (navPosOption === "horizontal") { - if (targetsource.parent().parent().parent().is("li")) { - $('.arrow', targetsource.parent().parent().parent()).addClass("open"); - } - } - } - } - var dealMgaBarRelated = function(source){ - // 当前是横菜单,则处理对应的左菜单 - targetsource = $("#"+source.attr("id"), $("[class='page-sidebar-menu']")); - targetContainer = $("#page-sidebar-menu ul"); - // 将先前左菜单展开的子菜单收缩 - $("li.open",targetContainer).each(function() { - var style = $("ul.sub-menu", this).attr("style"); - if (style) { - $("ul.sub-menu", this).removeAttr("style"); - $(this).removeClass('open'); - } - }); - // 当前是横菜单,但在屏幕缩小的情况下显示的是tip垂直菜单,而横菜单是隐藏的,所以需额外处理横菜单 - if (source.parent().parent().parent().parent().attr("class").indexOf("page-sidebar-menu") >= 0) { - var tiptargetsource = $("#"+source.attr("id"), $("#main_hormenu")); - var tiptargetContainer = $(".header ul"); - tiptargetContainer.children('li.active').removeClass('active'); - tiptargetContainer.find('.arrow.open').removeClass('open'); - tiptargetsource.parents('li').each(function () { - $(this).addClass('iframe active'); - $(this).find('a > span.arrow').addClass('open'); - }); - tiptargetsource.parents('li').addClass('active'); - } - return [targetContainer ,targetsource ]; - } - var dealFMenuRelated = function(source , siderDivId ){ - var fsiderMenu = $("#" + siderDivId); - if(isMoreMenuItemClick){//更多菜单点击 , 临时方案,增加信号量,使用之后就置为false - isMoreMenuItemClick = false - }else if($(source).parents('li').hasClass('mega-menu-dropdown')){//F的横向菜单的点击 - var id = source.attr('id'); - //非被点击的一级菜单的二级菜单都不显示 - $('#' + siderDivId + '>li').hide(); - var level2Lis = $("a[hparentid= " + id + "]" , fsiderMenu).parent(); - level2Lis.show(); - if(level2Lis.length > 0){//把竖向菜单的收起放大按钮显示出来 - $('#' + siderDivId + '>li.sidebar-toggler-wrapper').show(); - } - if($("a[hparentid= " + id + "]" , fsiderMenu).length > 0){ //有子孙菜单时,把F菜单的竖菜单显示出来 - dealFSidermenu(source ,siderDivId ); - }else{//否则隐藏竖菜单 - fsiderMenu.css('display','none'); - $("body").addClass("page-full-width"); - $(".page-content").css("marginLeft", _sidebarWidth); - } - - }else{//F菜单的竖向菜单点击 - //处理一种特殊情况,告警灯打开新页面,所有的菜单都不出现,因此,虽然这个source在竖菜单,但竖菜单这个时候实际上是没有显示的 - if( openoFrameWork_showNav == "true") { - $('#' + siderDivId + '>li').hide(); - var lis = $(source).parents('li'); - var id = lis.eq(lis.length-1).children( 'a' ).attr('hparentid'); - //var id = $(source).parents('li').children('a').attr('hparentId'); - var level2Lis = $("a[hparentid=" + id + "]" , fsiderMenu).parent(); - level2Lis.show(); - if(level2Lis.length > 0) {//把竖向菜单的收起放大按钮显示出来 - $('#'+ siderDivId + '>li.sidebar-toggler-wrapper').show(); - } - //$('#' + siderDivId + '>li')[0].show(); - dealFSidermenu(source , siderDivId); - } - } - } - var dealFSidermenu = function(source , siderDivId){ - var fsiderMenu = $("#" + siderDivId); - fsiderMenu.css('display','block'); - $('ul.sub-menu',fsiderMenu).css('display','block'); - $('.arrow',fsiderMenu).addClass('open'); - $("body").removeClass("page-full-width"); - if ($('body').hasClass("page-sidebar-closed")) { - $(".page-content").css("marginLeft", _sidebarCollapsedWidth); - } else { - $(".page-content").css("marginLeft", _sidebarWidth); - } - var href = source.attr("href"); - $('li.iframe' ,fsiderMenu ).removeClass('active'); - var selectedIframeLi = $("a[href ='" + href + "']" ,fsiderMenu ).parent(); - selectedIframeLi.addClass('active'); - selectedIframeLi.parent().parent().addClass("open").addClass("active"); - selectedIframeLi.parent().css('display','block'); - selectedIframeLi.parent().parent().children('a').children('.arrow').addClass('open'); - } - var dealMenuItemClick=function(source,e,menuContainerStr){ - var url = source.attr("href"); - if(!url||url.length<2) - return; - e.preventDefault(); - if(!_isClicked){//导航情况下,首先要模拟点开菜单分组 - _isClicked=true;//如果菜单有子菜单点击一次来展开子菜单,注意这个信号量的变化,避免死循环 - var mainMenu=source.parents('li').last(); - if(!mainMenu.hasClass('open')){ - dealLiAClick(mainMenu.children('a:eq(0)')); - } - } - if(menuContainerStr&&menuContainerStr.length>0){ - var menuContainer = $('.'+menuContainerStr+' ul'); - - menuContainer.children('li.active').removeClass('active'); - // menuContainer.children('arrow.open').removeClass('open'); - //menuContainer.find('.arrow.open').addClass('open'); - } - source.parents('li').each(function () { - $(this).addClass('iframe active'); - $(this).children('a > span.arrow').addClass('open'); - }); - source.parents('li').addClass('active'); - // 处理点击菜单对应的横或左菜单项的选择样式 - dealRelateMenu(source); - if(menuContainerStr&&menuContainerStr.length>0){ - if ($(window).width() <= 991 && $('.'+menuContainerStr).hasClass("in")) { - $('.navbar-toggle').click(); - } - } - if(dealMultTabPage(source)) - return true; - dealScrollTo(); - var breadmenuID=e.data&&e.data.breadcrumbBtnMenuItem&&e.data.breadcrumbBtnMenuItem.length>0?e.data.breadcrumbBtnMenuItem:""; - if(breadmenuID.length>0){//面包削导航来的,只需要重新生成面包削即可 - //找到更多菜单按钮 - var moreMenuItem = $('#' + breadmenuID , $('#pageableDiv')); - if( moreMenuItem.length == 0 ){ - moreMenuItem = $('#' + breadmenuID , $('.more-botton-zone')); - } - dealBreadcrumbBtnMenuItemClick(moreMenuItem,e); - //dealBreadcrumb(source,false,e); - }else{//非面包削导航来的, - dealstartPageLoading(); - if(dealIframe(source,e))//当返回true时说明是正常加载iframe了,否则面包削不能切换 - dealBreadcrumb(source,false,e); - } - //dealShownav(); - }; - var dealMenuItemGetFocus=function(source,e,menuContainerStr){ - var url = source.attr("href"); - if(!url||url.length<2) - return; - e.preventDefault(); - if(!_isClicked){//导航情况下,首先要模拟点开菜单分组 - _isClicked=true;//如果菜单有子菜单点击一次来展开子菜单,注意这个信号量的变化,避免死循环 - var mainMenu=source.parents('li').last(); - dealLiAClick(mainMenu.children('a:eq(0)')); - } - if(menuContainerStr&&menuContainerStr.length>0){ - var menuContainer = $('.'+menuContainerStr+' ul'); - - menuContainer.children('li.active').removeClass('active'); - menuContainer.children('arrow.open').removeClass('open'); - } - source.parents('li').each(function () { - $(this).addClass('iframe active'); - $(this).children('a > span.arrow').addClass('open'); - }); - source.parents('li').addClass('active'); - - if(menuContainerStr&&menuContainerStr.length>0){ - if ($(window).width() <= 991 && $('.'+menuContainerStr).hasClass("in")) { - $('.navbar-toggle').click(); - } - } - }; - //处理iframe的核心处理类,逻辑较为复杂,注意各种参数的处理 - var dealIframe=function(aObject,e){ - _hashSource=""; - var url = aObject.attr("href"); - if(!url||url.length<2) - return; - url=openoFrameWork.handlBaseURL(url); - //-----------2015年9月21日新增V5中大O需要的按照实例(根据选择的系统实例变化url的ip和端口地址)进行动态切换菜单的功能 - var category= aObject.attr("category");//处理菜单中定义的Category属性 - if(category&&category.length>0){//处理Category属性 - var newIpPort=_menuCategorys.items(category); - if(newIpPort&&newIpPort.ipPort&&newIpPort.ipPort.trim()!=""){//如果找到了 - var newIpPortstr=openoFrameWork.getDomainURL(newIpPort.ipPort);//去掉ip和port后多余的部分 - var urlipport=openoFrameWork.getDomainURL(url); - console.log("old url:"+url); - url=newIpPortstr+url.replace(urlipport,""); - console.log("newIpPort:"+newIpPortstr+" newURL:"+url); - } - } - //------------ - dealstartPageLoading(); - var cacheNum= aObject.attr("cacheNum");//当第三方应用需要框架缓存曾经打开过的页面时使用。 - var shiftJS= aObject.attr("shiftJS");//当第三方应用不需要后面的href页面进行重新加载仅仅执行某个脚本打开某个功能时使用 - var _iframeName= aObject.attr("iframeName");//对有些第三方应用设置了顶层frame名字的,这个必须设置 - var _iframeAutoScroll= aObject.attr("iframeAutoScroll");//设置iframe的滚动条是否出现,可以设置为auto,yes或者no,默认为no 不出现. - _iframeAutoScroll=!!_iframeAutoScroll?(_iframeAutoScroll==='yes'?'yes':_iframeAutoScroll==='auto'?'auto':'no'):'no'; - _xdomain= aObject.attr("xdomain");//对有些第三方应用如果跨域了,需要设置这个信任域属性,以便于来跨域通讯.这里取值是一个正则表达式 - _xdomain=_xdomain&&_xdomain.length>0?_xdomain:"*"; - var _cssfile= aObject.attr("cssSrc");//设置iframe中页面需要动态加载的css文件. - _cssfile=(_cssfile&&_cssfile.length>0)?_cssfile:""; - var _runShiftJS=""; - var pageContentBody=$('.page-content .page-content-body'); - var tabHtml=""; - var tabContentHtml=""; - var tabID=""; - var tabContentID=""; - var iframename=''; - function createIframe(pdiv,url,id,name,clsname,xdom,autoScroll){ - var pymParent = new pym.Parent(pdiv, url, {xdomain:xdom}); - pymParent.iframe.id=id; - pymParent.iframe.name=name; - //pymParent.iframe.setAttribute('display', "none"); - //pymParent.iframe.style.height="100%"; - //pymParent.iframe.setAttribute('height', "100%"); - pymParent.iframe.setAttribute('class', clsname); - pymParent.iframe.setAttribute('allowfullscreen',''); - pymParent.iframe.setAttribute('mozallowfullscreen',''); - pymParent.iframe.setAttribute('oallowfullscreen',''); - pymParent.iframe.setAttribute('msallowfullscreen',''); - pymParent.iframe.setAttribute('webkitallowfullscreen',''); - //pymParent.iframe.setAttribute('scrolling',autoScroll); - pymParent.iframe.setAttribute('onload', 'openoFrameWork.SyncCSS(this,0,"'+_cssfile+'");openoFrameWork.stopPageLoading();'); - cachedIframesObject.replace(id,pymParent);//缓存iframe对象实体 - pymParent.onMessage('height', function(he){ - console.log("The frame "+id+" receive message height is "+he); - var pagemyIframe=$('.page-content .page-content-body .'+id); - var h=Math.max(this.minHeight,he); - pagemyIframe.height(h); - }); - return pymParent; - }; - - if(cacheNum){//处理缓存iframe和iframename标签 - cacheNum="page-mainIframe"+cacheNum; - iframename="fraMain"+cacheNum; - }else{ - cacheNum="page-mainIframe"; - iframename="fraMain"; - } - iframename=!!_iframeName?_iframeName:iframename; - _iframe= cacheNum;//注意这里_iframe是一个全局变量 - - var miframe=_iframe==""?"page-mainIframe": _iframe; - var pagemyIframe=$('.page-content .page-content-body .'+miframe); - var nagivJS=e&&e.data&&e.data.action?e.data.action:""; - nagivJS=(!!nagivJS&&nagivJS.length>0)?(nagivJS.trim().toLowerCase()=="null"?nagivJS:"javascript:$('.page-content .page-content-body ."+miframe+"')[0].contentWindow."+nagivJS.trim()+";"):""; - nagivJS=nagivJS.trim(); - - _runShiftJS=(!!shiftJS&&shiftJS.length>0)?(shiftJS.trim().toLowerCase()=="null"?shiftJS:"javascript:$('.page-content .page-content-body ."+miframe+"')[0].contentWindow."+shiftJS+";"):""; - if(pagemyIframe&&pagemyIframe.length>0){//如果iframe已经添加了,则直接更改url或者执行切换或导航函数 - var src=pagemyIframe.attr("src"); - if((!!shiftJS||nagivJS.length>0)&&(src==url||src.split('?')[0]==url.split('?')[0])&& cacheNum!="page-mainIframe") { //url相同时,处理缓存shiftJS标签 - //这里shiftJS必须定义iframe中的页面定义到window上的函数; - //pagemyIframe.attr("scrolling",_iframeAutoScroll); - cachedIframesObject.items(miframe).settings.xdomain=_xdomain; - if(nagivJS.length>0&&nagivJS.toLowerCase()!="null") - _runShiftJS=nagivJS;//如果是nagivJS导航过来的,nagivJS优先级高于shiftJS,如果有nagivJS就用nagivJS替换_runShiftJS; 直接执行一次导航切换 - try{ - if(_runShiftJS.trim().toLowerCase()!="null") - eval(_runShiftJS); - }catch(e){ - if (e instanceof EvalError) { - console.log(e.name + " EvalError: " + e.message); - } else if (e instanceof SyntaxError) { - console.log(e.name + " SyntaxError: " + e.message); - }else if (e instanceof Error) { - if(e.name.toLowerCase().trim()=="typeerror") - { - //console.log($.i18n.prop('com_zte_ums_ict_framework_ui_clickTooFast')); - var parm={runShiftJS:_runShiftJS}; - pagemyIframe.one('load',parm,function(e){ - var runShiftJS=e&&e.data&&e.data.runShiftJS?e.data.runShiftJS:""; - if(runShiftJS.length>0&&runShiftJS.toLowerCase()!="null") - eval(runShiftJS);//点击太快了,页面没有加载完毕,那就加载完毕了再次执行 - }) - } - } - return false;//返回false 后续不再做其他动作了 - } - finally{ - openoFrameWork.stopPageLoading(); - } - }else{//否则url不同,或者url相同但没有shiftjs - if(nagivJS.length>0&&nagivJS.toLowerCase()!="null"){//如果是代码导航过来的去掉url参数中的默认action动作 - url=url.split('?')[0];//去掉?参数,防止默认执行动作,只响应nagivJS指定的动作; - } - if(src.split('#')[0]!=url.split('#')[0])//如果相等说明是通过锚点导航的,真实url没有变化,对SPA应用比较普遍 - { - pagemyIframe.attr("src","");//url和src不同说明更换了页面,需要清空重新加载 - }else //if (src.trim()==url.trim()) //没有shiftjs并且url相同,说明不需要再次加载了,已经加载过了 - { - openoFrameWork.stopPageLoading(); - } - pagemyIframe.attr("src",url); - - if(nagivJS.length>0&&nagivJS.toLowerCase()!="null"){//如果是nagivJS导航过来的,iframe加载完毕后执行一次导航切换脚本 - var parm={nagivJS:nagivJS}; - pagemyIframe.one('load',parm,function(e){ - var nagivJS=e&&e.data&&e.data.nagivJS?e.data.nagivJS:""; - if(nagivJS.length>0&&nagivJS.toLowerCase()!="null") - eval(nagivJS);//如果没有加载过,加载后也要执行跳转的函数 - }); - } - if(_cssfile.length>0&&_cssfile.toLowerCase()!="null"){//如果配置了cssSrc,每次切换都重新执行一边这个css文件,防止有遗漏 - parm={syncCSSJS:'openoFrameWork.SyncCSS(this,10,"'+_cssfile+'");openoFrameWork.stopPageLoading();'}; - pagemyIframe.one('load',parm,function(e){ - var syncCSSJS=e&&e.data&&e.data.syncCSSJS?e.data.syncCSSJS:""; - if(syncCSSJS.length>0&&syncCSSJS.toLowerCase()!="null") - eval(syncCSSJS); - }); - } - } - - }else{//否则添加新的iframe元素 overflow:visible; - if(nagivJS.length>0&&nagivJS.toLowerCase()!="null"){//如果是代码导航过来的去掉url参数中的默认action动作 - url=url.split('?')[0];//去掉?参数,防止默认执行动作,只响应nagivJS指定的动作; - } - var pdiv="pdiv_"+miframe; - if($("#"+pdiv).length<=0){//检查下,如果该div没有添加过就添加 - pageContentBody.append("
    "); - } - dealstartPageLoading(); - pymParent=createIframe(pdiv, url,miframe,miframe,miframe,_xdomain,_iframeAutoScroll); - pagemyIframe=$(pymParent.iframe); - - if(nagivJS.length>0&&nagivJS.toLowerCase()!="null"){//如果是nagivJS导航过来的,iframe加载完毕后执行一次导航切换 - var parm={nagivJS:nagivJS}; - pagemyIframe=$('.page-content .page-content-body .'+miframe); - if(pagemyIframe&&pagemyIframe.length>0){ - pagemyIframe.one('load',parm,function(e){ - var nagivJS=e&&e.data&&e.data.nagivJS?e.data.nagivJS:""; - if(nagivJS.length>0&&nagivJS.toLowerCase()!="null") - eval(nagivJS);//如果没有加载过,加载后也要执行跳转的函数 - }) - } - } - - } - showIframe(miframe); - openoFrameWork.fixContentHeight(); // 调整高度 - return true; - } - // 处理边栏菜单 - var dealLiAClick=function(source){ - if (source.next().hasClass('sub-menu') == false) { - if ($('.btn-navbar').hasClass('collapsed') == false) { - $('.btn-navbar').click(); - } - return; - } - - if (source.next().hasClass('sub-menu always-open')) { - return; - } - var parent = source.parent().parent(); - var the = source; - var menu = $('.page-sidebar-menu'); - var sub = source.next(); - var autoScroll = menu.data("auto-scroll") ? menu.data("auto-scroll") : true; - var slideSpeed = menu.data("slide-speed") ? parseInt(menu.data("slide-speed")) : 200; - parent.children('li.open').children('a').children('.arrow').removeClass('open'); - parent.children('li.open').children('.sub-menu:not(.always-open)').slideUp(200); - parent.children('li.open').removeClass('open'); - var slideOffeset = -200; - if (sub.is(":visible")) { - $('.arrow', source).removeClass("open"); - source.parent().removeClass("open"); - sub.slideUp(slideSpeed, function () { - if (autoScroll == true && $('body').hasClass('page-sidebar-closed') == false) { - if ($('body').hasClass('page-sidebar-fixed')) { - - } else { - dealScrollTo(the, slideOffeset); - } - } - dealSidebarAndContentHeight(); - }); - } else { - $('.arrow', source).addClass("open"); - source.parent().addClass("open"); - sub.slideDown(slideSpeed, function () { - if (autoScroll == true && $('body').hasClass('page-sidebar-closed') == false) { - if ($('body').hasClass('page-sidebar-fixed')) { - dealScrollTo(the, slideOffeset); - } - } - dealSidebarAndContentHeight(); - }); - } - } - var dealSidebarMenu = function () {//这里注册和处理边栏菜单的各类点击事件 - $('.page-sidebar').on('click', 'li > a', function (e) { - if ($(this).next().hasClass('sub-menu') == false) { - if ($('.btn-navbar').hasClass('collapsed') == false) { - $('.btn-navbar').click(); - } - return; - } - if ($(this).next().hasClass('sub-menu always-open')) { - return; - } - dealLiAClick($(this)); - e.preventDefault(); - }); - - // 处理左边导航中的菜单连接,显示在iframe中 - $('.page-sidebar').on('click', ' li > a.iframe', function (e) { - //dealMenuItemClick($(this),e,"page-sidebar") - e.preventDefault(); - var menuItemID=$(this).attr("id"); - if(!!menuItemID&&menuItemID.length>0){ - _setLocationHash(menuItemID); - _hashSource="dhByInterface"; - }//else{ - _isClicked=true; - dealMenuItemClick($(this),e,"page-sidebar"); - //} - }); - // 处理更多菜单的菜单连接,显示在iframe中dropdown-menu - $('.page-breadcrumb').on('click', ' li > a.iframe', function (e) { - var url = $(this).attr("href"); - if(url.length<2) - return; - e.preventDefault(); - dealBreadcrumbBtnMenuItemClick($(this),e); - }); - // 处理可翻页更多菜单中的菜单连接,显示在iframe中dropdown-menu - $('#pageableDiv').on('click', ' div > a.iframe', function (e) { - var url = $(this).attr("href"); - if(url.length<2) - return; - e.preventDefault(); - dealBreadcrumbBtnMenuItemClick($(this),e); - }); - // 处理可翻页更多菜单中的菜单连接,显示在iframe中dropdown-menu - $('#pageableDiv').on('click', ' li > a.iframe', function (e) { - var url = $(this).attr("href"); - if(url.length<2) - return; - e.preventDefault(); - if(e.target){ - var tg=$("span",e.target); - tg=tg.length>0?tg[0]:e.target; - $(".open a>div>span",e.target.parentNode.parentNode.parentNode.parentNode.parentNode).replaceWith(tg.outerHTML); - } - dealBreadcrumbBtnMenuItemClick($(this),e); - }); - - // 处理header下拉菜单中的菜单连接,显示在iframe中 - $('.dropdown').on('click', ' li > a.iframe', function (e) { - var url = $(this).attr("href"); - if(url.length<2) - return; - e.preventDefault(); - dealScrollTo(); - dealstartPageLoading(); - - dealIframe($(this),e) - dealBreadcrumb($(this),false,e); - }); - } - var getSceneURL=function(url){ - if(url&&url.trim().length>0){ - url=url.trim(); - //url= - _sceneURLRootPath=_sceneURLRootPath+url; - } - } - var gurl="";//临时全局变量,存储当前加载的more菜单,如果加载过了,就不再加载了。下面的方法中会用到 - var moreMenusisLoaded=true; - var waittime=null; - var getBreadcrumbRightButtons=function(url,e){ - if (url.length<2){ - return; - } - url=openoFrameWork.handlBaseURL(url); - if (gurl==url){ - if(e===true){ - $('#pageableDiv').show(); - }else if(e&&e.target&&e.currentTarget){ - var defaultDisplay=$(e.target).attr("defaultDisplay"); - defaultDisplay=(!defaultDisplay)?$(e.currentTarget).attr("defaultDisplay"):defaultDisplay; - if(defaultDisplay&&defaultDisplay.trim()=="false"){ - $('#pageableDiv').hide(); - }else{ - $('#pageableDiv').show(); - } - } - return; - - }else{ - gurl=url; - clearMoreOperations(); - } - //处理e参数,注意e可能为null - var breadmenuID=e&&e.data&&e.data.breadcrumbBtnMenuItem&&e.data.breadcrumbBtnMenuItem.length>0?e.data.breadcrumbBtnMenuItem:""; - breadmenuID=breadmenuID.length<=0?(e&&e.breadcrumbBtnMenuItem&&e.breadcrumbBtnMenuItem.length>0?e.breadcrumbBtnMenuItem:""):breadmenuID; - moreMenusisLoaded=false; - $.ajax({ - type: "GET", - cache: false, - url: url, - dataType: "html", - success: function (res) { - try{ - //$('.page-breadcrumb').append(res); - var resScriptsSriped = stripHtmlScripts(res); - //$('.page-breadcrumb').append(resScriptsSriped); - $('.more-botton-zone').children().remove(); - //V5新增逻辑,如果displayType = pageableDiv,那么就用滑动的DIV来显示更多菜单里面的内容,如果没有配置,或为其他值,就按原有方式显示 - var tempDiv = $('
    '); - tempDiv.children().remove(); - tempDiv.append(resScriptsSriped); - - //获取UL属性 - var displayType = $('.dropdown-menu',tempDiv).attr('displayType'); - if( displayType && displayType != 'pageableDiv'){ - $('.more-botton-zone').append(resScriptsSriped); - $('#pageableDiv').hide(); - }else{ - var tempUl = $('.dropdown-menu',tempDiv); - if(tempUl.length>0){ - moreOperations(tempUl[0]); - if(e&&e.target&&e.currentTarget){ - var defaultDisplay=$(e.target).attr("defaultDisplay"); - defaultDisplay=(!defaultDisplay)?$(e.currentTarget).attr("defaultDisplay"):defaultDisplay; - if(defaultDisplay&&defaultDisplay.trim()=="false"){ - $('#pageableDiv').hide(); - }else{ - $('#pageableDiv').show(); - } - } - } - } - runHtmlScripts(res); - }catch(ex){ - }finally{ - moreMenusisLoaded=true; - } - groupButtonAuthentication(); - if(breadmenuID.length>0){//面包削导航来的,只需要重新生成面包削即可 - var menuitem=undefined; - var panel = $('.zte-theme-panel'); - var navPosOption = $('.nav-pos-direction', panel).val(); - //var items=$("a[id='"+breadmenuID+"']"); - var items = undefined; - if (navPosOption === "vertical"){ //从垂直菜单里面找 - items=$("#page-sidebar-menu a[id='"+breadmenuID+"']"); - - }else{//从水平菜单里面找 - items=$(".hor-menu a[id='"+breadmenuID+"']"); - } - if (!items || items.length < 1) { - items=$(".page-content a[id='"+breadmenuID+"']"); - } - if(items.length>0){ - for(var i=0;i0) - dealBreadcrumbBtnMenuItemClick(menuitem,e); - } - }, - error: function (xhr, ajaxOptions, thrownError) {//加载操作菜单失败!com_zte_ums_ict_framework_ui_loadmenuerror - $('.page-breadcrumb').append('

    '+$.i18n.prop('com_zte_ums_ict_framework_ui_loadmenuerror')+'

    '); - moreMenusisLoaded=true; - } - }); - } - - //处理多tab也场景 ----redirect 该标签暂时保留,不建议使用了 - dealMultTabPage=function(clickedObject){ - var url = clickedObject.attr("href"); - if(!url||url.length<2) - return; - var redirect=clickedObject.attr("redirect"); //处理多tab页面的需求 - if (!!redirect&&redirect.length>0){ - var miframe=_iframe==""?"page-mainIframe": _iframe; - var pagemyIframe=$('.page-content .page-content-body .'+miframe); //.page-mainIframe - //var pagemyIframe=$('.page-content .page-content-body .page-mainIframe'); - var oldhref=""; - if(pagemyIframe&&pagemyIframe.length>0){ - oldhref=pagemyIframe.attr("src"); - if(url.split("?")[0]==oldhref.split("?")[0]) - { - eval(redirect); - dealBreadcrumb(clickedObject,false,e); - return true; - } - } - }; - return false; - }; - //处理主菜单面包削导航 - var globleCurrentBreadcrumb=""; - var globleCurrentMainMenuItemID=""; - var dhByBreadcrumb = false; - var dealBreadcrumb=function(clickedObject,notGenUID,e){//notGenUID为true就不重新生成id - var mbreadcrumb=$('.breadcrumbUl'); - openoFrameWork.setPageTitle(clickedObject.find('span').text().trim()); - var clieckedObj= clickedObject.parent('li'); - if(clieckedObj.length == 0){ //分页式更多菜单,a链接的父亲是div - clieckedObj= clickedObject.parent('div'); - } - //如果点击的是F菜单的竖菜单,还需要找到横菜单上的对应父亲加入到clieckedObj - var navPosOption = $('.nav-pos-direction', panel).val(); - var parentid = clickedObject.attr('hparentid'); - var breadcrumGroupButtonSrc=clickedObject.attr("breadcrumGroupButtonSrc"); - globleCurrentMainMenuItemID=clickedObject.attr("id"); - var mhmtl=""; - var url=""; - var tempObj=null; - //var breadChangeType = e? (e.data ? e.data.breadChangeType:null):null; - if( dhByBreadcrumb ){ - mhmtl = dealClickBreadcrumb(clieckedObj); - dhByBreadcrumb = ""; - }else{ - while (clieckedObj&&clieckedObj.length>0){ - if(clieckedObj.children('a')){ - if(!notGenUID){ - url=openoFrameWork.getUniqueID("aid");//+Math.floor(Math.random() * (new Date()).getTime()); - clieckedObj.children('a').attr("name",url); - }else{ - url=clieckedObj.children('a').attr("name"); - } - tempObj=clieckedObj.clone(); - tempObj.children('a').removeClass('iframe'); - tempObj.children('a').removeClass('active'); - tempObj.children('a').attr("href","javascript:openoFrameWork.goToURL('"+url+"');"); - var arrowdown = $(".fa-angle-down", tempObj.children('a')); - if (arrowdown) { - arrowdown.remove(); - } - if(tempObj.children('a').length>0){ - mhmtl=tempObj.children('a')[0].outerHTML+""+mhmtl; - } - //如果是F菜单和横菜单的子竖菜单点击,需要做特殊处理 - if( clieckedObj.parent('ul').attr('id') == fMenuSiderDivId || clieckedObj.parent('ul').attr('id') == megaSiderDivId){ - var id = clieckedObj.children( 'a' ).attr('hparentid'); - //判断是F菜单还是横菜单 - var megaMenu = null; - if(navPosOption == openoFrameWork_menu_horizontal){ - magaMenu = $('#'+megaDivId); - }else if(navPosOption == openoFrameWork_menu_fmenu){ - magaMenu = $('#'+fMenuMegaDivId); - } - clieckedObj = $("a[id=" + id + "]" , magaMenu).parent('li'); - }else{ - clieckedObj=clieckedObj.parents('li'); - } - } - } - if(clieckedObj[0]&&clieckedObj[0].length>0) { - mhmtl=clieckedObj.children('a')[0].outerHTML+""+mhmtl; - } - } - mbreadcrumb.empty(); - $('.more-botton-zone').empty(); - globleCurrentBreadcrumb=mhmtl; - store("globleCurrentBreadcrumb",globleCurrentBreadcrumb); - mbreadcrumb.append(mhmtl); - if(breadcrumGroupButtonSrc&&breadcrumGroupButtonSrc.length>0){ - getBreadcrumbRightButtons(breadcrumGroupButtonSrc,e); - }else{ - $('#pageableDiv').hide(); - } - - }; - //面包屑发起的点击,就不重新生成面包屑,只是把该面包屑的后续节点移出。 - var dealClickBreadcrumb = function(clieckedObj){ - var index = globleCurrentBreadcrumb.indexOf(clieckedObj.children('a').attr("name")); - if( index > -1 ){//截取 - var indexofSign = globleCurrentBreadcrumb.indexOf("",index); - var newBreadcrumb = globleCurrentBreadcrumb.substring(0,indexofSign) + ""; - return newBreadcrumb; - } - } - //处理面包削中菜单点击后的导航(更多菜单的面包屑) - var dealBreadcrumbBtnGroupMenus=function(clickedObject,notGenUID , e ){ - var mbreadcrumb=$('.breadcrumbUl'); - var clieckedObj= clickedObject.parent(); - var breadcrumGroupButtonSrc=clickedObject.attr("breadcrumGroupButtonSrc"); - var mhmtl=""; - var url=""; - var tempObj=null; - var menuid=clickedObject.attr("id"); - if (!breadcrumbBtnMenus.contains(menuid)) {//把当前面包削中的菜单id和该子菜单对应的父菜单关联缓存起来 - breadcrumbBtnMenus.add(menuid,globleCurrentMainMenuItemID); - } - while (clieckedObj&&clieckedObj.length>0){ - tempObj=clieckedObj.clone(); - if(tempObj.children('a')){ - tempObj.children('a').removeClass('iframe'); - url=tempObj.children('a').attr("href"); - tempObj.children('a').attr("onclick","openoFrameWork.openbreadcrumbLink($(this),event);"); - var tempdiv = tempObj.children('a').children('div'); - if( tempdiv.length > 0 ){ - var innerofDiv = tempdiv[0].innerHTML; - tempdiv.remove(); - tempObj.children('a')[0].innerHTML = innerofDiv; - } - if(tempObj.children('a').length>0){ - mhmtl=tempObj.children('a')[0].outerHTML+""+mhmtl; - } - clieckedObj=clieckedObj.parents('li'); - } - - } - if(clieckedObj[0]&&clieckedObj[0].length>0) { - mhmtl=clieckedObj.children('a')[0].outerHTML+""+mhmtl; - } - - if(breadcrumGroupButtonSrc&&breadcrumGroupButtonSrc.length>0){ - getBreadcrumbRightButtons(breadcrumGroupButtonSrc,true); - }else{ - $('#pageableDiv').hide(); - } - mbreadcrumb.empty(); - var category= clickedObject.attr("category");//处理菜单中定义的Category属性 - if(category&&category.length>0){//处理Category属性 - var newIpPort=_menuCategorys.items(category); - if(newIpPort&&newIpPort.ipTitle&&newIpPort.ipTitle.trim()!=""){//如果找到了 - mhmtl=newIpPort.ipTitle+''+mhmtl; - } - } - mhmtl=globleCurrentBreadcrumb+mhmtl; - mbreadcrumb.append(mhmtl); - }; - var isMoreMenuItemClick = false; - var dealBreadcrumbBtnMenuItemClick=function(clickObj,e){ - dealScrollTo(); - var menuItemID=clickObj.attr("id"); - if(!!menuItemID&&menuItemID.length>0){ - _setLocationHash(menuItemID); - var breadmenuID=e&&e.data&&e.data.breadcrumbBtnMenuItem&&e.data.breadcrumbBtnMenuItem.length>0?e.data.breadcrumbBtnMenuItem:""; - _hashSource=breadmenuID&&breadmenuID.length>0?"":"dhByInterface";//hash进来的,不是导航进来的。 - } - if(!(e&&e.breadcrumbBtnMenuItem&&e.breadcrumbBtnMenuItem.length>0)){//如果仅仅是tab跳转设置bread进来的,就框架不处理菜单点击,直接重新建立bread即可 - dealstartPageLoading(); - dealIframe(clickObj,e); - } - dealBreadcrumbBtnGroupMenus(clickObj,false,e); - } - // 固定边栏布局时计算边栏高度. - var _calculateFixedSidebarViewportHeight = function () { - var viewport = _getViewPort(); - var sidebarHeight =viewport.height - $('.header').height() + 1; - if ($('body').hasClass("page-footer-fixed")) { - sidebarHeight = sidebarHeight - (!$('.footer')||$('.footer').length<=0)?0:$('.footer').outerHeight(); - } - return sidebarHeight; - } - // 处理固定边栏 - var dealFixedSidebar = function () { - var menu = $('.page-sidebar-menu'); - if (menu.parent('.slimScrollDiv').size() === 1) { - menu.removeAttr('style'); - $('.page-sidebar').removeAttr('style'); - } - - if ($('.page-sidebar-fixed').size() === 0) { - dealSidebarAndContentHeight(); - return; - } - - var viewport = _getViewPort(); - if (viewport.width >= openoFrameWork_smallView) { - var sidebarHeight = _calculateFixedSidebarViewportHeight(); - dealSidebarAndContentHeight(); - } - } - // 固定边栏时处理菜单 hover 效果. - var dealFixedSidebarHoverable = function () { - if ($('body').hasClass('page-sidebar-fixed') === false) { - return; - } - $('.page-sidebar').off('mouseenter').on('mouseenter', function () { - dealSiderBarMouseenter(); - }); - $('.page-sidebar').off('mouseleave').on('mouseleave', function () { - dealSiderBarMouseLeave(); - }); - } - var dealSiderBarMouseenter=function(){ - var body = $('body'); - var siderbar=$('.page-sidebar'); - if ((body.hasClass('page-sidebar-closed') === false || body.hasClass('page-sidebar-fixed') === false) || $(this).hasClass('page-sidebar-hovering')) { - return; - } - body.removeClass('page-sidebar-closed').addClass('page-sidebar-hover-on'); - var siderbartoggle=$('.sidebar-toggler'); - - if (body.hasClass("page-sidebar-reversed")) { - siderbar.width(_sidebarWidth); - dealSiderBarWidthChange(); - } else { - siderbar.addClass('page-sidebar-hovering'); - siderbar.animate({ - width: _sidebarWidth - }, 350, '', function () { - siderbar.removeClass('page-sidebar-hovering'); - dealSiderBarWidthChange(); - }); - } - } - var dealSiderBarMouseLeave=function(){ - var body = $('body'); - if ((body.hasClass('page-sidebar-hover-on') === false || body.hasClass('page-sidebar-fixed') === false) || $(this).hasClass('page-sidebar-hovering')) { - return; - } - var siderbar=$('.page-sidebar'); - var siderbartoggle=$('.sidebar-toggler'); - if (body.hasClass("page-sidebar-reversed")) { - body.addClass('page-sidebar-closed').removeClass('page-sidebar-hover-on'); - siderbar.width(_sidebarCollapsedWidth); - if(siderbartoggle){ - siderbartoggle.removeAttr('style'); - } - dealSiderBarWidthChange(); - } else { - siderbar.addClass('page-sidebar-hovering'); - siderbar.animate({ - width: _sidebarCollapsedWidth - }, 350, '', function () { - body.addClass('page-sidebar-closed').removeClass('page-sidebar-hover-on'); - dealSiderBarWidthChange(); - siderbar.removeClass('page-sidebar-hovering'); - if(siderbartoggle){ - siderbartoggle.removeAttr('style'); - } - }); - } - - } - //处理style css - var dealAddStyle=function(element, property, value, important) { - var styleText=element.attr('style')?element.attr('style'):""; - styles=styleText.split(";"); - var find=""; - for(i=0;i=0){ - find=styles[i];//看是否已经添加过,如果添加过就需要替换掉 - break; - } - } - styleText=find.length>0?styleText.replace(find,""):styleText; - styleText=(styleText + ';'+property + ':' + value + ((important) ? ' !important' : '') + ';').replace(/;;/g,";"); - element.attr('style',styleText ); - } - var dealSiderBarWidthChange=function(){ - - } - // 处理边栏菜单切换时的关闭和隐藏. - var dealSidebarToggler = function () { - var viewport = _getViewPort(); - if (getCookie('sidebar_closed') === '1' && viewport.width >= openoFrameWork_smallView) { - $('body').addClass('page-sidebar-closed'); - } - $('.page-sidebar, .sidebar-toggler').on('click', '.sidebar-toggler', function (e) { - e.preventDefault(); - var body = $('body'); - var sidebar = $('.page-sidebar'); - if(body.hasClass('page-sidebar-closed')){ - $(this).removeAttr('style'); - } - } ); - $('.page-sidebar, .header').on('click', '.sidebar-toggler', function (e) { - var body = $('body'); - var sidebar = $('.page-sidebar'); - if ((body.hasClass("page-sidebar-hover-on") && body.hasClass('page-sidebar-fixed')) || sidebar.hasClass('page-sidebar-hovering')) { - body.removeClass('page-sidebar-hover-on'); - sidebar.css('width', '').hide().show(); - dealSidebarAndContentHeight(); //fix content & sidebar height - setCookie('sidebar_closed', '0'); - dealSiderBarWidthChange(); - e.stopPropagation(); - runResponsiveHandlers(); - return; - } - $(".sidebar-search", sidebar).removeClass("open"); - var panel = $('.zte-theme-panel'); - var sidebarPosOption = $('.sidebar-pos-option', panel).val(); - var pcontent = $("[class='page-content']"); - if (body.hasClass("page-sidebar-closed")) { - body.removeClass("page-sidebar-closed"); - if (body.hasClass('page-sidebar-fixed')) { - sidebar.css('width', ''); - } - setCookie('sidebar_closed', '0'); - pcontent.css("marginLeft",_sidebarWidth); - dealSiderBarWidthChange(); - } else { - body.addClass("page-sidebar-closed"); - $(this).removeAttr('style'); - setCookie('sidebar_closed', '1'); - pcontent.css("marginLeft", _sidebarCollapsedWidth); - dealSiderBarWidthChange(); - } - //针对侧边栏伸缩的情况需加入对.page-content的判断。 - dealSidebarAndContentHeight(true); - runResponsiveHandlers(); - }); - } - // 处理水平菜单 - var dealHorizontalMenu = function () { - $('.header').on('click', '.hor-menu .hor-menu-search-form-toggler', function (e) { - if ($(this).hasClass('off')) { - $(this).removeClass('off'); - $('.header .hor-menu .search-form').hide(); - } else { - $(this).addClass('off'); - $('.header .hor-menu .search-form').show(); - } - e.preventDefault(); - }); - // 处理水平菜单 处理header下拉菜单中的菜单连接,显示在iframe中 - $('.header').on('click', ' li > a.iframe', function (e) { - //dealMenuItemClick($(this),e,"header"); - e.preventDefault(); - var menuItemID=$(this).attr("id"); - if(!!menuItemID&&menuItemID.length>0){ - _setLocationHash(menuItemID); - _hashSource="dhByInterface"; - }//else{ - _isClicked=true; - dealMenuItemClick($(this),e,"header"); - //} - }); - //处理TAB点击 - $('.header').on('click', '.hor-menu a[data-toggle="tab"]', function (e) { - e.preventDefault(); - var nav = $(".hor-menu .nav"); - var active_link = nav.find('li.current'); - $('li.active', active_link).removeClass("active"); - $('.selected', active_link).remove(); - var new_link = $(this).parents('li').last(); - new_link.addClass("current"); - new_link.find("a:first").append(''); - }); - } - // 增加一个对服务端的心跳 - var doHeartbeat = function() { - //心跳超时次数 - var heartBeatTimes = 0; - return setInterval(function() { - var userName; - if( userName == null ){ - var userName = openoFrameWork_conf.userName; - } - var heartUrl = FrameConst.REST_HEARTBEAT + "?username=" + encodeURIComponent(userName); - $.ajax(heartUrl, { - dataType : "text", - cache : false - }).done(function(data) { - // if (data != "true") { //收到不属于取值范围内的回复,说明出现不可预知情况,取消心跳。是原framework.js中的逻辑,比较奇怪,先保留注释。 - // disableHeartbeat(); - // } - //收到心跳回应消息,心跳超时次数置0 - if( data == "true" ){ - heartBeatTimes = 0; - } - }); - heartBeatTimes++; - //心跳超时6次即1分钟,转到登录界面,认为链路断。 - if(heartBeatTimes >= 6){ - disableHeartbeat(); - //console.log(com_zte_ums_aos_framework_ui_heartbeat_timeout); - bootbox.alert($.i18n.prop('com_zte_ums_aos_framework_ui_heartbeat_fail'), function () { - window.location.replace("login.html"); - }); - } - }, 10000); - }; - if( FrameConst.do_heartbeat ){ - var heartbeatTimer = doHeartbeat(); - } - window.enableHeartbeat = function() { - if (!heartbeatTimer) { - //重新启动心跳功能,心跳超时次数置0 - heartBeatTimes = 0; - heartbeatTimer = doHeartbeat(); - return "Enabled"; - } - return "Already enabled!"; - }; - window.disableHeartbeat = function() { - if (heartbeatTimer) { - clearInterval(heartbeatTimer); - heartbeatTimer = null; - return "Disabled"; - } - return "Already disabled!"; - }; - window.doLogout = function(){ - logoutSubmit(); - }; - //处理ict注销确认 - $('#trigger_logout').click(function(){ - bootbox.confirm($.i18n.prop('com_zte_ums_ict_framework_ui_confirmlogout'), function(result) { //你确认要注销吗? - if(result){ - doLogout(); - } - }); - }); - // Handle full screen mode toggle - var isscreenFull=false; - var dealFullScreenMode = function() { - // 处理全屏事件 - function toggleFullScreen() { - if(!screenfull.supportsFullScreen){//不支持全屏 - if (isIE&&typeof window.ActiveXObject !== "undefined") { // Older IE. - var wscript = new ActiveXObject("WScript.Shell"); - if (wscript !== null) { - wscript.SendKeys("{F11}"); - isscreenFull=!isscreenFull; - } - }else{ - isscreenFull=screenfull.supportsFullScreen; - }; - }else{ - screenfull.isFullScreen?screenfull.exitFullScreen():screenfull.requestFullScreen(); - isscreenFull= screenfull.isFullscreen; - } - setTimeout(function(){ - if(isscreenFull){ - $("#fullscreen_label").text($.i18n.prop('com_zte_ums_ict_framework_ui_group_exitfullscreen')); - }else{ - $("#fullscreen_label").text($.i18n.prop('com_zte_ums_ict_framework_ui_group_fullscreen')); - } - },500); - } - - $('#trigger_fullscreen').click(function() { - toggleFullScreen(); - }); - } - //清理当前正在显示的iframe之外缓存的iframe, - var dealClearCachedIframes=function(isall){ - if (cachedIframes.count()>0) { - for (var i in cachedIframes.hash()) { - var pagemyIframe=$('.page-content .page-content-body .'+i); - if(pagemyIframe&&pagemyIframe.length>0){ - if(isall==true){ - pagemyIframe.attr("src",""); - pagemyIframe.remove(); - }else if(i!=_iframe) - pagemyIframe.attr("src",""); - pagemyIframe.remove(); - } - } - } - cachedIframes.clear(); - if (cachedIframesObject.count()>0) {//清理缓存的iframe实体对象。 - for (var i in cachedIframesObject.hash()) { - if(i!=_iframe) - cachedIframesObject.remove(i); - } - } - } - var lastSelectedLayout = ''; - var dealTheme = function () { - var panel = $('.zte-theme-panel'); - if ($('body').hasClass('page-boxed') == false) { - $('.layout-option', panel).val("fluid"); - } - $('.sidebar-option', panel).val("default"); - $('.language-option', panel).val(defaultLanage); - $('.header-option', panel).val("fixed"); - $('.footer-option', panel).val("default"); - if ( $('.sidebar-pos-option').attr("disabled") === false) { - $('.sidebar-pos-option', panel).val(openoFrameWork.isRTL() ? 'right' : 'left'); - } - var _resetLayout = function () { - dealResetLayout(); - } - var _setLayout = function () { - dealSetLayout(); - } - var setColor = function (color) { - var color_ = (openoFrameWork.isRTL() ? color + '-rtl' : color); - $('#style_color').attr("href", ICTFRAME_CONST_THEME_COLOR_CSS_PREFFIX + color_ + ".css"); - setCookie('style_color', color); - syncColorCSS(); - } - $('.toggler', panel).click(function () { - $('.toggler').hide(); - $('.toggler-close').show(); - $('.zte-theme-panel > .theme-options').show(); - }); - - $('.toggler-close', panel).click(function () { - $('.toggler').show(); - $('.toggler-close').hide(); - $('.zte-theme-panel > .theme-options').hide(); - }); - $('.theme-colors > ul > li', panel).click(function () { - var color = $(this).attr("data-style"); - setColor(color); - $('ul > li', panel).removeClass("current"); - $(this).addClass("current"); - }); - $('.layout-option,.header-option, .sidebar-option, .footer-option, .sidebar-pos-option, .nav-pos-direction', panel).change(_setLayout); - if (getCookie('style_color') != undefined) { - setColor(getCookie('style_color')); - } - $('.language-option', panel).change(function(){ - var languageOption = $('.language-option', panel).val(); - setCookie('language-option', languageOption); - window.location.reload(); - }); - } - var dealResetLayout = function () { - $("body"). - removeClass("page-boxed"). - removeClass("page-footer-fixed"). - removeClass("page-sidebar-fixed"). - removeClass("page-header-fixed"). - removeClass("page-sidebar-reversed"); - $('.header > .header-inner').removeClass("container"); - if ($('.page-container').parent(".container").size() === 1) { - $('.page-container').insertAfter('body > .clearfix'); - } - if ($('.footer > .container').size() === 1) { - $('.footer').html($('.footer > .container').html()); - } else if ($('.footer').parent(".container").size() === 1) { - $('.footer').insertAfter('.page-container'); - } - $('body > .container').remove(); - } - /* - * 此方法在客户端初始化和设置面板上选择菜单方向的时候用。 - * param navPosOption - */ - var dealNavPos = function(navPosOption) { - // 横竖边栏切换功能禁用,则返回 - var panel = $('.zte-theme-panel'); - if ($('.nav-pos-direction', panel).attr("disabled") == "disabled") { - return; - } - var sidermenu = $("#page-sidebar-menu"); - var hormenu = $("#main_hormenu"); - var sidermenu = $("#page-sidebar-menu"); - var hormenu = $("#main_hormenu"); - var horSiderMenu = $('#' + megaSiderDivId ); - var fhorMenu = $("#" + fMenuMegaDivId); - var fsiderMenu = $("#" + fMenuSiderDivId); - var pcontent = $("[class='page-content']"); - if (sidermenu && sidermenu.length > 0 && hormenu && hormenu.length > 0 && fhorMenu && fhorMenu.length > 0) { - if (navPosOption === openoFrameWork_menu_horizontal) { - sidermenu.css('display','none');// 侧边栏隐藏 - fhorMenu.css('display','none'); - fsiderMenu.css('display','none'); - pcontent.css("marginLeft",0); - $("body").addClass("page-full-width");//调整内容显示 - hormenu.css("display", "block");//显示水平菜单栏 - // 导航位置为水平菜单时,边栏和边栏位置为默认和靠左,且将其切换功能禁用掉 - $('.sidebar-option', panel).val("default"); - $('.sidebar-option', panel).attr("disabled", true); - $('.sidebar-pos-option', panel).val("left"); - $('.sidebar-pos-option', panel).attr("disabled", true); - } else if (navPosOption === openoFrameWork_menu_vertical ) { - $("body").removeClass("page-full-width"); - sidermenu.css('display','block');//侧边栏显示 - var body = $('body'); - if (body.hasClass("page-sidebar-closed")) { - pcontent.css("marginLeft", _sidebarCollapsedWidth); - } else { - pcontent.css("marginLeft", _sidebarWidth); - } - hormenu.css("display", "none");//隐藏水平菜单栏 - fhorMenu.css('display','none'); - fsiderMenu.css('display','none'); - horSiderMenu.css('display','none'); - $('.sidebar-option', panel).attr("disabled", false); - $('.sidebar-pos-option', panel).attr("disabled", false); - } else if(navPosOption === openoFrameWork_menu_fmenu ){ - sidermenu.css('display','none');// 侧边栏隐藏 - hormenu.css("display", "none");//隐藏水平菜单栏 - fsiderMenu.css('display','none'); - fhorMenu.css('display','block'); - pcontent.css("marginLeft",0); - $("body").addClass("page-full-width");//调整内容显示 - // 导航位置为水平菜单时,边栏和边栏位置为默认和靠左,且将其切换功能禁用掉 - $('.sidebar-option', panel).val("default"); - $('.sidebar-option', panel).attr("disabled", true); - $('.sidebar-pos-option', panel).val("left"); - $('.sidebar-pos-option', panel).attr("disabled", true); - } - } - } - var dealSetLayout = function(){ - var panel = $('.zte-theme-panel'); - var layoutOption = $('.layout-option', panel).val(); - var languageOption = $('.language-option', panel).val(); - var headerOption = $('.header-option', panel).val(); - var footerOption = $('.footer-option', panel).val(); - var navPosOption = $('.nav-pos-direction', panel).val(); - dealNavPos(navPosOption); - var sidebarOption = $('.sidebar-option', panel).val(); - var sidebarPosOption = $('.sidebar-pos-option', panel).val(); - if (sidebarOption == "fixed" && headerOption == "default") { - alert($.i18n.prop('com_zte_ums_ict_framework_ui_fixedsidedefaultheaderError')); //页头不支持固定边栏,先固定页头才能固定边栏. - $('.header-option', panel).val("fixed"); - $('.sidebar-option', panel).val("fixed"); - sidebarOption = 'fixed'; - headerOption = 'fixed'; - } - if (sidebarOption == "fixed" && sidebarPosOption == "right") { - alert($.i18n.prop('com_zte_ums_ict_framework_ui_fixedsiderightpositionError')); //固定边栏情况下,边栏不能靠右。. - $('.sidebar-pos-option', panel).val("left"); - sidebarPosOption = 'left'; - } - dealResetLayout(); // reset layout to default state - if (layoutOption === "boxed") { - $("body").addClass("page-boxed"); - // set header - $('.header > .header-inner').addClass("container"); - var cont = $('body > .clearfix').after('
    '); - // set content - $('.page-container').appendTo('body > .container'); - // set footer - if (footerOption === 'fixed') { - $('.footer').html('
    ' + $('.footer').html() + '
    '); - } else { - $('.footer').appendTo('body > .container'); - } - } - if (lastSelectedLayout != layoutOption) { - runResponsiveHandlers(); - } - lastSelectedLayout = layoutOption; - //header - if (headerOption === 'fixed') { - $("body").addClass("page-header-fixed"); - $(".header").removeClass("navbar-static-top").addClass("navbar-fixed-top"); - } else { - $("body").removeClass("page-header-fixed"); - $(".header").removeClass("navbar-fixed-top").addClass("navbar-static-top"); - } - //sidebar - if ($('body').hasClass('page-full-width') === false) { - if (sidebarOption === 'fixed') { - $("body").addClass("page-sidebar-fixed"); - } else { - $("body").removeClass("page-sidebar-fixed"); - } - } - //footer - if (footerOption === 'fixed') { - $("body").addClass("page-footer-fixed"); - } else { - $("body").removeClass("page-footer-fixed"); - } - //sidebar position - if (openoFrameWork.isRTL()) { - if (sidebarPosOption === 'left') { - $("body").addClass("page-sidebar-reversed"); - $('#frontend-link').tooltip('destroy').tooltip({placement: 'right'}); - } else { - var pcontent = $("[class='page-content']"); - pcontent.css("marginLeft",0);//侧边栏靠右,则左边内容填充为0 - $("body").removeClass("page-sidebar-reversed"); - $('#frontend-link').tooltip('destroy').tooltip({placement: 'left'}); - } - } else { - if (sidebarPosOption === 'right') { - var pcontent = $("[class='page-content']"); - pcontent.css("marginLeft",0);//侧边栏靠右,则左边内容填充为0 - $("body").addClass("page-sidebar-reversed"); - $('#frontend-link').tooltip('destroy').tooltip({placement: 'left'}); - } else { - $("body").removeClass("page-sidebar-reversed"); - $('#frontend-link').tooltip('destroy').tooltip({placement: 'right'}); - } - } - dealSidebarAndContentHeight(); - dealFixedSidebar(); - dealFixedSidebarHoverable(); - dealSiderBarWidthChange(); - setCookie('layout-option', layoutOption); - setCookie('language-option', languageOption); - setCookie('header-option', headerOption); - setCookie('sidebar-option', sidebarOption); - setCookie('sidebar-pos-option', sidebarPosOption); - setCookie('nav-pos-direction', navPosOption); - } - var setCookie = function (key, value) { - if (store) { - store(key, value); - } - } - var getCookie = function (key) { - if (store) { - return store(key); - } else { - return undefined; - } - } - /*下面处理前进后退和锚点访问*/ - var _getLocationHash = function() { - return location.hash.replace("#_", ""); - } - /*统一入口设置锚点*/ - var _setLocationHash = function(menuItemID) { - location.hash = getLocationHashByMenuId(menuItemID); - } - var getLocationHashByMenuId = function(menuItemID){ - return "#_" + menuItemID; - } - // hash control - var loadCurrentHash = function(e,data){ - var locationhash = _getLocationHash(); //important - if(!!locationhash&&locationhash.length>0){ - if(_hashSource.trim()=="dhByInterface"){ - _hashSource=""; - }else{ - processChangedHash(locationhash,data); - } - } - } - // hash control 这种写法安全点 - var processChangedHash = function(path) { - var id = path; - var action = undefined; - var spIndex = path.indexOf("/"); - if(spIndex != -1) { - id = path.substring(0,spIndex); - action = path.substring(spIndex+1); - } - openoFrameWork.goToURLByIDAndNewAction(id,action); - } - var syncColorCSS=function(){//注册皮肤切换事件处理函数,处理iframe中的皮肤切换 - var pagemyIframe=null; - if (cachedIframes.count()>0) { - for (var i in cachedIframes.hash()) { - pagemyIframe=$('.page-content .page-content-body .'+i); - if(pagemyIframe&&pagemyIframe.length>0){ - openoFrameWork.SyncCSS(pagemyIframe[0],1,""); - } - } - } - } - var getCurrentVisibleIframe=function(){ - var pagemyIframe=null; - if (cachedIframes.count()>0) { - for (var i in cachedIframes.hash()) { - if(cachedIframes.items(i)===1){ - pagemyIframe=$('.page-content .page-content-body .'+i); - } - } - } - return pagemyIframe; - } - //处理跨域请求代理,通过该代理进行iframe间传递参数,注意这里的代理页面proxy.html必须部署到要跨域的对端域的服务器web根目录下 - var dealCrossProxy=function(ifrm,crossproxysrc,ifmHeadlins,flag){//crossproxysrc这个是proxy.html对应的url根路径 - var url=$.url(openoFrameWork.getCurrentScript(document)); - var proxyHtmlPath=url.attr("directory")+"proxy/proxy.html"//这中情况适用于使用了该界面集成框架的应用系统 - var _ifmProxy=$(''); - var _ifm=$('#ifm_Proxy'); - _ifm.hide(); - var pageContentBody=$('.page-content .page-content-body'); - var linksrcs=new Array(); - var linksids=new Array(); - var linktyps=new Array(); - var _src=""; - for (i=0;i0){ - _src=ifmHeadlins[i].link.src; - linktyps.push("javascriptfile"); - }else{ - _src=ifmHeadlins[i].link.text; - linktyps.push("javascripttext"); - } - }else{ - linktyps.push("undefined"); - } - linksrcs.push(_src); - linksids.push({"pos":ifmHeadlins[i].pos,"scope":ifmHeadlins[i].scope,"id":ifmHeadlins[i].link.id}); - } - var parm={iFrame:ifrm,cssLinktyps:linktyps,cssLinksrcs:linksrcs,cssLinkids:linksids,origin:crossproxysrc,flag:flag}; - if(_ifm&&_ifm.length<=0){//没有添加过 - _ifmProxy.appendTo(pageContentBody); - _ifmProxy.one('load',parm,function(e){ - var data={iFrame:e.data.iFrame,cssLinktyps:e.data.cssLinktyps,cssLinksrcs:e.data.cssLinksrcs,cssLinkids:e.data.cssLinkids,flag:flag}; - $('#ifm_Proxy')[0].contentWindow.postMessage(data,e.data.origin);//window.location.origin - }); - }else if(_ifm.attr("oldproxyorigin")!=crossproxysrc){//代理已经添加过了,看是否是同一个网站的代理,如果不是需要重新加载 - _ifm.attr("src",""); - _ifm.attr("oldproxyorigin",crossproxysrc); - _ifm.one('load',parm,function(e){ - var data={iFrame:e.data.iFrame,cssLinktyps:e.data.cssLinktyps,cssLinksrcs:e.data.cssLinksrcs,cssLinkids:e.data.cssLinkids,flag:flag}; - $('#ifm_Proxy')[0].contentWindow.postMessage(data,e.data.origin);//window.location.origin - }); - _ifm.attr("src",_ifmProxy.attr("src")); - }else{//已经添加过,直接触发消息发送即可 - var data={iFrame:parm.iFrame,cssLinktyps:parm.cssLinktyps,cssLinksrcs:parm.cssLinksrcs,cssLinkids:parm.cssLinkids,flag:flag}; - _ifm[0].contentWindow.postMessage(data,parm.origin);//window.location.origin - } - } - return { - init: function () { - if(zte_http_headers){ - store("zte_http_headers",zte_http_headers); - } - dealInit(); - dealResponsiveOnResize(); - dealResponsiveOnInit(); - dealClearCachedIframes(true); ////清理当前正在显示的iframe之外缓存的iframe, - breadcrumbBtnMenus.clear(); - dealFixedSidebar(); // deals fixed sidebar menu - dealFixedSidebarHoverable(); // deals fixed sidebar on hover effect - dealSidebarMenu(); // deals main menu - dealHorizontalMenu(); // deals horizontal menu - dealSidebarToggler(); // deals sidebar hide/show - dealTheme(); // deals style customer tool - dealSetLayout(); - $(function() { - $(window).on('hashchange',function(){ - loadCurrentHash(); - }); - }); - dealFullScreenMode(); // deals full screen - $("#header_dropdown_user").css('display','block'); - $("#com_zte_ums_ict_framework_img_netnumenLogo").css('display','inline'); - $("#com_zte_ums_ict_framework_ui_main_title").css('display','inline'); - handeCtxMenuitem(); - }, - //公开清理缓存的所有Iframe的方法:isALL==true则清理所有,否则清理当前正在显示的iframe之外缓存的iframe,。 - clearCachedIframes:function(isAll){ - dealClearCachedIframes(isAll); - }, - - setBaseURLRoot:function(ipportStr){//菜单url的跟ip和端口例如:http://10.74.151.122:21180 - if (store) { - store('baseURLRoot', ipportStr); - } - var url = $.url(ipportStr); - location.hash=url.attr('fragment'); - var auth=url.attr('query'); - if (store) { - store('baseURLRootAuth', auth); - } - }, - getBaseURLRoot:function(ipportStr){//菜单url的跟ip和端口例如:http://10.74.151.122:21180 - var rooturl=""; - if (store) { - rooturl=store('baseURLRoot'); - } - return !rooturl?"":rooturl; - }, - clearBaseURLRoot:function(){//菜单url的跟ip和端口例如:http://10.74.151.122:21180 - if (store) { - store('baseURLRoot', "",-1); - } - }, - setPageTitle:function(title){//设置页面标题 - $('title').html(title+" - "+gdocTitle); - }, - getLanguage:function(){//获取语言 - return openoFrameWork_conf.acceptLanguage; - }, - - getLocationHash:function(){ - return _getLocationHash(); - }, - setSceneURLRootPath:function(sceneURLRootPath){ - if(sceneURLRootPath&&sceneURLRootPath.trim().length>0){//如果定义了场景的全局参数 - _sceneURLRootPath=sceneURLRootPath.trim(); - if(_sceneURLRootPath.charAt(_sceneURLRootPath.length-1)!='/') - { - _sceneURLRootPath=_sceneURLRootPath+'/'; - } - } - }, - //public function to add callback a function which will be called on window resize - addResponsiveHandler: function (func) { - responsiveHandlers.push(func); - }, - - hiddenAlarmLight:function(){ - hideAlarmLight(); - }, - - hiddenMenu:function(){ - hidemenu(); - }, - setBreadcrumbByMenuID:function(id){ - //var breaditem=$('#'+id); - var menuitem=undefined; - // var items=$("a[id='"+id+"']"); - var items = undefined; - var panel = $('.zte-theme-panel'); - var navPosOption = $('.nav-pos-direction', panel).val(); - if (navPosOption === "vertical"){ //从垂直菜单里面找 - items=$("#page-sidebar-menu a[id='"+id+"']"); - if (!items || items.length < 1) { - items=$(".page-content a[id='"+id+"']"); - } - }else if(navPosOption === openoFrameWork_menu_horizontal){//从水平菜单里面找 - items=$("#main_hormenu a[id='"+id+"']"); - if(items.length == 0){ - //横菜单没有找到,再在横菜单的子菜单找一次 - items=$("#page-megachild-sidebar-menu a[id='"+id+"']"); - } - }else if(navPosOption === openoFrameWork_menu_fmenu){ - items=$("#f_hormenu a[id='"+id+"']"); - if(items.length == 0){ - //横菜单没有找到,再在竖菜单找一次。 - items=$("#page-f-sidebar-menu a[id='"+id+"']"); - } - } - var isbreadcrumbMenuItem=false; - if(items.length>0){ - for(var i=0;i0){ - if(isbreadcrumbMenuItem){ - dealBreadcrumbBtnGroupMenus(menuitem,false); - }else{ - dealBreadcrumb(menuitem,true,null); - } - }else{ - var breadcrumbBtnMenuItemParent=""; - if(!menuitem||menuitem.length<=0){//没有找到该菜单,可能是面包削中的,需要额外处理 - var menuItemID=id; - if (breadcrumbBtnMenus.contains(menuItemID)) {//有缓存 - breadcrumbBtnMenuItemParent="#"+breadcrumbBtnMenus.items(menuItemID); - menuitem=$(breadcrumbBtnMenuItemParent); - //_breadcrumbSource=true; - } - } - var parm=undefined; - if(breadcrumbBtnMenuItemParent&&breadcrumbBtnMenuItemParent.length>0){ - parm={breadcrumbBtnMenuItem:menuItemID}; - } - if(parm&&menuitem&&menuitem.length>0) { - dealBreadcrumb(menuitem,true,parm); - } - } - }, - setSiderbarCollapseWidth:function(width){ - _sidebarCollapsedWidth = width; - }, - getSiderbarCollapseWidth:function(){ - return _sidebarCollapsedWidth; - }, - setSidebarWidth:function(width){ - _sidebarWidth = width; - }, - getSidebarWidth:function(){ - return _sidebarWidth; - }, - //2015年10月26日新增动态切换菜单的功能,这里的菜单还需要再次更换菜单项访问的ip端口信息 - handlBaseURL:function(url){ - var baseURLRoot=openoFrameWork.getBaseURLRoot(); - if (baseURLRoot.length>0) {//2015年10月26日新增动态切换菜单的功能,这里的菜单还需要再次更换菜单项访问的ip端口信息 - baseURLRoot=openoFrameWork.getDomainURL(baseURLRoot);//去掉ip和port后多余的部分 - console.log("old a link href url:"+url); - url=baseURLRoot+url.replace(openoFrameWork.getDomainURL(url),""); - console.log("baseURLRoot:"+baseURLRoot+" newURL:"+url); - }; - return url; - }, - - startPageLoading: function(message) { - dealstartPageLoading(message); - }, - stopPageLoading: function() { - dealstopPageLoading(); - }, - //public function to get a paremeter by name from URL - getLocationURLParameter: function (paramName,separator) { - var searchString = decodeURIComponent(window.location.search.substring(1)).toLowerCase(), - i, val, params = searchString.split(separator?separator:"&"); - paramName=paramName.toLowerCase(); - for (i = 0; i < params.length; i++) { - val = params[i].split("="); - if (val[0] == paramName) { - return unescape(val[1]); - } - } - return null; - }, - //public function to get a paremeter by name from URL - getURLParameter: function (paramName,url) { - var searchString = decodeURIComponent(url).toLowerCase(), - i, val, params = searchString.split("&"); - paramName=paramName.toLowerCase(); - for (i = 0; i < params.length; i++) { - val = params[i].split("="); - if (val[0] == paramName) { - return unescape(val[1]); - } - } - return null; - }, - // check for device touch support - isTouchDevice: function () { - return isTouch; - }, - getUniqueID: function(prefix) { - return prefix+'_' + Math.floor(Math.random() * (new Date()).getTime()); - }, - // check IE8 mode - isIE8: function () { - return isIE8; - }, - // check IE9 mode - isIE9: function () { - return isIE9; - }, - //check RTL mode - isRTL: function () { - return isRTL; - }, - getViewPort:function(){ - return _getViewPort(); - }, - // get layout color code by color name - getLayoutColorCode: function (name) { - if (layoutColorCodes[name]) { - return layoutColorCodes[name]; - } else { - return ''; - } - } , - fixContentHeight: function () { - dealSidebarAndContentHeight(); - }, - dealAtoIframe:function(aObj,event){ - var containerStr=aObj.parentsUntil('.page-container').hasClass('page-sidebar')?'page-sidebar':"";// - containerStr=aObj.parentsUntil('.header-inner').hasClass('hor-menu')?'header':containerStr; - dealMenuItemClick(aObj,event,containerStr); - _isClicked=false; - }, - getDomainURL:function(urlAddress){ - var url = $.url(urlAddress); - var protocol=url.attr('protocol'); - var host=url.attr('host'); - var port=url.attr('port'); - var crossOrign=protocol+"://"+host+(port.length>0?":"+port:""); - return crossOrign; - }, - getCurrentScript:function(doc) {//doc为 document对象 - /* 注意该功能在其他脚本中调用时出safari获取到的脚本路径为本方法所在脚本的路径, - 其他浏览器获取到的为调用该方法的脚本所在路径 - 取得正在解析的script节点 - */ - if(doc&&doc.currentScript) { //firefox 4+ - console.log("0、 "+doc.currentScript.src); - return doc.currentScript.src; - } - // 参考 https://github.com/samyk/jiagra/blob/master/jiagra.js - var stack; - try { - a.b.c(); //强制报错,以便捕获e.stack - } catch(e) {//safari的错误对象只有line,sourceId 或者高版本还有sourceURL - stack = e.stack; - if(e.sourceURL){//safari 浏览器没有e.stack但有e.sourceURL - stack=e.sourceURL; - }else if(!stack && window.opera){ - //opera 9没有e.stack,但有e.Backtrace,但不能直接取得,需要对e对象转字符串进行抽取 - stack = (String(e).match(/of linked script \S+/g) || []).join(" "); - } - console.log("1、 "+stack); - } - if(stack) { - /*e.stack最后一行在所有支持的浏览器大致如下: - *chrome23: - * at http://113.93.50.63/data.js:4:1 - *firefox17: - *@http://113.93.50.63/query.js:4 - *opera12: - *@http://113.93.50.63/data.js:4 - *IE10: - * at Global code (http://113.93.50.63/data.js:4:1) - */ - console.log("2、 "+stack); - stack = stack.split( /[@ ]/g).pop();//取得最后一行,最后一个空格或@之后的部分 - stack = stack[0] == "(" ? stack.slice(1,-1) : stack; - console.log("3、 "+stack); - return stack.replace(/(:\d+)?:\d+$/i, "");//去掉行号与或许存在的出错字符起始位置 - } - if(doc){ - var nodes = doc.getElementsByTagName("script"); //只在head标签中寻找 - for(var i = 0, node; node = nodes[i++];) { - if(node.readyState === "interactive") { - console.log("4、 "+(node.className = node.src)); - return node.className = node.src; - } - } - } - }, - /*下面的flag为0表示默认不触发孙子iframe中的onload事件,为1表示要触发,flag为10则对cssSrc重复执行,其他不做重复执行*/ - SyncCSS:function(ifrm,flag,cssSrc){//将主框架中的皮肤css应用到打开的iframe页面中 - if(!ifrm)return; - var ifmHeadlins = new Array(); - if(cssSrc&&cssSrc.length>0&&cssSrc.endWith(".css")){ - var _div = $(''); - var csslink=document.createElement("link"); - csslink.href=_div[0].href;//这里同步菜单定义中cssSrc属性指定的css文件到iframe - _div = null; - csslink.rel="stylesheet"; - csslink.type="text/css"; - csslink.id="ifram_csssrc"; - ifmHeadlins.push({"pos":"head","scope":"all","link":csslink});//pos是添加到子iframe中的位置,scope是子窗体作用返回,one表示直接子窗体,all表示嵌套所有子窗体 - } - if(flag!=10){//当flag为10时下面的css和js都不执行 - if($('#style_color').length>0){ - var csslink=document.createElement("link"); - csslink.href=$('#style_color')[0].href.replace(".css","_ifrm.css");//这里同步的皮肤页面修改为原皮肤页面文件名后缀添加ifrm的css皮肤文件 - csslink.rel="stylesheet"; - csslink.type="text/css"; - csslink.id="style_color"; - ifmHeadlins.push({"pos":"head","scope":"all","link":csslink});//pos是添加到子iframe中的位置,scope是子窗体作用返回,one表示直接子窗体,all表示嵌套所有子窗体 - } - // 将 font-awesome字体图标应用到模块iframe - if($('#font_awesome').length>0){ - var awesomelink=document.createElement("link"); - awesomelink.href=$('#font_awesome')[0].href; - awesomelink.rel="stylesheet"; - awesomelink.type="text/css"; - awesomelink.id="font_awesome"; - ifmHeadlins.push({"pos":"head","scope":"all","link":awesomelink}); - } - // 将pym.js or pym.min.js应用到模块iframe - var pymjsObj=$("script[src*='/pym.']");//模糊查找 - pymjsObj=pymjsObj.length>0?pymjsObj:$("script[src*='/pym1.']"); - if(pymjsObj.length>0){ - var pymjs=document.createElement("script"); - pymjs.src=pymjsObj[0].src; - pymjs.type="text/javascript"; - pymjs.id=!!pymjsObj[0].id?pymjsObj[0].id:"pymjs"; - ifmHeadlins.push({"pos":"head","scope":"one","link":pymjs}); - pymjs=document.createElement("script"); //pym脚本文件加载后要执行new pym.Child()进行iframe子窗体实例化,便于子窗体和父窗体通讯new pym.Child({ id: '"+_iframe+"' ,polling: 1000}) - var frameid=(_iframe.split('-').length>0?_iframe.split('-')[1]:"1"); - pymjs.text="var t1;function pmchd(){console.log('In the frame "+_iframe+",pym code call is begining; '+(typeof pym!= 'undefined'));if(typeof pym != 'undefined'){pymChild"+frameid+" = new pym.Child({ id: 'pdiv_"+_iframe+"' ,polling: 500});window.clearInterval(t1); }};t1 = window.setInterval(pmchd,5);"; - pymjs.type="text/javascript"; - pymjs.id="pymChild"; - ifmHeadlins.push({"pos":"htmlend","scope":"one","link":pymjs}); - } - // 将hk.js or hk.min.js应用到模块iframe - var hkjsObj=$("script[src*='/hk.']");//模糊查找 - hkjsObj=hkjsObj.length>0?hkjsObj:$("script[src*='/hk1.']"); - if(hkjsObj.length>0){ - var hkjs=document.createElement("script"); - hkjs.src=hkjsObj[0].src; - hkjs.type="text/javascript"; - hkjs.id=!!hkjsObj[0].id?hkjsObj[0].id:"hkjs"; - ifmHeadlins.push({"pos":"head","scope":"one","link":hkjs}); - hkjs=document.createElement("script"); ////hk.js 加载后拦截ajax请求进行转发 - } - } - var crossOrign=openoFrameWork.getDomainURL(ifrm.src); - if( window.location.origin==crossOrign){ //第一层同域处理 - for (i=0;i0){ - var ifmHeadlins2 = new Array(); - for (i=0;i0){ - console.log('跨域访问: 系统将进入跨域访问代理处理流程 '); - dealCrossProxy(childifrms[j].name,childOrign,ifmHeadlins2,flag); - } - } - } - } - }else{ - if(ifmHeadlins.length>0){ - console.log('跨域访问: 系统将进入跨域访问代理处理流程 '); - dealCrossProxy(ifrm.name,crossOrign,ifmHeadlins,flag); - } - } - }, - goToURL:function(url){ - dhByBreadcrumb = true;//全局变量,声明此次事件是由点击面包屑发起的 - var showNav=openoFrameWork.getLocationURLParameter('showNav'); - if(showNav=="false"){//如果不显示菜单,就强制刷新本页 - location.reload(); - }else{ - url="a[name='"+url+"']"; - $(url).click(); - } - }, - goToURLByName:function(name){ - var showNav=openoFrameWork.getLocationURLParameter('showNav'); - if(showNav=="false"){//如果不显示菜单,就强制刷新本页 - location.reload(); - }else{ - url="a[name='"+name+"']"; - $(url).click(); - } - }, - goToURLByID:function(id){ - if(!id){ - return; - } - var showNav=openoFrameWork.getLocationURLParameter('showNav'); - if(showNav=="false"){//如果不显示菜单,就强制刷新本页 - location.reload(); - }else{ - if(id.indexOf("#")<0){ - id="#"+id; - } - $(id).click(); - } - }, - goToPortal:function(id){ - var _url=top.location.href; - console.log(_url); - //_url="/ngict/iui/framework/"; - var url=$.url(_url); - top.location=url.attr("directory")+"uifportal.html#"+id+"/"; - }, - //Category - goToURLByIDAndNewIPPort:function(id,newIPPort,newActionStr){ - //先把NewIPPort对象:newIPPort={menuCategoryID:'vim',ipPortStr:'htpp://10.74.151.123:31180',newTitle:''}缓存到Category数组中, - //menuCategoryID属性是更多菜单上配置的菜单的分类id,; - //ipPortStr属性是该id的菜单要替换的新的ip和端口地址字符串,包括协议部分,比如http://10.74.151.64:21169 - //newTitle属性用于放置新开ip的页面对应到面包屑上的名字,可以为“”,空标识不关注 - _menuCategorys.replace(newIPPort.menuCategoryID,{ipPort:newIPPort.ipPortStr,ipTitle:newIPPort.newTitle});//把当前面包削中的菜单id和该子菜单对应的父菜单关联缓存起来 - if (store) { - store('menuCategoryID', newIPPort.menuCategoryID+"[menuCategoryID]"+newIPPort.ipPortStr+"[menuCategoryID]"+(!!newIPPort.newTitle?newIPPort.newTitle:"")); - } - //这里增加按照newIPPort.menuCategoryID分类加载more菜单的处理逻辑 - //首先根据id找到对应的主菜单菜单项 - var menuitem = this.findMenuItemByMenuId(id); - if(!menuitem||menuitem.length<=0){//主菜单中没有找到,就找more菜单,找到id对应的more菜单项所属的主菜单项 - var mainMenuId = this.getMenuItemId_From_MoreMenuRelation(id); - if( !!mainMenuId&&mainMenuId.length>0 ){//more菜单中找到了id对应的主菜单项id,根据id返回主菜单项 - menuitem = this.findMenuItemByMenuId(mainMenuId); - if(!!menuitem&&menuitem.length>0){ - var more=$("#"+id,$('#pageableDiv')).parent(); - $(".box.boxOperation", $(".carousel-inner")).removeClass("moreButtonSelected"); - more=$('a>div.box',more); - if (more.hasClass('moreButtonSelected') == false){ - more.addClass('moreButtonSelected'); - } - var pagesTags=$('.item.moreButtonsTag'); - if(pagesTags.length>0){ - for(var i=0;i0){ - tags.addClass('active'); - } - } - } - } - } - } - //其次找到的菜单项中newIPPort.menuCategoryID对应的src覆盖breadcrumgroupbuttonsrc属性值, - if(!!menuitem&&menuitem.length>0){ - var mulsrc=menuitem.attr(newIPPort.menuCategoryID+"-multiInsrc"); - if(!!mulsrc){ - menuitem.attr("breadcrumgroupbuttonsrc" ,mulsrc); - getBreadcrumbRightButtons(mulsrc,true); - } - } - if (waittime) { - clearInterval(waittime); - } - waittime = setInterval(function () { - if(moreMenusisLoaded==true){ - clearInterval(waittime); - openoFrameWork.goToURLByIDAndNewAction(id,newActionStr,null); - } - }, 10); - }, - goToURLByIDAndNewAction:function(id,newActionStr,newBrowserPageOption){ - if(!id){ - return; - } - - /*if(id.indexOf("#")<0){ - id="#"+id; - }*/ - var menuitem = this.findMenuItemByMenuId(id); - //处理新开页面情况 - if(newBrowserPageOption){ - var href = ICTFRAME_CONST_DEFAULTPAGE_PATH; - var hash = getLocationHashByMenuId(id); - var newin=window.open(href + newBrowserPageOption.paramStr + hash,newBrowserPageOption.windowTitle); - newin.name=newActionStr;//注意这种传递参数的方法,被打开的页面中需要通过top.name中获取该传递的参数。 - return; - } - //$(window).off('hashchange', loadCurrentHash); - var menuItemID=menuitem?menuitem.attr("id"):""; - if(!!menuItemID&&menuItemID.length>0){ - //menuItemID="#" + menuItemID; - //menuItemID=!!newActionStr?menuItemID:menuItemID+"/no"; - _setLocationHash(menuItemID); - } - var breadcrumbBtnMenuItemParent=""; - if(!menuitem||menuitem.length<=0){//没有找到该菜单,可能是面包削中的,需要额外处理 - menuItemID=id; - if (breadcrumbBtnMenus.contains(menuItemID)) {//有缓存 - breadcrumbBtnMenuItemParent=breadcrumbBtnMenus.items(menuItemID); - menuitem=this.findMenuItemByMenuId(breadcrumbBtnMenuItemParent); - //_breadcrumbSource=true; - } - // else{//在新增的可翻页的更多菜单里面找 - // var pageDiv = $('#pageableDiv'); - // menuitem=$('#' + menuItemID , pageDiv); - // } - if( menuitem && menuitem.length > 0){ - isMoreMenuItemClick = true; - } - } - if(!menuitem||menuitem.length<=0){ - //面包屑和主菜单都没有找到,情况可能是:更多菜单点击打开后,刷新,hash已经更改,但是对应的更多菜单的html没有加载,需要找到更多菜单和主菜单的对应关系 - var mainMenuId = this.getMenuItemId_From_MoreMenuRelation( id ); - if( mainMenuId ){ - menuitem = this.findMenuItemByMenuId(mainMenuId); - } - - } - if (store&&store("globleCurrentBreadcrumb")){ - globleCurrentBreadcrumb=store("globleCurrentBreadcrumb"); - //下面处理下刷新整个页面后从cookie中获取来的最后一次操作的面包屑对应的对应菜单的name属性回写,便于面包屑事件响应能够找到对应的菜单 - var al=$("a",$("
    "+globleCurrentBreadcrumb+"
    ")); - var alink,gal; - for(i=0;i0){ - var panel = $('.zte-theme-panel'); - var navPosOption = $('.nav-pos-direction', panel).val(); - if(navPosOption === openoFrameWork_menu_fmenu){ - var hparentid=menuitem.attr("hparentid"); - var id=menuitem.attr("id"); - var i=0,menuItemH=menuitem; - while (id!=hparentid&&i<20){ - menuItemH=openoFrameWork.findMenuItemByMenuId(hparentid); - hparentid=menuItemH.attr("hparentid"); - id=menuItemH.attr("id"); - i++; - }; - if(!menuItemH.hasClass('active')) - menuItemH.parent().addClass("active"); - } - }else{ - console.log("goToURLByIDAndNewAction():Can't find the menuitem.The menu ID is:"+id+".Please check if the ID or ID cache is correct."); - } - //try{ - var parm=undefined; - if(!!newActionStr&&breadcrumbBtnMenuItemParent&&breadcrumbBtnMenuItemParent.length>0){ - parm={action:newActionStr,breadcrumbBtnMenuItem:menuItemID}; - }else if(!!newActionStr){ - parm={action:newActionStr}; - }else if(breadcrumbBtnMenuItemParent&&breadcrumbBtnMenuItemParent.length>0){ - parm={breadcrumbBtnMenuItem:menuItemID}; - }else if(mainMenuId){ - isMoreMenuItemClick = true; - parm={breadcrumbBtnMenuItem:menuItemID}; - } - //if(breadChangeType){ - // if(!parm){ - // parm = {}; - // } - // parm.breadChangeType = breadChangeType; - //} - if(parm&&parm.action || parm&&parm.breadChangeType) { - _hashSource="dhByInterface"; - } - - if(menuitem&&menuitem.length>0){ - menuitem.one('click',parm,function(e){ //临时一次性的注册一次click事件处理函数,执行完毕会自动删除 - openoFrameWork.dealAtoIframe($(this),e); - //$(window).one('hashchange', loadCurrentHash); - return false; - }); - menuitem.click();//后执行 - } - /*}catch(e){} - finally{ - //$(window).on('hashchange', loadCurrentHash); - }*/ - }, - - getBreadcrumbEle:function(){ - return $('.breadcrumbUl')[0]; - }, - - - findMenuItemByMenuId:function( id ){ - var menuitem=undefined; - var panel = $('.zte-theme-panel'); - var navPosOption = $('.nav-pos-direction', panel).val(); - - var items = undefined; - if (navPosOption === "vertical"){ //从垂直菜单里面找 - items=$("#page-sidebar-menu a[id='"+id+"']"); - }else if(navPosOption === openoFrameWork_menu_horizontal){//从水平菜单里面找 - items=$("#main_hormenu a[id='"+id+"']"); - if(items.length == 0){ - //横菜单没有找到,再在横菜单的子菜单找一次 - items=$("#page-megachild-sidebar-menu a[id='"+id+"']"); - } - }else if(navPosOption === openoFrameWork_menu_fmenu){ - items=$("#f_hormenu a[id='"+id+"']"); - if(items.length == 0){ - //横菜单没有找到,再在竖菜单找一次。 - items=$("#page-f-sidebar-menu a[id='"+id+"']"); - - } - - } - if( items&&items.length == 0 ){ - console.log( 'fmenu alink length is :' + $("#page-f-sidebar-menu a").length ); - console.log( 'cant find menu in sidemenu、megamenu and fmenu , the menu id is ' + id ); - } - if(items&&items.length>0){ - for(var i=0;i0){ - for(var i=0;i 0) { - parm = { - breadcrumbBtnMenuItem : menuItemID - }; - } - if (menuitem && menuitem.length > 0) { - menuitem.one('click', parm, function (e) { //临时一次性的注册一次click事件处理函数,执行完毕会自动删除 - var containerStr = $(this).parentsUntil('.page-container').hasClass('page-sidebar') ? 'page-sidebar' : ""; // - containerStr = $(this).parentsUntil('.header-inner').hasClass('hor-menu') ? 'header' : containerStr; - _isClicked = false; - dealMenuItemGetFocus($(this),e,containerStr); - return false; - }); - menuitem.click(); //后执行 - } - }, - // 处理面包削中的按钮菜单增加的导航连接,显示在iframe中 - openbreadcrumbLink:function(aObject,e) { - var url = aObject.attr("href"); - if(!url||url.length<2) - return; - e.preventDefault(); - dealScrollTo(); - var menuItemID=aObject.attr("id"); - if(!!menuItemID&&menuItemID.length>0){ - _setLocationHash(menuItemID); - _hashSource="dhByInterface"; - } - dealstartPageLoading(); - dealIframe(aObject,e); - }, - getURLParam:function(name){ - var reg = new RegExp("(^|&)" + name.toLowerCase() + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象 - var search =decodeURIComponent(location.search.substring(1)).toLowerCase(); - var r =search.match(reg); //匹配目标参数 - if (r != null) return unescape(r[2]); - return null; //返回参数值 - } - }; -}(); - -//抽取html片段中任意位置的script标签(包括代码是内嵌的情况)逐个运行(不会在单个script加载不到的时候停下来) -function runHtmlScripts(s) { - var div = document.createElement('div'); - div.innerHTML = s; - var scripts = div.getElementsByTagName('script'); - - var currentRunningScriptSrcPath = {}; - $(scripts).each(function() { - var src = this.src; - src = openoFrameWork.handlBaseURL(src); - if (src) { - currentRunningScriptSrcPath[src.substring(src.lastIndexOf("/") + 1)] = src.substring(0, src.lastIndexOf("/") + 1); - $.getScript(src); - } else { - $.globalEval(this.text || this.textContent || this.innerHTML || ''); - } - }); -}; - -function stripHtmlScripts(htmlContent) { - var divContent = document.createElement('div'); - divContent.innerHTML = htmlContent; - var scripts = divContent.getElementsByTagName('script'); - - $(scripts).each(function() { - this.src = openoFrameWork.handlBaseURL(this.src); - this.parentNode.removeChild(this); - }); - return divContent.innerHTML; -}; - -function getsiderBarMenu(url){ - if (url.length<2){ - return; - } - url=openoFrameWork.handlBaseURL(url); - openoFrameWork.startPageLoading();//菜单加载中请稍候.... - var pagesidebar=$('#page-sidebar-menu'); - pagesidebar.empty(); - pagesidebar.append(""); - $.ajax({ - type: "GET", - cache: false, - url: url, - dataType: "html", - success: function (res) { - //去除script标签以后添加到主框架以防止append方法因为加载script标签失败导致后面的代码无法运行 - //res = stripHtmlScripts(res); - var resScriptsSriped = stripHtmlScripts(res); - pagesidebar.append(resScriptsSriped); - runHtmlScripts(res); - - siderBarMenuAuthentication(); - dealMysqlBackupMenu(); - //loadi18n_WebFramework_sideMenu(); - setTimeout(function () { - openoFrameWork.stopPageLoading(); - goToHomePage(); - }, 1000); - }, - error: function (xhr, ajaxOptions, thrownError) { - //$('#page-sidebar-menu').append('');//加载系统菜单失败!;//加载系统菜单失败! - } - }); -}; -var setLayoutValueByCookie = function () { - var panel = $('.zte-theme-panel'); - if (store('layout-option') != undefined) { - $('.layout-option', panel).val(store('layout-option')); - } - if (store('language-option') != undefined) { - $('.language-option', panel).val(store('language-option')); - } - if (store('sidebar-option') != undefined) { - $('.sidebar-option', panel).val(store('sidebar-option')); - } - if (store('header-option') != undefined) { - $('.header-option', panel).val(store('header-option')); - } - if (store('sidebar-pos-option') != undefined) { - $('.sidebar-pos-option', panel).val(store('sidebar-pos-option')); - } - var horMenuLoadTip = $("[class='nav-load-error']", $(".hormenu")); - var sideMenuLoadTip = $("[class='nav-load-error']", $("[class='page-sidebar-menu']")); - // 横竖菜单都无错误提示,都正确加载 - // if ((!horMenuLoadTip || horMenuLoadTip.length <= 0) && (!sideMenuLoadTip || sideMenuLoadTip.length <= 0)) { - // if (store('nav-pos-direction') != undefined) { - // var navPosOption = store('nav-pos-direction'); - // $('.nav-pos-direction', panel).val(navPosOption); - // } else { - $('.nav-pos-direction', panel).val('fmenu'); - // $.ajax({ - // "dataType" : 'json', - // "type" : "GET", - // "async" : false, - // url : FrameConst.REST_GET_FRAME_MENUDIRECTION + "&tmpstamp=" + new Date().getTime(), - // "success" : function (obj) { - // if (obj.value && (obj.value != "")) { - // $('.nav-pos-direction', panel).val(obj.value); - // } - // } - // }); - //} - // } else { - // $('.nav-pos-direction', panel).attr("disabled", true); - // } -}; - - -function iniFMenu() { - var fsidemenu = $('#' + fMenuSiderDivId); - - if (fsidemenu) { - openoFrameWork.startPageLoading(); - - var menuContent = initLeftMenu(); - fsidemenu.empty(); - fsidemenu.append(""); - fsidemenu.append(menuContent); - loadi18n_WebFramework('web-framework-menu-i18n', 'i18n/', 'openo_frame_left_menu_i18n'); - - openoFrameWork.stopPageLoading(); - } -}; - -function goToHomePage(){ - locationhash = openoFrameWork.getLocationHash(); - if(!!locationhash&&locationhash.length>0){//有锚点,直接触发 - var newIPPort=null; - if (store&&store('menuCategoryID')) { - var s=store('menuCategoryID').split('[menuCategoryID]'); - if(s.length>2){ - newIPPort={menuCategoryID:s[0],ipPortStr:s[1],newTitle:s[2]}; - } - } - if(!!newIPPort){ - openoFrameWork.goToURLByIDAndNewIPPort(locationhash,newIPPort,null); - }else{ - openoFrameWork.goToURLByIDAndNewAction(locationhash,null,null); - } - }else{//否则还是模拟点击配置了start类的菜单 - var containerStr = ""; - //var sidermenu = $("[class='page-sidebar-menu']", $("[class='page-sidebar navbar-collapse collapse']")); - var sidermenu = $("#page-sidebar-menu"); - var hormenu = $("#main_hormenu"); - var fhormenu = $('#' + fMenuMegaDivId); - var fhormenusider = $('#page-f-sidebar-menu'); - var startmenu = null; - var navPosOption = $('.nav-pos-direction', panel).val(); - // 侧边栏显示,根据侧边栏CSS选择 - if (navPosOption === "vertical") { - //containerStr=$('.page-sidebar').length>0?'.page-sidebar':""; - startmenu = $('.iframe.start' , sidermenu); - dealStartMenu( startmenu, sidermenu ); - } - // 水平菜单显示,根据水平菜单CSS选择 - else if (navPosOption === "horizontal") { - //containerStr=$('.hor-menu').length>0?'.header':containerStr; - startmenu = $('.iframe.start' , hormenu); - dealStartMenu( startmenu, hormenu ); - - } - //F菜单的恒菜单显示 - else if (navPosOption === openoFrameWork_menu_fmenu) { - //containerStr=$('.hor-menu').length>0?'.header':containerStr; - startmenu = $('.iframe.start' ,fhormenu); - if (startmenu && startmenu.length < 1) { - startmenu = $('.iframe.start' ,fhormenusider); - } - dealStartMenu( startmenu, fhormenu,fhormenusider ); - } - } -}; -var dealStartMenu = function(startmenu , menuContainer,menuContainer2 ){ - var timer =setInterval(function () { - if(startmenu&&startmenu.length>0){ - startmenu.click(); - clearInterval(timer); - }else{ - console.log('the start menu click event is not be triggerd ,so do it repeat!!'); - $('a[operation]', menuContainer).each(function () { - startmenu = $(this); - return false; - }); - if (menuContainer2&&startmenu && startmenu.length < 1) { - $('a[operation]', menuContainer2).each(function () { - startmenu = $(this); - return false; - }); - } - } - }, 100); - handeCtxMenuitem(); - } -// 屏蔽横竖菜单项的右键功能 -function handeCtxMenuitem() { - $(".page-sidebar ul li a").each(function() { - if ($(this).attr("href") && $(this).attr("href") != "javascript:;" && $(this).attr("href") != "#") { - $(this).attr("oncontextmenu", "return false"); - } - }); - $(".hormenu li a").each(function() { - if ($(this).attr("href") && $(this).attr("href") != "javascript:;" && $(this).attr("href") != "#") { - $(this).attr("oncontextmenu", "return false"); - } - }); -} -function initBaseInfo(){ - $("#logout_label").text($.i18n.prop('com_zte_ums_ict_framework_ui_group_logout')); - $("#fullscreen_label").text($.i18n.prop('com_zte_ums_ict_framework_ui_group_fullscreen')); - $("#changePwd_label").text($.i18n.prop('com_zte_ums_ict_framework_ui_changePwd')); - $("#com_zte_ums_ict_framework_moudle_about").text($.i18n.prop('com_zte_ums_ict_framework_moudle_about')); - $("#com_zte_ums_ict_framework_moudle_help").text($.i18n.prop('com_zte_ums_ict_framework_moudle_help')); - $("#zte_menu-toggler").attr("title",$.i18n.prop('com_zte_ums_ict_framework_moudle_menutoggler')); -}; -window.closeModal = function(modalid) { - if(!modalid){ - return; - } - if(modalid.indexOf("#")<0){ - modalid="#"+modalid; - } - $(modalid).modal('hide'); -}; -function getLcsRight(lcsoperations) { - var lcsrights = new Array(); - if (lcsoperations && (lcsoperations.length > 0)) { - // 请求后台license value - //----test data---- - // var testjson = '{"data":[{"id":"mylcs","name":"xxx","value":"false"}]}'; - // var testopt = eval('(' + testjson + ')'); - // var testarray = testopt.data; - //-----end test data--- - var keys = { - "keys" : lcsoperations - }; - var jsonvalues = JSON.stringify(keys); - var data = { - "data" : jsonvalues - }; - var url=FrameConst.REST_GETLICENSEINFO + "?tmpstamp=" + new Date().getTime(); - url=openoFrameWork.handlBaseURL(url); - $.ajax({ - "dataType" : 'json', - "type" : "GET", - "async" : false, - "url" : url, - "data" : data, - //"contentType" : 'application/json; charset=utf-8', - "success" : function (response) { - if (response) { - lcsrights = response.data; - } - }, - "error" : function (XMLHttpRequest, textStatus, errorThrown) { - lcsrights = null; - } - }); - return lcsrights; - } - return lcsrights; -} -// 侧边栏菜单鉴权 -function siderBarMenuAuthentication() { - // license 鉴权 - var menuids = new Array(); - var lcsoperations = new Array(); - //从页面DOM取得菜单license项。 - $('a[licenseid]', $('.page-sidebar-menu')).each(function () { - var licenseid = $(this).attr("licenseid"); - if (licenseid) { - lcsoperations.push(licenseid); - var id = $(this).attr("id"); - menuids.push(id); - } - }); - var lcsrights = getLcsRight(lcsoperations);// 取得license数据。 - if (lcsrights && (lcsrights.length == menuids.length)) { - // 根据后台license值判断所在菜单项是否显示 - for (var i = 0; i < menuids.length; i++) { - var id = menuids[i]; - var lcskey = lcsoperations[i]; - var lcsitem = lcsrights[i]; - // 菜单项如果配了licenseid, 并且不是true字符串, 则移除菜单项 - if (lcsitem.value != "True") { - $('#'+id, $('.page-sidebar-menu')).parent().remove(); - } - } - } - var operations = new Array(); - $('a[operation]', $('.page-sidebar-menu')).each(function () { - var operation = $(this).attr("operation"); - if (operation) { - operations.push(operation); - } - }); // 遍历菜单项,提取所有的操作码 - var rightObj = getAllOperCodeRights(operations); // 对操作码进行鉴权判断 - $('a[operation]', $('.page-sidebar-menu')).each(function () { - var operation = $(this).attr("operation"); - if (operation) { - if (!hasRight(operation, rightObj)) { - $(this).parent("li").remove(); // 删除没有权限的菜单项 - } - } - }); - rebuildSiderBarMenu(); -}; -// 横向菜单栏鉴权 -function horMenuAuthentication( horMenuId ) { - // license 鉴权 - var menuids = new Array(); - var lcsoperations = new Array(); - //从页面DOM取得菜单license项。 - $('a[licenseid]', $('#'+ horMenuId)).each(function () { - var licenseid = $(this).attr("licenseid"); - if (licenseid) { - lcsoperations.push(licenseid); - var id = $(this).attr("id"); - menuids.push(id); - } - }); - var lcsrights = getLcsRight(lcsoperations);// 取得license数据。 - if (lcsrights && (lcsrights.length == menuids.length)) { - // 根据后台license值判断所在菜单项是否显示 - for (var i = 0; i < menuids.length; i++) { - var id = menuids[i]; - var lcskey = lcsoperations[i]; - var lcsitem = lcsrights[i]; - // 菜单项如果配了licenseid, 并且不是true字符串, 则移除菜单项 - if (lcsitem.value != "True") { - $('#'+id, $('#'+ horMenuId)).parent().remove(); - } - } - } - var operations = new Array(); - $('a[operation]', $('#'+ horMenuId)).each(function () { - var operation = $(this).attr("operation"); - if (operation) { - operations.push(operation); - } - }); // 遍历菜单项,提取所有的操作码 - var rightObj = getAllOperCodeRights(operations); // 对操作码进行鉴权判断 - $('a[operation]', $('#'+ horMenuId)).each(function () { - var operation = $(this).attr("operation"); - if (operation) { - if (!hasRight(operation, rightObj)) { - $(this).parent("li").remove(); // 删除没有权限的菜单项 - } - } - }); - rebuildHorMenu(); -}; - -// “更多操作”分组按钮鉴权 -function groupButtonAuthentication() { - // license 鉴权 - var menuids = new Array(); - var lcsoperations = new Array(); - //从页面DOM取得菜单license项。 - $('a[licenseid]', $('.more-botton-zone > li.btn-group')).each(function () { - var licenseid = $(this).attr("licenseid"); - if (licenseid) { - lcsoperations.push(licenseid); - var id = $(this).attr("id"); - menuids.push(id); - } - }); - var lcsrights = getLcsRight(lcsoperations);// 取得license数据。 - if (lcsrights && (lcsrights.length == menuids.length)) { - // 根据后台license值判断所在菜单项是否显示 - for (var i = 0; i < menuids.length; i++) { - var id = menuids[i]; - var lcskey = lcsoperations[i]; - var lcsitem = lcsrights[i]; - // 菜单项如果配了licenseid, 并且不是true字符串, 则移除菜单项 - if (lcsitem.value != "True") { - $('#'+id, $('.more-botton-zone > li.btn-group')).parent().remove(); - } - } - } - // 增加mysql判断,如果数据库为mysql,去掉基础数据备份功能菜单项 - var dbType = openoFrameWork_conf.dbType; - if (dbType == "mysql") { - $("#uep-ict-backup-baseDataBack",$('.more-botton-zone > li.btn-group')).parent().remove(); - } - var operations = new Array(); - $('a[operation]', $('.more-botton-zone > li.btn-group')).each(function () { - var operation = $(this).attr("operation"); - if (operation) { - operations.push(operation); - } - }); // 遍历菜单项,提取所有的操作码 - var rightObj = getAllOperCodeRights(operations); // 对操作码进行鉴权判断 - $('a[operation]', $('.more-botton-zone > li.btn-group')).each(function () { - var operation = $(this).attr("operation"); - if (operation) { - if (!hasRight(operation, rightObj)) { - $(this).parent("li").remove(); // 删除没有权限的菜单项 - } - } - }); - // 如果“更多菜单”下没有子菜单了,则删除整个“更多菜单”下拉框。 - if ($('li > a', $('.more-botton-zone > li.btn-group')).length == 0) { - $('.more-botton-zone > li.btn-group').remove(); - } -}; -// 删除没有子菜单的一级菜单,查看新菜单是否配了登录默认页面,如没有则指定第一个有权限的菜单作为登录后默认页面 -function rebuildSiderBarMenu() { - if ($('a.start').length == 0) { - $('li > a[href!="javascript:;"]', $('.page-sidebar-menu')).eq(0).addClass("start"); - } - $('ul.sub-menu', $('.page-sidebar-menu')).each(function () { - if ($(this).has('li').length == 0) { - $(this).parent("li").remove(); - } - }); -}; -// 删除没有子菜单的一级菜单,查看新菜单是否配了登录默认页面,如没有则指定第一个有权限的菜单作为登录后默认页面 -function rebuildHorMenu() { - if ($('a.start').length == 0) { - $('li > a[href!="#"]', $('#main_hormenu')).eq(0).addClass("start"); - } - $('ul.mega-menu-submenu', $('#main_hormenu')).each(function () { - if ($(this).has('li > a').length == 0) { - $(this).remove(); // 删空的分组列 - } - }); - //删除增加的分组div - $('div.zteDivWidth', $('#main_hormenu')).each(function () { - if ($(this).has('ul').length == 0) { - $(this).remove(); // 删空的分组列 - } - }); - $('ul.dropdown-menu', $('#main_hormenu')).each(function () { - if ($(this).has('ul').length == 0) { - $(this).parent("li").remove(); // 删空的一级菜单栏 - } - }); - $('li.divider', $('#main_hormenu')).each(function () { - if ($(this).next().hasClass('divider')) { - $(this).remove(); // 连续出现分隔线则删除一个 - } - }); - $('li.divider', $('#main_hormenu')).each(function () { - if ($(this).next().length == 0) { - $(this).remove(); // 如果分隔线在最后一行,则删除之 - } - }); -} -//获取页面菜单栏所有的操作码权限 -function getAllOperCodeRights(operations) { - var rights = new Array(); - if( operations && operations.length > 0 ){ - var data = { - "operations" : operations - }; - var sendData = JSON.stringify(data); - var url=FrameConst.REST_CHECKRIGHT + "?data=" + sendData + "&tmpstamp=" + new Date().getTime(); - url=openoFrameWork.handlBaseURL(url); - $.ajax({ - "dataType" : 'json', - "type" : "GET", - "async" : false, - "url" : url, - "data" : null, - //"contentType" : 'application/json; charset=utf-8', - "success" : function (response) { - rights = response.value; - }, - "error" : function (XMLHttpRequest, textStatus, errorThrown) { - if (XMLHttpRequest.status == 401) { - window.location.replace("login.html"); - } else { - console.log('Communication Error!'); - } - } - }); - } - return { - opCodes : operations, - rights : rights - }; -}; -// 判断操作码是否有权限 -function hasRight(opCode, rightObj) { - for (var i = 0; i < rightObj.opCodes.length; i++) { - if (rightObj.opCodes[i] == opCode) { - return (rightObj.rights[i] == true); - } - } - return false; -}; -// 处理mysql环境下备份菜单的合并问题 -function dealMysqlBackupMenu() { - var dbType = openoFrameWork_conf.dbType; - if (dbType !== undefined && dbType !== "mysql") { - return; - } - var sidermenu = $("[class='page-sidebar-menu']"); - var hormenu = $(".hormenu"); - //这段代码先这么写,html的位置不一定正确,如果后面位置不一致,再修改。 - if (sidermenu.length > 0 && $('#uep-ict-backup-dataBackup').length > 0) { - $('#uep-ict-backup-dataBackup', sidermenu).attr("breadcrumGroupButtonSrc", ICTFRAME_CONST_DATABACKUP_PATH); - } - if (hormenu.length > 0 && $('#uep-ict-backup-dataBackup').length > 0) { - $('#uep-ict-backup-dataBackup', hormenu).attr("breadcrumGroupButtonSrc", ICTFRAME_CONST_DATABACKUP_PATH); - $('#uep-ict-backup-dataBackup').parent('li').attr('style', 'display:block'); - $('#uep-ict-backup-allDbStructBackup').parent('li').attr('style', 'display:none'); - $('#uep-ict-backup-baseDataBack').parent('li').attr('style', 'display:none'); - } -}; -// 浏览器缩小后导航栏隐藏的情况下点击navbar-toggle显示菜单的前置工作, -// 浏览器缩小后导航栏隐藏的情况下点击navbar-toggle显示菜单的前置工作, -function dealMavToggle(navtoggle) { - var sidermenu = $("#page-sidebar-menu"); - var hormenu = $("#main_hormenu"); - var panel = $(".zte-theme-panel"); - var siderbarpos = $(".nav-pos-direction", panel).val() - if ("hidden" == $(navtoggle).attr("navtoggledispattr")) { - $(navtoggle).attr("navtoggledispattr", "display"); - sidermenu.css('display','block');//侧边栏显示 - hormenu.css("display", "none");//隐藏水平菜单栏 - } else { - $(navtoggle).attr("navtoggledispattr", "hidden"); - sidermenu.css('display','none');//侧边栏隐藏 - hormenu.css("display", "none"); - } -}; diff --git a/common/src/main/webapp/thirdparty/js/core/pym.min.js b/common/src/main/webapp/thirdparty/js/core/pym.min.js deleted file mode 100755 index 78b2f513..00000000 --- a/common/src/main/webapp/thirdparty/js/core/pym.min.js +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2016, CMCC Technologies Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -(function(a){if(typeof define==="function"&&define.amd){define("pym",[],a)}else{if(typeof module!=="undefined"&&module.exports){module.exports=a()}else{window.pym=a.call(this)}}window.pym=a.call(this)})(function(){var a="xPYMx";function e(){var k,i;if(window.innerHeight&&window.scrollMaxY){k=window.innerWidth+window.scrollMaxX;i=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){k=document.body.scrollWidth;i=document.body.scrollHeight}else{k=document.body.offsetWidth;i=document.body.offsetHeight}}var j,l;if(self.innerHeight){if(document.documentElement.clientWidth){j=document.documentElement.clientWidth}else{j=self.innerWidth}l=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){j=document.documentElement.clientWidth;l=document.documentElement.clientHeight}else{if(document.body){j=document.body.clientWidth;l=document.body.clientHeight}}}if(i-1){q=this.url.substring(n,this.url.length);this.url=this.url.substring(0,n)}if(this.url.indexOf("?")<0){this.url+="?"}else{this.url+="&"}this.iframe.src=this.url.trim().indexOf("javascript:")>=0?"":this.url+"initialWidth="+o+"&childId="+this.id;"&parentUrl="+encodeURIComponent(window.location.href)+q;this.iframe.setAttribute("width","100%");this.iframe.setAttribute("scrolling","no");this.iframe.setAttribute("marginheight","0");this.iframe.setAttribute("frameborder","0");this.el.appendChild(this.iframe);var p=this;window.addEventListener("resize",this._onResize)};this._onResize=function(){this.sendWidth()}.bind(this);this._fire=function(o,p){if(o in this.messageHandlers){for(var n=0;n0&&this.childpageType==="isc"){console.log("parent window detect that the child iframe page loaded smartclient,the iframe height will ignore the child's Height change message;");if(this.minHeightheight){m=l.oldHeight-height}else{m=height-l.oldHeight}if(m<=70){return}if(l.oldHeight!=height){l.oldHeight=height;console.log("child iframe id="+l.id+" sedHeight:"+height);l.sendMessage("height",height)}}.bind(this);this.scrollParentTo=function(m){this.sendMessage("navigateTo","#"+m)};this.navigateParentTo=function(m){this.sendMessage("navigateTo",m)};this.id=c("childId")||i.id;this.messageRegex=new RegExp("^pym"+a+this.id+a+"(\\S+)"+a+"(.+)$");var k=parseInt(c("initialWidth"));this.parentUrl=c("parentUrl");this.onMessage("width",this._onWidthMessage);for(var j in i){this.settings[j]=i[j]}var l=this;window.addEventListener("message",this._processMessage,false);if(this.settings.renderCallback){this.settings.renderCallback(k)}this.sendHeight();if(this.settings.polling){window.setInterval(this.sendHeight,this.settings.polling)}return this};d();return g}); diff --git a/common/src/main/webapp/thirdparty/js/jquery-ui.js b/common/src/main/webapp/thirdparty/js/jquery-ui.js deleted file mode 100755 index 02135523..00000000 --- a/common/src/main/webapp/thirdparty/js/jquery-ui.js +++ /dev/null @@ -1,18706 +0,0 @@ -/*! jQuery UI - v1.12.1 - 2016-09-14 -* http://jqueryui.com -* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js -* Copyright jQuery Foundation and other contributors; Licensed MIT */ - -(function( factory ) { - if ( typeof define === "function" && define.amd ) { - - // AMD. Register as an anonymous module. - define([ "jquery" ], factory ); - } else { - - // Browser globals - factory( jQuery ); - } -}(function( $ ) { - -$.ui = $.ui || {}; - -var version = $.ui.version = "1.12.1"; - - -/*! - * jQuery UI Widget 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Widget -//>>group: Core -//>>description: Provides a factory for creating stateful widgets with a common API. -//>>docs: http://api.jqueryui.com/jQuery.widget/ -//>>demos: http://jqueryui.com/widget/ - - - -var widgetUuid = 0; -var widgetSlice = Array.prototype.slice; - -$.cleanData = ( function( orig ) { - return function( elems ) { - var events, elem, i; - for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) { - try { - - // Only trigger remove when necessary to save time - events = $._data( elem, "events" ); - if ( events && events.remove ) { - $( elem ).triggerHandler( "remove" ); - } - - // Http://bugs.jquery.com/ticket/8235 - } catch ( e ) {} - } - orig( elems ); - }; -} )( $.cleanData ); - -$.widget = function( name, base, prototype ) { - var existingConstructor, constructor, basePrototype; - - // ProxiedPrototype allows the provided prototype to remain unmodified - // so that it can be used as a mixin for multiple widgets (#8876) - var proxiedPrototype = {}; - - var namespace = name.split( "." )[ 0 ]; - name = name.split( "." )[ 1 ]; - var fullName = namespace + "-" + name; - - if ( !prototype ) { - prototype = base; - base = $.Widget; - } - - if ( $.isArray( prototype ) ) { - prototype = $.extend.apply( null, [ {} ].concat( prototype ) ); - } - - // Create selector for plugin - $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { - return !!$.data( elem, fullName ); - }; - - $[ namespace ] = $[ namespace ] || {}; - existingConstructor = $[ namespace ][ name ]; - constructor = $[ namespace ][ name ] = function( options, element ) { - - // Allow instantiation without "new" keyword - if ( !this._createWidget ) { - return new constructor( options, element ); - } - - // Allow instantiation without initializing for simple inheritance - // must use "new" keyword (the code above always passes args) - if ( arguments.length ) { - this._createWidget( options, element ); - } - }; - - // Extend with the existing constructor to carry over any static properties - $.extend( constructor, existingConstructor, { - version: prototype.version, - - // Copy the object used to create the prototype in case we need to - // redefine the widget later - _proto: $.extend( {}, prototype ), - - // Track widgets that inherit from this widget in case this widget is - // redefined after a widget inherits from it - _childConstructors: [] - } ); - - basePrototype = new base(); - - // We need to make the options hash a property directly on the new instance - // otherwise we'll modify the options hash on the prototype that we're - // inheriting from - basePrototype.options = $.widget.extend( {}, basePrototype.options ); - $.each( prototype, function( prop, value ) { - if ( !$.isFunction( value ) ) { - proxiedPrototype[ prop ] = value; - return; - } - proxiedPrototype[ prop ] = ( function() { - function _super() { - return base.prototype[ prop ].apply( this, arguments ); - } - - function _superApply( args ) { - return base.prototype[ prop ].apply( this, args ); - } - - return function() { - var __super = this._super; - var __superApply = this._superApply; - var returnValue; - - this._super = _super; - this._superApply = _superApply; - - returnValue = value.apply( this, arguments ); - - this._super = __super; - this._superApply = __superApply; - - return returnValue; - }; - } )(); - } ); - constructor.prototype = $.widget.extend( basePrototype, { - - // TODO: remove support for widgetEventPrefix - // always use the name + a colon as the prefix, e.g., draggable:start - // don't prefix for widgets that aren't DOM-based - widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name - }, proxiedPrototype, { - constructor: constructor, - namespace: namespace, - widgetName: name, - widgetFullName: fullName - } ); - - // If this widget is being redefined then we need to find all widgets that - // are inheriting from it and redefine all of them so that they inherit from - // the new version of this widget. We're essentially trying to replace one - // level in the prototype chain. - if ( existingConstructor ) { - $.each( existingConstructor._childConstructors, function( i, child ) { - var childPrototype = child.prototype; - - // Redefine the child widget using the same prototype that was - // originally used, but inherit from the new version of the base - $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, - child._proto ); - } ); - - // Remove the list of existing child constructors from the old constructor - // so the old child constructors can be garbage collected - delete existingConstructor._childConstructors; - } else { - base._childConstructors.push( constructor ); - } - - $.widget.bridge( name, constructor ); - - return constructor; -}; - -$.widget.extend = function( target ) { - var input = widgetSlice.call( arguments, 1 ); - var inputIndex = 0; - var inputLength = input.length; - var key; - var value; - - for ( ; inputIndex < inputLength; inputIndex++ ) { - for ( key in input[ inputIndex ] ) { - value = input[ inputIndex ][ key ]; - if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { - - // Clone objects - if ( $.isPlainObject( value ) ) { - target[ key ] = $.isPlainObject( target[ key ] ) ? - $.widget.extend( {}, target[ key ], value ) : - - // Don't extend strings, arrays, etc. with objects - $.widget.extend( {}, value ); - - // Copy everything else by reference - } else { - target[ key ] = value; - } - } - } - } - return target; -}; - -$.widget.bridge = function( name, object ) { - var fullName = object.prototype.widgetFullName || name; - $.fn[ name ] = function( options ) { - var isMethodCall = typeof options === "string"; - var args = widgetSlice.call( arguments, 1 ); - var returnValue = this; - - if ( isMethodCall ) { - - // If this is an empty collection, we need to have the instance method - // return undefined instead of the jQuery instance - if ( !this.length && options === "instance" ) { - returnValue = undefined; - } else { - this.each( function() { - var methodValue; - var instance = $.data( this, fullName ); - - if ( options === "instance" ) { - returnValue = instance; - return false; - } - - if ( !instance ) { - return $.error( "cannot call methods on " + name + - " prior to initialization; " + - "attempted to call method '" + options + "'" ); - } - - if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) { - return $.error( "no such method '" + options + "' for " + name + - " widget instance" ); - } - - methodValue = instance[ options ].apply( instance, args ); - - if ( methodValue !== instance && methodValue !== undefined ) { - returnValue = methodValue && methodValue.jquery ? - returnValue.pushStack( methodValue.get() ) : - methodValue; - return false; - } - } ); - } - } else { - - // Allow multiple hashes to be passed on init - if ( args.length ) { - options = $.widget.extend.apply( null, [ options ].concat( args ) ); - } - - this.each( function() { - var instance = $.data( this, fullName ); - if ( instance ) { - instance.option( options || {} ); - if ( instance._init ) { - instance._init(); - } - } else { - $.data( this, fullName, new object( options, this ) ); - } - } ); - } - - return returnValue; - }; -}; - -$.Widget = function( /* options, element */ ) {}; -$.Widget._childConstructors = []; - -$.Widget.prototype = { - widgetName: "widget", - widgetEventPrefix: "", - defaultElement: "
    ", - - options: { - classes: {}, - disabled: false, - - // Callbacks - create: null - }, - - _createWidget: function( options, element ) { - element = $( element || this.defaultElement || this )[ 0 ]; - this.element = $( element ); - this.uuid = widgetUuid++; - this.eventNamespace = "." + this.widgetName + this.uuid; - - this.bindings = $(); - this.hoverable = $(); - this.focusable = $(); - this.classesElementLookup = {}; - - if ( element !== this ) { - $.data( element, this.widgetFullName, this ); - this._on( true, this.element, { - remove: function( event ) { - if ( event.target === element ) { - this.destroy(); - } - } - } ); - this.document = $( element.style ? - - // Element within the document - element.ownerDocument : - - // Element is window or document - element.document || element ); - this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow ); - } - - this.options = $.widget.extend( {}, - this.options, - this._getCreateOptions(), - options ); - - this._create(); - - if ( this.options.disabled ) { - this._setOptionDisabled( this.options.disabled ); - } - - this._trigger( "create", null, this._getCreateEventData() ); - this._init(); - }, - - _getCreateOptions: function() { - return {}; - }, - - _getCreateEventData: $.noop, - - _create: $.noop, - - _init: $.noop, - - destroy: function() { - var that = this; - - this._destroy(); - $.each( this.classesElementLookup, function( key, value ) { - that._removeClass( value, key ); - } ); - - // We can probably remove the unbind calls in 2.0 - // all event bindings should go through this._on() - this.element - .off( this.eventNamespace ) - .removeData( this.widgetFullName ); - this.widget() - .off( this.eventNamespace ) - .removeAttr( "aria-disabled" ); - - // Clean up events and states - this.bindings.off( this.eventNamespace ); - }, - - _destroy: $.noop, - - widget: function() { - return this.element; - }, - - option: function( key, value ) { - var options = key; - var parts; - var curOption; - var i; - - if ( arguments.length === 0 ) { - - // Don't return a reference to the internal hash - return $.widget.extend( {}, this.options ); - } - - if ( typeof key === "string" ) { - - // Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } - options = {}; - parts = key.split( "." ); - key = parts.shift(); - if ( parts.length ) { - curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); - for ( i = 0; i < parts.length - 1; i++ ) { - curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; - curOption = curOption[ parts[ i ] ]; - } - key = parts.pop(); - if ( arguments.length === 1 ) { - return curOption[ key ] === undefined ? null : curOption[ key ]; - } - curOption[ key ] = value; - } else { - if ( arguments.length === 1 ) { - return this.options[ key ] === undefined ? null : this.options[ key ]; - } - options[ key ] = value; - } - } - - this._setOptions( options ); - - return this; - }, - - _setOptions: function( options ) { - var key; - - for ( key in options ) { - this._setOption( key, options[ key ] ); - } - - return this; - }, - - _setOption: function( key, value ) { - if ( key === "classes" ) { - this._setOptionClasses( value ); - } - - this.options[ key ] = value; - - if ( key === "disabled" ) { - this._setOptionDisabled( value ); - } - - return this; - }, - - _setOptionClasses: function( value ) { - var classKey, elements, currentElements; - - for ( classKey in value ) { - currentElements = this.classesElementLookup[ classKey ]; - if ( value[ classKey ] === this.options.classes[ classKey ] || - !currentElements || - !currentElements.length ) { - continue; - } - - // We are doing this to create a new jQuery object because the _removeClass() call - // on the next line is going to destroy the reference to the current elements being - // tracked. We need to save a copy of this collection so that we can add the new classes - // below. - elements = $( currentElements.get() ); - this._removeClass( currentElements, classKey ); - - // We don't use _addClass() here, because that uses this.options.classes - // for generating the string of classes. We want to use the value passed in from - // _setOption(), this is the new value of the classes option which was passed to - // _setOption(). We pass this value directly to _classes(). - elements.addClass( this._classes( { - element: elements, - keys: classKey, - classes: value, - add: true - } ) ); - } - }, - - _setOptionDisabled: function( value ) { - this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value ); - - // If the widget is becoming disabled, then nothing is interactive - if ( value ) { - this._removeClass( this.hoverable, null, "ui-state-hover" ); - this._removeClass( this.focusable, null, "ui-state-focus" ); - } - }, - - enable: function() { - return this._setOptions( { disabled: false } ); - }, - - disable: function() { - return this._setOptions( { disabled: true } ); - }, - - _classes: function( options ) { - var full = []; - var that = this; - - options = $.extend( { - element: this.element, - classes: this.options.classes || {} - }, options ); - - function processClassString( classes, checkOption ) { - var current, i; - for ( i = 0; i < classes.length; i++ ) { - current = that.classesElementLookup[ classes[ i ] ] || $(); - if ( options.add ) { - current = $( $.unique( current.get().concat( options.element.get() ) ) ); - } else { - current = $( current.not( options.element ).get() ); - } - that.classesElementLookup[ classes[ i ] ] = current; - full.push( classes[ i ] ); - if ( checkOption && options.classes[ classes[ i ] ] ) { - full.push( options.classes[ classes[ i ] ] ); - } - } - } - - this._on( options.element, { - "remove": "_untrackClassesElement" - } ); - - if ( options.keys ) { - processClassString( options.keys.match( /\S+/g ) || [], true ); - } - if ( options.extra ) { - processClassString( options.extra.match( /\S+/g ) || [] ); - } - - return full.join( " " ); - }, - - _untrackClassesElement: function( event ) { - var that = this; - $.each( that.classesElementLookup, function( key, value ) { - if ( $.inArray( event.target, value ) !== -1 ) { - that.classesElementLookup[ key ] = $( value.not( event.target ).get() ); - } - } ); - }, - - _removeClass: function( element, keys, extra ) { - return this._toggleClass( element, keys, extra, false ); - }, - - _addClass: function( element, keys, extra ) { - return this._toggleClass( element, keys, extra, true ); - }, - - _toggleClass: function( element, keys, extra, add ) { - add = ( typeof add === "boolean" ) ? add : extra; - var shift = ( typeof element === "string" || element === null ), - options = { - extra: shift ? keys : extra, - keys: shift ? element : keys, - element: shift ? this.element : element, - add: add - }; - options.element.toggleClass( this._classes( options ), add ); - return this; - }, - - _on: function( suppressDisabledCheck, element, handlers ) { - var delegateElement; - var instance = this; - - // No suppressDisabledCheck flag, shuffle arguments - if ( typeof suppressDisabledCheck !== "boolean" ) { - handlers = element; - element = suppressDisabledCheck; - suppressDisabledCheck = false; - } - - // No element argument, shuffle and use this.element - if ( !handlers ) { - handlers = element; - element = this.element; - delegateElement = this.widget(); - } else { - element = delegateElement = $( element ); - this.bindings = this.bindings.add( element ); - } - - $.each( handlers, function( event, handler ) { - function handlerProxy() { - - // Allow widgets to customize the disabled handling - // - disabled as an array instead of boolean - // - disabled class as method for disabling individual parts - if ( !suppressDisabledCheck && - ( instance.options.disabled === true || - $( this ).hasClass( "ui-state-disabled" ) ) ) { - return; - } - return ( typeof handler === "string" ? instance[ handler ] : handler ) - .apply( instance, arguments ); - } - - // Copy the guid so direct unbinding works - if ( typeof handler !== "string" ) { - handlerProxy.guid = handler.guid = - handler.guid || handlerProxy.guid || $.guid++; - } - - var match = event.match( /^([\w:-]*)\s*(.*)$/ ); - var eventName = match[ 1 ] + instance.eventNamespace; - var selector = match[ 2 ]; - - if ( selector ) { - delegateElement.on( eventName, selector, handlerProxy ); - } else { - element.on( eventName, handlerProxy ); - } - } ); - }, - - _off: function( element, eventName ) { - eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) + - this.eventNamespace; - element.off( eventName ).off( eventName ); - - // Clear the stack to avoid memory leaks (#10056) - this.bindings = $( this.bindings.not( element ).get() ); - this.focusable = $( this.focusable.not( element ).get() ); - this.hoverable = $( this.hoverable.not( element ).get() ); - }, - - _delay: function( handler, delay ) { - function handlerProxy() { - return ( typeof handler === "string" ? instance[ handler ] : handler ) - .apply( instance, arguments ); - } - var instance = this; - return setTimeout( handlerProxy, delay || 0 ); - }, - - _hoverable: function( element ) { - this.hoverable = this.hoverable.add( element ); - this._on( element, { - mouseenter: function( event ) { - this._addClass( $( event.currentTarget ), null, "ui-state-hover" ); - }, - mouseleave: function( event ) { - this._removeClass( $( event.currentTarget ), null, "ui-state-hover" ); - } - } ); - }, - - _focusable: function( element ) { - this.focusable = this.focusable.add( element ); - this._on( element, { - focusin: function( event ) { - this._addClass( $( event.currentTarget ), null, "ui-state-focus" ); - }, - focusout: function( event ) { - this._removeClass( $( event.currentTarget ), null, "ui-state-focus" ); - } - } ); - }, - - _trigger: function( type, event, data ) { - var prop, orig; - var callback = this.options[ type ]; - - data = data || {}; - event = $.Event( event ); - event.type = ( type === this.widgetEventPrefix ? - type : - this.widgetEventPrefix + type ).toLowerCase(); - - // The original event may come from any element - // so we need to reset the target on the new event - event.target = this.element[ 0 ]; - - // Copy original event properties over to the new event - orig = event.originalEvent; - if ( orig ) { - for ( prop in orig ) { - if ( !( prop in event ) ) { - event[ prop ] = orig[ prop ]; - } - } - } - - this.element.trigger( event, data ); - return !( $.isFunction( callback ) && - callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false || - event.isDefaultPrevented() ); - } -}; - -$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { - $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { - if ( typeof options === "string" ) { - options = { effect: options }; - } - - var hasOptions; - var effectName = !options ? - method : - options === true || typeof options === "number" ? - defaultEffect : - options.effect || defaultEffect; - - options = options || {}; - if ( typeof options === "number" ) { - options = { duration: options }; - } - - hasOptions = !$.isEmptyObject( options ); - options.complete = callback; - - if ( options.delay ) { - element.delay( options.delay ); - } - - if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { - element[ method ]( options ); - } else if ( effectName !== method && element[ effectName ] ) { - element[ effectName ]( options.duration, options.easing, callback ); - } else { - element.queue( function( next ) { - $( this )[ method ](); - if ( callback ) { - callback.call( element[ 0 ] ); - } - next(); - } ); - } - }; -} ); - -var widget = $.widget; - - -/*! - * jQuery UI Position 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - * http://api.jqueryui.com/position/ - */ - -//>>label: Position -//>>group: Core -//>>description: Positions elements relative to other elements. -//>>docs: http://api.jqueryui.com/position/ -//>>demos: http://jqueryui.com/position/ - - -( function() { -var cachedScrollbarWidth, - max = Math.max, - abs = Math.abs, - rhorizontal = /left|center|right/, - rvertical = /top|center|bottom/, - roffset = /[\+\-]\d+(\.[\d]+)?%?/, - rposition = /^\w+/, - rpercent = /%$/, - _position = $.fn.position; - -function getOffsets( offsets, width, height ) { - return [ - parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), - parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) - ]; -} - -function parseCss( element, property ) { - return parseInt( $.css( element, property ), 10 ) || 0; -} - -function getDimensions( elem ) { - var raw = elem[ 0 ]; - if ( raw.nodeType === 9 ) { - return { - width: elem.width(), - height: elem.height(), - offset: { top: 0, left: 0 } - }; - } - if ( $.isWindow( raw ) ) { - return { - width: elem.width(), - height: elem.height(), - offset: { top: elem.scrollTop(), left: elem.scrollLeft() } - }; - } - if ( raw.preventDefault ) { - return { - width: 0, - height: 0, - offset: { top: raw.pageY, left: raw.pageX } - }; - } - return { - width: elem.outerWidth(), - height: elem.outerHeight(), - offset: elem.offset() - }; -} - -$.position = { - scrollbarWidth: function() { - if ( cachedScrollbarWidth !== undefined ) { - return cachedScrollbarWidth; - } - var w1, w2, - div = $( "
    " + - "
    " ), - innerDiv = div.children()[ 0 ]; - - $( "body" ).append( div ); - w1 = innerDiv.offsetWidth; - div.css( "overflow", "scroll" ); - - w2 = innerDiv.offsetWidth; - - if ( w1 === w2 ) { - w2 = div[ 0 ].clientWidth; - } - - div.remove(); - - return ( cachedScrollbarWidth = w1 - w2 ); - }, - getScrollInfo: function( within ) { - var overflowX = within.isWindow || within.isDocument ? "" : - within.element.css( "overflow-x" ), - overflowY = within.isWindow || within.isDocument ? "" : - within.element.css( "overflow-y" ), - hasOverflowX = overflowX === "scroll" || - ( overflowX === "auto" && within.width < within.element[ 0 ].scrollWidth ), - hasOverflowY = overflowY === "scroll" || - ( overflowY === "auto" && within.height < within.element[ 0 ].scrollHeight ); - return { - width: hasOverflowY ? $.position.scrollbarWidth() : 0, - height: hasOverflowX ? $.position.scrollbarWidth() : 0 - }; - }, - getWithinInfo: function( element ) { - var withinElement = $( element || window ), - isWindow = $.isWindow( withinElement[ 0 ] ), - isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9, - hasOffset = !isWindow && !isDocument; - return { - element: withinElement, - isWindow: isWindow, - isDocument: isDocument, - offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 }, - scrollLeft: withinElement.scrollLeft(), - scrollTop: withinElement.scrollTop(), - width: withinElement.outerWidth(), - height: withinElement.outerHeight() - }; - } -}; - -$.fn.position = function( options ) { - if ( !options || !options.of ) { - return _position.apply( this, arguments ); - } - - // Make a copy, we don't want to modify arguments - options = $.extend( {}, options ); - - var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, - target = $( options.of ), - within = $.position.getWithinInfo( options.within ), - scrollInfo = $.position.getScrollInfo( within ), - collision = ( options.collision || "flip" ).split( " " ), - offsets = {}; - - dimensions = getDimensions( target ); - if ( target[ 0 ].preventDefault ) { - - // Force left top to allow flipping - options.at = "left top"; - } - targetWidth = dimensions.width; - targetHeight = dimensions.height; - targetOffset = dimensions.offset; - - // Clone to reuse original targetOffset later - basePosition = $.extend( {}, targetOffset ); - - // Force my and at to have valid horizontal and vertical positions - // if a value is missing or invalid, it will be converted to center - $.each( [ "my", "at" ], function() { - var pos = ( options[ this ] || "" ).split( " " ), - horizontalOffset, - verticalOffset; - - if ( pos.length === 1 ) { - pos = rhorizontal.test( pos[ 0 ] ) ? - pos.concat( [ "center" ] ) : - rvertical.test( pos[ 0 ] ) ? - [ "center" ].concat( pos ) : - [ "center", "center" ]; - } - pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; - pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; - - // Calculate offsets - horizontalOffset = roffset.exec( pos[ 0 ] ); - verticalOffset = roffset.exec( pos[ 1 ] ); - offsets[ this ] = [ - horizontalOffset ? horizontalOffset[ 0 ] : 0, - verticalOffset ? verticalOffset[ 0 ] : 0 - ]; - - // Reduce to just the positions without the offsets - options[ this ] = [ - rposition.exec( pos[ 0 ] )[ 0 ], - rposition.exec( pos[ 1 ] )[ 0 ] - ]; - } ); - - // Normalize collision option - if ( collision.length === 1 ) { - collision[ 1 ] = collision[ 0 ]; - } - - if ( options.at[ 0 ] === "right" ) { - basePosition.left += targetWidth; - } else if ( options.at[ 0 ] === "center" ) { - basePosition.left += targetWidth / 2; - } - - if ( options.at[ 1 ] === "bottom" ) { - basePosition.top += targetHeight; - } else if ( options.at[ 1 ] === "center" ) { - basePosition.top += targetHeight / 2; - } - - atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); - basePosition.left += atOffset[ 0 ]; - basePosition.top += atOffset[ 1 ]; - - return this.each( function() { - var collisionPosition, using, - elem = $( this ), - elemWidth = elem.outerWidth(), - elemHeight = elem.outerHeight(), - marginLeft = parseCss( this, "marginLeft" ), - marginTop = parseCss( this, "marginTop" ), - collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + - scrollInfo.width, - collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + - scrollInfo.height, - position = $.extend( {}, basePosition ), - myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); - - if ( options.my[ 0 ] === "right" ) { - position.left -= elemWidth; - } else if ( options.my[ 0 ] === "center" ) { - position.left -= elemWidth / 2; - } - - if ( options.my[ 1 ] === "bottom" ) { - position.top -= elemHeight; - } else if ( options.my[ 1 ] === "center" ) { - position.top -= elemHeight / 2; - } - - position.left += myOffset[ 0 ]; - position.top += myOffset[ 1 ]; - - collisionPosition = { - marginLeft: marginLeft, - marginTop: marginTop - }; - - $.each( [ "left", "top" ], function( i, dir ) { - if ( $.ui.position[ collision[ i ] ] ) { - $.ui.position[ collision[ i ] ][ dir ]( position, { - targetWidth: targetWidth, - targetHeight: targetHeight, - elemWidth: elemWidth, - elemHeight: elemHeight, - collisionPosition: collisionPosition, - collisionWidth: collisionWidth, - collisionHeight: collisionHeight, - offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], - my: options.my, - at: options.at, - within: within, - elem: elem - } ); - } - } ); - - if ( options.using ) { - - // Adds feedback as second argument to using callback, if present - using = function( props ) { - var left = targetOffset.left - position.left, - right = left + targetWidth - elemWidth, - top = targetOffset.top - position.top, - bottom = top + targetHeight - elemHeight, - feedback = { - target: { - element: target, - left: targetOffset.left, - top: targetOffset.top, - width: targetWidth, - height: targetHeight - }, - element: { - element: elem, - left: position.left, - top: position.top, - width: elemWidth, - height: elemHeight - }, - horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", - vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" - }; - if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { - feedback.horizontal = "center"; - } - if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { - feedback.vertical = "middle"; - } - if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { - feedback.important = "horizontal"; - } else { - feedback.important = "vertical"; - } - options.using.call( this, props, feedback ); - }; - } - - elem.offset( $.extend( position, { using: using } ) ); - } ); -}; - -$.ui.position = { - fit: { - left: function( position, data ) { - var within = data.within, - withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, - outerWidth = within.width, - collisionPosLeft = position.left - data.collisionPosition.marginLeft, - overLeft = withinOffset - collisionPosLeft, - overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, - newOverRight; - - // Element is wider than within - if ( data.collisionWidth > outerWidth ) { - - // Element is initially over the left side of within - if ( overLeft > 0 && overRight <= 0 ) { - newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - - withinOffset; - position.left += overLeft - newOverRight; - - // Element is initially over right side of within - } else if ( overRight > 0 && overLeft <= 0 ) { - position.left = withinOffset; - - // Element is initially over both left and right sides of within - } else { - if ( overLeft > overRight ) { - position.left = withinOffset + outerWidth - data.collisionWidth; - } else { - position.left = withinOffset; - } - } - - // Too far left -> align with left edge - } else if ( overLeft > 0 ) { - position.left += overLeft; - - // Too far right -> align with right edge - } else if ( overRight > 0 ) { - position.left -= overRight; - - // Adjust based on position and margin - } else { - position.left = max( position.left - collisionPosLeft, position.left ); - } - }, - top: function( position, data ) { - var within = data.within, - withinOffset = within.isWindow ? within.scrollTop : within.offset.top, - outerHeight = data.within.height, - collisionPosTop = position.top - data.collisionPosition.marginTop, - overTop = withinOffset - collisionPosTop, - overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, - newOverBottom; - - // Element is taller than within - if ( data.collisionHeight > outerHeight ) { - - // Element is initially over the top of within - if ( overTop > 0 && overBottom <= 0 ) { - newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - - withinOffset; - position.top += overTop - newOverBottom; - - // Element is initially over bottom of within - } else if ( overBottom > 0 && overTop <= 0 ) { - position.top = withinOffset; - - // Element is initially over both top and bottom of within - } else { - if ( overTop > overBottom ) { - position.top = withinOffset + outerHeight - data.collisionHeight; - } else { - position.top = withinOffset; - } - } - - // Too far up -> align with top - } else if ( overTop > 0 ) { - position.top += overTop; - - // Too far down -> align with bottom edge - } else if ( overBottom > 0 ) { - position.top -= overBottom; - - // Adjust based on position and margin - } else { - position.top = max( position.top - collisionPosTop, position.top ); - } - } - }, - flip: { - left: function( position, data ) { - var within = data.within, - withinOffset = within.offset.left + within.scrollLeft, - outerWidth = within.width, - offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, - collisionPosLeft = position.left - data.collisionPosition.marginLeft, - overLeft = collisionPosLeft - offsetLeft, - overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, - myOffset = data.my[ 0 ] === "left" ? - -data.elemWidth : - data.my[ 0 ] === "right" ? - data.elemWidth : - 0, - atOffset = data.at[ 0 ] === "left" ? - data.targetWidth : - data.at[ 0 ] === "right" ? - -data.targetWidth : - 0, - offset = -2 * data.offset[ 0 ], - newOverRight, - newOverLeft; - - if ( overLeft < 0 ) { - newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - - outerWidth - withinOffset; - if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { - position.left += myOffset + atOffset + offset; - } - } else if ( overRight > 0 ) { - newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + - atOffset + offset - offsetLeft; - if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { - position.left += myOffset + atOffset + offset; - } - } - }, - top: function( position, data ) { - var within = data.within, - withinOffset = within.offset.top + within.scrollTop, - outerHeight = within.height, - offsetTop = within.isWindow ? within.scrollTop : within.offset.top, - collisionPosTop = position.top - data.collisionPosition.marginTop, - overTop = collisionPosTop - offsetTop, - overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, - top = data.my[ 1 ] === "top", - myOffset = top ? - -data.elemHeight : - data.my[ 1 ] === "bottom" ? - data.elemHeight : - 0, - atOffset = data.at[ 1 ] === "top" ? - data.targetHeight : - data.at[ 1 ] === "bottom" ? - -data.targetHeight : - 0, - offset = -2 * data.offset[ 1 ], - newOverTop, - newOverBottom; - if ( overTop < 0 ) { - newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - - outerHeight - withinOffset; - if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) { - position.top += myOffset + atOffset + offset; - } - } else if ( overBottom > 0 ) { - newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + - offset - offsetTop; - if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) { - position.top += myOffset + atOffset + offset; - } - } - } - }, - flipfit: { - left: function() { - $.ui.position.flip.left.apply( this, arguments ); - $.ui.position.fit.left.apply( this, arguments ); - }, - top: function() { - $.ui.position.flip.top.apply( this, arguments ); - $.ui.position.fit.top.apply( this, arguments ); - } - } -}; - -} )(); - -var position = $.ui.position; - - -/*! - * jQuery UI :data 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: :data Selector -//>>group: Core -//>>description: Selects elements which have data stored under the specified key. -//>>docs: http://api.jqueryui.com/data-selector/ - - -var data = $.extend( $.expr[ ":" ], { - data: $.expr.createPseudo ? - $.expr.createPseudo( function( dataName ) { - return function( elem ) { - return !!$.data( elem, dataName ); - }; - } ) : - - // Support: jQuery <1.8 - function( elem, i, match ) { - return !!$.data( elem, match[ 3 ] ); - } -} ); - -/*! - * jQuery UI Disable Selection 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: disableSelection -//>>group: Core -//>>description: Disable selection of text content within the set of matched elements. -//>>docs: http://api.jqueryui.com/disableSelection/ - -// This file is deprecated - - -var disableSelection = $.fn.extend( { - disableSelection: ( function() { - var eventType = "onselectstart" in document.createElement( "div" ) ? - "selectstart" : - "mousedown"; - - return function() { - return this.on( eventType + ".ui-disableSelection", function( event ) { - event.preventDefault(); - } ); - }; - } )(), - - enableSelection: function() { - return this.off( ".ui-disableSelection" ); - } -} ); - - -/*! - * jQuery UI Effects 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Effects Core -//>>group: Effects -// jscs:disable maximumLineLength -//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects. -// jscs:enable maximumLineLength -//>>docs: http://api.jqueryui.com/category/effects-core/ -//>>demos: http://jqueryui.com/effect/ - - - -var dataSpace = "ui-effects-", - dataSpaceStyle = "ui-effects-style", - dataSpaceAnimated = "ui-effects-animated", - - // Create a local jQuery because jQuery Color relies on it and the - // global may not exist with AMD and a custom build (#10199) - jQuery = $; - -$.effects = { - effect: {} -}; - -/*! - * jQuery Color Animations v2.1.2 - * https://github.com/jquery/jquery-color - * - * Copyright 2014 jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - * Date: Wed Jan 16 08:47:09 2013 -0600 - */ -( function( jQuery, undefined ) { - - var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " + - "borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", - - // Plusequals test for += 100 -= 100 - rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, - - // A set of RE's that can match strings and generate color tuples. - stringParsers = [ { - re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, - parse: function( execResult ) { - return [ - execResult[ 1 ], - execResult[ 2 ], - execResult[ 3 ], - execResult[ 4 ] - ]; - } - }, { - re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, - parse: function( execResult ) { - return [ - execResult[ 1 ] * 2.55, - execResult[ 2 ] * 2.55, - execResult[ 3 ] * 2.55, - execResult[ 4 ] - ]; - } - }, { - - // This regex ignores A-F because it's compared against an already lowercased string - re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, - parse: function( execResult ) { - return [ - parseInt( execResult[ 1 ], 16 ), - parseInt( execResult[ 2 ], 16 ), - parseInt( execResult[ 3 ], 16 ) - ]; - } - }, { - - // This regex ignores A-F because it's compared against an already lowercased string - re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, - parse: function( execResult ) { - return [ - parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ), - parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ), - parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ) - ]; - } - }, { - re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, - space: "hsla", - parse: function( execResult ) { - return [ - execResult[ 1 ], - execResult[ 2 ] / 100, - execResult[ 3 ] / 100, - execResult[ 4 ] - ]; - } - } ], - - // JQuery.Color( ) - color = jQuery.Color = function( color, green, blue, alpha ) { - return new jQuery.Color.fn.parse( color, green, blue, alpha ); - }, - spaces = { - rgba: { - props: { - red: { - idx: 0, - type: "byte" - }, - green: { - idx: 1, - type: "byte" - }, - blue: { - idx: 2, - type: "byte" - } - } - }, - - hsla: { - props: { - hue: { - idx: 0, - type: "degrees" - }, - saturation: { - idx: 1, - type: "percent" - }, - lightness: { - idx: 2, - type: "percent" - } - } - } - }, - propTypes = { - "byte": { - floor: true, - max: 255 - }, - "percent": { - max: 1 - }, - "degrees": { - mod: 360, - floor: true - } - }, - support = color.support = {}, - - // Element for support tests - supportElem = jQuery( "

    " )[ 0 ], - - // Colors = jQuery.Color.names - colors, - - // Local aliases of functions called often - each = jQuery.each; - -// Determine rgba support immediately -supportElem.style.cssText = "background-color:rgba(1,1,1,.5)"; -support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1; - -// Define cache name and alpha properties -// for rgba and hsla spaces -each( spaces, function( spaceName, space ) { - space.cache = "_" + spaceName; - space.props.alpha = { - idx: 3, - type: "percent", - def: 1 - }; -} ); - -function clamp( value, prop, allowEmpty ) { - var type = propTypes[ prop.type ] || {}; - - if ( value == null ) { - return ( allowEmpty || !prop.def ) ? null : prop.def; - } - - // ~~ is an short way of doing floor for positive numbers - value = type.floor ? ~~value : parseFloat( value ); - - // IE will pass in empty strings as value for alpha, - // which will hit this case - if ( isNaN( value ) ) { - return prop.def; - } - - if ( type.mod ) { - - // We add mod before modding to make sure that negatives values - // get converted properly: -10 -> 350 - return ( value + type.mod ) % type.mod; - } - - // For now all property types without mod have min and max - return 0 > value ? 0 : type.max < value ? type.max : value; -} - -function stringParse( string ) { - var inst = color(), - rgba = inst._rgba = []; - - string = string.toLowerCase(); - - each( stringParsers, function( i, parser ) { - var parsed, - match = parser.re.exec( string ), - values = match && parser.parse( match ), - spaceName = parser.space || "rgba"; - - if ( values ) { - parsed = inst[ spaceName ]( values ); - - // If this was an rgba parse the assignment might happen twice - // oh well.... - inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ]; - rgba = inst._rgba = parsed._rgba; - - // Exit each( stringParsers ) here because we matched - return false; - } - } ); - - // Found a stringParser that handled it - if ( rgba.length ) { - - // If this came from a parsed string, force "transparent" when alpha is 0 - // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0) - if ( rgba.join() === "0,0,0,0" ) { - jQuery.extend( rgba, colors.transparent ); - } - return inst; - } - - // Named colors - return colors[ string ]; -} - -color.fn = jQuery.extend( color.prototype, { - parse: function( red, green, blue, alpha ) { - if ( red === undefined ) { - this._rgba = [ null, null, null, null ]; - return this; - } - if ( red.jquery || red.nodeType ) { - red = jQuery( red ).css( green ); - green = undefined; - } - - var inst = this, - type = jQuery.type( red ), - rgba = this._rgba = []; - - // More than 1 argument specified - assume ( red, green, blue, alpha ) - if ( green !== undefined ) { - red = [ red, green, blue, alpha ]; - type = "array"; - } - - if ( type === "string" ) { - return this.parse( stringParse( red ) || colors._default ); - } - - if ( type === "array" ) { - each( spaces.rgba.props, function( key, prop ) { - rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); - } ); - return this; - } - - if ( type === "object" ) { - if ( red instanceof color ) { - each( spaces, function( spaceName, space ) { - if ( red[ space.cache ] ) { - inst[ space.cache ] = red[ space.cache ].slice(); - } - } ); - } else { - each( spaces, function( spaceName, space ) { - var cache = space.cache; - each( space.props, function( key, prop ) { - - // If the cache doesn't exist, and we know how to convert - if ( !inst[ cache ] && space.to ) { - - // If the value was null, we don't need to copy it - // if the key was alpha, we don't need to copy it either - if ( key === "alpha" || red[ key ] == null ) { - return; - } - inst[ cache ] = space.to( inst._rgba ); - } - - // This is the only case where we allow nulls for ALL properties. - // call clamp with alwaysAllowEmpty - inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); - } ); - - // Everything defined but alpha? - if ( inst[ cache ] && - jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { - - // Use the default of 1 - inst[ cache ][ 3 ] = 1; - if ( space.from ) { - inst._rgba = space.from( inst[ cache ] ); - } - } - } ); - } - return this; - } - }, - is: function( compare ) { - var is = color( compare ), - same = true, - inst = this; - - each( spaces, function( _, space ) { - var localCache, - isCache = is[ space.cache ]; - if ( isCache ) { - localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || []; - each( space.props, function( _, prop ) { - if ( isCache[ prop.idx ] != null ) { - same = ( isCache[ prop.idx ] === localCache[ prop.idx ] ); - return same; - } - } ); - } - return same; - } ); - return same; - }, - _space: function() { - var used = [], - inst = this; - each( spaces, function( spaceName, space ) { - if ( inst[ space.cache ] ) { - used.push( spaceName ); - } - } ); - return used.pop(); - }, - transition: function( other, distance ) { - var end = color( other ), - spaceName = end._space(), - space = spaces[ spaceName ], - startColor = this.alpha() === 0 ? color( "transparent" ) : this, - start = startColor[ space.cache ] || space.to( startColor._rgba ), - result = start.slice(); - - end = end[ space.cache ]; - each( space.props, function( key, prop ) { - var index = prop.idx, - startValue = start[ index ], - endValue = end[ index ], - type = propTypes[ prop.type ] || {}; - - // If null, don't override start value - if ( endValue === null ) { - return; - } - - // If null - use end - if ( startValue === null ) { - result[ index ] = endValue; - } else { - if ( type.mod ) { - if ( endValue - startValue > type.mod / 2 ) { - startValue += type.mod; - } else if ( startValue - endValue > type.mod / 2 ) { - startValue -= type.mod; - } - } - result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop ); - } - } ); - return this[ spaceName ]( result ); - }, - blend: function( opaque ) { - - // If we are already opaque - return ourself - if ( this._rgba[ 3 ] === 1 ) { - return this; - } - - var rgb = this._rgba.slice(), - a = rgb.pop(), - blend = color( opaque )._rgba; - - return color( jQuery.map( rgb, function( v, i ) { - return ( 1 - a ) * blend[ i ] + a * v; - } ) ); - }, - toRgbaString: function() { - var prefix = "rgba(", - rgba = jQuery.map( this._rgba, function( v, i ) { - return v == null ? ( i > 2 ? 1 : 0 ) : v; - } ); - - if ( rgba[ 3 ] === 1 ) { - rgba.pop(); - prefix = "rgb("; - } - - return prefix + rgba.join() + ")"; - }, - toHslaString: function() { - var prefix = "hsla(", - hsla = jQuery.map( this.hsla(), function( v, i ) { - if ( v == null ) { - v = i > 2 ? 1 : 0; - } - - // Catch 1 and 2 - if ( i && i < 3 ) { - v = Math.round( v * 100 ) + "%"; - } - return v; - } ); - - if ( hsla[ 3 ] === 1 ) { - hsla.pop(); - prefix = "hsl("; - } - return prefix + hsla.join() + ")"; - }, - toHexString: function( includeAlpha ) { - var rgba = this._rgba.slice(), - alpha = rgba.pop(); - - if ( includeAlpha ) { - rgba.push( ~~( alpha * 255 ) ); - } - - return "#" + jQuery.map( rgba, function( v ) { - - // Default to 0 when nulls exist - v = ( v || 0 ).toString( 16 ); - return v.length === 1 ? "0" + v : v; - } ).join( "" ); - }, - toString: function() { - return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString(); - } -} ); -color.fn.parse.prototype = color.fn; - -// Hsla conversions adapted from: -// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021 - -function hue2rgb( p, q, h ) { - h = ( h + 1 ) % 1; - if ( h * 6 < 1 ) { - return p + ( q - p ) * h * 6; - } - if ( h * 2 < 1 ) { - return q; - } - if ( h * 3 < 2 ) { - return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6; - } - return p; -} - -spaces.hsla.to = function( rgba ) { - if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { - return [ null, null, null, rgba[ 3 ] ]; - } - var r = rgba[ 0 ] / 255, - g = rgba[ 1 ] / 255, - b = rgba[ 2 ] / 255, - a = rgba[ 3 ], - max = Math.max( r, g, b ), - min = Math.min( r, g, b ), - diff = max - min, - add = max + min, - l = add * 0.5, - h, s; - - if ( min === max ) { - h = 0; - } else if ( r === max ) { - h = ( 60 * ( g - b ) / diff ) + 360; - } else if ( g === max ) { - h = ( 60 * ( b - r ) / diff ) + 120; - } else { - h = ( 60 * ( r - g ) / diff ) + 240; - } - - // Chroma (diff) == 0 means greyscale which, by definition, saturation = 0% - // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add) - if ( diff === 0 ) { - s = 0; - } else if ( l <= 0.5 ) { - s = diff / add; - } else { - s = diff / ( 2 - add ); - } - return [ Math.round( h ) % 360, s, l, a == null ? 1 : a ]; -}; - -spaces.hsla.from = function( hsla ) { - if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) { - return [ null, null, null, hsla[ 3 ] ]; - } - var h = hsla[ 0 ] / 360, - s = hsla[ 1 ], - l = hsla[ 2 ], - a = hsla[ 3 ], - q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s, - p = 2 * l - q; - - return [ - Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ), - Math.round( hue2rgb( p, q, h ) * 255 ), - Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ), - a - ]; -}; - -each( spaces, function( spaceName, space ) { - var props = space.props, - cache = space.cache, - to = space.to, - from = space.from; - - // Makes rgba() and hsla() - color.fn[ spaceName ] = function( value ) { - - // Generate a cache for this space if it doesn't exist - if ( to && !this[ cache ] ) { - this[ cache ] = to( this._rgba ); - } - if ( value === undefined ) { - return this[ cache ].slice(); - } - - var ret, - type = jQuery.type( value ), - arr = ( type === "array" || type === "object" ) ? value : arguments, - local = this[ cache ].slice(); - - each( props, function( key, prop ) { - var val = arr[ type === "object" ? key : prop.idx ]; - if ( val == null ) { - val = local[ prop.idx ]; - } - local[ prop.idx ] = clamp( val, prop ); - } ); - - if ( from ) { - ret = color( from( local ) ); - ret[ cache ] = local; - return ret; - } else { - return color( local ); - } - }; - - // Makes red() green() blue() alpha() hue() saturation() lightness() - each( props, function( key, prop ) { - - // Alpha is included in more than one space - if ( color.fn[ key ] ) { - return; - } - color.fn[ key ] = function( value ) { - var vtype = jQuery.type( value ), - fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ), - local = this[ fn ](), - cur = local[ prop.idx ], - match; - - if ( vtype === "undefined" ) { - return cur; - } - - if ( vtype === "function" ) { - value = value.call( this, cur ); - vtype = jQuery.type( value ); - } - if ( value == null && prop.empty ) { - return this; - } - if ( vtype === "string" ) { - match = rplusequals.exec( value ); - if ( match ) { - value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 ); - } - } - local[ prop.idx ] = value; - return this[ fn ]( local ); - }; - } ); -} ); - -// Add cssHook and .fx.step function for each named hook. -// accept a space separated string of properties -color.hook = function( hook ) { - var hooks = hook.split( " " ); - each( hooks, function( i, hook ) { - jQuery.cssHooks[ hook ] = { - set: function( elem, value ) { - var parsed, curElem, - backgroundColor = ""; - - if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || - ( parsed = stringParse( value ) ) ) ) { - value = color( parsed || value ); - if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { - curElem = hook === "backgroundColor" ? elem.parentNode : elem; - while ( - ( backgroundColor === "" || backgroundColor === "transparent" ) && - curElem && curElem.style - ) { - try { - backgroundColor = jQuery.css( curElem, "backgroundColor" ); - curElem = curElem.parentNode; - } catch ( e ) { - } - } - - value = value.blend( backgroundColor && backgroundColor !== "transparent" ? - backgroundColor : - "_default" ); - } - - value = value.toRgbaString(); - } - try { - elem.style[ hook ] = value; - } catch ( e ) { - - // Wrapped to prevent IE from throwing errors on "invalid" values like - // 'auto' or 'inherit' - } - } - }; - jQuery.fx.step[ hook ] = function( fx ) { - if ( !fx.colorInit ) { - fx.start = color( fx.elem, hook ); - fx.end = color( fx.end ); - fx.colorInit = true; - } - jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) ); - }; - } ); - -}; - -color.hook( stepHooks ); - -jQuery.cssHooks.borderColor = { - expand: function( value ) { - var expanded = {}; - - each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) { - expanded[ "border" + part + "Color" ] = value; - } ); - return expanded; - } -}; - -// Basic color names only. -// Usage of any of the other color names requires adding yourself or including -// jquery.color.svg-names.js. -colors = jQuery.Color.names = { - - // 4.1. Basic color keywords - aqua: "#00ffff", - black: "#000000", - blue: "#0000ff", - fuchsia: "#ff00ff", - gray: "#808080", - green: "#008000", - lime: "#00ff00", - maroon: "#800000", - navy: "#000080", - olive: "#808000", - purple: "#800080", - red: "#ff0000", - silver: "#c0c0c0", - teal: "#008080", - white: "#ffffff", - yellow: "#ffff00", - - // 4.2.3. "transparent" color keyword - transparent: [ null, null, null, 0 ], - - _default: "#ffffff" -}; - -} )( jQuery ); - -/******************************************************************************/ -/****************************** CLASS ANIMATIONS ******************************/ -/******************************************************************************/ -( function() { - -var classAnimationActions = [ "add", "remove", "toggle" ], - shorthandStyles = { - border: 1, - borderBottom: 1, - borderColor: 1, - borderLeft: 1, - borderRight: 1, - borderTop: 1, - borderWidth: 1, - margin: 1, - padding: 1 - }; - -$.each( - [ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], - function( _, prop ) { - $.fx.step[ prop ] = function( fx ) { - if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) { - jQuery.style( fx.elem, prop, fx.end ); - fx.setAttr = true; - } - }; - } -); - -function getElementStyles( elem ) { - var key, len, - style = elem.ownerDocument.defaultView ? - elem.ownerDocument.defaultView.getComputedStyle( elem, null ) : - elem.currentStyle, - styles = {}; - - if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) { - len = style.length; - while ( len-- ) { - key = style[ len ]; - if ( typeof style[ key ] === "string" ) { - styles[ $.camelCase( key ) ] = style[ key ]; - } - } - - // Support: Opera, IE <9 - } else { - for ( key in style ) { - if ( typeof style[ key ] === "string" ) { - styles[ key ] = style[ key ]; - } - } - } - - return styles; -} - -function styleDifference( oldStyle, newStyle ) { - var diff = {}, - name, value; - - for ( name in newStyle ) { - value = newStyle[ name ]; - if ( oldStyle[ name ] !== value ) { - if ( !shorthandStyles[ name ] ) { - if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) { - diff[ name ] = value; - } - } - } - } - - return diff; -} - -// Support: jQuery <1.8 -if ( !$.fn.addBack ) { - $.fn.addBack = function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - }; -} - -$.effects.animateClass = function( value, duration, easing, callback ) { - var o = $.speed( duration, easing, callback ); - - return this.queue( function() { - var animated = $( this ), - baseClass = animated.attr( "class" ) || "", - applyClassChange, - allAnimations = o.children ? animated.find( "*" ).addBack() : animated; - - // Map the animated objects to store the original styles. - allAnimations = allAnimations.map( function() { - var el = $( this ); - return { - el: el, - start: getElementStyles( this ) - }; - } ); - - // Apply class change - applyClassChange = function() { - $.each( classAnimationActions, function( i, action ) { - if ( value[ action ] ) { - animated[ action + "Class" ]( value[ action ] ); - } - } ); - }; - applyClassChange(); - - // Map all animated objects again - calculate new styles and diff - allAnimations = allAnimations.map( function() { - this.end = getElementStyles( this.el[ 0 ] ); - this.diff = styleDifference( this.start, this.end ); - return this; - } ); - - // Apply original class - animated.attr( "class", baseClass ); - - // Map all animated objects again - this time collecting a promise - allAnimations = allAnimations.map( function() { - var styleInfo = this, - dfd = $.Deferred(), - opts = $.extend( {}, o, { - queue: false, - complete: function() { - dfd.resolve( styleInfo ); - } - } ); - - this.el.animate( this.diff, opts ); - return dfd.promise(); - } ); - - // Once all animations have completed: - $.when.apply( $, allAnimations.get() ).done( function() { - - // Set the final class - applyClassChange(); - - // For each animated element, - // clear all css properties that were animated - $.each( arguments, function() { - var el = this.el; - $.each( this.diff, function( key ) { - el.css( key, "" ); - } ); - } ); - - // This is guarnteed to be there if you use jQuery.speed() - // it also handles dequeuing the next anim... - o.complete.call( animated[ 0 ] ); - } ); - } ); -}; - -$.fn.extend( { - addClass: ( function( orig ) { - return function( classNames, speed, easing, callback ) { - return speed ? - $.effects.animateClass.call( this, - { add: classNames }, speed, easing, callback ) : - orig.apply( this, arguments ); - }; - } )( $.fn.addClass ), - - removeClass: ( function( orig ) { - return function( classNames, speed, easing, callback ) { - return arguments.length > 1 ? - $.effects.animateClass.call( this, - { remove: classNames }, speed, easing, callback ) : - orig.apply( this, arguments ); - }; - } )( $.fn.removeClass ), - - toggleClass: ( function( orig ) { - return function( classNames, force, speed, easing, callback ) { - if ( typeof force === "boolean" || force === undefined ) { - if ( !speed ) { - - // Without speed parameter - return orig.apply( this, arguments ); - } else { - return $.effects.animateClass.call( this, - ( force ? { add: classNames } : { remove: classNames } ), - speed, easing, callback ); - } - } else { - - // Without force parameter - return $.effects.animateClass.call( this, - { toggle: classNames }, force, speed, easing ); - } - }; - } )( $.fn.toggleClass ), - - switchClass: function( remove, add, speed, easing, callback ) { - return $.effects.animateClass.call( this, { - add: add, - remove: remove - }, speed, easing, callback ); - } -} ); - -} )(); - -/******************************************************************************/ -/*********************************** EFFECTS **********************************/ -/******************************************************************************/ - -( function() { - -if ( $.expr && $.expr.filters && $.expr.filters.animated ) { - $.expr.filters.animated = ( function( orig ) { - return function( elem ) { - return !!$( elem ).data( dataSpaceAnimated ) || orig( elem ); - }; - } )( $.expr.filters.animated ); -} - -if ( $.uiBackCompat !== false ) { - $.extend( $.effects, { - - // Saves a set of properties in a data storage - save: function( element, set ) { - var i = 0, length = set.length; - for ( ; i < length; i++ ) { - if ( set[ i ] !== null ) { - element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] ); - } - } - }, - - // Restores a set of previously saved properties from a data storage - restore: function( element, set ) { - var val, i = 0, length = set.length; - for ( ; i < length; i++ ) { - if ( set[ i ] !== null ) { - val = element.data( dataSpace + set[ i ] ); - element.css( set[ i ], val ); - } - } - }, - - setMode: function( el, mode ) { - if ( mode === "toggle" ) { - mode = el.is( ":hidden" ) ? "show" : "hide"; - } - return mode; - }, - - // Wraps the element around a wrapper that copies position properties - createWrapper: function( element ) { - - // If the element is already wrapped, return it - if ( element.parent().is( ".ui-effects-wrapper" ) ) { - return element.parent(); - } - - // Wrap the element - var props = { - width: element.outerWidth( true ), - height: element.outerHeight( true ), - "float": element.css( "float" ) - }, - wrapper = $( "

    " ) - .addClass( "ui-effects-wrapper" ) - .css( { - fontSize: "100%", - background: "transparent", - border: "none", - margin: 0, - padding: 0 - } ), - - // Store the size in case width/height are defined in % - Fixes #5245 - size = { - width: element.width(), - height: element.height() - }, - active = document.activeElement; - - // Support: Firefox - // Firefox incorrectly exposes anonymous content - // https://bugzilla.mozilla.org/show_bug.cgi?id=561664 - try { - active.id; - } catch ( e ) { - active = document.body; - } - - element.wrap( wrapper ); - - // Fixes #7595 - Elements lose focus when wrapped. - if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { - $( active ).trigger( "focus" ); - } - - // Hotfix for jQuery 1.4 since some change in wrap() seems to actually - // lose the reference to the wrapped element - wrapper = element.parent(); - - // Transfer positioning properties to the wrapper - if ( element.css( "position" ) === "static" ) { - wrapper.css( { position: "relative" } ); - element.css( { position: "relative" } ); - } else { - $.extend( props, { - position: element.css( "position" ), - zIndex: element.css( "z-index" ) - } ); - $.each( [ "top", "left", "bottom", "right" ], function( i, pos ) { - props[ pos ] = element.css( pos ); - if ( isNaN( parseInt( props[ pos ], 10 ) ) ) { - props[ pos ] = "auto"; - } - } ); - element.css( { - position: "relative", - top: 0, - left: 0, - right: "auto", - bottom: "auto" - } ); - } - element.css( size ); - - return wrapper.css( props ).show(); - }, - - removeWrapper: function( element ) { - var active = document.activeElement; - - if ( element.parent().is( ".ui-effects-wrapper" ) ) { - element.parent().replaceWith( element ); - - // Fixes #7595 - Elements lose focus when wrapped. - if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { - $( active ).trigger( "focus" ); - } - } - - return element; - } - } ); -} - -$.extend( $.effects, { - version: "1.12.1", - - define: function( name, mode, effect ) { - if ( !effect ) { - effect = mode; - mode = "effect"; - } - - $.effects.effect[ name ] = effect; - $.effects.effect[ name ].mode = mode; - - return effect; - }, - - scaledDimensions: function( element, percent, direction ) { - if ( percent === 0 ) { - return { - height: 0, - width: 0, - outerHeight: 0, - outerWidth: 0 - }; - } - - var x = direction !== "horizontal" ? ( ( percent || 100 ) / 100 ) : 1, - y = direction !== "vertical" ? ( ( percent || 100 ) / 100 ) : 1; - - return { - height: element.height() * y, - width: element.width() * x, - outerHeight: element.outerHeight() * y, - outerWidth: element.outerWidth() * x - }; - - }, - - clipToBox: function( animation ) { - return { - width: animation.clip.right - animation.clip.left, - height: animation.clip.bottom - animation.clip.top, - left: animation.clip.left, - top: animation.clip.top - }; - }, - - // Injects recently queued functions to be first in line (after "inprogress") - unshift: function( element, queueLength, count ) { - var queue = element.queue(); - - if ( queueLength > 1 ) { - queue.splice.apply( queue, - [ 1, 0 ].concat( queue.splice( queueLength, count ) ) ); - } - element.dequeue(); - }, - - saveStyle: function( element ) { - element.data( dataSpaceStyle, element[ 0 ].style.cssText ); - }, - - restoreStyle: function( element ) { - element[ 0 ].style.cssText = element.data( dataSpaceStyle ) || ""; - element.removeData( dataSpaceStyle ); - }, - - mode: function( element, mode ) { - var hidden = element.is( ":hidden" ); - - if ( mode === "toggle" ) { - mode = hidden ? "show" : "hide"; - } - if ( hidden ? mode === "hide" : mode === "show" ) { - mode = "none"; - } - return mode; - }, - - // Translates a [top,left] array into a baseline value - getBaseline: function( origin, original ) { - var y, x; - - switch ( origin[ 0 ] ) { - case "top": - y = 0; - break; - case "middle": - y = 0.5; - break; - case "bottom": - y = 1; - break; - default: - y = origin[ 0 ] / original.height; - } - - switch ( origin[ 1 ] ) { - case "left": - x = 0; - break; - case "center": - x = 0.5; - break; - case "right": - x = 1; - break; - default: - x = origin[ 1 ] / original.width; - } - - return { - x: x, - y: y - }; - }, - - // Creates a placeholder element so that the original element can be made absolute - createPlaceholder: function( element ) { - var placeholder, - cssPosition = element.css( "position" ), - position = element.position(); - - // Lock in margins first to account for form elements, which - // will change margin if you explicitly set height - // see: http://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380 - // Support: Safari - element.css( { - marginTop: element.css( "marginTop" ), - marginBottom: element.css( "marginBottom" ), - marginLeft: element.css( "marginLeft" ), - marginRight: element.css( "marginRight" ) - } ) - .outerWidth( element.outerWidth() ) - .outerHeight( element.outerHeight() ); - - if ( /^(static|relative)/.test( cssPosition ) ) { - cssPosition = "absolute"; - - placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( { - - // Convert inline to inline block to account for inline elements - // that turn to inline block based on content (like img) - display: /^(inline|ruby)/.test( element.css( "display" ) ) ? - "inline-block" : - "block", - visibility: "hidden", - - // Margins need to be set to account for margin collapse - marginTop: element.css( "marginTop" ), - marginBottom: element.css( "marginBottom" ), - marginLeft: element.css( "marginLeft" ), - marginRight: element.css( "marginRight" ), - "float": element.css( "float" ) - } ) - .outerWidth( element.outerWidth() ) - .outerHeight( element.outerHeight() ) - .addClass( "ui-effects-placeholder" ); - - element.data( dataSpace + "placeholder", placeholder ); - } - - element.css( { - position: cssPosition, - left: position.left, - top: position.top - } ); - - return placeholder; - }, - - removePlaceholder: function( element ) { - var dataKey = dataSpace + "placeholder", - placeholder = element.data( dataKey ); - - if ( placeholder ) { - placeholder.remove(); - element.removeData( dataKey ); - } - }, - - // Removes a placeholder if it exists and restores - // properties that were modified during placeholder creation - cleanUp: function( element ) { - $.effects.restoreStyle( element ); - $.effects.removePlaceholder( element ); - }, - - setTransition: function( element, list, factor, value ) { - value = value || {}; - $.each( list, function( i, x ) { - var unit = element.cssUnit( x ); - if ( unit[ 0 ] > 0 ) { - value[ x ] = unit[ 0 ] * factor + unit[ 1 ]; - } - } ); - return value; - } -} ); - -// Return an effect options object for the given parameters: -function _normalizeArguments( effect, options, speed, callback ) { - - // Allow passing all options as the first parameter - if ( $.isPlainObject( effect ) ) { - options = effect; - effect = effect.effect; - } - - // Convert to an object - effect = { effect: effect }; - - // Catch (effect, null, ...) - if ( options == null ) { - options = {}; - } - - // Catch (effect, callback) - if ( $.isFunction( options ) ) { - callback = options; - speed = null; - options = {}; - } - - // Catch (effect, speed, ?) - if ( typeof options === "number" || $.fx.speeds[ options ] ) { - callback = speed; - speed = options; - options = {}; - } - - // Catch (effect, options, callback) - if ( $.isFunction( speed ) ) { - callback = speed; - speed = null; - } - - // Add options to effect - if ( options ) { - $.extend( effect, options ); - } - - speed = speed || options.duration; - effect.duration = $.fx.off ? 0 : - typeof speed === "number" ? speed : - speed in $.fx.speeds ? $.fx.speeds[ speed ] : - $.fx.speeds._default; - - effect.complete = callback || options.complete; - - return effect; -} - -function standardAnimationOption( option ) { - - // Valid standard speeds (nothing, number, named speed) - if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) { - return true; - } - - // Invalid strings - treat as "normal" speed - if ( typeof option === "string" && !$.effects.effect[ option ] ) { - return true; - } - - // Complete callback - if ( $.isFunction( option ) ) { - return true; - } - - // Options hash (but not naming an effect) - if ( typeof option === "object" && !option.effect ) { - return true; - } - - // Didn't match any standard API - return false; -} - -$.fn.extend( { - effect: function( /* effect, options, speed, callback */ ) { - var args = _normalizeArguments.apply( this, arguments ), - effectMethod = $.effects.effect[ args.effect ], - defaultMode = effectMethod.mode, - queue = args.queue, - queueName = queue || "fx", - complete = args.complete, - mode = args.mode, - modes = [], - prefilter = function( next ) { - var el = $( this ), - normalizedMode = $.effects.mode( el, mode ) || defaultMode; - - // Sentinel for duck-punching the :animated psuedo-selector - el.data( dataSpaceAnimated, true ); - - // Save effect mode for later use, - // we can't just call $.effects.mode again later, - // as the .show() below destroys the initial state - modes.push( normalizedMode ); - - // See $.uiBackCompat inside of run() for removal of defaultMode in 1.13 - if ( defaultMode && ( normalizedMode === "show" || - ( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) { - el.show(); - } - - if ( !defaultMode || normalizedMode !== "none" ) { - $.effects.saveStyle( el ); - } - - if ( $.isFunction( next ) ) { - next(); - } - }; - - if ( $.fx.off || !effectMethod ) { - - // Delegate to the original method (e.g., .show()) if possible - if ( mode ) { - return this[ mode ]( args.duration, complete ); - } else { - return this.each( function() { - if ( complete ) { - complete.call( this ); - } - } ); - } - } - - function run( next ) { - var elem = $( this ); - - function cleanup() { - elem.removeData( dataSpaceAnimated ); - - $.effects.cleanUp( elem ); - - if ( args.mode === "hide" ) { - elem.hide(); - } - - done(); - } - - function done() { - if ( $.isFunction( complete ) ) { - complete.call( elem[ 0 ] ); - } - - if ( $.isFunction( next ) ) { - next(); - } - } - - // Override mode option on a per element basis, - // as toggle can be either show or hide depending on element state - args.mode = modes.shift(); - - if ( $.uiBackCompat !== false && !defaultMode ) { - if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) { - - // Call the core method to track "olddisplay" properly - elem[ mode ](); - done(); - } else { - effectMethod.call( elem[ 0 ], args, done ); - } - } else { - if ( args.mode === "none" ) { - - // Call the core method to track "olddisplay" properly - elem[ mode ](); - done(); - } else { - effectMethod.call( elem[ 0 ], args, cleanup ); - } - } - } - - // Run prefilter on all elements first to ensure that - // any showing or hiding happens before placeholder creation, - // which ensures that any layout changes are correctly captured. - return queue === false ? - this.each( prefilter ).each( run ) : - this.queue( queueName, prefilter ).queue( queueName, run ); - }, - - show: ( function( orig ) { - return function( option ) { - if ( standardAnimationOption( option ) ) { - return orig.apply( this, arguments ); - } else { - var args = _normalizeArguments.apply( this, arguments ); - args.mode = "show"; - return this.effect.call( this, args ); - } - }; - } )( $.fn.show ), - - hide: ( function( orig ) { - return function( option ) { - if ( standardAnimationOption( option ) ) { - return orig.apply( this, arguments ); - } else { - var args = _normalizeArguments.apply( this, arguments ); - args.mode = "hide"; - return this.effect.call( this, args ); - } - }; - } )( $.fn.hide ), - - toggle: ( function( orig ) { - return function( option ) { - if ( standardAnimationOption( option ) || typeof option === "boolean" ) { - return orig.apply( this, arguments ); - } else { - var args = _normalizeArguments.apply( this, arguments ); - args.mode = "toggle"; - return this.effect.call( this, args ); - } - }; - } )( $.fn.toggle ), - - cssUnit: function( key ) { - var style = this.css( key ), - val = []; - - $.each( [ "em", "px", "%", "pt" ], function( i, unit ) { - if ( style.indexOf( unit ) > 0 ) { - val = [ parseFloat( style ), unit ]; - } - } ); - return val; - }, - - cssClip: function( clipObj ) { - if ( clipObj ) { - return this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " + - clipObj.bottom + "px " + clipObj.left + "px)" ); - } - return parseClip( this.css( "clip" ), this ); - }, - - transfer: function( options, done ) { - var element = $( this ), - target = $( options.to ), - targetFixed = target.css( "position" ) === "fixed", - body = $( "body" ), - fixTop = targetFixed ? body.scrollTop() : 0, - fixLeft = targetFixed ? body.scrollLeft() : 0, - endPosition = target.offset(), - animation = { - top: endPosition.top - fixTop, - left: endPosition.left - fixLeft, - height: target.innerHeight(), - width: target.innerWidth() - }, - startPosition = element.offset(), - transfer = $( "
    " ) - .appendTo( "body" ) - .addClass( options.className ) - .css( { - top: startPosition.top - fixTop, - left: startPosition.left - fixLeft, - height: element.innerHeight(), - width: element.innerWidth(), - position: targetFixed ? "fixed" : "absolute" - } ) - .animate( animation, options.duration, options.easing, function() { - transfer.remove(); - if ( $.isFunction( done ) ) { - done(); - } - } ); - } -} ); - -function parseClip( str, element ) { - var outerWidth = element.outerWidth(), - outerHeight = element.outerHeight(), - clipRegex = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/, - values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ]; - - return { - top: parseFloat( values[ 1 ] ) || 0, - right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ), - bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ), - left: parseFloat( values[ 4 ] ) || 0 - }; -} - -$.fx.step.clip = function( fx ) { - if ( !fx.clipInit ) { - fx.start = $( fx.elem ).cssClip(); - if ( typeof fx.end === "string" ) { - fx.end = parseClip( fx.end, fx.elem ); - } - fx.clipInit = true; - } - - $( fx.elem ).cssClip( { - top: fx.pos * ( fx.end.top - fx.start.top ) + fx.start.top, - right: fx.pos * ( fx.end.right - fx.start.right ) + fx.start.right, - bottom: fx.pos * ( fx.end.bottom - fx.start.bottom ) + fx.start.bottom, - left: fx.pos * ( fx.end.left - fx.start.left ) + fx.start.left - } ); -}; - -} )(); - -/******************************************************************************/ -/*********************************** EASING ***********************************/ -/******************************************************************************/ - -( function() { - -// Based on easing equations from Robert Penner (http://www.robertpenner.com/easing) - -var baseEasings = {}; - -$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) { - baseEasings[ name ] = function( p ) { - return Math.pow( p, i + 2 ); - }; -} ); - -$.extend( baseEasings, { - Sine: function( p ) { - return 1 - Math.cos( p * Math.PI / 2 ); - }, - Circ: function( p ) { - return 1 - Math.sqrt( 1 - p * p ); - }, - Elastic: function( p ) { - return p === 0 || p === 1 ? p : - -Math.pow( 2, 8 * ( p - 1 ) ) * Math.sin( ( ( p - 1 ) * 80 - 7.5 ) * Math.PI / 15 ); - }, - Back: function( p ) { - return p * p * ( 3 * p - 2 ); - }, - Bounce: function( p ) { - var pow2, - bounce = 4; - - while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {} - return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 ); - } -} ); - -$.each( baseEasings, function( name, easeIn ) { - $.easing[ "easeIn" + name ] = easeIn; - $.easing[ "easeOut" + name ] = function( p ) { - return 1 - easeIn( 1 - p ); - }; - $.easing[ "easeInOut" + name ] = function( p ) { - return p < 0.5 ? - easeIn( p * 2 ) / 2 : - 1 - easeIn( p * -2 + 2 ) / 2; - }; -} ); - -} )(); - -var effect = $.effects; - - -/*! - * jQuery UI Effects Blind 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Blind Effect -//>>group: Effects -//>>description: Blinds the element. -//>>docs: http://api.jqueryui.com/blind-effect/ -//>>demos: http://jqueryui.com/effect/ - - - -var effectsEffectBlind = $.effects.define( "blind", "hide", function( options, done ) { - var map = { - up: [ "bottom", "top" ], - vertical: [ "bottom", "top" ], - down: [ "top", "bottom" ], - left: [ "right", "left" ], - horizontal: [ "right", "left" ], - right: [ "left", "right" ] - }, - element = $( this ), - direction = options.direction || "up", - start = element.cssClip(), - animate = { clip: $.extend( {}, start ) }, - placeholder = $.effects.createPlaceholder( element ); - - animate.clip[ map[ direction ][ 0 ] ] = animate.clip[ map[ direction ][ 1 ] ]; - - if ( options.mode === "show" ) { - element.cssClip( animate.clip ); - if ( placeholder ) { - placeholder.css( $.effects.clipToBox( animate ) ); - } - - animate.clip = start; - } - - if ( placeholder ) { - placeholder.animate( $.effects.clipToBox( animate ), options.duration, options.easing ); - } - - element.animate( animate, { - queue: false, - duration: options.duration, - easing: options.easing, - complete: done - } ); -} ); - - -/*! - * jQuery UI Effects Bounce 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Bounce Effect -//>>group: Effects -//>>description: Bounces an element horizontally or vertically n times. -//>>docs: http://api.jqueryui.com/bounce-effect/ -//>>demos: http://jqueryui.com/effect/ - - - -var effectsEffectBounce = $.effects.define( "bounce", function( options, done ) { - var upAnim, downAnim, refValue, - element = $( this ), - - // Defaults: - mode = options.mode, - hide = mode === "hide", - show = mode === "show", - direction = options.direction || "up", - distance = options.distance, - times = options.times || 5, - - // Number of internal animations - anims = times * 2 + ( show || hide ? 1 : 0 ), - speed = options.duration / anims, - easing = options.easing, - - // Utility: - ref = ( direction === "up" || direction === "down" ) ? "top" : "left", - motion = ( direction === "up" || direction === "left" ), - i = 0, - - queuelen = element.queue().length; - - $.effects.createPlaceholder( element ); - - refValue = element.css( ref ); - - // Default distance for the BIGGEST bounce is the outer Distance / 3 - if ( !distance ) { - distance = element[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3; - } - - if ( show ) { - downAnim = { opacity: 1 }; - downAnim[ ref ] = refValue; - - // If we are showing, force opacity 0 and set the initial position - // then do the "first" animation - element - .css( "opacity", 0 ) - .css( ref, motion ? -distance * 2 : distance * 2 ) - .animate( downAnim, speed, easing ); - } - - // Start at the smallest distance if we are hiding - if ( hide ) { - distance = distance / Math.pow( 2, times - 1 ); - } - - downAnim = {}; - downAnim[ ref ] = refValue; - - // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here - for ( ; i < times; i++ ) { - upAnim = {}; - upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; - - element - .animate( upAnim, speed, easing ) - .animate( downAnim, speed, easing ); - - distance = hide ? distance * 2 : distance / 2; - } - - // Last Bounce when Hiding - if ( hide ) { - upAnim = { opacity: 0 }; - upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; - - element.animate( upAnim, speed, easing ); - } - - element.queue( done ); - - $.effects.unshift( element, queuelen, anims + 1 ); -} ); - - -/*! - * jQuery UI Effects Clip 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Clip Effect -//>>group: Effects -//>>description: Clips the element on and off like an old TV. -//>>docs: http://api.jqueryui.com/clip-effect/ -//>>demos: http://jqueryui.com/effect/ - - - -var effectsEffectClip = $.effects.define( "clip", "hide", function( options, done ) { - var start, - animate = {}, - element = $( this ), - direction = options.direction || "vertical", - both = direction === "both", - horizontal = both || direction === "horizontal", - vertical = both || direction === "vertical"; - - start = element.cssClip(); - animate.clip = { - top: vertical ? ( start.bottom - start.top ) / 2 : start.top, - right: horizontal ? ( start.right - start.left ) / 2 : start.right, - bottom: vertical ? ( start.bottom - start.top ) / 2 : start.bottom, - left: horizontal ? ( start.right - start.left ) / 2 : start.left - }; - - $.effects.createPlaceholder( element ); - - if ( options.mode === "show" ) { - element.cssClip( animate.clip ); - animate.clip = start; - } - - element.animate( animate, { - queue: false, - duration: options.duration, - easing: options.easing, - complete: done - } ); - -} ); - - -/*! - * jQuery UI Effects Drop 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Drop Effect -//>>group: Effects -//>>description: Moves an element in one direction and hides it at the same time. -//>>docs: http://api.jqueryui.com/drop-effect/ -//>>demos: http://jqueryui.com/effect/ - - - -var effectsEffectDrop = $.effects.define( "drop", "hide", function( options, done ) { - - var distance, - element = $( this ), - mode = options.mode, - show = mode === "show", - direction = options.direction || "left", - ref = ( direction === "up" || direction === "down" ) ? "top" : "left", - motion = ( direction === "up" || direction === "left" ) ? "-=" : "+=", - oppositeMotion = ( motion === "+=" ) ? "-=" : "+=", - animation = { - opacity: 0 - }; - - $.effects.createPlaceholder( element ); - - distance = options.distance || - element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2; - - animation[ ref ] = motion + distance; - - if ( show ) { - element.css( animation ); - - animation[ ref ] = oppositeMotion + distance; - animation.opacity = 1; - } - - // Animate - element.animate( animation, { - queue: false, - duration: options.duration, - easing: options.easing, - complete: done - } ); -} ); - - -/*! - * jQuery UI Effects Explode 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Explode Effect -//>>group: Effects -// jscs:disable maximumLineLength -//>>description: Explodes an element in all directions into n pieces. Implodes an element to its original wholeness. -// jscs:enable maximumLineLength -//>>docs: http://api.jqueryui.com/explode-effect/ -//>>demos: http://jqueryui.com/effect/ - - - -var effectsEffectExplode = $.effects.define( "explode", "hide", function( options, done ) { - - var i, j, left, top, mx, my, - rows = options.pieces ? Math.round( Math.sqrt( options.pieces ) ) : 3, - cells = rows, - element = $( this ), - mode = options.mode, - show = mode === "show", - - // Show and then visibility:hidden the element before calculating offset - offset = element.show().css( "visibility", "hidden" ).offset(), - - // Width and height of a piece - width = Math.ceil( element.outerWidth() / cells ), - height = Math.ceil( element.outerHeight() / rows ), - pieces = []; - - // Children animate complete: - function childComplete() { - pieces.push( this ); - if ( pieces.length === rows * cells ) { - animComplete(); - } - } - - // Clone the element for each row and cell. - for ( i = 0; i < rows; i++ ) { // ===> - top = offset.top + i * height; - my = i - ( rows - 1 ) / 2; - - for ( j = 0; j < cells; j++ ) { // ||| - left = offset.left + j * width; - mx = j - ( cells - 1 ) / 2; - - // Create a clone of the now hidden main element that will be absolute positioned - // within a wrapper div off the -left and -top equal to size of our pieces - element - .clone() - .appendTo( "body" ) - .wrap( "
    " ) - .css( { - position: "absolute", - visibility: "visible", - left: -j * width, - top: -i * height - } ) - - // Select the wrapper - make it overflow: hidden and absolute positioned based on - // where the original was located +left and +top equal to the size of pieces - .parent() - .addClass( "ui-effects-explode" ) - .css( { - position: "absolute", - overflow: "hidden", - width: width, - height: height, - left: left + ( show ? mx * width : 0 ), - top: top + ( show ? my * height : 0 ), - opacity: show ? 0 : 1 - } ) - .animate( { - left: left + ( show ? 0 : mx * width ), - top: top + ( show ? 0 : my * height ), - opacity: show ? 1 : 0 - }, options.duration || 500, options.easing, childComplete ); - } - } - - function animComplete() { - element.css( { - visibility: "visible" - } ); - $( pieces ).remove(); - done(); - } -} ); - - -/*! - * jQuery UI Effects Fade 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Fade Effect -//>>group: Effects -//>>description: Fades the element. -//>>docs: http://api.jqueryui.com/fade-effect/ -//>>demos: http://jqueryui.com/effect/ - - - -var effectsEffectFade = $.effects.define( "fade", "toggle", function( options, done ) { - var show = options.mode === "show"; - - $( this ) - .css( "opacity", show ? 0 : 1 ) - .animate( { - opacity: show ? 1 : 0 - }, { - queue: false, - duration: options.duration, - easing: options.easing, - complete: done - } ); -} ); - - -/*! - * jQuery UI Effects Fold 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Fold Effect -//>>group: Effects -//>>description: Folds an element first horizontally and then vertically. -//>>docs: http://api.jqueryui.com/fold-effect/ -//>>demos: http://jqueryui.com/effect/ - - - -var effectsEffectFold = $.effects.define( "fold", "hide", function( options, done ) { - - // Create element - var element = $( this ), - mode = options.mode, - show = mode === "show", - hide = mode === "hide", - size = options.size || 15, - percent = /([0-9]+)%/.exec( size ), - horizFirst = !!options.horizFirst, - ref = horizFirst ? [ "right", "bottom" ] : [ "bottom", "right" ], - duration = options.duration / 2, - - placeholder = $.effects.createPlaceholder( element ), - - start = element.cssClip(), - animation1 = { clip: $.extend( {}, start ) }, - animation2 = { clip: $.extend( {}, start ) }, - - distance = [ start[ ref[ 0 ] ], start[ ref[ 1 ] ] ], - - queuelen = element.queue().length; - - if ( percent ) { - size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ]; - } - animation1.clip[ ref[ 0 ] ] = size; - animation2.clip[ ref[ 0 ] ] = size; - animation2.clip[ ref[ 1 ] ] = 0; - - if ( show ) { - element.cssClip( animation2.clip ); - if ( placeholder ) { - placeholder.css( $.effects.clipToBox( animation2 ) ); - } - - animation2.clip = start; - } - - // Animate - element - .queue( function( next ) { - if ( placeholder ) { - placeholder - .animate( $.effects.clipToBox( animation1 ), duration, options.easing ) - .animate( $.effects.clipToBox( animation2 ), duration, options.easing ); - } - - next(); - } ) - .animate( animation1, duration, options.easing ) - .animate( animation2, duration, options.easing ) - .queue( done ); - - $.effects.unshift( element, queuelen, 4 ); -} ); - - -/*! - * jQuery UI Effects Highlight 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Highlight Effect -//>>group: Effects -//>>description: Highlights the background of an element in a defined color for a custom duration. -//>>docs: http://api.jqueryui.com/highlight-effect/ -//>>demos: http://jqueryui.com/effect/ - - - -var effectsEffectHighlight = $.effects.define( "highlight", "show", function( options, done ) { - var element = $( this ), - animation = { - backgroundColor: element.css( "backgroundColor" ) - }; - - if ( options.mode === "hide" ) { - animation.opacity = 0; - } - - $.effects.saveStyle( element ); - - element - .css( { - backgroundImage: "none", - backgroundColor: options.color || "#ffff99" - } ) - .animate( animation, { - queue: false, - duration: options.duration, - easing: options.easing, - complete: done - } ); -} ); - - -/*! - * jQuery UI Effects Size 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Size Effect -//>>group: Effects -//>>description: Resize an element to a specified width and height. -//>>docs: http://api.jqueryui.com/size-effect/ -//>>demos: http://jqueryui.com/effect/ - - - -var effectsEffectSize = $.effects.define( "size", function( options, done ) { - - // Create element - var baseline, factor, temp, - element = $( this ), - - // Copy for children - cProps = [ "fontSize" ], - vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ], - hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ], - - // Set options - mode = options.mode, - restore = mode !== "effect", - scale = options.scale || "both", - origin = options.origin || [ "middle", "center" ], - position = element.css( "position" ), - pos = element.position(), - original = $.effects.scaledDimensions( element ), - from = options.from || original, - to = options.to || $.effects.scaledDimensions( element, 0 ); - - $.effects.createPlaceholder( element ); - - if ( mode === "show" ) { - temp = from; - from = to; - to = temp; - } - - // Set scaling factor - factor = { - from: { - y: from.height / original.height, - x: from.width / original.width - }, - to: { - y: to.height / original.height, - x: to.width / original.width - } - }; - - // Scale the css box - if ( scale === "box" || scale === "both" ) { - - // Vertical props scaling - if ( factor.from.y !== factor.to.y ) { - from = $.effects.setTransition( element, vProps, factor.from.y, from ); - to = $.effects.setTransition( element, vProps, factor.to.y, to ); - } - - // Horizontal props scaling - if ( factor.from.x !== factor.to.x ) { - from = $.effects.setTransition( element, hProps, factor.from.x, from ); - to = $.effects.setTransition( element, hProps, factor.to.x, to ); - } - } - - // Scale the content - if ( scale === "content" || scale === "both" ) { - - // Vertical props scaling - if ( factor.from.y !== factor.to.y ) { - from = $.effects.setTransition( element, cProps, factor.from.y, from ); - to = $.effects.setTransition( element, cProps, factor.to.y, to ); - } - } - - // Adjust the position properties based on the provided origin points - if ( origin ) { - baseline = $.effects.getBaseline( origin, original ); - from.top = ( original.outerHeight - from.outerHeight ) * baseline.y + pos.top; - from.left = ( original.outerWidth - from.outerWidth ) * baseline.x + pos.left; - to.top = ( original.outerHeight - to.outerHeight ) * baseline.y + pos.top; - to.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left; - } - element.css( from ); - - // Animate the children if desired - if ( scale === "content" || scale === "both" ) { - - vProps = vProps.concat( [ "marginTop", "marginBottom" ] ).concat( cProps ); - hProps = hProps.concat( [ "marginLeft", "marginRight" ] ); - - // Only animate children with width attributes specified - // TODO: is this right? should we include anything with css width specified as well - element.find( "*[width]" ).each( function() { - var child = $( this ), - childOriginal = $.effects.scaledDimensions( child ), - childFrom = { - height: childOriginal.height * factor.from.y, - width: childOriginal.width * factor.from.x, - outerHeight: childOriginal.outerHeight * factor.from.y, - outerWidth: childOriginal.outerWidth * factor.from.x - }, - childTo = { - height: childOriginal.height * factor.to.y, - width: childOriginal.width * factor.to.x, - outerHeight: childOriginal.height * factor.to.y, - outerWidth: childOriginal.width * factor.to.x - }; - - // Vertical props scaling - if ( factor.from.y !== factor.to.y ) { - childFrom = $.effects.setTransition( child, vProps, factor.from.y, childFrom ); - childTo = $.effects.setTransition( child, vProps, factor.to.y, childTo ); - } - - // Horizontal props scaling - if ( factor.from.x !== factor.to.x ) { - childFrom = $.effects.setTransition( child, hProps, factor.from.x, childFrom ); - childTo = $.effects.setTransition( child, hProps, factor.to.x, childTo ); - } - - if ( restore ) { - $.effects.saveStyle( child ); - } - - // Animate children - child.css( childFrom ); - child.animate( childTo, options.duration, options.easing, function() { - - // Restore children - if ( restore ) { - $.effects.restoreStyle( child ); - } - } ); - } ); - } - - // Animate - element.animate( to, { - queue: false, - duration: options.duration, - easing: options.easing, - complete: function() { - - var offset = element.offset(); - - if ( to.opacity === 0 ) { - element.css( "opacity", from.opacity ); - } - - if ( !restore ) { - element - .css( "position", position === "static" ? "relative" : position ) - .offset( offset ); - - // Need to save style here so that automatic style restoration - // doesn't restore to the original styles from before the animation. - $.effects.saveStyle( element ); - } - - done(); - } - } ); - -} ); - - -/*! - * jQuery UI Effects Scale 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Scale Effect -//>>group: Effects -//>>description: Grows or shrinks an element and its content. -//>>docs: http://api.jqueryui.com/scale-effect/ -//>>demos: http://jqueryui.com/effect/ - - - -var effectsEffectScale = $.effects.define( "scale", function( options, done ) { - - // Create element - var el = $( this ), - mode = options.mode, - percent = parseInt( options.percent, 10 ) || - ( parseInt( options.percent, 10 ) === 0 ? 0 : ( mode !== "effect" ? 0 : 100 ) ), - - newOptions = $.extend( true, { - from: $.effects.scaledDimensions( el ), - to: $.effects.scaledDimensions( el, percent, options.direction || "both" ), - origin: options.origin || [ "middle", "center" ] - }, options ); - - // Fade option to support puff - if ( options.fade ) { - newOptions.from.opacity = 1; - newOptions.to.opacity = 0; - } - - $.effects.effect.size.call( this, newOptions, done ); -} ); - - -/*! - * jQuery UI Effects Puff 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Puff Effect -//>>group: Effects -//>>description: Creates a puff effect by scaling the element up and hiding it at the same time. -//>>docs: http://api.jqueryui.com/puff-effect/ -//>>demos: http://jqueryui.com/effect/ - - - -var effectsEffectPuff = $.effects.define( "puff", "hide", function( options, done ) { - var newOptions = $.extend( true, {}, options, { - fade: true, - percent: parseInt( options.percent, 10 ) || 150 - } ); - - $.effects.effect.scale.call( this, newOptions, done ); -} ); - - -/*! - * jQuery UI Effects Pulsate 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Pulsate Effect -//>>group: Effects -//>>description: Pulsates an element n times by changing the opacity to zero and back. -//>>docs: http://api.jqueryui.com/pulsate-effect/ -//>>demos: http://jqueryui.com/effect/ - - - -var effectsEffectPulsate = $.effects.define( "pulsate", "show", function( options, done ) { - var element = $( this ), - mode = options.mode, - show = mode === "show", - hide = mode === "hide", - showhide = show || hide, - - // Showing or hiding leaves off the "last" animation - anims = ( ( options.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ), - duration = options.duration / anims, - animateTo = 0, - i = 1, - queuelen = element.queue().length; - - if ( show || !element.is( ":visible" ) ) { - element.css( "opacity", 0 ).show(); - animateTo = 1; - } - - // Anims - 1 opacity "toggles" - for ( ; i < anims; i++ ) { - element.animate( { opacity: animateTo }, duration, options.easing ); - animateTo = 1 - animateTo; - } - - element.animate( { opacity: animateTo }, duration, options.easing ); - - element.queue( done ); - - $.effects.unshift( element, queuelen, anims + 1 ); -} ); - - -/*! - * jQuery UI Effects Shake 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Shake Effect -//>>group: Effects -//>>description: Shakes an element horizontally or vertically n times. -//>>docs: http://api.jqueryui.com/shake-effect/ -//>>demos: http://jqueryui.com/effect/ - - - -var effectsEffectShake = $.effects.define( "shake", function( options, done ) { - - var i = 1, - element = $( this ), - direction = options.direction || "left", - distance = options.distance || 20, - times = options.times || 3, - anims = times * 2 + 1, - speed = Math.round( options.duration / anims ), - ref = ( direction === "up" || direction === "down" ) ? "top" : "left", - positiveMotion = ( direction === "up" || direction === "left" ), - animation = {}, - animation1 = {}, - animation2 = {}, - - queuelen = element.queue().length; - - $.effects.createPlaceholder( element ); - - // Animation - animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance; - animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2; - animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2; - - // Animate - element.animate( animation, speed, options.easing ); - - // Shakes - for ( ; i < times; i++ ) { - element - .animate( animation1, speed, options.easing ) - .animate( animation2, speed, options.easing ); - } - - element - .animate( animation1, speed, options.easing ) - .animate( animation, speed / 2, options.easing ) - .queue( done ); - - $.effects.unshift( element, queuelen, anims + 1 ); -} ); - - -/*! - * jQuery UI Effects Slide 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Slide Effect -//>>group: Effects -//>>description: Slides an element in and out of the viewport. -//>>docs: http://api.jqueryui.com/slide-effect/ -//>>demos: http://jqueryui.com/effect/ - - - -var effectsEffectSlide = $.effects.define( "slide", "show", function( options, done ) { - var startClip, startRef, - element = $( this ), - map = { - up: [ "bottom", "top" ], - down: [ "top", "bottom" ], - left: [ "right", "left" ], - right: [ "left", "right" ] - }, - mode = options.mode, - direction = options.direction || "left", - ref = ( direction === "up" || direction === "down" ) ? "top" : "left", - positiveMotion = ( direction === "up" || direction === "left" ), - distance = options.distance || - element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ), - animation = {}; - - $.effects.createPlaceholder( element ); - - startClip = element.cssClip(); - startRef = element.position()[ ref ]; - - // Define hide animation - animation[ ref ] = ( positiveMotion ? -1 : 1 ) * distance + startRef; - animation.clip = element.cssClip(); - animation.clip[ map[ direction ][ 1 ] ] = animation.clip[ map[ direction ][ 0 ] ]; - - // Reverse the animation if we're showing - if ( mode === "show" ) { - element.cssClip( animation.clip ); - element.css( ref, animation[ ref ] ); - animation.clip = startClip; - animation[ ref ] = startRef; - } - - // Actually animate - element.animate( animation, { - queue: false, - duration: options.duration, - easing: options.easing, - complete: done - } ); -} ); - - -/*! - * jQuery UI Effects Transfer 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Transfer Effect -//>>group: Effects -//>>description: Displays a transfer effect from one element to another. -//>>docs: http://api.jqueryui.com/transfer-effect/ -//>>demos: http://jqueryui.com/effect/ - - - -var effect; -if ( $.uiBackCompat !== false ) { - effect = $.effects.define( "transfer", function( options, done ) { - $( this ).transfer( options, done ); - } ); -} -var effectsEffectTransfer = effect; - - -/*! - * jQuery UI Focusable 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: :focusable Selector -//>>group: Core -//>>description: Selects elements which can be focused. -//>>docs: http://api.jqueryui.com/focusable-selector/ - - - -// Selectors -$.ui.focusable = function( element, hasTabindex ) { - var map, mapName, img, focusableIfVisible, fieldset, - nodeName = element.nodeName.toLowerCase(); - - if ( "area" === nodeName ) { - map = element.parentNode; - mapName = map.name; - if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { - return false; - } - img = $( "img[usemap='#" + mapName + "']" ); - return img.length > 0 && img.is( ":visible" ); - } - - if ( /^(input|select|textarea|button|object)$/.test( nodeName ) ) { - focusableIfVisible = !element.disabled; - - if ( focusableIfVisible ) { - - // Form controls within a disabled fieldset are disabled. - // However, controls within the fieldset's legend do not get disabled. - // Since controls generally aren't placed inside legends, we skip - // this portion of the check. - fieldset = $( element ).closest( "fieldset" )[ 0 ]; - if ( fieldset ) { - focusableIfVisible = !fieldset.disabled; - } - } - } else if ( "a" === nodeName ) { - focusableIfVisible = element.href || hasTabindex; - } else { - focusableIfVisible = hasTabindex; - } - - return focusableIfVisible && $( element ).is( ":visible" ) && visible( $( element ) ); -}; - -// Support: IE 8 only -// IE 8 doesn't resolve inherit to visible/hidden for computed values -function visible( element ) { - var visibility = element.css( "visibility" ); - while ( visibility === "inherit" ) { - element = element.parent(); - visibility = element.css( "visibility" ); - } - return visibility !== "hidden"; -} - -$.extend( $.expr[ ":" ], { - focusable: function( element ) { - return $.ui.focusable( element, $.attr( element, "tabindex" ) != null ); - } -} ); - -var focusable = $.ui.focusable; - - - - -// Support: IE8 Only -// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop -// with a string, so we need to find the proper form. -var form = $.fn.form = function() { - return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form ); -}; - - -/*! - * jQuery UI Form Reset Mixin 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Form Reset Mixin -//>>group: Core -//>>description: Refresh input widgets when their form is reset -//>>docs: http://api.jqueryui.com/form-reset-mixin/ - - - -var formResetMixin = $.ui.formResetMixin = { - _formResetHandler: function() { - var form = $( this ); - - // Wait for the form reset to actually happen before refreshing - setTimeout( function() { - var instances = form.data( "ui-form-reset-instances" ); - $.each( instances, function() { - this.refresh(); - } ); - } ); - }, - - _bindFormResetHandler: function() { - this.form = this.element.form(); - if ( !this.form.length ) { - return; - } - - var instances = this.form.data( "ui-form-reset-instances" ) || []; - if ( !instances.length ) { - - // We don't use _on() here because we use a single event handler per form - this.form.on( "reset.ui-form-reset", this._formResetHandler ); - } - instances.push( this ); - this.form.data( "ui-form-reset-instances", instances ); - }, - - _unbindFormResetHandler: function() { - if ( !this.form.length ) { - return; - } - - var instances = this.form.data( "ui-form-reset-instances" ); - instances.splice( $.inArray( this, instances ), 1 ); - if ( instances.length ) { - this.form.data( "ui-form-reset-instances", instances ); - } else { - this.form - .removeData( "ui-form-reset-instances" ) - .off( "reset.ui-form-reset" ); - } - } -}; - - -/*! - * jQuery UI Support for jQuery core 1.7.x 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - */ - -//>>label: jQuery 1.7 Support -//>>group: Core -//>>description: Support version 1.7.x of jQuery core - - - -// Support: jQuery 1.7 only -// Not a great way to check versions, but since we only support 1.7+ and only -// need to detect <1.8, this is a simple check that should suffice. Checking -// for "1.7." would be a bit safer, but the version string is 1.7, not 1.7.0 -// and we'll never reach 1.70.0 (if we do, we certainly won't be supporting -// 1.7 anymore). See #11197 for why we're not using feature detection. -if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) { - - // Setters for .innerWidth(), .innerHeight(), .outerWidth(), .outerHeight() - // Unlike jQuery Core 1.8+, these only support numeric values to set the - // dimensions in pixels - $.each( [ "Width", "Height" ], function( i, name ) { - var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], - type = name.toLowerCase(), - orig = { - innerWidth: $.fn.innerWidth, - innerHeight: $.fn.innerHeight, - outerWidth: $.fn.outerWidth, - outerHeight: $.fn.outerHeight - }; - - function reduce( elem, size, border, margin ) { - $.each( side, function() { - size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; - if ( border ) { - size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; - } - if ( margin ) { - size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; - } - } ); - return size; - } - - $.fn[ "inner" + name ] = function( size ) { - if ( size === undefined ) { - return orig[ "inner" + name ].call( this ); - } - - return this.each( function() { - $( this ).css( type, reduce( this, size ) + "px" ); - } ); - }; - - $.fn[ "outer" + name ] = function( size, margin ) { - if ( typeof size !== "number" ) { - return orig[ "outer" + name ].call( this, size ); - } - - return this.each( function() { - $( this ).css( type, reduce( this, size, true, margin ) + "px" ); - } ); - }; - } ); - - $.fn.addBack = function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - }; -} - -; -/*! - * jQuery UI Keycode 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Keycode -//>>group: Core -//>>description: Provide keycodes as keynames -//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/ - - -var keycode = $.ui.keyCode = { - BACKSPACE: 8, - COMMA: 188, - DELETE: 46, - DOWN: 40, - END: 35, - ENTER: 13, - ESCAPE: 27, - HOME: 36, - LEFT: 37, - PAGE_DOWN: 34, - PAGE_UP: 33, - PERIOD: 190, - RIGHT: 39, - SPACE: 32, - TAB: 9, - UP: 38 -}; - - - - -// Internal use only -var escapeSelector = $.ui.escapeSelector = ( function() { - var selectorEscape = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g; - return function( selector ) { - return selector.replace( selectorEscape, "\\$1" ); - }; -} )(); - - -/*! - * jQuery UI Labels 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: labels -//>>group: Core -//>>description: Find all the labels associated with a given input -//>>docs: http://api.jqueryui.com/labels/ - - - -var labels = $.fn.labels = function() { - var ancestor, selector, id, labels, ancestors; - - // Check control.labels first - if ( this[ 0 ].labels && this[ 0 ].labels.length ) { - return this.pushStack( this[ 0 ].labels ); - } - - // Support: IE <= 11, FF <= 37, Android <= 2.3 only - // Above browsers do not support control.labels. Everything below is to support them - // as well as document fragments. control.labels does not work on document fragments - labels = this.eq( 0 ).parents( "label" ); - - // Look for the label based on the id - id = this.attr( "id" ); - if ( id ) { - - // We don't search against the document in case the element - // is disconnected from the DOM - ancestor = this.eq( 0 ).parents().last(); - - // Get a full set of top level ancestors - ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() ); - - // Create a selector for the label based on the id - selector = "label[for='" + $.ui.escapeSelector( id ) + "']"; - - labels = labels.add( ancestors.find( selector ).addBack( selector ) ); - - } - - // Return whatever we have found for labels - return this.pushStack( labels ); -}; - - -/*! - * jQuery UI Scroll Parent 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: scrollParent -//>>group: Core -//>>description: Get the closest ancestor element that is scrollable. -//>>docs: http://api.jqueryui.com/scrollParent/ - - - -var scrollParent = $.fn.scrollParent = function( includeHidden ) { - var position = this.css( "position" ), - excludeStaticParent = position === "absolute", - overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/, - scrollParent = this.parents().filter( function() { - var parent = $( this ); - if ( excludeStaticParent && parent.css( "position" ) === "static" ) { - return false; - } - return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + - parent.css( "overflow-x" ) ); - } ).eq( 0 ); - - return position === "fixed" || !scrollParent.length ? - $( this[ 0 ].ownerDocument || document ) : - scrollParent; -}; - - -/*! - * jQuery UI Tabbable 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: :tabbable Selector -//>>group: Core -//>>description: Selects elements which can be tabbed to. -//>>docs: http://api.jqueryui.com/tabbable-selector/ - - - -var tabbable = $.extend( $.expr[ ":" ], { - tabbable: function( element ) { - var tabIndex = $.attr( element, "tabindex" ), - hasTabindex = tabIndex != null; - return ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex ); - } -} ); - - -/*! - * jQuery UI Unique ID 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: uniqueId -//>>group: Core -//>>description: Functions to generate and remove uniqueId's -//>>docs: http://api.jqueryui.com/uniqueId/ - - - -var uniqueId = $.fn.extend( { - uniqueId: ( function() { - var uuid = 0; - - return function() { - return this.each( function() { - if ( !this.id ) { - this.id = "ui-id-" + ( ++uuid ); - } - } ); - }; - } )(), - - removeUniqueId: function() { - return this.each( function() { - if ( /^ui-id-\d+$/.test( this.id ) ) { - $( this ).removeAttr( "id" ); - } - } ); - } -} ); - - -/*! - * jQuery UI Accordion 1.12.1 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Accordion -//>>group: Widgets -// jscs:disable maximumLineLength -//>>description: Displays collapsible content panels for presenting information in a limited amount of space. -// jscs:enable maximumLineLength -//>>docs: http://api.jqueryui.com/accordion/ -//>>demos: http://jqueryui.com/accordion/ -//>>css.structure: ../../themes/base/core.css -//>>css.structure: ../../themes/base/accordion.css -//>>css.theme: ../../themes/base/theme.css - - - -var widgetsAccordion = $.widget( "ui.accordion", { - version: "1.12.1", - options: { - active: 0, - animate: {}, - classes: { - "ui-accordion-header": "ui-corner-top", - "ui-accordion-header-collapsed": "ui-corner-all", - "ui-accordion-content": "ui-corner-bottom" - }, - collapsible: false, - event: "click", - header: "> li > :first-child, > :not(li):even", - heightStyle: "auto", - icons: { - activeHeader: "ui-icon-triangle-1-s", - header: "ui-icon-triangle-1-e" - }, - - // Callbacks - activate: null, - beforeActivate: null - }, - - hideProps: { - borderTopWidth: "hide", - borderBottomWidth: "hide", - paddingTop: "hide", - paddingBottom: "hide", - height: "hide" - }, - - showProps: { - borderTopWidth: "show", - borderBottomWidth: "show", - paddingTop: "show", - paddingBottom: "show", - height: "show" - }, - - _create: function() { - var options = this.options; - - this.prevShow = this.prevHide = $(); - this._addClass( "ui-accordion", "ui-widget ui-helper-reset" ); - this.element.attr( "role", "tablist" ); - - // Don't allow collapsible: false and active: false / null - if ( !options.collapsible && ( options.active === false || options.active == null ) ) { - options.active = 0; - } - - this._processPanels(); - - // handle negative values - if ( options.active < 0 ) { - options.active += this.headers.length; - } - this._refresh(); - }, - - _getCreateEventData: function() { - return { - header: this.active, - panel: !this.active.length ? $() : this.active.next() - }; - }, - - _createIcons: function() { - var icon, children, - icons = this.options.icons; - - if ( icons ) { - icon = $( "" ); - this._addClass( icon, "ui-accordion-header-icon", "ui-icon " + icons.header ); - icon.prependTo( this.headers ); - children = this.active.children( ".ui-accordion-header-icon" ); - this._removeClass( children, icons.header ) - ._addClass( children, null, icons.activeHeader ) - ._addClass( this.headers, "ui-accordion-icons" ); - } - }, - - _destroyIcons: function() { - this._removeClass( this.headers, "ui-accordion-icons" ); - this.headers.children( ".ui-accordion-header-icon" ).remove(); - }, - - _destroy: function() { - var contents; - - // Clean up main element - this.element.removeAttr( "role" ); - - // Clean up headers - this.headers - .removeAttr( "role aria-expanded aria-selected aria-controls tabIndex" ) - .removeUniqueId(); - - this._destroyIcons(); - - // Clean up content panels - contents = this.headers.next() - .css( "display", "" ) - .removeAttr( "role aria-hidden aria-labelledby" ) - .removeUniqueId(); - - if ( this.options.heightStyle !== "content" ) { - contents.css( "height", "" ); - } - }, - - _setOption: function( key, value ) { - if ( key === "active" ) { - - // _activate() will handle invalid values and update this.options - this._activate( value ); - return; - } - - if ( key === "event" ) { - if ( this.options.event ) { - this._off( this.headers, this.options.event ); - } - this._setupEvents( value ); - } - - this._super( key, value ); - - // Setting collapsible: false while collapsed; open first panel - if ( key === "collapsible" && !value && this.options.active === false ) { - this._activate( 0 ); - } - - if ( key === "icons" ) { - this._destroyIcons(); - if ( value ) { - this._createIcons(); - } - } - }, - - _setOptionDisabled: function( value ) { - this._super( value ); - - this.element.attr( "aria-disabled", value ); - - // Support: IE8 Only - // #5332 / #6059 - opacity doesn't cascade to positioned elements in IE - // so we need to add the disabled class to the headers and panels - this._toggleClass( null, "ui-state-disabled", !!value ); - this._toggleClass( this.headers.add( this.headers.next() ), null, "ui-state-disabled", - !!value ); - }, - - _keydown: function( event ) { - if ( event.altKey || event.ctrlKey ) { - return; - } - - var keyCode = $.ui.keyCode, - length = this.headers.length, - currentIndex = this.headers.index( event.target ), - toFocus = false; - - switch ( event.keyCode ) { - case keyCode.RIGHT: - case keyCode.DOWN: - toFocus = this.headers[ ( currentIndex + 1 ) % length ]; - break; - case keyCode.LEFT: - case keyCode.UP: - toFocus = this.headers[ ( currentIndex - 1 + length ) % length ]; - break; - case keyCode.SPACE: - case keyCode.ENTER: - this._eventHandler( event ); - break; - case keyCode.HOME: - toFocus = this.headers[ 0 ]; - break; - case keyCode.END: - toFocus = this.headers[ length - 1 ]; - break; - } - - if ( toFocus ) { - $( event.target ).attr( "tabIndex", -1 ); - $( toFocus ).attr( "tabIndex", 0 ); - $( toFocus ).trigger( "focus" ); - event.preventDefault(); - } - }, - - _panelKeyDown: function( event ) { - if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) { - $( event.currentTarget ).prev().trigger( "focus" ); - } - }, - - refresh: function() { - var options = this.options; - this._processPanels(); - - // Was collapsed or no panel - if ( ( options.active === false && options.collapsible === true ) || - !this.headers.length ) { - options.active = false; - this.active = $(); - - // active false only when collapsible is true - } else if ( options.active === false ) { - this._activate( 0 ); - - // was active, but active panel is gone - } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { - - // all remaining panel are disabled - if ( this.headers.length === this.headers.find( ".ui-state-disabled" ).length ) { - options.active = false; - this.active = $(); - - // activate previous panel - } else { - this._activate( Math.max( 0, options.active - 1 ) ); - } - - // was active, active panel still exists - } else { - - // make sure active index is correct - options.active = this.headers.index( this.active ); - } - - this._destroyIcons(); - - this._refresh(); - }, - - _processPanels: function() { - var prevHeaders = this.headers, - prevPanels = this.panels; - - this.headers = this.element.find( this.options.header ); - this._addClass( this.headers, "ui-accordion-header ui-accordion-header-collapsed", - "ui-state-default" ); - - this.panels = this.headers.next().filter( ":not(.ui-accordion-content-active)" ).hide(); - this._addClass( this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content" ); - - // Avoid memory leaks (#10056) - if ( prevPanels ) { - this._off( prevHeaders.not( this.headers ) ); - this._off( prevPanels.not( this.panels ) ); - } - }, - - _refresh: function() { - var maxHeight, - options = this.options, - heightStyle = options.heightStyle, - parent = this.element.parent(); - - this.active = this._findActive( options.active ); - this._addClass( this.active, "ui-accordion-header-active", "ui-state-active" ) - ._removeClass( this.active, "ui-accordion-header-collapsed" ); - this._addClass( this.active.next(), "ui-accordion-content-active" ); - this.active.next().show(); - - this.headers - .attr( "role", "tab" ) - .each( function() { - var header = $( this ), - headerId = header.uniqueId().attr( "id" ), - panel = header.next(), - panelId = panel.uniqueId().attr( "id" ); - header.attr( "aria-controls", panelId ); - panel.attr( "aria-labelledby", headerId ); - } ) - .next() - .attr( "role", "tabpanel" ); - - this.headers - .not( this.active ) - .attr( { - "aria-selected": "false", - "aria-expanded": "false", - tabIndex: -1 - } ) - .next() - .attr( { - "aria-hidden": "true" - } ) - .hide(); - - // Make sure at least one header is in the tab order - if ( !this.active.length ) { - this.headers.eq( 0 ).attr( "tabIndex", 0 ); - } else { - this.active.attr( { - "aria-selected": "true", - "aria-expanded": "true", - tabIndex: 0 - } ) - .next() - .attr( { - "aria-hidden": "false" - } ); - } - - this._createIcons(); - - this._setupEvents( options.event ); - - if ( heightStyle === "fill" ) { - maxHeight = parent.height(); - this.element.siblings( ":visible" ).each( function() { - var elem = $( this ), - position = elem.css( "position" ); - - if ( position === "absolute" || position === "fixed" ) { - return; - } - maxHeight -= elem.outerHeight( true ); - } ); - - this.headers.each( function() { - maxHeight -= $( this ).outerHeight( true ); - } ); - - this.headers.next() - .each( function() { - $( this ).height( Math.max( 0, maxHeight - - $( this ).innerHeight() + $( this ).height() ) ); - } ) - .css( "overflow", "auto" ); - } else if ( heightStyle === "auto" ) { - maxHeight = 0; - this.headers.next() - .each( function() { - var isVisible = $( this ).is( ":visible" ); - if ( !isVisible ) { - $( this ).show(); - } - maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() ); - if ( !isVisible ) { - $( this ).hide(); - } - } ) - .height( maxHeight ); - } - }, - - _activate: function( index ) { - var active = this._findActive( index )[ 0 ]; - - // Trying to activate the already active panel - if ( active === this.active[ 0 ] ) { - return; - } - - // Trying to collapse, simulate a click on the currently active header - active = active || this.active[ 0 ]; - - this._eventHandler( { - target: active, - currentTarget: active, - preventDefault: $.noop - } ); - }, - - _findActive: function( selector ) { - return typeof selector === "number" ? this.headers.eq( selector ) : $(); - }, - - _setupEvents: function( event ) { - var events = { - keydown: "_keydown" - }; - if ( event ) { - $.each( event.split( " " ), function( index, eventName ) { - events[ eventName ] = "_eventHandler"; - } ); - } - - this._off( this.headers.add( this.headers.next() ) ); - this._on( this.headers, events ); - this._on( this.headers.next(), { keydown: "_panelKeyDown" } ); - this._hoverable( this.headers ); - this._focusable( this.headers ); - }, - - _eventHandler: function( event ) { - var activeChildren, clickedChildren, - options = this.options, - active = this.active, - clicked = $( event.currentTarget ), - clickedIsActive = clicked[ 0 ] === active[ 0 ], - collapsing = clickedIsActive && options.collapsible, - toShow = collapsing ? $() : clicked.next(), - toHide = active.next(), - eventData = { - oldHeader: active, - oldPanel: toHide, - newHeader: collapsing ? $() : clicked, - newPanel: toShow - }; - - event.preventDefault(); - - if ( - - // click on active header, but not collapsible - ( clickedIsActive && !options.collapsible ) || - - // allow canceling activation - ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { - return; - } - - options.active = collapsing ? false : this.headers.index( clicked ); - - // When the call to ._toggle() comes after the class changes - // it causes a very odd bug in IE 8 (see #6720) - this.active = clickedIsActive ? $() : clicked; - this._toggle( eventData ); - - // Switch classes - // corner classes on the previously active header stay after the animation - this._removeClass( active, "ui-accordion-header-active", "ui-state-active" ); - if ( options.icons ) { - activeChildren = active.children( ".ui-accordion-header-icon" ); - this._removeClass( activeChildren, null, options.icons.activeHeader ) - ._addClass( activeChildren, null, options.icons.header ); - } - - if ( !clickedIsActive ) { - this._removeClass( clicked, "ui-accordion-header-collapsed" ) - ._addClass( clicked, "ui-accordion-header-active", "ui-state-active" ); - if ( options.icons ) { - clickedChildren = clicked.children( ".ui-accordion-header-icon" ); - this._removeClass( clickedChildren, null, options.icons.header ) - ._addClass( clickedChildren, null, options.icons.activeHeader ); - } - - this._addClass( clicked.next(), "ui-accordion-content-active" ); - } - }, - - _toggle: function( data ) { - var toShow = data.newPanel, - toHide = this.prevShow.length ? this.prevShow : data.oldPanel; - - // Handle activating a panel during the animation for another activation - this.prevShow.add( this.prevHide ).stop( true, true ); - this.prevShow = toShow; - this.prevHide = toHide; - - if ( this.options.animate ) { - this._animate( toShow, toHide, data ); - } else { - toHide.hide(); - toShow.show(); - this._toggleComplete( data ); - } - - toHide.attr( { - "aria-hidden": "true" - } ); - toHide.prev().attr( { - "aria-selected": "false", - "aria-expanded": "false" - } ); - - // if we're switching panels, remove the old header from the tab order - // if we're opening from collapsed state, remove the previous header from the tab order - // if we're collapsing, then keep the collapsing header in the tab order - if ( toShow.length && toHide.length ) { - toHide.prev().attr( { - "tabIndex": -1, - "aria-expanded": "false" - } ); - } else if ( toShow.length ) { - this.headers.filter( function() { - return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0; - } ) - .attr( "tabIndex", -1 ); - } - - toShow - .attr( "aria-hidden", "false" ) - .prev() - .attr( { - "aria-selected": "true", - "aria-expanded": "true", - tabIndex: 0 - } ); - }, - - _animate: function( toShow, toHide, data ) { - var total, easing, duration, - that = this, - adjust = 0, - boxSizing = toShow.css( "box-sizing" ), - down = toShow.length && - ( !toHide.length || ( toShow.index() < toHide.index() ) ), - animate = this.options.animate || {}, - options = down && animate.down || animate, - complete = function() { - that._toggleComplete( data ); - }; - - if ( typeof options === "number" ) { - duration = options; - } - if ( typeof options === "string" ) { - easing = options; - } - - // fall back from options to animation in case of partial down settings - easing = easing || options.easing || animate.easing; - duration = duration || options.duration || animate.duration; - - if ( !toHide.length ) { - return toShow.animate( this.showProps, duration, easing, complete ); - } - if ( !toShow.length ) { - return toHide.animate( this.hideProps, duration, easing, complete ); - } - - total = toShow.show().outerHeight(); - toHide.animate( this.hideProps, { - duration: duration, - easing: easing, - step: function( now, fx ) { - fx.now = Math.round( now ); - } - } ); - toShow - .hide() - .animate( this.showProps, { - duration: duration, - easing: easing, - complete: complete, - step: function( now, fx ) { - fx.now = Math.round( now ); - if ( fx.prop !== "height" ) { - if ( boxSizing === "content-box" ) { - adjust += fx.now; - } - } else if ( that.options.heightStyle !== "content" ) { - fx.now = Math.round( total - toHide.outerHeight() - adjust ); - adjust = 0; - } - } - } ); - }, - - _toggleComplete: function( data ) { - var toHide = data.oldPanel, - prev = toHide.prev(); - - this._removeClass( toHide, "ui-accordion-content-active" ); - this._removeClass( prev, "ui-accordion-header-active" ) - ._addClass( prev, "ui-accordion-header-collapsed" ); - - // Work around for rendering bug in IE (#5421) - if ( toHide.length ) { - toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className; - } - this._trigger( "activate", null, data ); - } -} ); - - - -var safeActiveElement = $.ui.safeActiveElement = function( document ) { - var activeElement; - - // Support: IE 9 only - // IE9 throws an "Unspecified error" accessing document.activeElement from an