2015-08-12 15:43:55 +02:00
|
|
|
function l(){var key=arguments[0],value=key;labels[key]?value=labels[key]:clabels[key]&&(value=clabels[key]);for(var i=1,j=0;i<arguments.length;i++,j++)value=value.replace("%{"+j+"}",arguments[i]);return value}!function(){"use strict";function configure($mdThemingProvider){$mdThemingProvider.definePalette("sogo-green",{50:"eaf5e9",100:"cbe5c8",200:"aad6a5",300:"88c781",400:"66b86a",500:"56b04c",600:"4da143",700:"388e3c",800:"367d2e",900:"225e1b",A100:"b9f6ca",A200:"69f0ae",A400:"00e676",A700:"00c853",contrastDefaultColor:"dark",contrastDarkColors:"50 100 200",contrastLightColors:"300 400 500 600 700 800 900"}),$mdThemingProvider.definePalette("sogo-blue",{50:"f0faf9",100:"e1f5f3",200:"ceebe8",300:"bfe0dd",400:"b2d6d3",500:"a1ccc8",600:"8ebfbb",700:"7db3b0",800:"639997",900:"4d8080",A100:"d4f7fa",A200:"c3f5fa",A400:"53e3f0",A700:"00b0c0",contrastDefaultColor:"light",contrastDarkColors:["50","100","200"],contrastLightColors:["300","400","500","600","700","800","900","A100","A200","A400","A700"]}),$mdThemingProvider.definePalette("sogo-paper",{50:"fcf7f8",100:"f7f1dc",200:"ede5ca",300:"e6d8ba",400:"e2d2a3",500:"d6c48d",600:"baa870",700:"857545",800:"524517",900:"433809",1000:"000000",A100:"ffffff",A200:"eeeeee",A400:"bdbdbd",A700:"616161",contrastDefaultColor:"dark",contrastLightColors:"800 900"}),$mdThemingProvider.theme("default").primaryPalette("sogo-blue",{"default":"300","hue-1":"100","hue-2":"400","hue-3":"A700"}).accentPalette("sogo-green",{"default":"500","hue-1":"200","hue-2":"300","hue-3":"A700"}).backgroundPalette("sogo-paper",{"default":"100","hue-1":"200","hue-2":"50","hue-3":"500"})}angular.module("SOGo.Common",["ngMaterial"]).value("sgSettings",{baseURL:function(){return ApplicationBaseURL||null},activeUser:function(param){var settings={login:UserLogin||null,identification:UserIdentification||null,language:UserLanguage||null,folderURL:UserFolderURL||null,isSuperUser:IsSuperUser||null};return param?settings[param]:settings}}).constant("sgColors",{selection:["#FFFFFF","#330033","#C0C0C0","#999999","#666666","#333333","#000000","#FFCCCC","#FF6666","#FF0000","#CC0000","#990000","#660000","#330000","#FFCC99","#FF9966","#FF9900","#FF6600","#CC6600","#993300","#663300","#FFFF99","#FFFF66","#FFCC66","#FFCC33","#CC9933","#996633","#663333","#FFFFCC","#FFFF33","#FFFF00","#FFCC00","#999900","#666600","#333300","#CCCCCC","#66FF99","#33FF33","#33CC00","#009900","#006600","#003300","#99FFFF","#33FFFF","#66CCCC","#00CCCC","#339999","#336666","#003333","#CCFFFF","#66FFFF","#33CCFF","#3366FF","#3333FF","#000099","#000066","#CCCCFF","#9999FF","#6666CC","#6633FF","#6600CC","#333399","#330099","#FFCCFF","#FF99FF","#CC66CC","#CC33CC","#993399","#663366","#99FF99"]}).constant("sgConstant",{sm:"(max-width: 600px)","gt-sm":"(min-width: 600px)",md:"(min-width: 600px) and (max-width: 1024px)","gt-md":"(min-width: 1025px)",lg:"(min-width: 1024px) and (max-width: 1280px)","gt-lg":"(min-width: 1280px)"}).config(configure),configure.$inject=["$mdThemingProvider"]}(),function(){"use strict";function decodeUri($window){return $window.decodeURIComponent}decodeUri.$inject=["$window"],angular.module("SOGo.Common").filter("decodeUri",decodeUri)}(),function(){"use strict";function encodeUri($window){return $window.encodeURIComponent}encodeUri.$inject=["$window"],angular.module("SOGo.Common").filter("encodeUri",encodeUri)}(),function(){"use strict";function loc(){return l}angular.module("SOGo.Common").filter("loc",loc)}(),function(){"use strict";function range(){return function(n){for(var res=[],i=0;i<parseInt(n);i++)res.push(i);return res}}angular.module("SOGo.Common").filter("range",range)}(),function(){"use strict";function AclController($mdDialog,Dialog,usersWithACL,User,folder){function userFilter($query){return User.$filter($query,folder.$acl.users)}function closeModal(){folder.$acl.$resetUsersRights(),$mdDialog.hide()}function saveModal(){folder.$acl.$saveUsersRights().then(function(){$mdDialog.hide()},function(data,status){Dialog.alert(l("Warning"),l("An error occured please try again."))})}function confirmChange(user){var confirmation=u
|
2015-08-07 16:37:36 +02:00
|
|
|
}),ensureInitRunsOnce()}}),toggleClass=function(){var tile=angular.element(this),day=tile.attr("value");tile.toggleClass("sg-active"),toggle(day)},i=0;i<tiles.length;i++)tile=angular.element(tiles[i]),tile.addClass("iconButton"),tile.find("figure").addClass("md-icon"),tile.on("click",toggleClass)}return{restrict:"A",link:link}}sgToggleGrid.$inject=["$parse"],angular.module("SOGo.Common").directive("sgToggleGrid",sgToggleGrid)}(),String.prototype.endsWith=function(suffix){return-1!==this.indexOf(suffix,this.length-suffix.length)},String.prototype.startsWith=function(pattern,position){return position=angular.isNumber(position)?position:0,this.lastIndexOf(pattern,position)===position},String.prototype._base64_keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",String.prototype.base64encode=function(){for(var chr1,chr2,chr3,enc1,enc2,enc3,enc4,output="",i=0,input=this.utf8encode();i<input.length;)chr1=input.charCodeAt(i++),chr2=input.charCodeAt(i++),chr3=input.charCodeAt(i++),enc1=chr1>>2,enc2=(3&chr1)<<4|chr2>>4,enc3=(15&chr2)<<2|chr3>>6,enc4=63&chr3,isNaN(chr2)?enc3=enc4=64:isNaN(chr3)&&(enc4=64),output=output+this._base64_keyStr.charAt(enc1)+this._base64_keyStr.charAt(enc2)+this._base64_keyStr.charAt(enc3)+this._base64_keyStr.charAt(enc4);return output},String.prototype.base64decode=function(){for(var chr1,chr2,chr3,enc1,enc2,enc3,enc4,output="",i=0,input=""+this;i<input.length;)enc1=this._base64_keyStr.indexOf(input.charAt(i++)),enc2=this._base64_keyStr.indexOf(input.charAt(i++)),enc3=this._base64_keyStr.indexOf(input.charAt(i++)),enc4=this._base64_keyStr.indexOf(input.charAt(i++)),chr1=enc1<<2|enc2>>4,chr2=(15&enc2)<<4|enc3>>2,chr3=(3&enc3)<<6|enc4,output+=String.fromCharCode(chr1),64!=enc3&&(output+=String.fromCharCode(chr2)),64!=enc4&&(output+=String.fromCharCode(chr3));return output},String.prototype.md5=function(){if(this.length){var md5=function(s){function L(k,d){return k<<d|k>>>32-d}function K(G,k){var I,d,F,H,x;return F=2147483648&G,H=2147483648&k,I=1073741824&G,d=1073741824&k,x=(1073741823&G)+(1073741823&k),I&d?2147483648^x^F^H:I|d?1073741824&x?3221225472^x^F^H:1073741824^x^F^H:x^F^H}function r(d,F,k){return d&F|~d&k}function q(d,F,k){return d&k|F&~k}function p(d,F,k){return d^F^k}function n(d,F,k){return F^(d|~k)}function u(G,F,aa,Z,k,H,I){return G=K(G,K(K(r(F,aa,Z),k),I)),K(L(G,H),F)}function f(G,F,aa,Z,k,H,I){return G=K(G,K(K(q(F,aa,Z),k),I)),K(L(G,H),F)}function D(G,F,aa,Z,k,H,I){return G=K(G,K(K(p(F,aa,Z),k),I)),K(L(G,H),F)}function t(G,F,aa,Z,k,H,I){return G=K(G,K(K(n(F,aa,Z),k),I)),K(L(G,H),F)}function e(G){for(var Z,F=G.length,x=F+8,k=(x-x%64)/64,I=16*(k+1),aa=Array(I-1),d=0,H=0;F>H;)Z=(H-H%4)/4,d=H%4*8,aa[Z]=aa[Z]|G.charCodeAt(H)<<d,H++;return Z=(H-H%4)/4,d=H%4*8,aa[Z]=aa[Z]|128<<d,aa[I-2]=F<<3,aa[I-1]=F>>>29,aa}function B(x){var G,d,k="",F="";for(d=0;3>=d;d++)G=x>>>8*d&255,F="0"+G.toString(16),k+=F.substr(F.length-2,2);return k}function J(k){k=k.replace(/rn/g,"n");for(var d="",F=0;F<k.length;F++){var x=k.charCodeAt(F);128>x?d+=String.fromCharCode(x):x>127&&2048>x?(d+=String.fromCharCode(x>>6|192),d+=String.fromCharCode(63&x|128)):(d+=String.fromCharCode(x>>12|224),d+=String.fromCharCode(x>>6&63|128),d+=String.fromCharCode(63&x|128))}return d}var P,h,E,v,g,Y,X,W,V,C=Array(),S=7,Q=12,N=17,M=22,A=5,z=9,y=14,w=20,o=4,m=11,l=16,j=23,U=6,T=10,R=15,O=21;for(s=J(s),C=e(s),Y=1732584193,X=4023233417,W=2562383102,V=271733878,P=0;P<C.length;P+=16)h=Y,E=X,v=W,g=V,Y=u(Y,X,W,V,C[P+0],S,3614090360),V=u(V,Y,X,W,C[P+1],Q,3905402710),W=u(W,V,Y,X,C[P+2],N,606105819),X=u(X,W,V,Y,C[P+3],M,3250441966),Y=u(Y,X,W,V,C[P+4],S,4118548399),V=u(V,Y,X,W,C[P+5],Q,1200080426),W=u(W,V,Y,X,C[P+6],N,2821735955),X=u(X,W,V,Y,C[P+7],M,4249261313),Y=u(Y,X,W,V,C[P+8],S,1770035416),V=u(V,Y,X,W,C[P+9],Q,2336552879),W=u(W,V,Y,X,C[P+10],N,4294925233),X=u(X,W,V,Y,C[P+11],M,2304563134),Y=u(Y,X,W,V,C[P+12],S,1804603682),V=u(V,Y,X,W,C[P+13],Q,4254626195),W=u(W,V,Y,X,C[P+14],N,2792965006),X=u(X,W,V,Y,C[P+15],M,1236535329),Y=f(Y,X,W,V,C[P+1],A,4129170786),V=f(V,Y,X,W,C[P+6],z,3225465664),W=f(W,V,Y,X,C[P+11],y,643717713),X=f(X,W
|