From 816fc35420a434b1d54ae5833d617608f7456048 Mon Sep 17 00:00:00 2001 From: Clipperz Date: Tue, 08 Jan 2013 15:21:04 +0000 Subject: Updated version of /gamma Tons of changes, included a new draft of the mobile version (still VERY rough) --- (limited to 'frontend/gamma/js/Clipperz/PM/UI/iPhone/Components/CardList.js') diff --git a/frontend/gamma/js/Clipperz/PM/UI/iPhone/Components/CardList.js b/frontend/gamma/js/Clipperz/PM/UI/iPhone/Components/CardList.js deleted file mode 100644 index c3f2701..0000000 --- a/frontend/gamma/js/Clipperz/PM/UI/iPhone/Components/CardList.js +++ b/dev/null @@ -1,201 +0,0 @@ -/* - -Copyright 2008-2011 Clipperz Srl - -This file is part of Clipperz Community Edition. -Clipperz Community Edition is an online password manager. -For further information about its features and functionalities please -refer to http://www.clipperz.com. - -* Clipperz Community Edition is free software: you can redistribute - it and/or modify it under the terms of the GNU Affero General Public - License as published by the Free Software Foundation, either version - 3 of the License, or (at your option) any later version. - -* Clipperz Community Edition is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the implied - warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Affero General Public License for more details. - -* You should have received a copy of the GNU Affero General Public - License along with Clipperz Community Edition. If not, see - . - -*/ - -Clipperz.Base.module('Clipperz.PM.UI.iPhone.Components'); - -Clipperz.PM.UI.iPhone.Components.CardList = function(args) { - args = args || {}; - - Clipperz.PM.UI.iPhone.Components.CardList.superclass.constructor.apply(this, arguments); - - this._cardDetail = null; - - return this; -} - -//============================================================================= - -Clipperz.Base.extend(Clipperz.PM.UI.iPhone.Components.CardList, Clipperz.PM.UI.Common.Components.BaseComponent, { - - //------------------------------------------------------------------------- - - 'toString': function () { - return "Clipperz.PM.UI.iPhone.Components.CardList component"; - }, - - //------------------------------------------------------------------------- - - 'renderSelf': function(/*aContainer, aPosition*/) { - this.append(this.element(), [ - {tag:'div', cls:'toolbar', id:'toolbar', children:[ - {tag:'h1', id:'pageTitle', html:"cards"}, - {tag:'a', id:'backButton', cls:'button', href:'#', html:"cards"} - ]}, - {tag:'div', cls:'cardList', id:this.getId('cardList'), children:[ - {tag:'form', title:'search', cls:'panel cardListSearchForm', id:this.getId('cardListSearchForm'), children:[ - {tag:'input', type:'search', name:'search', value:"", placeholder:"search", id:this.getId('searchField')} - ]}, - {tag:'ul', cls:'panel cardListPanel', id:this.getId('cardListPanel'), children:[]} - ]}, - {tag:'div', cls:'panel cardDetailPanel', id:this.getId('cardDetail')} - ]); - - 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')); - }, - - //------------------------------------------------------------------------- - - '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