Updated /gamma web css
This commit is contained in:
parent
928f3f3ed3
commit
25029b9437
File diff suppressed because it is too large
Load Diff
@ -1,28 +1,3 @@
|
||||
<!--
|
||||
|
||||
Copyright 2008-2011 Clipperz Srl
|
||||
|
||||
This file is part of Clipperz Community Edition.
|
||||
Clipperz Community Edition is an online password manager.
|
||||
For further information about its features and functionalities please
|
||||
refer to http://www.clipperz.com.
|
||||
|
||||
* Clipperz Community Edition is free software: you can redistribute
|
||||
it and/or modify it under the terms of the GNU Affero General Public
|
||||
License as published by the Free Software Foundation, either version
|
||||
3 of the License, or (at your option) any later version.
|
||||
|
||||
* Clipperz Community Edition is distributed in the hope that it will
|
||||
be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Affero General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
License along with Clipperz Community Edition. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
-->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>clipperz</title>
|
||||
|
@ -142,7 +142,7 @@ Clipperz.PM.Proxy.prototype = MochiKit.Base.update(null, {
|
||||
'processMessage': function (aFunctionName, someParameters, aRequestType) {
|
||||
var deferredResult;
|
||||
|
||||
deferredResult = new Clipperz.Async.Deferred("Proxy.processMessage", {trace:true});
|
||||
deferredResult = new Clipperz.Async.Deferred("Proxy.processMessage", {trace:false});
|
||||
deferredResult.addMethod(this, 'payToll', aRequestType);
|
||||
deferredResult.addMethod(this, 'sendMessage', aFunctionName);
|
||||
deferredResult.addMethod(this, 'setTollCallback');
|
||||
|
@ -102,8 +102,8 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.Tooltip, Clipperz.PM.UI.Co
|
||||
{tag:'div', id:this.getId('body'), cls:'tooltip_body', children:[
|
||||
{tag:'div', cls:'tooltip_text', children:[
|
||||
{tag:'span', html:this.text()}
|
||||
]},
|
||||
{tag:'div', id:this.getId('footer'), cls:'tooltip_footer'}
|
||||
]}//,
|
||||
// {tag:'div', id:this.getId('footer'), cls:'tooltip_footer'}
|
||||
]},
|
||||
{tag:'div', id:this.getId('arrow'), cls:'tooltip_arrow'}
|
||||
]});
|
||||
@ -146,45 +146,46 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.Tooltip, Clipperz.PM.UI.Co
|
||||
switch (this.position()) {
|
||||
case 'ABOVE':
|
||||
//console.log("ABOVE");
|
||||
MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:36, h:13}, 'px');
|
||||
// MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:36, h:13}, 'px');
|
||||
bodyPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - this.boxDimensions().w/2);
|
||||
bodyPosition.y = elementSizeAndPosition.position.y - this.boxDimensions().h - 13;
|
||||
|
||||
arrowPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - 36/2);
|
||||
arrowPosition.y = elementSizeAndPosition.position.y - 13;
|
||||
// arrowPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - 36/2);
|
||||
// arrowPosition.y = elementSizeAndPosition.position.y - 13;
|
||||
break;
|
||||
case 'BELOW':
|
||||
//console.log("BELOW");
|
||||
MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:36, h:13}, 'px');
|
||||
// MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:36, h:13}, 'px');
|
||||
bodyPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - this.boxDimensions().w/2);
|
||||
bodyPosition.y = elementSizeAndPosition.position.y + elementSizeAndPosition.dimensions.h + 13;
|
||||
|
||||
arrowPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - 36/2);
|
||||
arrowPosition.y = elementSizeAndPosition.position.y + elementSizeAndPosition.dimensions.h;
|
||||
// arrowPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - 36/2);
|
||||
// arrowPosition.y = elementSizeAndPosition.position.y + elementSizeAndPosition.dimensions.h;
|
||||
break;
|
||||
case 'LEFT':
|
||||
//console.log("LEFT");
|
||||
MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:13, h:36}, 'px');
|
||||
// MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:13, h:36}, 'px');
|
||||
bodyPosition.x = elementSizeAndPosition.position.x - this.boxDimensions().w - 13;
|
||||
bodyPosition.y = elementSizeAndPosition.position.y + (elementSizeAndPosition.dimensions.h/2 - this.boxDimensions().h/2);
|
||||
|
||||
arrowPosition.x = elementSizeAndPosition.position.x -13;
|
||||
arrowPosition.y = elementSizeAndPosition.position.y + (elementSizeAndPosition.dimensions.h/2 - 36/2);
|
||||
// arrowPosition.x = elementSizeAndPosition.position.x -13;
|
||||
// arrowPosition.y = elementSizeAndPosition.position.y + (elementSizeAndPosition.dimensions.h/2 - 36/2);
|
||||
break;
|
||||
case 'RIGHT':
|
||||
//console.log("RIGHT");
|
||||
MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:13, h:36}, 'px');
|
||||
// MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:13, h:36}, 'px');
|
||||
bodyPosition.x = elementSizeAndPosition.position.x + elementSizeAndPosition.dimensions.w + 13;
|
||||
bodyPosition.y = elementSizeAndPosition.position.y + (elementSizeAndPosition.dimensions.h/2 - this.boxDimensions().h/2);
|
||||
|
||||
arrowPosition.x = elementSizeAndPosition.position.x + elementSizeAndPosition.dimensions.w;
|
||||
arrowPosition.y = elementSizeAndPosition.position.y + (elementSizeAndPosition.dimensions.h/2 - 36/2);
|
||||
// arrowPosition.x = elementSizeAndPosition.position.x + elementSizeAndPosition.dimensions.w;
|
||||
// arrowPosition.y = elementSizeAndPosition.position.y + (elementSizeAndPosition.dimensions.h/2 - 36/2);
|
||||
break;
|
||||
}
|
||||
//console.log("X: " + bodyPosition.x + ", Y: " + bodyPosition.y);
|
||||
|
||||
MochiKit.Style.setElementPosition(this.getId('body'), bodyPosition);
|
||||
MochiKit.Style.setElementPosition(this.getId('arrow'), arrowPosition);
|
||||
MochiKit.Style.setElementPosition(this.getId('tooltip'), bodyPosition);
|
||||
// MochiKit.Style.setElementPosition(this.getId('body'), bodyPosition);
|
||||
// MochiKit.Style.setElementPosition(this.getId('arrow'), arrowPosition);
|
||||
MochiKit.Visual.appear(this.displayElement(), {duration:0.4});
|
||||
}
|
||||
},
|
||||
|
@ -65,24 +65,9 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginForm, Clipperz.PM.UI.Com
|
||||
// {tag:'form', cls:'loginForm', autocomplete:this.autocomplete(), children:[
|
||||
{tag:'form', id:this.getId('form'), cls:'loginForm', children:[
|
||||
{tag:'label', html:'username', 'for':this.getId('usernameField')},
|
||||
{tag:'input', id:this.getId('usernameField'), type:'text', cls:'username'/*, value:'joe'*/},
|
||||
{tag:'ul', id:this.getId('passwordOptions'), children:[
|
||||
{tag:'li', id:this.getId('passphraseOption'), children:[
|
||||
{tag:'label', html:'passphrase / OTP', 'for':this.getId('passphraseField')},
|
||||
{tag:'input', id:this.getId('passphraseField'), type:'password', cls:'password'/*, value:'clipperz'*/}
|
||||
]} // ,
|
||||
/*
|
||||
{tag:'li', id:this.getId('otpOption'), children:[
|
||||
{tag:'label', html:'one-time password', 'for':this.getId('otpField_1')},
|
||||
{tag:'input', id:this.getId('otpField_1'), type:'text', cls:'otp', value:'abcd-efgh'},
|
||||
{tag:'input', id:this.getId('otpField_2'), type:'text', cls:'otp', value:'abcd-efgh'},
|
||||
{tag:'input', id:this.getId('otpField_3'), type:'text', cls:'otp', value:'abcd-efgh'},
|
||||
{tag:'input', id:this.getId('otpField_4'), type:'text', cls:'otp', value:'abcd-efgh'}
|
||||
]}
|
||||
*/
|
||||
]},
|
||||
// {tag:'input', id:this.getId('otpCheckbox'), type:'checkbox', cls:'checkbox'},
|
||||
// {tag:'label', html:'use a one-time passphrase', 'for':this.getId('otpCheckbox'), cls:'checkbox'},
|
||||
{tag:'input', id:this.getId('usernameField'), type:'text', cls:'username'},
|
||||
{tag:'label', html:'passphrase / OTP', 'for':this.getId('passphraseField')},
|
||||
{tag:'input', id:this.getId('passphraseField'), type:'password', cls:'password'},
|
||||
|
||||
{tag:'div', cls:'translations', children:[
|
||||
{tag:'h4', html:'choose your language'},
|
||||
@ -161,29 +146,22 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginForm, Clipperz.PM.UI.Com
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
'loginEventHandler': function(anEvent) {
|
||||
var username;
|
||||
var passphrase;
|
||||
// var shouldUseOTP;
|
||||
// var otp;
|
||||
// var username;
|
||||
// var passphrase;
|
||||
var signalArguments;
|
||||
|
||||
anEvent.preventDefault();
|
||||
|
||||
username = this.getElement('usernameField').value;
|
||||
passphrase = this.getElement('passphraseField').value;
|
||||
// otp = this.getElement('otpField_1').value +
|
||||
// this.getElement('otpField_2').value +
|
||||
// this.getElement('otpField_3').value +
|
||||
// this.getElement('otpField_4').value;
|
||||
// shouldUseOTP = this.getElement('otpCheckbox').checked;
|
||||
// username = this.getElement('usernameField').value;
|
||||
// passphrase = this.getElement('passphraseField').value;
|
||||
|
||||
signalArguments = {username:username};
|
||||
// signalArguments = {username:username};
|
||||
// signalArguments.passphrase = passphrase;
|
||||
|
||||
// if (shouldUseOTP) {
|
||||
// signalArguments.otp = otp;
|
||||
// } else {
|
||||
signalArguments.passphrase = passphrase;
|
||||
// }
|
||||
signalArguments = {
|
||||
'username': this.getElement('usernameField').value,
|
||||
'passphrase': this.getElement('passphraseField').value
|
||||
};
|
||||
|
||||
MochiKit.Signal.signal(this, 'doLogin', signalArguments);
|
||||
},
|
||||
|
@ -81,13 +81,11 @@ MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.LoginController.prototype, {
|
||||
'doLogin': function(aLoginForm, anEvent) {
|
||||
var deferredResult;
|
||||
var parameters;
|
||||
// var shouldUseOTP;
|
||||
var loginProgress;
|
||||
var user;
|
||||
var getPassphraseDelegate;
|
||||
|
||||
parameters = anEvent;
|
||||
// shouldUseOTP = (typeof(parameters.passphrase) == 'undefined');
|
||||
|
||||
getPassphraseDelegate = MochiKit.Base.partial(MochiKit.Async.succeed, parameters.passphrase);
|
||||
user = new Clipperz.PM.DataModel.User({'username':parameters.username, 'getPassphraseFunction':MochiKit.Base.method(Clipperz.PM.RunTime.mainController, 'getPassphrase')});
|
||||
@ -99,11 +97,7 @@ MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.LoginController.prototype, {
|
||||
deferredResult.addMethod(Clipperz.PM.RunTime.mainController, 'setPassphraseDelegate', getPassphraseDelegate);
|
||||
deferredResult.addMethod(loginProgress, 'deferredShowModal', {deferredObject:deferredResult, openFromElement:aLoginForm.submitButtonElement()});
|
||||
deferredResult.addMethod(Clipperz.Crypto.PRNG.defaultRandomGenerator(), 'deferredEntropyCollection');
|
||||
// if (shouldUseOTP == false) {
|
||||
deferredResult.addMethod(user, 'login');
|
||||
// } else {
|
||||
// deferredResult.addMethod(user, 'loginUsingOTP', parameters.username, parameters.otp);
|
||||
// }
|
||||
deferredResult.addMethod(user, 'login');
|
||||
deferredResult.addCallback(function(aLoginProgress, res) {
|
||||
aLoginProgress.disableCancel();
|
||||
return res;
|
||||
|
Loading…
Reference in New Issue
Block a user