summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers
Side-by-side diff
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web/Controllers') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardsController.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginsController.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/FilterController.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/GridController.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/LoginController.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/MainController.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/NewUserWizardController.js15
10 files changed, 60 insertions, 90 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js
index 05563bf..9a0e744 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.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.Controllers');
Clipperz.PM.UI.Web.Controllers.AppController = function(args) {
this._user = null;
this._tabSlotNames = {
//tabName: slotName
'cards': 'cardGrid',
// 'directLogins': 'directLoginGrid',
'account': 'accountPanel',
'data': 'dataPanel',
'tools': 'toolsPanel'
};
//controllers
this._cardsController = null;
// this._directLoginsController = null;
this._filterController = null; // new Clipperz.PM.UI.Web.Controllers.FilterController();
//components
this._appPage = null;
this._userInfoBox = null;
this._tabSidePanel = null;
// MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'editCard', this, 'handleEditCard');
// MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'deleteCard', this, 'handleDeleteCard');
MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'userDataSuccessfullySaved', this, 'userDataSuccessfullySavedHandler');
return this;
}
MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.AppController.prototype, {
'toString': function() {
return "Clipperz.PM.UI.Web.Controllers.AppController";
},
//-----------------------------------------------------------------------------
'setUser': function(anUser) {
this._user = anUser;
},
'user': function() {
return this._user;
},
//-----------------------------------------------------------------------------
/*
'tabSlotNames': function() {
return this._tabSlotNames;
},
*/
'slotNameForTab': function(aTabName) {
return this._tabSlotNames[aTabName];
},
'hideAllAppPageTabSlots': function() {
var aTabName;
for (aTabName in this._tabSlotNames) {
this.appPage().hideSlot(this.slotNameForTab(aTabName));
}
},
//-----------------------------------------------------------------------------
'appPage': function() {
if (this._appPage == null) {
this._appPage = new Clipperz.PM.UI.Web.Components.AppPage();
}
return this._appPage;
},
//-----------------------------------------------------------------------------
'tabSidePanel': function() {
if (this._tabSidePanel == null) {
this._tabSidePanel = new Clipperz.PM.UI.Web.Components.TabSidePanel();
}
return this._tabSidePanel;
},
//-----------------------------------------------------------------------------
'userInfoBox': function() {
if (this._userInfoBox == null) {
this._userInfoBox = new Clipperz.PM.UI.Web.Components.UserInfoBox();
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js
index 2340aeb..effde31 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.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.Controllers');
Clipperz.PM.UI.Web.Controllers.CardDialogController = function(args) {
args = args || {};
Clipperz.PM.UI.Web.Controllers.CardDialogController.superclass.constructor.call(this, args);
this._record = args.record || Clipperz.Base.exception.raise('MandatoryParameter');
this._delegate = args.delegate || Clipperz.Base.exception.raise('MandatoryParameter');
this._referenceElement = null;
this._cardDialogComponent = null;
this._fieldsReferences = {};
this._directLoginReferences = {};
this._directLoginWizardController = null;
this._directLoginEditingComponent = null;
this._isDirectLoginEditingComponentVisible = false;
return this;
};
Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.CardDialogController, Object, {
'toString': function() {
return "Clipperz.PM.UI.Web.Controllers.CardDialogController";
},
//-------------------------------------------------------------------------
'record': function () {
return this._record;
},
'delegate': function () {
return this._delegate;
},
//-------------------------------------------------------------------------
'fieldsReferences': function () {
return this._fieldsReferences;
},
'directLoginReferences': function () {
return this._directLoginReferences;
},
//-------------------------------------------------------------------------
'referenceElement': function () {
return this._referenceElement;
},
'setReferenceElement': function (anElement) {
this._referenceElement = anElement;
},
//-------------------------------------------------------------------------
'cardDialogComponent': function () {
if (this._cardDialogComponent == null) {
this._cardDialogComponent = new Clipperz.PM.UI.Web.Components.CardDialogComponent();
MochiKit.Signal.connect(this._cardDialogComponent, 'cancel', this, 'handleCancel');
MochiKit.Signal.connect(this._cardDialogComponent, 'save', this, 'handleSave');
MochiKit.Signal.connect(this._cardDialogComponent, 'addField', this, 'handleAddField');
MochiKit.Signal.connect(this._cardDialogComponent, 'changedValue', this, 'handleChangedValue');
MochiKit.Signal.connect(this._cardDialogComponent, 'addDirectLogin',this, 'handleAddDirectLogin');
MochiKit.Signal.connect(this._cardDialogComponent, 'keyPressed', this, 'handleCardDialogComponentKeyPressed');
}
return this._cardDialogComponent;
},
//=========================================================================
'directLoginWizardController': function () {
if (this._directLoginWizardController == null) {
this._directLoginWizardController = new Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController({
'cardLabel': this.cardDialogComponent().title(),
'directLoginEditingComponent': this.directLoginEditingComponent()
})
MochiKit.Signal.connect(this._directLoginWizardController, 'exit', this, 'handleHideDirectLoginEditingComponent');
MochiKit.Signal.connect(this._directLoginWizardController, 'done', this, 'handleCompleteDirectLoginEditingComponent');
}
return this._directLoginWizardController;
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardsController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardsController.js
index b1a34b2..f58f0b8 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardsController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardsController.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.Controllers');
Clipperz.PM.UI.Web.Controllers.CardsController = function() {
Clipperz.PM.UI.Web.Controllers.CardsController.superclass.constructor.apply(this, arguments);
MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'cardDialogComponentClosed', this, 'handleHideCard');
return this;
}
Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.CardsController, Clipperz.PM.UI.Web.Controllers.GridController, {
'toString': function() {
return "Clipperz.PM.UI.Web.Controllers.CardsController";
},
'createGrid': function () {
var grid;
grid = new Clipperz.PM.UI.Web.Components.GridComponent({columnsManagers: [
new Clipperz.PM.UI.Web.Components.FaviconColumnManager({
'name': 'Cards.favicon',
'selector': MochiKit.Base.methodcaller('favicon'),
'cssClass': 'favicon'
}),
new Clipperz.PM.UI.Web.Components.LinkColumnManager({
'name': 'Cards.title',
'selector': MochiKit.Base.methodcaller('label'),
'label': 'title',
'cssClass': 'title',
'comparator': Clipperz.Base.caseInsensitiveCompare,
'sortable': true,
'sorted': 'ASCENDING',
// 'actionMethod': function(anObject, anEvent) { MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'editCard', {objectData:anObject, element:anEvent.src()})}
'actionMethod': MochiKit.Base.method(this, 'handleShowCard')
}),
new Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager({
'name': 'Cards.directLogins',
'selector': MochiKit.Base.methodcaller('directLoginReferences'),
'label': 'direct logins',
'cssClass': 'directLogin'
}),
new Clipperz.PM.UI.Web.Components.DateColumnManager({
'name': 'Cards.latestUpdate',
'selector': MochiKit.Base.methodcaller('updateDate'),
'label': 'latest update',
'cssClass': 'latestUpdate',
'format': 'd-m-Y',
'comparator': MochiKit.Base.compare,
'sortable': true,
'sorted': 'UNSORTED'
}),
new Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager({
'name': 'Cards.delete',
'selector': MochiKit.Base.noop,
'cssClass': 'delete',
// 'actionMethod': function(anObject, anEvent) { MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'deleteCard', {objectData:anObject, element:anEvent.src()})}
'actionMethod': MochiKit.Base.method(this, 'handleDeleteCard')
})
]});
grid.setComponentForSlotNamed(new Clipperz.PM.UI.Web.Components.BookmarkletComponent(), 'headerSlot');
return grid;
},
//-----------------------------------------------------------------------------
'getRows': function () {
//TODO relying on user() in GridController, bad code smell :|
return this.user().getRecords();
},
//=============================================================================
'displayEmptyContent': function () {
var emptyGridComponent;
emptyGridComponent = new Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent();
return Clipperz.Async.callbacks("CardsController.displayEmptyContent", [
MochiKit.Base.method(this.grid(), 'setNoRowsGridComponent', emptyGridComponent),
MochiKit.Base.bind(Clipperz.PM.UI.Web.Controllers.CardsController.superclass.displayEmptyContent, this)
], {trace:false});
},
'displaySelectedRows': function (aFilter) {
this.columnManagerWithName('Cards.directLogins').hideDirectLoginListPopup();
return Clipperz.PM.UI.Web.Controllers.CardsController.superclass.displaySelectedRows.apply(this, arguments);
},
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js
index 38fdc08..c025a51 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.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.Controllers');
Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController = function(args) {
this._directLoginEditingComponent = args.directLoginEditingComponent || Clipperz.Base.exception.raise('MandatoryParameter');
this._cardLabel = args.cardLabel || Clipperz.Base.exception.raise('MandatoryParameter');
MochiKit.Signal.connect(this._directLoginEditingComponent, 'changedValue', this, 'handleChangedValue');
MochiKit.Signal.connect(this._directLoginEditingComponent, 'moveForward', this, 'handleMoveForward');
MochiKit.Signal.connect(this._directLoginEditingComponent, 'keyPressed', this, 'handleDirectLoginEditingComponentKeyPressed');
this._directLogin = null;
this._directLoginHasJustBeenAdded = false;
this._rulerComponent = null;
this._steps = null;
this._currentStepIndex = 0;
this._isNextEnabled = false;
this._recordFields = null;
this._originalBindings = null;
this._bindingComponents = [];
this._formValueComponents = [];
return this;
}
MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController.prototype, {
'toString': function() {
return "Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController";
},
//-------------------------------------------------------------------------
'directLogin': function () {
return this._directLogin;
},
//-------------------------------------------------------------------------
'directLoginHasJustBeenAdded': function () {
return this._directLoginHasJustBeenAdded;
},
'setDirectLoginHasJustBeenAdded': function (aValue) {
this._directLoginHasJustBeenAdded = aValue;
},
//-------------------------------------------------------------------------
'directLoginEditingComponent': function () {
return this._directLoginEditingComponent;
},
//=============================================================================
'cardLabel': function () {
return this._cardLabel;
},
//=============================================================================
'resetCurrentStepIndex': function () {
this._currentStepIndex = 0;
this.rulerComponent().resetStatus();
},
//-----------------------------------------------------------------------------
'enableNext': function (aValue) {
this.rulerComponent().enableNext(aValue);
this._isNextEnabled = aValue;
},
'isNextEnabled': function () {
return this._isNextEnabled;
},
//-----------------------------------------------------------------------------
'enablePrevious': function (aValue) {
this.rulerComponent().enablePrevious(aValue);
},
//=============================================================================
'bindingComponents': function () {
return this._bindingComponents;
},
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginsController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginsController.js
index 28401a2..6ca3be4 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginsController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginsController.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.Controllers');
Clipperz.PM.UI.Web.Controllers.DirectLoginsController = function() {
Clipperz.PM.UI.Web.Controllers.DirectLoginsController.superclass.constructor.apply(this, arguments);
return this;
};
Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.DirectLoginsController, Clipperz.PM.UI.Web.Controllers.GridController, {
'createGrid': function () {
return new Clipperz.PM.UI.Web.Components.GridComponent({columnsManagers: [
new Clipperz.PM.UI.Web.Components.FaviconColumnManager({
'name': 'DirectLogins.favicon',
'selector': MochiKit.Base.methodcaller('favicon'),
'cssClass': 'favicon'
}),
// new Clipperz.PM.UI.Web.Components.LinkColumnManager({
new Clipperz.PM.UI.Web.Components.DirectLoginColumnManager({
'name': 'DirectLogins.title',
'selector': MochiKit.Base.methodcaller('label'),
'label': 'title',
'cssClass': 'title',
'comparator': Clipperz.Base.caseInsensitiveCompare,
'sortable': true,
'sorted': 'ASCENDING',
'actionMethod': MochiKit.Base.methodcaller('runDirectLogin')
}),
// new Clipperz.PM.UI.Web.Components.TextColumnManager({ //should be StrengthColumnManager
// 'label': 'strength',
// 'cssClass': 'title',
// 'selector': MochiKit.Base.methodcaller('label') //should be 'strength' or a strenght evaluation function
// }),
new Clipperz.PM.UI.Web.Components.LinkColumnManager({
'name': 'DirectLogins.cardTitle',
'selector': MochiKit.Base.compose(MochiKit.Base.methodcaller('label'), MochiKit.Base.methodcaller('record')),
'label': 'card',
'cssClass': 'cardTitle',
'comparator': Clipperz.Base.caseInsensitiveCompare,
'sortable': true,
'sorted': 'UNSORTED',
'actionMethod': MochiKit.Base.method(this, 'handleShowCard')
}),
// new Clipperz.PM.UI.Web.Components.TextColumnManager({ //should be StrengthColumnManager
// 'label': 'last access',
// 'cssClass': 'title',
// 'selector': MochiKit.Base.methodcaller('label')
// // 'sortable': true,
// // 'sorted': 'UNSORTED'
// }),
// new Clipperz.PM.UI.Web.Components.TextColumnManager({
// 'label': 'commands',
// 'cssClass': 'title',
// 'selector': MochiKit.Base.methodcaller('label'), //should be a function for commands display
// }),
new Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager({
'name': 'DirectLogins.delete',
'selector': MochiKit.Base.noop,
'cssClass': 'delete',
// 'actionMethod': function(anObject, anEvent) { MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'deleteDirectLogin', {objectData:anObject, element:anEvent.src()})}
'actionMethod': MochiKit.Base.method(this, 'handleDeleteDirectLogin')
})
]});
},
//-----------------------------------------------------------------------------
'getRows': function () {
// TODO: relying on user() in GridController, bad code smell :|
return this.user().getDirectLogins();
},
//-----------------------------------------------------------------------------
'handleShowCard': function (anObject, anEvent) {
var cardDialogController;
cardDialogController = new Clipperz.PM.UI.Web.Controllers.CardDialogController({record:anObject.record()})
cardDialogController.run(anEvent.src());
},
//-----------------------------------------------------------------------------
'handleDeleteDirectLogin': function (anObject, anEvent) {
var deferredResult;
var confirmationDialog;
confirmationDialog = new Clipperz.PM.UI.Common.Components.SimpleMessagePanel({
title: "Delete DirectLogin",
text: "Do you want to delete …",
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/FilterController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/FilterController.js
index 13e02bc..bfc093a 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/FilterController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/FilterController.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.Controllers');
Clipperz.PM.UI.Web.Controllers.FilterController = function(args) {
args = args || {};
Clipperz.PM.UI.Web.Controllers.FilterController.superclass.constructor.call(this, args);
this._filterElements = [];
this._filter = "";
this._pendingSearchClicks = 0;
return this;
};
Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.FilterController, Object, {
//-----------------------------------------------------------------------------
'getFilter': function () {
return this._filter;
},
'_setFilter': function (aFilterElement, aFilter) {
if (aFilter != this._filter) {
this._filter = aFilter;
MochiKit.Signal.signal(this, 'filterUpdated', aFilter);
this.updateFilterElements(aFilterElement, aFilter);
}
},
'setFilter': function (aFilter) {
this._setFilter(null, aFilter);
},
//-----------------------------------------------------------------------------
'filterElements': function () {
return this._filterElements;
},
'registerFilterElement': function (aFilterElement) {
//Clipperz.log("=== FilterController.registerFilterElement", aFilterElement);
this._filterElements.push(aFilterElement);
MochiKit.Signal.connect(aFilterElement, 'onkeydown', this, 'searchClickHandler');
MochiKit.Signal.connect(aFilterElement, 'onfocus', this, 'searchClickHandler');
},
'removeFilterElement': function (aFilterElement) {
var i;
var filterElements;
for (i=0; i < filterElements; i++) {
if (filterElements[i] == aFilterElement);
filterElements.splice(i, 1);
// TODO unregister/disconnect filterElement ?? MochiKit.Signal.disconnect(this.grid().filterElement(), 'updateFilter', this.filterController(), 'handleUpdateFilter');
}
},
'updateFilterElements': function (aSourceElement, aFilterString) {
MochiKit.Iter.forEach(this.filterElements(),
function (aFilterElement) {
if (aFilterElement != aSourceElement) {
aFilterElement.value = aFilterString;
}
}
);
if (aSourceElement != null) {
aSourceElement.focus();
}
},
//-----------------------------------------------------------------------------
'run': function () {
//Clipperz.log("=== FilterController.run");
},
//-----------------------------------------------------------------------------
'pendingSearchClicks': function () {
return this._pendingSearchClicks;
},
'incrementPendingSearchClicks': function () {
this._pendingSearchClicks++;
},
'decrementPendingSearchClicks': function () {
this._pendingSearchClicks--;
},
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/GridController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/GridController.js
index 740a091..8bb3016 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/GridController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/GridController.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.Controllers');
Clipperz.PM.UI.Web.Controllers.GridController = function(args) {
args = args || {};
Clipperz.PM.UI.Web.Controllers.GridController.superclass.constructor.call(this, args);
this._grid = null;
this._user = null;
this._sortedColumnManager = null;
this._cachedObjects = null;
this._filterController = args.filterController || null;
this._deferredDisplaySelectedRowsInvocation = null;
return this;
};
Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.GridController, Object, {
'toString': function() {
return "Clipperz.PM.UI.Web.Controllers.GridController";
},
//-----------------------------------------------------------------------------
'createGrid': function () {
throw Clipperz.Base.exception.AbstractMethod;
},
'setupWithGrid': function (aGrid) {
this._grid = aGrid;
if (this._grid != null) {
MochiKit.Iter.forEach(this.columnsManagers(), function (aColumnManager) {
if (aColumnManager.isSortable()) {
if (aColumnManager.isSorted()) {
this.setSortedColumnManager(aColumnManager);
}
MochiKit.Signal.connect(aColumnManager, 'sort', this, 'handleColumnManagerSort');
}
MochiKit.Signal.connect(aColumnManager, 'selectRow', this, 'handleColumnManagerSelectRow');
MochiKit.Signal.connect(aColumnManager, 'unselectRow', this, 'handleColumnManagerUnselectRow');
}, this);
}
},
'grid': function() {
if (this._grid == null) {
this.setupWithGrid(this.createGrid());
}
return this._grid;
},
'filterController': function () {
//Clipperz.log('GridController.filterController >>>', this._filterController);
if (this._filterController == null) {
this._filterController = new Clipperz.PM.UI.Web.Controllers.FilterController();
}
//Clipperz.log('GridController.filterController <<<', this._filterController);
return this._filterController;
},
//-----------------------------------------------------------------------------
'columnsManagers': function () {
return this.grid().columnsManagers();
},
'columnManagerWithName': function (aName) {
var managers;
var result;
managers = MochiKit.Base.filter(function (aManager) { return aManager.name() == aName; } , this.columnsManagers());
if (managers.length == 1) {
result = managers[0];
} else if (managers.length == 0) {
result = null;
} else {
throw "WTF!!!";
}
return result;
},
'sortedColumnManager': function () {
return this._sortedColumnManager;
},
'setSortedColumnManager': function(aValue) {
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/LoginController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/LoginController.js
index d88af41..d0b378c 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/LoginController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/LoginController.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.Controllers');
Clipperz.PM.UI.Web.Controllers.LoginController = function(args) {
this._args = args || {};
this._loginPage = null;
this._newUserWizardController = null;
this._newUserCreationComponent = null;
return this;
}
MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.LoginController.prototype, {
'toString': function() {
return "Clipperz.PM.UI.Web.Controllers.LoginController";
},
'args': function () {
return this._args;
},
//-----------------------------------------------------------------------------
'loginPage': function() {
if (this._loginPage == null) {
this._loginPage = new Clipperz.PM.UI.Web.Components.LoginPage();
MochiKit.Signal.connect(this._loginPage, 'createNewAccountClick', this, 'handleCreateNewAccountClick')
}
return this._loginPage;
},
//-----------------------------------------------------------------------------
'run': function(args) {
var slot;
var loginPage;
var loginForm;
slot = args.slot;
loginForm = new Clipperz.PM.UI.Web.Components.LoginForm({'autocomplete': this.args()['autocomplete']});
slot.setContent(this.loginPage());
this.loginPage().slotNamed('loginForm').setContent(loginForm);
MochiKit.Signal.connect(loginForm, 'doLogin', MochiKit.Base.method(this, 'doLogin', loginForm));
MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'doLogin', MochiKit.Base.method(this, 'doLogin', loginForm));
},
//-----------------------------------------------------------------------------
'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')});
loginProgress = new Clipperz.PM.UI.Web.Components.LoginProgress();
deferredResult = new Clipperz.Async.Deferred("LoginController.doLogin", {trace:false});
deferredResult.addCallbackPass(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'initProgress', {'steps':4});
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.addCallback(function(aLoginProgress, res) {
aLoginProgress.disableCancel();
return res;
}, loginProgress);
deferredResult.addCallback(function () {
MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'CARDS_CONTROLLER_DID_RUN', MochiKit.Base.method(loginProgress, 'deferredHideModalAndRemove', {closeToElement:MochiKit.DOM.currentDocument().body}));
})
deferredResult.addMethod(this, 'userLoggedIn', user, loginProgress, aLoginForm);
deferredResult.addErrback (MochiKit.Base.method(this, 'handleFailedLogin', loginProgress));
deferredResult.addErrback (MochiKit.Base.method(loginProgress, 'deferredHideModalAndRemove', {closeToElement:aLoginForm.submitButtonElement()}));
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/MainController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/MainController.js
index aa0d6ad..c83e3c0 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/MainController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/MainController.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.Controllers');
Clipperz.PM.UI.Web.Controllers.MainController = function(args) {
this._args = args;
// controllers
this._loginController = null;
this._appController = null;
// components
this._headerComponent = null;
this._pageComponent = null;
this._footerComponent = null;
this._passphraseDelegateLock = new MochiKit.Async.DeferredLock();
this._passphraseDelegateLock.acquire();
//Clipperz.log('MainController init _passphraseDelegateLock', this._passphraseDelegateLock);
this._passphraseDelegate = null;
MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'remoteRequestSent', this, 'handleRemoteRequestSent');
MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'remoteRequestReceived', this, 'handleRemoteRequestReceived');
return this;
}
MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.MainController.prototype, {
'toString': function() {
return "Clipperz.PM.UI.Web.Controllers.MainController";
},
'args': function () {
return this._args;
},
//-----------------------------------------------------------------------------
'headerComponent': function() {
if (this._headerComponent == null) {
this._headerComponent = new Clipperz.PM.UI.Web.Components.PageHeader();
}
return this._headerComponent;
},
'footerComponent': function() {
if (this._footerComponent == null) {
this._footerComponent = new Clipperz.PM.UI.Web.Components.PageFooter();
}
return this._footerComponent;
},
//-----------------------------------------------------------------------------
'pageComponent': function() {
if (this._pageComponent == null) {
this._pageComponent = new Clipperz.PM.UI.Web.Components.Page({element:MochiKit.DOM.getElement('mainDiv')});
}
return this._pageComponent;
},
//-----------------------------------------------------------------------------
'loginController': function() {
if (this._loginController == null) {
this._loginController = new Clipperz.PM.UI.Web.Controllers.LoginController(this.args());
MochiKit.Signal.connect(this._loginController, 'userLoggedIn', this, 'loginControllerUserLoggedInCallback');
}
return this._loginController;
},
'appController': function() {
if (this._appController == null) {
this._appController = new Clipperz.PM.UI.Web.Controllers.AppController();
MochiKit.Signal.connect(this._appController, 'logout', this, 'handleLogout');
}
return this._appController;
},
//-----------------------------------------------------------------------------
'run': function(shoudShowRegistrationForm) {
this.pageComponent().slotNamed('header').setContent(this.headerComponent());
this.pageComponent().slotNamed('footer').setContent(this.footerComponent());
this.pageComponent().render();
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/NewUserWizardController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/NewUserWizardController.js
index 28d9d20..7db6888 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/NewUserWizardController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/NewUserWizardController.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.Controllers');
Clipperz.PM.UI.Web.Controllers.NewUserWizardController = function(args) {
this._newUserCreationComponent = args.newUserCreationComponent || Clipperz.Base.exception.raise('MandatoryParameter');
MochiKit.Signal.connect(this._newUserCreationComponent, 'changedValue', this, 'handleChangedValue');
MochiKit.Signal.connect(this._newUserCreationComponent, 'moveForward', this, 'handleMoveForward');
MochiKit.Signal.connect(this._newUserCreationComponent, 'keyPressed', this, 'handleNewUserCreationComponentKeyPressed');
this._rulerComponent = null;
this._steps = null;
this._currentStepIndex = 0;
this._isNextEnabled = false;
this._userCreationState = 'IDLE'; // 'IN PROGRESS', 'DONE', 'FAILED'
this._user = null;
return this;
}
MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.NewUserWizardController.prototype, {
'toString': function() {
return "Clipperz.PM.UI.Web.Controllers.NewUserWizardController";
},
//-------------------------------------------------------------------------
'newUserCreationComponent': function () {
return this._newUserCreationComponent;
},
//=============================================================================
'user': function () {
return this._user;
},
'setUser': function (aValue) {
this._user = aValue;
},
//-----------------------------------------------------------------------------
'userCreationState': function () {
return this._userCreationState;
},
'setUserCreationState': function (aValue) {
//console.log("+++ NewUserWizardController.setUserCreationState", aValue);
this._userCreationState = aValue;
this.checkState();
},
//=============================================================================
'resetCurrentStepIndex': function () {
this._currentStepIndex = 0;
this.rulerComponent().resetStatus({animateTransition:true});
},
//-----------------------------------------------------------------------------
'enableNext': function (aValue) {
this.rulerComponent().enableNext(aValue);
this._isNextEnabled = aValue;
},
'isNextEnabled': function () {
return this._isNextEnabled;
},
//-----------------------------------------------------------------------------
'enablePrevious': function (aValue) {
this.rulerComponent().enablePrevious(aValue);
},
//=============================================================================
'rulerComponent': function () {
if (this._rulerComponent == null) {
this._rulerComponent = new Clipperz.PM.UI.Web.Components.RulerComponent({
translationContext:'Wizards.NewUserWizard'
});
this._rulerComponent.render();
MochiKit.Signal.connect(this._rulerComponent, 'exit', this, 'handleExit');
MochiKit.Signal.connect(this._rulerComponent, 'done', this, 'done');
MochiKit.Signal.connect(this._rulerComponent, 'moveForward', this, 'handleMoveForward');
MochiKit.Signal.connect(this._rulerComponent, 'moveBackward', this, 'handleMoveBackward');
MochiKit.Signal.connect(this._rulerComponent, 'cursorMoved', this, 'handleCursorMoved');