- md5
- fe302a6dee98060793ddfe8dd20870be
- sha1
- 5d1d9cd47136558dac4e35f3e33fec2e1a8b1bbe
- sha256
- 57ee66535c154b675853cede7386827da34c40e08488e2aceb1c194395b95dd7
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
/**
* @version $Id: modal.js 5263 2006-10-02 01:25:24Z webImagery $
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
/**
* JOpenID javascript behavior
*
* Used for switching between normal and openid login forms
*
* @author Johan Janssens <[email protected]>
* @package Joomla
* @since 1.5
* @version 1.0
*/
var JOpenID = new Class({
state : false,
link : null,
switcher : null,
initialize: function()
{
//Create dynamic elements
var switcher = new Element('a', { 'styles': {'cursor': 'pointer'},'id': 'openid-link'});
switcher.inject($('form-login'));
var link = new Element('a', { 'styles': {'text-align' : 'right', 'display' : 'block', 'font-size' : 'xx-small'}, 'href' : 'http://openid.net'});
link.setHTML('What is OpenId?');
//Initialise members
this.switcher = switcher;
this.link = link;
this.state = Cookie.get('login-openid');
this.lenght = $('form-login-password').getSize().size.y;
this.switch(this.state, 0);
this.switcher.addEvent('click', (function(event) {
this.state = this.state ^ 1;
this.switch(this.state, 300);
Cookie.set('login-openid', this.state);
}).bind(this));
},
switch : function(state, time)
{
var password = $('form-login-password');
var username = $('username');
if(state == 0)
{
username.removeClass('system-openid');
var text = 'Login with an OpenID';
//this.link.remove();
password.effect('height', {duration: time}).start(0, this.lenght);
}
else
{
username.addClass('system-openid');
var text = 'Go back to normal login';
//this.link.inject($('form-login-username'));
password.effect('height', {duration: time}).start(this.lenght, 0);
}
password.effect('opacity', {duration: time}).start(state,1-state);
this.switcher.setHTML(text);
}
});
document.openid = null
window.addEvent('domready', function(){
var openid = new JOpenID()
document.openid = openid
});
The same content is in 2 releases, Joomla 1.5.0 to 1.5.1. See them all, or every version of this file.