summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/PM/UI/Mobile
Side-by-side diff
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Mobile') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/CardDetail.js26
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/CardList.js26
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/LoginForm.js29
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Mobile/Controllers/MainController.js54
4 files changed, 51 insertions, 84 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/CardDetail.js b/frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/CardDetail.js
index 32dfa63..abf4758 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/CardDetail.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/CardDetail.js
@@ -1,216 +1,211 @@
/*
-Copyright 2008-2011 Clipperz Srl
+Copyright 2008-2013 Clipperz Srl
-This file is part of Clipperz Community Edition.
-Clipperz Community Edition is an online password manager.
+This file is part of Clipperz, the 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 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.
+* Clipperz 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/>.
+ License along with Clipperz. If not, see http://www.gnu.org/licenses/.
*/
Clipperz.Base.module('Clipperz.PM.UI.Mobile.Components');
Clipperz.PM.UI.Mobile.Components.CardDetail = function(args) {
args = args || {};
Clipperz.PM.UI.Mobile.Components.CardDetail.superclass.constructor.apply(this, arguments);
// this._cardReference = null;
return this;
}
//=============================================================================
Clipperz.Base.extend(Clipperz.PM.UI.Mobile.Components.CardDetail, Clipperz.PM.UI.Common.Components.BaseComponent, {
//-------------------------------------------------------------------------
'toString': function () {
return "Clipperz.PM.UI.Mobile.Components.CardDetail component";
},
//-------------------------------------------------------------------------
/*
'cardReference': function () {
return this._cardReference;
},
'setCardReference': function (aValue) {
this._cardReference = aValue;
},
*/
//-------------------------------------------------------------------------
'renderSelf': function () {
-console.log("CardDetail.renderSelf");
this.append(this.element(), {tag:'div', cls:'cardDetail', children:[
{tag:'div', cls:'toolbar', children:[
{tag:'a', href:'#', cls:'back', html:"List"},
{tag:'h1', id:this.getId('cardTitle'), html:"…"}
]},
{tag:'div', cls:'scroll', id:this.getId('cardDetails'), children:[
]}
]});
},
/*
'renderSelf': function() {
this.append(this.element(), [
{tag:'div', cls:'cardDetail', id:this.getId('cardDetail'), children:[
{tag:'div', id:this.getId('progressBar')} //,
]}
]);
this.addComponent(new Clipperz.PM.UI.Common.Components.ProgressBar({'element':this.getElement('progressBar')}));
MochiKit.Signal.signal(Clipperz.PM.UI.Common.Controllers.ProgressBarController.defaultController, 'updateProgress', 0);
},
*/
'setTitle': function (aValue) {
this.getElement('cardTitle').innerHTML = aValue;
},
'fieldListElement': function () {
var result;
result = this.getElement('fieldList');
if (result == null) {
result = this.append(this.getElement('cardDetails'), {tag:'ul', cls:'rounded', id:this.getId('fieldList')});
}
return result;
},
'renderFieldValues': function (someFieldValues) {
var fieldClass;
if ((someFieldValues['actionType'] != 'NONE') || (someFieldValues['label'] != '') && (someFieldValues['value'] != '')) {
if (someFieldValues['isHidden'] == true) {
fieldClass = 'password';
} else {
fieldClass = '';
}
this.append(this.fieldListElement(), {tag:'li', cls:'cardField', children:[
{tag:'a', href:'#', cls:fieldClass, html:someFieldValues['value'], children:[
{tag:'small', cls:'label', html:someFieldValues['label']}
]}
]})
}
},
'addField': function (aField) {
var deferredResult;
var fieldValues;
fieldValues = {};
deferredResult = new Clipperz.Async.Deferred("CardDetail.addField", {trace:false});
deferredResult.addMethod(aField, 'label');
deferredResult.addCallback(function (aValue) { fieldValues['label'] = aValue; });
deferredResult.addMethod(aField, 'value');
deferredResult.addCallback(function (aValue) { fieldValues['value'] = aValue; });
deferredResult.addMethod(aField, 'actionType');
deferredResult.addCallback(function (aValue) { fieldValues['actionType'] = aValue; });
deferredResult.addMethod(aField, 'isHidden');
deferredResult.addCallback(function (aValue) { fieldValues['isHidden'] = aValue; });
deferredResult.addMethod(this, 'renderFieldValues', fieldValues);
deferredResult.callback();
return deferredResult;
},
//-------------------------------------------------------------------------
'directLoginElement': function () {
var result;
result = this.getElement('directLoginList');
if (result == null) {
this.append(this.getElement('cardDetails'), {tag:'h2', html:"Direct login"});
result = this.append(this.getElement('cardDetails'), {tag:'ul', cls:'rounded', id:this.getId('directLoginList')});
}
return result;
},
'addDirectLogin': function (aDirectLogin) {
this.append(this.directLoginElement(), {tag:'li', cls:'directLogin forward', children:[
{tag:'a', href:'#', html:"direct login", children:[
{tag:'small', cls:'favicon', children:[{tag:'img', cls:'favicon', src:'http://www.clipperz.com/favicon.ico'}]}
]}
]})
-console.log("ADD DIRECT LOGIN", aDirectLogin);
},
//=========================================================================
'showCard': function (aCard) {
var deferredResult;
// this.render();
-console.log("CardDetail.showCard", aCard);
deferredResult = new Clipperz.Async.Deferred("CardDetail.showCard", {trace:false});
deferredResult.addMethod(aCard, 'label');
deferredResult.addMethod(this, 'setTitle');
deferredResult.addMethod(aCard, 'fields');
deferredResult.addCallback(MochiKit.Base.values);
deferredResult.addCallback(MochiKit.Base.map, MochiKit.Base.method(this, 'addField'));
deferredResult.addMethod(aCard, 'directLogins');
deferredResult.addCallback(MochiKit.Base.values);
deferredResult.addCallback(MochiKit.Base.map, MochiKit.Base.method(this, 'addDirectLogin'));
deferredResult.callback();
return deferredResult;
// return Clipperz.Async.callbacks("CardDialogController.updateComponentState", [
// MochiKit.Base.method(this.record(), 'hasPendingChanges'),
// MochiKit.Base.method(this.cardDialogComponent(), 'setShouldEnableSaving'),
//
// MochiKit.Base.method(this.record(), 'label'),
// MochiKit.Base.method(this.cardDialogComponent(), 'setTitle'),
// MochiKit.Base.method(this.record(), 'notes'),
// MochiKit.Base.method(this.cardDialogComponent(), 'setNotes'),
//
// MochiKit.Base.method(this.record(), 'fields'),
// MochiKit.Base.values,
// MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.method(this, 'addCardDialogComponentWithField')),
//
// MochiKit.Base.method(this.record(), 'directLogins'),
// MochiKit.Base.values,
// MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.method(this, 'addCardDialogComponentWithDirectLogin')),
//
// MochiKit.Base.method(this.cardDialogComponent(), 'resetNewFieldInputs'),
// MochiKit.Base.noop
// ], {trace:false});
},
//=========================================================================
'showCardDetails': function (someData) {
this.element().innerHTML = '';
this.append(this.element(), [
{tag:'fieldset', id:this.getId('fields'), children:MochiKit.Base.map(function (aFieldData) {
return {tag:'div', cls:'row', children:[
{tag:'label', html:aFieldData['label']},
// {tag:'span', cls:('fieldValue ' + (aFieldData['isHidden'] ? 'password' : 'text')), html:aFieldData['value']}
@@ -221,79 +216,78 @@ console.log("CardDetail.showCard", aCard);
]}
}, someData['fields'])}
]);
MochiKit.Iter.forEach(MochiKit.Selector.findChildElements(this.element(), ['span.password']), MochiKit.Base.bind(function (aPasswordElement) {
MochiKit.Signal.connect(aPasswordElement, 'onclick', function (anEvent) { alert(MochiKit.DOM.scrapeText(anEvent.src())); })
}, this));
if (someData['directLogins'].length > 0) {
this.append(this.element(), [
{tag:'h2', html:"Direct logins"},
{tag:'fieldset', id:this.getId('directLogins'), children:MochiKit.Base.map(function (aDirectLoginData) {
return {tag:'div', cls:'row', id:('directLogin_' + aDirectLoginData['_reference']), children:[
{tag:'img', cls:'favicon', src:aDirectLoginData['favicon']},
// {tag:'input', cls:'directLogin', disabled:'disabled', type:'text', name:aDirectLoginData['label'], value:aDirectLoginData['label']}
{tag:'span', cls:'directLogin', html:aDirectLoginData['label']}
]}
}, someData['directLogins'])}
]);
MochiKit.Base.map(MochiKit.Base.bind(function (aRowNode) {
MochiKit.Signal.connect(aRowNode, 'onclick', this, 'directLoginClickHandler');
}, this),
MochiKit.Selector.findChildElements(this.getElement('directLogins'), ['div.row'])
)
};
if (someData['notes'] != '') {
this.append(this.element(), [
{tag:'h2', html:"Notes"},
{tag:'fieldset', id:this.getId('fieldset'), children:[
{tag:'div', cls:'row notes', children:[
{tag:'span', html:someData['notes']}
]}
]}
]);
};
return true;
},
//-------------------------------------------------------------------------
/*
'toggleClickHandler': function (anEvent) {
var nextState;
var fieldValue;
-//console.log("TOGGLE");
anEvent.preventDefault;
fieldValue = MochiKit.Selector.findChildElements(anEvent.src().parentNode.parentNode, ['span.password'])[0];
nextState = (MochiKit.DOM.getNodeAttribute(anEvent.src(), 'toggled') != 'true');
if (nextState) {
MochiKit.DOM.removeElementClass(fieldValue, 'clear');
} else {
MochiKit.DOM.addElementClass(fieldValue, 'clear');
}
MochiKit.DOM.setNodeAttribute(anEvent.src(), 'toggled', nextState);
},
* /
//=========================================================================
/*
'directLoginClickHandler': function (anEvent) {
anEvent.preventDefault();
if (/(directLogin_)/.test(anEvent.src().id)) {
var directLoginReference;
directLoginReference = anEvent.src().id.match(/(directLogin_)(.*)/)[2];
MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'selectedDirectLogin', {cardReference:this.cardReference(), directLoginReference:directLoginReference});
}
},
*/
//=========================================================================
__syntaxFix__: "syntax fix"
});
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/CardList.js b/frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/CardList.js
index a4aa212..a0e4879 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/CardList.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/CardList.js
@@ -1,222 +1,216 @@
/*
-Copyright 2008-2011 Clipperz Srl
+Copyright 2008-2013 Clipperz Srl
-This file is part of Clipperz Community Edition.
-Clipperz Community Edition is an online password manager.
+This file is part of Clipperz, the 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 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.
+* Clipperz 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/>.
+ License along with Clipperz. If not, see http://www.gnu.org/licenses/.
*/
Clipperz.Base.module('Clipperz.PM.UI.Mobile.Components');
Clipperz.PM.UI.Mobile.Components.CardList = function(args) {
args = args || {};
Clipperz.PM.UI.Mobile.Components.CardList.superclass.constructor.apply(this, arguments);
this._cardDetail = null;
return this;
}
//=============================================================================
Clipperz.Base.extend(Clipperz.PM.UI.Mobile.Components.CardList, Clipperz.PM.UI.Common.Components.BaseComponent, {
//-------------------------------------------------------------------------
'toString': function () {
return "Clipperz.PM.UI.Mobile.Components.CardList component";
},
//-------------------------------------------------------------------------
'renderSelf': function () {
this.append(this.element(), {tag:'div', cls:'cardList', children:[
{tag:'div', cls:'toolbar', children:[
{tag:'h1', html:"clipperz"},
// {tag:'input', name:'search', type:'search', autocomplete:'off', placeholder:"search", id:this.getId('search')},
{tag:'a', href:'#', id:'settings', cls:'button', html:"*"}
]},
{tag:'div', cls:'scroll', id:this.getId('listBox'), children:[
{tag:'ul', cls:'rounded', id:this.getId('list'), children:[
{tag:'li', html:'loading'}
]}
]}
]});
MochiKit.Signal.connect(this.getElement('list'), 'onclick', this, 'cardSelectionHandler');
MochiKit.Signal.connect(this.getElement('list'), 'ontouchstart', this, 'cardSelectionHandler');
// MochiKit.Signal.connect(this.getElement('cardListSearchForm'), 'onsubmit', this, 'searchHandler');
// MochiKit.Signal.connect(this.getElement('cardListSearchForm'), 'onkeydown', this, 'searchHandler');
// MochiKit.Signal.connect(this.getElement('cardListSearchForm'), 'onkeyup', this, 'searchHandler');
// MochiKit.Signal.connect(this.getElement('cardListPanel'), 'onclick', this, 'cardListClickHandler');
// MochiKit.Signal.connect('backButton', 'onclick', this, 'backButtonClickHandler');
// MochiKit.Style.hideElement('backButton');
// MochiKit.Style.hideElement(this.getElement('cardDetail'));
},
'showCards': function (someCards) {
var cardListElement;
if (this.isFullyRendered() == false) {
this.render();
};
cardListElement = this.getElement('list')
cardInfo = {
'_rowObject': MochiKit.Async.succeed,
'_reference': MochiKit.Base.methodcaller('reference'),
'_searchableContent': MochiKit.Base.methodcaller('searchableContent'),
'label': MochiKit.Base.methodcaller('label'),
'favicon': MochiKit.Base.methodcaller('favicon')
};
-//console.log("someCards", someCards);
deferredResult = new Clipperz.Async.Deferred("CardList.showCards", {trace:false});
deferredResult.addCallback(MochiKit.Base.map, Clipperz.Async.collectResults("CardList.value - collectResults", cardInfo, {trace:false}));
deferredResult.addCallback(Clipperz.Async.collectAll);
deferredResult.addCallback(MochiKit.Base.methodcaller('sort', Clipperz.Base.caseInsensitiveKeyComparator('label')));
deferredResult.addCallbackPass(MochiKit.DOM.replaceChildNodes, cardListElement);
// deferredResult.addCallbackPass(MochiKit.DOM.removeElementClass, cardListElement, 'loading');
deferredResult.addCallback(MochiKit.Base.map, MochiKit.Base.method(this, 'appendCardToList', cardListElement));
deferredResult.callback(someCards);
},
'appendCardToList': function (aCardListElement, aCardInfo) {
-//console.log("appendCardToList", aCardInfo);
this.append(aCardListElement, {tag:'li', cls:'cardListItem arrow', cardreference:aCardInfo['_reference'], children:[
{tag:'a', href:'#', html:aCardInfo['label'], children:[
{tag:'small', cls:'favicon', children:[{tag:'img', cls:'favicon', src:aCardInfo['favicon']}]}
]}
]});
},
'cardSelectionHandler': function (anEvent) {
var listElement;
var cardReference;
anEvent.preventDefault();
listElement = anEvent.target();
if (MochiKit.DOM.getNodeAttribute(listElement, 'cardreference') == null) {
listElement = MochiKit.DOM.getFirstParentByTagAndClassName(anEvent.target(), tagName='li', className='cardListItem');
}
cardReference = MochiKit.DOM.getNodeAttribute(listElement, 'cardreference');
-console.log("###", listElement, cardReference);
// TODO: Notify card with reference MochiKit.DOM.getNodeAttribute(listElement, 'cardreference') has been selected
MochiKit.Signal.signal(this, 'selectedCard', cardReference);
},
//-------------------------------------------------------------------------
/*
'searchHandler': function (anEvent) {
if ((typeof(anEvent.key()) != 'undefined') && (anEvent.key().string == 'KEY_ENTER')) { // RETURN
anEvent.preventDefault();
} else {
if ((typeof(anEvent.key()) != 'undefined') && (anEvent.key().string == 'KEY_ESCAPE')) {
anEvent.target().value = "";
}
if (anEvent.type() == 'keyup') {
MochiKit.Signal.signal(this, 'searchEvent', anEvent.target().value);
}
}
},
//-------------------------------------------------------------------------
'update': function (someObjects) {
var cardListPanel;
var i,c;
cardListPanel = this.getElement('cardListPanel');
cardListPanel.innerHTML = '';
c = someObjects.length;
for (i=0; i<c; i++) {
this.append(cardListPanel, {tag:'li', cls:'cardListItem', id:('cardListItem_' + someObjects[i]['_reference']), children:[
{tag:'img', src:(someObjects[i]['favicon'] ? someObjects[i]['favicon'] : 'data:application/octet-stream;charset=utf-8;base64,AAABAAEAFxcAAAEAGAD8BgAAFgAAACgAAAAXAAAALgAAAAEAGAAAAAAAAAAAABIXAAASFwAAAAAAAAAAAAD///////////////////////////////////////////////////////////////////////////////////////////9zAC////////////////////////////////////////////////////////////////////////////////////////////9pAG////////////////////////////////////////////////////////////////////////////////////////////9rAC////////////////////////////////////////////////////////////////////////////////////////////9yAHP////////////////////////IyMizs7O6urrq6ur////////////Ozs6zs7Ozs7Pq6ur///////////////////////8AAAD////////////////////V1dWXl5eXl5eXl5elpaX4+Pj////Ozs6Xl5eXl5eXl5eenp7///////////////////////8AAAD////////////////////Ozs6Xl5eXl5eXl5eXl5fBwcHq6uqenp6Xl5eXl5eXl5eXl5f///////////////////////8AAAD////////////////////j4+OXl5eXl5eXl5eXl5eXl5elpaWXl5eXl5eXl5eXl5ezs7P///////////////////////8AAAD////////////////////////IyMiXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eenp7x8fH////////////////////////////////////////////////////4+PilpaWXl5eXl5eXl5eXl5eXl5eXl5eXl5fOzs7////////////////////////////////////////////////////////q6uq6urqXl5eXl5eXl5eXl5eXl5eXl5eenp7V1dX4+Pj///////////////////////8AAAD////////////4+PjOzs6lpaWXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5e6urrj4+P///////////////8AAAD////////////BwcGXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5fx8fH///////////8AAAD///////////+zs7OXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5fj4+P///////////8AAAD////////////IyMiXl5eXl5eXl5eXl5e6urqXl5eXl5eXl5eXl5esrKylpaWXl5eXl5eXl5eenp7x8fH///////////8AAAD////////////////Ozs7Ozs7V1dX4+Pj///+Xl5eXl5eXl5eXl5fOzs7////q6urOzs7Ozs7q6ur///////////////8AAAD///////////////////////////////////+Xl5eXl5eXl5eXl5fOzs7///////////////////////////////////8AAAD///////////////////////////////////+Xl5eXl5eXl5eXl5fOzs7///////////////////////////////////8AAAD///////////////////////////////////+Xl5eXl5eXl5eXl5fOzs7///////////////////////////////////8AAAD////////////////////////////////////IyMiXl5eXl5eenp7x8fH///////////////////////////////////8AAAD////////////////////////////////////////j4+Pj4+Px8fH///////////////////////////////////////8AAAD///////////////////////////////////////////////////////////////////////////////////////////8AAAD///////////////////////////////////////////////////////////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAo=')},
{tag:'a', id:('cardListReference_' + someObjects[i]['_reference']), href:'#', html:someObjects[i]['label']}
]})
MochiKit.Signal.connect('cardListItem_' + someObjects[i]['_reference'], 'onclick', this, 'cardListClickHandler');
}
},
'cardListClickHandler': function (anEvent) {
anEvent.preventDefault();
if (/(cardListReference_|cardListItem_)/.test(anEvent.target().id)) {
var cardListReference;
cardListReference = anEvent.target().id.match(/(cardListReference_|cardListItem_)(.*)/)[2];
-//console.log("Showing detail for card named", cardListReference);
MochiKit.Signal.signal(this, 'selectedCard', cardListReference);
}
},
//=========================================================================
'cardDetail': function (someData) {
if (this._cardDetail == null) {
this._cardDetail = new Clipperz.PM.UI.Mobile.Components.CardDetail({element:this.getElement('cardDetail')});
}
return this._cardDetail;
},
//-------------------------------------------------------------------------
'removeCardDetail': function () {
if (this._cardDetail != null) {
this._cardDetail.remove();
this._cardDetail = null;
}
},
//=========================================================================
'showCard': function (someData) {
var deferredResult;
var offset;
offset = ((MochiKit.DOM.getNodeAttribute(MochiKit.DOM.currentDocument().body, 'orientation') == 'portrait') ? 320 : 480);
this.cardDetail().render();
this.cardDetail().setCardReference(someData['_reference']);
MochiKit.Style.setElementPosition(this.cardDetail().element(), {x:offset});
new MochiKit.Visual.Sequence([
// new MochiKit.Visual.Move(this.cardDetail().element(), {x:offset, y:45, mode:'absolute', duration:0, sync:true}),
new MochiKit.Visual.Parallel([
new MochiKit.Visual.Move(this.getElement('cardList'), {x:-offset, y:0, mode:'relative', transition:MochiKit.Visual.Transitions.linear, sync:true}),
new MochiKit.Visual.Move(this.getElement('cardDetail'), {x:0, y:45, mode:'absolute', transition:MochiKit.Visual.Transitions.linear, sync:true}),
// new MochiKit.Visual.ScrollTo('toolbar', {sync:true}),
MochiKit.Visual.appear ('backButton', { transition:MochiKit.Visual.Transitions.linear, sync:true})
], {duration:1, sync:true}),
MochiKit.Visual.fade(this.getElement('cardList'), {duration:0, sync:true})
], {})
MochiKit.DOM.getElement('pageTitle').innerHTML = someData['title'];
return true;
},
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/LoginForm.js b/frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/LoginForm.js
index eafcdbc..3aeac0c 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/LoginForm.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/LoginForm.js
@@ -1,70 +1,68 @@
/*
-Copyright 2008-2011 Clipperz Srl
+Copyright 2008-2013 Clipperz Srl
-This file is part of Clipperz Community Edition.
-Clipperz Community Edition is an online password manager.
+This file is part of Clipperz, the 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 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.
+* Clipperz 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/>.
+ License along with Clipperz. If not, see http://www.gnu.org/licenses/.
*/
Clipperz.Base.module('Clipperz.PM.UI.Mobile.Components');
Clipperz.PM.UI.Mobile.Components.LoginForm = function(args) {
args = args || {};
this._pin = '';
this._message = null;
this._steps = 0;
this._actualSteps = 0;
this._callback = null;
this._errorCallback = null;
this._mode = 'CREDENTIALS';
Clipperz.PM.UI.Mobile.Components.LoginForm.superclass.constructor.apply(this, arguments);
return this;
}
//=============================================================================
Clipperz.Base.extend(Clipperz.PM.UI.Mobile.Components.LoginForm, Clipperz.PM.UI.Common.Components.BaseComponent, {
//-------------------------------------------------------------------------
'toString': function () {
return "Clipperz.PM.UI.Mobile.Components.LoginForm component";
},
//-------------------------------------------------------------------------
'callback': function () {
return this._callback;
},
'errorCallback': function () {
return this._errorCallback;
},
//-------------------------------------------------------------------------
'mode': function () {
return this._mode;
@@ -94,97 +92,96 @@ Clipperz.Base.extend(Clipperz.PM.UI.Mobile.Components.LoginForm, Clipperz.PM.UI.
this._username = aValue;
},
//..........................................................................
'passphrase': function () {
return this._passphrase;
},
'setPassphrase': function (aValue) {
this._passphrase = aValue;
},
//-------------------------------------------------------------------------
'message': function () {
return this._message;
},
'_setMessage': function (aValue) {
this._message = aValue;
if (aValue == null) {
MochiKit.Style.hideElement(this.getElement('credentialsMessage'));
} else {
this.getElement('message').innerHTML = aValue;
MochiKit.Style.showElement(this.getElement('credentialsMessage'));
}
},
'setMessage': function (aValue) {
this._setMessage(aValue);
MochiKit.DOM.removeElementClass(this.getElement('credentialsMessage'), 'error');
},
'setErrorMessage': function (aValue) {
this._setMessage(aValue);
MochiKit.DOM.addElementClass(this.getElement('credentialsMessage'), 'error');
},
//-------------------------------------------------------------------------
'setCallbacks': function (args) {
this._callback = args['callback'];
this._errorCallback = args['errorCallback'];
},
'showErrors': function (args) {
-//console.log("LoginForm.showErrors", args);
if (args['previousFailedAttempt'] == 'LOGIN') {
this.setErrorMessage("Wrong credentials");
} else if (args['previousFailedAttempt'] == 'PIN') {
if (args['failedAttempts'] == -1) {
this.setErrorMessage("Wrong PIN - Resetted");
} else {
this.setErrorMessage("Wrong PIN");
}
} else {
this.setMessage(null);
}
},
'updateWithArgs': function (args) {
this.renderIfNeeded();
this.setCallbacks(args);
this.showErrors(args);
this.updateRendering();
},
'showPinLogin': function (args) {
this.setPin('');
this.setMode('PIN');
this.updateWithArgs(args);
// $(this.getAnchor('PIN')).focus();
this.getElement('PIN').focus();
},
'showCredentialsLogin': function (args) {
this.setMode('CREDENTIALS');
this.updateWithArgs(args);
if (this.getElement('usernameField').value.length == 0) {
// $(this.getAnchor('usernameField')).focus();
this.getElement('usernameField').focus();
} else {
// $(this.getAnchor('passphraseField')).focus();
this.getElement('passphraseField').focus();
this.getElement('passphraseField').select();
}
},
//-------------------------------------------------------------------------
'renderIfNeeded': function () {
if (this.isFullyRendered() == false) {
this.render();
@@ -254,103 +251,97 @@ Clipperz.Base.extend(Clipperz.PM.UI.Mobile.Components.LoginForm, Clipperz.PM.UI.
{tag:'div', cls:'bar01'},
{tag:'div', cls:'bar02'},
{tag:'div', cls:'bar03'},
{tag:'div', cls:'bar04'},
{tag:'div', cls:'bar05'},
{tag:'div', cls:'bar06'},
{tag:'div', cls:'bar07'},
{tag:'div', cls:'bar08'},
{tag:'div', cls:'bar09'},
{tag:'div', cls:'bar10'},
{tag:'div', cls:'bar11'},
{tag:'div', cls:'bar12'}
]}
]},
{tag:'div', id:this.getId('loadingMessage')},
{tag:'a', href:'#', cls:'grayButton', id:this.getId('loginCancelButton'), html:"Cancel"}
]}
//==================================================================
]}
]});
MochiKit.Signal.connect(this.getElement('credentialsForm'), 'onsubmit', this, 'submitCredentialsHandler');
MochiKit.Signal.connect(this.getElement('credentialsSubmitButton'), 'onclick', this, 'submitCredentialsHandler');
MochiKit.Signal.connect(this.getElement('pinForm'), 'onsubmit', this, 'submitPinHandler');
MochiKit.Signal.connect(this.getElement('pinSubmitButton'), 'onclick', this, 'submitPinHandler');
MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'initProgress', this, 'initProgressHandle');
MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'updateProgress', this, 'updateProgressHandle');
MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'advanceProgress', this, 'advanceProgressHandle');
MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'progressDone', this, 'progressDoneHandle');
},
//-------------------------------------------------------------------------
'submitPinHandler': function (anEvent) {
var pin;
this.setMessage(null);
pin = this.getElement('PIN').value;
// $(this.getAnchor('PIN')).blur();
this.getElement('PIN').blur();
credentials = Clipperz.PM.PIN.credentialsWithPIN(pin);
this.loginWithCredentials(credentials);
},
'submitCredentialsHandler': function (anEvent) {
-//console.log("submitCredentialsHandler");
var credentials;
this.setMessage(null);
credentials = {};
credentials['username'] = this.getElement('usernameField').value;
credentials['passphrase'] = this.getElement('passphraseField').value;
// $(this.getAnchor('passphraseField')).blur();
this.getElement('passphraseField').blur();
this.loginWithCredentials(credentials);
},
//-------------------------------------------------------------------------
'loginWithCredentials': function (someCredentials) {
var args;
args = {};
args['credentials'] = someCredentials;
args['errorCallback'] = this.errorCallback();
MochiKit.Style.hideElement(this.getElement('credentialsBody'));
MochiKit.Style.showElement(this.getElement('validating'));
MochiKit.Async.callLater(0.1, this.callback(), args);
},
//-------------------------------------------------------------------------
'initProgressHandle': function (anEvent) {
-//console.log("** initProgressHandle", anEvent);
this._steps = anEvent['steps'];
this._actualSteps = 0;
},
'updateProgressHandle': function (anEvent) {
-//console.log("** updateProgressHandle", anEvent);
this._steps += anEvent['extraSteps'];
},
'advanceProgressHandle': function (anEvent) {
-//console.log("** advanceProgressHandle", anEvent);
this._actualSteps ++;
-//console.log("STEPS: " + this._actualSteps + "/" + this._steps);
},
'progressDoneHandle': function (anEvent) {
-//console.log("** progressDoneHandle", anEvent);
},
//-------------------------------------------------------------------------
__syntaxFix__: "syntax fix"
});
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Mobile/Controllers/MainController.js b/frontend/gamma/js/Clipperz/PM/UI/Mobile/Controllers/MainController.js
index 12a61f7..9951f44 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Mobile/Controllers/MainController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Mobile/Controllers/MainController.js
@@ -1,393 +1,381 @@
/*
-Copyright 2008-2011 Clipperz Srl
+Copyright 2008-2013 Clipperz Srl
-This file is part of Clipperz Community Edition.
-Clipperz Community Edition is an online password manager.
+This file is part of Clipperz, the 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 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.
+* Clipperz 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/>.
+ License along with Clipperz. If not, see http://www.gnu.org/licenses/.
*/
Clipperz.Base.module('Clipperz.PM.UI.Mobile.Controllers');
Clipperz.PM.UI.Mobile.Controllers.MainController = function() {
- this._jQTouch = null;
+// this._jQTouch = null;
this._user = null;
this._proxy = null;
this._loginForm = null;
this._cardList = null;
this._cardDetail = null;
return this;
}
MochiKit.Base.update(Clipperz.PM.UI.Mobile.Controllers.MainController.prototype, {
'toString': function () {
return "Clipperz.PM.UI.Mobile.Controllers.MainController";
},
//-------------------------------------------------------------------------
'user': function () {
return this._user;
},
'setUser': function (aValue) {
this._user = aValue;
},
//-------------------------------------------------------------------------
-
+/*
'jQTouch': function () {
return this._jQTouch;
},
'setJQTouch': function (aValue) {
this._jQTouch = aValue;
},
-
+*/
//=========================================================================
'run': function () {
- console.log("MainController.run");
-
MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'doLogin', MochiKit.Base.method(this, 'doLogin'));
Clipperz.DOM.Helper.overwrite(MochiKit.DOM.currentDocument().body, {tag:'div', id:'jqt', children:[
{tag:'div', id:'loginForm'},
{tag:'div', id:'cardList'},
{tag:'div', id:'cardDetail'},
{tag:'div', id:'preferences'}
]});
this.showLoginForm();
- this.initjQTouch();
+// this.initjQTouch();
// this.showAddToHomeScreenBaloon();
// this.selectInitialProxy();
},
-
+/*
'initjQTouch': function () {
var jqt;
jqt = new $.jQTouch({
icon: 'data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAHIAAAByCAIAAAAAvxIqAAAD8GlDQ1BJQ0MgUHJvZmlsZQAAKJGNVd1v21QUP4lvXKQWP6Cxjg4Vi69VU1u5GxqtxgZJk6XpQhq5zdgqpMl1bhpT1za2021Vn/YCbwz4A4CyBx6QeEIaDMT2su0BtElTQRXVJKQ9dNpAaJP2gqpwrq9Tu13GuJGvfznndz7v0TVAx1ea45hJGWDe8l01n5GPn5iWO1YhCc9BJ/RAp6Z7TrpcLgIuxoVH1sNfIcHeNwfa6/9zdVappwMknkJsVz19HvFpgJSpO64PIN5G+fAp30Hc8TziHS4miFhheJbjLMMzHB8POFPqKGKWi6TXtSriJcT9MzH5bAzzHIK1I08t6hq6zHpRdu2aYdJYuk9Q/881bzZa8Xrx6fLmJo/iu4/VXnfH1BB/rmu5ScQvI77m+BkmfxXxvcZcJY14L0DymZp7pML5yTcW61PvIN6JuGr4halQvmjNlCa4bXJ5zj6qhpxrujeKPYMXEd+q00KR5yNAlWZzrF+Ie+uNsdC/MO4tTOZafhbroyX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QF/P5/293y0q5KTot0Xftwl7tx1Vw10xVNsoYqaJq3bAO6gYOd7HwfANIkJuoX/6i98YeP7zbSiSsWO1KMy2Qh28rs2HOsy565csnsoHPaMs1omqUtVPkgK+hLoLOXaRIO9c9+6JdnnUo0/2Ik4vE+0brhBl8mEUtnWEs9uISLEXScYHEdEigYCp1V277+ZPy1nW+P07+FG7+JmPRe55nfH8W8m9ZPr07YeiJlskiKSRyne5ltk6O2fuMJ58LFykx7KcPJsxfrpy++qSHSnzCFYLEEjp5ljoDCyF8/7YWLi/7m3w+eO3duPE7tYXynDff3x17YdU5qWr1kTg1Lnzcs9CWY7SDg9/3f/a0v7By/WdHU0RlbvWJJI85GkoimGAP5ZG7XLf2nndU//tVu0xjHya24CpPcXcfae+D48cSU5cuWVotuy7RUiR1NXvfQ4+ccp8Izn4phW8a7vcqWldOYfoERgqGqTrnta4/3vrn3ICqUdL8MrsZKFwBnz51/9VBm+oL1cxuMjKt+8zfifE/Fxr6GQl8kmvHNXD9HSP7a57pv/NvtHd3dw82N/SGBy75P/cmW//rA6qv1xAwwSf2fn77z3ttXXBP/FGiccTXW2L1/p5vABCYwgQlMYAL/2fH/AdkCEQl+/Ar/AAAAAElFTkSuQmCCCg==',
// icon4: 'jqtouch4.png',
// startupScreen: null, // Pass a string path to a 320px x 460px startup screen for full screen apps.
statusBar: 'black-translucent', // Styles the status bar when running as a fullscreen app. Other options are `default`, `black`, and `black-translucent`.
// addGlossToIcon: true, // Set to 'false' to prevent automatic glossy button effect on icon.
preloadImages: false, // Pass an array of image paths to load them before page loads. Ex: `['images/link_over.png', 'images/link_select.png']`
fixedViewport: true, // Removes the user's ability to scale the page. Ensures the site behaves more like an application.
// fullScreen: true, // The website will become a fullscreen application when saved to a user's home screen. Set to `false` to disable.
// fullScreenClass: 'fullscreen' // Adds a class to the `<body>` when running in full-screen mode, to allow for easy detection and styling. Set to `false` to disable.
// themeSelectionSelector: '#jqt #themes ul', // ???
// useAnimations: true, // Set to `false` to disable all animations.
// useFastTouch: true, // Removes ~350ms onClick delay when tapping a link (use in conjunction with the .tap() event) **Experimental**
// useTouchScroll: true, // Adds support for iOS5 scrolling. Set to false to disable. **Experimental**
cacheGetRequests: false, // Automatically caches GET requests, so subsequent taps reference the pre-loaded views. (default: true)
// backSelector: '.back, .cancel, .goback', // A CSS selector for back links/buttons. When clicked, the page history goes back one, automatically reversing whichever entrance animation was used.
// cubeSelector: '.cube', // Link selector for a cube animation.
// dissolveSelector: '.dissolve', // Link selector for a dissolve animation.
// fadeSelector: '.fade', // Link selector for a fade animation.
// flipSelector: '.flip', // Link selector for a 3d flip animation.
formSelector: null, // Sets which forms are automatically submitted via Ajax. (default: 'form')
// popSelector: '.pop', // Link selector for a pop animation. (default: '.pop')
// slideSelector: 'body > * > ul li a', // Link selector for the default slide-left transition. By default applies to all links within an unordered list. Accepts any jQuery-capable selector `'li &gt; a, a:not(.dontslide)'`, etc. (default: 'body > * > ul li a')
// slideupSelector: '.slideup', // Link selector for a slide up animation. (default: '.slideup')
// submitSelector: '.submit', // Selector which, when clicked, will submit its parent form (and close keyboard if open). (default: '.submit')
// swapSelector: '.swap', // Link selector for 3d swap animation. (default: '.swap')
// touchSelector: 'a, .touch', // Selector for items which are automatically given expanded touch events. This makes ordinary links more responsive and provides trigger events like `swipe` (default: 'a, .touch')
debug: false
});
this.setJQTouch(jqt);
},
-
+*/
//=========================================================================
'showAddToHomeScreenBaloon': function () {
-console.log(">>> showAddToHomeScreenBaloon");
},
//-------------------------------------------------------------------------
'selectInitialProxy': function () {
-//console.log(">>> selectInitialProxy");
if (this.isOnline()) {
-//console.log("--- selectInitialProxy: using default proxy");
this._proxy = Clipperz.PM.Proxy.defaultProxy;
} else {
if (this.hasLocalData()) {
-//console.log("--- selectInitialProxy: using local cache proxy");
this._proxy = new Clipperz.PM.Proxy.OfflineCache({'shouldPayTolls':false});
} else {
this.showOfflineError();
}
}
},
//-------------------------------------------------------------------------
'showLoginForm': function (args) {
args = args || {};
args['callback'] = MochiKit.Base.method(this, 'doLogin');
if (Clipperz.PM.PIN.isSet()) {
args['errorCallback'] = MochiKit.Base.method(this, 'handleFailedPinLogin');
this.loginForm().showPinLogin(args);
} else {
args['errorCallback'] = MochiKit.Base.method(this, 'handleFailedCredentialsLogin');
this.loginForm().showCredentialsLogin(args);
}
},
//.........................................................................
'handleFailedCredentialsLogin': function () {
-console.log("LOGIN FAILED");
this.showLoginForm({'previousFailedAttempt':'LOGIN'});
},
//.........................................................................
'handleFailedPinLogin': function () {
var failedAttempts;
var status;
failedAttempts = Clipperz.PM.PIN.recordFailedAttempt();
this.showLoginForm({'previousFailedAttempt':'PIN', 'failedAttempts': failedAttempts});
},
//-------------------------------------------------------------------------
'doLogin': function (someArgs) {
var deferredResult;
var credentials;
var errorCallback;
var user;
var getPassphraseDelegate;
-//console.log(">>> MainController.doLogin", someArgs);
credentials = someArgs['credentials'];
errorCallback = someArgs['errorCallback'] || MochiKit.Base.noop;
getPassphraseDelegate = MochiKit.Base.partial(MochiKit.Async.succeed, credentials.passphrase);
user = new Clipperz.PM.DataModel.User({'username':credentials.username, 'getPassphraseFunction':getPassphraseDelegate});
deferredResult = new Clipperz.Async.Deferred('MainController.doLogin', {trace:false});
deferredResult.addCallbackPass(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'initProgress', {'steps':4});
deferredResult.addCallback(MochiKit.Async.wait, 0.1);
deferredResult.addMethod(Clipperz.Crypto.PRNG.defaultRandomGenerator(), 'deferredEntropyCollection');
deferredResult.addMethod(user, 'login');
deferredResult.addCallbacks(
MochiKit.Base.method(this, 'processSuccessfulLogin', user),
errorCallback
);
deferredResult.callback();
return deferredResult;
},
//..........................................................................
'processSuccessfulLogin': function (aUser) {
var deferredResult;
deferredResult = new Clipperz.Async.Deferred('MainController.processSuccessfulLogin', {trace:false});
deferredResult.addMethod(Clipperz.PM.PIN, 'resetFailedAttemptCount');
// deferredResult.addMethod(this, 'removeLoginForm');
deferredResult.addMethod(this, 'setUser', aUser);
deferredResult.addMethod(this, 'setupApplication');
deferredResult.addMethod(this, 'runApplication');
deferredResult.callback();
return deferredResult;
},
//-------------------------------------------------------------------------
'setupApplication': function () {
var deferredResult;
-console.log(">>> setupApplication");
deferredResult = new Clipperz.Async.Deferred("MainController.setupApplication", {trace:false});
deferredResult.addMethod(this, 'welcomeFirstTimeUser');
deferredResult.addMethod(this, 'showPaymentReminder');
deferredResult.addMethod(this, 'copyDataLocally');
deferredResult.callback(arguments);
return deferredResult;
},
//..........................................................................
'isFirstTimeUser': function () {
return false;
},
'welcomeFirstTimeUser': function () {
var deferredResult;
deferredResult = new Clipperz.Async.Deferred('MainController.welcomeFirstTimeUser', {trace:false});
if (this.isFirstTimeUser()) {
- deferredResult.addCallback(function () { console.log("--> welcome"); });
+ deferredResult.addCallback(function () { Clipperz.log("--> welcome"); });
}
deferredResult.callback();
return deferredResult;
},
//..........................................................................
'shouldShowPaymentReminder': function () {
return true;
},
'showPaymentReminder': function () {
var deferredResult;
deferredResult = new Clipperz.Async.Deferred('MainController.showPaymentReminder', {trace:false});
if (this.shouldShowPaymentReminder()) {
- deferredResult.addCallback(function () { console.log("--> payment reminder"); });
+ deferredResult.addCallback(function () { Clipperz.log("--> payment reminder"); });
}
deferredResult.callback();
return deferredResult;
},
//..........................................................................
'canCopyDataLocally': function () {
return false;
},
'copyDataLocally': function () {
var deferredResult;
deferredResult = new Clipperz.Async.Deferred('MainController.copyDataLocally', {trace:false});
if (this.canCopyDataLocally()) {
- deferredResult.addCallback(function () { console.log("--> copy data locally"); });
+ deferredResult.addCallback(function () { Clipperz.log("--> copy data locally"); });
}
deferredResult.callback();
return deferredResult;
},
//-------------------------------------------------------------------------
'runApplication': function () {
var deferredResult;
-//console.log(">>> runApplication");
deferredResult = new Clipperz.Async.Deferred('MainController.runApplication', {trace:true});
deferredResult.addMethod(this.user(), 'getRecords');
deferredResult.addMethod(this, 'showCards');
deferredResult.callback();
return deferredResult;
},
//=========================================================================
'showOfflineError': function (anException) {
alert("Error: " + anException);
throw anException;
},
//=========================================================================
'isOnline': function() {
return navigator.onLine;
},
'hasLocalData': function() {
return false;
},
//=========================================================================
'loginForm': function() {
if (this._loginForm == null) {
this._loginForm = new Clipperz.PM.UI.Mobile.Components.LoginForm({element:MochiKit.DOM.getElement('loginForm')});
}
return this._loginForm;
},
'removeLoginForm': function () {
if (this._loginForm != null) {
this._loginForm.remove();
this._loginForm = null;
}
},
//-------------------------------------------------------------------------
'cardList': function () {
if (this._cardList == null) {
this._cardList = new Clipperz.PM.UI.Mobile.Components.CardList({element:MochiKit.DOM.getElement('cardList')});
MochiKit.Signal.connect(this._cardList, 'selectedCard', this, 'selectCardHandler');
}
return this._cardList;
},
'showCards': function (someCards) {
this.cardList().showCards(someCards);
- this.jQTouch().goTo('#cardList', 'slideleft');
+// this.jQTouch().goTo('#cardList', 'slideleft');
},
//-------------------------------------------------------------------------
'cardDetail': function () {
if (this._cardDetail == null) {
this._cardDetail = new Clipperz.PM.UI.Mobile.Components.CardDetail({element:MochiKit.DOM.getElement('cardDetail')});
}
return this._cardDetail;
},
'selectCardHandler': function (aCardReference) {
var deferredResult;
deferredResult = new Clipperz.Async.Deferred("MainController.selectCardHandler", {trace:true});
deferredResult.addMethod(this.cardDetail(), 'render');
- deferredResult.addMethod(this.jQTouch(), 'goTo', '#cardDetail', 'slideleft');
+// deferredResult.addMethod(this.jQTouch(), 'goTo', '#cardDetail', 'slideleft');
deferredResult.addMethod(this.user(), 'getRecord', aCardReference);
deferredResult.addMethod(this.cardDetail(), 'showCard');
deferredResult.callback();
return deferredResult;
},
//=========================================================================
__syntaxFix__: "syntax fix"
});