- md5
- 6743b68935eb9a76fb86419dc960a399
- sha1
- 49415f9d3439cd1f2da97927a8cb41dfa5b159f0
- sha256
- f8d16d3f45062aaaf44a21f5a11257e1f9a727688592bcc62932a07881f84d66
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
/**
* @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(JLanguage.WHAT_IS_OPENID);
//Initialise members
this.switcher = switcher;
this.link = link;
this.state = Cookie.get('login-openid');
this.length = $('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 = $('modlgn_username');
if(state == 0)
{
username.removeClass('system-openid');
var text = JLanguage.LOGIN_WITH_OPENID;
password.effect('height', {duration: time}).start(0, this.length);
}
else
{
username.addClass('system-openid');
var text = JLanguage.NORMAL_LOGIN;
password.effect('height', {duration: time}).start(this.length, 0);
}
password.effect('opacity', {duration: time}).start(state,1-state);
this.switcher.setHTML(text);
}
});
var JOpenID_com = new Class({
state : false,
link : null,
switcher : null,
initialize: function()
{
//Create dynamic elements
var switcher = new Element('a', { 'styles': {'cursor': 'pointer'},'id': 'com-openid-link'});
switcher.inject($('com-form-login'));
var link = new Element('a', { 'styles': {'text-align' : 'right', 'display' : 'block', 'font-size' : 'xx-small'}, 'href' : 'http://openid.net'});
link.setHTML(JLanguage.WHAT_IS_OPENID);
//Initialise members
this.switcher = switcher;
this.link = link;
this.state = Cookie.get('login-openid');
this.length = $('com-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 = $('com-form-login-password');
var username = $('username');
if(state == 0)
{
username.removeClass('system-openid');
var text = JLanguage.LOGIN_WITH_OPENID;
password.effect('height', {duration: time}).start(0, this.length);
}
else
{
username.addClass('system-openid');
var text = JLanguage.NORMAL_LOGIN;
password.effect('height', {duration: time}).start(this.length, 0);
}
password.effect('opacity', {duration: time}).start(state,1-state);
this.switcher.setHTML(text);
}
});
document.openid = null
document.com_openid = null
window.addEvent('domready', function(){
if (modlogin == 1) {
var openid = new JOpenID()
document.openid = openid
}
if (comlogin == 1) {
var com_openid = new JOpenID_com()
document.com_openid = openid
}
});
The same content is in 2 releases, Joomla 1.5.2 to 1.5.3. See them all, or every version of this file.