[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-cvs
Subject:    [DOC-CVS] com web/doc-editor: Fix login encoding into the login screen & cleanup javascript: index.p
From:       Yannick Torres <yannick () php ! net>
Date:       2014-07-30 20:39:25
Message-ID: php-mail-184c5ddd94b52471cb87ff71d477c74e1504402549 () git ! php ! net
[Download RAW message or body]

Commit:    664a19ead39f07e8f6a344711df30c4c7e85b3e4
Author:    Yannick Torrès <yannick.torres@gmail.com>         Wed, 30 Jul 2014 \
                22:39:25 +0200
Parents:   daa17ee788ced6256c9b2522865d445944172048
Branches:  master

Link:       http://git.php.net/?p=web/doc-editor.git;a=commitdiff;h=664a19ead39f07e8f6a344711df30c4c7e85b3e4


Log:
Fix login encoding into the login screen & cleanup javascript

Changed paths:
  M  index.php
  M  js/login-all-debug.js
  M  js/login-all.js
  M  js/login.js


["diff_664a19ead39f07e8f6a344711df30c4c7e85b3e4.txt" (text/plain)]

diff --git a/index.php b/index.php
index fb476cc..e86a2b4 100755
--- a/index.php
+++ b/index.php
@@ -32,12 +32,12 @@ if (isset($_REQUEST['perm'])) {
         $r = RepositoryFetcher::getInstance()->getFileByXmlID($_lang, $xmlid);
 
         if ( $r ) {
-            $jsVar = 'var directAccess = {"link":"perm", "lang":"'.$r->lang.'", \
"path":"'.$r->path.'", "name":"'.$r->name.'", "project":"'.$_project.'"};'; +         \
$jsVar = "\n".'var directAccess = {"link":"perm", "lang":"'.$r->lang.'", \
"path":"'.$r->path.'", "name":"'.$r->name.'", "project":"'.$_project.'"},';  } else {
-            $jsVar = 'var directAccess = false;';
+            $jsVar = "\n".'var directAccess = false,';
         }
     } else {
-        $jsVar = 'var directAccess = false;';
+        $jsVar = "\n".'var directAccess = false,';
     }
 
 } else if (isset($_REQUEST['patch'])) {
@@ -54,7 +54,7 @@ if (isset($_REQUEST['perm'])) {
     $fileName = $_patch[count($_patch)-1];
     $filePath = substr($patch, 0, (strlen($patch)-strlen($fileName)));
     
-    $jsVar = 'var directAccess = {"link":"patch", "lang":"en", \
"path":"'.htmlspecialchars($filePath).'", "name":"'.htmlspecialchars($fileName).'", \
"project":"'.htmlspecialchars($_project).'"};'; +    $jsVar = "\n".'var directAccess \
= {"link":"patch", "lang":"en", "path":"'.htmlspecialchars($filePath).'", \
"name":"'.htmlspecialchars($fileName).'", \
"project":"'.htmlspecialchars($_project).'"},';  
 } else if (isset($_REQUEST['patchID'])) {
 
@@ -69,7 +69,7 @@ if (isset($_REQUEST['perm'])) {
     
     $patchInfo = RepositoryManager::getInstance()->getPatchInfo($patchID);
     
-    $jsVar = 'var directAccess = {"link":"patchID", "lang":"en", \
"patchID":"'.htmlspecialchars($patchID).'", \
"patchName":"'.htmlspecialchars($patchInfo->name).'", \
"project":"'.htmlspecialchars($_project).'"};'; +    $jsVar = "\n".'var directAccess \
= {"link":"patchID", "lang":"en", "patchID":"'.htmlspecialchars($patchID).'", \
"patchName":"'.htmlspecialchars($patchInfo->name).'", \
"project":"'.htmlspecialchars($_project).'"},';  
 } else if (isset($_REQUEST['action'])) {
     
@@ -82,22 +82,26 @@ if (isset($_REQUEST['perm'])) {
     // Set the project
     ProjectManager::getInstance()->setProject($_project);
     
-    $jsVar = 'var directAccess = {
+    $jsVar = "\n".'var directAccess = {
         "project":"'.htmlspecialchars($_project).'",
         "action": "'.htmlspecialchars($_action).'",
         "idDB": "'.htmlspecialchars($_idDB).'"
-    };';
+    },';
     
 } else {
-    $jsVar = 'var directAccess = false;';
+    $jsVar = "\nvar directAccess = false,";
 }
 
+// Init auth var
+if( isset($_COOKIE['loginApp']) ) {
+    $jsVar .= " loginApp = \
\"".utf8_decode(html_entity_decode($_COOKIE['loginApp']))."\","; +} else {
+    $jsVar .= " loginApp = false,";
+}
 
+$jsVar .= " auth = {};\n";
 
 
-// Init auth var
-$jsVar .= "\nvar auth = {};\n";
-
 // Log the user in if needed
 if (!isset($_SESSION['userID']))
 {
diff --git a/js/login-all-debug.js b/js/login-all-debug.js
index 350d9d4..50f3742 100644
--- a/js/login-all-debug.js
+++ b/js/login-all-debug.js
@@ -784,7 +784,7 @@ Ext.reg('windowdrawer', Ext.ux.plugins.WindowDrawer);var \
PhDOE_loginPage = funct  }, {
                             fieldLabel      : 'Login',
                             name            : 'vcsLogin',
-                            value           : ( Ext.util.Cookies.get("loginApp") ) ? \
Ext.util.Cookies.get("loginApp") : 'anonymous', +                            value    \
: ( loginApp ) ? loginApp : 'anonymous',  id              : 'login-form-vcsLogin',
                             enableKeyEvents : true,
                             listeners       : {
@@ -926,7 +926,7 @@ Ext.reg('windowdrawer', Ext.ux.plugins.WindowDrawer);var \
PhDOE_loginPage = funct  }
                         }
                     }, '->', {
-                        text      :  ( Ext.util.Cookies.get("loginApp") && \
Ext.util.Cookies.get("loginApp") != 'anonymous' ) ? 'Login' : 'Anonymous login', +    \
text      :  ( loginApp && loginApp != 'anonymous' ) ? 'Login' : 'Anonymous login',  \
id        : 'login-btn',  disabled  : false,
                         listeners : {
@@ -987,8 +987,8 @@ Ext.reg('windowdrawer', Ext.ux.plugins.WindowDrawer);var \
PhDOE_loginPage = funct  this.authService = 'VCS';
                             this.authServiceID = '';
                             
-                            if( Ext.util.Cookies.get("loginApp") ) {
-                                \
Ext.getCmp('login-form-vcsLogin').setValue(Ext.util.Cookies.get("loginApp")); +       \
if( loginApp ) { +                                \
Ext.getCmp('login-form-vcsLogin').setValue(loginApp);  \
                Ext.getCmp('login-btn').setText('Login');
                                 \
Ext.getCmp('login-form-email').setValue(Ext.util.Cookies.get("email"));  
diff --git a/js/login-all.js b/js/login-all.js
index 737435b..34613f6 100644
--- a/js/login-all.js
+++ b/js/login-all.js
@@ -1 +1 @@
-Ext.BLANK_IMAGE_URL="js/ExtJs/resources/images/default/s.gif";String.prototype.ucFirst=function(){return \
this.substr(0,1).toUpperCase()+this.substr(1,this.length)};Ext.override(Ext.grid.Check \
boxSelectionModel,{handleMouseDown:function(d,h,f){if(f.button!==0||this.isLocked()){return}var \
a=this.grid.getView();if(f.shiftKey&&this.last!==false){var \
c=this.last;this.selectRange(c,h,f.ctrlKey);this.last=c;a.focusRow(h)}else{var \
b=this.isSelected(h);if(b){this.deselectRow(h)}else{if(!b){this.selectRow(h,!this.singleSelect);a.focusRow(h)}}}}});function \
log(){if(console){console.log.apply(this,arguments)}}function _(a){try{var \
c=i18n[a];if(c===undefined){c=a;log("FIX ME : i18n not found for the string: \
"+a)}return c}catch(b){return a}}function XHR(c){var \
b=c.success,d=c.failure,a=c.callback;c.url="./do/"+c.params.task;delete \
c.params.task;c.params=Ext.applyIf({csrfToken:csrfToken},c.params);c.failure=c.success=Ext.emptyFn;c.callback=function(g,j,f){var \
i=null;try{i=Ext.decode(f.responseText)}catch(h){log("Invalid XHR JSON \
Response:"+f.responseText)}if(j&&i&&i.success){if(b!==undefined){Ext.callback(b,c.scop \
e,[f,g])}}else{if(d!==undefined){Ext.callback(d,c.scope,[f,g])}}if(a!==undefined){Ext. \
callback(a,c.scope,[g,j,f])}};Ext.Ajax.request(c)}Ext.override(Ext.form.Field,{afterRender:function(){var \
b=function(e){var d=null;var \
c=null;d=e.getEl().up("div.x-form-item");if(d){c=d.child("label")}if(c){return \
c}};if(this.tooltipText){var \
a=b(this);if(a){a.addClass(this.tooltipClass||"x-textfield-tooltip");new \
Ext.ToolTip({target:a,html:this.tooltipText,trackMouse:true})}}Ext.form.Field.supercla \
ss.afterRender.call(this);this.initEvents();this.initValue()}});Ext.namespace("Ext.ux. \
plugins");Ext.ux.IconCombo=Ext.extend(Ext.form.ComboBox,{initComponent:function(){Ext.apply(this,{tpl:'<tpl \
for="."><div class="x-combo-list-item ux-icon-combo-item"><div \
class="{'+this.iconClsField+'}" style="position:absolute"></div><div \
class="ux-icon-combo-value">{'+this.displayField+"}</div></div></tpl>"});Ext.ux.IconCo \
mbo.superclass.initComponent.call(this)},onRender:function(b,a){Ext.ux.IconCombo.super \
class.onRender.call(this,b,a);this.wrap.applyStyles({position:"relative"});this.el.add \
Class("ux-icon-combo-input");this.icon=Ext.DomHelper.append(this.el.up("div.x-form-field-wrap"),{tag:"div",style:"position:absolute"})},setIconCls:function(){var \
a=this.store.query(this.valueField,this.getValue()).itemAt(0);if(a){this.icon.classNam \
e=a.get(this.iconClsField)}},setValue:function(a){Ext.ux.IconCombo.superclass.setValue \
.call(this,a);this.setIconCls()}});Ext.reg("iconcombo",Ext.ux.IconCombo);Ext.override(Ext.Window.DD,{startDrag:function(){var \
a=this.win,c,b;a.fireEvent("ghost",[]);this.proxy=a.ghost();if(a.constrain!==false){c= \
a.el.shadowOffset;this.constrainTo(a.container,{right:c,left:c,bottom:c})}else{if(a.co \
nstrainHeader!==false){b=this.proxy.getSize();this.constrainTo(a.container,{right:-(b. \
width-this.headerOffsets[0]),bottom:-(b.height-this.headerOffsets[1])})}}}});Ext.override(Ext.Window,{setZIndex:function(b){var \
a=++b;if(this.modal){this.mask.setStyle("z-index",b)}this.el.setZIndex(a);b+=5;if(this \
.resizer){this.resizer.proxy.setStyle("z-index",++b)}if(a>this.lastZIndex){this.fireEv \
ent("tofront",this)}else{this.fireEvent("toback",this)}this.lastZIndex=b}});Ext.namesp \
ace("Ext.ux","Ext.ux.plugins");Ext.ux.plugins.WindowDrawer=Ext.extend(Ext.Window,{clos \
able:false,resizable:false,show:function(c,a,b){if(this.hidden&&this.fireEvent("before \
show",this)!==false){this.hidden=false;this.onBeforeShow();this.afterShow(!!c,a,b)}},h \
ide:function(c,a,b){if(this.hidden){return}if(this.animate===true&&!c){if(this.el.shad \
ow){this.el.disableShadow()}this.el.slideOut(this.alignToParams.slideDirection,{scope: \
this,duration:this.animDuration||0.25,callback:function(){this.el.removeClass("x-panel-animated");if(typeof \
a=="function"){a.call(b||this)}}})}else{Ext.ux.plugins.WindowDrawer.superclass.hide.ca \
ll(this,null,a,b)}this.hidden=true},init:function(a){this.win=a;this.resizeHandles=thi \
s.side;this.shim=a.shim;a.drawers=a.drawers||{};a.drawers[this.side]=this;a.on({scope: \
this,tofront:this.onBeforeShow,toback:this.onBeforeShow,ghost:this.onBeforeResize,move \
:this.alignAndShow,resize:this.alignAndShow,destroy:this.destroy,render:function(b){th \
is.render(b.el.parent())},beforecollapse:function(){if(!this.hidden){this.wasVisible=t \
rue;this.hide(true)}},expand:function(){if(this.showAgain===this.wasVisible){this.alig \
nAndShow()}},beforehide:function(){this.wasVisible=!this.hidden;this.hide(true)}})},in \
itComponent:function(){Ext.apply(this,{frame:true,draggable:false,modal:false,closeAct \
ion:"hide",alignToParams:{}});this.on({scope:this,beforeshow:this.onBeforeShow,beforeh \
ide:this.onBeforeHide});if(this.size){if(this.side=="e"||this.side=="w"){this.width=th \
is.size}else{this.height=this.size}}Ext.ux.plugins.WindowDrawer.superclass.initCompone \
nt.call(this)},onBeforeResize:function(){if(!this.hidden){this.showAgain=true}this.hid \
e(true)},onBeforeHide:function(){if(this.animate){this.getEl().addClass("x-panel-anima \
ted")}},onBeforeShow:function(){if(this.animate){this.el.addClass("x-panel-animated")} \
this.setAlignment();this.setZIndex(this.win.el.getZIndex()-3)},afterShow:function(c,a, \
b){if(this.animate&&!c){this.el.slideIn(this.alignToParams.slideDirection,{scope:this, \
duration:this.animDuration||0.25,callback:function(){this.el.removeClass("x-panel-animated");if(this.el.shadow){this.el.enableShadow(true)}this.el.show();if(typeof \
a=="function"){a.call(b||this)}}})}else{Ext.ux.plugins.WindowDrawer.superclass.afterShow.call(this);if(typeof \
a=="function"){a.call(b||this)}}this.wasVisible=true},alignAndShow:function(){this.set \
Alignment();if(this.showAgain){this.show(true)}this.showAgain=false},setAlignment:func \
tion(){switch(this.side){case"n":this.setWidth(this.win.el.getWidth()-10);Ext.apply(th \
is.alignToParams,{alignTo:"tl",alignToXY:[5,(this.el.getComputedHeight()*-1)+5],slideD \
irection:"b"});break;case"s":this.setWidth(this.win.el.getWidth()-10);Ext.apply(this.a \
lignToParams,{alignTo:"bl",alignToXY:[5,(Ext.isIE6)?-2:-7],slideDirection:"t"});break; \
case"e":this.setHeight(this.win.el.getHeight()-10);Ext.apply(this.alignToParams,{align \
To:"tr",alignToXY:[-5,5],slideDirection:"l"});break;case"w":this.setHeight(this.win.el \
.getHeight()-10);Ext.apply(this.alignToParams,{alignTo:"tl",alignToXY:[(this.el.getCom \
putedWidth()*-1)+5,5],slideDirection:"r"});break}if(!this.hidden){this.el.alignTo(this \
.win.el,this.alignToParams.alignTo,this.alignToParams.alignToXY);if(Ext.isIE){this.bwr \
ap.hide();this.bwrap.show()}}this.doLayout()},toFront:function(){this.win.toFront();return \
this}});Ext.reg("windowdrawer",Ext.ux.plugins.WindowDrawer);var \
PhDOE_loginPage=function(){Ext.QuickTips.init();Ext.BLANK_IMAGE_URL="js/ExtJs/resource \
s/images/default/s.gif";return{storeLang:"",storeProject:"",storeFlickr:"",email:Ext.u \
til.Cookies.get("email"),authService:"VCS",authServiceID:"",init:function(){this.storeLang=new \
Ext.data.Store({proxy:new \
Ext.data.HttpProxy({url:"./do/getAvailableLanguage"}),reader:new \
Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",idProperty:"code",fields:[{n \
ame:"code"},{name:"iconCls"},{name:"name"}]})});this.storeLang.load({scope:this,callback:function(){this.storeProject.load()}});this.storeProject=new \
Ext.data.Store({proxy:new \
Ext.data.HttpProxy({url:"./do/getAvailableProject"}),reader:new \
Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",idProperty:"code",fields:[{n \
ame:"code"},{name:"iconCls"},{name:"name"},{name:"request_account_uri"}]})});this.storeFlickr=new \
Ext.data.Store({autoLoad:false,proxy:new \
Ext.data.HttpProxy({url:"./do/getElephpants"}),reader:new \
Ext.data.JsonReader({root:"Items",fields:[{name:"img"},{name:"link"}]})});this.storePr \
oject.on("load",function(){this.drawForm()},this)},externalCredentials:function(a,c,d, \
b){this.authService=a;this.authServiceID=d;Ext.getCmp("login-form-vcsLogin").setValue( \
c);Ext.getCmp("login-form-vcsLogin").disable();Ext.getCmp("login-form-vcsPasswd").disable();Ext.getCmp("login-form-auth").setText('<img \
src="themes/img/auth_'+a+'.png" style="vertical-align: middle" /> \
<b>'+a.ucFirst()+"</b>",false);if(b){Ext.getCmp("login-form-email").setValue(b)}Ext.getCmp("login-btn").setText("Anonymous \
login")},drawForm:function(){var a;if(!a){a=new \
Ext.Window({layout:"border",width:440,height:300,closable:false,closeAction:"hide",resizable:false,plain:true,title:"Control \
Access",iconCls:"iconKey",listeners:{show:function(b){a.drawers.e.show();a.drawers.e.s \
etHeight(240)},afterrender:function(b){if(auth&&auth.service){PhDOE_loginPage.externalCredentials(auth.service,auth.login,auth.serviceID,auth.email)}}},plugins:[new \
Ext.ux.plugins.WindowDrawer({html:'To request a VCS account please read :<div \
style="text-align: center; margin-top: 20px;"><span \
id="request-account"></span></div>',side:"s",bodyStyle:"margin: \
10px;",animate:true,resizable:false,height:80}),new \
Ext.ux.plugins.WindowDrawer({title:"&nbsp;&nbsp;Sign in \
with...",side:"e",animate:true,resizable:false,width:150,height:250,bodyStyle:"margin: \
10px;",html:'<div id="auth-login"><a href="?oauth=facebook" title="Facebook"><img \
id="auth-img-fb" src="themes/img/auth_facebook_40.png" class="" /></a> <a \
href="?oauth=github" title="Github"><img id="auth-img-github" \
src="themes/img/auth_github_40.png" class="" /></a><br/><a href="?oauth=google" \
title="Google"><img id="auth-img-google" src="themes/img/auth_google_40.png" /></a> \
<a href="?oauth=linkedin" title="Linkedin"><img id="auth-img-linkedin" \
src="themes/img/auth_linkedin_40.png" /></a><br/><a href="?oauth=stackoverflow" \
title="Stackoverflow"><img id="auth-img-stackoverflow" \
src="themes/img/auth_stackoverflow_40.png" /></a> <a href="?oauth=instagram" \
title="Instagram"><img id="auth-img-instagram" src="themes/img/auth_instagram_40.png" \
/></a></div>',listeners:{afterrender:function(){if(auth.service){switch(auth.service){ \
case"facebook":Ext.get("auth-img-fb").addClass("oauth-enable");Ext.get("auth-img-githu \
b").addClass("oauth-disable");Ext.get("auth-img-google").addClass("oauth-disable");Ext \
.get("auth-img-linkedin").addClass("oauth-disable");Ext.get("auth-img-stackoverflow"). \
addClass("oauth-disable");Ext.get("auth-img-instagram").addClass("oauth-disable");brea \
k;case"github":Ext.get("auth-img-fb").addClass("oauth-disable");Ext.get("auth-img-gith \
ub").addClass("oauth-enable");Ext.get("auth-img-google").addClass("oauth-disable");Ext \
.get("auth-img-linkedin").addClass("oauth-disable");Ext.get("auth-img-stackoverflow"). \
addClass("oauth-disable");Ext.get("auth-img-instagram").addClass("oauth-disable");brea \
k;case"google":Ext.get("auth-img-fb").addClass("oauth-disable");Ext.get("auth-img-gith \
ub").addClass("oauth-disable");Ext.get("auth-img-google").addClass("oauth-enable");Ext \
.get("auth-img-linkedin").addClass("oauth-disable");Ext.get("auth-img-stackoverflow"). \
addClass("oauth-disable");Ext.get("auth-img-instagram").addClass("oauth-disable");brea \
k;case"linkedin":Ext.get("auth-img-fb").addClass("oauth-disable");Ext.get("auth-img-gi \
thub").addClass("oauth-disable");Ext.get("auth-img-google").addClass("oauth-disable"); \
Ext.get("auth-img-linkedin").addClass("oauth-enable");Ext.get("auth-img-stackoverflow" \
).addClass("oauth-disable");Ext.get("auth-img-instagram").addClass("oauth-disable");br \
eak;case"stackoverflow":Ext.get("auth-img-fb").addClass("oauth-disable");Ext.get("auth \
-img-github").addClass("oauth-disable");Ext.get("auth-img-google").addClass("oauth-dis \
able");Ext.get("auth-img-linkedin").addClass("oauth-disable");Ext.get("auth-img-stacko \
verflow").addClass("oauth-enable");Ext.get("auth-img-instagram").addClass("oauth-disab \
le");break;case"instagram":Ext.get("auth-img-fb").addClass("oauth-disable");Ext.get("a \
uth-img-github").addClass("oauth-disable");Ext.get("auth-img-google").addClass("oauth- \
disable");Ext.get("auth-img-linkedin").addClass("oauth-disable");Ext.get("auth-img-sta \
ckoverflow").addClass("oauth-disable");Ext.get("auth-img-instagram").addClass("oauth-e \
nable");break}}else{Ext.get("auth-img-fb").addClass("oauth-disable");Ext.get("auth-img \
-github").addClass("oauth-disable");Ext.get("auth-img-google").addClass("oauth-disable \
");Ext.get("auth-img-linkedin").addClass("oauth-disable");Ext.get("auth-img-stackoverf \
low").addClass("oauth-disable");Ext.get("auth-img-instagram").addClass("oauth-disable" \
)}}}})],items:[{xtype:"panel",baseCls:"x-plain",id:"login-logo",region:"center",bodyStyle:"margin:4px \
4px 4px 8px",html:'<div id="app-logo"><img src="themes/img/php.png"></div><div \
id="app-title">PhD O.E.</div><div id="app-description">Php Docbook Online \
Editor</div>'},{xtype:"form",region:"south",id:"login-form",url:"./do/login",bodyStyle:"padding:5px \
5px 0",border:false,height:170,width:350,labelWidth:110,defaults:{width:217},defaultTy \
pe:"textfield",items:[{xtype:"iconcombo",width:235,fieldLabel:"Project",store:this.sto \
reProject,triggerAction:"all",allowBlank:false,valueField:"code",displayField:"name",i \
conClsField:"iconCls",iconClsBase:"project",mode:"local",listWidth:235,maxHeight:150,e \
ditable:true,id:"login-form-project",name:"projectDisplay",listeners:{afterrender:func \
tion(d){if(directAccess){d.focus();d.onLoad();d.setValue(directAccess.project);d.collapse();d.disable();var \
b=d.store.getById(directAccess.project.toLowerCase()).data.request_account_uri;Ext.get("request-account").dom.innerHTML='<a \
href="'+b+'" target="_blank">'+b+"</a>"}else{d.setValue("php");var \
b=d.store.getById("php").data.request_account_uri;Ext.get("request-account").dom.innerHTML='<a \
href="'+b+'" target="_blank">'+b+"</a>"}},select:function(e,b){var \
d=b.data.request_account_uri;Ext.get("request-account").dom.innerHTML='<a \
href="'+d+'" target="_blank">'+d+"</a>"}}},{fieldLabel:"Login",name:"vcsLogin",value:( \
Ext.util.Cookies.get("loginApp"))?Ext.util.Cookies.get("loginApp"):"anonymous",id:"log \
in-form-vcsLogin",enableKeyEvents:true,listeners:{keypress:function(c,b){if(b.getKey()==b.ENTER){Ext.getCmp("login-form-vcsPasswd").focus()}},keyup:function(d,g){var \
c=this.getValue(),b=Ext.getCmp("login-btn").getText();if(c=="anonymous"||c==""){if(b!="Anonymous \
login"){Ext.getCmp("login-btn").setText("Anonymous login")}}else{if(b=="Anonymous \
login"){Ext.getCmp("login-btn").setText("Login")}}},focus:function(c){var \
b=this.getValue();if(b=="anonymous"){this.setValue("");Ext.getCmp("login-btn").setText("Login")}},blur:function(c){var \
b=this.getValue();if(b=="anonymous"||b==""){this.setValue("");Ext.getCmp("login-btn").setText("Anonymous \
login")}}}},{fieldLabel:"Password",name:"vcsPassword",id:"login-form-vcsPasswd",inputT \
ype:"password",enableKeyEvents:true,listeners:{keypress:function(c,b){if(b.getKey()==b \
.ENTER){Ext.getCmp("login-form-email").focus()}}}},{fieldLabel:"Email",name:"email",id \
:"login-form-email",vtype:"email",value:this.email,enableKeyEvents:true,listeners:{key \
press:function(c,b){if(b.getKey()==b.ENTER){Ext.getCmp("login-form-lang").focus()}}}},{xtype:"label",fieldLabel:"Auth. \
Service",id:"login-form-auth",name:"authService",html:'<img \
src="themes/img/auth_php.png" style="vertical-align: middle" /> \
<b>Php.net</b>'},{xtype:"iconcombo",width:235,fieldLabel:"Language \
module",store:this.storeLang,triggerAction:"all",allowBlank:false,valueField:"code",di \
splayField:"name",iconClsField:"iconCls",iconClsBase:"flags",mode:"local",value:(Ext.u \
til.Cookies.get("lang"))?Ext.util.Cookies.get("lang"):"en",listWidth:235,maxHeight:150 \
,editable:true,id:"login-form-lang",name:"langDisplay",enableKeyEvents:true,listeners: \
{keypress:function(c,b){if(b.getKey()==b.ENTER){Ext.getCmp("login-btn").fireEvent("cli \
ck")}},afterrender:function(b){if(directAccess.lang){b.focus();b.onLoad();b.setValue(d \
irectAccess.lang);b.collapse();b.disable()}}}}]}],buttonAlign:"left",buttons:[{text:"Help",iconCls:"iconHelp2",tabIndex:-1,tooltip:"A \
little reference to this \
application",handler:function(){window.open("https://wiki.php.net/doc/editor","_blank")}},{text:"Request \
an account",iconCls:"iconHelp",tabIndex:-1,handler:function(){if(a.drawers.s.hidden){a \
.drawers.s.show()}else{a.drawers.s.hide()}}},"->",{text:(Ext.util.Cookies.get("loginApp")&&Ext.util.Cookies.get("loginApp")!="anonymous")?"Login":"Anonymous \
login",id:"login-btn",disabled:false,listeners:{click:function(){if(Ext.getCmp("login- \
form").getForm().isValid()){Ext.getCmp("login-form").getForm().submit({method:"POST",p \
arams:{vcsLogin:Ext.getCmp("login-form-vcsLogin").getValue(),vcsPassword:Ext.getCmp("l \
ogin-form-vcsPasswd").getValue(),lang:Ext.getCmp("login-form-lang").getValue(),project \
:Ext.getCmp("login-form-project").getValue(),authService:PhDOE_loginPage.authService,a \
uthServiceID:PhDOE_loginPage.authServiceID},waitTitle:"Connecting",waitMsg:"Sending \
data...",success:function(){window.location.reload()},failure:function(b,c){if(c.response){var \
d=Ext.util.JSON.decode(c.response.responseText);Ext.Msg.show({title:"Error",msg:d.msg, \
buttons:Ext.Msg.OK,icon:Ext.MessageBox.ERROR,fn:function(){Ext.getCmp("login-form-vcsP \
asswd").focus()}})}}})}}}},{scope:this,text:"Reset",handler:function(){Ext.getCmp("log \
in-form-vcsLogin").enable();Ext.getCmp("login-form-vcsPasswd").enable();Ext.getCmp("login-form-vcsPasswd").setValue("");Ext.getCmp("login-form-auth").setText('<img \
src="themes/img/auth_php.png" style="vertical-align: middle" /> \
<b>Php.net</b>',false);this.authService="VCS";this.authServiceID="";if(Ext.util.Cookie \
s.get("loginApp")){Ext.getCmp("login-form-vcsLogin").setValue(Ext.util.Cookies.get("lo \
ginApp"));Ext.getCmp("login-btn").setText("Login");Ext.getCmp("login-form-email").setV \
alue(Ext.util.Cookies.get("email"))}else{Ext.getCmp("login-form-vcsLogin").setValue("anonymous");Ext.getCmp("login-btn").setText("Anonymous \
\ No newline at end of file
+Ext.BLANK_IMAGE_URL="js/ExtJs/resources/images/default/s.gif";String.prototype.ucFirst=function(){return \
this.substr(0,1).toUpperCase()+this.substr(1,this.length)};Ext.override(Ext.grid.Check \
boxSelectionModel,{handleMouseDown:function(d,h,f){if(f.button!==0||this.isLocked()){return}var \
a=this.grid.getView();if(f.shiftKey&&this.last!==false){var \
c=this.last;this.selectRange(c,h,f.ctrlKey);this.last=c;a.focusRow(h)}else{var \
b=this.isSelected(h);if(b){this.deselectRow(h)}else{if(!b){this.selectRow(h,!this.singleSelect);a.focusRow(h)}}}}});function \
log(){if(console){console.log.apply(this,arguments)}}function _(a){try{var \
c=i18n[a];if(c===undefined){c=a;log("FIX ME : i18n not found for the string: \
"+a)}return c}catch(b){return a}}function XHR(c){var \
b=c.success,d=c.failure,a=c.callback;c.url="./do/"+c.params.task;delete \
c.params.task;c.params=Ext.applyIf({csrfToken:csrfToken},c.params);c.failure=c.success=Ext.emptyFn;c.callback=function(g,j,f){var \
i=null;try{i=Ext.decode(f.responseText)}catch(h){log("Invalid XHR JSON \
Response:"+f.responseText)}if(j&&i&&i.success){if(b!==undefined){Ext.callback(b,c.scop \
e,[f,g])}}else{if(d!==undefined){Ext.callback(d,c.scope,[f,g])}}if(a!==undefined){Ext. \
callback(a,c.scope,[g,j,f])}};Ext.Ajax.request(c)}Ext.override(Ext.form.Field,{afterRender:function(){var \
b=function(e){var d=null;var \
c=null;d=e.getEl().up("div.x-form-item");if(d){c=d.child("label")}if(c){return \
c}};if(this.tooltipText){var \
a=b(this);if(a){a.addClass(this.tooltipClass||"x-textfield-tooltip");new \
Ext.ToolTip({target:a,html:this.tooltipText,trackMouse:true})}}Ext.form.Field.supercla \
ss.afterRender.call(this);this.initEvents();this.initValue()}});Ext.namespace("Ext.ux. \
plugins");Ext.ux.IconCombo=Ext.extend(Ext.form.ComboBox,{initComponent:function(){Ext.apply(this,{tpl:'<tpl \
for="."><div class="x-combo-list-item ux-icon-combo-item"><div \
class="{'+this.iconClsField+'}" style="position:absolute"></div><div \
class="ux-icon-combo-value">{'+this.displayField+"}</div></div></tpl>"});Ext.ux.IconCo \
mbo.superclass.initComponent.call(this)},onRender:function(b,a){Ext.ux.IconCombo.super \
class.onRender.call(this,b,a);this.wrap.applyStyles({position:"relative"});this.el.add \
Class("ux-icon-combo-input");this.icon=Ext.DomHelper.append(this.el.up("div.x-form-field-wrap"),{tag:"div",style:"position:absolute"})},setIconCls:function(){var \
a=this.store.query(this.valueField,this.getValue()).itemAt(0);if(a){this.icon.classNam \
e=a.get(this.iconClsField)}},setValue:function(a){Ext.ux.IconCombo.superclass.setValue \
.call(this,a);this.setIconCls()}});Ext.reg("iconcombo",Ext.ux.IconCombo);Ext.override(Ext.Window.DD,{startDrag:function(){var \
a=this.win,c,b;a.fireEvent("ghost",[]);this.proxy=a.ghost();if(a.constrain!==false){c= \
a.el.shadowOffset;this.constrainTo(a.container,{right:c,left:c,bottom:c})}else{if(a.co \
nstrainHeader!==false){b=this.proxy.getSize();this.constrainTo(a.container,{right:-(b. \
width-this.headerOffsets[0]),bottom:-(b.height-this.headerOffsets[1])})}}}});Ext.override(Ext.Window,{setZIndex:function(b){var \
a=++b;if(this.modal){this.mask.setStyle("z-index",b)}this.el.setZIndex(a);b+=5;if(this \
.resizer){this.resizer.proxy.setStyle("z-index",++b)}if(a>this.lastZIndex){this.fireEv \
ent("tofront",this)}else{this.fireEvent("toback",this)}this.lastZIndex=b}});Ext.namesp \
ace("Ext.ux","Ext.ux.plugins");Ext.ux.plugins.WindowDrawer=Ext.extend(Ext.Window,{clos \
able:false,resizable:false,show:function(c,a,b){if(this.hidden&&this.fireEvent("before \
show",this)!==false){this.hidden=false;this.onBeforeShow();this.afterShow(!!c,a,b)}},h \
ide:function(c,a,b){if(this.hidden){return}if(this.animate===true&&!c){if(this.el.shad \
ow){this.el.disableShadow()}this.el.slideOut(this.alignToParams.slideDirection,{scope: \
this,duration:this.animDuration||0.25,callback:function(){this.el.removeClass("x-panel-animated");if(typeof \
a=="function"){a.call(b||this)}}})}else{Ext.ux.plugins.WindowDrawer.superclass.hide.ca \
ll(this,null,a,b)}this.hidden=true},init:function(a){this.win=a;this.resizeHandles=thi \
s.side;this.shim=a.shim;a.drawers=a.drawers||{};a.drawers[this.side]=this;a.on({scope: \
this,tofront:this.onBeforeShow,toback:this.onBeforeShow,ghost:this.onBeforeResize,move \
:this.alignAndShow,resize:this.alignAndShow,destroy:this.destroy,render:function(b){th \
is.render(b.el.parent())},beforecollapse:function(){if(!this.hidden){this.wasVisible=t \
rue;this.hide(true)}},expand:function(){if(this.showAgain===this.wasVisible){this.alig \
nAndShow()}},beforehide:function(){this.wasVisible=!this.hidden;this.hide(true)}})},in \
itComponent:function(){Ext.apply(this,{frame:true,draggable:false,modal:false,closeAct \
ion:"hide",alignToParams:{}});this.on({scope:this,beforeshow:this.onBeforeShow,beforeh \
ide:this.onBeforeHide});if(this.size){if(this.side=="e"||this.side=="w"){this.width=th \
is.size}else{this.height=this.size}}Ext.ux.plugins.WindowDrawer.superclass.initCompone \
nt.call(this)},onBeforeResize:function(){if(!this.hidden){this.showAgain=true}this.hid \
e(true)},onBeforeHide:function(){if(this.animate){this.getEl().addClass("x-panel-anima \
ted")}},onBeforeShow:function(){if(this.animate){this.el.addClass("x-panel-animated")} \
this.setAlignment();this.setZIndex(this.win.el.getZIndex()-3)},afterShow:function(c,a, \
b){if(this.animate&&!c){this.el.slideIn(this.alignToParams.slideDirection,{scope:this, \
duration:this.animDuration||0.25,callback:function(){this.el.removeClass("x-panel-animated");if(this.el.shadow){this.el.enableShadow(true)}this.el.show();if(typeof \
a=="function"){a.call(b||this)}}})}else{Ext.ux.plugins.WindowDrawer.superclass.afterShow.call(this);if(typeof \
a=="function"){a.call(b||this)}}this.wasVisible=true},alignAndShow:function(){this.set \
Alignment();if(this.showAgain){this.show(true)}this.showAgain=false},setAlignment:func \
tion(){switch(this.side){case"n":this.setWidth(this.win.el.getWidth()-10);Ext.apply(th \
is.alignToParams,{alignTo:"tl",alignToXY:[5,(this.el.getComputedHeight()*-1)+5],slideD \
irection:"b"});break;case"s":this.setWidth(this.win.el.getWidth()-10);Ext.apply(this.a \
lignToParams,{alignTo:"bl",alignToXY:[5,(Ext.isIE6)?-2:-7],slideDirection:"t"});break; \
case"e":this.setHeight(this.win.el.getHeight()-10);Ext.apply(this.alignToParams,{align \
To:"tr",alignToXY:[-5,5],slideDirection:"l"});break;case"w":this.setHeight(this.win.el \
.getHeight()-10);Ext.apply(this.alignToParams,{alignTo:"tl",alignToXY:[(this.el.getCom \
putedWidth()*-1)+5,5],slideDirection:"r"});break}if(!this.hidden){this.el.alignTo(this \
.win.el,this.alignToParams.alignTo,this.alignToParams.alignToXY);if(Ext.isIE){this.bwr \
ap.hide();this.bwrap.show()}}this.doLayout()},toFront:function(){this.win.toFront();return \
this}});Ext.reg("windowdrawer",Ext.ux.plugins.WindowDrawer);var \
PhDOE_loginPage=function(){Ext.QuickTips.init();Ext.BLANK_IMAGE_URL="js/ExtJs/resource \
s/images/default/s.gif";return{storeLang:"",storeProject:"",storeFlickr:"",email:Ext.u \
til.Cookies.get("email"),authService:"VCS",authServiceID:"",init:function(){this.storeLang=new \
Ext.data.Store({proxy:new \
Ext.data.HttpProxy({url:"./do/getAvailableLanguage"}),reader:new \
Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",idProperty:"code",fields:[{n \
ame:"code"},{name:"iconCls"},{name:"name"}]})});this.storeLang.load({scope:this,callback:function(){this.storeProject.load()}});this.storeProject=new \
Ext.data.Store({proxy:new \
Ext.data.HttpProxy({url:"./do/getAvailableProject"}),reader:new \
Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",idProperty:"code",fields:[{n \
ame:"code"},{name:"iconCls"},{name:"name"},{name:"request_account_uri"}]})});this.storeFlickr=new \
Ext.data.Store({autoLoad:false,proxy:new \
Ext.data.HttpProxy({url:"./do/getElephpants"}),reader:new \
Ext.data.JsonReader({root:"Items",fields:[{name:"img"},{name:"link"}]})});this.storePr \
oject.on("load",function(){this.drawForm()},this)},externalCredentials:function(a,c,d, \
b){this.authService=a;this.authServiceID=d;Ext.getCmp("login-form-vcsLogin").setValue( \
c);Ext.getCmp("login-form-vcsLogin").disable();Ext.getCmp("login-form-vcsPasswd").disable();Ext.getCmp("login-form-auth").setText('<img \
src="themes/img/auth_'+a+'.png" style="vertical-align: middle" /> \
<b>'+a.ucFirst()+"</b>",false);if(b){Ext.getCmp("login-form-email").setValue(b)}Ext.getCmp("login-btn").setText("Anonymous \
login")},drawForm:function(){var a;if(!a){a=new \
Ext.Window({layout:"border",width:440,height:300,closable:false,closeAction:"hide",resizable:false,plain:true,title:"Control \
Access",iconCls:"iconKey",listeners:{show:function(b){a.drawers.e.show();a.drawers.e.s \
etHeight(240)},afterrender:function(b){if(auth&&auth.service){PhDOE_loginPage.externalCredentials(auth.service,auth.login,auth.serviceID,auth.email)}}},plugins:[new \
Ext.ux.plugins.WindowDrawer({html:'To request a VCS account please read :<div \
style="text-align: center; margin-top: 20px;"><span \
id="request-account"></span></div>',side:"s",bodyStyle:"margin: \
10px;",animate:true,resizable:false,height:80}),new \
Ext.ux.plugins.WindowDrawer({title:"&nbsp;&nbsp;Sign in \
with...",side:"e",animate:true,resizable:false,width:150,height:250,bodyStyle:"margin: \
10px;",html:'<div id="auth-login"><a href="?oauth=facebook" title="Facebook"><img \
id="auth-img-fb" src="themes/img/auth_facebook_40.png" class="" /></a> <a \
href="?oauth=github" title="Github"><img id="auth-img-github" \
src="themes/img/auth_github_40.png" class="" /></a><br/><a href="?oauth=google" \
title="Google"><img id="auth-img-google" src="themes/img/auth_google_40.png" /></a> \
<a href="?oauth=linkedin" title="Linkedin"><img id="auth-img-linkedin" \
src="themes/img/auth_linkedin_40.png" /></a><br/><a href="?oauth=stackoverflow" \
title="Stackoverflow"><img id="auth-img-stackoverflow" \
src="themes/img/auth_stackoverflow_40.png" /></a> <a href="?oauth=instagram" \
title="Instagram"><img id="auth-img-instagram" src="themes/img/auth_instagram_40.png" \
/></a></div>',listeners:{afterrender:function(){if(auth.service){switch(auth.service){ \
case"facebook":Ext.get("auth-img-fb").addClass("oauth-enable");Ext.get("auth-img-githu \
b").addClass("oauth-disable");Ext.get("auth-img-google").addClass("oauth-disable");Ext \
.get("auth-img-linkedin").addClass("oauth-disable");Ext.get("auth-img-stackoverflow"). \
addClass("oauth-disable");Ext.get("auth-img-instagram").addClass("oauth-disable");brea \
k;case"github":Ext.get("auth-img-fb").addClass("oauth-disable");Ext.get("auth-img-gith \
ub").addClass("oauth-enable");Ext.get("auth-img-google").addClass("oauth-disable");Ext \
.get("auth-img-linkedin").addClass("oauth-disable");Ext.get("auth-img-stackoverflow"). \
addClass("oauth-disable");Ext.get("auth-img-instagram").addClass("oauth-disable");brea \
k;case"google":Ext.get("auth-img-fb").addClass("oauth-disable");Ext.get("auth-img-gith \
ub").addClass("oauth-disable");Ext.get("auth-img-google").addClass("oauth-enable");Ext \
.get("auth-img-linkedin").addClass("oauth-disable");Ext.get("auth-img-stackoverflow"). \
addClass("oauth-disable");Ext.get("auth-img-instagram").addClass("oauth-disable");brea \
k;case"linkedin":Ext.get("auth-img-fb").addClass("oauth-disable");Ext.get("auth-img-gi \
thub").addClass("oauth-disable");Ext.get("auth-img-google").addClass("oauth-disable"); \
Ext.get("auth-img-linkedin").addClass("oauth-enable");Ext.get("auth-img-stackoverflow" \
).addClass("oauth-disable");Ext.get("auth-img-instagram").addClass("oauth-disable");br \
eak;case"stackoverflow":Ext.get("auth-img-fb").addClass("oauth-disable");Ext.get("auth \
-img-github").addClass("oauth-disable");Ext.get("auth-img-google").addClass("oauth-dis \
able");Ext.get("auth-img-linkedin").addClass("oauth-disable");Ext.get("auth-img-stacko \
verflow").addClass("oauth-enable");Ext.get("auth-img-instagram").addClass("oauth-disab \
le");break;case"instagram":Ext.get("auth-img-fb").addClass("oauth-disable");Ext.get("a \
uth-img-github").addClass("oauth-disable");Ext.get("auth-img-google").addClass("oauth- \
disable");Ext.get("auth-img-linkedin").addClass("oauth-disable");Ext.get("auth-img-sta \
ckoverflow").addClass("oauth-disable");Ext.get("auth-img-instagram").addClass("oauth-e \
nable");break}}else{Ext.get("auth-img-fb").addClass("oauth-disable");Ext.get("auth-img \
-github").addClass("oauth-disable");Ext.get("auth-img-google").addClass("oauth-disable \
");Ext.get("auth-img-linkedin").addClass("oauth-disable");Ext.get("auth-img-stackoverf \
low").addClass("oauth-disable");Ext.get("auth-img-instagram").addClass("oauth-disable" \
)}}}})],items:[{xtype:"panel",baseCls:"x-plain",id:"login-logo",region:"center",bodyStyle:"margin:4px \
4px 4px 8px",html:'<div id="app-logo"><img src="themes/img/php.png"></div><div \
id="app-title">PhD O.E.</div><div id="app-description">Php Docbook Online \
Editor</div>'},{xtype:"form",region:"south",id:"login-form",url:"./do/login",bodyStyle:"padding:5px \
5px 0",border:false,height:170,width:350,labelWidth:110,defaults:{width:217},defaultTy \
pe:"textfield",items:[{xtype:"iconcombo",width:235,fieldLabel:"Project",store:this.sto \
reProject,triggerAction:"all",allowBlank:false,valueField:"code",displayField:"name",i \
conClsField:"iconCls",iconClsBase:"project",mode:"local",listWidth:235,maxHeight:150,e \
ditable:true,id:"login-form-project",name:"projectDisplay",listeners:{afterrender:func \
tion(d){if(directAccess){d.focus();d.onLoad();d.setValue(directAccess.project);d.collapse();d.disable();var \
b=d.store.getById(directAccess.project.toLowerCase()).data.request_account_uri;Ext.get("request-account").dom.innerHTML='<a \
href="'+b+'" target="_blank">'+b+"</a>"}else{d.setValue("php");var \
b=d.store.getById("php").data.request_account_uri;Ext.get("request-account").dom.innerHTML='<a \
href="'+b+'" target="_blank">'+b+"</a>"}},select:function(e,b){var \
d=b.data.request_account_uri;Ext.get("request-account").dom.innerHTML='<a \
href="'+d+'" target="_blank">'+d+"</a>"}}},{fieldLabel:"Login",name:"vcsLogin",value:( \
loginApp)?loginApp:"anonymous",id:"login-form-vcsLogin",enableKeyEvents:true,listeners \
:{keypress:function(c,b){if(b.getKey()==b.ENTER){Ext.getCmp("login-form-vcsPasswd").focus()}},keyup:function(d,g){var \
c=this.getValue(),b=Ext.getCmp("login-btn").getText();if(c=="anonymous"||c==""){if(b!="Anonymous \
login"){Ext.getCmp("login-btn").setText("Anonymous login")}}else{if(b=="Anonymous \
login"){Ext.getCmp("login-btn").setText("Login")}}},focus:function(c){var \
b=this.getValue();if(b=="anonymous"){this.setValue("");Ext.getCmp("login-btn").setText("Login")}},blur:function(c){var \
b=this.getValue();if(b=="anonymous"||b==""){this.setValue("");Ext.getCmp("login-btn").setText("Anonymous \
login")}}}},{fieldLabel:"Password",name:"vcsPassword",id:"login-form-vcsPasswd",inputT \
ype:"password",enableKeyEvents:true,listeners:{keypress:function(c,b){if(b.getKey()==b \
.ENTER){Ext.getCmp("login-form-email").focus()}}}},{fieldLabel:"Email",name:"email",id \
:"login-form-email",vtype:"email",value:this.email,enableKeyEvents:true,listeners:{key \
press:function(c,b){if(b.getKey()==b.ENTER){Ext.getCmp("login-form-lang").focus()}}}},{xtype:"label",fieldLabel:"Auth. \
Service",id:"login-form-auth",name:"authService",html:'<img \
src="themes/img/auth_php.png" style="vertical-align: middle" /> \
<b>Php.net</b>'},{xtype:"iconcombo",width:235,fieldLabel:"Language \
module",store:this.storeLang,triggerAction:"all",allowBlank:false,valueField:"code",di \
splayField:"name",iconClsField:"iconCls",iconClsBase:"flags",mode:"local",value:(Ext.u \
til.Cookies.get("lang"))?Ext.util.Cookies.get("lang"):"en",listWidth:235,maxHeight:150 \
,editable:true,id:"login-form-lang",name:"langDisplay",enableKeyEvents:true,listeners: \
{keypress:function(c,b){if(b.getKey()==b.ENTER){Ext.getCmp("login-btn").fireEvent("cli \
ck")}},afterrender:function(b){if(directAccess.lang){b.focus();b.onLoad();b.setValue(d \
irectAccess.lang);b.collapse();b.disable()}}}}]}],buttonAlign:"left",buttons:[{text:"Help",iconCls:"iconHelp2",tabIndex:-1,tooltip:"A \
little reference to this \
application",handler:function(){window.open("https://wiki.php.net/doc/editor","_blank")}},{text:"Request \
an account",iconCls:"iconHelp",tabIndex:-1,handler:function(){if(a.drawers.s.hidden){a \
.drawers.s.show()}else{a.drawers.s.hide()}}},"->",{text:(loginApp&&loginApp!="anonymous")?"Login":"Anonymous \
login",id:"login-btn",disabled:false,listeners:{click:function(){if(Ext.getCmp("login- \
form").getForm().isValid()){Ext.getCmp("login-form").getForm().submit({method:"POST",p \
arams:{vcsLogin:Ext.getCmp("login-form-vcsLogin").getValue(),vcsPassword:Ext.getCmp("l \
ogin-form-vcsPasswd").getValue(),lang:Ext.getCmp("login-form-lang").getValue(),project \
:Ext.getCmp("login-form-project").getValue(),authService:PhDOE_loginPage.authService,a \
uthServiceID:PhDOE_loginPage.authServiceID},waitTitle:"Connecting",waitMsg:"Sending \
data...",success:function(){window.location.reload()},failure:function(b,c){if(c.response){var \
d=Ext.util.JSON.decode(c.response.responseText);Ext.Msg.show({title:"Error",msg:d.msg, \
buttons:Ext.Msg.OK,icon:Ext.MessageBox.ERROR,fn:function(){Ext.getCmp("login-form-vcsP \
asswd").focus()}})}}})}}}},{scope:this,text:"Reset",handler:function(){Ext.getCmp("log \
in-form-vcsLogin").enable();Ext.getCmp("login-form-vcsPasswd").enable();Ext.getCmp("login-form-vcsPasswd").setValue("");Ext.getCmp("login-form-auth").setText('<img \
src="themes/img/auth_php.png" style="vertical-align: middle" /> \
<b>Php.net</b>',false);this.authService="VCS";this.authServiceID="";if(loginApp){Ext.g \
etCmp("login-form-vcsLogin").setValue(loginApp);Ext.getCmp("login-btn").setText("Login \
");Ext.getCmp("login-form-email").setValue(Ext.util.Cookies.get("email"))}else{Ext.get \
Cmp("login-form-vcsLogin").setValue("anonymous");Ext.getCmp("login-btn").setText("Anonymous \
\ No newline at end of file
diff --git a/js/login.js b/js/login.js
index 48318ec..7035fad 100755
--- a/js/login.js
+++ b/js/login.js
@@ -277,7 +277,7 @@ var PhDOE_loginPage = function()
                         }, {
                             fieldLabel      : 'Login',
                             name            : 'vcsLogin',
-                            value           : ( Ext.util.Cookies.get("loginApp") ) ? \
Ext.util.Cookies.get("loginApp") : 'anonymous', +                            value    \
: ( loginApp ) ? loginApp : 'anonymous',  id              : 'login-form-vcsLogin',
                             enableKeyEvents : true,
                             listeners       : {
@@ -419,7 +419,7 @@ var PhDOE_loginPage = function()
                             }
                         }
                     }, '->', {
-                        text      :  ( Ext.util.Cookies.get("loginApp") && \
Ext.util.Cookies.get("loginApp") != 'anonymous' ) ? 'Login' : 'Anonymous login', +    \
text      :  ( loginApp && loginApp != 'anonymous' ) ? 'Login' : 'Anonymous login',  \
id        : 'login-btn',  disabled  : false,
                         listeners : {
@@ -480,8 +480,8 @@ var PhDOE_loginPage = function()
                             this.authService = 'VCS';
                             this.authServiceID = '';
                             
-                            if( Ext.util.Cookies.get("loginApp") ) {
-                                \
Ext.getCmp('login-form-vcsLogin').setValue(Ext.util.Cookies.get("loginApp")); +       \
if( loginApp ) { +                                \
Ext.getCmp('login-form-vcsLogin').setValue(loginApp);  \
                Ext.getCmp('login-btn').setText('Login');
                                 \
Ext.getCmp('login-form-email').setValue(Ext.util.Cookies.get("email"));



-- 
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic