diff --git a/gulliver/js/common/core/common.js b/gulliver/js/common/core/common.js index 84b317775..0e2e3c1fb 100755 --- a/gulliver/js/common/core/common.js +++ b/gulliver/js/common/core/common.js @@ -1915,7 +1915,7 @@ function msgBox(msg, type, callbackAccept, callbackCancel){ switch(type){ case 'alert': - + if (leimnud.browser.isIE) { new leimnud.module.app.alert().make({ label: msg, @@ -1937,7 +1937,7 @@ function msgBox(msg, type, callbackAccept, callbackCancel){ } }.extend(this) }); - } + } break; case 'info': new leimnud.module.app.info().make({ @@ -2256,3 +2256,12 @@ function inputDocumentVerifySize(inpDocMaxFileSize, file) return 1; } } + +function getBrowserTimeZoneOffset() +{ + var d = new Date(); + var tzOffset = d.getTimezoneOffset(); + + return ((tzOffset > 0)? "-" : "") + (tzOffset * 60); +} + diff --git a/gulliver/js/ext/min/ext-all.js b/gulliver/js/ext/min/ext-all.js index 2ab06e1e1..ec8515ba9 100644 --- a/gulliver/js/ext/min/ext-all.js +++ b/gulliver/js/ext/min/ext-all.js @@ -67,6 +67,8 @@ Ext.util.Format.capitalize=(function(){var re=/(^|[^\w])([a-z])/g,fn=function(m, String.prototype.nl2br=function(){return this.replace(/\n/g,'
');} function stringReplace(strSearch,strReplace,str) {var expression=eval("/"+strSearch+"/g");return str.replace(expression,strReplace);} +function getBrowserTimeZoneOffset() +{var d=new Date();var tzOffset=d.getTimezoneOffset();return((tzOffset>0)?"-":"")+(tzOffset*60);} Ext.namespace("Ext.ux.plugin");Ext.onReady(function(){var a=Ext.util.CSS;if(a){a.getRule(".x-hide-nosize")||a.createStyleSheet(".x-hide-nosize{height:0px!important;width:0px!important;border:none!important;zoom:1;}.x-hide-nosize * {height:0px!important;width:0px!important;border:none!important;zoom:1;}");a.refreshCache()}});(function(){var g=Ext.Element,b=Ext.lib.Anim,a=g.prototype;var f="visibility",d="display",c="hidden",i="none";var e={};e.El={setDisplayed:function(k){var j=this;j.visibilityCls?(j[k!==false?"removeClass":"addClass"](j.visibilityCls)):a.setDisplayed.call(j,k);return j},isDisplayed:function(){return!(this.hasClass(this.visibilityCls)||this.isStyle(d,i))},fixDisplay:function(){var j=this;a.fixDisplay.call(j);j.visibilityCls&&j.removeClass(j.visibilityCls)},isVisible:function(k){var l=this.visible||(!this.isStyle(f,c)&&(this.visibilityCls?!this.hasClass(this.visibilityCls):!this.isStyle(d,i)));if(k!==true||!l){return l}var m=this.dom.parentNode,j=/^body/i;while(m&&!j.test(m.tagName)){if(!Ext.fly(m,"_isVisible").isVisible()){return false}m=m.parentNode}return true},isStyle:a.isStyle||function(j,k){return this.getStyle(j)==k}};Ext.override(g.Flyweight,e.El);Ext.ux.plugin.VisibilityMode=function(k){Ext.apply(this,k||{});var j=Ext.util.CSS;if(j&&!Ext.isIE&&this.fixMaximizedWindow!==false&&!Ext.ux.plugin.VisibilityMode.MaxWinFixed){j.updateRule(".x-window-maximized-ct","overflow","");Ext.ux.plugin.VisibilityMode.MaxWinFixed=true}};Ext.extend(Ext.ux.plugin.VisibilityMode,Object,{bubble:true,fixMaximizedWindow:true,elements:null,visibilityCls:"x-hide-nosize",hideMode:"nosize",ptype:"uxvismode",init:function(n){var k=this.hideMode||n.hideMode,m=this,j=Ext.Container.prototype.bubble,l=function(){var q=[this.collapseEl,this.actionMode].concat(m.elements||[]);Ext.each(q,function(r){m.extend(this[r]||r)},this);var p={visFixed:true,animCollapse:false,animFloat:false,hideMode:k,defaults:this.defaults||{}};p.defaults.hideMode=k;Ext.apply(this,p);Ext.apply(this.initialConfig||{},p)};n.on("render",function(){if(m.bubble!==false&&this.ownerCt){j.call(this.ownerCt,function(){this.visFixed||this.on("afterlayout",l,this,{single:true})})}l.call(this)},n,{single:true})},extend:function(j,k){j&&Ext.each([].concat(j),function(l){if(l&&l.dom){if("visibilityCls"in l){return}Ext.apply(l,e.El);l.visibilityCls=k||this.visibilityCls}},this);return this}});Ext.preg&&Ext.preg("uxvismode",Ext.ux.plugin.VisibilityMode);Ext.provide&&Ext.provide("uxvismode")})();(function(){var J=Ext.Element,n,u=Ext.lib.Dom,al=Ext.lib.Anim,m=Ext.EventManager,aj=Ext.lib.Event,an=document,t=function(){},ap=Object.prototype,aA=ap.toString,B=/^body/i,q="[object HTMLDocument]";if(!Ext.elCache||parseInt(Ext.version.replace(/\./g,""),10)<311){alert("Ext Release "+Ext.version+" is not supported")}Ext._documents={};Ext._documents[Ext.id(document,"_doc")]=Ext.elCache;var T=u.resolveDocumentCache=function(E,aF){Ext._documents[Ext.id(document,"_doc")]=Ext.elCache;var aE=e(E),aG=Ext.isDocument(aE)?Ext.id(aE):aF,A=Ext._documents[aG]||null;return A||(aG?Ext._documents[aG]={}:null)},aD=u.clearDocumentCache=function(A){delete Ext._documents[A]};J.addMethods||(J.addMethods=function(A){Ext.apply(J.prototype,A||{})});Ext.removeNode=function(aH){var aG=aH?aH.dom||aH:null,aE,aF,A=T(aG),E;if(aG&&(aF=A[aG.id])&&(aE=aF.el)){if(aE.dom){Ext.enableNestedListenerRemoval?m.purgeElement(aE.dom,true):m.removeAll(aE.dom)}delete A[aG.id];delete aE.dom;delete aE._context;aE=null}if(aG&&!aG.navigator&&!Ext.isDocument(aG)&&!B.test(aG.tagName)){(E=aG.parentElement||aG.parentNode)&&E.removeChild(aG)}aG=E=null};var f=function(aI,aG){var aH=typeof aI==="function"?aI:function aF(){};var aE=aH._ovl;if(!aE){aE={base:aH};aE[aH.length||0]=aH;aH=function aF(){var aL=arguments.callee._ovl;var aK=aL[arguments.length]||aL.base;return aK&&aK!=arguments.callee?aK.apply(this,arguments):undefined}}var aJ=[].concat(aG);for(var E=0,A=aJ.length;EA||aQaI){aN.scrollTop=aO-A}}aN.scrollTop=aN.scrollTop;if(aH!==false){if(aG.offsetWidth>aN.clientWidth||aJaL){aN.scrollLeft=E-aN.clientWidth}}aN.scrollLeft=aN.scrollLeft}return this},contains:function(A){try{return!A?false:u.isAncestor(this.dom,A.dom?A.dom:A)}catch(E){return false}},getScroll:function(){var aI=this.dom,aH=this.getDocument(),A=aH.body,aE=aH.documentElement,E,aG,aF;if(Ext.isDocument(aI)||aI==A){if(Ext.isIE&&u.docIsStrict(aH)){E=aE.scrollLeft;aG=aE.scrollTop}else{E=window.pageXOffset;aG=window.pageYOffset}aF={left:E||(A?A.scrollLeft:0),top:aG||(A?A.scrollTop:0)}}else{aF={left:aI.scrollLeft,top:aI.scrollTop}}return aF},getStyle:function(){var A=at&&at.getComputedStyle?function E(aL){var aI=!this._isDoc?this.dom:null,aE,aH,aF,aJ,aK=Ext.isWebKit,aJ,aG;if(!aI||!aI.style){return null}aG=aI.style;aL=aq(aL);aH=at.getComputedStyle(aI,null);aF=(aH)?aH[aL]:null;if(aK){if(aF&&ay.test(aL)&&aG.position!="absolute"&&aF!="0px"){aJ=aG.display;aG.display="inline-block";aF=at.getComputedStyle(aI,null)[aL];aG.display=aJ}else{if(aF=="rgba(0, 0, 0, 0)"){aF="transparent"}}}return aF||aG[aL]}:function E(aJ){var aH=!this._isDoc?this.dom:null,aE,aG,aF;if(!aH||!aH.style){return null}aF=aH.style;if(aJ==Y){if(aF.filter.match){if(aE=aF.filter.match(i)){var aI=parseFloat(aE[1]);if(!isNaN(aI)){return aI?aI/100:0}}}return 1}aJ=aq(aJ);return((aG=aH.currentStyle)?aG[aJ]:null)||aH.style[aJ]};var E=null;return A}(),setStyle:function(aF,aE){if(this._isDoc||Ext.isDocument(this.dom)){return this}var A,E;if(typeof aF!="object"){A={};A[aF]=aE;aF=A}for(E in aF){if(aF.hasOwnProperty(E)){aE=aF[E];E==Y?this.setOpacity(aE):this.dom.style[aq(E)]=aE}}return this},center:function(A){return this.alignTo(A||this.getDocument(),"c-c")},mask:function(E,aH){var aJ=this,aF=aJ.dom,aI=Ext.DomHelper,aG="ext-el-mask-msg",A,aK;if(aJ.getStyle("position")=="static"){aJ.addClass(F)}if((A=I(aF,"maskMsg"))){A.remove()}if((A=I(aF,"mask"))){A.remove()}aK=aI.append(aF,{cls:"ext-el-mask"},true);I(aF,"mask",aK);aJ.addClass(O);aK.setDisplayed(true);if(typeof E=="string"){var aE=aI.append(aF,{cls:aG,cn:{tag:"div"}},true);I(aF,"maskMsg",aE);aE.dom.className=aH?aG+" "+aH:aG;aE.dom.firstChild.innerHTML=E;aE.setDisplayed(true);aE.center(aJ)}if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&aJ.getStyle("height")=="auto"){aK.setSize(undefined,aJ.getHeight())}return aK},unmask:function(){var aE=this,aF=aE.dom,A=I(aF,"mask"),E=I(aF,"maskMsg");if(A){if(E){E.remove();I(aF,"maskMsg",undefined)}A.remove();I(aF,"mask",undefined)}aE.removeClass([O,F])},isMasked:function(){var A=I(this.dom,"mask");return A&&A.isVisible()},getCenterXY:function(){return this.getAlignToXY(this.getDocument(),"c-c")},getAnchorXY:function(aG,aL,aQ){aG=(aG||"tl").toLowerCase();aQ=aQ||{};var aK=this,aN=this.getDocument(),E=aK.dom==aN.body||aK.dom==aN,aO=aQ.width||E?u.getViewWidth(false,aN):aK.getWidth(),aI=aQ.height||E?u.getViewHeight(false,aN):aK.getHeight(),aP,A=Math.round,aE=aK.getXY(),aM=aK.getScroll(),aJ=E?aM.left:!aL?aE[0]:0,aH=E?aM.top:!aL?aE[1]:0,aF={c:[A(aO*0.5),A(aI*0.5)],t:[A(aO*0.5),0],l:[0,A(aI*0.5)],r:[aO,A(aI*0.5)],b:[A(aO*0.5),aI],tl:[0,0],bl:[0,aI],br:[aO,aI],tr:[aO,0]};aP=aF[aG];return[aP[0]+aJ,aP[1]+aH]},anchorTo:function(E,aH,aE,A,aJ,aK){var aI=this,aG=aI.dom;function aF(){ai(aG).alignTo(E,aH,aE,A);Ext.callback(aK,ai(aG))}Ext.EventManager.onWindowResize(aF,aI);if(!Ext.isEmpty(aJ)){Ext.EventManager.on(window,"scroll",aF,aI,{buffer:!isNaN(aJ)?aJ:50})}aF.call(aI);return aI},getScroll:function(){var aI=this.dom,aH=this.getDocument(),A=aH.body,aE=aH.documentElement,E,aG,aF;if(aI==aH||aI==A){if(Ext.isIE&&u.docIsStrict(aH)){E=aE.scrollLeft;aG=aE.scrollTop}else{E=window.pageXOffset;aG=window.pageYOffset}aF={left:E||(A?A.scrollLeft:0),top:aG||(A?A.scrollTop:0)}}else{aF={left:aI.scrollLeft,top:aI.scrollTop}}return aF},getAlignToXY:function(aF,aR,aS){var a6;aF=Ext.get(aF,a6=this.getDocument());if(!aF||!aF.dom){throw"Element.getAlignToXY with an element that doesn't exist"}aS=aS||[0,0];aR=(aR=="?"?"tl-bl?":(!/-/.test(aR)&&aR!=""?"tl-"+aR:aR||"tl-bl")).toLowerCase();var a3=this,aY=a3.dom,a5,a4,aK,aJ,aM,aW,aP,aN=u.getViewWidth(false,a6)-10,aX=u.getViewHeight(false,a6)-10,E,aG,aH,aI,aO,aQ,a0=a6.documentElement,aL=a6.body,aV=(a0.scrollLeft||aL.scrollLeft||0)+5,aU=(a0.scrollTop||aL.scrollTop||0)+5,aZ=false,aE="",A="",aT=aR.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!aT){throw"Element.getAlignToXY with an invalid alignment "+aR}aE=aT[1];A=aT[2];aZ=!!aT[3];a5=a3.getAnchorXY(aE,true);a4=aF.getAnchorXY(A,false);aK=a4[0]-a5[0]+aS[0];aJ=a4[1]-a5[1]+aS[1];if(aZ){aM=a3.getWidth();aW=a3.getHeight();aP=aF.getRegion();E=aE.charAt(0);aG=aE.charAt(aE.length-1);aH=A.charAt(0);aI=A.charAt(A.length-1);aO=((E=="t"&&aH=="b")||(E=="b"&&aH=="t"));aQ=((aG=="r"&&aI=="l")||(aG=="l"&&aI=="r"));if(aK+aM>aN+aV){aK=aQ?aP.left-aM:aN+aV-aM}if(aKaX+aU){aJ=aO?aP.top-aW:aX+aU-aW}if(aJaU){x=aU-w;aO=true}if((y+h)>aM){y=aM-h;aO=true}if(x)((\n|\r|.)*?)(?:<\/script>)/gi,update:function(content,loadScripts,callback,scope){loadScripts=loadScripts||this.getUpdater().loadScripts||false;content=Ext.DomHelper.markup(content||"");content=loadScripts===true?content:content.replace(this.scriptRE,"");var doc;if((doc=this.getFrameDocument())&&!!content.length){this._unHook();this.src=null;this.showMask();Ext.isFunction(callback)&&this._observable.addListener("_docload",callback,scope||this,{single:true});this._targetURI=location.href;doc.open();this._frameAction=true;doc.write(content);doc.close();this.checkDOM()}else{this.hideMask(true);Ext.isFunction(callback)&&callback.call(scope,this)}return this},execCommand:function(command,userInterface,value,validate){var doc,assert;if((doc=this.getFrameDocument())&&!!command){try{Ext.isIE&&this.getWindow().focus();assert=validate&&Ext.isFunction(doc.queryCommandEnabled)?doc.queryCommandEnabled(command):true;return assert&&doc.execCommand(command,!!userInterface,value)}catch(eex){return false}}return false},setDesignMode:function(active){var doc;(doc=this.getFrameDocument())&&(doc.designMode=(/on|true/i).test(String(active))?"on":"off")},getUpdater:function(){return this.updateManager||(this.updateManager=new MIF.Updater(this))},getHistory:function(){var h=null;try{h=this.getWindow().history}catch(eh){}return h},get:function(el){var doc=this.getFrameDocument();return doc?Ext.get(el,doc):doc=null},fly:function(el,named){var doc=this.getFrameDocument();return doc?Ext.fly(el,named,doc):null},getDom:function(el){var d;if(!el||!(d=this.getFrameDocument())){return(d=null)}return Ext.getDom(el,d)},select:function(selector,unique){var d;return(d=this.getFrameDocument())?Ext.Element.select(selector,unique,d):d=null},query:function(selector){var d;return(d=this.getFrameDocument())?Ext.DomQuery.select(selector,d):null},removeNode:Ext.removeNode,_renderHook:function(){this._windowContext=null;this.CSS=this.CSS?this.CSS.destroy():null;this._hooked=false;try{if(this.writeScript('(function(){(window.hostMIF = parent.document.getElementById("'+this.id+'").ownerCt)._windowContext='+(Ext.isIE?"window":'{eval:function(s){return new Function("return ("+s+")")();}}')+";})()")){var w,p=this._frameProxy,D=this.getFrameDocument();if(w=this.getWindow()){p||(p=this._frameProxy=this._eventProxy.createDelegate(this));addListener(w,"focus",p);addListener(w,"blur",p);addListener(w,"resize",p);addListener(w,"unload",p);D&&addListener(Ext.isIE?w:D,"scroll",p)}D&&(this.CSS=new Ext.ux.ManagedIFrame.CSS(D))}}catch(ex){}return this.domWritable()},_unHook:function(){if(this._hooked){this._windowContext&&(this._windowContext.hostMIF=null);this._windowContext=null;var w,p=this._frameProxy;if(p&&this.domWritable()&&(w=this.getWindow())){removeListener(w,"focus",p);removeListener(w,"blur",p);removeListener(w,"resize",p);removeListener(w,"unload",p);removeListener(Ext.isIE?w:this.getFrameDocument(),"scroll",p)}}ELD.clearDocumentCache&&ELD.clearDocumentCache(this.id);this.CSS=this.CSS?this.CSS.destroy():null;this.domFired=this._frameAction=this.domReady=this._hooked=false},_windowContext:null,getFrameDocument:function(){var win=this.getWindow(),doc=null;try{doc=(Ext.isIE&&win?win.document:null)||this.dom.contentDocument||window.frames[this.dom.name].document||null}catch(gdEx){ELD.clearDocumentCache&&ELD.clearDocumentCache(this.id);return false}doc=(doc&&Ext.isFunction(ELD.getDocument))?ELD.getDocument(doc,true):doc;return doc},getDoc:function(){var D=this.getFrameDocument();return Ext.get(D,D)},getBody:function(){var d;return(d=this.getFrameDocument())?this.get(d.body||d.documentElement):null},getDocumentURI:function(){var URI,d;try{URI=this.src&&(d=this.getFrameDocument())?d.location.href:null}catch(ex){}return URI||(Ext.isFunction(this.src)?this.src():this.src)},getWindowURI:function(){var URI,w;try{URI=(w=this.getWindow())?w.location.href:null}catch(ex){}return URI||(Ext.isFunction(this.src)?this.src():this.src)},getWindow:function(){var dom=this.dom,win=null;try{win=dom.contentWindow||window.frames[dom.name]||null}catch(gwEx){}return win},scrollChildIntoView:function(child,container,hscroll){this.fly(child,"_scrollChildIntoView").scrollIntoView(this.getDom(container)||this.getBody().dom,hscroll);return this},print:function(){try{var win;if(win=this.getWindow()){Ext.isIE&&win.focus();win.print()}}catch(ex){throw new MIF.Error("printexception",ex.description||ex.message||ex)}return this},domWritable:function(){return!!Ext.isDocument(this.getFrameDocument(),true)&&!!this._windowContext},execScript:function(block,useDOM){try{if(this.domWritable()){if(useDOM){this.writeScript(block)}else{return this._windowContext.eval(block)}}else{throw new MIF.Error("execscript-secure-context")}}catch(ex){this._observable.fireEvent.call(this._observable,"exception",this,ex);return false}return true},writeScript:function(block,attributes){attributes=Ext.apply({},attributes||{},{type:"text/javascript",text:block});try{var head,script,doc=this.getFrameDocument();if(doc&&typeof doc.getElementsByTagName!="undefined"){if(!(head=doc.getElementsByTagName("head")[0])){head=doc.createElement("head");doc.getElementsByTagName("html")[0].appendChild(head)}if(head&&(script=doc.createElement("script"))){for(var attrib in attributes){if(attributes.hasOwnProperty(attrib)&&attrib in script){script[attrib]=attributes[attrib]}}return!!head.appendChild(script)}}}catch(ex){this._observable.fireEvent.call(this._observable,"exception",this,ex)}finally{script=head=null}return false},loadFunction:function(fn,useDOM,invokeIt){var name=fn.name||fn;var fnSrc=fn.fn||window[fn];name&&fnSrc&&this.execScript(name+"="+fnSrc,useDOM);invokeIt&&this.execScript(name+"()")},loadHandler:function(e,target){var rstatus=(this.dom||{}).readyState||(e||{}).type;if(this.eventsFollowFrameLinks||this._frameAction||this.isReset){switch(rstatus){case"domready":case"DOMFrameContentLoaded":case"domfail":this._onDocReady(rstatus);break;case"load":case"complete":var frame=this;frame._onDocLoaded(rstatus);this._frameAction=false;break;case"error":this._observable.fireEvent.apply(this._observable,["exception",this].concat(arguments));break;default:}this.frameState=rstatus}},_onDocReady:function(eventName){var w,obv=this._observable,D;try{if(!this.isReset&&this.focusOnLoad&&(w=this.getWindow())){w.focus()}(D=this.getDoc())&&(D.isReady=true)}catch(ex){}obv.fireEvent("_docready",this);if(!this.domFired&&(this._hooked=this._renderHook())){this.domFired=true;this.isReset||obv.fireEvent.call(obv,"domready",this)}this.domReady=true;this.hideMask()},_onDocLoaded:function(eventName){var obv=this._observable,w;this.domReady||this._onDocReady("domready");obv.fireEvent("_docload",this);this.isReset||obv.fireEvent("documentloaded",this);this.hideMask(true);this._frameAction=this.isReset=false},checkDOM:function(win){if(Ext.isGecko){return}var n=0,frame=this,domReady=false,b,l,d,max=this.domReadyRetries||2500,polling=false,startLocation=(this.getFrameDocument()||{location:{}}).location.href;(function(){d=frame.getFrameDocument()||{location:{}};polling=(d.location.href!==startLocation||d.location.href===frame._targetURI);if(frame.domReady){return}domReady=polling&&((b=frame.getBody())&&!!(b.dom.innerHTML||"").length)||false;if(d.location.href&&!domReady&&(++n'},onRender:function(ct,position){Ext.ux.LocationBar.superclass.onRender.call(this,ct,position);this.repaint();},onClick:function(node){if(this.selectHandler){this.selectHandler(node);}else{if(node.parentNode){node.parentNode.expand(false,true);node.ensureVisible();} diff --git a/gulliver/js/ext/pmos-common.js b/gulliver/js/ext/pmos-common.js index 75c165c4c..93762f66b 100755 --- a/gulliver/js/ext/pmos-common.js +++ b/gulliver/js/ext/pmos-common.js @@ -552,3 +552,11 @@ function stringReplace(strSearch, strReplace, str) return str.replace(expression, strReplace); } +function getBrowserTimeZoneOffset() +{ + var d = new Date(); + var tzOffset = d.getTimezoneOffset(); + + return ((tzOffset > 0)? "-" : "") + (tzOffset * 60); +} + diff --git a/gulliver/js/maborak/core/maborak.js b/gulliver/js/maborak/core/maborak.js index 5a904eed5..d3ddf2f9a 100644 --- a/gulliver/js/maborak/core/maborak.js +++ b/gulliver/js/maborak/core/maborak.js @@ -806,6 +806,8 @@ var mb_strlen=function(str){str=str||'';var len=0;for(var i=0;i0)?"-":"")+(tzOffset*60);} var TimeToFade=1000.0;function fade(eid,inOut){inOut=(typeof(inOut)!='undefined')?true:false;var element=document.getElementById(eid);if(element==null) return;if(element.FadeState==null) {if(element.style.opacity==null||element.style.opacity==''||element.style.opacity=='1') diff --git a/gulliver/js/maborak/core/maborak.loader.js b/gulliver/js/maborak/core/maborak.loader.js index 130f00ce3..f6c5d0b92 100644 --- a/gulliver/js/maborak/core/maborak.loader.js +++ b/gulliver/js/maborak/core/maborak.loader.js @@ -66,15 +66,15 @@ if(this.options.control.resize) else {this.parent.dom.setStyle(this.elements.resize,{background:"transparent"});}};this.makeTab=function(dynamic) {if(this.loading===true){return false;} -var thm=this.tab.display==="vertical"?"":"H";var tb=this.elements.tabOptions[this.tabSelected];tb.className="panel_tabOptionSelected"+thm+"___"+this.getTheme("tabOptionSelected");tb.onmouseover=function(o,j){o=window.event?o:j;o.a.className=o.b;}.args({a:tb,b:"panel_tabOptionSelectedOver"+thm+"___"+this.getTheme("tabOptionSelectedOver")});tb.onmouseout=function(o,j){o=window.event?o:j;o.a.className=o.b;}.args({a:tb,b:"panel_tabOptionSelected"+thm+"___"+this.getTheme("tabOptionSelected")});var tc=(typeof this.tab.options[this.tabSelected].content);if(!dynamic) +var thm=this.tab.display==="vertical"?"":"H";var tb=this.elements.tabOptions[this.tabSelected];tb.className="panel_tabOptionSelected"+thm+"___"+this.getTheme("tabOptionSelected");tb.onmouseover=function(o,j){o=window.event?((!!navigator.userAgent.match(/Trident.*rv[ :]*11\./))?j:o):j;o.a.className=o.b;}.args({a:tb,b:"panel_tabOptionSelectedOver"+thm+"___"+this.getTheme("tabOptionSelectedOver")});tb.onmouseout=function(o,j){o=window.event?((!!navigator.userAgent.match(/Trident.*rv[ :]*11\./))?j:o):j;o.a.className=o.b;}.args({a:tb,b:"panel_tabOptionSelected"+thm+"___"+this.getTheme("tabOptionSelected")});var tc=(typeof this.tab.options[this.tabSelected].content);if(!dynamic) {if(this.tab.display==="vertical") -{var hj=(parseInt(this.parent.dom.getStyle(tb,"width"),10)-((!this.parent.browser.isIE)?3:0));this.parent.dom.setStyle(tb,{width:hj,borderLeftWidth:4});} +{var hj=(parseInt(this.parent.dom.getStyle(tb,"width"),10)-((!this.parent.browser.isIE)?((!!navigator.userAgent.match(/Trident.*rv[ :]*11\./))?0:3):0));this.parent.dom.setStyle(tb,{width:hj,borderLeftWidth:4});} else {this.parent.dom.setStyle(tb,{});}} tb.onmouseup=function(){return false;};if(this.tabLastSelected!==false) -{var tls=this.elements.tabOptions[this.tabLastSelected];tls.className="panel_tabOption"+thm+"___"+this.getTheme("tabOption");tls.onmouseover=function(o,j){o=window.event?o:j;o.a.className=o.b;}.args({a:tls,b:"panel_tabOptionOver"+thm+"___"+this.getTheme("tabOptionOver")});tls.onmouseout=function(o,j){o=window.event?o:j;o.a.className=o.b;}.args({a:tls,b:"panel_tabOption"+thm+"___"+this.getTheme("tabOption")});tls.onmouseup=function(event,tabID){if(this.tab.manualDisabled){return false;} -this.tabSelected=(this.parent.browser.isIE)?event:tabID;this.makeTab();return false;}.extend(this,this.tabLastSelected);if(this.tab.display==="vertical") -{this.parent.dom.setStyle(tls,{width:parseInt(this.parent.dom.getStyle(tb,"width"),10)+((!this.parent.browser.isIE)?3:0),borderLeftWidth:1});} +{var tls=this.elements.tabOptions[this.tabLastSelected];tls.className="panel_tabOption"+thm+"___"+this.getTheme("tabOption");tls.onmouseover=function(o,j){o=window.event?((!!navigator.userAgent.match(/Trident.*rv[ :]*11\./))?j:o):j;o.a.className=o.b;}.args({a:tls,b:"panel_tabOptionOver"+thm+"___"+this.getTheme("tabOptionOver")});tls.onmouseout=function(o,j){o=window.event?((!!navigator.userAgent.match(/Trident.*rv[ :]*11\./))?j:o):j;o.a.className=o.b;}.args({a:tls,b:"panel_tabOption"+thm+"___"+this.getTheme("tabOption")});tls.onmouseup=function(event,tabID){if(this.tab.manualDisabled){return false;} +this.tabSelected=(this.parent.browser.isIE)?((!!navigator.userAgent.match(/Trident.*rv[ :]*11\./))?tabID:event):tabID;this.makeTab();return false;}.extend(this,this.tabLastSelected);if(this.tab.display==="vertical") +{this.parent.dom.setStyle(tls,{width:parseInt(this.parent.dom.getStyle(tb,"width"),10)+((!this.parent.browser.isIE)?((!!navigator.userAgent.match(/Trident.*rv[ :]*11\./))?0:3):0),borderLeftWidth:1});} else {this.parent.dom.setStyle(tls,{});} this.parent.dom.setStyle(tls,this.setStyle.tabOption||{});} @@ -175,7 +175,7 @@ else if(this.options.strict_position) {this.options.position.x=(this.options.position.x<0)?0:this.options.position.x;this.options.position.y=(this.options.position.y<0)?0:this.options.position.y;} this.zIndex=this.options.zIndex||this.makezIndex();this.parent.dom.setStyle(this.elements.containerWindow,{width:this.options.size.w,height:this.options.size.h,position:"absolute",left:this.options.position.x,top:this.options.position.y,opacity:this.styles.fx.opacityPanel.Static/100,filter:"alpha(opacity="+this.styles.fx.opacityPanel.Static+")",zIndex:this.zIndex});this.parent.dom.setStyle(this.elements.containerWindow,this.setStyle.containerWindow||{});},frontend:function() -{this.parent.dom.setStyle(this.elements.frontend,{width:(this.parent.browser.isIE)?"auto":"100%"});this.parent.dom.setStyle(this.elements.frontend,this.setStyle.frontend||{});},backend:function() +{this.parent.dom.setStyle(this.elements.frontend,{width:(this.parent.browser.isIE)?((!!navigator.userAgent.match(/Trident.*rv[ :]*11\./))?"100%":"auto"):"100%"});this.parent.dom.setStyle(this.elements.frontend,this.setStyle.frontend||{});},backend:function() {this.parent.dom.setStyle(this.elements.backend,{});this.parent.dom.setStyle(this.elements.backend,this.setStyle.backend||{});},loader:function() {this.parent.dom.setStyle(this.elements.loader,{background:"url('/images/classic/loader_B.gif')",backgroundRepeat:"no-repeat",width:32,height:32,position:"absolute",display:"none"});this.parent.dom.setStyle(this.elements.loader,this.setStyle.loader||{});},iframe:function() {this.parent.dom.setStyle(this.elements.iframe,{});this.parent.dom.setStyle(this.elements.iframe,this.setStyle.iframe||{});},titleBar:function() @@ -186,18 +186,19 @@ this.zIndex=this.options.zIndex||this.makezIndex();this.parent.dom.setStyle(this {this.parent.dom.setStyle(this.elements.close,{height:this.controlSize.h,right:this.controlPosition(),width:this.controlSize.w});this.parent.dom.setStyle(this.elements.close,this.setStyle.close||{});this.parent.event.add(this.elements.close,"mouseup",this.remove,false);},headerBar:function() {this.parent.dom.setStyle(this.elements.headerBar,{display:((!this.options.headerBar)?"none":"block")});this.parent.dom.setStyle(this.elements.headerBar,this.setStyle.headerBar||{});},shadow:function() {this.parent.dom.setStyle(this.elements.shadow,{width:this.elements.containerWindow.offsetWidth,height:this.elements.containerWindow.offsetHeight,top:(parseInt(this.parent.dom.getStyle(this.elements.containerWindow,"top"),10)+2),left:(parseInt(this.parent.dom.getStyle(this.elements.containerWindow,"left"),10)+2),opacity:this.styles.fx.opacityShadow.Static/100,filter:"alpha(opacity="+this.styles.fx.opacityShadow.Static+")",zIndex:this.zIndex-2});this.parent.dom.setStyle(this.elements.shadow,this.setStyle.shadow||{});},modal:function() -{var ps=[this.parent.dom.get_doc().scrollWidth,this.parent.dom.get_doc().scrollHeight];this.parent.dom.setStyle(this.elements.modal,{height:ps[1],width:ps[0],position:"absolute",zIndex:this.zIndex-3});if(this.options.fx.fadeIn===true) +{var ps=[this.parent.dom.get_doc().scrollWidth,this.parent.dom.get_doc().scrollHeight];this.parent.dom.setStyle(this.elements.modal,{height:ps[1],width:ps[0],position:"absolute",zIndex:this.zIndex-3});if(!!navigator.userAgent.match(/Trident.*rv[ :]*11\./)){this.parent.dom.setStyle(this.elements.modal,{opacity:this.styles.fx.opacityShadow.Static/100});} +if(this.options.fx.fadeIn===true) {new this.parent.module.fx.fade().make({duration:1000,end:this.styles.fx.opacityModal.Static/100,dom:this.elements.modal});} else {this.parent.dom.opacity(this.elements.modal,this.styles.fx.opacityModal.Static);} this.parent.dom.setStyle(this.elements.modal,this.setStyle.modal||{});},tab:function() {this.tab={display:"horizontal",initIn:20,step:5,optHeight:20,widthFixed:true,optWidth:this.tab.width-4}.concatMaborak(this.tab);var thm=this.tab.display==="vertical"?"":"H";var heightContent=this.options.size.h-(this.elements.titleBar.offsetHeight+this.elements.statusBar.offsetHeight);var beginTop=this.elements.titleBar.offsetHeight+this.elements.headerBar.offsetHeight;var beginLeft=4;var space=this.spaceOutPanel();this.tab.width=(this.tab.display==="vertical")?((this.tab.options)?((this.tab.width)?this.tab.width:80):0):4;this.parent.dom.setStyle(this.elements.tab,this.setStyle.tab||{});if(this.tab.options) -{this.parent.dom.setStyle(this.elements.tab,{height:((this.tab.display==="vertical")?heightContent:this.tab.optHeight+4+(this.parent.browser.isIE?14:0)),width:((this.tab.display==="vertical")?this.tab.width:this.options.size.w-8),top:beginTop,left:((this.tab.display==="vertical")?0:4)});this.tabSelected=false;this.tabLastSelected=false;this.tab.diffWidthBugPadding=((this.parent.browser.isIE)?0:20);this.elements.tabOptions=[];var lastBul=0;for(var i=0;i-1)&&(window.location.href.indexOf('?TYPE=OUTPUT_DOCUMENT&UID=')>-1)&&(window.location.href.indexOf('&ACTION=VIEW&')>-1)&&(window.location.href.indexOf('&DOC='+APP_DOC_UID)>-1)){window.location=getField('DYN_FORWARD');} else{cases_AllOutputdocsList.refresh();}}.extend(this);oRPC.make();}.extend(this)});};var resendMessage=function(APP_UID,APP_MSG_UID) {new leimnud.module.app.confirm().make({label:G_STRINGS.ID_MSG_CONFIRM_RESENDMSG,action:function(){var oRPC=new leimnud.module.rpc.xmlhttp({url:'cases_Ajax',args:'action=resendMessage&APP_UID='+APP_UID+'&APP_MSG_UID='+APP_MSG_UID});oRPC.callback=function(rpc){messagesListPanel.clearContent();messagesListPanel.loader.show();var oRPC2=new leimnud.module.rpc.xmlhttp({url:'cases_Ajax',args:'action=showHistoryMessages'});oRPC2.callback=function(rpc){messagesListPanel.loader.hide();var scs=rpc.xmlhttp.responseText.extractScript();messagesListPanel.addContent(rpc.xmlhttp.responseText);scs.evalScript();}.extend(this);oRPC2.make();}.extend(this);oRPC.make();}.extend(this)});};function showdebug() -{if(typeof parent!='undefined'&&typeof parent.parent!='undefined'){if(typeof parent.parent.Ext!='undefined'){if(!parent.parent.PANEL_EAST_OPEN){var debugPanel=parent.parent.Ext.getCmp('debugPanel');parent.parent.PANEL_EAST_OPEN=true;debugPanel.show();debugPanel.ownerCt.doLayout();debugPanel.expand();} -parent.parent.propStore.load();parent.parent.triggerStore.load();}}} +{try{if(typeof(parent)!="undefined"&&typeof(parent.parent)!="undefined"&&typeof(parent.parent.Ext)!="undefined"){if(!parent.parent.PANEL_EAST_OPEN){var debugPanel=parent.parent.Ext.getCmp("debugPanel");parent.parent.PANEL_EAST_OPEN=true;debugPanel.show();debugPanel.ownerCt.doLayout();debugPanel.expand();} +parent.parent.propStore.load();parent.parent.triggerStore.load();}}catch(e){}} var uploadInputDocument=function(docID,appDocId,docVersion,actionType){if(actionType){if(actionType=="R"){windowTitle=G_STRINGS.ID_UPLOAD_REPLACE_INPUT;} if(actionType=="NV"){windowTitle=G_STRINGS.ID_UPLOAD_NEW_INPUT_VERSION;}}else{windowTitle=G_STRINGS.ID_UPLOAD_NEW_INPUT;docVersion=1;actionType="";appDocId="";} oPanel=new leimnud.module.panel();oPanel.options={size:{w:550,h:355},position:{x:0,y:0,center:true},title:windowTitle,theme:"processmaker",statusBar:false,control:{resize:true,roll:false},fx:{modal:true,opacity:true,blinkToFront:true,fadeIn:false}};oPanel.events={remove:function(){delete(oPanel);}.extend(this)};oPanel.make();oPanel.loader.show();var oRPC=new leimnud.module.rpc.xmlhttp({url:'cases_Ajax',args:"action=uploadInputDocument&docID="+docID+"&appDocId="+appDocId+"&docVersion="+docVersion+"&actionType="+actionType});oRPC.callback=function(rpc){oPanel.loader.hide();var scs=rpc.xmlhttp.responseText.extractScript();oPanel.addContent(rpc.xmlhttp.responseText);scs.evalScript();}.extend(this);oRPC.make();};var uploadToReviseInputDocument=function(docID,appDocId,docVersion,actionType){if(actionType){if(actionType=="R"){windowTitle=G_STRINGS.ID_UPLOAD_REPLACE_INPUT;} diff --git a/workflow/engine/controllers/home.php b/workflow/engine/controllers/home.php index df0d0ff00..ba446fbe0 100755 --- a/workflow/engine/controllers/home.php +++ b/workflow/engine/controllers/home.php @@ -61,6 +61,9 @@ class Home extends Controller $this->setVar( 'msg', $data['m'] ); $this->setVar( 'usr', $data['u'] ); $this->setVar( 'pwd', $data['p'] ); + $this->setVar('timeZoneFailed', (isset($data['timeZoneFailed']))? $data['timeZoneFailed'] : 0); + $this->setVar('userTimeZone', (isset($data['userTimeZone']))? $data['userTimeZone'] : ''); + $this->setVar('browserTimeZone', (isset($data['browserTimeZone']))? $data['browserTimeZone'] : ''); $this->setVar( 'skin', $skin ); $this->setView( $this->userUxBaseTemplate . PATH_SEP . $template ); diff --git a/workflow/engine/methods/login/authentication.php b/workflow/engine/methods/login/authentication.php index 8b5d278de..b62810aa8 100755 --- a/workflow/engine/methods/login/authentication.php +++ b/workflow/engine/methods/login/authentication.php @@ -24,6 +24,15 @@ */ try { + $usr = ''; + $pwd = ''; + + if (strpos($_SERVER['HTTP_REFERER'], 'home/login') !== false) { + $urlLogin = '../home/login'; + } else { + $urlLogin = (substr(SYS_SKIN, 0, 2) !== 'ux')? 'login' : '../main/login'; + } + if (!$RBAC->singleSignOn) { if (!isset($_POST['form']) ) { G::SendTemporalMessage ('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error'); @@ -32,8 +41,6 @@ try { } $frm = $_POST['form']; - $usr = ''; - $pwd = ''; if (isset($frm['USR_USERNAME'])) { $usr = mb_strtolower(trim($frm['USR_USERNAME']), 'UTF-8'); @@ -142,20 +149,14 @@ try { } if (strpos($_SERVER['HTTP_REFERER'], 'home/login') !== false) { - $d = serialize(array('u'=>$usr, 'p'=>$pwd, 'm'=>G::LoadTranslation($errLabel))); - $loginUrl = '../home/login?d='.base64_encode($d); + $d = serialize(['u' => $usr, 'p' => $pwd, 'm' => G::LoadTranslation($errLabel)]); + $urlLogin = $urlLogin . '?d=' . base64_encode($d); } else { G::SendTemporalMessage($errLabel, "warning"); - - if (substr(SYS_SKIN, 0, 2) !== 'ux') { - $loginUrl = 'login'; - } else { - $loginUrl = '../main/login'; - } } - G::header("location: $loginUrl"); - die; + G::header('Location: ' . $urlLogin); + exit(0); } if (!isset( $_SESSION['WORKSPACE'] ) ) { @@ -180,6 +181,12 @@ try { $_SESSION['USR_USERNAME'] = $usr; } + //Update User Time Zone + if (isset($_POST['form']['BROWSER_TIME_ZONE'])) { + $user = new Users(); + $user->update(['USR_UID' => $_SESSION['USER_LOGGED'], 'USR_TIME_ZONE' => $_POST['form']['BROWSER_TIME_ZONE']]); + } + //Set User Time Zone $user = UsersPeer::retrieveByPK($_SESSION['USER_LOGGED']); @@ -195,6 +202,28 @@ try { $_SESSION['USR_TIME_ZONE'] = $userTimeZone; } + if (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__']) { + $dateTime = new \ProcessMaker\Util\DateTime(); + + $timeZoneOffset = $dateTime->getTimeZoneOffsetByTimeZoneId($_SESSION['USR_TIME_ZONE']); + + if ($timeZoneOffset === false || $timeZoneOffset != (int)($_POST['form']['BROWSER_TIME_ZONE_OFFSET'])) { + $_SESSION['__TIME_ZONE_FAILED__'] = true; + $_SESSION['USR_USERNAME'] = $usr; + $_SESSION['USR_PASSWORD'] = $pwd; + + $_SESSION['BROWSER_TIME_ZONE'] = $dateTime->getTimeZoneIdByTimeZoneOffset((int)($_POST['form']['BROWSER_TIME_ZONE_OFFSET'])); + + if (strpos($_SERVER['HTTP_REFERER'], 'home/login') !== false) { + $d = serialize(['u' => $usr, 'p' => $pwd, 'm' => '', 'timeZoneFailed' => 1, 'userTimeZone' => $_SESSION['USR_TIME_ZONE'], 'browserTimeZone' => $_SESSION['BROWSER_TIME_ZONE']]); + $urlLogin = $urlLogin . '?d=' . base64_encode($d); + } + + G::header('Location: ' . $urlLogin); + exit(0); + } + } + //Set data $aUser = $RBAC->userObj->load($_SESSION['USER_LOGGED']); $RBAC->loadUserRolePermission($RBAC->sSystem, $_SESSION['USER_LOGGED']); diff --git a/workflow/engine/methods/login/login.php b/workflow/engine/methods/login/login.php index 6c4ae9cfc..329f1d838 100755 --- a/workflow/engine/methods/login/login.php +++ b/workflow/engine/methods/login/login.php @@ -139,6 +139,16 @@ if (isset ($_SESSION['USER_LOGGED'])) { } //end log +$timeZoneFailed = false; + +if (isset($_SESSION['__TIME_ZONE_FAILED__']) && $_SESSION['__TIME_ZONE_FAILED__']) { + $timeZoneFailed = true; + $userUsername = $_SESSION['USR_USERNAME']; + $userPassword = $_SESSION['USR_PASSWORD']; + $userTimeZone = $_SESSION['USR_TIME_ZONE']; + $browserTimeZone = $_SESSION['BROWSER_TIME_ZONE']; +} + //start new session @session_destroy(); session_start(); @@ -183,6 +193,21 @@ if (in_array(G::encryptOld($licenseManager->result), array('38afd7ae34bd5e3e6fc1 } /*----------------------------------********---------------------------------*/ +if ($timeZoneFailed) { + $arrayData = [ + 'USR_USERNAME' => $userUsername, + 'USR_PASSWORD' => $userPassword, + 'USR_TIME_ZONE' => $userTimeZone, + 'BROWSER_TIME_ZONE' => $browserTimeZone + ]; + + $G_PUBLISH = new Publisher(); + $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login' . PATH_SEP . 'TimeZoneAlert', '', $arrayData, SYS_URI . 'login/authentication.php'); + + G::RenderPage('publish'); + exit(0); +} + //translation //$Translations = G::getModel("Translation"); //require_once "classes/model/Translation.php"; diff --git a/workflow/engine/templates/home/login_ie.html b/workflow/engine/templates/home/login_ie.html index fab880a6e..956d88965 100644 --- a/workflow/engine/templates/home/login_ie.html +++ b/workflow/engine/templates/home/login_ie.html @@ -16,19 +16,51 @@ left: 50%; top: 50%; width: 300px; - height: 140px; margin-top: -140px; margin-left: -210px; overflow: none; } + + {/literal} - +
+ + +
@@ -36,31 +68,61 @@ - - - - - - - - - - - - - - - + {if (!$timeZoneFailed) } + + + + + + + + + + + + + + + + {else} + + + + + + + + + + + + + + + + + + {/if}
{translate label="ID_LOGIN"}
{translate label="ID_USER"} - -
{translate label="ID_PASSWORD"} - -
-
- -
{translate label="ID_LOGIN"}
{translate label="ID_USER"} + +
{translate label="ID_PASSWORD"} + +
+
+ +
{translate label="ID_TIME_ZONE_LOGIN_TITLE"}
+ {translate label="ID_TIME_ZONE_LOGIN_DESCRIPTION1"} + {translate label="ID_TIME_ZONE_LOGIN_DESCRIPTION2"} + {translate label="ID_TIME_ZONE_LOGIN_DESCRIPTION3"} +
+
+ {translate label="ID_TIME_ZONE_LOGIN_DESCRIPTION_DETAILS"} +
+
+ +
@@ -73,3 +135,4 @@ + diff --git a/workflow/engine/templates/home/login_standard.html b/workflow/engine/templates/home/login_standard.html index 0efcedd32..942268025 100644 --- a/workflow/engine/templates/home/login_standard.html +++ b/workflow/engine/templates/home/login_standard.html @@ -55,45 +55,97 @@ }); } + function getBrowserTimeZoneOffset() + { + var d = new Date(); + var tzOffset = d.getTimezoneOffset(); + return ((tzOffset > 0)? "-" : "") + (tzOffset * 60); + } + + function stringReplace(strSearch, strReplace, str) + { + var expression = eval("/" + strSearch + "/g"); + + return str.replace(expression, strReplace); + } + + function onLoad() + { + document.getElementById("form[BROWSER_TIME_ZONE_OFFSET]").value = getBrowserTimeZoneOffset(); + + if (document.getElementById("timeZoneFailed").value == "1") { + var strHtml = document.getElementById("details").innerHTML; + strHtml = stringReplace("\\{0\\}", document.getElementById("form[USR_TIME_ZONE]").value, strHtml); + strHtml = stringReplace("\\{1\\}", document.getElementById("form[BROWSER_TIME_ZONE]").value, strHtml); + + document.getElementById("details").innerHTML = strHtml; + } + } {/literal} - +
- + + + +
+ diff --git a/workflow/engine/xmlform/login/TimeZoneAlert.html b/workflow/engine/xmlform/login/TimeZoneAlert.html new file mode 100644 index 000000000..435066514 --- /dev/null +++ b/workflow/engine/xmlform/login/TimeZoneAlert.html @@ -0,0 +1,32 @@ + + + + + + diff --git a/workflow/engine/xmlform/login/TimeZoneAlert.xml b/workflow/engine/xmlform/login/TimeZoneAlert.xml new file mode 100644 index 000000000..1980bbe7a --- /dev/null +++ b/workflow/engine/xmlform/login/TimeZoneAlert.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + diff --git a/workflow/engine/xmlform/login/loginpm3.html b/workflow/engine/xmlform/login/loginpm3.html index ac5c4ad2e..5a7149afe 100755 --- a/workflow/engine/xmlform/login/loginpm3.html +++ b/workflow/engine/xmlform/login/loginpm3.html @@ -2,6 +2,7 @@ id="{$form_id}" name="{$form_name}" action="{$form_action}" method="post" encType="multipart/form-data" onsubmit="return validateForm('{$form_objectRequiredFields}');"> + {$form.BROWSER_TIME_ZONE_OFFSET}
{$form.USR_PASSWORD}
- + diff --git a/workflow/engine/xmlform/login/loginpm3.xml b/workflow/engine/xmlform/login/loginpm3.xml index 9ec48e180..135da30a4 100755 --- a/workflow/engine/xmlform/login/loginpm3.xml +++ b/workflow/engine/xmlform/login/loginpm3.xml @@ -1,5 +1,7 @@ + + <en><![CDATA[Login]]></en> @@ -38,34 +40,34 @@ function getElementsByClassNameIE8(node, classname) { window.onload= function(){ var inputUser, inputPass; - if(document.getElementById('form[USR_USERNAME]').placeholder == undefined && document.getElementById('form[BSUBMIT]').classList == undefined){ + if(document.getElementById('form[USR_USERNAME]').placeholder == undefined && document.getElementById('form[BSUBMIT]').classList == undefined){ document.getElementById('form[USR_USERNAME]').value = _('ID_USER'); document.getElementById('form[USR_PASSWORD_MASK]').value = _('ID_PASSWORD'); document.getElementById('form[BSUBMIT]').className = "button-login-success"; inputUser = document.getElementById('form[USR_USERNAME]'); inputPass = document.getElementById('form[USR_PASSWORD_MASK]'); - + inputUser.attachEvent("onclick", function (){ if(_('ID_USER') == inputUser.value){ inputUser.value=""; - } + } }); inputUser.attachEvent("onblur", function (){ if(inputUser.value == ""){ inputUser.value=_('ID_USER'); - } + } }); - + inputPass.attachEvent("onclick", function (){ if(_('ID_PASSWORD') == inputPass.value){ inputPass.value=""; - } + } }); - + inputPass.attachEvent("onblur", function (){ if(inputPass.value == ""){ inputPass.value = _('ID_PASSWORD'); - } + } }); @@ -74,7 +76,7 @@ window.onload= function(){ document.getElementById('form[USR_PASSWORD_MASK]').placeholder = _('ID_PASSWORD'); document.getElementById('form[BSUBMIT]').classList.remove('module_app_button___gray'); document.getElementById('form[BSUBMIT]').classList.add('button-login-success'); - } + } }; // enable/disable forgot password link @@ -158,8 +160,9 @@ leimnud.event.add(document.getElementById('form[BSUBMIT]'), 'click', function() document.getElementById("form[USR_PASSWORD]").value = document.getElementById("form[USR_PASSWORD_MASK]").value; document.getElementById("form[USR_PASSWORD_MASK]").value = ""; + document.getElementById("form[BROWSER_TIME_ZONE_OFFSET]").value = getBrowserTimeZoneOffset(); if(!navigator.userAgent.indexOf("MSIE 8.0")>0) - document.getElementById("form[USR_PASSWORD_MASK]").setAttribute("type", "text"); + document.getElementById("form[USR_PASSWORD_MASK]").setAttribute("type", "text"); document.login.submit(); }.extend(document.getElementById('form[BSUBMIT]'))); diff --git a/workflow/engine/xmlform/login/sysLoginNoWSpm3.html b/workflow/engine/xmlform/login/sysLoginNoWSpm3.html index 836cb1303..a2d8253bd 100644 --- a/workflow/engine/xmlform/login/sysLoginNoWSpm3.html +++ b/workflow/engine/xmlform/login/sysLoginNoWSpm3.html @@ -2,14 +2,15 @@ + {$form.BROWSER_TIME_ZONE_OFFSET}
{$form.USR_PASSWORD}
{$form.USR_USERNAME} - {$form.USR_PASSWORD_MASK} - + {$form.USR_PASSWORD_MASK} +
{$form.USER_ENV} {$form.USER_LANG} - +
- {$form.BSUBMIT} + {$form.BSUBMIT}
- - + + diff --git a/workflow/engine/xmlform/login/sysLoginNoWSpm3.xml b/workflow/engine/xmlform/login/sysLoginNoWSpm3.xml index f13b9fe5e..51cdc7daf 100755 --- a/workflow/engine/xmlform/login/sysLoginNoWSpm3.xml +++ b/workflow/engine/xmlform/login/sysLoginNoWSpm3.xml @@ -1,5 +1,7 @@ + + <en><![CDATA[Login]]></en> @@ -44,7 +46,7 @@ function createEvent(elem, event, fn) { window.onload= function(){ var inputUser, inputWs, - inputPass; + inputPass; if(document.getElementById('form[USR_USERNAME]').placeholder === undefined && document.getElementById('form[BSUBMIT]').classList == undefined){ document.getElementById('form[USR_USERNAME]').value = _('ID_USER'); document.getElementById('form[USR_PASSWORD_MASK]').value = _('ID_PASSWORD'); @@ -52,49 +54,49 @@ window.onload= function(){ document.getElementById('form[BSUBMIT]').className = "button-login-success"; inputUser = document.getElementById('form[USR_USERNAME]'); inputPass = document.getElementById('form[USR_PASSWORD_MASK]'); - inputWs = document.getElementById('form[USER_ENV]'); + inputWs = document.getElementById('form[USER_ENV]'); inputUser.attachEvent("onclick", function (){ if(_('ID_USER') == inputUser.value){ inputUser.value=""; - } + } }); inputUser.attachEvent("onblur", function (){ if(inputUser.value == ""){ inputUser.value=_('ID_USER'); - } + } }); - + inputPass.attachEvent("onclick", function (){ if(_('ID_PASSWORD') == inputPass.value){ inputPass.value=""; - } + } }); - + inputPass.attachEvent("onblur", function (){ if(inputPass.value == ""){ inputPass.value = _('ID_PASSWORD'); - } + } }); inputWs.attachEvent("onclick", function (){ if(_('ID_WORKSPACE') == inputWs.value){ inputWs.value=""; - } + } }); inputWs.attachEvent("onblur", function (){ if(inputWs.value == ""){ inputWs.value = _('ID_WORKSPACE'); - } + } }); - + }else{ document.getElementById('form[USR_USERNAME]').placeholder = _('ID_USER'); document.getElementById('form[USR_PASSWORD_MASK]').placeholder = _('ID_PASSWORD'); document.getElementById('form[USER_ENV]').placeholder = _('ID_WORKSPACE'); document.getElementById('form[BSUBMIT]').classList.remove('module_app_button___gray'); - document.getElementById('form[BSUBMIT]').classList.add('button-login-success'); + document.getElementById('form[BSUBMIT]').classList.add('button-login-success'); } }; @@ -131,9 +133,10 @@ leimnud.event.add(document.getElementById('form[USER_ENV]'), 'keypress', functio leimnud.event.add(document.getElementById('form[BSUBMIT]'), 'click', function() { createCookie("pm_sys_sys", "{\"sys_sys\": \"" + getField("USER_ENV").value + "\"}", 365); document.getElementById('form[USR_PASSWORD]').value = document.getElementById('form[USR_PASSWORD_MASK]').value; - document.getElementById('form[USR_PASSWORD_MASK]').value = ''; + document.getElementById('form[USR_PASSWORD_MASK]').value = ''; + document.getElementById("form[BROWSER_TIME_ZONE_OFFSET]").value = getBrowserTimeZoneOffset(); if(!navigator.userAgent.indexOf("MSIE 8.0")>0) - document.getElementById("form[USR_PASSWORD_MASK]").setAttribute("type", "text"); + document.getElementById("form[USR_PASSWORD_MASK]").setAttribute("type", "text"); document.sysLogin.submit(); }.extend(document.getElementById('form[BSUBMIT]')));