summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/PM/UI/Web/Components/RulerComponent.js
Side-by-side diff
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web/Components/RulerComponent.js') (more/less context) (show whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Components/RulerComponent.js15
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/RulerComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/RulerComponent.js
index ab8a38c..69c1ede 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/RulerComponent.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/RulerComponent.js
@@ -1,120 +1,117 @@
/*
Copyright 2008-2011 Clipperz Srl
-This file is part of Clipperz's Javascript Crypto Library.
-Javascript Crypto Library provides web developers with an extensive
-and efficient set of cryptographic functions. The library aims to
-obtain maximum execution speed while preserving modularity and
-reusability.
+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
+refer to http://www.clipperz.com.
-* Javascript Crypto Library is free software: you can redistribute
+* 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.
-* Javascript Crypto Library is distributed in the hope that it will
+* 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 Javascript Crypto Library. If not, see
+ License along with Clipperz Community Edition. If not, see
<http://www.gnu.org/licenses/>.
*/
Clipperz.Base.module('Clipperz.PM.UI.Web.Components');
Clipperz.PM.UI.Web.Components.RulerComponent = function(args) {
args = args || {};
Clipperz.PM.UI.Web.Components.RulerComponent.superclass.constructor.apply(this, arguments);
this._translationContext = args.translationContext || Clipperz.Base.exception.raise('MandatoryParameter');
// this._steps = args.steps || Clipperz.Base.exception.raise('MandatoryParameter');
this._steps = args.steps;
this._currentStep = -1;
return this;
}
//=============================================================================
Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.RulerComponent, Clipperz.PM.UI.Common.Components.BaseComponent, {
//-------------------------------------------------------------------------
'toString': function () {
return "Clipperz.PM.UI.Web.Components.RulerComponent component";
},
//-------------------------------------------------------------------------
'resetStatus': function (args) {
args = args || {};
if (this.currentStep() != 0) {
var shouldAnimateTransition;
shouldAnimateTransition = args.animateTransition || false;
if (shouldAnimateTransition) {
this.moveToFirstStep(MochiKit.Base.method(this, 'cursorMoved'));
} else {
this._currentStep = 0;
this.cursorMoved();
}
}
},
//-------------------------------------------------------------------------
'translationContext': function () {
return this._translationContext;
},
'steps': function () {
return this._steps;
},
'setSteps': function (aValue) {
this._steps = aValue;
this.renderStepsComponents();
this.resetStatus();
},
'translatedStepDescription': function (aStep) {
return Clipperz.PM.Strings.getValue(this.translationContext() + '.' + aStep + '.' + 'name');
},
//-------------------------------------------------------------------------
'renderSelf': function(/*aContainer, aPosition*/) {
this.setElement(this.append(MochiKit.DOM.currentDocument().body, [
{tag:'div', id:this.getId('rulerWrapper'), cls:'rulerWrapper fixed', children:[
{tag:'div', cls:'ruler', children:[
{tag:'a', href:'#', id:this.getId('exit'), cls:'exit', html:'&nbsp;'},
{tag:'a', href:'#', id:this.getId('smallPreviousButton'), cls:'smallButton previous', html:'&nbsp;'},
{tag:'a', href:'#', id:this.getId('smallNextButton'), cls:'smallButton next', html:'&nbsp;'},
{tag:'div', cls:'marker', id:this.getId('marker'), children:[
{tag:'div', cls:'previous', id:this.getId('previousButton')},
{tag:'div', cls:'markerBody'},
{tag:'div', cls:'next', id:this.getId('nextButton')}
]},
{tag:'div', cls:'steps', id:this.getId('stepsFrame')},
// {tag:'div', cls:'steps' + ' ' + 'steps_' + this.steps().length, children:[
// {tag:'ul', id:this.getId('steps'), children:MochiKit.Base.map(MochiKit.Base.bind(function (aStep) { return {tag:'li', children:[{tag:'span', html:this.translatedStepDescription(aStep)}]}}, this), this.steps())}
// ]},
{tag:'div', cls:'dots', id:this.getId('dotsFrame')}
// {tag:'div', cls:'dots' + ' ' + 'steps_' + this.steps().length, children:[
// {tag:'ul', id:this.getId('dots'), children:MochiKit.Base.map(function (aStep) { return {tag:'li', children:[{tag:'span', html:'*'}]}}, this.steps())}
// ]}
]}
]}
]));
//console.log("ELEMENT", this.element());
MochiKit.Signal.connect(this.getElement('exit'), 'onclick', this, 'handleExit');