422 files changed, 23450 insertions, 7541 deletions
@@ -1,91 +1,78 @@ -# ![Clipperz icon][icon] CLIPPERZ COMMUNITY EDITION - Online Password Manager +# ![Clipperz icon][icon] CLIPPERZ - Online Password Manager -[Clipperz Community Edition][CE] allows you to host on your own server a web service identical to [Clipperz online password manager][clipperz]. It supports multiple backends (PHP/MySQL, Python/AppEngine, …) and you can contribute your own. +##What does Clipperz do? -ALL the code included in this project, if not otherwise stated, is released with the **AGPL v.3 license** (see `LICENSE.txt`), and all rights are reserved to Clipperz Srl. +You can think of Clipperz as an online vault where you can store any sort of confidential data without worrying about security. It can be used to save and manage passwords, private notes, burglar alarm codes, credit and debit card details, PINs, software keys, … +Since passwords are the most common type of private information that you need to protect, we have added a great deal of functionality to make Clipperz the best online password manager available thus solving the “password fatigue” problem. -For any use not allowed by the AGPL license, please [contact us][contact] to inquire about licensing options for commercial applications. +**Clipperz makes the Internet the most convenient and safe place to keep you most precious and sensitive data.** +Read more on the [Clipperz website][clipperz]. -## Why a Community Edition +## Why an open source version -But why would you prefer running Clipperz Community Edition from your own server instead of using the free and anonymous online service provided by its developers? +Because we want to enable as many people as possible to play with our code. So that you can start trusting it, the code not the developers. -* “Clipperz security architecture is great, but I prefer to store my data on my hardware. I just feel better this way!” -* “Clipperz is cool, but it would be even cooler it it had a Scala backend. I'm going to write it!" -* “I would like to modify the look & feel of Clipperz and embed this powerful password manager within my family intranet.” -* “Clipperz works nicely, but I would love to play with the source code in order to improve feature X and add new features Y and Z.” -* … +In order to allow you to inspect the code and analyze the traffic it generates between client and server, we had to provide an easy way to locally deploy the whole service. -Whatever is your motivation, we would love to hear from you about how and where you use Clipperz Community Edition. [Get in contact!][contact] +So, feel free to host on your own server a web service identical to [Clipperz online password manager][clipperz]. You can choose among multiple backends (PHP/MySQL, Python/AppEngine, …) and you can contribute your own. +Whatever is your motivation, we would love to hear from you: [get in contact!][contact] -## Warnings - -Please note that Clipperz Community Edition may not be suitable for mass deployments, depending on how robust is the backend you select. - -As an example, the current PHP backend lacks several critical capabilities such as bot protection and cuncurrent sessions management. - - -## Community Edition vs Workgroup Edition - -This Community Edition is aimed to **individual users**, but you may be interested to know that we are working on a **Workgroup Edition** targeting organizations that need a -password manager for their workforce (creating and managing employees accounts, defining groups and sharing policies, ...). - -The Workgroup Edition development is quite challenging and, while the overall design is already in place, it will still require a fairly large amount of resources for analysis and implementation. - -If your organization is interested in such edition, you can subscribe a "pledge" to sustain its development in exchange for a very generous user license with unlimited upgrades and other benefits. Again, [get in contact][contact]! +## License +ALL the code included in this project, if not otherwise stated, is released with the **AGPL v.3 license** (see `LICENSE.txt`), and all rights are reserved to Clipperz Srl. For any use not allowed by the AGPL license, please [contact us][contact] to inquire about licensing options for commercial applications. +## Warnings +Please note that the open source version of Clipperz may not be suitable for mass deployments, depending on how robust is the backend you select. As an example, the current PHP backend lacks several critical capabilities such as bot protection and cuncurrent sessions management. ## Contributions -Your contributions to Clipperz Community Edition are very welcome! In order to avoid jeopardizing the ownership of the code base, we will require every developer to sign the Clipperz [Contributor Agreement][CA] +Your contributions to Clipperz are very welcome! In order to avoid jeopardizing the ownership of the code base, we will require every developer to sign the Clipperz [Contributor Agreement][CA] This enables a single entity to represent the aggregated code base and gives the community flexibility to act as a whole to changing situations. The CA establishes a joint copyright assignment in which the contributor retains copyright ownership while also granting those rights to Clipperz Srl. With the CA in place, the aggregated code base within any Clipperz open source project is protected by both the distribution license and copyright law. Please [download][CA] and review the Contributor Agreement for a complete understanding of its terms and conditions. You may send your signed and completed CA to Clipperz by scanning your completed form and emailing the image or by fax. Please retain a copy for your records. **Thanks!** ## Building In order to build the deployable version, you need to invoke the following command: ./scripts/build clean install debug --frontends beta --backends php The output will be available in the `target` folder, with a separate folder for each build backend (initially this will be just a `php` folder). The script, invoked with these parameters, will build both the full version (`install` -> index.html) and the debug version (index_debug.html) of the /beta frontend using the PHP backend. At the moment this is the only combination that works, but this script will be gradually extended to be able to build also the [/gamma frontend][gamma] (whose code is already in the repository) and possibly also other backends (Python AppEngine being the very first candidate, and a Javascript version per node.js another interesting option) ## Installing ### PHP + MySQL backend At the moment the only backend that the build script can successfully create is the PHP + MySQL one. #### PHP Once the project has been successfully build, the application needs to be moved in a location where the web server can run it. Everything that is needed is located into `target/php`. #### MySQL The application needs a simple MySQL database; to configure all the credentials to access the previously allocated DB, edit the file found in `php/configuration.php`. You need to edit the file actually used by the web server; this will usually be the one moved into the right place in the previous step. Once the application is in place, and the DB credentials have been configured, you should initialize the DB itself; in order to do so, just point your browser at the following url: `http://<host>/<path>/php/setup/index.php`. Here you will find the standard [POG][pog] setup page: it should be enough to click the "POG me up!" button at the bottom of the page, and then the "Process" button on the next page. The POG interface will allow also a very basic access to the DB data that may be useful to check that the application is actually writing something on the DB (even if you will not be able to make much sense out of the data you will see, as they are all encrypted!) More information about building the PHP backend may be found in the `doc/install.php.txt` file. ## Disclaimer The resulting application has not been fully tested, so there may be still problems due to the new build script or some other changes that were done due to the new repository structure. So, for the moment, **use it at your own risk!** [icon]: http://0.gravatar.com/avatar/2a9fae49ced80a42830a206f88ea1022?size=100 -[CE]: http://clipperz.com/open_source/clipperz_community_edition [clipperz]: http://www.clipperz.com [contact]: http://clipperz.com/contact [CA]: http://www.clipperz.com/open_source/contributor_agreement [pog]: http://www.phpobjectgenerator.com/
\ No newline at end of file diff --git a/backend/python/src/clipperz.py b/backend/python/src/clipperz.py index bd5d030..5476b4b 100644 --- a/backend/python/src/clipperz.py +++ b/backend/python/src/clipperz.py @@ -1,117 +1,115 @@ # -# 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/. # import os import cgi import wsgiref.handlers import datetime import uuid import random import hashlib import logging from google.appengine.api import users from google.appengine.ext import webapp from google.appengine.ext import db from google.appengine.ext.webapp import template from django.utils import simplejson #============================================================================== sessionTimeout = datetime.timedelta(minutes=-2) def randomSeed(): return hex(random.getrandbits(32*8))[2:-1] def clipperzHash(aString): #logging.info(">>> string: " + aString) firstRound = hashlib.sha256() firstRound.update(aString) #logging.info("firstRound: " + firstRound.hexdigest() + " - " + firstRound.digest()) result = hashlib.sha256() result.update(firstRound.digest()) #logging.info("<<< finalResul: " + result.hexdigest()) return result.hexdigest() #============================================================================== class User(db.Model): username = db.StringProperty() srp_s = db.StringProperty() srp_v = db.StringProperty() header = db.TextProperty() statistics = db.TextProperty() auth_version= db.StringProperty() version = db.StringProperty() lock = db.StringProperty() def updateCredentials(self, someCredentials): self.username = someCredentials['C'] self.srp_s = someCredentials['s'] self.srp_v = someCredentials['v'] self.auth_version = someCredentials['version'] def update(self, someData): self.header = someData['header'] self.statistics = someData['statistics'] self.version = someData['version'] self.lock = someData['lock'] #------------------------------------------------------------------------------ class Record(db.Model): user = db.ReferenceProperty(User) reference = db.StringProperty() data = db.TextProperty() version = db.StringProperty() creation_date = db.DateTimeProperty(auto_now_add=True) update_date = db.DateTimeProperty(auto_now_add=True) access_date = db.DateTimeProperty(auto_now_add=True) #------------------------------------------------------------------------------ class RecordVersion(db.Model): record = db.ReferenceProperty(Record) reference = db.StringProperty() header = db.TextProperty() data = db.TextProperty() version = db.StringProperty() previousVersionKey = db.StringProperty() previousVersion = db.SelfReferenceProperty() creation_date = db.DateTimeProperty(auto_now_add=True) update_date = db.DateTimeProperty(auto_now_add=True) access_date = db.DateTimeProperty(auto_now_add=True) def update(self, someData): recordData = someData['record']; self.parent().reference = recordData['reference'] self.parent().data = recordData['data'] self.parent().version = recordData['version'] self.parent().update_date = datetime.datetime.now() recordVersionData = someData['currentRecordVersion']; self.reference = recordVersionData ['reference'] diff --git a/frontend/beta/css/clipperz/clipperz.css b/frontend/beta/css/clipperz/clipperz.css index f41dfad..31458c1 100644 --- a/frontend/beta/css/clipperz/clipperz.css +++ b/frontend/beta/css/clipperz/clipperz.css @@ -1,118 +1,116 @@ /* -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/. */ /* @override https://www.example.com/css/clipperz.css http://www.example.com/css/clipperz.css https://www.example.com/concurrency/css/clipperz.css https://www.clipperz.com/beta-connection/css/clipperz.css https://www.example.com/import/css/clipperz.css */ body { /* margin-left: 15px; margin-right: 15px;*/ background-color: white; color: black; font-family: Helvetica, Arial, Geneva, sans-serif; } table { /* width: 100%; */ } /* @group Header */ div#applicationVersionType { position: fixed; top: 0; left: 0; width: 120px; height: 120px; z-index: 99999; } div#applicationVersionType.readOnly { /* background: url(./images/read-only.png) no-repeat fixed -5px -8px; */ background: url(data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAI0AAACSCAYAAAB43knrAAAABGdBTUEAANbY1E9YMgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAABB8SURBVHja7J0LcFTlFcfPbh4bCAnPBCNIGIlOBEYaEWxxEKpFqGklYgWpQkXwAak6Sh07jshYHVumra1ioCLRSEBALQZHbGNAggpiAiIjUOQxJIMBNJFA3tlkc3vO9927e+8mIdm7j+TunjNzyd3Ncu/uvb+c8z/nO9+3NrCe2dUtCrdo3GLVrc+xZfbHrxpqfxTY3Fb+o7Jy5HLXCtxtwq0ZtxbcXLi10aYoiqkbEBbAHF9uX8rAtLfUwbZHCrOjJqvXK0q9fjZ/b0JYeJi0JPvvGZH29u05JXd6juurSISmc2CetT/BHqZjKy1TNqW/4Mr1AkaDxmYWHrvlgUm2P8J4tLed3yofTPyba4N63QIGjBWgYWBM2EeHlKKbV7q26CCxByIsWQEaBsaEFRxUdmX+y/Uh7ipqhqT91PbDFhoGxoS995Wy547XXYVqWq2l1i4dNBo4ij8A2RmY8LDN+5Uv73rDVaTWYvSb07s24y84dgbG+rZpn1Jy95uu7bjbgFu9+rMRZEFPg6ZVB47i701iYKwNTOncPNcO3K1Tt3ovcDRvE3bQMDAmbCN6GC9gaKvVwdPk5W1cgRDFdgbGusD8Ns/1iQpJjW7ToNF7Gm9RDFaGhoEJDjD68KTXNPoU3JLhKbTADBoLkLUh3IHx9jLODvRMm7/vITpSPMz30/Jg6JAxeLY4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SA/Sv8mvnIwEQCNAE0BiaMU24GhoUwA8NmLWgYGIaGgWFoGBiGhoFhsyI0DAxDw8AwNAwMWy+BhoFhaBgYhoaBYesl0DAwDA0Dw9AwMGy9BBoGhqFhYBgaBoatl0DDwDA0DAxb8KBhYBgaBoYteNAwMAwNA8MWPGgYGIbGJ1tfonzJwDA0PgEzb51rJwPD0DAwbIGHhoFhizYJTI0XNAwMexoGhs1PaBgYNp+gYWDYfIKGgWHzCRoGhs2n7EkF5hMdIAwMW+fQbChV9urqMAwM26WhebtU+eJe+V0DderGwLB1Ds2m/crn97zl2qFCUafzMnUMDFs7aP59QNk5901XEe426aDRw8LAsLnN9thU+8qXi9uO4z59L2mzCke9DpZ6BiZ8zdSK5bjRV6MoOmgadeA0MDAMTUfhqVq9+S4VmiYVEu0nA8PWITSKCoMGhwZPMwPD1hE0NTpoWtRNA0V7zMCwGaCpVaFpU+HQthYVFAaGrR009eq+S6dt9FsbA8PmDY323YCKDg5FB4zCwLB5Q+PUQaPfNFAYGLZ20LR6QQOdPGZjc0Pj8gKFje2SZjNTEWSLbLPzJWBjaNgYGjaGho2hYWNo2NgYGjaGho2hYWNo2BgaNjaGhi1A9n8BBgBfmCD4GUFjiQAAAABJRU5ErkJgggo=) no-repeat fixed -5px -8px; } div#applicationVersionType.TEST { /* background: url(./images/test-database.png) no-repeat fixed -5px -8px; */ background: url(data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAIMAAACGCAYAAAD+UDnVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADMlJREFUeNrtnX+MXFUVx99OaaFLwdIfKrTQym81hsQCmiiIYPUP+R0ggXSL0KYgBKMBUUn9QVJMTIx/dDet1EAT21qEQM1iirKEFrKBGlOpbBoK6Lqhu6CLTJ2hdKY7O3s9575777v3zczuzPs19807L/lm29lt3+bd7/vcc8499z3HSc/RBcqBZoNOBM0DnQb6BGj5m+udjWyjw0i1+udPnD64RmeBFo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9QIjIE2W3tf0EH7zvIeaudsC+SsoYOJANfdNIwf0xvbvG991Gtbu6+PnXPWSQyNL3o5O98zk2zAYZ6FjuODI2N4OtQwl5ImCaOyTSy1ecwWPKcRSJDC0bghSZtWlBviNWf4xjyvU5EBMvIoHZM4Ta3em1p2oDztBGbU0I+US2r7exWk8F4t+P4i7WFI9/OaFpr6FAyyFY13LiiDAFrDxN13iWlKpERvA4gy+3sVpLB36pmGMIXFFb1/Y/0DKXOIkOjVjXDEGLKMIxgwVpD2gfMKjLM1KpmGuIAm7Bo0YkYEKEZmm1Vq5kyyAidRYZWW9WUIcgIHUiGAK1qYVNJMkLK6gw2t6rRPd+GCiS1qhEZrG1Vo3u9zauW1KpGZKAYgchARiAykBGIDGQEIgMZgchARiAykBGIDGQEIkPiZiAjEBnICEQGMgKRgYxAZCAjEBnICEQGMgKRgYxAZCAjEBnICEQGMgKRgYxAZAhjBjICkYGMQGQgIxAZyAhEBjICkYGMQGQgI5DRmjADGYHIQEYgMnjavtp5lYxAZJBG2AD6IRkhw2TYebszCN97GPQDYYQeMkIGyfDkHc5e+Hw96AHQ3cII15ERMkSGZ9Y4z+9a6wzAZ/eD7gOtBd0GuhZ0JRkhQ2SAYx3oLtAa0CrQzaCrQVeALiYjZIgMYvBRNwoarARdBlpBRsgeGVYK4ZRwOeiLoItAF4CWkxGyRQaMCS4RUwKa4NOgc0FngT5ORsgWGS4UOh90DmgZ6HTQYtB8MkK2yLAUdCZoiZgSFgkanArqBs0hI2SHDAtAC4UB5gsTzAOdREbIHhlO1jRXTAn6tJAjI2SHDHM0zdZMIGlARsgQGWZpymkGIBNkjQxBX/tL6jzRRSCRGUi1+j+w3nFdxUGuNgAAAABJRU5ErkJgggo=) no-repeat fixed -5px -8px; } div#applicationVersionType.LIVE { display: none; visibility: hidden; } div#applicationVersionType.DEBUG { display: none; visibility: hidden; } div#header { background-color: #336; /* border-bottom: 8px solid #ff9400;*/ } div#logoFrame { /* float: left; */ /* height: 44px; */ min-height: 44px; background-color: #333366; } div#logoFrame > a { font-size: 12pt; } img#logo { padding-left: 15px; } h5.clipperzPayoff { color: white; font-size: 10pt; font-weight: normal; padding-left: 20px; display: inline; vertical-align: 7px; white-space: nowrap; } /* @group Misc links */ div#miscLinks { float: right; top: 0; right: 15px; } div#miscLinks ul { padding-top: 5px; padding-right: 3px; } diff --git a/frontend/beta/css/clipperz/compact.css b/frontend/beta/css/clipperz/compact.css index c6e8661..6ec0c71 100644 --- a/frontend/beta/css/clipperz/compact.css +++ b/frontend/beta/css/clipperz/compact.css @@ -1,118 +1,116 @@ /* -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/. */ /* @override https://www.example.com/css/compact.css */ body.compact div#mainDiv { /* width: 250px; height: 95%; border: 1px solid #333366; */ padding: 0px; } body.compact div#compactHeader { background-color: #333366; } body.compact div#compactHeader img { padding: 2px 20px 2px 4px; width: 60; } body.compact div#compactHeader a { color: white; text-decoration: none; font-size: 10pt; /* position: absolute; */ right: 10px; top: 6px; } body.compact div#compactHeader a:hover { color: #ff9400; } body.compact h4 { color: #999999; text-align: center; padding: 20px; font-weight: normal; font-size: 12pt; font-style: italic; } body.compact div.loginPanel form { padding: 10px; } body.compact div.loginPanel dt { color: #aaaaaa; font-size: 10pt; } body.compact div.loginPanel input { width: 180px; } body.compact ul#directLogins { background-image: none; padding: 4px 0px; } body.compact ul#directLogins li { width:auto; } body.compact ul#directLogins li.hover { width:auto; padding-right: 0px; } body.compact div.lockPanel { color: #999999; font-size: 10pt; padding: 10px; } div#compactMiscLinks ul { /* text-align: center; */ display: block; padding-left: 22px; background-color: #ff9400; } div#compactMiscLinks ul li { display: inline; padding: 2px 5px; } div#compactHeader div#compactMiscLinks ul li a { font-size: 9pt; } div#compactHeader div#compactMiscLinks ul li a:hover { color: #333366; diff --git a/frontend/beta/css/clipperz/ie.css b/frontend/beta/css/clipperz/ie.css index 99bf2d8..cfe7b4c 100644 --- a/frontend/beta/css/clipperz/ie.css +++ b/frontend/beta/css/clipperz/ie.css @@ -1,118 +1,116 @@ /* -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/. */ <!--[if IE]> <style> { background-color: white; } div#logoFrame { height: 44px; } div.clipperzLoginForm div.loginForm form { padding-left: 20px; } div.clipperzLoginForm div.registrationForm form { padding-left: 20px; } div#newRecordInnerPanel { width: 350px; height: 160px; background: url(./images/newRecordPanelBackground.png) no-repeat 0 -165px; /* background: url(data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAY4AAAFQCAYAAACoMJkjAAANIWlDQ1BJQ0MgUHJvZmlsZQAAeJyV13k0lG8bB/BrFsYyZhhjDyO7iLITskQi2feS7AwzMQkpS1KILKFoQWihKJGoqH5kSUghoajIkj1Llnn/kOr9nff3vue9/njO9dzPc859P885n+99bgC8miuVSkYCgH8ALdDSSI9k7+BIwnQCBnDAA1gQdnULouqam5vCP9Z8JyAAADrkXKlU8j+/9x8LF2jv4AiAkAUAotd6vxMAiIfWe2sAIB6lUWkACG8AILp5u7oDIMIBQDbQ2lIfAHEDAHBe630lAOAOrfcNAIALdvOiASC6ARgJAe4+AQCYcQBGbXePIDcAnCwAuLsHufkD4JIBwMzfn+IOgPsIAFJu1EAaAJ4JAOTsHRxJ60t2igdQ4gNgMvk9djQdoDwXQGrv7zHRBwDcrgB5ib/HZi0BAQAI7tYgT8XtAACAwOoBMPTT6bMSAJhUgNUUOn05j05fvQaA6gWoJbsdCQz++b8QiBaA/3W//s0/C4UAQAIgxBCFyDBUODqc4QRjJCaa6SSzAXMdy2nWM9g4trO4CnZvjhRCCmcq8TxXOnc6TyZvHT9FIHtTtuBloQbSEZG8zddEW8WPSRRKtkufkCna0ikXvfW2fM+209vvKX5QPqtSoTqgnqRRpTmklab9RGdUN0Pvmf7ErizDeqMZ46t7mkzm9+aZvdrXZt5m0W65Yn3L5q1tp12Xfbcj2umuc+/+vgP9Lh8OfjyEdXvo/tnji+eQ17D3V58RPy7yU/9vAROUSerU4enAmaA52tyR78HzR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UwzmKrRheZrsR/TjURxwlFjdiOMroxoR3j08ajvrt6t3Bh65qS3m/VPDG4IdZjP4opZzSKhPtggGwO/Vjb7mhr0x2b8Zw1NGuPW7E8PRUfW5jItOGoxOjo4V6AEpQbkZ/tLEQ/dHG3GC/zRiGI0I8AHZjp3Bsx3Duoow66ksJSolG/c+PpE1zqqrssFz/Ox6NUrZy3m0+huEoE+r1cIxvA4BR9VNV5VTTdm25GcN4lMf6neL1OY23NBxl5FGed2tL+UHKvEaZUC/zIvXTWxHCAXAn4wf8csqpPkFezvTcrD0v0Zh6tBExXTgi3vwD1N8rP0gr+sUr4RgfbYgFQF59grsEoYw8tmJ0PqN+6e3U/5Nj2nDE4IM0xj5IfXK8xKJ+v0f9aqrxuREAbm+nK6vKYznudnZYejHlKapilgfs8RDUT0eVWOw00nCaCmB3xv/7asTo9MBOIan//42p/g9HsRcH6/pVUuMhGf9afX0Adqc+ahi/PaL+OP71mdjL3/J3mvS+3aW7AOSNj0B2epxZMIr9PHg7JQWwd3Y6jQUAAAAAAAAAAAAAAAAAAAAAMK3/BX4vwOY3EngcAAAAAElFTkSuQmCCCg==) no-repeat 0 -165px; */ } img#donateHeaderIcon { padding-top: 0px; margin-bottom: 0px; } /* ========================================================== */ div#applicationVersionType { position: absolute; } div#applicationVersionType.readOnly { background: url(./images/read-only.png) no-repeat fixed -5px -8px; } div#applicationVersionType.TEST { background: url(./images/test-database.png) no-repeat fixed -5px -8px; } div#mainTabs { background: #ff9400 url(./images/menubarSprite.gif) repeat-x; } div#menus { background: url(./images/menubarSprite.gif) no-repeat right -26px; } div#menus table { background: url(./images/menubarSprite.gif) no-repeat 0 -52px; } div#menus table tbody tr td div { background: url(./images/menubarSprite.gif) no-repeat right -52px; } div#menus table tbody tr td div a { background: url(./images/menubarSprite.gif) no-repeat left -26px; } div#menus table tbody tr td.selectedTab { background: url(./images/menubarSprite.gif) repeat-x right -78px; } div#menus table tbody tr td.selectedTab div { background: url(./images/menubarSprite.gif) no-repeat right -130px; } div#menus table tbody tr td.selectedTab div a { background: url(./images/menubarSprite.gif) no-repeat left -104px; } div.clipperzLoginForm div.loginFormHeaderBox { background: url(./images/loginFormBox.png) no-repeat -3px top; } div.clipperzLoginForm div.loginForm { background: url(./images/loginFormBox.png) repeat-y -408px; } div.loginForm div.loginFormFooterBox { background: url(./images/loginFormBox.png) no-repeat -813px bottom; } div.clipperzLoginForm div.registrationForm { background: url(./images/loginFormBox.png) repeat-y -408px; } diff --git a/frontend/beta/css/clipperz/ytheme-clipperz.css b/frontend/beta/css/clipperz/ytheme-clipperz.css index ed71348..35a3f6c 100644 --- a/frontend/beta/css/clipperz/ytheme-clipperz.css +++ b/frontend/beta/css/clipperz/ytheme-clipperz.css @@ -1,118 +1,116 @@ /* -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/. */ /* @override
http://localhost:8080/pm-restyle/css/ytheme-clipperz.css
http://proxy/css/ytheme-clipperz.css
http://proxy/pm-497/css/ytheme-clipperz.css
https://www.example.com/css/ytheme-clipperz.css
*/
/* @group new Message dialog */
#mb-dlg .ext-mb-progress {
height:18px;
/* background:transparent url(./images/default/basic-dialog/progress2.gif) repeat-x 1px 1px; */
background:transparent url(data:image/gif;charset=utf-8;base64,R0lGODlhHwEPAPQAAICAgLrW8u70+/X4/Pj6/ff5/PD1+/P3/M3h9dHj9s/i9eDs+Ovy+ufw+uTu+cvg9bzX8t3q+Nvp98rf9MXc88Ha88bd9Nno99bm9tTl9gAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgAAACwAAAAAHwEPAAQF/2CGXaRlVRR1oqY1TZUpzVJk3xMEUW/vvpVY7UaMPB47Xu/1Ew6LttxuuTzJoLcjhPoDorBE5Jbbi1meUG2K6nOBcbpqF5Z6G5HsiQn2tYvzeid1b2pKbXxnIiQXJigqQSp7MDI0UFKGTGVChEhrZJMzb5eAVmecYz5LkHZGcZ+TpmCFpG52UnKqg7J4bHurfq69ghR+nZiBiBIODQwMC0EKCQkZ0tTSCAgUDczN3c0LzwrR1dLl2dre6Q4pR0fk5Qno6d3gFO3u7/Hb893rFOPlrElLwY2fg3X3HsDLQE1bwXn+7sG7RpBfs4MU8gUcuM/iAnbtJiY49zBdPXETGf+Wc2iRgb9xAss9qOit3YgLN28ysrDggM+fPw3Y1LloEc+eQA0Y+GmzqFMTSH0qBeqOYQSnRqNKBXqgKdYS4LgeWOpz6FewYrd2PUL0aVixU6tmuIoValqpQtmeZfQ2KVOFVr/avVtW79mjPmsazmmUJ+G8DzC0LYo4Kdm1kfcOxksV8NzDWsdy9Sq4b9C/kSdnvUuWdF3TQZfKpfvUMWvIqsGGFl142ue6tgm7dqs1SqUIlWb4LsC8ufMFRy4cpyGhmvPrBcA9mE69OkPsz6N3R658Gvjm2sd3N3+eOfTt6stnaJ8devfk3ulnFz8e+fL22pFwXw3W0ffegEP8d17/gNINWGBzeX113ARcEWChhUo9IGAo3e0E1IUXRhgfDRQeACKISk1wFnUvmH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WFCah2OX05a9putMzbqrXhvOhzVZl51p15YHln4o0U7GbzFlDJZ95fIG06lapypdhfCCRdg0NYwgC9bukA5C21hSSU4vPv0qq8UwLE6SzX8ViUsFE8kko5zyCcvcbBqOMNiW/6AMxgBLutf+ZIXA6UDv3f5r30TRM65LijB0/zJSQlsU6ymEr7pkC9h58vJwOz3E/apKwFpY0xV5Ic3+g2BhfgJGHD2ZxfHcPAAADSSCmOTrYOJy4CbSVYP38U2DMKwgcpiFr4UZEPYNMaCRqziih5YvqUI7IMyXNbt/ge+bKPoJD0i9Jrb3MMcrqARYY0zlYraM40BROghRUNZHe0YIAGRsHJnFAcfMwUUCZUxbe4YgB2Hp5+pnOyM3eHjwTJXENVg6SjTUIAi4cgyghxST2es4x0Jwis9atKO8UrQxxzZK4gMwE2qfEAIAAAh/h1CdWlsdCB3aXRoIEdJRiBNb3ZpZSBHZWFyIDQuMAAh/hVNYWRlIGJ5IEFqYXhMb2FkLmluZm8AOwo=) repeat-x 1px 1px;
}
.ydlg .ydlg-hd {
/* background: url(./images/clipperz/basic-dialog/hd-sprite.gif) repeat-x 0 -82px; */
background: url(data:image/gif;charset=utf-8;base64,R0lGODlhAwB7AIABADMzZv///yH5BAEAAAEALAAAAAADAHsAAAITBGKpy+0Po5y0Houz3rz7D4ZUAQA7Cg==) repeat-x 0 -82px;
background-color:navy;
color:#ffffff;
font:bold 12px "sans serif", Helvetica, Arial, Geneva, sans-serif;
overflow:hidden;
padding:5px;
}
.ydlg .ydlg-hd-left {
/* background: url(./images/clipperz/basic-dialog/hd-sprite.gif) no-repeat 0 -41px; */
background: url(data:image/gif;charset=utf-8;base64,R0lGODlhAwB7AIABADMzZv///yH5BAEAAAEALAAAAAADAHsAAAITBGKpy+0Po5y0Houz3rz7D4ZUAQA7Cg==) no-repeat 0 -41px;
padding-left:3px;
margin:0px;
}
.ydlg .ydlg-hd-right {
/* background: url(./images/clipperz/basic-dialog/hd-sprite.gif) no-repeat right 0; */
background: url(data:image/gif;charset=utf-8;base64,R0lGODlhAwB7AIABADMzZv///yH5BAEAAAEALAAAAAADAHsAAAITBGKpy+0Po5y0Houz3rz7D4ZUAQA7Cg==) no-repeat right 0;
padding-right:3px;
}
.ydlg .ydlg-dlg-body {
/* background:url(./images/clipperz/layout/gradient-bg.gif);*/
background-color: white;
border:1px solid #333366;
border-top:0 none;
padding:10px;
overflow:hidden;
}
/*
.ydlg .ydlg-dlg-body .ydlg-ft{
padding-top: 7px;
border-top: 1px dotted #333366;
}
*/
.ydlg .ydlg-close {
position:absolute;
top:4px;
right:4px;
z-index:6;
height:15px;
width:15px;
margin:0;
padding:0;
line-height:1px;
font-size:1px;
background-repeat:no-repeat;
cursor:pointer;
visibility:inherit;
/* background-image:url(./images/clipperz/basic-dialog/close.gif); */
background-image:url(data:image/gif;charset=utf-8;base64,R0lGODlhDwAPANUAADk1bpeVs5+dub27z+Df6LGvxo2KqzIyZdfW4jk0brq4zNbU4cTD1ImGqVZSg/f2+Y+MraKgu9/e6NjX4qyqwjIyZtrZ5Pn5+mZij0pGenx4n0A7c7Oxx8C/0XZzm/39/Tw3cLCvxX57obe1yrCuxX16oP///zMzZjYxbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAAAALAAAAAAPAA8AAAZ9wJNQSAgJKIuh8oTAoJ5PB2M5AEGvKMEQYcVeFUInqmSBoDyTwDNzIEAtJlPnY7oAngMSFBLvF6AGAlcdfRIJUBoUUB50fWpPDQtQE3EScQ93KBwnDk8BFwUJAQ8jTxsVJwxQmSisEUOCXk8iSwoZWBuvSycHAwYaDRyoQ0EAOwo=);
}
/* @end */
/* @group Message dialog */
div#mb-dlg div div div.ydlg-hd {
background-color: #35306b;
}
div#mb-dlg div.ydlg-dlg-body {
border-color: #333366;
}
div#mb-dlg div.ydlg-dlg-body span.ext-mb-text {
font-size: 10pt;
color: #999999;
}
div.ydlg-btns-center table tbody tr td {
text-align: center;
}
/* @end */
body .ybtn-left{
diff --git a/frontend/beta/js/Bookmarklet.js b/frontend/beta/js/Bookmarklet.js index 59f4fef..67e93f0 100644 --- a/frontend/beta/js/Bookmarklet.js +++ b/frontend/beta/js/Bookmarklet.js @@ -1,118 +1,116 @@ /* -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/. */ _cble = null; //----------------------------------------------------------------------------- isLoginForm = function(aForm) { var inputFields; var passwordFieldsFound; var i,c; //console.log('is login form: ' + aForm.name + ' (' + aForm.id + ')'); passwordFieldsFound = 0; inputFields = aForm.elements; c = inputFields.length; for (i=0; i<c; i++) { if (inputFields[i].type == 'password') { passwordFieldsFound ++; } } //console.log('number of password fields found: ' + passwordFieldsFound); return (passwordFieldsFound == 1); }; //----------------------------------------------------------------------------- findLoginForm = function(aDocument, aLevel) { var result; var documentForms; var i,c; result = null; try { documentForms = aDocument.getElementsByTagName('form'); c = documentForms.length; for (i=0; (i<c) && (result == null); i++) { if (isLoginForm(documentForms[i])) { result = documentForms[i]; } } if ((result == null) && (aLevel == 0)) { var iFrames; iFrames = aDocument.getElementsByTagName('iframe'); c = iFrames.length; for (i=0; (i<c) && (result == null); i++) { result = findLoginForm(iFrames[i].contentDocument, (aLevel + 1)); } } } catch (e) { _cble = e; } return result; }; //----------------------------------------------------------------------------- inputElementValues = function(anInputElement) { var result; // if ((anInputElement instanceof HTMLInputElement) && (anInputElement.getAttribute('name') != null)) { if ((anInputElement.tagName.toLowerCase() == 'input') && (anInputElement.getAttribute('name') != null)) { result = {}; result.type = anInputElement.getAttribute('type') || 'text'; result.name = anInputElement.getAttribute('name'); // result.value = anInputElement.getAttribute('value'); result.value = anInputElement.value; if (anInputElement.type.toLowerCase() == 'radio') { result.checked = anInputElement.checked; } // } else if ((anInputElement instanceof HTMLSelectElement) && (anInputElement.getAttribute('name') != null)) { } else if ((anInputElement.tagName.toLowerCase() == 'select') && (anInputElement.getAttribute('name') != null)) { var options; var c,i; //console.log('input element values: %o', anInputElement); result = {}; result.type = 'select'; result.name = anInputElement.getAttribute('name'); result.options = []; options = anInputElement.options; c = options.length; for (i=0; i<c; i++) { var option; option = {}; option.selected = options[i].selected; option.label = options[i].label || options[i].innerHTML; option.value = options[i].value; result.options.push(option); diff --git a/frontend/beta/js/BookmarkletHash.js b/frontend/beta/js/BookmarkletHash.js index 8661eaa..a92553c 100644 --- a/frontend/beta/js/BookmarkletHash.js +++ b/frontend/beta/js/BookmarkletHash.js @@ -1,44 +1,42 @@ /* -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/. */ // 18f820faffcdb5e847d4c5d5c4a1de6743baa1a0 // 9b30434c73fb009b15fecaa904b44f9ced807577 // 9b30434c73fb009b15fecaa904b44f9ced807577 var xh; var documentText; try { xh=new XMLHttpRequest(); } catch(e) { xh=new ActiveXObject("Msxml2.XMLHTTP"); } xh.open("GET", window.location, false); xh.send(null); documentText = "#####" + xh.responseText + "####"; //documentText = document.body.innerHTML; console.log(documentText);
\ No newline at end of file diff --git a/frontend/beta/js/Clipperz/Base.js b/frontend/beta/js/Clipperz/Base.js index 1c0504b..cf40314 100644 --- a/frontend/beta/js/Clipperz/Base.js +++ b/frontend/beta/js/Clipperz/Base.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.Base) == 'undefined') { Clipperz.Base = {}; } Clipperz.Base.VERSION = "0.1"; Clipperz.Base.NAME = "Clipperz.Base"; MochiKit.Base.update(Clipperz.Base, { //------------------------------------------------------------------------- '__repr__': function () { return "[" + this.NAME + " " + this.VERSION + "]"; }, //------------------------------------------------------------------------- 'toString': function () { return this.__repr__(); }, //------------------------------------------------------------------------- 'trim': function (aValue) { return aValue.replace(/^\s+|\s+$/g, ""); }, //------------------------------------------------------------------------- 'stringToByteArray': function (aValue) { var result; var i, c; result = []; c = aValue.length; for (i=0; i<c; i++) { result[i] = aValue.charCodeAt(i); } return result; }, //......................................................................... 'byteArrayToString': function (anArrayOfBytes) { var result; var i, c; result = ""; c = anArrayOfBytes.length; for (i=0; i<c; i++) { result += String.fromCharCode(anArrayOfBytes[i]); } return result; }, //------------------------------------------------------------------------- 'getValueForKeyInFormContent': function (aFormContent, aKey) { return aFormContent[1][MochiKit.Base.find(aFormContent[0], aKey)]; }, //------------------------------------------------------------------------- 'indexOfObjectInArray': function(anObject, anArray) { var result; var i, c; result = -1; c = anArray.length; for (i=0; ((i<c) && (result < 0)); i++) { if (anArray[i] === anObject) { result = i; } } return result; }, 'removeObjectAtIndexFromArray': function(anIndex, anArray) { anArray.splice(anIndex, 1); }, 'removeObjectFromArray': function(anObject, anArray) { var objectIndex; objectIndex = Clipperz.Base.indexOfObjectInArray(anObject, anArray); if (objectIndex > -1) { Clipperz.Base.removeObjectAtIndexFromArray(objectIndex, anArray); } else { diff --git a/frontend/beta/js/Clipperz/ByteArray.js b/frontend/beta/js/Clipperz/ByteArray.js index a69aa43..540563f 100644 --- a/frontend/beta/js/Clipperz/ByteArray.js +++ b/frontend/beta/js/Clipperz/ByteArray.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } //============================================================================= Clipperz.ByteArray_abstract = function(args) { return this; } Clipperz.ByteArray_abstract.prototype = MochiKit.Base.update(null, { //------------------------------------------------------------------------- 'toString': function() { return "Clipperz.ByteArray_abstract"; }, //------------------------------------------------------------------------- 'equals': function(aValue) { return (this.compare(aValue) == 0); }, //------------------------------------------------------------------------- 'compare': function(aValue) { var result; var i; result = MochiKit.Base.compare(this.length(), aValue.length()); i = this.length(); while ((result == 0) && (i>0)) { i--; result = MochiKit.Base.compare(this.byteAtIndex(i), aValue.byteAtIndex(i)); } return result; }, //------------------------------------------------------------------------- 'clone': function() { throw Clipperz.Base.exception.AbstractMethod; }, //------------------------------------------------------------------------- 'newInstance': function() { throw Clipperz.Base.exception.AbstractMethod; }, //------------------------------------------------------------------------- 'reset': function() { throw Clipperz.Base.exception.AbstractMethod; }, //------------------------------------------------------------------------- 'length': function() { throw Clipperz.Base.exception.AbstractMethod; }, //------------------------------------------------------------------------- 'checkValue': function(aValue) { if ((aValue & 0xff) != aValue) { MochiKit.Logging.logError("Clipperz.ByteArray.appendByte: the provided value (0x" + aValue.toString(16) + ") is not a byte value."); throw Clipperz.ByteArray.exception.InvalidValue; } }, //------------------------------------------------------------------------- 'xorMergeWithBlock': function(aBlock, anAllignment, paddingMode) { var result; var a, b; var aLength; var bLength; var i, c; if (this.length() > aBlock.length()) { a = this; b = aBlock; } else { a = aBlock; b = this; } aLength = a.length(); bLength = b.length(); if (aLength != bLength) { diff --git a/frontend/beta/js/Clipperz/CSVProcessor.js b/frontend/beta/js/Clipperz/CSVProcessor.js index ec94206..f429468 100644 --- a/frontend/beta/js/Clipperz/CSVProcessor.js +++ b/frontend/beta/js/Clipperz/CSVProcessor.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } Clipperz.CSVProcessor = function(args) { args = args || {}; // this._status = undefined; // this._error_input = undefined; // this._string = undefined; // this._fields = undefined; this._quoteChar = args['quoteChar'] || "\042"; this._eol = args['eol'] || ""; this._escapeChar = args['escapeChar'] || "\042"; this._separatorChar = args['separatorChar'] || ","; this._binary = args['binary'] || false; this._alwaysQuote = args['alwaysQuote'] || false; return this; } //============================================================================= Clipperz.CSVProcessor.prototype = MochiKit.Base.update(null, { //------------------------------------------------------------------------- 'quoteChar': function() { return this._quoteChar; }, //------------------------------------------------------------------------- 'eol': function() { return this._eol; }, //------------------------------------------------------------------------- 'escapeChar': function() { return this._escapeChar; }, //------------------------------------------------------------------------- 'separatorChar': function() { return this._separatorChar; }, 'setSeparatorChar': function(aValue) { this._separatorChar = aValue; }, //------------------------------------------------------------------------- 'binary': function() { return this._binary; }, //------------------------------------------------------------------------- 'alwaysQuote': function() { return this._alwaysQuote; }, //------------------------------------------------------------------------- /* 'parse': function(aValue) { var result; var lines; var parameter; //MochiKit.Logging.logDebug(">>> CSVProcessor.parse"); result = []; lines = aValue.replace(/\r?\n/g, "\n").replace(/^\n* /g, "").replace(/\n$/g, "");; parameter = { line: lines } do { var fields; fields = this.parseLine(parameter); if (fields != null) { result.push(fields); } parameter.line = parameter.line.replace(/^\n* /g, "").replace(/\n$/g, ""); //MochiKit.Logging.logDebug("line: '" + parameter.line + "'"); } while (parameter.line != ""); diff --git a/frontend/beta/js/Clipperz/Crypto/AES.js b/frontend/beta/js/Clipperz/Crypto/AES.js index 7ddda3e..a5c63fb 100644 --- a/frontend/beta/js/Clipperz/Crypto/AES.js +++ b/frontend/beta/js/Clipperz/Crypto/AES.js @@ -1,118 +1,116 @@ /* -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/. */ try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.AES depends on Clipperz.ByteArray!"; } // Dependency commented to avoid a circular reference //try { if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { throw ""; }} catch (e) { // throw "Clipperz.Crypto.AES depends on Clipperz.Crypto.PRNG!"; //} if (typeof(Clipperz.Crypto.AES) == 'undefined') { Clipperz.Crypto.AES = {}; } //############################################################################# Clipperz.Crypto.AES.DeferredExecutionContext = function(args) { args = args || {}; this._key = args.key; this._message = args.message; this._result = args.message.clone(); this._nonce = args.nonce; this._messageLength = this._message.length(); this._messageArray = this._message.arrayValues(); this._resultArray = this._result.arrayValues(); this._nonceArray = this._nonce.arrayValues(); this._executionStep = 0; return this; } Clipperz.Crypto.AES.DeferredExecutionContext.prototype = MochiKit.Base.update(null, { 'key': function() { return this._key; }, 'message': function() { return this._message; }, 'messageLength': function() { return this._messageLength; }, 'result': function() { return new Clipperz.ByteArray(this.resultArray()); }, 'nonce': function() { return this._nonce; }, 'messageArray': function() { return this._messageArray; }, 'resultArray': function() { return this._resultArray; }, 'nonceArray': function() { return this._nonceArray; }, 'elaborationChunkSize': function() { return Clipperz.Crypto.AES.DeferredExecution.chunkSize; }, 'executionStep': function() { return this._executionStep; }, 'setExecutionStep': function(aValue) { this._executionStep = aValue; }, 'pause': function(aValue) { return MochiKit.Async.wait(Clipperz.Crypto.AES.DeferredExecution.pauseTime, aValue); }, //----------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); //############################################################################# Clipperz.Crypto.AES.Key = function(args) { args = args || {}; this._key = args.key; this._keySize = args.keySize || this.key().length(); diff --git a/frontend/beta/js/Clipperz/Crypto/Base.js b/frontend/beta/js/Clipperz/Crypto/Base.js index d3a8e36..9acfc49 100644 --- a/frontend/beta/js/Clipperz/Crypto/Base.js +++ b/frontend/beta/js/Clipperz/Crypto/Base.js @@ -1,118 +1,116 @@ /* -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/. */ try { if (typeof(Clipperz.Base) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.Base depends on Clipperz.Base!"; } if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } if (typeof(Clipperz.Crypto.Base) == 'undefined') { Clipperz.Crypto.Base = {}; } Clipperz.Crypto.Base.VERSION = "0.1"; Clipperz.Crypto.Base.NAME = "Clipperz.Crypto.Base"; //############################################################################# // Downloaded on March 30, 2006 from http://anmar.eu.org/projects/jssha2/files/jssha2-0.3.zip (jsSha2/sha256.js) //############################################################################# /* A JavaScript implementation of the Secure Hash Algorithm, SHA-256 * Version 0.3 Copyright Angel Marin 2003-2004 - http://anmar.eu.org/ * Distributed under the BSD License * Some bits taken from Paul Johnston's SHA-1 implementation */ var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ function safe_add (x, y) { var lsw = (x & 0xFFFF) + (y & 0xFFFF); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xFFFF); } function S (X, n) {return ( X >>> n ) | (X << (32 - n));} function R (X, n) {return ( X >>> n );} function Ch(x, y, z) {return ((x & y) ^ ((~x) & z));} function Maj(x, y, z) {return ((x & y) ^ (x & z) ^ (y & z));} function Sigma0256(x) {return (S(x, 2) ^ S(x, 13) ^ S(x, 22));} function Sigma1256(x) {return (S(x, 6) ^ S(x, 11) ^ S(x, 25));} function Gamma0256(x) {return (S(x, 7) ^ S(x, 18) ^ R(x, 3));} function Gamma1256(x) {return (S(x, 17) ^ S(x, 19) ^ R(x, 10));} function core_sha256 (m, l) { var K = new Array(0x428A2F98,0x71374491,0xB5C0FBCF,0xE9B5DBA5,0x3956C25B,0x59F111F1,0x923F82A4,0xAB1C5ED5,0xD807AA98,0x12835B01,0x243185BE,0x550C7DC3,0x72BE5D74,0x80DEB1FE,0x9BDC06A7,0xC19BF174,0xE49B69C1,0xEFBE4786,0xFC19DC6,0x240CA1CC,0x2DE92C6F,0x4A7484AA,0x5CB0A9DC,0x76F988DA,0x983E5152,0xA831C66D,0xB00327C8,0xBF597FC7,0xC6E00BF3,0xD5A79147,0x6CA6351,0x14292967,0x27B70A85,0x2E1B2138,0x4D2C6DFC,0x53380D13,0x650A7354,0x766A0ABB,0x81C2C92E,0x92722C85,0xA2BFE8A1,0xA81A664B,0xC24B8B70,0xC76C51A3,0xD192E819,0xD6990624,0xF40E3585,0x106AA070,0x19A4C116,0x1E376C08,0x2748774C,0x34B0BCB5,0x391C0CB3,0x4ED8AA4A,0x5B9CCA4F,0x682E6FF3,0x748F82EE,0x78A5636F,0x84C87814,0x8CC70208,0x90BEFFFA,0xA4506CEB,0xBEF9A3F7,0xC67178F2); var HASH = new Array(0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19); var W = new Array(64); var a, b, c, d, e, f, g, h, i, j; var T1, T2; /* append padding */ m[l >> 5] |= 0x80 << (24 - l % 32); m[((l + 64 >> 9) << 4) + 15] = l; for ( var i = 0; i<m.length; i+=16 ) { a = HASH[0]; b = HASH[1]; c = HASH[2]; d = HASH[3]; e = HASH[4]; f = HASH[5]; g = HASH[6]; h = HASH[7]; for ( var j = 0; j<64; j++) { if (j < 16) W[j] = m[j + i]; else W[j] = safe_add(safe_add(safe_add(Gamma1256(W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]); T1 = safe_add(safe_add(safe_add(safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]); T2 = safe_add(Sigma0256(a), Maj(a, b, c)); h = g; g = f; f = e; e = safe_add(d, T1); d = c; c = b; b = a; a = safe_add(T1, T2); } HASH[0] = safe_add(a, HASH[0]); HASH[1] = safe_add(b, HASH[1]); HASH[2] = safe_add(c, HASH[2]); HASH[3] = safe_add(d, HASH[3]); HASH[4] = safe_add(e, HASH[4]); HASH[5] = safe_add(f, HASH[5]); HASH[6] = safe_add(g, HASH[6]); HASH[7] = safe_add(h, HASH[7]); } return HASH; } function str2binb (str) { var bin = Array(); var mask = (1 << chrsz) - 1; for(var i = 0; i < str.length * chrsz; i += chrsz) bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - i%32); return bin; } function binb2hex (binarray) { var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; var str = ""; for (var i = 0; i < binarray.length * 4; i++) { str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) + hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8 )) & 0xF); } return str; } function hex_sha256(s){return binb2hex(core_sha256(str2binb(s),s.length * chrsz));} //############################################################################# // Downloaded on March 30, 2006 from http://www.fourmilab.ch/javascrypt/javascrypt.zip (entropy.js) //############################################################################# // Entropy collection utilities /* Start by declaring static storage and initialise the entropy vector from the time we come through here. */ var entropyData = new Array(); // Collected entropy data var edlen = 0; // Keyboard array data length addEntropyTime(); // Start entropy collection with page load time ce(); // Roll milliseconds into initial entropy // Add a byte to the entropy vector diff --git a/frontend/beta/js/Clipperz/Crypto/BigInt.js b/frontend/beta/js/Clipperz/Crypto/BigInt.js index 41483a3..197cd9a 100644 --- a/frontend/beta/js/Clipperz/Crypto/BigInt.js +++ b/frontend/beta/js/Clipperz/Crypto/BigInt.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } //############################################################################# // Downloaded on March 05, 2007 from http://www.leemon.com/crypto/BigInt.js //############################################################################# //////////////////////////////////////////////////////////////////////////////////////// // Big Integer Library v. 5.0 // Created 2000, last modified 2006 // Leemon Baird // www.leemon.com // // This file is public domain. You can use it for any purpose without restriction. // I do not guarantee that it is correct, so use it at your own risk. If you use // it for something interesting, I'd appreciate hearing about it. If you find // any bugs or make any improvements, I'd appreciate hearing about those too. // It would also be nice if my name and address were left in the comments. // But none of that is required. // // This code defines a bigInt library for arbitrary-precision integers. // A bigInt is an array of integers storing the value in chunks of bpe bits, // little endian (buff[0] is the least significant word). // Negative bigInts are stored two's complement. // Some functions assume their parameters have at least one leading zero element. // Functions with an underscore at the end of the name have unpredictable behavior in case of overflow, // so the caller must make sure overflow won't happen. // For each function where a parameter is modified, that same // variable must not be used as another argument too. // So, you cannot square x by doing multMod_(x,x,n). // You must use squareMod_(x,n) instead, or do y=dup(x); multMod_(x,y,n). // // These functions are designed to avoid frequent dynamic memory allocation in the inner loop. // For most functions, if it needs a BigInt as a local variable it will actually use // a global, and will only allocate to it when it's not the right size. This ensures // that when a function is called repeatedly with same-sized parameters, it only allocates // memory on the first call. // // Note that for cryptographic purposes, the calls to Math.random() must // be replaced with calls to a better pseudorandom number generator. // // In the following, "bigInt" means a bigInt with at least one leading zero element, // and "integer" means a nonnegative integer less than radix. In some cases, integer // can be negative. Negative bigInts are 2s complement. // // The following functions do not modify their inputs, but dynamically allocate memory every time they are called: // // function bigInt2str(x,base) //convert a bigInt into a string in a given base, from base 2 up to base 95 // function dup(x) //returns a copy of bigInt x // function findPrimes(n) //return array of all primes less than integer n // function int2bigInt(t,n,m) //convert integer t to a bigInt with at least n bits and m array elements // function int2bigInt(s,b,n,m) //convert string s in base b to a bigInt with at least n bits and m array elements // function trim(x,k) //return a copy of x with exactly k leading zero elements // // The following functions do not modify their inputs, so there is never a problem with the result being too big: // // function bitSize(x) //returns how many bits long the bigInt x is, not counting leading zeros // function equals(x,y) //is the bigInt x equal to the bigint y? // function equalsInt(x,y) //is bigint x equal to integer y? // function greater(x,y) //is x>y? (x and y are nonnegative bigInts) // function greaterShift(x,y,shift)//is (x <<(shift*bpe)) > y? // function isZero(x) //is the bigInt x equal to zero? // function millerRabin(x,b) //does one round of Miller-Rabin base integer b say that bigInt x is possibly prime (as opposed to definitely composite)? // function modInt(x,n) //return x mod n for bigInt x and integer n. // function negative(x) //is bigInt x negative? // // The following functions do not modify their inputs, but allocate memory and call functions with underscores // // function add(x,y) //return (x+y) for bigInts x and y. // function addInt(x,n) //return (x+n) where x is a bigInt and n is an integer. // function expand(x,n) //return a copy of x with at least n elements, adding leading zeros if needed // function inverseMod(x,n) //return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null // function mod(x,n) //return a new bigInt equal to (x mod n) for bigInts x and n. // function mult(x,y) //return x*y for bigInts x and y. This is faster when y<x. // function multMod(x,y,n) //return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x. // function powMod(x,y,n) //return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n. // function randTruePrime(k) //return a new, random, k-bit, true prime using Maurer's algorithm. // function sub(x,y) //return (x-y) for bigInts x and y. Negative answers will be 2s complement // // The following functions write a bigInt result to one of the parameters, but // the result is never bigger than the original, so there can't be overflow problems: // // function divInt_(x,n) //do x=floor(x/n) for bigInt x and integer n, and return the remainder // function GCD_(x,y) //set x to the greatest common divisor of bigInts x and y, (y is destroyed). // function halve_(x) //do x=floor(|x|/2)*sgn(x) for bigInt x in 2's complement // function mod_(x,n) //do x=x mod n for bigInts x and n. // function rightShift_(x,n) //right shift bigInt x by n bits. 0 <= n < bpe. // // The following functions write a bigInt result to one of the parameters. The caller is responsible for // ensuring it is large enough to hold the result. // // function addInt_(x,n) //do x=x+n where x is a bigInt and n is an integer diff --git a/frontend/beta/js/Clipperz/Crypto/BigInt_scoped.js b/frontend/beta/js/Clipperz/Crypto/BigInt_scoped.js index f91c7e9..bc60330 100644 --- a/frontend/beta/js/Clipperz/Crypto/BigInt_scoped.js +++ b/frontend/beta/js/Clipperz/Crypto/BigInt_scoped.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } if (typeof(Leemon) == 'undefined') { Leemon = {}; } if (typeof(Baird.Crypto) == 'undefined') { Baird.Crypto = {}; } if (typeof(Baird.Crypto.BigInt) == 'undefined') { Baird.Crypto.BigInt = {}; } //############################################################################# // Downloaded on March 05, 2007 from http://www.leemon.com/crypto/BigInt.js //############################################################################# //////////////////////////////////////////////////////////////////////////////////////// // Big Integer Library v. 5.0 // Created 2000, last modified 2006 // Leemon Baird // www.leemon.com // // This file is public domain. You can use it for any purpose without restriction. // I do not guarantee that it is correct, so use it at your own risk. If you use // it for something interesting, I'd appreciate hearing about it. If you find // any bugs or make any improvements, I'd appreciate hearing about those too. // It would also be nice if my name and address were left in the comments. // But none of that is required. // // This code defines a bigInt library for arbitrary-precision integers. // A bigInt is an array of integers storing the value in chunks of bpe bits, // little endian (buff[0] is the least significant word). // Negative bigInts are stored two's complement. // Some functions assume their parameters have at least one leading zero element. // Functions with an underscore at the end of the name have unpredictable behavior in case of overflow, // so the caller must make sure overflow won't happen. // For each function where a parameter is modified, that same // variable must not be used as another argument too. // So, you cannot square x by doing multMod_(x,x,n). // You must use squareMod_(x,n) instead, or do y=dup(x); multMod_(x,y,n). // // These functions are designed to avoid frequent dynamic memory allocation in the inner loop. // For most functions, if it needs a BigInt as a local variable it will actually use // a global, and will only allocate to it when it's not the right size. This ensures // that when a function is called repeatedly with same-sized parameters, it only allocates // memory on the first call. // // Note that for cryptographic purposes, the calls to Math.random() must // be replaced with calls to a better pseudorandom number generator. // // In the following, "bigInt" means a bigInt with at least one leading zero element, // and "integer" means a nonnegative integer less than radix. In some cases, integer // can be negative. Negative bigInts are 2s complement. // // The following functions do not modify their inputs, but dynamically allocate memory every time they are called: // // function bigInt2str(x,base) //convert a bigInt into a string in a given base, from base 2 up to base 95 // function dup(x) //returns a copy of bigInt x // function findPrimes(n) //return array of all primes less than integer n // function int2bigInt(t,n,m) //convert integer t to a bigInt with at least n bits and m array elements // function str2bigInt(s,b,n,m) //convert string s in base b to a bigInt with at least n bits and m array elements // function trim(x,k) //return a copy of x with exactly k leading zero elements // // The following functions do not modify their inputs, so there is never a problem with the result being too big: // // function bitSize(x) //returns how many bits long the bigInt x is, not counting leading zeros // function equals(x,y) //is the bigInt x equal to the bigint y? // function equalsInt(x,y) //is bigint x equal to integer y? // function greater(x,y) //is x>y? (x and y are nonnegative bigInts) // function greaterShift(x,y,shift)//is (x <<(shift*bpe)) > y? // function isZero(x) //is the bigInt x equal to zero? // function millerRabin(x,b) //does one round of Miller-Rabin base integer b say that bigInt x is possibly prime (as opposed to definitely composite)? // function modInt(x,n) //return x mod n for bigInt x and integer n. // function negative(x) //is bigInt x negative? // // The following functions do not modify their inputs, but allocate memory and call functions with underscores // // function add(x,y) //return (x+y) for bigInts x and y. // function addInt(x,n) //return (x+n) where x is a bigInt and n is an integer. // function expand(x,n) //return a copy of x with at least n elements, adding leading zeros if needed // function inverseMod(x,n) //return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null // function mod(x,n) //return a new bigInt equal to (x mod n) for bigInts x and n. // function mult(x,y) //return x*y for bigInts x and y. This is faster when y<x. // function multMod(x,y,n) //return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x. // function powMod(x,y,n) //return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n. // function randTruePrime(k) //return a new, random, k-bit, true prime using Maurer's algorithm. // function sub(x,y) //return (x-y) for bigInts x and y. Negative answers will be 2s complement // // The following functions write a bigInt result to one of the parameters, but // the result is never bigger than the original, so there can't be overflow problems: // // function divInt_(x,n) //do x=floor(x/n) for bigInt x and integer n, and return the remainder // function GCD_(x,y) //set x to the greatest common divisor of bigInts x and y, (y is destroyed). // function halve_(x) //do x=floor(|x|/2)*sgn(x) for bigInt x in 2's complement // function mod_(x,n) //do x=x mod n for bigInts x and n. // function rightShift_(x,n) //right shift bigInt x by n bits. 0 <= n < bpe. // diff --git a/frontend/beta/js/Clipperz/Crypto/ECC.js b/frontend/beta/js/Clipperz/Crypto/ECC.js index bdfd9be..74eb02f 100644 --- a/frontend/beta/js/Clipperz/Crypto/ECC.js +++ b/frontend/beta/js/Clipperz/Crypto/ECC.js @@ -1,118 +1,116 @@ /* -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/. */ /* try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; } if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } //############################################################################# Clipperz.Crypto.ECC.BinaryField = {}; //############################################################################# Clipperz.Crypto.ECC.BinaryField.AbstractValue = function(aValue, aBase) { return this; } Clipperz.Crypto.ECC.BinaryField.AbstractValue.prototype = MochiKit.Base.update(null, { 'asString': function(aBase) { throw Clipperz.Base.exception.AbstractMethod; }, 'isZero': function() { throw Clipperz.Base.exception.AbstractMethod; }, 'shiftLeft': function(aNumberOfBitsToShift) { throw Clipperz.Base.exception.AbstractMethod; }, 'bitSize': function() { throw Clipperz.Base.exception.AbstractMethod; }, 'isBitSet': function(aBitPosition) { throw Clipperz.Base.exception.AbstractMethod; }, 'xor': function(aValue) { throw Clipperz.Base.exception.AbstractMethod; }, 'compare': function(aValue) { throw Clipperz.Base.exception.AbstractMethod; }, //----------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); //***************************************************************************** / * Clipperz.Crypto.ECC.BinaryField.BigIntValue = function(aValue, aBase) { this._value = new Clipperz.Crypto.BigInt(aValue, aBase); return this; } Clipperz.Crypto.ECC.BinaryField.BigIntValue.prototype = MochiKit.Base.update(new Clipperz.Crypto.ECC.BinaryField.AbstractValue(), { 'value': function() { return this._value; }, //----------------------------------------------------------------------------- 'isZero': function() { return (this.value().compare(Clipperz.Crypto.ECC.BinaryField.BigIntValue.O) == 0); }, //----------------------------------------------------------------------------- 'asString': function(aBase) { return this.value().asString(aBase); }, //----------------------------------------------------------------------------- 'shiftLeft': function(aNumberOfBitsToShift) { return new Clipperz.Crypto.ECC.BinaryField.BigIntValue(this.value().shiftLeft(aNumberOfBitsToShift)); }, //----------------------------------------------------------------------------- 'bitSize': function() { return this.value().bitSize(); }, //----------------------------------------------------------------------------- 'isBitSet': function(aBitPosition) { return this.value().isBitSet(aBitPosition); diff --git a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Curve.js b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Curve.js index 01127c3..c39a075 100644 --- a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Curve.js +++ b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Curve.js @@ -1,118 +1,116 @@ /* -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/. */ try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; } if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; } Clipperz.Crypto.ECC.BinaryField.Curve = function(args) { args = args || {}; this._modulus = args.modulus; this._a = args.a; this._b = args.b; this._G = args.G; this._r = args.r; this._h = args.h; this._finiteField = null; return this; } Clipperz.Crypto.ECC.BinaryField.Curve.prototype = MochiKit.Base.update(null, { 'asString': function() { return "Clipperz.Crypto.ECC.BinaryField.Curve"; }, //----------------------------------------------------------------------------- 'modulus': function() { return this._modulus; }, 'a': function() { return this._a; }, 'b': function() { return this._b; }, 'G': function() { return this._G; }, 'r': function() { return this._r; }, 'h': function() { return this._h; }, //----------------------------------------------------------------------------- 'finiteField': function() { if (this._finiteField == null) { this._finiteField = new Clipperz.Crypto.ECC.BinaryField.FiniteField({modulus:this.modulus()}) } return this._finiteField; }, //----------------------------------------------------------------------------- 'negate': function(aPointA) { var result; result = new Clipperz.Crypto.ECC.Point({x:aPointA.x(), y:this.finiteField().add(aPointA.y(), aPointA.x())}) return result; }, //----------------------------------------------------------------------------- 'add': function(aPointA, aPointB) { var result; //console.log(">>> ECC.BinaryField.Curve.add"); if (aPointA.isZero()) { //console.log("--- pointA == zero"); result = aPointB; } else if (aPointB.isZero()) { //console.log("--- pointB == zero"); result = aPointA; } else if ( (aPointA.x().compare(aPointB.x()) == 0) && ((aPointA.y().compare(aPointB.y()) != 0) || aPointB.x().isZero())) { //console.log("compare A.x - B.x: ", aPointA.x().compare(aPointB.x())); //console.log("compare A.y - B.y: ", (aPointA.y().compare(aPointB.y()) != 0)); //console.log("compare B.x.isZero(): ", aPointB.x().isZero()); //console.log("--- result = zero"); result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O}); diff --git a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js index 650b479..de1e6a8 100644 --- a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js +++ b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js @@ -1,118 +1,116 @@ /* -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/. */ try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; } if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; } Clipperz.Crypto.ECC.BinaryField.FiniteField = function(args) { args = args || {}; this._modulus = args.modulus; return this; } Clipperz.Crypto.ECC.BinaryField.FiniteField.prototype = MochiKit.Base.update(null, { 'asString': function() { return "Clipperz.Crypto.ECC.BinaryField.FiniteField (" + this.modulus().asString() + ")"; }, //----------------------------------------------------------------------------- 'modulus': function() { return this._modulus; }, //----------------------------------------------------------------------------- '_module': function(aValue) { var result; var modulusComparison; //console.log(">>> binaryField.finiteField.(standard)module"); modulusComparison = Clipperz.Crypto.ECC.BinaryField.Value._compare(aValue, this.modulus()._value); if (modulusComparison < 0) { result = aValue; } else if (modulusComparison == 0) { result = [0]; } else { var modulusBitSize; var resultBitSize; result = aValue; modulusBitSize = this.modulus().bitSize(); resultBitSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(result); while (resultBitSize >= modulusBitSize) { Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(this.modulus()._value, resultBitSize - modulusBitSize)); resultBitSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(result); } } //console.log("<<< binaryField.finiteField.(standard)module"); return result; }, 'module': function(aValue) { return new Clipperz.Crypto.ECC.BinaryField.Value(this._module(aValue._value.slice(0))); }, //----------------------------------------------------------------------------- '_add': function(a, b) { return Clipperz.Crypto.ECC.BinaryField.Value._xor(a, b); }, '_overwriteAdd': function(a, b) { Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(a, b); }, 'add': function(a, b) { return new Clipperz.Crypto.ECC.BinaryField.Value(this._add(a._value, b._value)); }, //----------------------------------------------------------------------------- 'negate': function(aValue) { return aValue.clone(); }, //----------------------------------------------------------------------------- '_multiply': function(a, b) { var result; var valueToXor; var i,c; result = [0]; valueToXor = b; c = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(a); for (i=0; i<c; i++) { if (Clipperz.Crypto.ECC.BinaryField.Value._isBitSet(a, i) === true) { Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, valueToXor); diff --git a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Point.js b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Point.js index 6661839..c5db6c6 100644 --- a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Point.js +++ b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Point.js @@ -1,64 +1,62 @@ /* -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/. */ try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; } if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; } Clipperz.Crypto.ECC.BinaryField.Point = function(args) { args = args || {}; this._x = args.x; this._y = args.y; return this; } Clipperz.Crypto.ECC.BinaryField.Point.prototype = MochiKit.Base.update(null, { 'asString': function() { return "Clipperz.Crypto.ECC.BinaryField.Point (" + this.x() + ", " + this.y() + ")"; }, //----------------------------------------------------------------------------- 'x': function() { return this._x; }, 'y': function() { return this._y; }, //----------------------------------------------------------------------------- 'isZero': function() { return (this.x().isZero() && this.y().isZero()) }, //----------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Value.js b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Value.js index b5beafa..278c299 100644 --- a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Value.js +++ b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Value.js @@ -1,118 +1,116 @@ /* -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/. */ try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; } if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; } Clipperz.Crypto.ECC.BinaryField.Value = function(aValue, aBase) { if (aValue.constructor == String) { var value; var stringLength; var numberOfWords; var i,c; if (aBase != 16) { throw Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedBase; } value = aValue.replace(/ /g, ''); stringLength = value.length; numberOfWords = Math.ceil(stringLength / 8); this._value = new Array(numberOfWords); c = numberOfWords; for (i=0; i<c; i++) { var word; if (i < (c-1)) { word = parseInt(value.substr(stringLength-((i+1)*8), 8), 16); } else { word = parseInt(value.substr(0, stringLength-(i*8)), 16); } this._value[i] = word; } } else if (aValue.constructor == Array) { var itemsToCopy; itemsToCopy = aValue.length; while (aValue[itemsToCopy - 1] == 0) { itemsToCopy --; } this._value = aValue.slice(0, itemsToCopy); } else if (aValue.constructor == Number) { this._value = [aValue]; } else { // throw Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedConstructorValueType; } return this; } Clipperz.Crypto.ECC.BinaryField.Value.prototype = MochiKit.Base.update(null, { 'value': function() { return this._value; }, //----------------------------------------------------------------------------- 'wordSize': function() { return this._value.length }, //----------------------------------------------------------------------------- 'clone': function() { return new Clipperz.Crypto.ECC.BinaryField.Value(this._value.slice(0)); }, //----------------------------------------------------------------------------- 'isZero': function() { return (this.compare(Clipperz.Crypto.ECC.BinaryField.Value.O) == 0); }, //----------------------------------------------------------------------------- 'asString': function(aBase) { var result; var i,c; if (aBase != 16) { throw Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedBase; } result = ""; c = this.wordSize(); for (i=0; i<c; i++) { var wordAsString; // wordAsString = ("00000000" + this.value()[i].toString(16)); wordAsString = ("00000000" + this._value[i].toString(16)); diff --git a/frontend/beta/js/Clipperz/Crypto/PRNG.js b/frontend/beta/js/Clipperz/Crypto/PRNG.js index 39d0045..b5c3f8a 100644 --- a/frontend/beta/js/Clipperz/Crypto/PRNG.js +++ b/frontend/beta/js/Clipperz/Crypto/PRNG.js @@ -1,118 +1,116 @@ /* -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/. */ try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.PRNG depends on Clipperz.ByteArray!"; } try { if (typeof(Clipperz.Crypto.SHA) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.PRNG depends on Clipperz.Crypto.SHA!"; } try { if (typeof(Clipperz.Crypto.AES) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.PRNG depends on Clipperz.Crypto.AES!"; } if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { Clipperz.Crypto.PRNG = {}; } //############################################################################# Clipperz.Crypto.PRNG.EntropyAccumulator = function(args) { args = args || {}; // MochiKit.Base.bindMethods(this); this._stack = new Clipperz.ByteArray(); this._maxStackLengthBeforeHashing = args.maxStackLengthBeforeHashing || 256; return this; } Clipperz.Crypto.PRNG.EntropyAccumulator.prototype = MochiKit.Base.update(null, { 'toString': function() { return "Clipperz.Crypto.PRNG.EntropyAccumulator"; }, //------------------------------------------------------------------------- 'stack': function() { return this._stack; }, 'setStack': function(aValue) { this._stack = aValue; }, 'resetStack': function() { this.stack().reset(); }, 'maxStackLengthBeforeHashing': function() { return this._maxStackLengthBeforeHashing; }, //------------------------------------------------------------------------- 'addRandomByte': function(aValue) { this.stack().appendByte(aValue); if (this.stack().length() > this.maxStackLengthBeforeHashing()) { this.setStack(Clipperz.Crypto.SHA.sha_d256(this.stack())); } }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); //############################################################################# Clipperz.Crypto.PRNG.RandomnessSource = function(args) { args = args || {}; MochiKit.Base.bindMethods(this); this._generator = args.generator || null; this._sourceId = args.sourceId || null; this._boostMode = args.boostMode || false; this._nextPoolIndex = 0; return this; } Clipperz.Crypto.PRNG.RandomnessSource.prototype = MochiKit.Base.update(null, { 'generator': function() { return this._generator; }, 'setGenerator': function(aValue) { this._generator = aValue; }, //------------------------------------------------------------------------- 'boostMode': function() { return this._boostMode; }, diff --git a/frontend/beta/js/Clipperz/Crypto/RSA.js b/frontend/beta/js/Clipperz/Crypto/RSA.js index 6844dba..5a480f1 100644 --- a/frontend/beta/js/Clipperz/Crypto/RSA.js +++ b/frontend/beta/js/Clipperz/Crypto/RSA.js @@ -1,118 +1,116 @@ /* -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/. */ try { if (typeof(Clipperz.Crypto.BigInt) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.RSA depends on Clipperz.Crypto.BigInt!"; } if (typeof(Clipperz.Crypto.RSA) == 'undefined') { Clipperz.Crypto.RSA = {}; } Clipperz.Crypto.RSA.VERSION = "0.1"; Clipperz.Crypto.RSA.NAME = "Clipperz.RSA"; //############################################################################# MochiKit.Base.update(Clipperz.Crypto.RSA, { //------------------------------------------------------------------------- 'publicKeyWithValues': function (e, d, n) { var result; result = {}; if (e.isBigInt) { result.e = e; } else { result.e = new Clipperz.Crypto.BigInt(e, 16); } if (d.isBigInt) { result.d = d; } else { result.d = new Clipperz.Crypto.BigInt(d, 16); } if (n.isBigInt) { result.n = n; } else { result.n = new Clipperz.Crypto.BigInt(n, 16); } return result; }, 'privateKeyWithValues': function(e, d, n) { return Clipperz.Crypto.RSA.publicKeyWithValues(e, d, n); }, //----------------------------------------------------------------------------- 'encryptUsingPublicKey': function (aKey, aMessage) { var messageValue; var result; messageValue = new Clipperz.Crypto.BigInt(aMessage, 16); result = messageValue.powerModule(aKey.e, aKey.n); return result.asString(16); }, //............................................................................. 'decryptUsingPublicKey': function (aKey, aMessage) { return Clipperz.Crypto.RSA.encryptUsingPublicKey(aKey, aMessage); }, //----------------------------------------------------------------------------- 'encryptUsingPrivateKey': function (aKey, aMessage) { var messageValue; var result; messageValue = new Clipperz.Crypto.BigInt(aMessage, 16); result = messageValue.powerModule(aKey.d, aKey.n); return result.asString(16); }, //............................................................................. 'decryptUsingPrivateKey': function (aKey, aMessage) { return Clipperz.Crypto.RSA.encryptUsingPrivateKey(aKey, aMessage); }, //----------------------------------------------------------------------------- 'generatePublicKey': function(aNumberOfBits) { var result; var e; var d; var n; e = new Clipperz.Crypto.BigInt("10001", 16); { var p, q; diff --git a/frontend/beta/js/Clipperz/Crypto/SHA.js b/frontend/beta/js/Clipperz/Crypto/SHA.js index 635eb90..9605d1c 100644 --- a/frontend/beta/js/Clipperz/Crypto/SHA.js +++ b/frontend/beta/js/Clipperz/Crypto/SHA.js @@ -1,118 +1,116 @@ /* -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/. */ try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.PRNG depends on Clipperz.ByteArray!"; } if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } if (typeof(Clipperz.Crypto.SHA) == 'undefined') { Clipperz.Crypto.SHA = {}; } Clipperz.Crypto.SHA.VERSION = "0.3"; Clipperz.Crypto.SHA.NAME = "Clipperz.Crypto.SHA"; MochiKit.Base.update(Clipperz.Crypto.SHA, { '__repr__': function () { return "[" + this.NAME + " " + this.VERSION + "]"; }, 'toString': function () { return this.__repr__(); }, //----------------------------------------------------------------------------- 'rotateRight': function(aValue, aNumberOfBits) { //Clipperz.Profile.start("Clipperz.Crypto.SHA.rotateRight"); var result; result = (aValue >>> aNumberOfBits) | (aValue << (32 - aNumberOfBits)); //Clipperz.Profile.stop("Clipperz.Crypto.SHA.rotateRight"); return result; }, 'shiftRight': function(aValue, aNumberOfBits) { //Clipperz.Profile.start("Clipperz.Crypto.SHA.shiftRight"); var result; result = aValue >>> aNumberOfBits; //Clipperz.Profile.stop("Clipperz.Crypto.SHA.shiftRight"); return result; }, //----------------------------------------------------------------------------- 'safeAdd': function() { //Clipperz.Profile.start("Clipperz.Crypto.SHA.safeAdd"); var result; var i, c; result = arguments[0]; c = arguments.length; for (i=1; i<c; i++) { var lowerBytesSum; lowerBytesSum = (result & 0xffff) + (arguments[i] & 0xffff); result = (((result >> 16) + (arguments[i] >> 16) + (lowerBytesSum >> 16)) << 16) | (lowerBytesSum & 0xffff); } //Clipperz.Profile.stop("Clipperz.Crypto.SHA.safeAdd"); return result; }, //----------------------------------------------------------------------------- 'sha256_array': function(aValue) { //Clipperz.Profile.start("Clipperz.Crypto.SHA.sha256_array"); var result; var message; var h0, h1, h2, h3, h4, h5, h6, h7; var k; var messageLength; var messageLengthInBits; var _i, _c; var charBits; var rotateRight; var shiftRight; var safeAdd; var bytesPerBlock; var currentMessageIndex; bytesPerBlock = 512/8; rotateRight = Clipperz.Crypto.SHA.rotateRight; shiftRight = Clipperz.Crypto.SHA.shiftRight; safeAdd = Clipperz.Crypto.SHA.safeAdd; charBits = 8; h0 = 0x6a09e667; h1 = 0xbb67ae85; h2 = 0x3c6ef372; h3 = 0xa54ff53a; h4 = 0x510e527f; h5 = 0x9b05688c; diff --git a/frontend/beta/js/Clipperz/Crypto/SRP.js b/frontend/beta/js/Clipperz/Crypto/SRP.js index 3b25275..8cc80ba 100644 --- a/frontend/beta/js/Clipperz/Crypto/SRP.js +++ b/frontend/beta/js/Clipperz/Crypto/SRP.js @@ -1,118 +1,116 @@ /* -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/. */ try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.PRNG depends on Clipperz.ByteArray!"; } try { if (typeof(Clipperz.Crypto.BigInt) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.SRP depends on Clipperz.Crypto.BigInt!"; } try { if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.SRP depends on Clipperz.Crypto.PRNG!"; } if (typeof(Clipperz.Crypto.SRP) == 'undefined') { Clipperz.Crypto.SRP = {}; } Clipperz.Crypto.SRP.VERSION = "0.1"; Clipperz.Crypto.SRP.NAME = "Clipperz.Crypto.SRP"; //############################################################################# MochiKit.Base.update(Clipperz.Crypto.SRP, { '_n': null, '_g': null, //------------------------------------------------------------------------- 'n': function() { if (Clipperz.Crypto.SRP._n == null) { Clipperz.Crypto.SRP._n = new Clipperz.Crypto.BigInt("115b8b692e0e045692cf280b436735c77a5a9e8a9e7ed56c965f87db5b2a2ece3", 16); } return Clipperz.Crypto.SRP._n; }, //------------------------------------------------------------------------- 'g': function() { if (Clipperz.Crypto.SRP._g == null) { Clipperz.Crypto.SRP._g = new Clipperz.Crypto.BigInt(2); // eventually 5 (as suggested on the Diffi-Helmann documentation) } return Clipperz.Crypto.SRP._g; }, //----------------------------------------------------------------------------- 'exception': { 'InvalidValue': new MochiKit.Base.NamedError("Clipperz.Crypto.SRP.exception.InvalidValue") }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); //############################################################################# // // S R P C o n n e c t i o n version 1.0 // //============================================================================= Clipperz.Crypto.SRP.Connection = function (args) { args = args || {}; this._C = args.C; this._P = args.P; this.hash = args.hash; this._a = null; this._A = null; this._s = null; this._B = null; this._x = null; this._u = null; this._K = null; this._M1 = null; this._M2 = null; this._sessionKey = null; return this; } Clipperz.Crypto.SRP.Connection.prototype = MochiKit.Base.update(null, { 'toString': function () { return "Clipperz.Crypto.SRP.Connection (username: " + this.username() + "). Status: " + this.statusDescription(); }, //------------------------------------------------------------------------- 'C': function () { diff --git a/frontend/beta/js/Clipperz/DOM.js b/frontend/beta/js/Clipperz/DOM.js index 7e230bc..10ed49b 100644 --- a/frontend/beta/js/Clipperz/DOM.js +++ b/frontend/beta/js/Clipperz/DOM.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.DOM) == 'undefined') { Clipperz.DOM = {}; } Clipperz.DOM.VERSION = "0.1"; Clipperz.DOM.NAME = "Clipperz.DOM"; MochiKit.Base.update(Clipperz.DOM, { //------------------------------------------------------------------------- '__repr__': function () { return "[" + this.NAME + " " + this.VERSION + "]"; }, //------------------------------------------------------------------------- 'toString': function () { return this.__repr__(); }, //------------------------------------------------------------------------- 'selectOptionMatchingValue': function (aSelectElement, aValue, shouldUseCaseInsensitiveTest) { var selectedOptionIndex; var i, c; selectedOptionIndex = -1; c = aSelectElement.options.length; for (i=0; (i<c) && (selectedOptionIndex == -1); i++) { if (shouldUseCaseInsensitiveTest == true) { if (aSelectElement.options[i].value.toLowerCase() == aValue.toLowerCase()) { selectedOptionIndex = i; } } else { if (aSelectElement.options[i].value == aValue) { selectedOptionIndex = i; } } } if (selectedOptionIndex != -1) { aSelectElement.selectedIndex = selectedOptionIndex; } }, //------------------------------------------------------------------------- 'setFormContents': function(aNode, someValues) { var node; var values; var i, c; values = {}; c = someValues[0].length; for (i=0; i<c; i++) { values[someValues[0][i]] = someValues[1][i]; } // var m = MochiKit.Base; // var self = MochiKit.DOM; if (typeof(aNode) == "undefined" || aNode === null) { node = MochiKit.DOM._document.body; } else { node = MochiKit.DOM.getElement(aNode); } MochiKit.Base.nodeWalk(node, function(aNode) { var result; var name; result = null; name = aNode.name; if (MochiKit.Base.isNotEmpty(name) && (typeof(values[name]) != 'undefined')) { var tagName; tagName = aNode.tagName.toUpperCase(); if (tagName === "INPUT" && (aNode.type == "radio" || aNode.type == "checkbox")) { aNode.checked = values[name]; } else if (tagName === "SELECT") { if (aNode.type == "select-one") { Clipperz.DOM.selectOptionMatchingValue(aNode, values[name]); } else { // aNode.type == "select-multiple" MochiKit.Logging.logWarning("### unhandled Select.type = 'select-multiple' condition"); } } else if (tagName === "FORM" || tagName === "P" || tagName === "SPAN" || tagName === "DIV") { result = aNode.childNodes; } else { aNode.value = values[name] } } else { result = aNode.childNodes; } diff --git a/frontend/beta/js/Clipperz/Date.js b/frontend/beta/js/Clipperz/Date.js index 020d77b..e8f7705 100644 --- a/frontend/beta/js/Clipperz/Date.js +++ b/frontend/beta/js/Clipperz/Date.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.Date) == 'undefined') { Clipperz.Date = {}; } Clipperz.Date.VERSION = "0.1"; Clipperz.Date.NAME = "Clipperz.Date"; MochiKit.Base.update(Clipperz.Date, { //------------------------------------------------------------------------- '__repr__': function () { return "[" + this.NAME + " " + this.VERSION + "]"; }, //------------------------------------------------------------------------- 'toString': function () { return this.__repr__(); }, //------------------------------------------------------------------------- 'daysInMonth': [31,28,31,30,31,30,31,31,30,31,30,31], //------------------------------------------------------------------------- 'englishOrdinalDaySuffixForDate': function(aDate) { var result; switch (aDate.getDate()) { case 1: case 21: case 31: result = "st"; break; case 2: case 22: result = "nd"; break; case 3: case 23: result = "rd"; break; default: result = "th"; break; } return result; }, //------------------------------------------------------------------------- 'isLeapYear': function(aDate) { var year; var result; year = aDate.getFullYear(); result = ((year & 0x03) == 0 && (year % 100 || (year % 400 == 0 && year))); return result; }, //------------------------------------------------------------------------- 'getDaysInMonth': function(aDate) { var result; if (aDate.getMonth() == 1) { Clipperz.Date.isLeapYear(aDate) result += Clipperz.Date.isLeapYear(aDate) ? 29 : 28; } else { result = Clipperz.Date.daysInMonth[aDate.getMonth()]; } return result; }, //------------------------------------------------------------------------- 'getTimezone': function(aDate) { var result; result = aDate.toString(); result = result.replace(/([A-Z]{3}) [0-9]{4}/, '$1'); result = result.replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/, "$1$2$3"); return result; }, 'getGMTOffset': function(aDate) { return (aDate.getTimezoneOffset() > 0 ? "-" : "+") + MochiKit.Format.numberFormatter('00')(Math.floor(this.getTimezoneOffset() / 60)) + MochiKit.Format.numberFormatter('00')(this.getTimezoneOffset() % 60); diff --git a/frontend/beta/js/Clipperz/KeePassExportProcessor.js b/frontend/beta/js/Clipperz/KeePassExportProcessor.js index 74d36ca..7a32f3f 100644 --- a/frontend/beta/js/Clipperz/KeePassExportProcessor.js +++ b/frontend/beta/js/Clipperz/KeePassExportProcessor.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } Clipperz.KeePassExportProcessor = function(args) { args = args || {}; return this; } //============================================================================= Clipperz.KeePassExportProcessor.prototype = MochiKit.Base.update(null, { //------------------------------------------------------------------------- /* 'parse': function(aValue) { var result; //MochiKit.Logging.logDebug(">>> KeePassExportProcessor.parse"); result = []; //MochiKit.Logging.logDebug("--- KeePassExportProcessor.parse - result: " + Clipperz.Base.serializeJSON(result)); //MochiKit.Logging.logDebug("<<< KeePassExportProcessor.parse"); return result; }, */ //------------------------------------------------------------------------- 'deferredParse_core': function(aContext) { var deferredResult; //MochiKit.Logging.logDebug(">>> KeePassExportProcessor.deferredParse_core"); //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse_core - (1) aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50)); //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse_core - aContext: " + Clipperz.Base.serializeJSON(aContext).substring(0,50)); //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse_core - (2) aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50)); //console.log("deferredParse_core - aContext", aContext); //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse_core - (3) aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50)); if (aContext.line == "") { deferredResult = MochiKit.Async.succeed(aContext.result); } else { var record; record = this.parseRecord(aContext); if (record != null) { aContext.result.push(record); } //MochiKit.Logging.logDebug("--> KeePassExportProcessor.deferredParse_core - aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50)); aContext.line = aContext.line.replace(/^\n*/g, "").replace(/\n$/g, ""); //MochiKit.Logging.logDebug("<-- KeePassExportProcessor.deferredParse_core - aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50)); deferredResult = new MochiKit.Async.Deferred(); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse_core - 1.1 " + res); return res;}); deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'importProcessorProgressUpdate', {status:'processing', size:aContext.size, progress:(aContext.size - aContext.line.length)}); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse_core - 1.2 " + res); return res;}); deferredResult.addCallback(MochiKit.Async.wait, 0.2); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse_core - 1.3 " + res); return res;}); //deferredResult.addBoth(function(res) {console.log("KeePassExportProcessor.deferredParse_core - 1.3 ", res); return res;}); deferredResult.addCallback(MochiKit.Base.method(this, 'deferredParse_core')) //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse_core - 1.4 " + res); return res;}); deferredResult.callback(aContext); } //MochiKit.Logging.logDebug("<<< KeePassExportProcessor.deferredParse_core"); return deferredResult; }, //......................................................................... 'deferredParse': function(aValue) { var deferredResult; var lines; var context; //MochiKit.Logging.logDebug(">>> KeePassExportProcessor.deferredParse"); //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse - aValue: " + aValue.length); lines = aValue.replace(/\r?\n/g, "\n"); //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse - lines: " + lines.length); context = { line: lines, size: lines.length, result: [] } //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse - context: " + Clipperz.Base.serializeJSON(context).substring(0,50)); //console.log("--- KeePassExportProcessor.deferredParse - context: ", context); deferredResult = new MochiKit.Async.Deferred(); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse - 1 " + res); return res;}); //deferredResult.addBoth(function(res) {console.log("KeePassExportProcessor.deferredParse - 1 ", res); return res;}); deferredResult.addCallback(MochiKit.Base.method(this, 'deferredParse_core')); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse - 2 " + res); return res;}); deferredResult.callback(context); //MochiKit.Logging.logDebug("<<< KeePassExportProcessor.deferredParse"); diff --git a/frontend/beta/js/Clipperz/NotificationCenter.js b/frontend/beta/js/Clipperz/NotificationCenter.js index e346b1c..a2e2fb6 100644 --- a/frontend/beta/js/Clipperz/NotificationCenter.js +++ b/frontend/beta/js/Clipperz/NotificationCenter.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.NotificationCenter) == 'undefined') { Clipperz.NotificationCenter = {}; } //############################################################################# Clipperz.NotificationCenterEvent = function(args) { args = args || {}; // MochiKit.Base.bindMethods(this); this._source = args.source || null; this._event = args.event || null; this._parameters = args.parameters || null; this._isSynchronous = args.isSynchronous || false; return this; } //============================================================================= Clipperz.NotificationCenterEvent.prototype = MochiKit.Base.update(null, { //------------------------------------------------------------------------- 'toString': function() { return "Clipperz.NotificationCenterEvent"; //return "Clipperz.NotificationCenterEvent {source: " + this.source() + ", event: " + this.event() + ", parameters: " + this.parameters() + "}"; }, //------------------------------------------------------------------------- 'source': function() { return this._source; }, 'setSource': function(aValue) { this._source = aValue; }, //------------------------------------------------------------------------- 'event': function() { return this._event; }, 'setEvent': function(aValue) { this._event = aValue; }, //------------------------------------------------------------------------- 'parameters': function() { return this._parameters; }, 'setParameters': function(aValue) { this._parameters = aValue; }, //------------------------------------------------------------------------- 'isSynchronous': function() { return this._isSynchronous; }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); //############################################################################# //############################################################################# Clipperz.NotificationCenter = function(args) { args = args || {}; // MochiKit.Base.bindMethods(this); this._listeners = {}; this._useSynchronousListenerInvocation = args.useSynchronousListenerInvocation || false; this._timeoutDelay = args.timeoutDelay || 0.1; return this; } //============================================================================= Clipperz.NotificationCenter.prototype = MochiKit.Base.update(null, { //------------------------------------------------------------------------- 'toString': function() { return "Clipperz.NotificationCenter"; }, diff --git a/frontend/beta/js/Clipperz/PM/BookmarkletProcessor.js b/frontend/beta/js/Clipperz/PM/BookmarkletProcessor.js index 83cbfe2..2295d3f 100644 --- a/frontend/beta/js/Clipperz/PM/BookmarkletProcessor.js +++ b/frontend/beta/js/Clipperz/PM/BookmarkletProcessor.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } //if (typeof(Clipperz.PM.BookmarkletProcessor) == 'undefined') { Clipperz.PM.BookmarkletProcessor = {}; } //if (typeof(Clipperz.PM.BookmarkletProcessor.versions) == 'undefined') { Clipperz.PM.BookmarkletProcessor.versions = {}; } /* Clipperz.PM.BookmarkletProcessor.versions['abstract'] = function(anUser, aConfiguration) { this._user = anUser; this._configuration = aConfiguration; this._recordTitle = null; this._record = null; this._editableFields = null; return this; } Clipperz.PM.BookmarkletProcessor.versions['abstract'].prototype = MochiKit.Base.update(null, { 'toString': function() { return "BookmarkletProcessor - " + this.user(); }, //------------------------------------------------------------------------- 'user': function() { return this._user; }, //------------------------------------------------------------------------- 'configuration': function() { return this._configuration; }, //------------------------------------------------------------------------- 'record': function() { throw Clipperz.Base.exception.AbstractMethod; }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); */ Clipperz.PM.BookmarkletProcessor = function(anUser, aConfiguration) { this._user = anUser; this._configuration = aConfiguration; this._recordTitle = null; this._record = null; this._editableFields = null; this._favicon = null; return this; } Clipperz.PM.BookmarkletProcessor.prototype = MochiKit.Base.update(null, { 'toString': function() { return "BookmarkletProcessor - " + this.user(); }, //------------------------------------------------------------------------- 'user': function() { return this._user; }, //------------------------------------------------------------------------- 'configuration': function() { return this._configuration; }, //------------------------------------------------------------------------- 'recordTitle': function() { if (this._recordTitle == null) { this._recordTitle = this.configuration().page.title; } return this._recordTitle; }, //------------------------------------------------------------------------- 'fields': function() { return this.configuration().form.inputs; }, diff --git a/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js b/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js index f3a3902..07c0b97 100644 --- a/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } //############################################################################# var _Clipperz_PM_Components_Panels_base_id_ = 0; //############################################################################# Clipperz.PM.Components.BaseComponent = function(anElement, args) { args = args || {}; // MochiKit.Base.bindMethods(this); // Clipperz.PM.Components.BaseComponent.superclass.constructor.call(this, args); this._element = anElement; this._ids = {}; return this; } //============================================================================= //MochiKit.Base.update(Clipperz.PM.Components.BaseComponent.prototype, { YAHOO.extendX(Clipperz.PM.Components.BaseComponent, YAHOO.ext.util.Observable, { 'isClipperzPMComponent': true, //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.Components.BaseComponent component"; }, //------------------------------------------------------------------------- 'domHelper': function() { return Clipperz.YUI.DomHelper; }, //------------------------------------------------------------------------- 'element': function() { //MochiKit.Logging.logDebug(">>> BaseComponent.element"); return this._element; }, 'setElement': function(aValue) { this._element = aValue; }, //----------------------------------------------------- 'remove': function() { //MochiKit.Logging.logDebug(">>> BaseComponent.remove"); Clipperz.NotificationCenter.unregister(this); MochiKit.Signal.disconnectAllTo(this); //MochiKit.Logging.logDebug("<<< BaseComponent.remove"); }, //------------------------------------------------------------------------- 'getId': function(aValue) { var result; result = this._ids[aValue]; if (typeof(result) == 'undefined') { _Clipperz_PM_Components_Panels_base_id_ ++; result = "Clipperz_PM_Components_Panels_" + aValue + "_" + _Clipperz_PM_Components_Panels_base_id_; this._ids[aValue] = result; //MochiKit.Logging.logDebug(">>> getId(" + aValue + ") = " + result); } else { //MochiKit.Logging.logDebug("<<< getId(" + aValue + ") = " + result); } return result; }, 'getDom': function(aValue) { return YAHOO.util.Dom.get(this.getId(aValue)); }, 'getElement': function(aValue) { return YAHOO.ext.Element.get(this.getId(aValue)); }, 'getActor': function(aValue, anAnimator) { return new YAHOO.ext.Actor(this.getDom(aValue), anAnimator); }, //------------------------------------------------------------------------- diff --git a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js index 7a3b3a3..14e42a5 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js +++ b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js @@ -1,83 +1,81 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } Clipperz.PM.Components.Compact.CompactHeader = function(anElement, args) { Clipperz.PM.Components.Compact.CompactHeader.superclass.constructor.call(this, anElement, args); this.render(); return this; }; YAHOO.extendX(Clipperz.PM.Components.Compact.CompactHeader, Clipperz.PM.Components.BaseComponent, { 'toString': function() { return "Clipperz.PM.Components.Compact.CompactHeader"; }, //----------------------------------------------------- 'render': function() { this.element().update(""); Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[ {tag:'img', src:'./images/logo.gif'}, {tag:'div', id:'lockBlock', children:[ {tag:'input', type:'checkbox', id:'autolock'}, {tag:'span', html:'auto'}, {tag:'a', href:'#', htmlString:Clipperz.PM.Strings['lockMenuLabel'], id:'lock'} ]} ]}); Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:'compactMiscLinks', children:[ {tag:'a', id:'donateHeaderIconLink', target:'_blank', href:Clipperz.PM.Strings['donateHeaderLinkUrl'], children:[ {tag:'img', id:'donateHeaderLinkIcon', src:'./images/smiles_small.gif'} ]}, {tag:'ul', children:[ {tag:'li', children:[{tag:'a', id:'donateHeaderLink', html:'donate', target:'_blank'}]}, {tag:'li', children:[{tag:'a', id:'creditsHeaderLink', html:'credits', target:'_blank'}]}, {tag:'li', children:[{tag:'a', id:'feedbackHeaderLink', html:'feedback', target:'_blank'}]}, {tag:'li', children:[{tag:'a', id:'helpHeaderLink', html:'help', target:'_blank'}]}, {tag:'li', children:[{tag:'a', id:'forumHeaderLink', html:'forum', target:'_blank'}]} ]} ]} ); YAHOO.ext.Element.get('lockBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); Clipperz.NotificationCenter.notify(this, 'switchLanguage'); }, //----------------------------------------------------- __syntaxFix__: '__syntaxFix__' }); diff --git a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js index 0f6858a..1312967 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js +++ b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } Clipperz.PM.Components.Compact.CompactInterface = function(anElement, args) { Clipperz.PM.Components.Compact.CompactInterface.superclass.constructor.call(this, anElement, args); this._directLoginItemTemplate = null; this._user = args.user; this._autoLockTimer = null; Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler') Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler'); this.render(); return this; }; YAHOO.extendX(Clipperz.PM.Components.Compact.CompactInterface, Clipperz.PM.Components.BaseComponent, { 'toString': function() { return "Clipperz.PM.Components.Compact.CompactInterface"; }, //----------------------------------------------------- 'render': function() { var result; var layout; var registerButton; //MochiKit.Logging.logDebug(">>> CompactInterface.render"); this.element().update(""); Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[ {tag:'div', id:this.getId('cantentPanel'), children:[ {tag:'h4', id:this.getId('message')}, {tag:'ul', id:'directLogins', children:[]} ]}, {tag:'div', id:this.getId('lockPanel'), cls:'lockPanel', children:[ {tag:'div', htmlString:Clipperz.PM.Strings['lockDescription']}, {tag:'form', id:'lockDialogForm', children:[ {tag:'input', type:'password', id:this.getId('lockPassphrase')} ]}, {tag:'div', id:this.getId('unlock')} ]} ]}); this.getElement('lockPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); YAHOO.ext.Element.get('lockBlock').show(); MochiKit.Signal.connect(YAHOO.ext.Element.get('lock').dom, 'onclick', this, 'doLockEventHandler'); new YAHOO.ext.Button(this.getId('unlock'), {text:Clipperz.PM.Strings['unlockButtonLabel'], handler:this.doUnlockEventHandler, scope:this, minWidth:0}); this.getElement('unlock').swallowEvent('click', true); new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('lockPassphrase')); MochiKit.Signal.connect('lockDialogForm', 'onsubmit', this, 'doUnlockEventHandler'); this.getElement('cantentPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY); //MochiKit.Logging.logDebug("<<< CompactInterface.render"); return result; }, //----------------------------------------------------- 'directLoginAddedHandler': function(anEvent) { this.redrawDirectLoginItems(); }, //----------------------------------------------------- 'compareDirectLogins': function(a, b) { return MochiKit.Base.compare(a.label().toLowerCase(), b.label().toLowerCase()); }, //----------------------------------------------------- 'redrawDirectLoginItems': function() { var template; var allDirectLogins; this.getElement('message').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); //MochiKit.Logging.logDebug(">>> CompactInterface.redrawDirectLoginItems"); //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 0"); MochiKit.Iter.forEach(YAHOO.ext.Element.get('directLogins').getChildrenByTagName('li'), function(aDirectLoginElement) { MochiKit.Signal.disconnectAll(aDirectLoginElement.dom); //MochiKit.Logging.logDebug("disconnecting IMG " + aDirectLoginElement.getChildrenByTagName('img')[0].dom.src); MochiKit.Signal.disconnectAll(aDirectLoginElement.getChildrenByTagName('img')[0].dom); }) //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 1"); diff --git a/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js b/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js index a1e60d8..013dd0d 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js +++ b/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } Clipperz.PM.Components.Compact.LoginForm = function(anElement, args) { Clipperz.PM.Components.Compact.LoginForm.superclass.constructor.call(this, anElement, args); this.render(); Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler') return this; }; YAHOO.extendX(Clipperz.PM.Components.Compact.LoginForm, Clipperz.PM.Components.BaseComponent, { 'toString': function() { return "Clipperz.PM.Components.Compact.LoginForm"; }, //----------------------------------------------------- 'render': function() { var result; var layout; MochiKit.Signal.disconnectAllTo(this); this.element().update(""); Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[ {tag:'div', id:'compactHeader'}, {tag:'div', id:'compactBody', children:[ {tag:'form', id:this.getId('loginForm_form'), children:[ {tag:'dl', children:[ {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']}, {tag:'dd', children:[ {tag:'input', id:this.getId('login_username'), type:'text', size:'30', name:'username'} ]}, {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']}, {tag:'dd', children:[ {tag:'input', id:this.getId('login_passphrase'), type:'password', size:'30', name:'passphrase'} ]} ]}, {tag:'div', id:this.getId('login_submit')} ]}, {tag:'h4', id:this.getId('message')} ]} ]}); new Clipperz.PM.Components.Compact.CompactHeader(YAHOO.ext.Element.get('compactHeader')); MochiKit.Signal.connect(this.getId('loginForm_form'), 'onsubmit', this, 'stopFormSubmit'); new YAHOO.ext.Button(this.getId('login_submit'), {text:Clipperz.PM.Strings['loginFormButtonLabel'], handler:this.doLogin, scope:this, minWidth:0}); this.getElement('login_submit').swallowEvent('click', true); MochiKit.Signal.connect(this.getId('loginForm_form'), 'onkeydown', this, 'onkeydown'); new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('login_passphrase')); this.getElement('login_username').focus(); return result; }, //----------------------------------------------------- 'doLogin': function(e) { //MochiKit.Logging.logDebug(">>> compact.LoginForm.doLogin"); if (this.checkLoginForm()) { this.doLoginWithUsernameAndPassphrase(this.getDom('login_username').value, this.getDom('login_passphrase').value); } //MochiKit.Logging.logDebug("<<< compact.LoginForm.doLogin"); }, //......................................................................... 'doLoginWithUsernameAndPassphrase': function(anUsername, aPassphrase) { var deferredResult; var user; //MochiKit.Logging.logDebug(">>> compact.LoginForm.doLoginWithUsernameAndPassphrase"); user = new Clipperz.PM.DataModel.User({username:anUsername, passphrase:aPassphrase}); deferredResult = new MochiKit.Async.Deferred(); deferredResult.addCallback(MochiKit.Base.method(user, 'connect')); deferredResult.addCallback(MochiKit.Base.method(user, 'loadPreferences')); deferredResult.addCallback(MochiKit.Base.method(user, 'loadRecords')); deferredResult.addCallback(MochiKit.Base.method(user, 'loadDirectLogins')); deferredResult.addErrback(MochiKit.Base.bind(function() { this.getElement('loginForm_form').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show(); this.getElement('message').update(Clipperz.PM.Strings['loginMessagePanelFailureText']); this.getDom('login_passphrase').value = ""; this.getElement('login_passphrase').focus(); diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js index 3f4952d..fef8e9e 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } //############################################################################# Clipperz.PM.Components.Import.CSVImport.CSVImportColumns = function(anElement, args) { args = args || {}; Clipperz.PM.Components.Import.CSVImport.CSVImportColumns.superclass.constructor.call(this, anElement, args); this._mainComponent = args.mainComponent; return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportColumns, Clipperz.PM.Components.BaseComponent, { 'toString': function() { return "Clipperz.PM.Components.Import.CSVImport.CSVImportColumns component"; }, //------------------------------------------------------------------------- 'mainComponent': function() { return this._mainComponent; }, //------------------------------------------------------------------------- 'render': function() { var i,c; var columnSelectorCheckboxCells; var checkboxes; var data; //MochiKit.Logging.logDebug(">>> CSVImportColumns.render"); Clipperz.NotificationCenter.unregister(this); MochiKit.Signal.disconnectAllTo(this); this.element().update(""); data = this.mainComponent().parsedValues(); columnSelectorCheckboxCells = []; c = data[0].length; for (i=0; i<c; i++) { columnSelectorCheckboxCells.push({tag:'th', valign:'top', cls:(this.mainComponent().isColumnSelected(i) ? 'selectedColumn': 'skippedColumn'), children:[ {tag:'input', type:'checkbox', id:this.getId('columnCheckbox_' + i), value:i} ]}) } this.domHelper().append(this.element(), {tag:'div', children:[ {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Columns']}, {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[ {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview columns', cellspacing:'0', children:[ {tag:'thead', id:this.getId('previewData_thead'), children:[ {tag:'tr', children:columnSelectorCheckboxCells} ]}, {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} ]} ]} ]}); c = data[0].length; for (i=0; i<c; i++) { if (this.mainComponent().isColumnSelected(i)) { this.getDom('columnCheckbox_' + i).checked = true; } } this.renderData(this.getElement('previewData_tbody'), data); checkboxes = MochiKit.DOM.getElementsByTagAndClassName('input', null, this.getDom('previewData_thead')); c = checkboxes.length; for (i=0; i<c; i++) { MochiKit.Signal.connect(checkboxes[i], 'onclick', this, 'renderDataHandler'); } //MochiKit.Logging.logDebug("<<< CSVImportColumns.render"); }, //------------------------------------------------------------------------- 'renderData': function(anElement, someData) { var config; var i,c; //MochiKit.Logging.logDebug(">>> CSVImportColumns.renderData"); // anElement.update(""); MochiKit.DOM.replaceChildNodes(anElement.dom); diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js index f7dbd5d..e816380 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } //############################################################################# Clipperz.PM.Components.Import.CSVImport.CSVImportFields = function(anElement, args) { args = args || {}; Clipperz.PM.Components.Import.CSVImport.CSVImportFields.superclass.constructor.call(this, anElement, args); this._mainComponent = args.mainComponent; return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportFields, Clipperz.PM.Components.BaseComponent, { 'toString': function() { return "Clipperz.PM.Components.Import.CSVImport.CSVImportFields component"; }, //------------------------------------------------------------------------- 'mainComponent': function() { return this._mainComponent; }, //------------------------------------------------------------------------- 'render': function() { var fieldsHeaderCells; var titleColumnIndex; var notesColumnIndex; var i,c; Clipperz.NotificationCenter.unregister(this); MochiKit.Signal.disconnectAllTo(this); this.element().update(""); titleColumnIndex = this.mainComponent().titleColumnIndex() notesColumnIndex = this.mainComponent().notesColumnIndex() fieldsHeaderCells = []; fieldsHeaderCells.push({tag:'td', valign:'top', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}); c = this.mainComponent().parsedValues()[0].length; for (i=0; i<c; i++) { if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) { var trimmedLabel; trimmedLabel = Clipperz.Base.trim(this.mainComponent().labelForColumn(i)); fieldsHeaderCells.push({tag:'td', valign:'top', id:this.getId('fieldHeaderTD_' + i), cls:((trimmedLabel == "") ? 'missingLabelWarning' : (this.isColumnSetup(i) ? 'configuredColumn': 'unconfiguredColumn')), children:[ {tag:'span', html:((trimmedLabel == "") ? Clipperz.PM.Strings['CSV_ImportWizard_Fields_MissingLabelWarning'] : trimmedLabel)/*, cls:((trimmedLabel == "") ? 'missingLabelWarning' : '')*/}, {tag:'select', id:this.getId('select_' + i), name:i, children:[ {tag:'option', value:'UNDEFINED', html:"select data type", cls:'disabledOption'}, {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']}, {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']}, {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']}, {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']}, {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']} ]} ]}) } } if (notesColumnIndex != -1) { fieldsHeaderCells.push({tag:'td', valign:'top', cls:'notes', html:this.mainComponent().labelForColumn(notesColumnIndex)}); } this.domHelper().append(this.element(), {tag:'div', children:[ {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Fields']}, {tag:'div', id:this.getId('dataDiv'), children:[ {tag:'div', children:[ ]}, {tag:'div', cls:'csvImportPreview', children:[ {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ {tag:'thead', id:this.getId('previewData_thead'), children:[ {tag:'tr', cls:'CSV_previewData_header', children:fieldsHeaderCells} ]}, {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} ]} ]} ]} ]}); for (i=0; i<c; i++) { if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) { Clipperz.DOM.selectOptionMatchingValue(this.getDom('select_' + i), this.mainComponent().typeForColumn(i)); diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js index 5cb8679..dbde138 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } //############################################################################# Clipperz.PM.Components.Import.CSVImport.CSVImportHeader = function(anElement, args) { args = args || {}; Clipperz.PM.Components.Import.CSVImport.CSVImportHeader.superclass.constructor.call(this, anElement, args); this._mainComponent = args.mainComponent; this._pendingDeferredLabelFieldHandlerEvents = 0; return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportHeader, Clipperz.PM.Components.BaseComponent, { 'toString': function() { return "Clipperz.PM.Components.Import.CSVImport.CSVImportHeader component"; }, //------------------------------------------------------------------------- 'mainComponent': function() { return this._mainComponent; }, //------------------------------------------------------------------------- 'render': function() { var thConfigs; var i,c; //MochiKit.Logging.logDebug(">>> CSVImportHeader.render"); Clipperz.NotificationCenter.unregister(this); MochiKit.Signal.disconnectAllTo(this); thConfigs = []; c = this.mainComponent().parsedValues()[0].length; for (i=0; i<c; i++) { if (this.mainComponent().isColumnSelected(i)) { // thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:this.mainComponent().labelForColumn(i)}]}); thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:""}]}); } } this.element().update(""); this.domHelper().append(this.element(), {tag:'div', children:[ {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header']}, {tag:'div', cls:'importStepParameters', children:[ {tag:'input', type:'checkbox', name:'isFistRowHeader', id:this.getId('isFirstRowHeader_checkbox')}, {tag:'span', id:this.getId('isFirstRowHeader_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header_Settings_firstRowHeaderLabel']} ]}, {tag:'div', id:this.getId('dataDiv'), children:[ {tag:'div', cls:'csvImportPreview', children:[ {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview header', cellspacing:'0', children:[ {tag:'thead', children:[{tag:'tr', children:thConfigs}]}, {tag:'tbody', id:this.getId('previewData_tbody')} ]} ]} ]} ]}); for (i=0; i<c; i++) { if (this.mainComponent().isColumnSelected(i)) { this.getElement('headerTextField_' + i).dom.value = this.mainComponent().labelForColumn(i); } } this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); if (this.mainComponent().isFirstRowHeader()) { this.getDom('isFirstRowHeader_checkbox').click(); } c = this.mainComponent().parsedValues()[0].length; for (i=0; i<c; i++) { if (this.mainComponent().isColumnSelected(i)) { MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onchange', MochiKit.Base.partial(MochiKit.Base.method(this, 'labelFieldHandler'), i)); MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onkeypress', MochiKit.Base.partial(MochiKit.Base.method(this, 'deferredLabelFieldHandler'), i)); } } MochiKit.Signal.connect(this.getDom('isFirstRowHeader_checkbox'), 'onclick', this, 'toggleFirstRowHeaderCheckboxHandler'); if (Clipperz_IEisBroken != true) { MochiKit.Signal.connect(this.getDom('isFirstRowHeader_span'), 'onclick', this.getDom('isFirstRowHeader_checkbox'), 'click'); } diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js index 6344e06..ccfdeca 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } //############################################################################# Clipperz.PM.Components.Import.CSVImport.CSVImportNotes = function(anElement, args) { args = args || {}; Clipperz.PM.Components.Import.CSVImport.CSVImportNotes.superclass.constructor.call(this, anElement, args); this._mainComponent = args.mainComponent; return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportNotes, Clipperz.PM.Components.BaseComponent, { 'toString': function() { return "Clipperz.PM.Components.Import.CSVImport.CSVImportNotes component"; }, //------------------------------------------------------------------------- 'mainComponent': function() { return this._mainComponent; }, //------------------------------------------------------------------------- 'render': function() { var notesSelectorCheckboxCells; var totalNumberOfColumns; var titleColumnIndex; var notesColumnIndex; var i,c; Clipperz.NotificationCenter.unregister(this); MochiKit.Signal.disconnectAllTo(this); this.element().update(""); titleColumnIndex = this.mainComponent().titleColumnIndex() notesColumnIndex = this.mainComponent().notesColumnIndex() totalNumberOfColumns = this.mainComponent().parsedValues()[0].length; notesSelectorCheckboxCells = [{tag:'th', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}]; c = totalNumberOfColumns; for (i=0; i<c; i++) { if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { notesSelectorCheckboxCells.push({tag:'th', id:this.getId('th_' + i), valign:'top', children:[ {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportNotesColumn', value:i}, {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)} ]}) } } this.domHelper().append(this.element(), {tag:'div', children:[ {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes']}, {tag:'div', id:this.getId('dataDiv'), children:[ {tag:'div', cls:'importStepParameters', children:[ {tag:'input', id:this.getId('doNotSetNotes_radio'), type:'radio', name:'CSVImportNotesColumn', value:-1}, {tag:'span', id:this.getId('doNotSetNotes_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes_Settings_noSelectionLabel']} ]}, {tag:'div', cls:'csvImportPreview', children:[ {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ {tag:'thead', id:this.getId('previewData_thead'), children:[ {tag:'tr', children:notesSelectorCheckboxCells} ]}, {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} ]} ]} ]} ]}); this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); if ((notesColumnIndex >= totalNumberOfColumns) || (notesColumnIndex == titleColumnIndex) || !(this.mainComponent().isColumnSelected(notesColumnIndex))) { this.mainComponent().setNotesColumnIndex(-1); notesColumnIndex = -1; } c = totalNumberOfColumns; for (i=0; i<c; i++) { if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler'); if (Clipperz_IEisBroken != true) { MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click'); } diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js index aa57580..4b2149a 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } //############################################################################# Clipperz.PM.Components.Import.CSVImport.CSVImportTitle = function(anElement, args) { args = args || {}; Clipperz.PM.Components.Import.CSVImport.CSVImportTitle.superclass.constructor.call(this, anElement, args); this._mainComponent = args.mainComponent; return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportTitle, Clipperz.PM.Components.BaseComponent, { 'toString': function() { return "Clipperz.PM.Components.Import.CSVImport.CSVImportTitle component"; }, //------------------------------------------------------------------------- 'mainComponent': function() { return this._mainComponent; }, //------------------------------------------------------------------------- 'render': function() { var titleSelectorCheckboxCells; var titleColumnIndex; var i,c; Clipperz.NotificationCenter.unregister(this); MochiKit.Signal.disconnectAllTo(this); this.element().update(""); titleColumnIndex = this.mainComponent().titleColumnIndex() titleSelectorCheckboxCells = []; c = this.mainComponent().parsedValues()[0].length; for (i=0; i<c; i++) { if (this.mainComponent().isColumnSelected(i)) { titleSelectorCheckboxCells.push({tag:'th', valign:'top', id:this.getId('th_' + i), children:[ {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportTitleColumn', value:i}, {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)} ]}) } } if (titleColumnIndex >= titleSelectorCheckboxCells.length) { this.mainComponent().setTitleColumnIndex(-1); } this.domHelper().append(this.element(), {tag:'div', children:[ {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']}, {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[ {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ {tag:'thead', id:this.getId('previewData_thead'), children:[ {tag:'tr', children:titleSelectorCheckboxCells} ]}, {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} ]} ]} ]}); this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); c = this.mainComponent().parsedValues()[0].length; for (i=0; i<c; i++) { if (this.mainComponent().isColumnSelected(i)) { MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler'); if (Clipperz_IEisBroken != true) { MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click'); } } } if (titleColumnIndex != -1) { this.getDom('radio_' + titleColumnIndex).click(); } else { this.mainComponent().nextButton().disable(); } }, //------------------------------------------------------------------------- diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js index c1dd1a9..bd305c3 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } //############################################################################# Clipperz.PM.Components.Import.CSVImportComponent = function(anElement, args) { args = args || {}; this._steps = this._steps || ['CSV_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT']; Clipperz.PM.Components.Import.CSVImportComponent.superclass.constructor.call(this, anElement, args); this._step1Component = null; this._step2Component = null; this._step3Component = null; this._step4Component = null; this._step5Component = null; this._isFirstRowHeader = false; this._titleColumnIndex = -1; this._notesColumnIndex = -1; this._fieldSettings = {}; this._skippedColumns = new Clipperz.Set(); this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.Import.CSVImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { 'toString': function() { return "Clipperz.PM.Components.Import.CSVImportComponent component"; }, //------------------------------------------------------------------------- 'render': function() { this.domHelper().append(this.element(), {tag:'div', cls:'csvImportWizard', children:[ {tag:'h3', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']}, {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, {tag:'div', cls:'importStepBlocks', children:[ {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ {tag:'div', children:[ {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_csv_description']}, {tag:'div', cls:'importOptionsParameters', children:[ {tag:'div', cls:'CSVImportOptionsParameters', children:[ {tag:'ul', children:[ {tag:'li', children:[ {tag:'label', 'for':this.getId('CSV_inputOptions_separator'), html:"separator"}, {tag:'select', name:this.getId('CSV_inputOptions_separator'), id:this.getId('CSV_inputOptions_separator'), children:[ {tag:'option', name:'comma', value:',', html:"comma (,)", selected:true}, {tag:'option', name:'tab', value:'\t', html:"tab"} ]} ]}, {tag:'li', children:[ {tag:'label', 'for':this.getId('CSV_inputOptions_quote'), html:"quote"}, {tag:'select', name:this.getId('CSV_inputOptions_quote'), id:this.getId('CSV_inputOptions_quote'), children:[ {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true}, {tag:'option', name:'singleQuote', value:'\'', html:"single quote (\')"} ]} ]}, {tag:'li', children:[ {tag:'label', 'for':this.getId('CSV_inputOptions_escape'), html:"escape"}, {tag:'select', name:this.getId('CSV_inputOptions_escape'), id:this.getId('CSV_inputOptions_escape'), children:[ {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true}, {tag:'option', name:'slash', value:'\/', html:"slash (\/)"}, {tag:'option', name:'backslash', value:'\\', html:"backslash (\\)"} ]} ]} ]} ]} ]}, this.textAreaConfig() ]} ]}, {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]}, {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]}, {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]}, {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]}, {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]}, {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[ {tag:'div', children:[ {tag:'div', id:this.getId('previewDiv'), html:"preview"} ]} ]}, {tag:'div', cls:'step_7', id:this.getId('step_7'), children:[ diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js index c3d2fac..d74961b 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } //############################################################################# Clipperz.PM.Components.Import.ClipperzImportComponent = function(anElement, args) { args = args || {}; Clipperz.PM.Components.Import.ClipperzImportComponent.superclass.constructor.call(this, anElement, args); this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.Import.ClipperzImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { 'toString': function() { return "Clipperz.PM.Components.Import.ClipperzImportComponent component"; }, //------------------------------------------------------------------------- 'render': function() { //MochiKit.Logging.logDebug(">>> Import.ClipperzImportComponent.render"); this.domHelper().append(this.element(), {tag:'div', cls:'clipperzImportWizard', children:[ {tag:'h3', htmlString:Clipperz.PM.Strings['Clipperz_ImportWizard_Title']}, {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, {tag:'div', cls:'importStepBlocks', children:[ {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ {tag:'div', children:[ {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_clipperz_description']}, {tag:'div', cls:'importOptionsParameters', children:[]}, this.textAreaConfig() ]} ]}, {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ {tag:'div', children:[ {tag:'div', id:this.getId('previewDiv'), html:"preview"} ]} ]}, {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ {tag:'div', children:[ {tag:'h4', html:"done"} ]} ]} ]}, {tag:'div', cls:'importOptionsButtons', children:[ {tag:'table', children:[ {tag:'tbody', children:[ {tag:'tr', children:[ {tag:'td', html:' '}, {tag:'td', children:[ {tag:'div', id:this.getId('backActionButton')} ]}, {tag:'td', html:' '}, {tag:'td', children:[ {tag:'div', id:this.getId('nextActionButton')} ]}, {tag:'td', html:' '} ]} ]} ]} ]} ]}); this.updateSteps(); this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); //MochiKit.Logging.logDebug("<<< Import.ClipperzImportComponent.render"); }, //------------------------------------------------------------------------- 'nextAction': function() { switch (this.currentStep()) { case 0: // -> 1 this.previewValues(); break; case 1: // -> 2 this.importValues(); break; } }, diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js index ad0d985..859c190 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } //############################################################################# Clipperz.PM.Components.Import.ExcelImportComponent = function(anElement, args) { args = args || {}; this._steps = ['EXCEL_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT']; Clipperz.PM.Components.Import.ExcelImportComponent.superclass.constructor.call(this, anElement, args); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.Import.ExcelImportComponent, Clipperz.PM.Components.Import.CSVImportComponent, { 'toString': function() { return "Clipperz.PM.Components.Import.ExcelImportComponent component"; }, //------------------------------------------------------------------------- 'render': function() { //MochiKit.Logging.logDebug(">>> Import.ExcelImportComponent.render"); this.domHelper().append(this.element(), {tag:'div', cls:'excelImportWizard', children:[ {tag:'h3', htmlString:Clipperz.PM.Strings['Excel_ImportWizard_Title']}, {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, {tag:'div', cls:'importStepBlocks', children:[ {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ {tag:'div', children:[ {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_excel_description']}, {tag:'div', cls:'importOptionsParameters', children:[]}, this.textAreaConfig() ]} ]}, {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]}, {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]}, {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]}, {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]}, {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]}, {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[ {tag:'div', children:[ {tag:'div', id:this.getId('previewDiv'), html:"preview"} ]} ]}, {tag:'div', cls:'step_7', id:this.getId('step_7'), children:[ {tag:'div', children:[ {tag:'h4', html:"done"} ]} ]} ]}, {tag:'div', cls:'importOptionsButtons', children:[ {tag:'table', children:[ {tag:'tbody', children:[ {tag:'tr', children:[ {tag:'td', html:' '}, {tag:'td', children:[ {tag:'div', id:this.getId('backActionButton')} ]}, {tag:'td', html:' '}, {tag:'td', children:[ {tag:'div', id:this.getId('nextActionButton')} ]}, {tag:'td', html:' '} ]} ]} ]} ]} ]}); this.updateSteps(); this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); this.getElement('step_3').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); this.getElement('step_4').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); this.getElement('step_5').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); this.getElement('step_6').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); this.getElement('step_7').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); //MochiKit.Logging.logDebug("<<< Import.ExcelImportComponent.render"); }, //------------------------------------------------------------------------- diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js index a55455a..3c23b1c 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } //############################################################################# Clipperz.PM.Components.Import.GenericImportComponent = function(anElement, args) { args = args || {}; this._steps = this._steps || ['EDIT', 'PREVIEW', 'IMPORT']; Clipperz.PM.Components.Import.GenericImportComponent.superclass.constructor.call(this, anElement, args); this._user = args['user']; this._currentStep = 0; this._currentStatus = 'IDLE'; // 'PROCESSING' this._parsedValues = null; this._processedValues = null; this._backButton = null; this._nextButton = null; Clipperz.NotificationCenter.register(null, 'importProcessorProgressUpdate', this, 'updateProgressDialogStatus'); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.Import.GenericImportComponent, Clipperz.PM.Components.BaseComponent, { 'toString': function() { return "Clipperz.PM.Components.Import.GenericImportComponent component"; }, //------------------------------------------------------------------------- 'user': function() { return this._user; }, //------------------------------------------------------------------------- 'textAreaConfig': function() { return {tag:'textarea', name:this.getId('importTextArea'), cls:'importTextArea', id:this.getId('importTextArea'), cols:60, rows:15, html:""}; }, 'textAreaContent': function() { return this.getDom('importTextArea').value }, //------------------------------------------------------------------------- 'steps': function() { return this._steps; }, 'currentStep': function() { return this._currentStep; }, 'setCurrentStep': function(aValue) { this._currentStep = aValue; this.updateSteps(); }, //------------------------------------------------------------------------- 'currentStatus': function() { return this._currentStatus; }, 'startProcessing': function() { this._currentStatus = 'PROCESSING'; this.updateSteps(); }, 'processingDone': function() { this._currentStatus = 'IDLE'; this.setCurrentStep(this.currentStep() + 1); }, 'processingAborted': function() { this._currentStatus = 'IDLE'; this.updateSteps(); }, //------------------------------------------------------------------------- 'stepsConfig': function() { diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js index 5f4fe33..0570704 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } //############################################################################# Clipperz.PM.Components.Import.KeePassImportComponent = function(anElement, args) { args = args || {}; Clipperz.PM.Components.Import.KeePassImportComponent.superclass.constructor.call(this, anElement, args); this._steps = ['EDIT', 'KEEPASS_SETTINGS', 'PREVIEW', 'IMPORT']; this._definedFields = ['Group', 'Group Tree', 'UserName', 'URL', 'Password', 'Notes', 'UUID', 'Icon', 'Creation Time', 'Last Access', 'Last Modification', 'Expires', 'Attachment Description', 'Attachment']; this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.Import.KeePassImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { 'toString': function() { return "Clipperz.PM.Components.Import.KeePassImportComponent component"; }, //------------------------------------------------------------------------- 'render': function() { //MochiKit.Logging.logDebug(">>> Import.KeePassImportComponent.render"); this.domHelper().append(this.element(), {tag:'div', cls:'keePassImportWizard', children:[ {tag:'h3', htmlString:Clipperz.PM.Strings['KeePass_ImportWizard_Title']}, {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, {tag:'div', cls:'importStepBlocks', children:[ {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ {tag:'div', children:[ {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_keePass_description']}, {tag:'div', cls:'importOptionsParameters', children:[]}, this.textAreaConfig() ]} ]}, {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ {tag:'div', children:[ {tag:'div', id:this.getId('settingsDiv'), children:[ {tag:'table', id:'KeePassSettings', children:[ {tag:'tbody', children:[ {tag:'tr', children:[ {tag:'td', width:'50%', valign:'top', children:[ {tag:'table', children:[ {tag:'tbody', children:[ {tag:'tr', children:[ {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group_checkbox'), name:'Group'/*, checked:true*/}]}, {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group_label'), html:"Group"}]} ]}, {tag:'tr', children:[ {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group Tree_checkbox'), name:'Group Tree'/*, checked:true*/}]}, {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group Tree_label'), html:"Group Tree"}]} ]}, {tag:'tr', children:[ {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UserName_checkbox'), name:'UserName', checked:true}]}, {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UserName_label'), html:"UserName"}]} ]}, {tag:'tr', children:[ {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('URL_checkbox'), name:'URL', checked:true}]}, {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('URL_label'), html:"URL"}]} ]}, {tag:'tr', children:[ {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Password_checkbox'), name:'Password', checked:true}]}, {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Password_label'), html:"Password"}]} ]}, {tag:'tr', children:[ {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Notes_checkbox'), name:'Notes', checked:true}]}, {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Notes_label'), html:"Notes"}]} ]}, {tag:'tr', children:[ {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UUID_checkbox'), name:'UUID'/*, checked:true*/}]}, {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UUID_label'), html:"UUID"}]} ]} ]} ]} ]}, {tag:'td', width:'50%', valign:'top', children:[ {tag:'table', children:[ {tag:'tbody', children:[ {tag:'tr', children:[ {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Icon_checkbox'), name:'Icon'/*, checked:true*/}]}, {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Icon_label'), html:"Icon"}]} ]}, {tag:'tr', children:[ {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Creation Time_checkbox'), name:'Creation Time'/*, checked:true*/}]}, {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Creation Time_label'), html:"Creation Time"}]} diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js index 05baf46..f97ce78 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } //############################################################################# Clipperz.PM.Components.Import.MainComponent = function(anElement, args) { args = args || {}; Clipperz.PM.Components.Import.MainComponent.superclass.constructor.call(this, anElement, args); this._user = args.user; this._wizardComponent = null; this._backButton = null; this._nextButton = null; this._selectedComponent = null; this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.Import.MainComponent, Clipperz.PM.Components.BaseComponent, { 'toString': function() { return "Clipperz.PM.Components.Import.MainComponent component"; }, //------------------------------------------------------------------------- 'user': function() { return this._user; }, //------------------------------------------------------------------------- 'wizardComponent': function() { return this._wizardComponent; }, 'setWizardComponent': function(aValue) { if (this._wizardComponent != null) { this._wizardComponent.remove(); } if (aValue != null) { this.getElement('importCover').hide(); this.getElement('importWizard').show(); } this._wizardComponent = aValue; }, 'resetImportComponent': function() { //MochiKit.Logging.logDebug(">>> resetImportComponent"); this.setWizardComponent(null); this.getElement('wizardComponent').update(""); this.getElement('importCover').show(); this.getElement('importWizard').hide(); //MochiKit.Logging.logDebug("<<< resetImportComponent"); }, //------------------------------------------------------------------------- 'backButton': function() { return this._backButton; }, 'setBackButton': function(aValue) { this._backButton = aValue; }, 'nextButton': function() { return this._nextButton; }, 'setNextButton': function(aValue) { this._nextButton = aValue; }, //------------------------------------------------------------------------- 'render': function() { //MochiKit.Logging.logDebug(">>> Import.MainComponent.render"); Clipperz.NotificationCenter.unregister(this); MochiKit.Signal.disconnectAllTo(this); this.element().update(""); diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js index 24dc785..f58d913 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } //############################################################################# Clipperz.PM.Components.Import.PasswordPlusImportComponent = function(anElement, args) { args = args || {}; Clipperz.PM.Components.Import.PasswordPlusImportComponent.superclass.constructor.call(this, anElement, args); this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.Import.PasswordPlusImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { 'toString': function() { return "Clipperz.PM.Components.Import.PasswordPlusImportComponent component"; }, //------------------------------------------------------------------------- 'render': function() { //MochiKit.Logging.logDebug(">>> Import.PasswordPlusImportComponent.render"); this.domHelper().append(this.element(), {tag:'div', cls:'passwordPlusImportWizard', children:[ {tag:'h3', htmlString:Clipperz.PM.Strings['PasswordPlus_ImportWizard_Title']}, {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, {tag:'div', cls:'importStepBlocks', children:[ {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ {tag:'div', children:[ {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_passwordPlus_description']}, {tag:'div', cls:'importOptionsParameters', children:[]}, this.textAreaConfig() ]} ]}, {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ {tag:'div', children:[ {tag:'div', id:this.getId('previewDiv'), html:"preview"} ]} ]}, {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ {tag:'div', children:[ {tag:'h4', html:"done"} ]} ]} ]}, {tag:'div', cls:'importOptionsButtons', children:[ {tag:'table', children:[ {tag:'tbody', children:[ {tag:'tr', children:[ {tag:'td', html:' '}, {tag:'td', children:[ {tag:'div', id:this.getId('backActionButton')} ]}, {tag:'td', html:' '}, {tag:'td', children:[ {tag:'div', id:this.getId('nextActionButton')} ]}, {tag:'td', html:' '} ]} ]} ]} ]} ]}); this.updateSteps(); this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); //MochiKit.Logging.logDebug("<<< Import.PasswordPlusImportComponent.render"); }, //------------------------------------------------------------------------- /* 'backAction': function() { switch (this.currentStep()) { case 1: // -> 0 this.backButton().disable(); this.getElement('step_1').hide(); this.setCurrentStep(0); this.getElement('step_0').show(); break; } }, diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js index fe4d45c..443ee17 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } //############################################################################# Clipperz.PM.Components.Import.RoboFormImportComponent = function(anElement, args) { args = args || {}; Clipperz.PM.Components.Import.RoboFormImportComponent.superclass.constructor.call(this, anElement, args); this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.Import.RoboFormImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { 'toString': function() { return "Clipperz.PM.Components.Import.RoboFormImportComponent component"; }, //------------------------------------------------------------------------- 'render': function() { //MochiKit.Logging.logDebug(">>> Import.RoboFormImportComponent.render"); this.domHelper().append(this.element(), {tag:'div', cls:'roboFormImportWizard', children:[ {tag:'h3', htmlString:Clipperz.PM.Strings['RoboForm_ImportWizard_Title']}, {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, {tag:'div', cls:'importStepBlocks', children:[ {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ {tag:'div', children:[ {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_roboForm_description']}, {tag:'div', cls:'importOptionsParameters', children:[]}, this.textAreaConfig() ]} ]}, {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ {tag:'div', children:[ {tag:'div', id:this.getId('previewDiv'), html:"preview"} ]} ]}, {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ {tag:'div', children:[ {tag:'h4', html:"done"} ]} ]} ]}, {tag:'div', cls:'importOptionsButtons', children:[ {tag:'table', children:[ {tag:'tbody', children:[ {tag:'tr', children:[ {tag:'td', html:' '}, {tag:'td', children:[ {tag:'div', id:this.getId('backActionButton')} ]}, {tag:'td', html:' '}, {tag:'td', children:[ {tag:'div', id:this.getId('nextActionButton')} ]}, {tag:'td', html:' '} ]} ]} ]} ]} ]}); this.updateSteps(); this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); //MochiKit.Logging.logDebug("<<< Import.RoboFormImportComponent.render"); }, //------------------------------------------------------------------------- 'nextAction': function() { switch (this.currentStep()) { case 0: // -> 1 this.previewValues(); break; case 1: // -> 2 this.importValues(); break; } }, diff --git a/frontend/beta/js/Clipperz/PM/Components/MessageBox.js b/frontend/beta/js/Clipperz/PM/Components/MessageBox.js index cf9ec86..f9b845e 100644 --- a/frontend/beta/js/Clipperz/PM/Components/MessageBox.js +++ b/frontend/beta/js/Clipperz/PM/Components/MessageBox.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } Clipperz.PM.Components.MessageBoxImplementation = function() { this._step = 0; this._steps = 0; return this; }; //YAHOO.extendX(Clipperz.PM.Components.MessageBoxImplementation, Clipperz.PM.Components.BaseComponent, { Clipperz.PM.Components.MessageBoxImplementation.prototype = MochiKit.Base.update(null, { 'toString': function() { return "Clipperz.PM.Components.MessageBox"; }, //----------------------------------------------------- 'step': function() { return this._step; }, 'setStep': function(aValue) { if (aValue == 'next') { this._step = this._step + 1; } else { this._step = aValue; } if (this._step > this.steps()) { //MochiKit.Logging.logDebug("overstepping: " + this._step + " (" + this.steps() + ")"); this._step = this.steps(); } }, //----------------------------------------------------- 'steps': function() { return this._steps; }, 'setSteps': function(aValue) { if (aValue.constructor == String) { if (aValue.charAt(0) == '+') { this._steps += aValue.substring(1)*1; } else if (aValue.charAt(0) == '-') { this._steps -= aValue.substring(1)*1; } else { this._steps = aValue.substring(1)*1; } } else { this._steps = aValue; } }, //----------------------------------------------------- 'deferredShow': function(aConfiguration, anAnimationTargetElement, aValue) { this.show(aConfiguration, anAnimationTargetElement); return aValue; }, 'show': function(aConfiguration, anAnimationTargetElement) { var messageBoxConfiguration; messageBoxConfiguration = MochiKit.Base.clone(aConfiguration); messageBoxConfiguration.msg = messageBoxConfiguration.text; messageBoxConfiguration.animEl = anAnimationTargetElement; messageBoxConfiguration.progress = messageBoxConfiguration.showProgressBar; messageBoxConfiguration.closable = messageBoxConfiguration.showCloseButton; this.setSteps(aConfiguration.steps || 0); this.setStep(aConfiguration.step || 0); delete messageBoxConfiguration.buttons; Clipperz.YUI.MessageBox.show(messageBoxConfiguration); }, //----------------------------------------------------- 'update': function(someValues) { //MochiKit.Logging.logDebug(">>> MessageBox.update"); if (someValues.title) { Clipperz.YUI.MessageBox.getDialog().setTitle(someValues.title); }; if (someValues.text) { Clipperz.YUI.MessageBox.updateText(someValues.text); }; diff --git a/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js b/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js index 7b0b12b..1e94c4b 100644 --- a/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.OTP) == 'undefined') { Clipperz.PM.Components.OTP = {}; } //############################################################################# Clipperz.PM.Components.OTP.MainComponent = function(anElement, args) { args = args || {}; //MochiKit.Logging.logDebug("new OTP.MainComponent"); Clipperz.PM.Components.OTP.MainComponent.superclass.constructor.call(this, anElement, args); this._user = args.user; this._shouldRender = true; this._deleteButton = null; this._printButton = null; Clipperz.NotificationCenter.register(null, 'tabSelected', this, 'tabSelectedHandler'); // Clipperz.NotificationCenter.register(null, 'oneTimePasswordAdded', this, 'render'); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.OTP.MainComponent, Clipperz.PM.Components.BaseComponent, { 'toString': function() { return "Clipperz.PM.Components.OTP.MainComponent component"; }, //------------------------------------------------------------------------- 'render': function() { //MochiKit.Logging.logDebug("### OTP.MainComponent.render"); Clipperz.NotificationCenter.unregister(this); MochiKit.Signal.disconnectAllTo(this); if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { this.element().update(""); this.domHelper().append(this.element(), {tag:'div', cls:'oneTimePasswordReadOnlyMessage', htmlString:Clipperz.PM.Strings['oneTimePasswordReadOnlyMessage']}); } else { var deferredResult; deferredResult = new MochiKit.Async.Deferred(); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 1: " + res); return res;}); deferredResult.addCallback(MochiKit.Base.bind(function() { this.element().update(""); Clipperz.YUI.DomHelper.append(this.element(), {tag:'div', htmlString:Clipperz.PM.Strings['oneTimePasswordLoadingMessage']}); }, this)); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 2: " + res); return res;}); deferredResult.addCallback(MochiKit.Base.method(this.user(), 'loadOneTimePasswords')); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 3: " + res); return res;}); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 3.1: " + Clipperz.Base.serializeJSON(res.serializedData())); return res;}); deferredResult.addCallback(MochiKit.Base.bind(function(aResult) { var tbodyElement; var oneTimePasswordReferenceKeys; var imageExtension; var isThereAnyActiveOneTimePassword; isThereAnyActiveOneTimePassword = false; this.element().update(""); Clipperz.YUI.DomHelper.append(this.element(), {tag:'div', id:'oneTimePasswordList', children:[ {tag:'div', id:'oneTimePasswords_header', children:[ {tag:'table', width:'100%', children:[ {tag:'tbody', children:[ {tag:'tr', children:[ {tag:'td', width:'10%', children:[ {tag:'div', id:this.getId('createNewOneTimePasswordButton')} ]}, {tag:'td', width:'40%', children:[ {tag:'div', id:this.getId('deleteSelectedOneTimePasswordButton')} ]}, {tag:'td', width:'50%', align:'right', children:[ {tag:'div', id:this.getId('printOneTimePasswordButton')} ]} ]} ]} ]}, {tag:'div', children:[ {tag:'ul', children:[ {tag:'li', children:[ {tag:'span', htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_selectLabel']} ]}, {tag:'li', children:[ {tag:'a', href:'#', id:this.getId('selectAllOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_all']} ]}, {tag:'li', children:[ {tag:'a', href:'#', id:this.getId('selectNoneOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_none']} diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js index f7991f1..defce91 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } //############################################################################# Clipperz.PM.Components.Panels.AccountPanel = function(anElement, args) { //MochiKit.Logging.logDebug(">>> new AccountPanel"); args = args || {}; Clipperz.PM.Components.Panels.AccountPanel.superclass.constructor.call(this, anElement, args); Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render'); this._shouldLoadLoginHistory = true; // this.render(); //MochiKit.Logging.logDebug("<<< new AccountPanel"); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.Panels.AccountPanel, Clipperz.PM.Components.Panels.BasePanel, { 'toString': function() { return "Clipperz.PM.Components.AccountPanel component"; }, //------------------------------------------------------------------------- 'render': function() { var errorMessageActor; var changePasswordButton; var deleteAccountButton; try { //MochiKit.Logging.logDebug(">>> AccountPanel.render"); Clipperz.NotificationCenter.unregister(this); MochiKit.Signal.disconnectAllTo(this); this.element().update(""); Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ {tag:'tbody', children:[ {tag:'tr', children:[ {tag:'td', valign:'top', width:'200', children:[ {tag:'ul', id:"accountSubMenu", cls:'subMenu', children:[ {tag:'li', id:'changePassphraseTab', htmlString:Clipperz.PM.Strings['changePasswordTabLabel']}, {tag:'li', id:'manageOTPTab', htmlString:Clipperz.PM.Strings['manageOTPTabLabel']}, {tag:'li', id:'accountPreferencesTab', htmlString:Clipperz.PM.Strings['accountPreferencesLabel']}, {tag:'li', id:'loginHistoryTab', htmlString:Clipperz.PM.Strings['accountLoginHistoryLabel']}, {tag:'li', id:'deleteAccountTab', htmlString:Clipperz.PM.Strings['deleteAccountTabLabel']} // {tag:'li', id:'paidAccountTab'), htmlString:Clipperz.PM.Strings['paidAccountTabLabel']} ]} ]}, {tag:'td', valign:'top', children:[ {tag:'ul', cls:'clipperzTabPanels', children:[ {tag:'li', id:this.getId('changePassphrasePanel'), children:[ {tag:'div', cls:'clipperzSubPanel', children:[ {tag:'h5', htmlString:Clipperz.PM.Strings['changePasswordTabTitle']}, {tag:'div', cls:'panelBody', id:'changePassphraseBlock', children:[ {tag:'form', id:this.getId('changePassphraseForm'), children:[ {tag:'h5', cls:'errorMessage', id:this.getId('changePassphrase_errorMessage')}, {tag:'table', cls:'panelBody', children:[ {tag:'tr', children:[ {tag:'td', children:[ {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormUsernameLabel']} ]}, {tag:'td', children:[ {tag:'input', type:'text', name:'username', id:this.getId('changePassphrase_username')} ]} ]}, {tag:'tr', children:[ {tag:'td', children:[ {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormOldPassphraseLabel']} ]}, {tag:'td', children:[ {tag:'input', type:'password', name:'oldPassphrase', id:this.getId('changePassphrase_oldPassphrase')} ]} ]}, {tag:'tr', children:[ {tag:'td', children:[ {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormNewPassphraseLabel']} ]}, {tag:'td', children:[ {tag:'input', type:'password', name:'newPassphrase', id:this.getId('changePassphrase_newPassphrase')} ]} ]}, {tag:'tr', children:[ {tag:'td', children:[ {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormRetypePassphraseLabel']} diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js index 15dd622..f36e8b0 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js @@ -1,93 +1,91 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } //var _Clipperz_PM_Components_Panels_base_id_ = 0; //############################################################################# Clipperz.PM.Components.Panels.BasePanel = function(anElement, args) { args = args || {}; Clipperz.PM.Components.Panels.BasePanel.superclass.constructor.call(this, anElement, args); this._user = args.user || null; this._delegate = args.delegate || null; this._tabPanelController = null; // Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); // this._ids = {}; return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.Panels.BasePanel, Clipperz.PM.Components.BaseComponent, { 'toString': function() { return "Clipperz.PM.Components.Panels.BasePanel component"; }, //------------------------------------------------------------------------- 'user': function() { return this._user; }, 'setUser': function(aValue) { this._user = aValue; }, //------------------------------------------------------------------------- 'delegate': function() { return this._delegate; }, 'setDelegate': function(aValue) { this._delegate = aValue; }, //------------------------------------------------------------------------- 'tabPanelController': function() { return this._tabPanelController; }, 'switchLanguageHandler': function() { //MochiKit.Logging.logDebug(">>> BasePanel.switchLanguageHandler [" + this.toString() + "]"); this.render(); //MochiKit.Logging.logDebug("<<< BasePanel.switchLanguageHandler [" + this.toString() + "]"); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js index 5a91d83..3feed3d 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js @@ -1,102 +1,100 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } //############################################################################# Clipperz.PM.Components.Panels.ContactsPanel = function(anElement, args) { args = args || {}; Clipperz.PM.Components.Panels.ContactsPanel.superclass.constructor.call(this, anElement, args); this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.Panels.ContactsPanel, Clipperz.PM.Components.Panels.BasePanel, { 'toString': function() { return "Clipperz.PM.Components.ContactsPanel component"; }, //------------------------------------------------------------------------- 'render': function() { // var tabPanelControllerConfig; Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ {tag:'tbody', children:[ {tag:'tr', children:[ {tag:'td', valign:'top', width:'200', children:[ {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[ {tag:'li', id:this.getId('contacts'), htmlString:Clipperz.PM.Strings['contactsTabLabel']}, ]} ]}, {tag:'td', valign:'top', children:[ {tag:'ul', cls:'clipperzTabPanels', children:[ {tag:'li', id:this.getId('contactsPanel'), children:[ {tag:'div', cls:'clipperzSubPanel', children:[ {tag:'h5', htmlString:Clipperz.PM.Strings['contactsTabTitle']}, {tag:'div', htmlString:Clipperz.PM.Strings['comingSoon']} ]} ]} ]} ]} ]} ]} ]}); // tabPanelControllerConfig = {} // tabPanelControllerConfig[this.getId('contacts')] = this.getId('contactsPanel'); // new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('contacts') }); this.tabPanelController().setUp(); }, //------------------------------------------------------------------------- 'tabPanelController': function() { if (this._tabPanelController == null) { var tabPanelControllerConfig; tabPanelControllerConfig = {} tabPanelControllerConfig[this.getId('contacts')] = this.getId('contactsPanel'); this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('contacts') }); } return this._tabPanelController; }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js index 11d4bd7..520542c 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } //############################################################################# Clipperz.PM.Components.Panels.DataPanel = function(anElement, args) { args = args || {}; Clipperz.PM.Components.Panels.DataPanel.superclass.constructor.call(this, anElement, args); this._progressWidth = 400; this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.Panels.DataPanel, Clipperz.PM.Components.Panels.BasePanel, { 'toString': function() { return "Clipperz.PM.Components.DataPanel component"; }, //------------------------------------------------------------------------- 'render': function() { MochiKit.Signal.disconnectAllTo(this); Clipperz.NotificationCenter.unregister(this); this.element().update(""); Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ {tag:'tbody', children:[ {tag:'tr', children:[ {tag:'td', valign:'top', width:'200', children:[ {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[ {tag:'li', id:'offlineCopyTab', htmlString:Clipperz.PM.Strings['offlineCopyTabLabel']}, {tag:'li', id:'sharingTab', htmlString:Clipperz.PM.Strings['sharingTabLabel']}, {tag:'li', id:'importTab', htmlString:Clipperz.PM.Strings['importTabLabel']}, {tag:'li', id:'printingTab', htmlString:Clipperz.PM.Strings['printingTabLabel']} ]} ]}, {tag:'td', valign:'top', children:[ {tag:'ul', cls:'clipperzTabPanels', children:[ {tag:'li', id:this.getId('offlineCopyPanel'), children:[ {tag:'div', cls:'clipperzSubPanel', children:[ {tag:'h5', htmlString:Clipperz.PM.Strings['offlineCopyTabTitle']}, {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['offlineCopyTabDescription']}, {tag:'div', id:this.getId('offlineCopyLinkBox'), children:[ {tag:'a', id:'offlineCopyLink', href:'#', htmlString:Clipperz.PM.Strings['offlineCopyDownloadLinkLabel']} ]}, {tag:'div', id:this.getId('offlineCopyLinkBox_read-only'), children:[ {tag:'span', cls:'read-only', htmlString:Clipperz.PM.Strings['offlineCopyDownloadLinkLabel']} ]} ]} ]}, {tag:'li', id:this.getId('sharingPanel'), children:[ {tag:'div', cls:'clipperzSubPanel', children:[ {tag:'h5', htmlString:Clipperz.PM.Strings['sharingTabTitle']}, {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['sharingTabDescription']} ]} ]}, {tag:'li', id:this.getId('importPanel'), children:[ {tag:'div', cls:'clipperzSubPanel', children:[ {tag:'div', id:this.getId('importPanelMainComponent')} ]} ]}, {tag:'li', id:this.getId('printingPanel'), children:[ {tag:'div', cls:'clipperzSubPanel', children:[ {tag:'h5', htmlString:Clipperz.PM.Strings['printingTabTitle']}, {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['printingTabDescription']}, {tag:'div', id:this.getId('printingLinkBox'), children:[ {tag:'a', id:'printingLink', href:'#', htmlString:Clipperz.PM.Strings['printingLinkLabel']} ]}, {tag:'hr'}, {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['exportTabDescription']}, {tag:'div', id:this.getId('exportLinkBox'), children:[ {tag:'a', id:'exportLink', href:'#', htmlString:Clipperz.PM.Strings['exportLinkLabel']} ]} ]} ]} ]} ]} ]} ]} ]}); diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js index ef2b91c..3081a9d 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } Clipperz.PM.Components.Panels.LoginPanel = function(anElement, args) { args = args || {}; Clipperz.PM.Components.Panels.LoginPanel.superclass.constructor.call(this, anElement, args); this._showLoginFormAnimator = null; this._showRegistrationFormAnimator = null; this._shouldShowRegistrationAlert = true; this._visibleForm = null; // this._isPassphraseVisible = true; Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); this.render(); return this; } //============================================================================= //MochiKit.Base.update(Clipperz.PM.Components.Panels.LoginPanel.prototype, { YAHOO.extendX(Clipperz.PM.Components.Panels.LoginPanel, Clipperz.PM.Components.Panels.BasePanel, { 'toString': function() { return "Clipperz.PM.Components.LoginPanel component"; }, //------------------------------------------------------------------------- 'render': function() { var result; var layout; var registerButton; MochiKit.Signal.disconnectAllTo(this); this.element().update(""); //MochiKit.Logging.logDebug(">>> LoginPanel.initPanel"); Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[ {tag:'table', children:[ {tag:'thead'}, {tag:'tbody', children:[ {tag:'tr', children:[ {tag:'td', valign:'top', children:[ {tag:'div', cls:'clipperzServiceDescription', htmlString:Clipperz.PM.Strings['clipperzServiceDescription']} ]}, {tag:'td', valign:'top', align:'right', children:[ {tag:'div', id:this.getId('forms'), cls:'clipperzLoginForm', children:[ {tag:'div', id:this.getId('loginForm'), cls:'loginForm', children:[ {tag:'div', cls:'loginFormHeaderBox', children:[{tag:'h3', htmlString:Clipperz.PM.Strings['loginFormTitle']}]}, {tag:'form', id:this.getId('loginForm_form'), autocomplete:'off', children:[ {tag:'table', cls:'formLayout', children:[ {tag:'thead'}, {tag:'tbody', children:[ {tag:'tr', cls:'formFieldTR', children:[ {tag:'td', width:'90', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']}, {tag:'td', children:[ {tag:'input', id:this.getId('login_username'), cls:'loginFormField', type:'text', name:'username'} ]} ]}, {tag:'tr', cls:'formFieldTR', children:[ {tag:'td', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']}, {tag:'td', children:[ {tag:'div', id:this.getId('passphraseDIV'), children:[ {tag:'input', id:this.getId('login_passphrase'), cls:'loginFormField', type:'password', name:'passphrase'} ]}, {tag:'div', cls:'oneTimePassword', id:this.getId('oneTimePasswordDIV'), children:[ {tag:'input', type:'text', id:this.getId('oneTimePassword_1'), name:'passphrase'}, {tag:'span', html:'-'}, {tag:'input', type:'text', id:this.getId('oneTimePassword_2'), name:'passphrase'}, {tag:'span', html:'-'}, {tag:'input', type:'text', id:this.getId('oneTimePassword_3'), name:'passphrase'}, {tag:'span', html:'-'}, {tag:'input', type:'text', id:this.getId('oneTimePassword_4'), name:'passphrase'} ]} ]} ]}, {tag:'tr', cls:'formFieldTR', id:this.getId('passwordTypeChooserTR'), children:[ {tag:'td', valign:'top', align:'right', children:[ {tag:'input', type:'checkbox', cls:'passwordTypeCheckbox', id:this.getId('useOneTimePasswordCheckbox')} ]}, {tag:'td', children:[ {tag:'div', cls:'passwordTypeChooser', children:[ {tag:'h4', htmlString:Clipperz.PM.Strings['loginFormOneTimePasswordCheckboxLabel']}, {tag:'span', htmlString:Clipperz.PM.Strings['loginFormOneTimePasswordCheckboxDescription']} diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js index b8cc556..17ed8e4 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } //############################################################################# Clipperz.PM.Components.Panels.LogoutPanel = function(args) { args = args || {}; Clipperz.PM.Components.Panels.LogoutPanel.superclass.constructor.call(this, args); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.Panels.LogoutPanel, Clipperz.PM.Components.Panels.BasePanel, { 'toString': function() { return "Clipperz.PM.Components.LogoutPanel component"; }, //------------------------------------------------------------------------- 'initPanel': function() { var result; var layout; result = new YAHOO.ext.ContentPanel(this.getId('panel'), {title:'logout', closable:false, autoCreate:true}); Clipperz.YUI.DomHelper.append(result.getEl().dom, {tag:'div', children:[ {tag:'h2', html:'Logout panel'} ]} ); return result; }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js index 29ef516..c19a8a3 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } //############################################################################# Clipperz.PM.Components.Panels.MainPanel = function(anElement, args) { args = args || {}; Clipperz.PM.Components.Panels.MainPanel.superclass.constructor.call(this, anElement, args); this._recordListDataModel = null; this._selectedRecord = null; this._recordDetailComponent = null; this._recordListGrid = null; this._directLinkItemTemplate = null; this._recordItemTemplate = null; this._addNewRecordButton = null; this._deleteRecordButton = null; this._creationWizard = null; Clipperz.NotificationCenter.register(null, 'selectAndEnterEditMode', this, 'selectRecordAndEnterEditModeHandler'); Clipperz.NotificationCenter.register(null, 'recordAdded', this, 'recordAddedHandler'); Clipperz.NotificationCenter.register(null, 'recordUpdated', this, 'recordUpdatedHandler'); Clipperz.NotificationCenter.register(null, 'recordRemoved', this, 'recordRemovedHandler'); Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler'); Clipperz.NotificationCenter.register(null, 'directLoginUpdated', this, 'directLoginUpdatedHandler'); Clipperz.NotificationCenter.register(null, 'directLoginRemoved', this, 'directLoginRemovedHandler'); Clipperz.NotificationCenter.register(null, 'accountLocked', this, 'accountLockedHandler'); MochiKit.Signal.connect(MochiKit.DOM.currentWindow(), 'onresize', this, 'resizeModalMask'); this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.Panels.MainPanel, Clipperz.PM.Components.Panels.BasePanel, { 'toString': function() { return "Clipperz.PM.Components.Panels.MainPanel component"; }, //------------------------------------------------------------------------- 'render': function() { this.element().update(""); Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', id:'mainPanelTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[ {tag:'tbody', children:[ {tag:'tr', children:[ {tag:'td', width:'15', children:[ {tag:'div', cls:'mainPanelMinHeightDiv'} ]}, {tag:'td', valign:'top', id:'directLoginsTD', width:'200', children:[ {tag:'div', id:'directLoginsBlock', children:[ {tag:'div', cls:'directLoginsBlockHeaderBox', children:[{tag:'h3', id:'directLoginTitle', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockLabel']}]}, {tag:'div', id:'directLoginsDescription', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockDescription']}, {tag:'ul', id:'directLogins'} ]} ]}, {tag:'td', width:'15', children:[ {tag:'div', cls:'mainPanelMinHeightDiv'} ]}, {tag:'td', valign:'top', children:[ {tag:'div', id:'mainContent', children:[ {tag:'div', id:'recordListBlockHeader'}, {tag:'div', id:'recordListAndDetailBlock', children:[ {tag:'table', id:'recordListAndDetailBlockTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[ {tag:'tbody', children:[ {tag:'tr', children:[ {tag:'td', valign:'top', width:'250', children:[ {tag:'div', id:'recordListBlock', children:[ {tag:'div', id:'recordListFilterHeader'}, {tag:'ul', id:'records'} ]} ]}, {tag:'td', id:'recordDetailSeparatorTD', rowspan:'2', valign:'top', bgcolor:'#ddddff', html:' '}, {tag:'td', valign:'top', children:[ {tag:'div', id:'recordDetailMainBlock', children:[ {tag:'div', id:'recordTitleTopBlock'}, {tag:'div', id:'recordDetailBlock', children:[ {tag:'div', id:'recordDetail'} ]} ]}, {tag:'div', id:'recordCreationWizardMainBlock', children:[ diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js index 4f2a015..1c799d0 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } //############################################################################# Clipperz.PM.Components.Panels.ToolsPanel = function(anElement, args) { args = args || {}; Clipperz.PM.Components.Panels.ToolsPanel.superclass.constructor.call(this, anElement, args); this._generateButtonElement = null; this._needsRenderingUponTabSwitch = false; this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.Panels.ToolsPanel, Clipperz.PM.Components.Panels.BasePanel, { 'toString': function() { return "Clipperz.PM.Components.Panels.ToolsPanel component"; }, //------------------------------------------------------------------------- 'render': function() { var bookmarkletUrl; //MochiKit.Logging.logDebug(">>> ToolsPanel.render"); Clipperz.NotificationCenter.unregister(this); MochiKit.Signal.disconnectAllTo(this); if (Clipperz_IEisBroken == true) { bookmarkletUrl = bookmarklet_ie; } else { bookmarkletUrl = bookmarklet; } this.element().update(""); Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ {tag:'tbody', children:[ {tag:'tr', children:[ {tag:'td', valign:'top', width:'200', children:[ {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[ {tag:'li', id:this.getId('passwordGenerator'), htmlString:Clipperz.PM.Strings['passwordGeneratorTabLabel']}, {tag:'li', id:this.getId('bookmarklet'), htmlString:Clipperz.PM.Strings['bookmarkletTabLabel']}, {tag:'li', id:this.getId('compact'), htmlString:Clipperz.PM.Strings['compactTabLabel']}, {tag:'li', id:this.getId('httpAuth'), htmlString:Clipperz.PM.Strings['httpAuthTabLabel']} ]} ]}, {tag:'td', valign:'top', children:[ {tag:'ul', cls:'clipperzTabPanels', children:[ {tag:'li', id:this.getId('passwordGeneratorPanel'), children:[ {tag:'div', cls:'clipperzSubPanel', children:[ {tag:'h5', htmlString:Clipperz.PM.Strings['passwordGeneratorTabTitle']}, {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['paswordGeneratorTabDescription']}, //--------------------------------------------------- {tag:'div', children:[ {tag:'form', id:this.getId('passwordGeneratorForm'), cls:'passwordGenerator', children:[ {tag:'input', type:'text', cls:'clipperz_passwordGenerator_password', id:this.getId('passwordField')}, {tag:'table', children:[ {tag:'tbody', children:[ {tag:'tr', children:[ {tag:'td', width:'20%', children:[ {tag:'input', type:'checkbox', name:'lowercase', id:this.getId('lowercase'), checked:true}, {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLowercaseLabel']} ]}, {tag:'td', width:'20%', children:[ {tag:'input', type:'checkbox', name:'uppercase', id:this.getId('uppercase'), checked:true}, {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorUppercaseLabel']} ]}, {tag:'td', width:'20%', children:[ {tag:'input', type:'checkbox', name:'numbers', id:this.getId('numbers'), checked:true}, {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorNumberLabel']} ]}, {tag:'td', width:'20%', children:[ {tag:'input', type:'checkbox', name:'symbols', id:this.getId('symbols'), checked:true}, {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorSymbolLabel']} ]}, {tag:'td', width:'20%', children:[ {tag:'span', cls:'passwordGeneratorLength', children:[ {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLengthLabel']}, {tag:'span', id:this.getId('passwordLength'), cls:'passwordGeneratorLengthValue', html:'0'} ]} ]} ]} ]} diff --git a/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js b/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js index 784dce9..b64e0f7 100644 --- a/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js +++ b/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js @@ -1,115 +1,113 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } Clipperz.PM.Components.PasswordEntropyDisplay = function(anElement, args) { args = args || {}; //MochiKit.Logging.logDebug(">>> new TextFormField"); Clipperz.PM.Components.PasswordEntropyDisplay.superclass.constructor.call(this, anElement, args); this._wrapperElement = null; this._entropyElement = null; this.render(); //MochiKit.Logging.logDebug("<<< new TextFormField"); return this; }; YAHOO.extendX(Clipperz.PM.Components.PasswordEntropyDisplay, Clipperz.PM.Components.BaseComponent, { 'toString': function() { return "Clipperz.PM.Components.PasswordEntropyDisplay"; }, //----------------------------------------------------- 'wrapperElement': function() { return this._wrapperElement; }, 'setWrapperElement': function(aValue) { this._wrapperElement = aValue; }, //----------------------------------------------------- 'passwordElement': function() { return this.element(); }, //----------------------------------------------------- 'entropyElement': function() { return this._entropyElement; }, 'setEntropyElement': function(aValue) { this._entropyElement = aValue; }, //----------------------------------------------------- 'render': function() { MochiKit.Signal.disconnectAllTo(this); this.setWrapperElement(this.element().wrap({tag:'div'})); this.setEntropyElement(Clipperz.YUI.DomHelper.append(this.wrapperElement().dom, {tag:'div', cls:'passwordEntropy', html:" "}, true)); // this.entropyElement().setWidth(this.passwordElement().getWidth()); this.updateEntropyElement(); MochiKit.Signal.connect(this.element().dom, 'onkeyup', this, 'updateEntropyElement'); MochiKit.Signal.connect(this.element().dom, 'onchange', this, 'updateEntropyElement'); MochiKit.Signal.connect(this.element().dom, 'onblur', this, 'updateEntropyElement'); }, //----------------------------------------------------- 'computeEntropyForString': function(aValue) { return Clipperz.PM.Crypto.passwordEntropy(aValue); }, //----------------------------------------------------- 'updateEntropyElement': function(anEvent) { //MochiKit.Logging.logDebug(">>> PasswordEntropyDisplay.updateEntropyElement"); var maxExtent; var entropy; entropy = Math.min(128, this.computeEntropyForString(this.passwordElement().dom.value)); //MochiKit.Logging.logDebug("--- PasswordEntropyDisplay.updateEntropyElement - entropy: " + entropy); this.entropyElement().setStyle('background-position', "0px " + -entropy + "px"); this.entropyElement().setWidth(this.passwordElement().getWidth() * (entropy/128)); //MochiKit.Logging.logDebug("<<< PasswordEntropyDisplay.updateEntropyElement"); }, //----------------------------------------------------- __syntaxFix__: '__syntaxFix__' }); diff --git a/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js b/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js index 87c52b2..67db50a 100644 --- a/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js +++ b/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } Clipperz.PM.Components.PasswordGenerator = function(anElement, aFieldValueComponent, args) { args = args || {}; //MochiKit.Logging.logDebug(">>> new TextFormField"); Clipperz.PM.Components.PasswordGenerator.superclass.constructor.call(this, anElement, args); this._fieldValueComponent = aFieldValueComponent; this._panelButton = null; this.render(); //MochiKit.Logging.logDebug("<<< new TextFormField"); return this; }; YAHOO.extendX(Clipperz.PM.Components.PasswordGenerator, Clipperz.PM.Components.BaseComponent, { 'toString': function() { return "Clipperz.PM.Components.PasswordGenerator"; }, //----------------------------------------------------- 'fieldValueComponent': function() { return this._fieldValueComponent; }, //----------------------------------------------------- 'render': function() { MochiKit.Signal.disconnectAllTo(this); // this._panelButton = new YAHOO.ext.Button(this.element().dom, {text:Clipperz.PM.Strings['passwordGeneratorButtonLabel'], handler:this.openPasswordPanel, scope:this}); MochiKit.Signal.connect(this.element().dom, 'onmouseenter', this, 'onMouseEnter'); MochiKit.Signal.connect(this.element().dom, 'onmouseleave', this, 'onMouseLeave'); MochiKit.Signal.connect(this.element().dom, 'onclick', this, 'openPasswordPanel'); }, //----------------------------------------------------- 'onMouseEnter': function() { this.element().addClass('hover'); }, 'onMouseLeave': function() { this.element().removeClass('hover'); }, //----------------------------------------------------- 'panelButton': function() { return this._panelButton; }, //----------------------------------------------------- 'openPasswordPanel': function() { var passwordGeneratorElement; var passwordGeneratorDialog; var cancelButton; var okButton; var cancelFunction; var okFunction; //MochiKit.Logging.logDebug(">>> PasswordGenerator.openPasswordPanel"); passwordGeneratorElement = Clipperz.YUI.DomHelper.append(document.body, {tag:'div', id:'passwordGenerator', children:[ {tag:'div', cls:'ydlg-hd', htmlString:Clipperz.PM.Strings['passwordGeneratorPanelTitle']}, {tag:'div', cls:'ydlg-bd', children:[ {tag:'form', id:this.getId('passwordGeneratorForm'), cls:'passwordGenerator', children:[ {tag:'input', type:'text', cls:'clipperz_passwordGenerator_password', id:this.getId('passwordField')}, {tag:'table', children:[ {tag:'tbody', children:[ {tag:'tr', children:[ {tag:'td', width:'20%', children:[ {tag:'input', type:'checkbox', name:'lowercase', id:this.getId('lowercase'), checked:true}, {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLowercaseLabel']} ]}, {tag:'td', width:'20%', children:[ {tag:'input', type:'checkbox', name:'uppercase', id:this.getId('uppercase'), checked:true}, {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorUppercaseLabel']} ]}, {tag:'td', width:'20%', children:[ {tag:'input', type:'checkbox', name:'numbers', id:this.getId('numbers'), checked:true}, {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorNumberLabel']} ]}, {tag:'td', width:'20%', children:[ {tag:'input', type:'checkbox', name:'symbols', id:this.getId('symbols'), checked:true}, {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorSymbolLabel']} ]}, {tag:'td', width:'20%', children:[ diff --git a/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js b/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js index b3debad..821dc94 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js +++ b/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js @@ -1,25 +1,23 @@ /* -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/. */ diff --git a/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js b/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js index b3debad..821dc94 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js +++ b/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js @@ -1,25 +1,23 @@ /* -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/. */ diff --git a/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js b/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js index 5f5c29f..170bd09 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js +++ b/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js @@ -1,92 +1,90 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.Printing) == 'undefined') { Clipperz.PM.Components.Printing = {}; } Clipperz.PM.Components.Printing.Record = function(args) { args = args || {}; this._record = args['record']; return this; } MochiKit.Base.update(Clipperz.PM.Components.Printing.Record.prototype, { 'record': function() { return this._record; }, //------------------------------------------------------------------------- 'deferredDrawToWindow': function(aWindow) { var deferredResult; deferredResult = new MochiKit.Async.Deferred(); deferredResult.addCallback(MochiKit.Base.method(this.record(), 'deferredData')); deferredResult.addCallback(MochiKit.Base.method(this, 'appendToWindow', aWindow)); deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'appendToWindow': function(aWindow) { MochiKit.DOM.withWindow(aWindow, MochiKit.Base.bind(function() { var newBlock; var fields; fields = MochiKit.Base.concat( MochiKit.Base.map(MochiKit.Base.bind(function(aField) { var result; var dt, dd; var label, value; label = aField.label(); value = aField.value(); dt = MochiKit.DOM.createDOM('DT', null, label); dd = MochiKit.DOM.createDOM('DD', null, value) result = [dt, dd]; return result }, this), MochiKit.Base.values(this.record().currentVersion().fields())) ); newBlock = MochiKit.DOM.DIV({'class': 'recordBlock'}, MochiKit.DOM.H2(null, this.record().label()), MochiKit.DOM.DIV({'class': 'recordNotes'}, MochiKit.Base.map(MochiKit.Base.partial(MochiKit.DOM.P, null), this.record().notes().split("\n"))), MochiKit.DOM.createDOM('DL', null, fields) ); MochiKit.DOM.appendChildNodes(MochiKit.DOM.currentDocument().body, newBlock); }, this)); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js index 5b50284..d6fde5c 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js @@ -1,102 +1,100 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } //############################################################################# Clipperz.PM.Components.RecordDetail.AbstractComponent = function(anElement, args) { args = args || {}; Clipperz.PM.Components.RecordDetail.AbstractComponent.superclass.constructor.call(this, args); this._element = anElement; this._mainComponent = args.mainComponent; return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractComponent, Clipperz.PM.Components.BaseComponent, { 'toString': function() { return "Clipperz.PM.Components.RecordDetail.AbstractComponent"; }, //------------------------------------------------------------------------- 'mainComponent': function() { return this._mainComponent; }, //------------------------------------------------------------------------- 'record': function() { return this.mainComponent().record(); }, //------------------------------------------------------------------------- 'editMode': function() { return this.mainComponent().editMode(); }, //------------------------------------------------------------------------- 'render': function() { this.element().update(""); this.update(); }, //------------------------------------------------------------------------- 'update': function(anEvent) { if (this.editMode() == 'EDIT') { this.updateEditMode(); } else if (this.editMode() == 'VIEW') { this.updateViewMode(); } }, //------------------------------------------------------------------------- 'updateViewMode': function() {}, 'updateEditMode': function() {}, 'synchronizeComponentValues': function() {}, //------------------------------------------------------------------------- 'destroy': function() { this.element().remove(); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js index ad733aa..ede42c2 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js @@ -1,74 +1,72 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } //############################################################################# Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent = function(anElement, args) { args = args || {}; Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent.superclass.constructor.call(this, anElement, args); this._fieldComponent = args.fieldComponent || null; this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 'toString': function() { return "Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent"; }, //------------------------------------------------------------------------- 'fieldComponent': function() { return this._fieldComponent; }, //------------------------------------------------------------------------- 'mainComponent': function() { return this.fieldComponent().mainComponent(); }, //------------------------------------------------------------------------- 'recordField': function() { return this.fieldComponent().recordField(); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js index d4c7837..c703db4 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } //############################################################################# Clipperz.PM.Components.RecordDetail.CreationWizard = function(anElement, args) { args = args || {}; Clipperz.PM.Components.RecordDetail.CreationWizard.superclass.constructor.call(this, anElement, args); this._mainComponent = args.mainComponent; this._previouslySelectedRecord = args.previouslySelectedRecord; //MochiKit.Logging.logDebug("--- new CreationWizard - previouslySelectedRecord: " + args.previouslySelectedRecord); this._createButton_header = null; this._createButton_footer = null; this._cancelButton_header = null; this._cancelButton_footer = null; this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.RecordDetail.CreationWizard, Clipperz.PM.Components.BaseComponent, { 'toString': function() { return "Clipperz.PM.Components.RecordDetail.CreationWizard component"; }, //------------------------------------------------------------------------- 'previouslySelectedRecord': function() { return this._previouslySelectedRecord; }, //------------------------------------------------------------------------- 'render': function() { var templateListElement; var templates; this.element().update(""); Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'form', cls:'recordDataFORM', id:this.getId('form'), children:[ {tag:'div', id:'recordDetailDataBox', cls:'recordDetailDataBox', children:[ {tag:'div', id:this.getId('wizardBox'), cls:'recordCreationWizard', children:[ {tag:'div', id:this.getId('recordCreationWizardTitleBox'), cls:'recordCreationWizardTitleBox', htmlString:Clipperz.PM.Strings['newRecordWizardTitleBox']}, {tag:'ul', id:this.getId('templateList'), cls:'radioList'} ]} ]} ]} ); Clipperz.YUI.DomHelper.append(this.getDom('recordCreationWizardTitleBox'), {tag:'div', cls:'newRecordWizardHeader', children:[ {tag:'table', width:'100%', cellpadding:'5', children:[ {tag:'tbody', children:[ {tag:'tr', children:[ {tag:'td', width:'49%', align:'right', children:[ {tag:'div', id:this.getId('cancelButton_header')} ]}, {tag:'td', width:'10', html:' '}, {tag:'td', width:'49%', align:'left', children:[ {tag:'div', id:this.getId('createButton_header')} ]} ]} ]} ]} ]}); templateListElement = this.getElement('templateList'); templates = Clipperz.PM.Strings['recordTemplates']; MochiKit.Iter.forEach(MochiKit.Base.keys(templates), MochiKit.Base.bind(function(aTemplateKey) { Clipperz.YUI.DomHelper.append(templateListElement.dom, {tag:'li', children:[ {tag:'table', children:[ {tag:'tbody', children:[ {tag:'tr', children:[ {tag:'td', valign:'top', children:[ {tag:'input', id:this.getId(aTemplateKey+"_radio"), type:'radio', name:'recordTemplate', value:"aTemplateKey"} ]}, {tag:'td', valign:'top', children:[ {tag:'h4', id:this.getId(aTemplateKey+"_title"), html:templates[aTemplateKey]['title']}, {tag:'div', cls:'templateDescription', htmlString:templates[aTemplateKey]['description']} ]} ]} ]} ]} ]}); diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js index 36dd9a8..0e4640e 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } //############################################################################# Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent = function(anElement, args) { //MochiKit.Logging.logDebug(">>> new DirectLoginBindingComponent"); args = args || {}; Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent.superclass.constructor.call(this, anElement, args); this._directLoginBinding = args.directLoginBinding || null; this.render(); Clipperz.NotificationCenter.register(this.record(), 'addNewRecordField', this, 'syncAndUpdateEditMode'); Clipperz.NotificationCenter.register(this.record(), 'removedField', this, 'syncAndUpdateEditMode'); Clipperz.NotificationCenter.register(this.record(), 'updatedFieldLabel', this, 'syncAndUpdateEditMode'); //MochiKit.Logging.logDebug("<<< new DirectLoginBindingComponent"); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 'toString': function() { return "Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent component"; }, //------------------------------------------------------------------------- 'directLoginBinding': function() { return this._directLoginBinding; }, //------------------------------------------------------------------------- 'render': function() { // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', style:'font-weight:bold;', html:this.directLoginBinding().key()}) // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.directLoginBinding().value()}) //MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.render"); Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingLabelTD', children:[ {tag:'span', html:this.directLoginBinding().key()} ]}); //MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 1"); Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingValueTD', children:[ {tag:'div', id:this.getId('editModeBox'), children:[ {tag:'select', id:this.getId('select'), children:this.recordFieldOptions()} ]}, {tag:'div', id:this.getId('viewModeBox'), children:[ {tag:'span', id:this.getId('viewValue'), html:""} ]} ]}); //MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 2"); this.getElement('editModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); this.getElement('viewModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); this.update(); //MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.render"); }, //------------------------------------------------------------------------- 'recordFieldOptions': function() { var result; var option; var recordFieldKey; var recordFields; //MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.recordFieldOptions"); recordFields = this.directLoginBinding().directLogin().record().currentVersion().fields(); result = []; option = {tag:'option', value:null, html:'---'}; result.push(option); for (recordFieldKey in recordFields) { // TODO: remove the value: field and replace it with element.dom.value = <some value> option = {tag:'option', value:recordFieldKey, html:recordFields[recordFieldKey].label()} if (recordFieldKey == this.directLoginBinding().fieldKey()) { option['selected'] = true; } result.push(option); } //MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.recordFieldOptions"); return result; }, //------------------------------------------------------------------------- 'syncAndUpdateEditMode': function() { diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js index 69cad79..883c45c 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } //############################################################################# Clipperz.PM.Components.RecordDetail.DirectLoginComponent = function(anElement, args) { args = args || {}; Clipperz.PM.Components.RecordDetail.DirectLoginComponent.superclass.constructor.call(this, anElement, args); this._directLogin = args.directLogin || null; // this._titleElement = null; this._structureElement = null; this._removeButton = null; this._directLoginBindingComponents = null; this._collapser = null; this.mainComponent().addEditComponent(this); this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 'toString': function() { return "Clipperz.PM.Components.RecordDetail.DirectLoginComponent component"; }, //------------------------------------------------------------------------- 'directLogin': function() { return this._directLogin; }, 'directLoginBindingComponents': function() { return this._directLoginBindingComponents; }, //------------------------------------------------------------------------- 'removeDirectLogin': function() { //MochiKit.Logging.logDebug(">>> DirectLoginComponent.removeDirectLogin"); this.mainComponent().synchronizeComponentValues(); this.directLogin().remove(); this.mainComponent().removeEditComponent(this); this.mainComponent().render(); //MochiKit.Logging.logDebug("<<< DirectLoginComponent.removeDirectLogin"); }, //------------------------------------------------------------------------- /* 'formDataValue': function() { return Clipperz.Base.serializeJSON(this.directLogin().formData()); }, 'setFormDataValue': function(aValue) { }, */ //------------------------------------------------------------------------- 'removeButton': function() { return this._removeButton; }, 'setRemoveButton': function(aValue) { this._removeButton = aValue; }, //------------------------------------------------------------------------- /* 'titleElement': function() { return this._titleElement; }, 'setTitleElement': function(aValue) { this._titleElement = aValue; }, */ //------------------------------------------------------------------------- 'structureElement': function() { return this._structureElement; }, 'setStructureElement': function(aValue) { this._structureElement = aValue; }, diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js index d210100..b478d94 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } //############################################################################# Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent = function(anElement, args) { //MochiKit.Logging.logDebug(">>> new DirectLoginValueComponent"); args = args || {}; Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent.superclass.constructor.call(this, anElement, args); this._directLoginInputValue = args.directLoginInputValue || null; this._value = this.directLoginInputValue().directLogin().formValues()[this.directLoginInputValue().name()]; this.render(); //MochiKit.Logging.logDebug("<<< new DirectLoginValueComponent - record: " + this.record()); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 'toString': function() { return "Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent component - " + this.directLoginInputValue().name(); }, //------------------------------------------------------------------------- 'directLoginInputValue': function() { return this._directLoginInputValue; }, //------------------------------------------------------------------------- 'render': function() { //MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.render"); Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataLabelTD', children:[ {tag:'span', html:this.directLoginInputValue().name()} ]}); //MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 1"); Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataValueTD', children:[ {tag:'span', id:this.getId('inputElement')} ]}); //MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 2"); this.update(); //MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.render"); }, //------------------------------------------------------------------------- 'inputElementConfiguration': function() { var result; var currentValue; //MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.inputElementConfiguration - " + this.directLoginInputValue().name()); result = []; currentValue = this.value(); switch (this.directLoginInputValue().type()) { case 'checkbox': var checkbox; //{"type":"checkbox", "name":"rememberUsernameChk", "value":"checkbox"} checkbox = {tag:'input', id:this.getId('checkbox'), type:'checkbox'} if (currentValue == true) { checkbox.checked = true; } result.push(checkbox); break; case 'select': var input; //{"type":"select", "name":"DOMAIN", "options":[{"selected":true, "label":"@tin.it", "value":"tin.it"}, {"selected":false, "label":"@virgilio.it", "value":"virgilio.it"}]} input = {tag:'select', id:this.getId('select'), name:this.directLoginInputValue().name(), children:[]}; input.children.push({tag:'option', value:null, html:"---"}); MochiKit.Iter.forEach(this.directLoginInputValue().args()['options'], function(anOption) { var option; // TODO: remove the value: field and replace it with element.dom.value = <some value> option = {tag:'option', value:anOption['value'], html:anOption['label']} if (currentValue == anOption['value']) { option.selected = true; } input.children.push(option); }) result.push(input); break; case 'radio': var name; diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js index 1396bd8..878adce 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } //############################################################################# Clipperz.PM.Components.RecordDetail.DirectLoginsComponent = function(anElement, args) { //MochiKit.Logging.logDebug(">>> new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent"); args = args || {}; //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 0"); Clipperz.PM.Components.RecordDetail.DirectLoginsComponent.superclass.constructor.call(this, anElement, args); //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 1"); this._addDirectLoginButton = null; //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 2"); this.mainComponent().addEditComponent(this); //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 3"); this.render(); //MochiKit.Logging.logDebug("<<< new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent"); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginsComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 'toString': function() { return "Clipperz.PM.Components.RecordDetail.DirectLoginsComponent component"; }, //------------------------------------------------------------------------- 'addDirectLoginButton': function() { return this._addDirectLoginButton; }, 'setAddDirectLoginButton': function(aValue) { this._addDirectLoginButton = aValue; }, //------------------------------------------------------------------------- 'render': function() { this.element().update(""); Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'directLoginsRecordBox', children:[ {tag:'h3', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockTitle']}, {tag:'ul', id:this.getId('directLogins')}, {tag:'div', cls:'addDirectLoginBox', id:this.getId('addDirectLogin'), children:[ {tag:'div', cls:'addDirectLoginBoxContent', children:[ {tag:'div', cls:'bookmarkletConfiguration', children:[ // {tag:'span', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationLabel']}, {tag:'div', htmlString:Clipperz.PM.Strings['recordDetailNewDirectLoginDescription']}, {tag:'textarea', id:this.getId('addDirectLoginTextarea')} ]}, {tag:'div', id:this.getId('addDirectLoginButton')} ]} ]} ]} ); if (MochiKit.Base.keys(this.record().directLogins()).length == 0) { //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 3"); Clipperz.YUI.DomHelper.append(this.getElement('directLogins'), {tag:'li', children:[ // {tag:'span', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredLabel']} {tag:'div', cls:'recordDetailNoDirectLoginDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription']} ]} ); //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 4"); } else { //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 5"); for (directLoginReference in this.record().directLogins()) { //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 6"); this.addDirectLogin(this.record().directLogins()[directLoginReference]); //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 7"); } //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 8"); } //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 9"); this.setAddDirectLoginButton(new YAHOO.ext.Button(this.getDom('addDirectLoginButton'), { text:Clipperz.PM.Strings['recordDetailAddNewDirectLoginButtonLabel'], handler:this.addNewDirectLogin, scope:this })); MochiKit.Signal.connect(this.getId('addDirectLoginTextarea'), 'onkeydown', this, 'onkeydown'); diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js index b79c365..661f94d 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js @@ -1,114 +1,112 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } //############################################################################# Clipperz.PM.Components.RecordDetail.FieldButtonComponent = function(anElement, args) { args = args || {}; Clipperz.PM.Components.RecordDetail.FieldButtonComponent.superclass.constructor.call(this, anElement, args); this._button = null; this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldButtonComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { 'toString': function() { return "Clipperz.PM.Components.RecordDetail.FieldButtonComponent"; }, //------------------------------------------------------------------------- 'buttonText': function() { var result; if (this.recordField() == null) { // TODO: this is never used. It is just an obsolete legacy chunk of code result = Clipperz.PM.Strings['recordDetailAddFieldButtonLabel']; } else { result = Clipperz.PM.Strings['recordDetailRemoveFieldButtonLabel']; } return result; }, //------------------------------------------------------------------------- 'button': function() { return this._button; }, 'setButton': function(aValue) { this._button = aValue; }, //------------------------------------------------------------------------- 'render': function() { this.element().update(""); Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('button')}) this.setButton(new YAHOO.ext.Button(this.getDom('button'), {text:this.buttonText(), handler:this.handleButtonClick, scope:this})); this.update(); }, //------------------------------------------------------------------------- 'handleButtonClick': function() { if (this.recordField() == null) { this.mainComponent().addNewField(); } else { this.mainComponent().removeField(this.fieldComponent()); } }, //------------------------------------------------------------------------- 'updateEditMode': function() { this.button().show(); }, //------------------------------------------------------------------------- 'updateViewMode': function() { this.button().hide(); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js index 978a54e..bfa4658 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } //############################################################################# Clipperz.PM.Components.RecordDetail.FieldComponent = function(anElement, args) { //MochiKit.Logging.logDebug(">>> new FieldComponent"); args = args || {}; Clipperz.PM.Components.RecordDetail.FieldComponent.superclass.constructor.call(this, anElement, args); this._element = anElement; this._recordField = args.recordField || null; this._buttonComponent = null; this._labelComponent = null; this._dragHandler = null; this._valueComponent = null; this._typeComponent = null; this.mainComponent().addEditComponent(this); this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 'toString': function() { return "Clipperz.PM.Components.RecordDetail.FieldComponent component"; }, //------------------------------------------------------------------------- 'recordField': function() { return this._recordField; }, //------------------------------------------------------------------------- 'buttonComponent': function() { return this._buttonComponent; }, 'setButtonComponent': function(aValue) { this._buttonComponent = aValue; }, //------------------------------------------------------------------------- 'labelComponent': function() { return this._labelComponent; }, 'setLabelComponent': function(aValue) { this._labelComponent = aValue; }, //------------------------------------------------------------------------- 'dragHandler': function() { return this._dragHandler; }, 'setDragHandler': function(aValue) { this._dragHandler = aValue; }, //------------------------------------------------------------------------- 'valueComponent': function() { return this._valueComponent; }, 'setValueComponent': function(aValue) { this._valueComponent = aValue; }, //------------------------------------------------------------------------- 'typeComponent': function() { return this._typeComponent; }, 'setTypeComponent': function(aValue) { this._typeComponent = aValue; }, diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js index f7c5e21..7fea132 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js @@ -1,56 +1,54 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } //############################################################################# Clipperz.PM.Components.RecordDetail.FieldDragHandler = function(anElement, args) { args = args || {}; Clipperz.PM.Components.RecordDetail.FieldDragHandler.superclass.constructor.call(this, anElement, args); this._element = anElement; this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldDragHandler, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { 'toString': function() { return "Clipperz.PM.Components.RecordDetail.FieldDragHandler component"; }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js index c58a7e2..c6f8cbf 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } //############################################################################# Clipperz.PM.Components.RecordDetail.FieldLabelComponent = function(anElement, args) { args = args || {}; Clipperz.PM.Components.RecordDetail.FieldLabelComponent.superclass.constructor.call(this, anElement, args); this._inputElement = null; this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldLabelComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { 'toString': function() { return "Clipperz.PM.Components.RecordDetail.FieldLabelComponent component"; }, //------------------------------------------------------------------------- 'value': function() { return this.recordField().label(); }, //------------------------------------------------------------------------- 'inputElement': function() { return this._inputElement; }, 'setInputElement': function(aValue) { this._inputElement = aValue; }, //------------------------------------------------------------------------- 'render': function() { var newTextFormField; this.element().update(""); Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'Clipperz_recordFieldLabel', id:this.getId('label')}); // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', style:'font-size:8pt;', html:this.recordField().key()}); // this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('label'), {editMode:this.editMode(), value:this.value()})); newTextFormField = new Clipperz.PM.Components.TextFormField(this.getElement('label'), {editMode:this.editMode(), value:this.value()}); // newTextFormField.inputElement().setStyle({border:'3px solid cyan;'}); newTextFormField.on('change', this.notifyChanges, this, true) // this.inputElement().on('change', function() {alert("CHANGE");}); // this.inputElement().getElement('editComponent_input').on('change', function() {alert("CHANGE");}) // this.inputElement().on('blur', this.notifyChanges, this, true); this.setInputElement(newTextFormField); this.update(); }, 'notifyChanges': function() { //MochiKit.Logging.logDebug(">>> FieldLabelComponent.notifyChanges - " + this); this.synchronizeComponentValues(); Clipperz.NotificationCenter.notify(this.recordField().recordVersion().record(), 'updatedFieldLabel'); //MochiKit.Logging.logDebug("<<< FieldLabelComponent.notifyChanges"); }, //------------------------------------------------------------------------- 'update': function() { //MochiKit.Logging.logDebug(">>> FieldLabelComponent.update"); this.inputElement().update({editMode:this.editMode(), value:this.value()}); //MochiKit.Logging.logDebug("<<< FieldLabelComponent.update"); }, //------------------------------------------------------------------------- /* 'updateViewMode': function() { var width; var element; this.element().update(""); width = this.element().getWidth(); element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.value()}, true); element.setWidth(width-1); }, //------------------------------------------------------------------------- 'updateEditMode': function() { diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js index 489258a..3108885 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } //############################################################################# Clipperz.PM.Components.RecordDetail.FieldTypeComponent = function(anElement, args) { args = args || {}; Clipperz.PM.Components.RecordDetail.FieldTypeComponent.superclass.constructor.call(this, anElement, args); this._inputElement = null; this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldTypeComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { 'toString': function() { return "Clipperz.PM.Components.RecordDetail.FieldTypeComponent component"; }, //------------------------------------------------------------------------- 'inputElement': function() { return this._inputElement; }, 'setInputElement': function(aValue) { this._inputElement = aValue; }, //------------------------------------------------------------------------- 'value': function() { return this.recordField().type(); }, 'canChangeType': function() { var value; var result; value = this.value(); result = ((value == 'TXT') || (value == 'PWD') || (value == 'URL') || (value == 'DATE') || (value == 'ADDR')); return result }, //------------------------------------------------------------------------- 'updateViewMode': function() { this.element().update(""); if (this.canChangeType()) { var width; var element; width = this.element().getWidth(true); element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.recordField().typeShortDescription()}, true); element.setWidth(width-1); } }, //------------------------------------------------------------------------- 'updateEditMode': function() { this.element().update(""); if (this.canChangeType()) { var width; width = this.element().getWidth(true); this.setInputElement(Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'select', children:[ {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']}, {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']}, {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']}, {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']}, {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']} // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['CHECK']['shortDescription']}, // {tag:'option', value:'RADIO', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['RADIO']['shortDescription']}, // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['SELECT']['shortDescription']} // {tag:'option', value:'NOTE', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['NOTE']['shortDescription']} ]}, true)); this.inputElement().setWidth(width-1); this.inputElement().addHandler('change', true, this.onChange, this, true); // this.selectCorrectOption(); Clipperz.DOM.selectOptionMatchingValue(this.inputElement().dom, this.value()); } diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js index 8621397..f2c70aa 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } //############################################################################# Clipperz.PM.Components.RecordDetail.FieldValueComponent = function(anElement, args) { args = args || {}; Clipperz.PM.Components.RecordDetail.FieldValueComponent.superclass.constructor.call(this, anElement, args); this._inputElement = null; this._scrambledStatus = 'SCRAMBLED'; // 'UNSCRAMBLED' this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldValueComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { 'toString': function() { return "Clipperz.PM.Components.RecordDetail.FieldValueComponent component"; }, //------------------------------------------------------------------------- 'value': function() { return this.recordField().value(); }, 'setValue': function(aValue) { this.recordField().setValue(aValue); }, //------------------------------------------------------------------------- 'inputElement': function() { return this._inputElement; }, 'setInputElement': function(aValue) { this._inputElement = aValue; }, //------------------------------------------------------------------------- 'scrambledStatus': function() { return this._scrambledStatus; }, 'setScrambledStatus': function(aValue) { this._scrambledStatus = aValue; }, //------------------------------------------------------------------------- 'handleTypeChange': function() { //MochiKit.Logging.logDebug(">>> handling type change - " + this.recordField().type()); this.synchronizeComponentValues(); this.update(); }, //------------------------------------------------------------------------- 'addrUrl': function() { var result; result = "http://maps.google.com/maps?q=" + this.value().split(' ').join('+'); return result; }, //------------------------------------------------------------------------- 'updateViewMode': function() { var scarmbledStatus; scrambledStatus = this.scrambledStatus() || 'SCRAMBLED'; this.element().update(""); if (this.recordField().hidden() == false) { switch(this.recordField().type()) { case 'TXT': case 'PWD': Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.value()}); break; case 'URL': var urlLocation; diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js index 46f456b..4f12c88 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } //############################################################################# Clipperz.PM.Components.RecordDetail.HeaderComponent = function(anElement, args) { args = args || {}; Clipperz.PM.Components.RecordDetail.HeaderComponent.superclass.constructor.call(this, anElement, args); this.mainComponent().addEditComponent(this); this._saveButton = null; this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.RecordDetail.HeaderComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 'toString': function() { return "Clipperz.PM.Components.RecordDetail.HeaderComponent component"; }, //------------------------------------------------------------------------- 'render': function() { var editButton; //MochiKit.Logging.logDebug(">>> RecordDetail.HeaderComponent.appendTo"); Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'recordDetailButtonsBox', children:[ {tag:'div', id:this.getId('editButtonBox'), children:[ {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[ {tag:'tbody', children:[ {tag:'tr', children:[ {tag:'td', align:'center', children:[ {tag:'div', id:this.getId('editButton')} ]} ]} ]} ]} ]}, {tag:'div', id:this.getId('saveCancelButtonBox'), children:[ {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[ {tag:'tbody', children:[ {tag:'tr', children:[ {tag:'td', width:'49%', align:'right', children:[ {tag:'div', id:this.getId('saveButton')} ]}, {tag:'td', html:' '}, {tag:'td', width:'49%', align:'left', children:[ {tag:'div', id:this.getId('cancelButton')} ]} ]} ]} ]} ]} ]}); this.getElement('editButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); this.getElement('saveCancelButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); editButton = new YAHOO.ext.Button(this.getDom('editButton'), {text:Clipperz.PM.Strings['recordDetailEditButtonLabel'], handler:this.editButtonHandler, scope:this}); this.setSaveButton(new YAHOO.ext.Button(this.getDom('saveButton'), {text:Clipperz.PM.Strings['recordDetailSaveButtonLabel'], handler:this.saveButtonHandler, scope:this})); new YAHOO.ext.Button(this.getDom('cancelButton'), {text:Clipperz.PM.Strings['recordDetailCancelButtonLabel'], handler:this.cancelButtonHandler, scope:this}); if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { editButton.disable(); } this.update(); //MochiKit.Logging.logDebug("<<< RecordDetail.HeaderComponent.appendTo"); }, //------------------------------------------------------------------------- 'updateViewMode': function() { //MochiKit.Logging.logDebug(">>> HeaderComponent.updateViewMode"); this.getElement('editButtonBox').show(); this.getElement('saveCancelButtonBox').hide(); //MochiKit.Logging.logDebug("<<< HeaderComponent.updateViewMode"); }, //------------------------------------------------------------------------- 'updateEditMode': function() { this.getElement('editButtonBox').hide(); this.getElement('saveCancelButtonBox').show(); if (this.mainComponent().enableSaveButton() == true) { diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js index d6a03d7..47ed3e6 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } //############################################################################# Clipperz.PM.Components.RecordDetail.MainComponent = function(anElement, args) { args = args || {}; Clipperz.PM.Components.RecordDetail.MainComponent.superclass.constructor.call(this, anElement, args); // this._element = args.element; this._user = args.user; this._editMode = args.editMode || 'VIEW'; // [ 'VIEW' | 'EDIT' ] this._mainPanel = args.mainPanel; this._record = null; this._editComponents = []; this._addFieldButton = null; this._enableSaveButton = true; this._shouldShowLoginInfo = (Clipperz.PM.Proxy.defaultProxy.isReadOnly() ? false : true); // this._mainLayoutManager = null; // this._layoutRegion = null; Clipperz.NotificationCenter.register(null, 'loadingRecordData', this, 'render'); Clipperz.NotificationCenter.register(null, 'decryptingRecordData', this, 'render'); Clipperz.NotificationCenter.register(null, 'loadingRecordVersionData', this, 'render'); Clipperz.NotificationCenter.register(null, 'decryptingRecordVersionData', this, 'render'); Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render'); Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'render'); this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.RecordDetail.MainComponent, Clipperz.PM.Components.BaseComponent, { 'toString': function() { return "Clipperz.PM.Components.RecordDetail.MainComponent component"; }, //------------------------------------------------------------------------- 'editMode': function() { return this._editMode; }, 'setEditMode': function(aValue, aButtonElement, shouldSkipComponentSynchronization) { //MochiKit.Logging.logDebug(">>> MainComponent.setEditingMode"); this.scrollToTop(); if (aValue == 'VIEW') { if (shouldSkipComponentSynchronization == true) { this.exitModalView(); } else { this.synchronizeComponentValues(); if (this.record().hasPendingChanges()) { if (this.record().isBrandNew()) { this.record().removeEmptyFields(); } this.saveCurrentRecordChanges(aButtonElement); } else { if (this.record().isBrandNew()) { this.record().user().removeRecord(this.record()); } this.exitModalView(); } } } else if (aValue == 'EDIT') { this.enterModalView(); } else { // ???? } this._editMode = aValue; this.render(); }, //------------------------------------------------------------------------- 'user': function() { return this._user; }, //------------------------------------------------------------------------- 'mainPanel': function() { diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js index 2066543..bb23e8d 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } //############################################################################# Clipperz.PM.Components.RecordDetail.NotesComponent = function(anElement, args) { //MochiKit.Logging.logDebug(">>> new NotesComponent"); args = args || {}; Clipperz.PM.Components.RecordDetail.NotesComponent.superclass.constructor.call(this, anElement, args); this.mainComponent().addEditComponent(this); this._staticOffset = null; this._componentHeight = 50; this._mouseMoveIdentifier = null; this._mouseUpIdentifier = null; this.element().setVisibilityMode(YAHOO.ext.Element.DISPLAY); this.render(); //MochiKit.Logging.logDebug("<<< new NotesComponent"); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.RecordDetail.NotesComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 'toString': function() { return "Clipperz.PM.Components.RecordDetail.NotesComponent component"; }, //------------------------------------------------------------------------- 'value': function() { return this.record().notes(); }, 'setValue': function(aValue) { this.record().setNotes(aValue); }, //------------------------------------------------------------------------- 'render': function() { //MochiKit.Logging.logDebug(">>> NotesComponent.render"); /* Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:'5', children:[ {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']}, {tag:'div', cls:'noteFieldContent', id:this.getId('notes')} ]}); */ Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']}); Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'noteFieldContent', id:this.getId('notes'), children:[ {tag:'div', id:this.getId('resizableDiv'), cls:'resizable-textarea', children:[ {tag:'div', id:this.getId('contentView'), cls:'viewMode', html:""}, {tag:'div', id:this.getId('contentEdit'), children:[ {tag:'span', children:[ {tag:'textarea', id:this.getId('textarea'), html:""} ]} ]}, {tag:'div', id:this.getId('grippie'), cls:'grippie'} ]} ]}); this.getElement('contentView').setVisibilityMode(YAHOO.ext.Element.DISPLAY); this.getElement('contentEdit').setVisibilityMode(YAHOO.ext.Element.DISPLAY); MochiKit.Signal.connect(this.getId('grippie'), 'onmousedown', this, 'startResize'); this.update(); //MochiKit.Logging.logDebug("<<< NotesComponent.render"); }, //------------------------------------------------------------------------- 'updateViewMode': function() { //MochiKit.Logging.logDebug(">>> NotesComponent.updateViewMode"); // this.getElement('notes').update(this.value().replace(/\n/g, '<br>')); this.getElement('contentView').update(Clipperz.Base.sanitizeString(this.value()).replace(/\n/g, '<br>')); if (this.isNoteEmpty()) { this.element().hide(); } else { this.getElement('contentView').show(); this.getElement('contentView').setHeight(this.componentHeight()); diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js index 29fe972..d114eaa 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } //############################################################################# Clipperz.PM.Components.RecordDetail.TitleComponent = function(anElement, args) { args = args || {}; Clipperz.PM.Components.RecordDetail.TitleComponent.superclass.constructor.call(this, anElement, args); // this._inputElement = null; this.mainComponent().addEditComponent(this); this.render(); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.RecordDetail.TitleComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 'toString': function() { return "Clipperz.PM.Components.RecordDetail.TitleComponent component"; }, //------------------------------------------------------------------------- 'value': function() { return this.record().label(); }, 'setValue': function(aValue) { this.record().setLabel(aValue); }, //------------------------------------------------------------------------- /* 'inputElement': function() { return this._inputElement; }, 'setInputElement': function(aValue) { this._inputElement = aValue; }, */ //------------------------------------------------------------------------- 'render': function() { // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:' '}); // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:"3", html:' ', children:[ // {tag:'div', /*style:'border: 1px solid green;',*/ id:this.getId('title')} // ]}); // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:' '}); // // this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('title'), {editMode:this.editMode(), value:this.value()})); this.update(); }, //------------------------------------------------------------------------- /* 'update': function() { this.inputElement().update({value:this.value(), editMode:this.editMode()}); }, */ //------------------------------------------------------------------------- 'updateViewMode': function() { this.element().update(""); Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'h2', html:this.value()}); }, //------------------------------------------------------------------------- 'updateEditMode': function() { //MochiKit.Logging.logDebug(">>> TitleComponent.updateEditMode"); // this.getElement('title').update(""); // Clipperz.YUI.DomHelper.append(this.getDom('title'), {tag:'div', id:this.getId('title_input')}); // this.setInputElement(Clipperz.YUI.DomHelper.append(this.getDom('title_input'), {tag:'input', type:'text', value:this.value()}, true)); this.element().update(""); Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', id:this.getId('titleField'), type:'text', value:"this.value()"}); this.getElement('titleField').dom.value = this.value(); //MochiKit.Logging.logDebug("<<< TitleComponent.updateEditMode"); }, //------------------------------------------------------------------------- diff --git a/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js b/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js index b300ba6..d30f514 100644 --- a/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js +++ b/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } if (typeof(Clipperz.PM.Components.TabPanel) == 'undefined') { Clipperz.PM.Components.TabPanel = {}; } Clipperz.PM.Components.TabPanel.TabPanelController = function(args) { args = args || {}; Clipperz.PM.Components.TabPanel.TabPanelController.superclass.constructor.call(this); this._name = args.name || 'undefined'; this._config = args.config; this._selectedTab = args.selectedTab || ((MochiKit.Base.keys(args.config).length > 0) ? MochiKit.Base.keys(args.config)[0] : null); this._tabs = {}; this._panels = {}; Clipperz.NotificationCenter.register(null, 'selectTab', this, 'handleSelectTabNotification'); return this; } //============================================================================= YAHOO.extendX(Clipperz.PM.Components.TabPanel.TabPanelController, YAHOO.ext.util.Observable, { //------------------------------------------------------------------------- 'name': function() { return this._name; }, //------------------------------------------------------------------------- 'tabs': function() { return this._tabs; }, //------------------------------------------------------------------------- 'panels': function() { return this._panels; }, //------------------------------------------------------------------------- 'config': function() { return this._config; }, //------------------------------------------------------------------------- 'selectedTab': function() { return this._selectedTab; }, 'setSelectedTab': function(aValue) { this._selectedTab = aValue; }, //------------------------------------------------------------------------- 'setUp': function() { var tabId; //MochiKit.Logging.logDebug(">>> TabPanelController.setUp - config: " + Clipperz.Base.serializeJSON(this.config())); for (tabId in this.config()) { var tabElement; var panelElement; //MochiKit.Logging.logDebug("--- TabPanelController.setUp - tabId: " + tabId); //MochiKit.Logging.logDebug("--- TabPanelController.setUp - panelId: " + this.config()[tabId]); tabElement = YAHOO.ext.Element.get(tabId); tabElement.addClassOnOver("hover"); MochiKit.Signal.connect(tabId, 'onclick', this, 'selectTabHandler'); panelElement = YAHOO.ext.Element.get(this.config()[tabId]); this._tabs[tabId] = tabElement; this._panels[tabId] = panelElement; if (tabId == this.selectedTab()) { tabElement.addClass('selectedTab'); panelElement.addClass('selectedPanel'); } else { panelElement.addClass('hiddenPanel'); } } //MochiKit.Logging.logDebug("<<< TabPanelController.setUp"); }, //------------------------------------------------------------------------- 'selectTab': function(aTab) { diff --git a/frontend/beta/js/Clipperz/PM/Components/TextFormField.js b/frontend/beta/js/Clipperz/PM/Components/TextFormField.js index c6f0349..2b383ce 100644 --- a/frontend/beta/js/Clipperz/PM/Components/TextFormField.js +++ b/frontend/beta/js/Clipperz/PM/Components/TextFormField.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } Clipperz.PM.Components.TextFormField = function(anElement, args) { args = args || {}; //MochiKit.Logging.logDebug(">>> new TextFormField"); Clipperz.PM.Components.TextFormField.superclass.constructor.call(this, args); this._element = anElement; this._editMode = args.editMode || 'VIEW'; this._value = args.value || ""; this._inputElement = null; this._wrapper = null; this._multiline = args.multiline || false; // this.multiline = args.multiline || true; // this.editing = true; // this.completeOnBlur = true; // this.autoSizeTask = new YAHOO.ext.util.DelayedTask(this.autoSize, this); // this.textSizeEl = Clipperz.YUI.DomHelper.append(document.body, { // tag: 'div', // cls: 'yinline-editor-sizer ' + (this.cls || '') // }); this.render(); //MochiKit.Logging.logDebug("<<< new TextFormField"); return this; }; YAHOO.extendX(Clipperz.PM.Components.TextFormField, Clipperz.PM.Components.BaseComponent, { 'toString': function() { return "Clipperz.PM.Components.TextFormField"; }, //----------------------------------------------------- 'value': function() { if (this.inputElement() != null) { this._value = this.inputElement().dom.value; } return this._value; // return this.inlineEditor().getValue(); }, 'setValue': function(aValue) { this._value = aValue; // this.getElement('viewComponent_Content').update(aValue); // this.inlineEditor().setValue(aValue); }, //----------------------------------------------------- 'multiline': function() { return this._multiline; }, //----------------------------------------------------- 'editMode': function() { return this._editMode; }, 'setEditMode': function(aValue) { this._editMode = aValue; }, //----------------------------------------------------- 'inputElement': function() { return this._inputElement; }, 'setInputElement': function(aValue) { this._inputElement = aValue; }, //----------------------------------------------------- 'on': function(anEventName, anHandler, aScope, shouldOverride) { //MochiKit.Logging.logDebug(">>> TextFormField.on - inputElement: " + this.inputElement()); return this.inputElement().on(anEventName, anHandler, aScope, shouldOverride); //MochiKit.Logging.logDebug("<<< TextFormField.on - inputElement: " + this.inputElement()); }, //----------------------------------------------------- 'wrapper': function() { return this._wrapper; diff --git a/frontend/beta/js/Clipperz/PM/Connection.js b/frontend/beta/js/Clipperz/PM/Connection.js index e81c7a6..613e7d6 100644 --- a/frontend/beta/js/Clipperz/PM/Connection.js +++ b/frontend/beta/js/Clipperz/PM/Connection.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } //----------------------------------------------------------------------------- // // Abstract C O N N E C T I O N class // //----------------------------------------------------------------------------- Clipperz.PM.Connection = function (args) { args = args || {}; this._user = args.user; this._clipperz_pm_crypto_version = null; this._connectionId = null; this._oneTimePassword = null; return this; } Clipperz.PM.Connection.prototype = MochiKit.Base.update(null, { 'user': function() { return this._user; }, 'toString': function() { return "Connection [" + this.version() + "] - user: " + this.user(); }, //========================================================================= 'version': function() { throw Clipperz.Base.exception.AbstractMethod; }, 'clipperz_pm_crypto_version': function() { if (this._clipperz_pm_crypto_version == null) { var connectionVersions; var versions; var version; var i, c; version = null; connectionVersions = Clipperz.PM.Crypto.communicationProtocol.versions; versions = MochiKit.Base.keys(connectionVersions); c = versions.length; for (i=0; i<c; i++) { if (! (versions[i] == 'current')) { if (this instanceof connectionVersions[versions[i]]) { version = versions[i]; }; } } this._clipperz_pm_crypto_version = version; } return this._clipperz_pm_crypto_version; }, //------------------------------------------------------------------------- 'defaultErrorHandler': function(anErrorString, anException) { MochiKit.Logging.logError("### Connection.defaultErrorHandler: " + anErrorString + " (" + anException + ")"); }, //------------------------------------------------------------------------- 'login': function(someArguments, aCallback) { throw Clipperz.Base.exception.AbstractMethod; }, //------------------------------------------------------------------------- 'message': function(someArguments, aCallback) { throw Clipperz.Base.exception.AbstractMethod; }, //------------------------------------------------------------------------- 'sharedSecret': function() { throw Clipperz.Base.exception.AbstractMethod; }, 'serverSideUserCredentials': function() { throw Clipperz.Base.exception.AbstractMethod; }, //========================================================================= 'connectionId': function() { return this._connectionId; diff --git a/frontend/beta/js/Clipperz/PM/Crypto.js b/frontend/beta/js/Clipperz/PM/Crypto.js index 6e9608c..ad16ff0 100644 --- a/frontend/beta/js/Clipperz/PM/Crypto.js +++ b/frontend/beta/js/Clipperz/PM/Crypto.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Crypto) == 'undefined') { Clipperz.PM.Crypto = {}; } Clipperz.PM.Crypto.VERSION = "0.2"; Clipperz.PM.Crypto.NAME = "Clipperz.PM.Crypto"; MochiKit.Base.update(Clipperz.PM.Crypto, { '__repr__': function () { return "[" + this.NAME + " " + this.VERSION + "]"; }, //------------------------------------------------------------------------- 'toString': function () { return this.__repr__(); }, //------------------------------------------------------------------------- 'communicationProtocol': { 'currentVersion': '0.2', 'versions': { '0.1': Clipperz.PM.Connection.SRP['1.0'], //Clipperz.Crypto.SRP.versions['1.0'].Connection, '0.2': Clipperz.PM.Connection.SRP['1.1'] //Clipperz.Crypto.SRP.versions['1.1'].Connection, }, 'fallbackVersions': { 'current': '0.1', '0.2': '0.1', '0.1': null } }, //------------------------------------------------------------------------- 'encryptingFunctions': { 'currentVersion': '0.3', 'versions': { //##################################################################### '0.1': { 'encrypt': function(aKey, aValue) { return Clipperz.Crypto.Base.encryptUsingSecretKey(aKey, Clipperz.Base.serializeJSON(aValue)); }, 'deferredEncrypt': function(aKey, aValue) { var deferredResult; deferredResult = new MochiKit.Async.Deferred(); deferredResult.addCallback(Clipperz.PM.Crypto.encryptingFunctions.versions['0.1'].encrypt, aKey, aValue); deferredResult.callback(); return deferredResult; }, 'decrypt': function(aKey, aValue) { var result; if (aValue != null) { result = Clipperz.Base.evalJSON(Clipperz.Crypto.Base.decryptUsingSecretKey(aKey, aValue)); } else { result = null; } return result; }, 'deferredDecrypt': function(aKey, aValue) { var deferredResult; deferredResult = new MochiKit.Async.Deferred(); deferredResult.addCallback(Clipperz.PM.Crypto.encryptingFunctions.versions['0.1'].decrypt, aKey, aValue); deferredResult.callback(); return deferredResult; }, 'hash': function(aValue) { var result; var strngResult; stringResult = Clipperz.Crypto.Base.computeHashValue(aValue.asString()); // !!!!!!! result = new Clipperz.ByteArray("0x" + stringResult); return result; } }, //##################################################################### '0.2': { diff --git a/frontend/beta/js/Clipperz/PM/DataModel/DirectLogin.js b/frontend/beta/js/Clipperz/PM/DataModel/DirectLogin.js index aee5703..c0cfa3c 100644 --- a/frontend/beta/js/Clipperz/PM/DataModel/DirectLogin.js +++ b/frontend/beta/js/Clipperz/PM/DataModel/DirectLogin.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } //############################################################################# Clipperz.PM.DataModel.DirectLogin = function(args) { //MochiKit.Logging.logDebug(">>> new Clipperz.PM.DataModel.DirectLogin"); //console.log(">>> new Clipperz.PM.DataModel.DirectLogin - args: %o", args); //console.log("--- formData: %s", Clipperz.Base.serializeJSON(args.formData)); args = args || {}; //MochiKit.Logging.logDebug("--- new Clipperz.PM.DataModel.DirectLogin - args: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(args))); this._record = args.record || null; this._label = args.label || "unnamed record" this._reference = args.reference || Clipperz.PM.Crypto.randomKey(); this._favicon = args.favicon || null; this._bookmarkletVersion = args.bookmarkletVersion || "0.1"; this._directLoginInputs = null; this._formValues = args.formValues || {}; this.setFormData(args.formData || null); //console.log("=== formData: %o", this.formData()); if (args.legacyBindingData == null) { this.setBindingData(args.bindingData || null); } else { this.setLegacyBindingData(args.legacyBindingData); } this._fixedFavicon = null; // this._formValues = args.formValues || (this.hasValuesToSet() ? {} : null); //MochiKit.Logging.logDebug("<<< new Clipperz.PM.DataModel.DirectLogin"); return this; } Clipperz.PM.DataModel.DirectLogin.prototype = MochiKit.Base.update(null, { 'remove': function() { this.record().removeDirectLogin(this); }, //------------------------------------------------------------------------- 'record': function() { return this._record; }, //------------------------------------------------------------------------- 'user': function() { return this.record().user(); }, //------------------------------------------------------------------------- 'reference': function() { return this._reference; }, //------------------------------------------------------------------------- 'label': function() { return this._label; }, 'setLabel': function(aValue) { this._label = aValue; }, //------------------------------------------------------------------------- 'favicon': function() { if (this._favicon == null) { var actionUrl; var hostname; actionUrl = this.formData()['attributes']['action']; hostname = actionUrl.replace(/^https?:\/\/([^\/]*)\/.*/, '$1'); this._favicon = "http://" + hostname + "/favicon.ico"; } return this._favicon; }, //------------------------------------------------------------------------- 'fixedFavicon': function() { var result; diff --git a/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginBinding.js b/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginBinding.js index 7f09bff..cef41af 100644 --- a/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginBinding.js +++ b/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginBinding.js @@ -1,110 +1,108 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } //############################################################################# Clipperz.PM.DataModel.DirectLoginBinding = function(aDirectLogin, aKey, args) { //MochiKit.Logging.logDebug(">>> new DirectLoginBinding") args = args || {}; //MochiKit.Logging.logDebug("--- new DirectLoginBinding - args: " + Clipperz.Base.serializeJSON(args)); this._directLogin = aDirectLogin || args.directLogin || null; this._key = aKey; this._fieldKey = args.fieldKey || null; this._fieldName = args.fieldName || null; //MochiKit.Logging.logDebug("<<< new DirectLoginBinding") return this; } Clipperz.PM.DataModel.DirectLoginBinding.prototype = MochiKit.Base.update(null, { 'directLogin': function() { return this._directLogin; }, //------------------------------------------------------------------------- 'key': function() { return this._key; }, //------------------------------------------------------------------------- 'fieldKey': function() { //MochiKit.Logging.logDebug("=== Clipperz.PM.DataModel.DirectLoginBinding.fieldKey"); //MochiKit.Logging.logDebug("=== Clipperz.PM.DataModel.DirectLoginBinding.fieldKey - " + this._fieldKey); return this._fieldKey; }, 'setFieldKey': function(aValue) { this._fieldKey = aValue; }, 'fieldName': function() { return this._fieldName; }, //------------------------------------------------------------------------- 'field': function() { var result; //MochiKit.Logging.logDebug(">>> Clipperz.PM.DataModel.DirectLoginBinding.field") //MochiKit.Logging.logDebug("--- Clipperz.PM.DataModel.DirectLoginBinding.field - 1 - this.fieldKey(): " + this.fieldKey()); //MochiKit.Logging.logDebug("--- Clipperz.PM.DataModel.DirectLoginBinding.field - 2 - this.fieldName(): " + this.fieldName()); if (this.fieldKey() != null) { result = this.directLogin().record().currentVersion().fields()[this.fieldKey()]; //MochiKit.Logging.logDebug("--- Clipperz.PM.DataModel.DirectLoginBinding.field - 3 - result: " + result); } else if (this.fieldName() != null) { result = this.directLogin().record().currentVersion().fieldWithName(this.fieldName()); //MochiKit.Logging.logDebug("--- Clipperz.PM.DataModel.DirectLoginBinding.field - 4 - result: " + result); this.setFieldKey(result.key()); } else { result = null; } //MochiKit.Logging.logDebug("<<< Clipperz.PM.DataModel.DirectLoginBinding.field") return result; }, //------------------------------------------------------------------------- 'serializedData': function() { return this.fieldKey(); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginInput.js b/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginInput.js index 0e2b7ad..e5e9ad5 100644 --- a/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginInput.js +++ b/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginInput.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } //############################################################################# Clipperz.PM.DataModel.DirectLoginInput = function(aDirectLogin, args) { args = args || {}; //console.log(">>> new DirectLoginInput - args: %o" + args); this._directLogin = aDirectLogin; this._args = args; return this; } Clipperz.PM.DataModel.DirectLoginInput.prototype = MochiKit.Base.update(null, { 'directLogin': function() { return this._directLogin; }, //------------------------------------------------------------------------- 'args': function() { return this._args; }, //------------------------------------------------------------------------- 'name': function() { return this.args()['name']; }, //------------------------------------------------------------------------- 'type': function() { var result; result = this.args()['type']; if (result != null) { result = result.toLowerCase(); } return result; }, //------------------------------------------------------------------------- 'value': function() { return this.args()['value']; }, //------------------------------------------------------------------------- 'formConfiguration': function() { var result; //MochiKit.Logging.logDebug(">>> DirectLoginInput.formConfiguration - " + this.name()); if (this.shouldSetValue()) { //MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 1"); switch (this.type()) { case 'select': var currentValue; var options; //MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2"); currentValue = this.directLogin().formValues()[this.name()]; //MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.1"); options = this.args()['options']; //MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.2"); result = MochiKit.DOM.SELECT({name:this.name()}, MochiKit.Base.map(function(anOption) { var options; //MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.3"); // TODO: remove the value: field and replace it with element.dom.value = <some value> options = {value:anOption['value']}; //MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.4"); if (currentValue == anOption['value']) { //MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.5"); options.selected = true; //MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.6"); } //MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.7"); return MochiKit.DOM.OPTION(options, anOption['label']) }, options) ) //MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.8"); break; case 'checkbox': diff --git a/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginReference.js b/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginReference.js index 2be7d58..236d7c9 100644 --- a/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginReference.js +++ b/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginReference.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } //############################################################################# Clipperz.PM.DataModel.DirectLoginReference = function(args) { args = args || {}; //MochiKit.Logging.logDebug(">>> new DirectLoginReference: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(args))); //MochiKit.Logging.logDebug(">>> new DirectLoginReference - record: " + args.record); this._user = args.user; if (args.directLogin != null) { this._reference = args.directLogin.reference(); this._recordReference = args.directLogin.record().reference(); this._label = args.directLogin.label(); this._favicon = args.directLogin.favicon() || null; this._directLogin = args.directLogin; this._record = args.directLogin.record(); } else { this._reference = args.reference; this._recordReference = args.record; this._label = args.label; this._favicon = args.favicon || null; this._directLogin = null; this._record = null; } this._fixedFavicon = null; return this; } Clipperz.PM.DataModel.DirectLoginReference.prototype = MochiKit.Base.update(null, { 'user': function() { return this._user; }, //------------------------------------------------------------------------- 'reference': function() { return this._reference; }, //------------------------------------------------------------------------- 'synchronizeValues': function(aDirectLogin) { this._label = aDirectLogin.label(); this._favicon = aDirectLogin.favicon(); }, //------------------------------------------------------------------------- 'label': function() { return this._label; }, //------------------------------------------------------------------------- 'recordReference': function() { return this._recordReference; }, //------------------------------------------------------------------------- 'record': function() { //MochiKit.Logging.logDebug(">>> DirectLoginReference.record"); if (this._record == null) { this._record = this.user().records()[this.recordReference()]; } //MochiKit.Logging.logDebug("<<< DirectLoginReference.record"); return this._record; }, //------------------------------------------------------------------------- 'favicon': function() { return this._favicon; }, //------------------------------------------------------------------------- 'fixedFavicon': function() { var result; if (this._fixedFavicon == null) { result = this.favicon(); diff --git a/frontend/beta/js/Clipperz/PM/DataModel/Header.js b/frontend/beta/js/Clipperz/PM/DataModel/Header.js index c780855..908d9f4 100644 --- a/frontend/beta/js/Clipperz/PM/DataModel/Header.js +++ b/frontend/beta/js/Clipperz/PM/DataModel/Header.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } //############################################################################# Clipperz.PM.DataModel.Header = function(args) { args = args || {}; this._user = args.user; this._serverData = null; this._serverDataVersion = null; this._jsonEvaledServerData = null; this._decryptedLegacyServerData = null; this._isDecryptingLegacyServerData = false; this._decryptingLegacyServerDataPendingQueue = []; this.resetUpdatedSections(); this._shouldLoadSections = {}; Clipperz.NotificationCenter.register(this.user(), 'updatedSection', this, 'updatedSectionHandler'); return this; } Clipperz.PM.DataModel.Header.prototype = MochiKit.Base.update(null, { //------------------------------------------------------------------------- 'user': function() { return this._user; }, //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- 'updatedSections': function() { return this._updatedSections; }, 'markSectionAsUpdated': function(aSectionName) { this.updatedSections().push(aSectionName); }, 'resetUpdatedSections': function() { this._updatedSections = [] }, 'hasSectionBeenUpdated': function(aSectionName) { return (this.updatedSections().join().indexOf(aSectionName) != -1); }, 'cachedServerDataSection': function(aSectionName) { return (this.hasSectionBeenUpdated(aSectionName)) ? {} : this.jsonEvaledServerData()[aSectionName]; }, 'updateAllSections': function() { this.resetUpdatedSections(); this.markSectionAsUpdated('records'); this.markSectionAsUpdated('directLogins'); this.markSectionAsUpdated('preferences'); this.markSectionAsUpdated('oneTimePasswords'); return MochiKit.Async.succeed(this); }, 'updatedSectionHandler': function(anEvent) { this.markSectionAsUpdated(anEvent.parameters()); }, //------------------------------------------------------------------------- 'getObjectKeyIndex': function(anObject) { var result; var itemReference; var index; result = {}; index = 0; for (itemReference in anObject) { result[itemReference] = index.toString(); diff --git a/frontend/beta/js/Clipperz/PM/DataModel/OneTimePassword.js b/frontend/beta/js/Clipperz/PM/DataModel/OneTimePassword.js index 88f383a..3f611b4 100644 --- a/frontend/beta/js/Clipperz/PM/DataModel/OneTimePassword.js +++ b/frontend/beta/js/Clipperz/PM/DataModel/OneTimePassword.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } //############################################################################# Clipperz.PM.DataModel.OneTimePassword = function(args) { args = args || {}; //console.log("new OneTimePassword", args); //MochiKit.Logging.logDebug("---"); this._user = args['user']; this._password = args['password']; this._passwordValue = Clipperz.PM.DataModel.OneTimePassword.normalizedOneTimePassword(args['password']); this._reference = args['reference'] || Clipperz.PM.Crypto.randomKey(); this._creationDate = args['created'] ? Clipperz.PM.Date.parseDateWithUTCFormat(args['created']) : new Date(); this._usageDate = args['used'] ? Clipperz.PM.Date.parseDateWithUTCFormat(args['used']) : null; this._status = args['status'] || 'ACTIVE'; this._connectionInfo = null; this._key = null; this._keyChecksum = null; return this; } Clipperz.PM.DataModel.OneTimePassword.prototype = MochiKit.Base.update(null, { 'toString': function() { return "Clipperz.PM.DataModel.OneTimePassword"; }, //------------------------------------------------------------------------- 'user': function() { return this._user; }, //------------------------------------------------------------------------- 'password': function() { return this._password; }, //------------------------------------------------------------------------- 'passwordValue': function() { return this._passwordValue; }, //------------------------------------------------------------------------- 'creationDate': function() { return this._creationDate; }, //------------------------------------------------------------------------- 'reference': function() { return this._reference; }, //------------------------------------------------------------------------- 'key': function() { if (this._key == null) { this._key = Clipperz.PM.DataModel.OneTimePassword.computeKeyWithUsernameAndPassword(this.user().username(), this.passwordValue()); } return this._key; }, //------------------------------------------------------------------------- 'keyChecksum': function() { if (this._keyChecksum == null) { this._keyChecksum = Clipperz.PM.DataModel.OneTimePassword.computeKeyChecksumWithUsernameAndPassword(this.user().username(), this.passwordValue()); } return this._keyChecksum; }, //------------------------------------------------------------------------- 'status': function() { return this._status; }, 'setStatus': function(aValue) { this._status = aValue; }, diff --git a/frontend/beta/js/Clipperz/PM/DataModel/OneTimePasswordManager.js b/frontend/beta/js/Clipperz/PM/DataModel/OneTimePasswordManager.js index aa40aba..1ebb615 100644 --- a/frontend/beta/js/Clipperz/PM/DataModel/OneTimePasswordManager.js +++ b/frontend/beta/js/Clipperz/PM/DataModel/OneTimePasswordManager.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } //############################################################################# Clipperz.PM.DataModel.OneTimePasswordManager = function(anUser, args) { args = args || {}; this._user = anUser; this._oneTimePasswords = {}; this.updateWithData(args); Clipperz.NotificationCenter.notify(null, 'oneTimePasswordAdded', null, true); return this; } Clipperz.PM.DataModel.OneTimePasswordManager.prototype = MochiKit.Base.update(null, { 'toString': function() { return "Clipperz.PM.DataModel.OneTimePasswordManager"; }, //------------------------------------------------------------------------- 'updateWithData': function(someValues) { var otpReference; //console.log("OneTimePasswordManager.updateWithData", someValues); //MochiKit.Logging.logDebug("OneTimePasswordManager.updateWithData: " + Clipperz.Base.serializeJSON(someValues)); for (otpReference in someValues) { var otp; var otpConfiguration; otpConfiguration = someValues[otpReference]; otpConfiguration['user'] = this.user(); otpConfiguration['reference'] = otpReference; otp = new Clipperz.PM.DataModel.OneTimePassword(otpConfiguration); this._oneTimePasswords[otpReference] = otp; } return this; }, //------------------------------------------------------------------------- 'updateWithServerData': function(someValues) { var deferredResult; var oneTimePasswordReference; var wereChangesApplied; //MochiKit.Logging.logDebug(">>> OneTimePasswordManager.updateWithServerData"); deferredResult = new MochiKit.Async.Deferred(); wereChangesApplied = false; for (oneTimePasswordReference in someValues) { var oneTimePassword; oneTimePassword = this.oneTimePasswordWithReference(oneTimePasswordReference); if (oneTimePassword != null) { var oneTimePasswordHasBeenUpdated; oneTimePasswordHasBeenUpdated = oneTimePassword.updateStatusWithValues(someValues[oneTimePasswordReference]); wereChangesApplied = oneTimePasswordHasBeenUpdated || wereChangesApplied; } else { } } if (wereChangesApplied == true) { this.user().header().markSectionAsUpdated('oneTimePasswords'); } for (oneTimePasswordReference in this.oneTimePasswords()) { if (typeof(someValues[oneTimePasswordReference]) == 'undefind') { deferredResult.addCallback(MochiKit.Base.method(this.oneTimePasswordWithReference(oneTimePasswordReference), 'saveChanges')); } } deferredResult.addCallback(MochiKit.Async.succeed, this); deferredResult.callback(); //MochiKit.Logging.logDebug("<<< OneTimePasswordManager.updateWithServerData"); return deferredResult; }, //------------------------------------------------------------------------- 'user': function() { diff --git a/frontend/beta/js/Clipperz/PM/DataModel/Record.js b/frontend/beta/js/Clipperz/PM/DataModel/Record.js index f89f79c..7b06f29 100644 --- a/frontend/beta/js/Clipperz/PM/DataModel/Record.js +++ b/frontend/beta/js/Clipperz/PM/DataModel/Record.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } //############################################################################# Clipperz.PM.DataModel.Record = function(args) { args = args || {}; this._user = args['user'] || null; this._reference = args['reference'] || Clipperz.PM.Crypto.randomKey(); this._version = args['version'] || Clipperz.PM.Crypto.encryptingFunctions.currentVersion; this._key = args['key'] || Clipperz.PM.Crypto.randomKey(); this.setLabel(args['label'] || Clipperz.PM.Strings['newRecordTitleLabel']); this.setHeaderNotes(args['headerNotes'] || null); this.setNotes(args['notes'] || args['headerNotes'] || ""); //MochiKit.Logging.logDebug("--- new Record ('" + this._label + "')- _headerNotes: '" + this._headerNotes + "'"); //MochiKit.Logging.logDebug("--- new Record ('" + this._label + "')- _notes: '" + this._notes + "'"); // this._notes = args.notes || ""; this._versions = {}; this._directLogins = {}; this._removedDirectLogins = []; this.setIsBrandNew(args['reference'] == null); this.setShouldLoadData(this.isBrandNew() ? false: true); this.setShouldDecryptData(this.isBrandNew() ? false: true); this.setShouldProcessData(this.isBrandNew() ? false: true); this.setCurrentVersion(this.isBrandNew() ? new Clipperz.PM.DataModel.RecordVersion(this, null): null); this.setCurrentVersionKey(null); this._serverData = null; this._decryptedData = null; this._cachedData = null; return this; } Clipperz.PM.DataModel.Record.prototype = MochiKit.Base.update(null, { 'toString': function() { return "Record (" + this.label() + ")"; }, //------------------------------------------------------------------------- 'isBrandNew': function() { return this._isBrandNew; }, 'setIsBrandNew': function(aValue) { this._isBrandNew = aValue; }, //------------------------------------------------------------------------- /* 'shouldRunTheRecordCreationWizard': function() { return (this.isBrandNew() && (MochiKit.Base.keys(this.currentVersion().fields()).length == 0)); }, */ //------------------------------------------------------------------------- 'user': function() { return this._user; }, //------------------------------------------------------------------------- 'reference': function() { return this._reference; }, //------------------------------------------------------------------------- 'key': function() { return this._key; }, 'updateKey': function() { this._key = Clipperz.PM.Crypto.randomKey(); }, //------------------------------------------------------------------------- 'label': function() { return this._label; }, diff --git a/frontend/beta/js/Clipperz/PM/DataModel/RecordField.js b/frontend/beta/js/Clipperz/PM/DataModel/RecordField.js index bca664d..a5d7980 100644 --- a/frontend/beta/js/Clipperz/PM/DataModel/RecordField.js +++ b/frontend/beta/js/Clipperz/PM/DataModel/RecordField.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } //############################################################################# Clipperz.PM.DataModel.RecordField = function(args) { args = args || {}; this._recordVersion = args.recordVersion || null; this._key = args.key || Clipperz.PM.Crypto.randomKey(); this.setLabel(args.label || ''); this.setValue(args.value || ''); this.setType(args.type || 'TXT'); // valid types: 'TXT', 'PWD', 'URL', 'DATE', 'ADDR', 'CHECK', 'RADIO', ('NOTE' probably not), ... this._hidden = args.hidden || (args.type == 'PWD') || false; return this; } Clipperz.PM.DataModel.RecordField.prototype = MochiKit.Base.update(null, { 'toString': function() { return "Clipperz.PM.DataModel.RecordField - " + this.label() + " (" + this.key() + ")"; }, //------------------------------------------------------------------------- 'recordVersion': function() { return this._recordVersion; }, //------------------------------------------------------------------------- 'key': function() { return this._key; }, //------------------------------------------------------------------------- 'label': function() { return this._label; }, 'setLabel': function(aValue) { this._label = aValue; }, //------------------------------------------------------------------------- 'value': function() { return this._value; }, 'setValue': function(aValue) { this._value = aValue; }, //------------------------------------------------------------------------- 'type': function() { return this._type; }, 'setType': function(aValue) { this._type = aValue; if (aValue == 'PWD') { this.setHidden(true); } else { this.setHidden(false); } }, //------------------------------------------------------------------------- 'serializeData': function() { var result; //MochiKit.Logging.logDebug(">>> RecordField.serializeData - " + this); result = { label: this.label(), value: this.value(), type: this.type(), hidden: this.hidden() }; //MochiKit.Logging.logDebug("<<< RecordField.serializeData"); return result; }, //------------------------------------------------------------------------- 'typeShortDescription': function() { diff --git a/frontend/beta/js/Clipperz/PM/DataModel/RecordVersion.js b/frontend/beta/js/Clipperz/PM/DataModel/RecordVersion.js index fc4a45c..69a7d91 100644 --- a/frontend/beta/js/Clipperz/PM/DataModel/RecordVersion.js +++ b/frontend/beta/js/Clipperz/PM/DataModel/RecordVersion.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } //############################################################################# Clipperz.PM.DataModel.RecordVersion = function(aRecord, args) { args = args || {}; this._record = aRecord; this._reference = args.reference || Clipperz.PM.Crypto.randomKey(); this._version = args.version || Clipperz.PM.Crypto.encryptingFunctions.currentVersion; this._key = args.key || Clipperz.PM.Crypto.randomKey();; this._previousVersion = args.previousVersion || null; this._previousVersionKey = args.previousVersionKey || null; this.setIsBrandNew(args.reference == null); if (this.isBrandNew()) { this._fields = {}; this.setShouldLoadData(false); this.setShouldDecryptData(false); this.setShouldProcessData(false); } else { if (typeof(args.fields) != 'undefined') { this.processFieldData(args.fields); this.setShouldLoadData(false); this.setShouldDecryptData(false); this.setShouldProcessData(false); } else { if (typeof(args.data) != 'undefined') { this.setShouldLoadData(false); } else { this.setShouldLoadData(true); } this.setShouldDecryptData(true); this.setShouldProcessData(true); } } this._serverData = args.data; this._decryptedData = null; return this; } Clipperz.PM.DataModel.RecordVersion.prototype = MochiKit.Base.update(null, { 'toString': function() { return "RecordVersion"; }, //------------------------------------------------------------------------- 'record': function() { return this._record; }, //------------------------------------------------------------------------- 'reference': function() { return this._reference; }, 'setReference': function(aValue) { this._reference = aValue; }, //------------------------------------------------------------------------- 'key': function() { //MochiKit.Logging.logDebug(">>> RecordVersion.key"); //MochiKit.Logging.logDebug("--- RecordVersion.key - " + this._key); return this._key; }, 'setKey': function(aValue) { this._key = aValue; }, //------------------------------------------------------------------------- 'serverData': function() { return this._serverData; }, 'setServerData': function(aValue) { this._serverData = aValue; diff --git a/frontend/beta/js/Clipperz/PM/DataModel/Statistics.js b/frontend/beta/js/Clipperz/PM/DataModel/Statistics.js index 3d53adf..f0c229e 100644 --- a/frontend/beta/js/Clipperz/PM/DataModel/Statistics.js +++ b/frontend/beta/js/Clipperz/PM/DataModel/Statistics.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } //############################################################################# Clipperz.PM.DataModel.Statistics = function(args) { args = args || {}; this._user = args.user; this._data = args.data || null; return this; } Clipperz.PM.DataModel.Statistics.prototype = MochiKit.Base.update(null, { //------------------------------------------------------------------------- 'decrypt': function(aVersion, someEncryptedData) { var deferredResult; //MochiKit.Logging.logDebug(">>> Statistics.decrypt"); if (someEncryptedData == Clipperz.PM.Crypto.nullValue) { this.setData({}); deferredResult = MochiKit.Async.succeed(this.data()); } else { var statistic; var user; statistic = this; user = this.user(); deferredResult = new MochiKit.Async.Deferred(); //deferredResult.addCallback(function() { console.time("Statistics.decrypt.deferredDecrypt")}); deferredResult.addCallback(Clipperz.PM.Crypto.deferredDecrypt, user.passphrase(), someEncryptedData, aVersion); //deferredResult.addCallback(function() { console.timeEnd("Statistics.decrypt.deferredDecrypt")}); //deferredResult.addCallback(function() { console.time("Statistics.decrypt.setup")}); deferredResult.addCallbacks( MochiKit.Base.partial(function (aStatistic, someData) { aStatistic.setData(someData); return aStatistic.data(); }, statistic), MochiKit.Base.partial(function (aStatistic) { MochiKit.Logging.logWarning("resetting user statistics due to an error while decrypting stored data"); aStatistic.setData({}); return aStatistic.data(); }, statistic) ); //deferredResult.addCallback(function() { console.timeEnd("Statistics.decrypt.setup")}); deferredResult.callback(); } //MochiKit.Logging.logDebug("<<< Statistics.decrypt"); return deferredResult; }, //------------------------------------------------------------------------- 'user': function() { return this._user; }, //------------------------------------------------------------------------- 'data': function() { return this._data; }, 'setData': function(aValue) { this._data = aValue; this.extractInfoFromData(aValue); }, //------------------------------------------------------------------------- 'extractInfoFromData': function(someValues) { }, //------------------------------------------------------------------------- 'encryptedData': function() { return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(this.user().passphrase(), this.serializedData()); }, //------------------------------------------------------------------------- 'serializedData': function() { var result; diff --git a/frontend/beta/js/Clipperz/PM/DataModel/User.js b/frontend/beta/js/Clipperz/PM/DataModel/User.js index b29d224..3067742 100644 --- a/frontend/beta/js/Clipperz/PM/DataModel/User.js +++ b/frontend/beta/js/Clipperz/PM/DataModel/User.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } //############################################################################# Clipperz.PM.DataModel.User = function(args) { //MochiKit.Logging.logDebug(">>> new User"); args = args || {}; this._username = args.username || null; this._passphrase = args.passphrase || null; this._connection = null; this._connectionVersion = 'current'; this._header = null; this._statistics = null; this._lock = 'new lock'; this._preferences = null; this._records = {}; this._directLoginReferences = {}; this._oneTimePasswordManager = null; this._isLoadingUserDetails = false; this._loadingUserDetailsPendingQueue = []; this._maxNumberOfRecords = Number.MAX_VALUE; this._shouldDownloadOfflineCopy = false; this._loginInfo = null; this._loginHistory = null; this._serverData = null; //MochiKit.Logging.logDebug("<<< new User"); return this; } Clipperz.PM.DataModel.User.prototype = MochiKit.Base.update(null, { 'toString': function() { return "Clipperz.PM.DataModel.User - " + this.username(); }, //------------------------------------------------------------------------- 'username': function() { return this._username; }, 'setUsername': function(aValue) { this._username = aValue; }, //------------------------------------------------------------------------- 'passphrase': function() { return this._passphrase; }, 'setPassphrase': function(aValue) { this._passphrase = aValue; }, //------------------------------------------------------------------------- 'maxNumberOfRecords': function() { return this._maxNumberOfRecords; }, 'setMaxNumberOfRecords': function(aValue) { this._maxNumberOfRecords = aValue; }, //------------------------------------------------------------------------- 'errorHandler': function(anErrorString, anException) { MochiKit.Logging.logError("- User.errorHandler: " + anErrorString + " (" + anException + ")"); }, //------------------------------------------------------------------------- 'connectionVersion': function() { return this._connectionVersion; }, 'setConnectionVersion': function(aValue) { this._connectionVersion = aValue; }, diff --git a/frontend/beta/js/Clipperz/PM/DataModel/UserPreferences.js b/frontend/beta/js/Clipperz/PM/DataModel/UserPreferences.js index 919289d..d44ad89 100644 --- a/frontend/beta/js/Clipperz/PM/DataModel/UserPreferences.js +++ b/frontend/beta/js/Clipperz/PM/DataModel/UserPreferences.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } //############################################################################# Clipperz.PM.DataModel.UserPreferences = function(args) { args = args || {}; this._user = args['user']; delete args['user']; this._config = args; return this; } Clipperz.PM.DataModel.UserPreferences.prototype = MochiKit.Base.update(null, { //------------------------------------------------------------------------- 'config': function() { return this._config; }, //------------------------------------------------------------------------- 'user': function() { return this._user; }, //------------------------------------------------------------------------- 'updateWithData': function(someValues) { var currentLanguage; //MochiKit.Logging.logDebug(">>> Clipperz.PM.DataModel.UserPreferences.updateWithData: " + Clipperz.Base.serializeJSON(someValues)); currentLanguage = this.preferredLanguage(); MochiKit.Base.update(this._config, someValues); if (this.preferredLanguage() != currentLanguage) { Clipperz.PM.Strings.Languages.setSelectedLanguage(this.preferredLanguage()); } else { //MochiKit.Logging.logDebug("### keepping the browser selected language: " + Clipperz.PM.Strings.selectedLanguage); } return this; }, //------------------------------------------------------------------------- 'configValue': function(aConfigName, aDefaultValue) { var result; //MochiKit.Logging.logDebug(">>> UserPreferences.configValue - config: " + Clipperz.Base.serializeJSON(this.config())); if (typeof(this.config()[aConfigName]) == 'undefined') { result = aDefaultValue; } else { result = this.config()[aConfigName]; } //MochiKit.Logging.logDebug("<<< UserPreferences.configValue"); return result; }, 'setConfigValue': function(aConfigName, aValue) { var result; if (aValue != this.configValue(aConfigName)) { if (aValue == null) { delete this.config()[aConfigName] } else { this.config()[aConfigName] = aValue; } Clipperz.NotificationCenter.notify(this.user(), 'updatedSection', 'preferences', true); result = true; } else { result = false; } return result; }, //------------------------------------------------------------------------- 'useSafeEditMode': function() { return this.configValue('useSafeEditMode', true); }, 'setUseSafeEditMode': function(aValue) { this.setConfigValue('useSafeEditMode', aValue); diff --git a/frontend/beta/js/Clipperz/PM/Date.js b/frontend/beta/js/Clipperz/PM/Date.js index 13116e9..36c10c8 100644 --- a/frontend/beta/js/Clipperz/PM/Date.js +++ b/frontend/beta/js/Clipperz/PM/Date.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Date) == 'undefined') { Clipperz.PM.Date = {}; } Clipperz.PM.Date.VERSION = "0.1"; Clipperz.PM.Date.NAME = "Clipperz.PM.Date"; MochiKit.Base.update(Clipperz.PM.Date, { '__repr__': function () { return "[" + this.NAME + " " + this.VERSION + "]"; }, //------------------------------------------------------------------------- 'toString': function () { return this.__repr__(); }, //------------------------------------------------------------------------- 'locale': function() { return { 'amDesignation': Clipperz.PM.Strings['calendarStrings']['amDesignation'], 'pmDesignation': Clipperz.PM.Strings['calendarStrings']['pmDesignation'], 'days': Clipperz.PM.Strings['calendarStrings']['days'], 'shortDays': Clipperz.PM.Strings['calendarStrings']['shortDays'], 'shortMonths': Clipperz.PM.Strings['calendarStrings']['shortMonths'], 'months': Clipperz.PM.Strings['calendarStrings']['months'] } }, //========================================================================= /* 'formatDateWithPHPLikeTemplate': function(aDate, aTemplate) { return Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale()); }, 'parseDateWithPHPLikeTemplate': function(aDate, aTemplate) { return Clipperz.Date.parseDateWithPHPTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale()); }, //========================================================================= 'formatDateWithJavaLikeTemplate': function(aDate, aTemplate) { return Clipperz.Date.formatDateWithJavaLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale()); }, 'parseDateWithJavaLikeTemplate': function(aDate, aTemplate) { return Clipperz.Date.parseDateWithJavaLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale()); }, */ //========================================================================= 'formatDateWithTemplate': function(aDate, aTemplate) { var result; if (aDate == null) { result = "" } else { result = Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale()); }; return result; }, 'parseDateWithTemplate': function(aValue, aTemplate) { return Clipperz.Date.parseDateWithPHPTemplateAndLocale(aValue, aTemplate, Clipperz.PM.Date.locale()); }, //========================================================================= 'formatDateWithUTCFormat': function(aDate) { return Clipperz.Date.formatDateWithUTCFormatAndLocale(aDate, Clipperz.PM.Date.locale()); }, 'parseDateWithUTCFormat': function(aValue) { var result; if (aValue == null) { result = null; } else { result = Clipperz.Date.parseDateWithUTCFormatAndLocale(aValue, Clipperz.PM.Date.locale()); } return result; }, //========================================================================= 'getElapsedTimeDescription': function(aDate) { var result; diff --git a/frontend/beta/js/Clipperz/PM/Main.js b/frontend/beta/js/Clipperz/PM/Main.js index 989e0a4..3dded31 100644 --- a/frontend/beta/js/Clipperz/PM/Main.js +++ b/frontend/beta/js/Clipperz/PM/Main.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } Clipperz.PM.VERSION = "0.1"; Clipperz.PM.NAME = "Clipperz.PM"; //############################################################################# Clipperz.PM.Main = function() { this._loginPanel = null; this._user = null; this._isRunningCompact = false; Clipperz.NotificationCenter.register(null, 'userConnected', this, 'userConnectedCallback'); Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); Clipperz.NotificationCenter.register(null, 'EXCEPTION', this, 'reportException'); return this; } //============================================================================= MochiKit.Base.update(Clipperz.PM.Main.prototype, { 'toString': function() { return "Clipperz.PM.Main"; }, 'switchLanguageHandler': function() { //MochiKit.Logging.logDebug(">>> main.switchLanguageHandler"); YAHOO.ext.Element.get('donateHeaderIconLink').dom.href = Clipperz.PM.Strings['donateHeaderLinkUrl']; YAHOO.ext.Element.get('donateHeaderLink').update(Clipperz.PM.Strings['donateHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['donateHeaderLinkUrl']; YAHOO.ext.Element.get('creditsHeaderLink').update(Clipperz.PM.Strings['creditsHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['creditsHeaderLinkUrl']; YAHOO.ext.Element.get('feedbackHeaderLink').update(Clipperz.PM.Strings['feedbackHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['feedbackHeaderLinkUrl']; YAHOO.ext.Element.get('helpHeaderLink').update(Clipperz.PM.Strings['helpHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['helpHeaderLinkUrl']; YAHOO.ext.Element.get('forumHeaderLink').update(Clipperz.PM.Strings['forumHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['forumHeaderLinkUrl']; if (YAHOO.ext.Element.get('logout') != null) { YAHOO.ext.Element.get('logout').update(Clipperz.PM.Strings['logoutMenuLabel']); YAHOO.ext.Element.get('lock').update(Clipperz.PM.Strings['lockMenuLabel']); YAHOO.ext.Element.get('recordsTabAnchor').update(Clipperz.PM.Strings['recordMenuLabel']); YAHOO.ext.Element.get('accountTabAnchor').update(Clipperz.PM.Strings['accountMenuLabel']); YAHOO.ext.Element.get('dataTabAnchor').update(Clipperz.PM.Strings['dataMenuLabel']); // YAHOO.ext.Element.get('contactsTabAnchor').update(Clipperz.PM.Strings['contactsMenuLabel']); YAHOO.ext.Element.get('toolsTabAnchor').update(Clipperz.PM.Strings['toolsMenuLabel']); } //MochiKit.Logging.logDebug("<<< main.switchLanguageHandler"); }, //------------------------------------------------------------------------- 'fixToDrawTheMainTabsCorrectlyOnSafari': function() { this.switchLanguageHandler(); }, //------------------------------------------------------------------------- 'run': function(shouldShowRegistrationForm) { var mainElement; Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'updateProgressDialogStatus'); YAHOO.ext.Element.get('recordDetailEditModeHeaderMask').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide().unmask(); YAHOO.ext.Element.get('recordDetailEditModeVerticalMask').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide().unmask(); //MochiKit.Logging.logDebug(">>> Main.run"); mainElement = YAHOO.ext.Element.get('main'); if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { YAHOO.ext.Element.get('applicationVersionType').dom.className = "readOnly"; } mainElement.update(""); Clipperz.YUI.DomHelper.append(mainElement.dom, {tag:'ul', cls:'clipperzTabPanels', children:[ {tag:'li', id:'loginPanel'} ]}) this.setLoginPanel(new Clipperz.PM.Components.Panels.LoginPanel(YAHOO.ext.Element.get('loginPanel'))); //MochiKit.Logging.logDebug("--- Main.run - selecting active form to show ..."); if (shouldShowRegistrationForm == true) { this.loginPanel().showRegistrationForm(false); } else { this.loginPanel().showLoginForm(false); } this.switchLanguageHandler(); //MochiKit.Logging.logDebug("--- Main.run - selecting active form to show. done."); //MochiKit.Logging.logDebug("<<< Main.run"); }, //------------------------------------------------------------------------- diff --git a/frontend/beta/js/Clipperz/PM/Proxy.js b/frontend/beta/js/Clipperz/PM/Proxy.js index bec9195..cf5a237 100644 --- a/frontend/beta/js/Clipperz/PM/Proxy.js +++ b/frontend/beta/js/Clipperz/PM/Proxy.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } //============================================================================= Clipperz.PM.Proxy = function(args) { args = args || {}; this._shouldPayTolls = args.shouldPayTolls || false; this._tolls = { 'CONNECT': [], 'REGISTER': [], 'MESSAGE': [] }; if (args.isDefault === true) { Clipperz.PM.Proxy.defaultProxy = this; } return this; } Clipperz.PM.Proxy.prototype = MochiKit.Base.update(null, { 'toString': function() { return "Clipperz.PM.Proxy"; }, //========================================================================= 'shouldPayTolls': function() { return this._shouldPayTolls; }, //------------------------------------------------------------------------- 'tolls': function() { return this._tolls; }, //------------------------------------------------------------------------- 'payToll': function(aRequestType, someParameters) { var deferredResult; //console.log(">>> Proxy.payToll", aRequestType, someParameters); if (this.shouldPayTolls()) { deferredResult = new MochiKit.Async.Deferred(); if (this.tolls()[aRequestType].length == 0) { deferredResult.addCallback(MochiKit.Base.method(this, 'sendMessage', 'knock', {requestType:aRequestType})); deferredResult.addCallback(MochiKit.Base.method(this, 'setTollCallback')); } deferredResult.addCallback(MochiKit.Base.method(this.tolls()[aRequestType], 'pop')); deferredResult.addCallback(MochiKit.Base.methodcaller('deferredPay')); deferredResult.addCallback(function(aToll) { var result; result = { parameters: someParameters, toll: aToll } return result; }); deferredResult.callback(); } else { deferredResult = MochiKit.Async.succeed({parameters:someParameters}); } //console.log("<<< Proxy.payToll"); return deferredResult; }, //------------------------------------------------------------------------- 'addToll': function(aToll) { //console.log(">>> Proxy.addToll", aToll); this.tolls()[aToll.requestType()].push(aToll); //console.log("<<< Proxy.addToll"); }, //========================================================================= 'setTollCallback': function(someParameters) { //console.log(">>> Proxy.setTollCallback", someParameters); if (typeof(someParameters['toll']) != 'undefined') { //console.log("added a new toll", someParameters['toll']); this.addToll(new Clipperz.PM.Toll(someParameters['toll'])); } //console.log("<<< Proxy.setTallCallback", someParameters['result']); diff --git a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.JSON.js b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.JSON.js index 4f3b4b2..dac966d 100755 --- a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.JSON.js +++ b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.JSON.js @@ -1,97 +1,95 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } //============================================================================= Clipperz.PM.Proxy.JSON = function(args) { Clipperz.PM.Proxy.JSON.superclass.constructor.call(this, args); this._url = args.url || Clipperz.Base.exception.raise('MandatoryParameter'); return this; } YAHOO.extendX(Clipperz.PM.Proxy.JSON, Clipperz.PM.Proxy, { 'toString': function() { return "Clipperz.PM.Proxy.JSON"; }, //========================================================================= 'url': function () { return this._url; }, //========================================================================= 'sendMessage': function(aFunctionName, someParameters) { var deferredResult; var parameters; parameters = { method: aFunctionName, // version: someParameters['version'], // message: someParameters['message'], parameters: Clipperz.Base.serializeJSON(someParameters) }; deferredResult = new MochiKit.Async.Deferred(); deferredResult.addCallback(function (aValue) { MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'remoteRequestSent'); return aValue; }); deferredResult.addCallback(MochiKit.Async.doXHR, this.url(), { method:'POST', sendContent:MochiKit.Base.queryString(parameters), headers:{"Content-Type":"application/x-www-form-urlencoded"} }); deferredResult.addCallback(function (aValue) { MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'remoteRequestReceived'); return aValue; }); // deferredResult.addCallback(MochiKit.Async.evalJSONRequest); deferredResult.addCallback(MochiKit.Base.itemgetter('responseText')); deferredResult.addCallback(Clipperz.Base.evalJSON); deferredResult.addCallback(function (someValues) { if (someValues['result'] == 'EXCEPTION') { throw someValues['message']; } return someValues; }) // return MochiKit.Base.evalJSON(req.responseText); deferredResult.callback(); return deferredResult; }, //========================================================================= __syntaxFix__: "syntax fix" }); diff --git a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js index d5336be..1a5caff 100644 --- a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js +++ b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js @@ -1,118 +1,116 @@ /* -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/. */ try { if (typeof(Clipperz.PM.Proxy.Offline) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.PM.Proxy.Offline.DataStore depends on Clipperz.PM.Proxy.Offline!"; } //============================================================================= Clipperz.PM.Proxy.Offline.DataStore = function(args) { args = args || {}; this._data = args.data || (typeof(_clipperz_dump_data_) != 'undefined' ? _clipperz_dump_data_ : null); this._isReadOnly = (typeof(args.readOnly) == 'undefined' ? true : args.readOnly); this._shouldPayTolls = args.shouldPayTolls || false; this._tolls = {}; this._connections = {}; this._b = null; this._B = null; this._A = null; this._userData = null; return this; } //Clipperz.Base.extend(Clipperz.PM.Proxy.Offline.DataStore, Object, { Clipperz.PM.Proxy.Offline.DataStore.prototype = MochiKit.Base.update(null, { //------------------------------------------------------------------------- 'isReadOnly': function () { return this._isReadOnly; }, //------------------------------------------------------------------------- 'shouldPayTolls': function() { return this._shouldPayTolls; }, //------------------------------------------------------------------------- 'data': function () { return this._data; }, //------------------------------------------------------------------------- 'tolls': function () { return this._tolls; }, //------------------------------------------------------------------------- 'connections': function () { return this._connections; }, //========================================================================= 'resetData': function() { this._data = { 'users': { 'catchAllUser': { __masterkey_test_value__: 'masterkey', s: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00', v: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00' } } }; }, //------------------------------------------------------------------------- 'setupWithEncryptedData': function(someData) { this._data = Clipperz.Base.deepClone(someData); }, //------------------------------------------------------------------------- 'setupWithData': function(someData) { var deferredResult; var resultData; var i, c; //Clipperz.log(">>> Proxy.Test.setupWithData"); resultData = this._data; deferredResult = new MochiKit.Async.Deferred(); c = someData['users'].length; for (i=0; i<c; i++) { var newConnection; var recordConfiguration; diff --git a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.js b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.js index 3cf499e..91a7b48 100644 --- a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.js +++ b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } //============================================================================= Clipperz.PM.Proxy.Offline = function(args) { args = args || {}; Clipperz.PM.Proxy.Offline.superclass.constructor.call(this, args); this._dataStore = args.dataStore || new Clipperz.PM.Proxy.Offline.DataStore(args); return this; } YAHOO.extendX(Clipperz.PM.Proxy.Offline, Clipperz.PM.Proxy, { 'toString': function () { return "Clipperz.PM.Proxy.Offline"; }, //------------------------------------------------------------------------- 'dataStore': function () { return this._dataStore; }, //------------------------------------------------------------------------- 'sendMessage': function(aFunctionName, someParameters) { return this.dataStore().processMessage(aFunctionName, someParameters); }, //------------------------------------------------------------------------- 'isReadOnly': function () { return true; }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Test.js b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Test.js index ce6e6d8..18014f4 100644 --- a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Test.js +++ b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Test.js @@ -1,91 +1,89 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Proxy) == 'undefined') { Clipperz.PM.Proxy = {}; } //============================================================================= Clipperz.PM.Proxy.Test = function(args) { args = args || {}; Clipperz.PM.Proxy.Offline.call(this, args); return this; } Clipperz.PM.Proxy.Test.prototype = MochiKit.Base.update(new Clipperz.PM.Proxy.Offline(), { 'toString': function() { return "Clipperz.PM.Proxy.Test"; }, //------------------------------------------------------------------------- 'isTestData': function() { return typeof(this.userData()['__masterkey_test_value__'] != 'undefined'); }, //------------------------------------------------------------------------- 'userDetails': function() { var result; if (this.isTestData()) { var serializedHeader; var version; version = this.userData()['version']; serializedHeader = Clipperz.Base.serializeJSON(this.userData()['userDetails']); result = Clipperz.PM.Crypto.encryptingFunctions.versions[version].encrypt(this.userData()['__masterkey_test_value__'], serializedHeader); } else { result = Clipperz.PM.Proxy.Offline.prototype.userDetails.call(this); } return result; }, //------------------------------------------------------------------------- 'statistics': function() { var result; var serializedStatistics; var version; version = this.userData()['version']; serializedStatistics = Clipperz.Base.serializeJSON(this.userData()['statistics']); result = Clipperz.PM.Crypto.encryptingFunctions.versions[version].encrypt(this.userData()['__masterkey_test_value__'], serializedStatistics); return result; }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/beta/js/Clipperz/PM/Strings.js b/frontend/beta/js/Clipperz/PM/Strings.js index 24ef0ce..204159f 100644 --- a/frontend/beta/js/Clipperz/PM/Strings.js +++ b/frontend/beta/js/Clipperz/PM/Strings.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Strings) == 'undefined') { Clipperz.PM.Strings = {}; } if (typeof(Clipperz.PM.Strings.Languages) == 'undefined') { Clipperz.PM.Strings.Languages = {}; } Clipperz.PM.Strings.standardStrings = { 'loginPanelSwitchLanguageSelectOptions': [ /* {tag:'option', html:"Arabic (Oman) (العربية)", value:'ar-OM', disabled:true}, {tag:'option', html:"Arabic (Syria) (العربية)", value:'ar-SY', disabled:true}, {tag:'option', html:"Bahasa Indonesia", value:'id-ID', disabled:true}, {tag:'option', html:"Bulgarian (Български)", value:'bg-BG', disabled:true}, {tag:'option', html:"Català", value:'ca-ES', disabled:true}, {tag:'option', html:"Chinese (Simplified) (简体中文)", value:'zh-CN', disabled:true}, {tag:'option', html:"Chinese (Traditional) (正體中文)", value:'zh-TW', disabled:true}, {tag:'option', html:"Czech (Česky)", value:'cs-CZ', disabled:true}, {tag:'option', html:"Dansk", value:'da-DK', disabled:true}, {tag:'option', html:"Deutsch", value:'de-DE'/ *, disabled:true* /}, {tag:'option', html:"English (American)", value:'en-US'/ *, disabled:true* /}, {tag:'option', html:"English (British)", value:'en-GB'/ *, disabled:true* /}, {tag:'option', html:"English (Canadian)", value:'en-CA'/ *, disabled:true* /}, {tag:'option', html:"Español", value:'es-ES', disabled:true}, {tag:'option', html:"Eesti", value:'et-EE', disabled:true}, {tag:'option', html:"Français", value:'fr-FR', disabled:true}, {tag:'option', html:"Galego", value:'gl-ES', disabled:true}, {tag:'option', html:"Greek (Ελληνικά)", value:'el-GR', disabled:true}, {tag:'option', html:"Íslenska", value:'is-IS', disabled:true}, {tag:'option', html:"Italiano", value:'it-IT'/ *, disabled:true* /}, {tag:'option', html:"Japanese (日本語)", value:'ja-JP', disabled:true}, {tag:'option', html:"Korean (한국어)", value:'ko-KR', disabled:true}, {tag:'option', html:"Latviešu", value:'lv-LV', disabled:true}, {tag:'option', html:"Lietuvių", value:'lt-LT', disabled:true}, {tag:'option', html:"Macedonian (Македонски)", value:'mk-MK', disabled:true}, {tag:'option', html:"Magyar", value:'hu-HU', disabled:true}, {tag:'option', html:"Nederlands", value:'nl-NL', disabled:true}, {tag:'option', html:"Norsk bokmål", value:'nb-NO', disabled:true}, {tag:'option', html:"Norsk nynorsk", value:'nn-NO', disabled:true}, {tag:'option', html:"Persian (Western) (فارسى)", value:'fa-IR', disabled:true}, {tag:'option', html:"Polski", value:'pl-PL', disabled:true}, {tag:'option', html:"Português", value:'pt-PT'/ *, disabled:true* /}, {tag:'option', html:"Português Brasileiro", value:'pt-BR'/ *, disabled:true* /}, {tag:'option', html:"Românä", value:'ro-RO', disabled:true}, {tag:'option', html:"Russian (Русский)", value:'ru-RU', disabled:true}, {tag:'option', html:"Slovak (Slovenčina)", value:'sk-SK', disabled:true}, {tag:'option', html:"Slovenian (Slovenščina)", value:'sl-SI', disabled:true}, {tag:'option', html:"Suomi", value:'fi-FI', disabled:true}, {tag:'option', html:"Svenska", value:'sv-SE', disabled:true}, {tag:'option', html:"Thai (ไทย)", value:'th-TH', disabled:true}, {tag:'option', html:"Türkçe", value:'tr-TR', disabled:true}, {tag:'option', html:"Ukrainian (Українська)", value:'uk-UA', disabled:true} */ {tag:'option', html:"Arabic (العربية)", value:"ar", disabled:true, cls:'disabledOption'}, // {tag:'option', html:"Chinese (中文)", value:"zh", disabled:true}, {tag:'option', html:"Chinese (Simplified) (简体中文)", value:'zh-CN'}, {tag:'option', html:"Dutch (Nederlands)", value:"nl-NL", disabled:true, cls:'disabledOption'}, {tag:'option', html:"English", value:"en-US"}, {tag:'option', html:"French (Français)", value:"fr-FR"}, {tag:'option', html:"German (Deutsch)", value:"de-DE"/* -- */, disabled:true, cls:'disabledOption' /* */}, {tag:'option', html:"Greek (Ελληνικά)", value:"el-GR"/* -- */, disabled:true, cls:'disabledOption' /* */}, {tag:'option', html:"Hebrew (עברית)", value:"he-IL"/* -- */, disabled:true, cls:'disabledOption' /* */}, {tag:'option', html:"Italian (Italiano)", value:"it-IT"}, {tag:'option', html:"Japanese (日本語)", value:"ja-JP"}, {tag:'option', html:"Korean (한국어)", value:"ko-KR", disabled:true, cls:'disabledOption'}, {tag:'option', html:"Norwegian (Norsk)", value:"no", disabled:true, cls:'disabledOption'}, {tag:'option', html:"Persian (فارسی)", value:"fa-IR", disabled:true, cls:'disabledOption'}, {tag:'option', html:"Polish (Polski)", value:"pl-PL", disabled:true, cls:'disabledOption'}, {tag:'option', html:"Portuguese (Português)", value:"pt-BR"}, {tag:'option', html:"Russian (Русский)", value:"ru-RU"}, {tag:'option', html:"Spanish (Español)", value:"es-ES"}, {tag:'option', html:"Swedish (Svenska)", value:"sv-SE", disabled:true, cls:'disabledOption'}, {tag:'option', html:"Turkish (Türkçe)", value:"tr-TR", disabled:true, cls:'disabledOption'}, {tag:'option', html:"Vietnamese (Tiếng Việt)", value:"vi-VN", disabled:true, cls:'disabledOption'} ] } Clipperz.PM.Strings.GeneralSettings = { 'en-us': { 'loginFormAarghThatsBadUrl': "http://www.clipperz.com/support/faq/account_faq", 'loginFormVerifyTheCodeUrl': "http://www.clipperz.com/learn_more/reviewing_the_code", 'donateHeaderLinkUrl': "http://www.clipperz.com/donations", 'creditsHeaderLinkUrl': "http://www.clipperz.com/credits", 'feedbackHeaderLinkUrl': "http://www.clipperz.com/contact", 'helpHeaderLinkUrl': "http://www.clipperz.com/support/user_guide", 'forumHeaderLinkUrl': "http://www.clipperz.com/forum", 'httpAuthBookmarkletConfiguration': {tag:'textarea', id:'httpAuthDefaultConfiguration', html:"" + "{ \"page\":{\"title\":\"HTTP authentication\"}," + "\n" + " \"form\":{\"attributes\": {" + "\n" + " \"action\":\"\"," + "\n" + " \"type\":\"http_auth\"" + "\n" + " }, \"inputs\": [" + "\n" + diff --git a/frontend/beta/js/Clipperz/PM/Strings/MessagePanelConfigurations.js b/frontend/beta/js/Clipperz/PM/Strings/MessagePanelConfigurations.js index 7f6c52f..7565d2d 100644 --- a/frontend/beta/js/Clipperz/PM/Strings/MessagePanelConfigurations.js +++ b/frontend/beta/js/Clipperz/PM/Strings/MessagePanelConfigurations.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Strings) == 'undefined') { Clipperz.PM.Strings = {}; } Clipperz.PM.Strings.messagePanelConfigurations = { //------------------------------------------------------------------------- // // Registration - connection // 'registration_verify': function() { return { 'title': null, 'text': Clipperz.PM.Strings['connectionRegistrationSendingRequestMessageText'] } }, 'registration_sendingCredentials': function() { return { 'title': null, 'text': Clipperz.PM.Strings['connectionRegistrationSendingCredentialsMessageText'] } }, //------------------------------------------------------------------------- // // One Time Password login message panel // 'OTP_login_start': function() { return { 'title': Clipperz.PM.Strings['OTPloginMessagePanelInitialTitle'], 'text': Clipperz.PM.Strings['OTPloginMessagePanelInitialText'], 'steps': '+3', 'buttons': {} } }, 'OTP_login_loadingOTP': function() { return { 'title': Clipperz.PM.Strings['OTPloginMessagePanelLoadingTitle'], 'text': Clipperz.PM.Strings['OTPloginMessagePanelLoadingText'] } }, 'OTP_login_extractingPassphrase': function() { return { 'title': Clipperz.PM.Strings['OTPloginMessagePanelProcessingTitle'], 'text': Clipperz.PM.Strings['OTPloginMessagePanelProcessingText'] } }, //------------------------------------------------------------------------- // // Login message panel // 'login_start': function() { return { 'title': Clipperz.PM.Strings['loginMessagePanelInitialTitle'], 'text': Clipperz.PM.Strings['loginMessagePanelInitialText'], 'steps': '+7', 'buttons': { 'ok': Clipperz.PM.Strings['loginMessagePanelInitialButtonLabel'] } } }, 'login_connected': function() { return { 'title': Clipperz.PM.Strings['loginMessagePanelConnectedTitle'], 'text': Clipperz.PM.Strings['loginMessagePanelConnectedText'], 'buttons': {} } }, 'login_failed': function() { return { 'title': Clipperz.PM.Strings['loginMessagePanelFailureTitle'], 'text': Clipperz.PM.Strings['loginMessagePanelFailureText'], 'button': Clipperz.PM.Strings['loginMessagePanelFailureButtonLabel'] } }, //------------------------------------------------------------------------- // // Login message panel - connection // 'connection_sendingCredentials': function() { return { 'title': Clipperz.PM.Strings['connectionLoginSendingCredentialsMessageTitle'], 'text': Clipperz.PM.Strings['connectionLoginSendingCredentialsMessageText'] diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_de-DE.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_de-DE.js index 6ccffa8..0ca4b51 100644 --- a/frontend/beta/js/Clipperz/PM/Strings/Strings_de-DE.js +++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_de-DE.js @@ -1,118 +1,116 @@ /* -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.PM.Strings.Languages['de-DE'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 'clipperzServiceDescription': "<h2>Privatsphäre für Deine Daten</h2> <ul> <li> <h3>Clipperz heißt:</h3> <ul> <li> <p>sichere und einfache zu bedienene Passwortverwaltung</p> </li> <li> <p>eine effektive Lösung des einmaligen Anmeldens</p> </li> <li> <p>eine digitale Brieftasche für Deine vertraulichen Daten</p> </li> </ul> </li> <li> <h3>Clipperz bietet Dir:</h3> <ul> <li> <p>einfaches Speichern und Verwalten von Passwörtern und Webzugangsdaten</p> </li> <li> <p>schnelles unkompliziertes einloggen, ohne Eingabe des Benutzernamen und Passworts, bei Webdiensten</p> </li> <li> <p>Schutz aller Deiner persönlichen Daten: Zutrittscodes, PINs, Benutzernamen, Passwörter, Kreditkartennummern, …</p> </li> <li> <p>Deine Geheimnisse mit Familienmitgliedern und Freunden zu teilen (mehr dazu in Kürze)</p> </li> </ul> </li> <li> <h3>Clipperz ist:</h3> <ul> <li> <p>kostenlos und absolut anonym</p> </li> <li> <p>unkomplizierter Zugriff zu jeder Zeit von jedem Rechner</p> </li> <li> <p>ohne Download und Installation verwendbar</p> </li> <li> <p>ein Schutz gegen das Speichern von Passwörtern auf Deinem PC oder das Notieren auf Papier</p> </li> </ul> </li> <li> <h3>Clipperz Sicherheit:</h3> <ul> <li> <p>Deine sensiblen persönlichen Informationen werden lokal durch Deinen Browser verschlüsselt, bevor sie an Clipperz über das Internet gesendet werden</p> </li> <li> <p>Der Schlüssel für diese Daten ist der Sicherheitssatz, den nur Du kennst</p> </li> <li> <p>Clipperz speichert Deine sensiblen Daten nur in verschlüsselter Form und kann zu keinem Zeitpunkt diese entschlüssel und in ihrer ursprünglichen Klartextform zugänglich machen</p> </li> <li> <p>Clipperz basiert auf standart Verschlüsselungsverfahren. Nichts ausergewöhnliches – oder hand gestricktes</p> </li> <li> <p>Du kannst den Quellcode zu jeder Zeit anschauen, aber Du brauchst nichts von Kryptographie zu verstehen um ein glücklicher Anwender zu sein!</p> </li> </ul> </li> <li> <a href=\"http://www.clipperz.com\" target=\"_blank\">Weitere Informationen</a> </li> </ul> ", 'loginFormTitle': "Login zu Deinem Clipperz Konto", 'loginFormUsernameLabel': "Benutzernamen", 'loginFormPassphraseLabel': "Sicherheitssatz", 'loginFormDontHaveAnAccountLabel': "Du hast noch kein Clipperz Konto?", 'loginFormCreateOneLabel': "Konto erstellen", 'loginFormForgotYourCredentialsLabel': "Zugangsdaten vergessen?", 'loginFormAarghThatsBadLabel': "Misst! Dass ist schlecht!", 'loginFormAfraidOfMaliciousScriptsLabel': "verängstigt von bösartigen Scripts?", 'loginFormVerifyTheCodeLabel': "begutachte den Quellcode", 'loginFormButtonLabel': "Einloggen", 'loginPanelSwithLanguageDescription': "<h5>Wechsel zu Deiner vervorzugten Sprache</h5> ", 'browserCompatibilityDescription': "<p>Bessere und sicherere Clipperz-Erfahrung mit Firefox. Clipperz funktioniert auch mit Safari, Opera und MS Internet Explorer!</p> ", 'loginMessagePanelInitialTitle': "Du wirst eingeloggt…", 'loginMessagePanelInitialButtonLabel': "Abbruch", 'loginMessagePanelConnectedTitle': "Verbunden", 'loginMessagePanelConnectedText': "Fertig", 'loginMessagePanelFailureTitle': "Fehler", 'loginMessagePanelFailureText': "Login fehlgeschlagen", 'loginMessagePanelFailureButtonLabel': "Schließen", 'connectionLoginSendingCredentialsMessageTitle': "Prüfe Zugangsdaten", 'connectionLoginSendingCredentialsMessageText': "Sende Zugangsdaten", 'connectionLoginCredentialsVerificationMessageTitle': "Prüfe Zugangsdaten", 'connectionLoginCredentialsVerificationMessageText': "Führe SRP Authentifizierung durch", 'connectionLoginDoneMessageTitle': "Prüfe Zugangsdaten", 'connectionLoginDoneMessageText': "Verbunden", 'userLoginPanelUpgradingUserCredentialsMessageTitle': "Prüfe Zugangsdaten", 'userLoginPanelUpgradingUserCredentialsMessageText': "Aktualisierung Deiner Zugangsdaten auf ein neues Authentifizierungsschema", 'userLoginPanelConnectedMessageTitle': "Benutzer authentifiziert", 'userLoginPanelConnectedMessageText': "Login erfolgreich", 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle': "Prüfe Zugangsdaten", 'userLoginPanelTryingAnOlderConnectionSchemaMessageText': "Probiere älteres Authentifizierungsschema", 'userLoginPanelLoadingUserDataMessageTitle': "Benutzer authentifiziert", 'userLoginPanelLoadingUserDataMessageText': "Lade verschlüsselte Kartendaten von Clipperz", 'userLoginPanelDecryptingUserDataMessageTitle': "Benutzer authentifiziert", 'userLoginPanelDecryptingUserDataMessageText': "Lokale Entschlüsselung der Kartendaten", 'userLoginPanelDecryptingUserStatisticsMessageTitle': "Benutzer authentifiziert", 'userLoginPanelDecryptingUserStatisticsMessageText': "Lokale Entschlüsselung der Benutzerstatisik", 'splashAlertTitle': "Willkommen bei Clipperz!", 'splashAlertText': "<p>Sicherheitshinweis</p> <ul> <li> <p>Die Speicherung von Informationen bei Clipperz ist so sicher, wie der Sicherheitssatz den Du zum Schutz gewählt hast. Ist der Sicherheitssatz nicht bekannt, können keine Informationen abgefragt werden.</p> </li> <li> <p>Solltest Du Clipperz nutzen, um sensible und kritische persönliche Daten abzuspeichern, so empfehlen wir in jedem Fall die Nutzung eines langen Sicherheitssatzes als Passwort und die Nutzung von Sonderzeichen, Zahlen, Groß- und Kleinbuchstaben.</p> </li> <li> <p>Clipperz kann einen verlorenen Sicherheitssatz nicht wiederherstellen!</p> </li> </ul> <p>Weitere Informationen findest Du bei <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a>.</p> ", 'splashAlertCloseButtonLabel': "Ok", 'registrationFormTitle': "Erstelle Dein Konto", 'registrationFormUsernameLabel': "Benutzernamen", 'registrationFormPassphraseLabel': "Sicherheitssatz", 'registrationFormRetypePassphraseLabel': "Wiederhole Sicherheitssatz", 'registrationFormSafetyCheckLabel': "Ich akzeptiere dass es Clipperz nicht möglich ist, einen verlorenen Sicherheitssatz wiederherzustellen.", 'registrationFormTermsOfServiceCheckLabel': "Ich habe die <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Nutzungsbedingungen</a> gelesen, verstanden und akzeptiere diese.", 'registrationFormDoYouAlreadyHaveAnAccountLabel': "Hast Du bereits einen Zugang?", 'registrationFormSimplyLoginLabel': "Einloggen", 'registrationFormButtonLabel': "Anmelden", 'registrationFormWarningMessageNotMatchingPassphrases': "Deine Sicherheitssätze stimmen nicht überein. Bitte erneut eingeben.", 'registrationFormWarningMessageSafetyCheckNotSelected': "Bitte lese die Bedingungen und akzeptiere die Auswahlboxen weiter unten.", 'registrationFormWarningMessageTermsOfServiceCheckNotSelected': "Du musst die Nutzungsbedingungen akzeptieren.", 'registrationMessagePanelInitialTitle': "Benutzer wird angelegt…", 'registrationMessagePanelInitialButtonLabel': "Abbruch", 'registrationMessagePanelRegistrationDoneTitle': "Anmeldung", 'registrationMessagePanelRegistrationDoneText': "Fertig", 'registrationMessagePanelFailureTitle': "Anmerldung fehlgeschlagen", 'registrationMessagePanelFailureButtonLabel': "Schließen", 'connectionRegistrationSendingRequestMessageText': "Zugangsdaten werden geprüft", 'connectionRegistrationSendingCredentialsMessageText': "Sende Zugangsdaten", 'registrationSplashPanelTitle': "Sicherheitshinweis", 'registrationSplashPanelDescription': "<p>Dies sind Deine Clipperz Zugangsdaten, pass sehr gut auf sie auf. Clipperz wird diese kein zweites und weiteres mal anzeigen!</p> ", 'registrationSplashPanelUsernameLabel': "Benutzernamen", 'registrationSplashPanelPassphraseLabel': "Schlüsselsatz", 'donateHeaderLinkLabel': "spende", 'creditsHeaderLinkLabel': "credits", 'feedbackHeaderLinkLabel': "feedback", 'helpHeaderLinkLabel': "hilfe", 'forumHeaderLinkLabel': "forum", 'recordMenuLabel': "Karten", 'accountMenuLabel': "Benutzer", 'dataMenuLabel': "Daten", 'contactsMenuLabel': "Kontakt", 'bookmarkletMenuLabel': "Bookmarklet", 'logoutMenuLabel': "Ausloggen", 'lockMenuLabel': "Sperren", 'lockTitle': "Dieses Konto ist gesperrt", 'lockDescription': "<p>Bitte gebe Deinen Sicherheitssatz ein, um das Clipperz-Konto zu entsperren.</p> ", 'unlockButtonLabel': "Entsperren", 'changePasswordTabLabel': "Sicherheitssatz ändern", 'changePasswordTabTitle': "Sicherheitssatz ändern", 'changePasswordFormUsernameLabel': "Benutzername", 'changePasswordFormOldPassphraseLabel': "Alter Sicherheitssatz", 'changePasswordFormNewPassphraseLabel': "Neuer Sicherheitssatz", 'changePasswordFormRetypePassphraseLabel': "Wiederholdung neuen Sicherheitssatz", 'changePasswordFormSafetyCheckboxLabel': "Ich akzeptiere dass es Clipperz nicht möglich ist, einen verlorenen Sicherheitssatz wiederherzustellen.", 'changePasswordFormSubmitLabel': "Sicherheitssatz ändern", 'changePasswordFormWrongUsernameWarning': "Falscher Benutzername", 'changePasswordFormWrongPassphraseWarning': "Falscher Sicherheitssatz", 'changePasswordFormWrongRetypePassphraseWarning': "Deine Sicherheitssätze stimmen nicht überein. Bitte erneut eingeben.", 'changePasswordFormSafetyCheckWarning': "Bitte ließ die folgenden Hinweise und akzeptiere diese.", diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_el-GR.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_el-GR.js index fc610d6..f7a7583 100644 --- a/frontend/beta/js/Clipperz/PM/Strings/Strings_el-GR.js +++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_el-GR.js @@ -1,118 +1,116 @@ /* -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/. */ //============================================================================= // // G R E E K (el_GR) // //============================================================================= Clipperz.PM.Strings.Languages['el-gr'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { //----------------------------------------------------- // Login page - description 'clipperzServiceDescriptionConfig': [ {tag:'h2', html:'Κρατήστε το για τον Εαυτό Σας'}, {tag:'ul', children:[ {tag:'li', children:[ {tag:'h3', html:'Το Clipperz είναι:'}, {tag:'ul', children:[ {tag:'li', children:[{tag:'span', html:'Ένας ασφαλής και απλός τρόπος διαχείρησης όλων των κωδικών πρόσβασης σας'}]}, {tag:'li', children:[{tag:'span', html:'Μια αποτελεσματική λύση πρόσβασης σε δεδομένα/εφαρμογές με μοναδικό κωδικό'}]}, {tag:'li', children:[{tag:'span', html:'Μια ψηφιακή θυρίδα για τα απόρρητα δεδομένα σας'}]} ]} ]}, {tag:'li', children:[ {tag:'h3', html:'Με το Clipperz μπορείτε:'}, {tag:'ul', children:[ {tag:'li', children:[{tag:'span', html:'Να αποθηκεύσετε και να διαχειριστείτε όλους τους κωδικούς πρόσβασης και τα online πιστοποιητικά/διαπιστευτήρια σας'}]}, {tag:'li', children:[{tag:'span', html:'Να έχετε πρόσβαση (login) στις υπηρεσίες διαδικτύου χωρίς την εισαγωγή oνομάτων λογαρισμών χρήστη (username),ή, κωδικών πρόσβασης (passwords)'}]}, {tag:'li', children:[{tag:'span', html:'Να προστατεύσετε όλα τα προσωπικά δεδομένα σας: κωδικούς συναγερμών, PINs, αριθμούς πιστωτικών καρτών, ...'}]}, {tag:'li', children:[{tag:'span', html:'Να μοιραστείτε δεδομένα με μέλη της οικογένεια σας και τους συνεργάτες σας (σύντομα στην διάθεση σας)'}]} ]} ]}, {tag:'li', children:[ {tag:'h3', html:'Τα πλεονεκτήματα του Clipperz είναι:'}, {tag:'ul', children:[ {tag:'li', children:[{tag:'span', html:'Είναι δωρεάν και προσφέρει πρόσβαση ανώνυμα'}]}, {tag:'li', children:[{tag:'span', html:'Μπορεί να χρησιμοποιηθεί οποαδήποτε ώρα και από οποιοδήποτε τερματικό'}]}, {tag:'li', children:[{tag:'span', html:'Δεν απαιτεί την φόρτωση και εγκατάσταση οποιουδήποτε λογισμικού'}]}, {tag:'li', children:[{tag:'span', html:'Αποφεύγετε την διατήριση απορρήτων στον υπολογιστή σας ή σε έντυπη μορφή'}]} ]} ]}, {tag:'li', children:[ {tag:'h3', html:'Η ασφάλεια που παρέχει το Clipperz:'}, {tag:'ul', children:[ {tag:'li', children:[{tag:'span', html:'Τα απόρρητα δεδομένα σας κωδικοποιούνται τοπικά από τον διακομιστή σας (browser) πρίν να φορτωθούν στο Clipperz'}]}, {tag:'li', children:[{tag:'span', html:'Το κλειδί της κωδικοποίησης είναι μία φράση-κωδικός γνωστή μόνο σε εσάς'}]}, {tag:'li', children:[{tag:'span', html:'Το Clipperz φυλάσσει τα προσωπικά σας δεδομένα σε κωδικοποιημένη μορφή, και δεν μπορεί να έχει πρόσβαση σε αυτά στην αρχική τους μορφή'}]}, {tag:'li', children:[{tag:'span', html:'Το Clipperz χρησιμοποιεί επίσημες /πρότυπες μεθόδους κωδικοποίησης, και όχι αόριστα και εφάνταστα μοντέλα'}]}, {tag:'li', children:[{tag:'span', html:'Έχετε πρόσβαση στον πηγαίο κώδικα οποτεδήποτε το θελήσετε, και δεν χρειάζετε να γνωρίζετε τίποτα από κρυπτογράφηση για να είστε ένας ευχαριστημένος χρήστης!'}]} ]} ]}, {tag:'li', children:[ {tag:'a', href:"http://www.clipperz.com", target:'_blank', html:'Μάθετε περισσότερα'} ]} ]} ], // Login page - form 'loginFormTitle': "Συνδεθείτε με τον Clipperz λογαριασμό σας", 'loginFormUsernameLabel': "Όνομα χρήστη", 'loginFormPassphraseLabel': "Κωδική φράση", 'loginFormDontHaveAnAccountLabel': "Δεν έχετε δημιουργήσει λογαριασμό?", 'loginFormCreateOneLabel': "Δημιουργήστε έναν", 'loginFormForgotYourCredentialsLabel': "Ξεχάσατε τα διαπιστευτήριά σας?", 'loginFormAarghThatsBadLabel': "Ααααργκ! Αυτό είναι κακό!", 'loginFormAfraidOfMaliciousScriptsLabel': "φοβάστε κακόβουλα προγράμματα (scripts)?", 'loginFormVerifyTheCodeLabel': "Επαληθεύστε τον κωδικό", 'loginFormButtonLabel': "Σύνδεση", // Login page - language selection 'loginPanelSwithLanguageDescriptionConfig': [ {tag:'h5', html:"Αλλάξτε στην γλώσσα προτήμησης σας"} ], // Login page - browser compatibility 'browserCompatibilityDescriptionConfig': [ {tag:'p', html:"Έχετε μία καλύτερη και πιό ασφαλή Clipperz εμπειρία χρησιμοποιόντας τον Firefox. Ωστόσο το Clipperz συνεργάζετε άψογα με Opera και MS Internet Explorer!"} ], // Login message panel 'loginMessagePanelInitialTitle': "Γίνεται σύνδεση ...", 'loginMessagePanelInitialButtonLabel': "Ακύρωση", 'loginMessagePanelConnectedTitle': "Συνδεθήκατε", 'loginMessagePanelConnectedText': "Ολοκληρώθηκε", 'loginMessagePanelFailureTitle': "Λάθος", 'loginMessagePanelFailureText': "Η σύνδεση χρήστη απέτυχε", 'loginMessagePanelFailureButtonLabel': "Κλείσιμο", // Login message panel - connection 'connectionLoginSendingCredentialsMessageTitle': "Γίνεται επαλήθευση διαπιστευτηρίων", 'connectionLoginSendingCredentialsMessageText': "Αποστέλλονται διαπιστευτήρια", 'connectionLoginCredentialsVerificationMessageTitle': "Γίνεται επαλήθευση διαπιστευτηρίων", 'connectionLoginCredentialsVerificationMessageText': "Εκτέλεση πιστοποίησης SRP ", 'connectionLoginDoneMessageTitle': "Γίνεται επαλήθευση διαπιστευτηρίων", 'connectionLoginDoneMessageText': "Συνδεδεμένος", diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_en-CA.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_en-CA.js index 6879c60..4ecd533 100644 --- a/frontend/beta/js/Clipperz/PM/Strings/Strings_en-CA.js +++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_en-CA.js @@ -1,40 +1,38 @@ /* -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/. */ //============================================================================= // // E N G L I S H C A N A D I A N ( en_CA ) // //============================================================================= Clipperz.PM.Strings.Languages['en-ca'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { // 'forumHeaderLinkLabel': "forum-CA", // 'recordMenuLabel': "cards-CA", //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" });
\ No newline at end of file diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_en-GB.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_en-GB.js index f734c8e..af7b6a2 100644 --- a/frontend/beta/js/Clipperz/PM/Strings/Strings_en-GB.js +++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_en-GB.js @@ -1,40 +1,38 @@ /* -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/. */ //============================================================================= // // E N G L I S H B R I T I S H ( en_GB ) // //============================================================================= Clipperz.PM.Strings.Languages['en-gb'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { // 'forumHeaderLinkLabel': "forum-GB", // 'recordMenuLabel': "cards-GB", //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" });
\ No newline at end of file diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_en-US.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_en-US.js index ab1bb0f..97543a4 100644 --- a/frontend/beta/js/Clipperz/PM/Strings/Strings_en-US.js +++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_en-US.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Strings) == 'undefined') { Clipperz.PM.Strings = {}; } if (typeof(Clipperz.PM.Strings.Languages) == 'undefined') { Clipperz.PM.Strings.Languages = {}; } //============================================================================= // // E N G L I S H A M E R I C A N ( en_US ) // //============================================================================= Clipperz.PM.Strings.Languages['en-us'] = { // Login page - description 'clipperzServiceDescription': "\ <!-- FIX CSS DONE --> \ <h2>Keep it to yourself!</h2>\ <ul>\ <li>\ <h3>Clipperz is:</h3>\ <ul>\ <li><p>a secure and simple password manager</p></li>\ <li><p>an effective single sign-on solution</p></li>\ <li><p>a digital vault for your personal data</p></li>\ </ul>\ </li>\ <li>\ <h3>With Clipperz you can:</h3>\ <ul>\ <li><p>store and manage your passwords and online credentials</p></li>\ <li><p>login to your web services without entering any username or password</p></li>\ <li><p>protect all your sensitive data: codes for burglar alarms, PINs, credit card numbers, …</p></li>\ <li><p>share secrets with family members and associates (coming soon)</p></li>\ </ul>\ </li>\ <li>\ <h3>Clipperz benefits:</h3>\ <ul>\ <li><p>free and completely anonymous</p></li>\ <li><p>access it any time from any computer</p></li>\ <li><p>no software to download and nothing to install</p></li>\ <li><p>avoid keeping secrets on your PC or on paper</p></li>\ </ul>\ </li>\ <li>\ <h3>Clipperz security:</h3>\ <ul>\ <li><p>your secrets are locally encrypted by your browser before being uploaded to Clipperz</p></li>\ <li><p>the encryption key is a passphrase known only to you</p></li>\ <li><p>Clipperz hosts your sensitive data in encrypted form and could never actually access the data in its plain form</p></li>\ <li><p>Clipperz is built upon standard encryption schemes, nothing fancies or homemade</p></li>\ <li><p>you can review the source code anytime you like, but you need to know nothing about cryptography to be an happy user!</p></li>\ </ul>\ </li>\ <li>\ <a href=\"http://www.clipperz.com\" target=\"_blank\">Learn more</a>\ </li>\ </ul>", 'loginFormTitle': "login with your Clipperz account", 'loginFormUsernameLabel': "username", 'loginFormPassphraseLabel': "passphrase", 'loginFormDontHaveAnAccountLabel': "don\'t have an account?", 'loginFormCreateOneLabel': "create one", 'loginFormForgotYourCredentialsLabel': "forgot your credentials?", 'loginFormAarghThatsBadLabel': "aargh! that\'s bad!", 'loginFormAfraidOfMaliciousScriptsLabel': "afraid of malicious scripts?", 'loginFormVerifyTheCodeLabel': "verify the code", 'loginFormButtonLabel': "Login", 'loginFormOneTimePasswordCheckboxLabel': "use a one-time passphrase", 'loginFormOneTimePasswordCheckboxDescription': "", // Login page - language selection 'loginPanelSwithLanguageDescription': "<h5>Switch to your preferred language</h5>", // Login page - browser compatibility 'browserCompatibilityDescription': "<p>Have a better and safer Clipperz experience with Firefox. However Clipperz works just fine also with Opera, Safari and MS Internet Explorer!</p>", // Login with OTP - message panel 'OTPloginMessagePanelInitialTitle': "Logging in using a one-time passphrase", 'OTPloginMessagePanelInitialText': "Sending OTP credentials …", 'OTPloginMessagePanelLoadingTitle': "Logging in using a one-time passphrase", 'OTPloginMessagePanelLoadingText': "Fetching encrypted authentication data from the server …", 'OTPloginMessagePanelProcessingTitle': "Logging in using a one-time passphrase", 'OTPloginMessagePanelProcessingText': "Local decryption of authentication data", // Regular login - message panel 'loginMessagePanelInitialTitle': "Logging in …", 'loginMessagePanelInitialText': "---", 'loginMessagePanelInitialButtonLabel': "Cancel", 'loginMessagePanelConnectedTitle': "Connected", 'loginMessagePanelConnectedText': "Done", diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_es-ES.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_es-ES.js index 57286fe..2090913 100644 --- a/frontend/beta/js/Clipperz/PM/Strings/Strings_es-ES.js +++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_es-ES.js @@ -1,118 +1,116 @@ /* -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.PM.Strings.Languages['es-ES'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 'clipperzServiceDescription': "<h2>Guárdelo usted mismo!</h2> <ul> <li> <h3>Clipperz es:</h3> <ul> <li> <p>un simple y seguro administrador de contraseñas</p> </li> <li> <p>una efectiva y simple solución de logueo</p> </li> <li> <p>un maletín digital para sus datos confidenciales</p> </li> </ul> </li> <li> <h3>Con Clipperz usted puede:</h3> <ul> <li> <p>administrar y almacenar en línea sus contraseñas y credenciales digitales</p> </li> <li> <p>ingresar en sus servicios web sin ningún nombre de usuario o contraseña</p> </li> <li> <p>protejer todos sus datos sensibles: códigos de alarmas, PINs y números de tarjetas de crédito, …</p> </li> <li> <p>compartir secretos con sus familiares y socios</p> </li> </ul> </li> <li> <h3>Beneficios de Clipperz:</h3> <ul> <li> <p>es gratis y completamente anónimo</p> </li> <li> <p>con acceso en cualquier momento y desde cualquier ordenador</p> </li> <li> <p>no necesita instalar o descargar ningún programa</p> </li> <li> <p>no necesita guardar secretos en papel o en el ordenador</p> </li> </ul> </li> <li> <h3>Seguridad de Clipperz:</h3> <ul> <li> <p>sus secretos son localmente encriptados por su navegador antes de ser almacenados en Clipperz</p> </li> <li> <p>la llave de encriptación es una frase clave conocida solo por usted</p> </li> <li> <p>Clipperz almacena sus datos de manera encriptada y nunca accede a ellos en forma de texto plano</p> </li> <li> <p>Clipperz esta basado en esquemas estándares de encriptación, no hemos inventado nada</p> </li> <li> <p>usted puede revisar el código todas las veces que lo desee, ¡ pero no necesita conocer algo de encriptación para ser un usuario feliz!</p> </li> </ul> </li> <li> <a href=\"http://www.clipperz.com\" target=\"_blank\">Aprender más</a> </li> </ul> ", 'loginFormTitle': "ingrese con su usuario Clipperz", 'loginFormUsernameLabel': "usuario", 'loginFormPassphraseLabel': "frase clave", 'loginFormDontHaveAnAccountLabel': "¿no tiene una cuenta?", 'loginFormCreateOneLabel': "crear una", 'loginFormForgotYourCredentialsLabel': "¿perdió sus credenciales?", 'loginFormAarghThatsBadLabel': "¡Ahhh! ¡eso es malo!", 'loginFormAfraidOfMaliciousScriptsLabel': "¿evitar scripts maliciosos?", 'loginFormVerifyTheCodeLabel': "verificar el código", 'loginFormButtonLabel': "Ingresar", 'loginFormOneTimePasswordCheckboxLabel': "usar una frase clave desechable", 'loginPanelSwithLanguageDescription': "<h5>Cambiar a su lenguaje preferido</h5> ", 'browserCompatibilityDescription': "<p>Obtenga una mejor y más segura experiencia con Firefox. De todas maneras Clipperz funciona también con Opera y MS Explorer!</p> ", 'OTPloginMessagePanelInitialTitle': "Ingresar usando una frase clave desechable", 'OTPloginMessagePanelInitialText': "Enviando credenciales OTP ...", 'OTPloginMessagePanelLoadingTitle': "Ingresar usando una frase clave desechable", 'OTPloginMessagePanelLoadingText': "Descargando datos de autenticación encriptados desde el servidor ...", 'OTPloginMessagePanelProcessingTitle': "Ingresar usando una frase clave desechable", 'OTPloginMessagePanelProcessingText': "Desencriptación local de datos de autenticación ...", 'loginMessagePanelInitialTitle': "Ingresando ...", 'loginMessagePanelInitialButtonLabel': "Cancelar", 'loginMessagePanelConnectedTitle': "Conectado", 'loginMessagePanelConnectedText': "Hecho", 'loginMessagePanelFailureTitle': "Error", 'loginMessagePanelFailureText': "Ingreso fallido", 'loginMessagePanelFailureButtonLabel': "Cerrar", 'connectionLoginSendingCredentialsMessageTitle': "Verificando credenciales", 'connectionLoginSendingCredentialsMessageText': "Enviando credenciales", 'connectionLoginCredentialsVerificationMessageTitle': "Verificando credenciales", 'connectionLoginCredentialsVerificationMessageText': "Realizando una autenticación SRP", 'connectionLoginDoneMessageTitle': "Verificando credenciales", 'connectionLoginDoneMessageText': "Conectado", 'userLoginPanelUpgradingUserCredentialsMessageTitle': "Verificando credenciales", 'userLoginPanelUpgradingUserCredentialsMessageText': "Actualizando sus credenciales al nuevo esquema de autenticación", 'userLoginPanelConnectedMessageTitle': "Usuario autenticado", 'userLoginPanelConnectedMessageText': "Exitosamente logueado", 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle': "Verifying credentials", 'userLoginPanelTryingAnOlderConnectionSchemaMessageText': "Probando un esquema de autenticación antiguo", 'userLoginPanelLoadingUserDataMessageTitle': "Usuario autenticado", 'userLoginPanelLoadingUserDataMessageText': "Descargando encabezamientos encriptados desde Clipperz", 'userLoginPanelDecryptingUserDataMessageTitle': "Usuario autenticado", 'userLoginPanelDecryptingUserDataMessageText': "Desencriptación local de datos", 'userLoginPanelDecryptingUserStatisticsMessageTitle': "Usuario autenticado", 'userLoginPanelDecryptingUserStatisticsMessageText': "Desencriptación local de estadísticas de uso", 'splashAlertTitle': "¡Bienvenido a Clipperz!", 'splashAlertText': "<p>Algunas advertencias sobre seguridad</p> <ul> <li> <p>Almacenar sus datos en Clipperz es tan seguro como la frase clave que usted elija para protegerlos. Nadie puede acceder a ellos a no ser que conozca la frase clave.</p> </li> <li> <p>Si usted va a usar Clipperz para guardar información sensible y crítica, esté seguro de elegir una frase clave fuerte. ¡Cuanto más larga mejor!</p> </li> <li> <p>Clipperz no le permitirá recuperar una frase clave perdida.</p> </li> </ul> <p>Si necesita más información, por favor visite el sitio de <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a>.</p> ", 'splashAlertCloseButtonLabel': "Aceptar", 'registrationFormTitle': "Abrir su cuenta", 'registrationFormUsernameLabel': "usuario", 'registrationFormPassphraseLabel': "frase clave", 'registrationFormRetypePassphraseLabel': "reingrese la frase clave", 'registrationFormSafetyCheckLabel': "Yo entiendo que Clipperz no me permite recuperar frases clave perdidas", 'registrationFormTermsOfServiceCheckLabel': "He leído y estoy de acuerdo con los <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Términos de Servicio</a>.", 'registrationFormDoYouAlreadyHaveAnAccountLabel': "¿usted ya tiene una cuenta?", 'registrationFormSimplyLoginLabel': "ingreso simple", 'registrationFormButtonLabel': "Registrarse", 'registrationFormWarningMessageNotMatchingPassphrases': "Su frase clave no coincide, por favor reescríbala.", 'registrationFormWarningMessageSafetyCheckNotSelected': "Por favor, lea y chequee todas las casillas debajo.", 'registrationFormWarningMessageTermsOfServiceCheckNotSelected': "Usted necesita estar de acuerdo con los Términos de Servicio.", 'registrationMessagePanelInitialTitle': "Creando cuenta ...", 'registrationMessagePanelInitialButtonLabel': "Cancelar", 'registrationMessagePanelRegistrationDoneTitle': "Registración", 'registrationMessagePanelRegistrationDoneText': "Hecho", 'registrationMessagePanelFailureTitle': "Registración fallada", 'registrationMessagePanelFailureButtonLabel': "Cerrar", 'connectionRegistrationSendingRequestMessageText': "Verificando credenciales", 'connectionRegistrationSendingCredentialsMessageText': "Enviando credenciales", 'registrationSplashPanelTitle': "Aviso de seguridad", 'registrationSplashPanelDescriptionConfig': "<p>Estas son sus credenciales de Clipperz, cuídelas. ¡Clipperz nunca más le mostrará su cuenta y frase clave por segunda vez!</p> ", 'registrationSplashPanelUsernameLabel': "usuario", 'registrationSplashPanelPassphraseLabel': "frase clave", 'registrationSplashPanelShowPassphraseButtonLabel': " mostrar frase clave", 'donateHeaderLinkLabel': "donaciones", 'creditsHeaderLinkLabel': "créditos", 'feedbackHeaderLinkLabel': "contacto", 'helpHeaderLinkLabel': "ayuda", 'forumHeaderLinkLabel': "foro", 'recordMenuLabel': "tarjetas", 'accountMenuLabel': "cuenta", 'dataMenuLabel': "datos", 'contactsMenuLabel': "contactos", 'toolsMenuLabel': "herramientas", 'logoutMenuLabel': "salir", 'lockMenuLabel': "bloquear", 'lockTitle': "La cuenta está bloqueada", 'lockDescriptionConfig': "<p>Para desbloquear su cuenta, por favor ingrese su frase clave</p> ", 'unlockButtonLabel': "desbloquear", 'changePasswordTabLabel': "Cambiar su frase clave", 'changePasswordTabTitle': "Cambiar su frase clave", 'changePasswordFormUsernameLabel': "usuario", 'changePasswordFormOldPassphraseLabel': "frase clave anterior", diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_fr-FR.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_fr-FR.js index 34467e9..08f0c21 100644 --- a/frontend/beta/js/Clipperz/PM/Strings/Strings_fr-FR.js +++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_fr-FR.js @@ -1,118 +1,116 @@ /* -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.PM.Strings.Languages['fr-FR'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 'clipperzServiceDescription': "<h2>Gardez le pour vous!</h2> <ul> <li> <h3>Clipperz est:</h3> <ul> <li> <p>un gestionnaire de mots de passe sécurisé</p> </li> <li> <p>une solution fiable d’authentification unique</p> </li> <li> <p>une chambre forte numérique pour vos données confidentielles</p> </li> </ul> </li> <li> <h3>Avec Clipperz vous pouvez:</h3> <ul> <li> <p>enregistrer et gérer vos mots de passe et autres informations d'identification en ligne</p> </li> <li> <p>vous identifier sur vos sites web sans avoir besoin de saisir votre nom d’utilisateur ou votre mot de passe</p> </li> <li> <p>protéger toutes vos données sensibles: codes d’alarmes, PINs (téléphone portable), carte de crédits, …</p> </li> <li> <p>partager certaines données confidentielles avec vos proches et vos associés (bientôt disponible!)</p> </li> </ul> </li> <li> <h3>Les avantages de Clipperz:</h3> <ul> <li> <p>c'est gratuit et totalement anonyme</p> </li> <li> <p>accéder à vos données depuis n’importe quel ordinateur</p> </li> <li> <p>vous n'avez besoin d'aucun logiciel et rien n'est à installer sur votre poste</p> </li> <li> <p>cela vous évite de garder des mots de passe sur votre PC ou sur des bouts de papier</p> </li> </ul> </li> <li> <h3>La sécurité de Clipperz:</h3> <ul> <li> <p>vos mots de passe sont localement chiffrés par votre navigateur avant d’être téléchargé à Clipperz</p> </li> <li> <p>la clé de cryptage est une phrase secrète détenue uniquement par vous même</p> </li> <li> <p>héberge vos données sensibles dans des formulaires cryptés et ne peuvent être consultées directement en clair</p> </li> <li> <p>est développé sur des standard de cryptage réputé sans aucune fantaisie ni de bricolage fait maison</p> </li> <li> <p>vous pouvez consulter le code source autant que vous le souhaitez</p> </li> </ul> </li> <li> <a href=\"http://www.clipperz.com\" target=\"_blank\">Plus d’informations</a> </li> </ul> ", 'loginFormTitle': "identifiez-vous avec votre compte Clipperz", 'loginFormUsernameLabel': "nom d’utilisateur", 'loginFormPassphraseLabel': "phrase secrète", 'loginFormDontHaveAnAccountLabel': "vous n’avez pas de compte?", 'loginFormCreateOneLabel': "créez votre compte", 'loginFormForgotYourCredentialsLabel': "vous avez oublié votre certificat?", 'loginFormAarghThatsBadLabel': "c’est fort dommage pour vous!", 'loginFormAfraidOfMaliciousScriptsLabel': "vous avez peur des script malicieux?", 'loginFormVerifyTheCodeLabel': "vérifiez le code", 'loginFormButtonLabel': "S’identifer", 'loginPanelSwithLanguageDescription': "<p>Sélectionnez votre langue préféré</p> ", 'browserCompatibilityDescription': "<p>Have a better and safer Clipperz experience with Firefox. However Clipperz works just fine also with Opera and MS Internet Explorer!</p> ", 'loginMessagePanelInitialTitle': "En cours d’identification ...", 'loginMessagePanelInitialButtonLabel': "Annuler", 'loginMessagePanelConnectedTitle': "Connecté", 'loginMessagePanelConnectedText': "Terminé", 'loginMessagePanelFailureTitle': "Erreur", 'loginMessagePanelFailureText': "Identification échoué", 'loginMessagePanelFailureButtonLabel': "Fermer", 'connectionLoginSendingCredentialsMessageTitle': "Vérification des identifiants", 'connectionLoginSendingCredentialsMessageText': "Envoi des identifiants", 'connectionLoginCredentialsVerificationMessageTitle': "Vérification des identifiants", 'connectionLoginCredentialsVerificationMessageText': "Authentification SRP en cours", 'connectionLoginDoneMessageTitle': "Vérification des identifiants", 'connectionLoginDoneMessageText': "Connecté", 'userLoginPanelUpgradingUserCredentialsMessageTitle': "Vérification des identifiants", 'userLoginPanelUpgradingUserCredentialsMessageText': "Mise à jour de vos identifiants à un nouveau schéma d’authentification", 'userLoginPanelConnectedMessageTitle': "Utilisateur identifié", 'userLoginPanelConnectedMessageText': "Vous vous êtes identifié avec succès", 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle': "Vérification des identifiants", 'userLoginPanelTryingAnOlderConnectionSchemaMessageText': "Nous essayons un ancien schéma d’authentification", 'userLoginPanelLoadingUserDataMessageTitle': "Utilisateur identifié", 'userLoginPanelLoadingUserDataMessageText': "Téléchargement des cartes d’en-têtes chiffrés depuis Clipperz", 'userLoginPanelDecryptingUserDataMessageTitle': "Utilisateur identifié", 'userLoginPanelDecryptingUserDataMessageText': "Décryptage local des en-têtes chiffrés", 'userLoginPanelDecryptingUserStatisticsMessageTitle': "Utilisateur identifié", 'userLoginPanelDecryptingUserStatisticsMessageText': "Décryptage local des statistiques", 'splashAlertTitle': "Bienvenue sur Clipperz!", 'splashAlertText': "<p>Conseils de sécurité</p> <ul> <li> <p>Le stockage de vos mots de passe sur Clipperz est aussi sécurisé que la phrase que vous avez sélectionnée pour les protéger. Personne ne peux y accéder tant que personne ne connait votre phrase secrète.</p> </li> <li> <p>Si vous allez utiliser Clipperz pour sauvegarder des informations sensibles et critiques assurez-vous d’utiliser une phrase secrète compliquée. Plus elle sera longue mieux ce sera!</p> </li> <li> <p>Clipperz ne sera pas capable de récupérer votre phrase secrète!</p> </li> </ul> <p>Pour toute autre information, veuillez vous référer au site <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a>.</p> ", 'splashAlertCloseButtonLabel': "Ok", 'registrationFormTitle': "créer votre compte", 'registrationFormUsernameLabel': "nom d’utilisateur", 'registrationFormPassphraseLabel': "phrase secrète", 'registrationFormRetypePassphraseLabel': "re-saisissez votre phrase secrète", 'registrationFormSafetyCheckLabel': "J’accepte que Clipperz ne pourra pas récupérer ma phrase secrète.", 'registrationFormTermsOfServiceCheckLabel': "J’ai lu et j’accepte les <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Conditions d’Utilisation du Service</a>.", 'registrationFormDoYouAlreadyHaveAnAccountLabel': "avez-vous déjà un compte?", 'registrationFormSimplyLoginLabel': "identifiez-vous", 'registrationFormButtonLabel': "S’inscrire", 'registrationFormWarningMessageNotMatchingPassphrases': "Vos phrases secrètes ne correspondent pas, veuillez les saisir à nouveau.", 'registrationFormWarningMessageSafetyCheckNotSelected': "Veuillez lire et cocher les cases-à-cocher ci-dessous.", 'registrationFormWarningMessageTermsOfServiceCheckNotSelected': "Vous devez accepter les “Conditions d’Utilisation du Service”.", 'registrationMessagePanelInitialTitle': "Création du compte en cours ...", 'registrationMessagePanelInitialButtonLabel': "Annuler", 'registrationMessagePanelRegistrationDoneTitle': "Enregistrement", 'registrationMessagePanelRegistrationDoneText': "Terminé", 'registrationMessagePanelFailureTitle': "Enregistrement échoué", 'registrationMessagePanelFailureButtonLabel': "Fermer", 'connectionRegistrationSendingRequestMessageText': "Vérification en cours des identifiants", 'connectionRegistrationSendingCredentialsMessageText': "Envoi des identifiants", 'registrationSplashPanelTitle': "Conseils de sécurité", 'registrationSplashPanelDescription': "<p>Ce sont vos identifiants Clipperz, gardez les biens. Clipperz ne va plus jamais vous montrer votre nom d’utilisateur et votre phrase secrète!</p> ", 'registrationSplashPanelUsernameLabel': "nom d’utilisateur", 'registrationSplashPanelPassphraseLabel': "phrase secrète", 'registrationSplashPanelShowPassphraseButtonLabel': "afficher la phrase secrète", 'donateHeaderLinkLabel': "faites un don", 'creditsHeaderLinkLabel': "crédits", 'feedbackHeaderLinkLabel': "votre avis", 'helpHeaderLinkLabel': "aide", 'forumHeaderLinkLabel': "forum", 'recordMenuLabel': "cartes", 'accountMenuLabel': "compte", 'dataMenuLabel': "données", 'contactsMenuLabel': "contacts", 'toolsMenuLabel': "outils", 'logoutMenuLabel': "déconnexion", 'lockMenuLabel': "verrouiller", 'lockTitle': "Le compte est verrouillé", 'lockDescription': "<p>Pour déverrouiller votre compte, veuillez saisir votre phrase secrète</p> ", 'unlockButtonLabel': "Déverrouiller", 'changePasswordTabLabel': "Changer votre phrase secrète", 'changePasswordTabTitle': "Changer votre phrase secrète", 'changePasswordFormUsernameLabel': "nom d’utilisateur", 'changePasswordFormOldPassphraseLabel': "ancienne phrase secrète", 'changePasswordFormNewPassphraseLabel': "nouvelle phrase secrète", 'changePasswordFormRetypePassphraseLabel': "re-saisissez phrase secrète", 'changePasswordFormSafetyCheckboxLabel': "Je sais que Clipperz ne pourra pas récupérer ma phrase secrète.", 'changePasswordFormSubmitLabel': "Changer ma phrase secrète", 'changePasswordFormWrongUsernameWarning': "Nom d’utilisateur incorrect", 'changePasswordFormWrongPassphraseWarning': "Phrase secrète incorrect", 'changePasswordFormWrongRetypePassphraseWarning': "Votre phrase secrète ne correspond pas, veuillez la saisir à nouveau", diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_he-IL.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_he-IL.js index 70a59c8..fa94311 100644 --- a/frontend/beta/js/Clipperz/PM/Strings/Strings_he-IL.js +++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_he-IL.js @@ -1,37 +1,35 @@ /* -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/. */ //============================================================================= // // H E B R E W (he_IL) // //============================================================================= Clipperz.PM.Strings.Languages['he-il'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_it-IT.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_it-IT.js index acf6acd..0499376 100644 --- a/frontend/beta/js/Clipperz/PM/Strings/Strings_it-IT.js +++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_it-IT.js @@ -1,118 +1,116 @@ /* -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.PM.Strings.Languages['it-IT'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 'clipperzServiceDescription': "<h2>Tienilo per te!</h2> <ul> <li> <h3>Clipperz è:</h3> <ul> <li> <p>un archivio semplice e sicuro per le tue password</p> </li> <li> <p>un canale di accesso unificato a tutti i tuoi servizi online</p> </li> <li> <p>una cassaforte digitale per tutti i tuoi dati riservati</p> </li> </ul> </li> <li> <h3>Con Clipperz puoi:</h3> <ul> <li> <p>memorizzare e gestire le password e le credenziali di accesso dei tuoi servizi online</p> </li> <li> <p>accedere ai tuoi servizi online con un solo click senza bisogno di inserire username o password</p> </li> <li> <p>proteggere tutte le tue informazioni confidenziali: codice dell'allarme di casa, dati delle carte di credito, …</p> </li> <li> <p>condividere dati riservati con i tuoi familiari o colleghi (disponibile a breve)</p> </li> </ul> </li> <li> <h3>I vantaggi di Clipperz:</h3> <ul> <li> <p>gratuito e completamente anonimo</p> </li> <li> <p>accessibile da qualsiasi computer</p> </li> <li> <p>nessun software da scaricare e niente da installare</p> </li> <li> <p>mai più informazioni riservate sul tuo PC o sulla carta!</p> </li> </ul> </li> <li> <h3>La sicurezza di Clipperz:</h3> <ul> <li> <p>i dati sono criptati dal tuo browser prima di essere inviati a Clipperz</p> </li> <li> <p>la chiave per decriptare i dati è conosciuta soltanto da te</p> </li> <li> <p>Clipperz riceve e memorizza solo i tuoi dati criptati e non ha nessuna possibilità di accedere alla versione in chiaro</p> </li> <li> <p>Clipperz utilizza solo sistemi crittografici standard, senza nessuna velleità di inventare e proporre nuovi algoritmi non validati dalla comunità scientifica</p> </li> <li> <p>tutto il codice di Clipperz è disponibile e può essere analizzato in qualsiasi momento, ma non serve essere un esperto di crittografia per apprezzare la sicurezza e la comodità di Clipperz!</p> </li> </ul> </li> <li><a href=\"http://www.clipperz.com\" target=\"_blank\">Maggiori informazioni su Clipperz (in inglese)</a> </li> </ul> ", 'loginFormTitle': "accedi a Clipperz", 'loginFormUsernameLabel': "Utente", 'loginFormPassphraseLabel': "frase segreta", 'loginFormDontHaveAnAccountLabel': "non ti sei ancora registrato?", 'loginFormCreateOneLabel': "registrati adesso", 'loginFormForgotYourCredentialsLabel': "hai perso i dati di accesso?", 'loginFormAarghThatsBadLabel': "aargh! questo non è bello!", 'loginFormAfraidOfMaliciousScriptsLabel': "non ti fidi?", 'loginFormVerifyTheCodeLabel': "controlla il codice", 'loginFormButtonLabel': "Accedi", 'loginFormOneTimePasswordCheckboxLabel': "usa un codice “usa e getta”", 'loginFormOneTimePasswordCheckboxDescription': "", 'loginPanelSwithLanguageDescription': "<h5>Seleziona la tua lingua preferita</h5> ", 'browserCompatibilityDescription': "<p>Clipperz consiglia Firefox per una maggiore sicurezza. Clipperz supporta anche Opera ed Internet Explorer.</p> ", 'OTPloginMessagePanelInitialTitle': "Accesso con codice “usa e getta”", 'OTPloginMessagePanelInitialText': "Invio delle credenziali OTP ...", 'OTPloginMessagePanelLoadingTitle': "Accesso con codice “usa e getta”", 'OTPloginMessagePanelLoadingText': "Caricamento dei dati di autenticazione criptati ...", 'OTPloginMessagePanelProcessingTitle': "Accesso con codice “usa e getta”", 'OTPloginMessagePanelProcessingText': "Decodifica locale dei dati di autenticazione ...", 'loginMessagePanelInitialTitle': "Connessione in corso ...", 'loginMessagePanelInitialText': "---", 'loginMessagePanelInitialButtonLabel': "Annulla", 'loginMessagePanelConnectedTitle': "Connesso", 'loginMessagePanelConnectedText': "Fatto", 'loginMessagePanelFailureTitle': "Errore", 'loginMessagePanelFailureText': "Connessione fallita", 'loginMessagePanelFailureButtonLabel': "Chiudi", 'connectionLoginSendingCredentialsMessageTitle': "Verifica delle credenziali", 'connectionLoginSendingCredentialsMessageText': "Invio delle credenziali", 'connectionLoginCredentialsVerificationMessageTitle': "Verifica delle credenziali", 'connectionLoginCredentialsVerificationMessageText': "Esecuzione dell'autenticazione SRP ...", 'connectionLoginDoneMessageTitle': "Verifica delle credenziali", 'connectionLoginDoneMessageText': "Connesso", 'userLoginPanelUpgradingUserCredentialsMessageTitle': "Verifica delle credenziali", 'userLoginPanelUpgradingUserCredentialsMessageText': "Aggiornamento delle credenziali ad un nuovo schema di autenticazione", 'userLoginPanelConnectedMessageTitle': "Utente autenticato", 'userLoginPanelConnectedMessageText': "Autenticazione eseguita con successo", 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle': "Verifica delle credenziali", 'userLoginPanelTryingAnOlderConnectionSchemaMessageText': "Tentativo con vecchio schema di autenticazione", 'userLoginPanelLoadingUserDataMessageTitle': "Utente autenticato", 'userLoginPanelLoadingUserDataMessageText': "Scarica le intestazioni criptate delle schede da Clipperz", 'userLoginPanelDecryptingUserDataMessageTitle': "Utente autenticato", 'userLoginPanelDecryptingUserDataMessageText': "Decodifica locale dell'intestazione delle schede", 'userLoginPanelDecryptingUserStatisticsMessageTitle': "Utente autenticato", 'userLoginPanelDecryptingUserStatisticsMessageText': "Decodifica locale delle statistiche d'uso", 'splashAlertTitle': "Benvenuto a Clipperz!", 'splashAlertText': "<p>Alcuni consigli per la sicurezza</p> <ul> <li> <p>La sicurezza dei tuoi dati dipende da quanto è sicura la frase segreta che usi per proteggerli. Nessuno può accedervi a meno che non conosca la frase segreta.</p> </li> <li> <p>Se hai intenzione di usare Clipperz per conservare informazioni sensibili e riservate, scegli attentamente una frase segreta complessa. Più è lunga, maggiore è la sicurezza!</p> </li> <li> <p>E non dimenticare che Clipperz non è in grado di recuperare la tua frase segreta in caso di smarrimento!</p> </li> </ul> <p>Per maggiori informazioni sulla sicurezza, consulta il sito <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a> (in lingua inglese).</p> ", 'splashAlertCloseButtonLabel': "Ok", 'registrationFormTitle': "crea il tuo utente", 'registrationFormUsernameLabel': "Utente", 'registrationFormPassphraseLabel': "frase segreta", 'registrationFormRetypePassphraseLabel': "ripeti frase segreta", 'registrationFormSafetyCheckLabel': "Sono consapevole che Clipperz non è in grado di recuperare una frase segreta dimenticata.", 'registrationFormTermsOfServiceCheckLabel': "Dichiaro di aver letto e di accettare i <a href=\"http://www.clipperz.com/terms_of_service\" target=\"_blank\">Termini del Servizio</a> .", 'registrationFormDoYouAlreadyHaveAnAccountLabel': "sei già un utente registrato?", 'registrationFormSimplyLoginLabel': "accedi subito", 'registrationFormButtonLabel': "Registrati", 'registrationFormWarningMessageNotMatchingPassphrases': "Le frasi segrete non corrispondono, ripeti l'inserimento.", 'registrationFormWarningMessageSafetyCheckNotSelected': "Leggi e spunta le condizioni sotto riportate.", 'registrationFormWarningMessageTermsOfServiceCheckNotSelected': "Per procedere devi accettare i Termini del Servizio.", 'registrationMessagePanelInitialTitle': "Registrazione in corso ...", 'registrationMessagePanelInitialText': "---", 'registrationMessagePanelInitialButtonLabel': "Annulla", 'registrationMessagePanelRegistrationDoneTitle': "Registrazione", 'registrationMessagePanelRegistrationDoneText': "Fatto", 'registrationMessagePanelFailureTitle': "Registrazione fallita", 'registrationMessagePanelFailureButtonLabel': "Chiudi", 'connectionRegistrationSendingRequestMessageText': "Verifica delle credenziali", 'connectionRegistrationSendingCredentialsMessageText': "Invio delle credenziali", 'registrationSplashPanelTitle': "Avviso di sicurezza", 'registrationSplashPanelDescription': "<p>Queste sono le tue credenziali di accesso a Clipperz, conservale con cura. Il tuo utente ed la tua frase segreta non ti verranno mostrati una seconda volta!</p> ", 'registrationSplashPanelUsernameLabel': "Utente", 'registrationSplashPanelPassphraseLabel': "frase segreta", 'registrationSplashPanelShowPassphraseButtonLabel': "mostra la frase segreta", 'donateHeaderLinkLabel': "donazioni", 'creditsHeaderLinkLabel': "credits", 'feedbackHeaderLinkLabel': "scrivici", 'helpHeaderLinkLabel': "aiuto", 'forumHeaderLinkLabel': "forum", 'recordMenuLabel': "Schede", 'accountMenuLabel': "profilo", 'dataMenuLabel': "dati", 'contactsMenuLabel': "Contatti", 'toolsMenuLabel': "strumenti", 'logoutMenuLabel': "esci", 'lockMenuLabel': "blocca", 'lockTitle': "Utente bloccato", 'lockDescription': "<p>Per sbloccare il tuo utente inserisci la frase segreta</p> ", 'unlockButtonLabel': "Sblocca", 'changePasswordTabLabel': "Cambia la tua frase segreta", diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_ja-JP.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_ja-JP.js index 42993b3..1401acc 100644 --- a/frontend/beta/js/Clipperz/PM/Strings/Strings_ja-JP.js +++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_ja-JP.js @@ -1,118 +1,116 @@ /* -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.PM.Strings.Languages['ja-JP'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 'clipperzServiceDescription': "<h2>自分で管理しよう!</h2> <ul> <li> <h3>Clipperz は</h3> <ul> <li> <p>安全でシンプルなパスワードマネージャです</p> </li> <li> <p>シングルサインオンを提供します</p> </li> <li> <p>機密情報のデジタル格納庫です</p> </li> </ul> </li> <li> <h3>Clipperz でできること</h3> <ul> <li> <p>パスワードを保管して管理できます</p> </li> <li> <p>ユーザー名やパスワードを入力せずに登録したウェブサービスにログインできます</p> </li> <li> <p>暗証番号やクレジットカード番号などあらゆる機密情報を守ります</p> </li> <li> <p>家族や信用できる相手と機密情報を共有できます(提供予定)</p> </li> </ul> </li> <li> <h3>Clipperz のよいところ</h3> <ul> <li> <p>無料で匿名利用できます</p> </li> <li> <p>いつでもどのコンピュータからでもアクセスできます</p> </li> <li> <p>ソフトウェアのダウンロードやインストールは不要です</p> </li> <li> <p>PC や紙に機密情報を残す必要がありません</p> </li> </ul> </li> <li> <h3>Clipperz のセキュリティ</h3> <ul> <li> <p>データはブラウザで暗号化されてから Clipprez に送信されます</p> </li> <li> <p>暗号化のキーはあなただけが知っているパスフレーズです</p> </li> <li> <p>保管したデータは暗号化されていて、保管中には決して中身を見ることができません</p> </li> <li> <p>標準が確立された暗号化手順を採用しています</p> </li> <li> <p>ソースコードはいつでも参照できますが、暗号化について何も知らなくても使えます</p> </li> </ul> </li> <li><a href=\"http://www.clipperz.com\" target=\"_blank\">もっと見る</a> </li> </ul> ", 'loginFormTitle': "Clipperz のアカウントでログイン", 'loginFormUsernameLabel': "ユーザー名", 'loginFormPassphraseLabel': "パスフレーズ", 'loginFormDontHaveAnAccountLabel': "アカウントを持っていない?", 'loginFormCreateOneLabel': "新規作成", 'loginFormForgotYourCredentialsLabel': "パスフレーズを忘れた?", 'loginFormAarghThatsBadLabel': "それは困った!", 'loginFormAfraidOfMaliciousScriptsLabel': "偽サイトかも?", 'loginFormVerifyTheCodeLabel': "確認する", 'loginFormButtonLabel': "ログイン", 'loginFormOneTimePasswordCheckboxLabel': "ワンタイムパスフレーズ使用", 'loginFormOneTimePasswordCheckboxDescription': "", 'loginPanelSwithLanguageDescription': "<h5>言語設定の変更</h5> ", 'browserCompatibilityDescription': "<p>Clipperz は Firefox に最適化されています。 しかし Clipperz は Opera や Safari そしてインターネットエクスプローラでも十分動作します。</p> ", 'OTPloginMessagePanelInitialTitle': "ワンタイムパスフレーズでログイン中", 'OTPloginMessagePanelInitialText': "OTP 情報送信中 ...", 'OTPloginMessagePanelLoadingTitle': "ワンタイムパスフレーズでログイン中", 'OTPloginMessagePanelLoadingText': "認証情報を取得中 ...", 'OTPloginMessagePanelProcessingTitle': "ワンタイムパスフレーズでログイン中", 'OTPloginMessagePanelProcessingText': "認証情報を復号中 ...", 'loginMessagePanelInitialTitle': "ログイン中 ...", 'loginMessagePanelInitialText': "---", 'loginMessagePanelInitialButtonLabel': "キャンセル", 'loginMessagePanelConnectedTitle': "接続完了", 'loginMessagePanelConnectedText': "完了", 'loginMessagePanelFailureTitle': "エラー", 'loginMessagePanelFailureText': "ログインに失敗しました", 'loginMessagePanelFailureButtonLabel': "閉じる", 'connectionLoginSendingCredentialsMessageTitle': "認証確認中", 'connectionLoginSendingCredentialsMessageText': "認証送信中", 'connectionLoginCredentialsVerificationMessageTitle': "認証確認中", 'connectionLoginCredentialsVerificationMessageText': "SRP 認証中", 'connectionLoginDoneMessageTitle': "認証確認中", 'connectionLoginDoneMessageText': "接続完了", 'userLoginPanelUpgradingUserCredentialsMessageTitle': "認証確認中", 'userLoginPanelUpgradingUserCredentialsMessageText': "認証更新中", 'userLoginPanelConnectedMessageTitle': "認証完了", 'userLoginPanelConnectedMessageText': "ログイン完了", 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle': "認証確認中", 'userLoginPanelTryingAnOlderConnectionSchemaMessageText': "認証復元中", 'userLoginPanelLoadingUserDataMessageTitle': "認証完了", 'userLoginPanelLoadingUserDataMessageText': "暗号化データを受信中", 'userLoginPanelDecryptingUserDataMessageTitle': "認証完了", 'userLoginPanelDecryptingUserDataMessageText': "復号中", 'userLoginPanelDecryptingUserStatisticsMessageTitle': "認証完了", 'userLoginPanelDecryptingUserStatisticsMessageText': "復号中", 'splashAlertTitle': "Clipperz へようこそ", 'splashAlertText': "<p>セキュリティアドバイス</p> <ul> <li> <p>Clipperz に保管したデータはパスフレーズによって保護されます。 パスフレーズを知らない人はデータにアクセスできません。</p> </li> <li> <p>Clipperz に重要なデータを保管するためにパスフレーズを類推されにくいものにしてください。 長いほど安全です。</p> </li> <li> <p>パスフレーズを忘れてしまったら Clipperz ではデータを復元できません。</p> </li> </ul> <p>さらに詳しくは Clipperz のサイトをごらんください。</p> ", 'splashAlertCloseButtonLabel': "OK", 'registrationFormTitle': "新規アカウント作成", 'registrationFormUsernameLabel': "ユーザー名", 'registrationFormPassphraseLabel': "パスフレーズ", 'registrationFormRetypePassphraseLabel': "パスフレーズをもう一度", 'registrationFormSafetyCheckLabel': "パスフレーズを忘れたら復活できないことを了承します。", 'registrationFormTermsOfServiceCheckLabel': "利用許諾に同意します 。", 'registrationFormDoYouAlreadyHaveAnAccountLabel': "アカウントを持っている?", 'registrationFormSimplyLoginLabel': "すぐにログイン", 'registrationFormButtonLabel': "登録", 'registrationFormWarningMessageNotMatchingPassphrases': "パスフレーズの入力に誤りがあります。 再入力してください。", 'registrationFormWarningMessageSafetyCheckNotSelected': "説明を読んで下のボックスを全てチェックしてください。", 'registrationFormWarningMessageTermsOfServiceCheckNotSelected': "利用許諾に同意してください。", 'registrationMessagePanelInitialTitle': "アカウント作成中 ...", 'registrationMessagePanelInitialText': "---", 'registrationMessagePanelInitialButtonLabel': "キャンセル", 'registrationMessagePanelRegistrationDoneTitle': "登録", 'registrationMessagePanelRegistrationDoneText': "完了", 'registrationMessagePanelFailureTitle': "登録失敗", 'registrationMessagePanelFailureButtonLabel': "閉じる", 'connectionRegistrationSendingRequestMessageText': "認証確認中", 'connectionRegistrationSendingCredentialsMessageText': "認証送信中", 'registrationSplashPanelTitle': "セキュリティアドバイス", 'registrationSplashPanelDescription': "<p>Clipperz の認証情報です。 大切に保管してください。 ユーザー名とパスフレーズは二度と表示されません。</p> ", 'registrationSplashPanelUsernameLabel': "ユーザー名", 'registrationSplashPanelPassphraseLabel': "パスフレーズ", 'registrationSplashPanelShowPassphraseButtonLabel': "パスフレーズを表示", 'donateHeaderLinkLabel': "寄付", 'creditsHeaderLinkLabel': "クレジット", 'feedbackHeaderLinkLabel': "フィードバック", 'helpHeaderLinkLabel': "ヘルプ", 'forumHeaderLinkLabel': "フォーラム", 'recordMenuLabel': "カード", 'accountMenuLabel': "アカウント", 'dataMenuLabel': "データ", 'contactsMenuLabel': "コンタクト", 'toolsMenuLabel': "ツール", 'logoutMenuLabel': "ログアウト", 'lockMenuLabel': "ロック", 'lockTitle': "アカウントはロックされました", 'lockDescription': "<p>ロックを解除するにはパスフレーズを入力してください。</p> ", 'unlockButtonLabel': "解除", 'changePasswordTabLabel': "パスフレーズの変更", diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_pt-BR.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_pt-BR.js index 8fde63f..8478c0d 100644 --- a/frontend/beta/js/Clipperz/PM/Strings/Strings_pt-BR.js +++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_pt-BR.js @@ -1,118 +1,116 @@ /* -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.PM.Strings.Languages['pt-BR'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 'clipperzServiceDescriptionConfig': "<h2>Guarde com você!</h2> <ul> <li> <h3>Clipperz é:</h3> <ul> <li> <p>um simples e seguro gerenciador de senhas</p> </li> <li> <p>uma efetiva solução com uma única assinatura</p> </li> <li> <p>um cofre digital para suas informações confidenciais</p> </li> </ul> </li> <li> <h3>Com Clipperz você pode:</h3> <ul> <li> <p>guardar e gerenciar suas senhas e credenciais online</p> </li> <li> <p>logar em seus serviços web sem precisar entrar com nenhum nome de usuário ou senha</p> </li> <li> <p>proteger todos os seus dados sensíveis: códigos de alarme, PINs, números de cartão de crédito, …</p> </li> <li> <p>compartilhar segredos com membros da família e associados (em breve)</p> </li> </ul> </li> <li> <h3>Clipperz proporciona:</h3> <ul> <li> <p>anonimato completo e gratuito</p> </li> <li> <p>acesso a qualquer hora em qualquer computador</p> </li> <li> <p>sem software ou download e nada que instalar</p> </li> <li> <p>evite guardar seus segredos em seu PC ou papel</p> </li> </ul> </li> <li> <h3>Segurança Clipperz:</h3> <ul> <li> <p>seus segredos são codificados localmente por seu navegador antes de ser enviado para Clipperz</p> </li> <li> <p>a chave de codificação é uma senha que só você conhece</p> </li> <li> <p>Clipperz armazena apenas seus dados confidenciais codificados, nunca acessando os dados originais</p> </li> <li> <p>Clipperz é construído a partir de esquemas de codificação padrão, ou seja, nada é exclusivo ou caseiro</p> </li> <li> <p>você pode revisar o código a qualquer momento, mas você não precisa conhecer nada sobre criptograia para ser um usuário feliz!</p> </li> </ul> </li> <li> <a href=\"http://www.clipperz.com\" target=\"_blank\">Saiba mais</a> </li> </ul> ", 'loginFormTitle': "entre sua conta Clipperz", 'loginFormUsernameLabel': "nome do usuário", 'loginFormPassphraseLabel': "frase chave", 'loginFormDontHaveAnAccountLabel': "não tem uma conta?", 'loginFormCreateOneLabel': "criar uma", 'loginFormForgotYourCredentialsLabel': "esqueceu suas credenciais?", 'loginFormAarghThatsBadLabel': "xiiiii! isso é não é bom!", 'loginFormAfraidOfMaliciousScriptsLabel': "medo de scripts maliciosos?", 'loginFormVerifyTheCodeLabel': "verifique o código", 'loginFormButtonLabel': "Entrar", 'loginFormOneTimePasswordCheckboxLabel': "use uma frase chave descartável", 'loginPanelSwithLanguageDescription': "<h5>Mudar para sua linguagem preferida</h5> ", 'browserCompatibilityDescription': "<p>Tenha uma experiência melhor e mais segura com Clipperz, utilizando o Firefox. No entanto, Clipperz funciona bem também em Opera e MS Internet Explorer!</p> ", 'OTPloginMessagePanelInitialTitle': "Acessando usando a frase chave descartável", 'OTPloginMessagePanelInitialText': "Enviando credenciais descartáveis ...", 'OTPloginMessagePanelLoadingTitle': "Acessando usando a frase chave descartável", 'OTPloginMessagePanelLoadingText': "Buscando informação de autenticação codificada no servidor ...", 'OTPloginMessagePanelProcessingTitle': "Acessando usando a frase chave descartável", 'OTPloginMessagePanelProcessingText': "Decodificação local da informação de autenticação ...", 'loginMessagePanelInitialTitle': "Entrando ...", 'loginMessagePanelInitialButtonLabel': "Cancelar", 'loginMessagePanelConnectedTitle': "Conectado", 'loginMessagePanelConnectedText': "Concluído", 'loginMessagePanelFailureTitle': "Erro", 'loginMessagePanelFailureText': "Ocorreu uma falha", 'loginMessagePanelFailureButtonLabel': "Fechar", 'connectionLoginSendingCredentialsMessageTitle': "Verificando credenciais", 'connectionLoginSendingCredentialsMessageText': "Enviando credenciais", 'connectionLoginCredentialsVerificationMessageTitle': "Verificando credenciais", 'connectionLoginCredentialsVerificationMessageText': "Realizando autenticação SRP", 'connectionLoginDoneMessageTitle': "Verificando credenciais", 'connectionLoginDoneMessageText': "Conectado", 'userLoginPanelUpgradingUserCredentialsMessageTitle': "Verificando credenciais", 'userLoginPanelUpgradingUserCredentialsMessageText': "Upgrade de suas credenciais para um novo esquema de autenticação", 'userLoginPanelConnectedMessageTitle': "Usuário autenticado", 'userLoginPanelConnectedMessageText': "Logado com sucesso em", 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle': "Verificando credenciais", 'userLoginPanelTryingAnOlderConnectionSchemaMessageText': "Tentando esquema antigo de autenticação", 'userLoginPanelLoadingUserDataMessageTitle': "Usuário autenticado", 'userLoginPanelLoadingUserDataMessageText': "Baixando cabeçalhos de cartão codificados de Clipperz", 'userLoginPanelDecryptingUserDataMessageTitle': "Usuário autenticado", 'userLoginPanelDecryptingUserDataMessageText': "Descrição local de cabeçalhos dos cartões", 'userLoginPanelDecryptingUserStatisticsMessageTitle': "Usuário autenticado", 'userLoginPanelDecryptingUserStatisticsMessageText': "Descrição local de estatísticas de uso", 'splashAlertTitle': "Bem-vindo ao Clipperz!", 'splashAlertText': "<p>Alguns avisos de segurança</p> <ul> <li> <p>Guardar suas informações no Clipperz é tão seguro quanto a frase chave que você escolher para protege-los. Ninguém pode acessá-los sem essa frase chave.</p> </li> <li> <p>Se você vai utlizar Clipperz para armazenar suas informações confidenciais e críticas, escolha uma frase chave difícil de ser descoberta. Quanto mais longa, melhor!</p> </li> <li> <p>Clipperz não será capaz de recuperar frase chave perdidas!</p> </li> </ul> <p>Para mais informações, por favor vá até <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a> website.</p> ", 'splashAlertCloseButtonLabel': "Ok", 'registrationFormTitle': "crie sua conta", 'registrationFormUsernameLabel': "nome do usuário", 'registrationFormPassphraseLabel': "frase chave", 'registrationFormRetypePassphraseLabel': "entre novamente sua frase chave", 'registrationFormSafetyCheckLabel': "Eu compreendo que Clipperz não será capaz de recuperar senhas perdidas.", 'registrationFormTermsOfServiceCheckLabel': "Eu li e concordo com os <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Termos do Serviço</a>.", 'registrationFormDoYouAlreadyHaveAnAccountLabel': "você já tem uma conta?", 'registrationFormSimplyLoginLabel': "login simples", 'registrationFormButtonLabel': "Registrar", 'registrationFormWarningMessageNotMatchingPassphrases': "Suas frases chaves não conferem, por favor tente novamente.", 'registrationFormWarningMessageSafetyCheckNotSelected': "Por favor leia e confira todos os campos abaixo.", 'registrationFormWarningMessageTermsOfServiceCheckNotSelected': "Você precisa concordar com os Termos do Serviço.", 'registrationMessagePanelInitialTitle': "Criando conta ...", 'registrationMessagePanelInitialText': "---", 'registrationMessagePanelInitialButtonLabel': "Cancelar", 'registrationMessagePanelRegistrationDoneTitle': "Registro", 'registrationMessagePanelRegistrationDoneText': "Concluído", 'registrationMessagePanelFailureTitle': "Registrou falhou", 'registrationMessagePanelFailureButtonLabel': "Fechar", 'connectionRegistrationSendingRequestMessageText': "Verificando credenciais", 'connectionRegistrationSendingCredentialsMessageText': "Enviando credenciais", 'registrationSplashPanelTitle': "Informe de segurança", 'registrationSplashPanelDescription': "<p>Essas são suas credenciais Clipperz, cuide delas com cuidado. Clipperz nunca vai mostrar seu nome de usuário e frase chave uma outra vez!</p> ", 'registrationSplashPanelUsernameLabel': "nome de usuário", 'registrationSplashPanelPassphraseLabel': "frase chave", 'registrationSplashPanelShowPassphraseButtonLabel': "mostrar frase chave", 'donateHeaderLinkLabel': "doar", 'creditsHeaderLinkLabel': "créditos", 'feedbackHeaderLinkLabel': "feedback", 'helpHeaderLinkLabel': "ajuda", 'forumHeaderLinkLabel': "fórum", 'recordMenuLabel': "cartões", 'accountMenuLabel': "conta", 'dataMenuLabel': "dados", 'contactsMenuLabel': "contatos", 'toolsMenuLabel': "ferramentas", 'logoutMenuLabel': "sair", 'lockMenuLabel': "bloquear", 'lockTitle': "A conta está bloqueada", 'lockDescription': "<p>Para desbloquear sua conta, por favor, entre com a frase chave</p> ", 'unlockButtonLabel': "desbloquear", 'changePasswordTabLabel': "Alterar sua frase chave", 'changePasswordTabTitle': "Alterar sua frase chave", 'changePasswordFormUsernameLabel': "nome de usuário", diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_pt-PT.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_pt-PT.js index 7930852..d27829d 100644 --- a/frontend/beta/js/Clipperz/PM/Strings/Strings_pt-PT.js +++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_pt-PT.js @@ -1,39 +1,37 @@ /* -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/. */ //============================================================================= // // P O R T U G U Ê S ( pt_PT ) // //============================================================================= Clipperz.PM.Strings.Languages['pt-pt'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['pt-br'], { //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_ru-RU.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_ru-RU.js index 547dcc8..612e745 100644 --- a/frontend/beta/js/Clipperz/PM/Strings/Strings_ru-RU.js +++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_ru-RU.js @@ -1,118 +1,116 @@ /* -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.PM.Strings.Languages['ru-RU'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 'clipperzServiceDescription': "<h2>Держи всегда при себе!</h2> <ul> <li> <h3>Clipperz - это:</h3> <ul> <li> <p>безопасный и простой менеджер паролей</p> </li> <li> <p>эффективное решение для единой регистрации</p> </li> <li> <p>цифровое хранилище ваших конфиденциальных данных</p> </li> </ul> </li> <li>\ <h3>C помощью Clipperz вы можете:</h3> <ul>\ <li> <p>хранить и управлять вашими паролями</p> </li> <li> <p>входить в любые веб-сервисы без ввода логина и пароля</p> </li> <li> <p>защитить все важные данные: коды охранной сигнализации, PINы, номера кредитных карт, и пр.</p> </li> <li> <p>открыть доступ к паролям вашим членам семьи, друзьям, коллегам</p> </li> </ul> </li> <li>\ <h3>Преимущества Clipperz:</h3> <ul>\ <li> <p>бесплатный и абсолютно анонимный</p> </li> <li> <p>доступен в любое время и с любого компьютера</p> </li> <li> <p>не нужно ничего устанавливать</p> </li> <li> <p>не надо хранить секреты на компьютере или бумаге</p> </li> </ul> </li> <li>\ <h3>Безопасность Clipperz:</h3> <ul>\ <li> <p>все данные перед отправкой в Clipperz шифруются в браузере</p> </li> <li> <p>пароль знаете только вы</p> </li> <li> <p>Clipperz управляет важными данными в зашифрованном виде и никогда не получит доступ к ним в открытом виде</p> </li> <li> <p>Clipperz основан на стандартных криптографических протоколах: без каких-либо самоделок</p> </li> <li> <p>вы можете просмотреть исходный код, но вам ничего не надо знать о криптографии, чтобы просто использовать его!</p> </li> </ul> </li> <li>\ <a href=\"http://www.clipperz.com\" target=\"_blank\">Подробнее</a> </li> </ul> ", 'loginFormTitle': "войти в аккаунт Clipperz", 'loginFormUsernameLabel': "логин", 'loginFormPassphraseLabel': "пароль", 'loginFormDontHaveAnAccountLabel': "у вас еще нет аккаунта?", 'loginFormCreateOneLabel': "создать сейчас", 'loginFormForgotYourCredentialsLabel': "забыли пароль?", 'loginFormAarghThatsBadLabel': "это плохо!", 'loginFormAfraidOfMaliciousScriptsLabel': "опасаетесь вредоносных скриптов?", 'loginFormVerifyTheCodeLabel': "проверить", 'loginFormButtonLabel': "Войти", 'loginFormOneTimePasswordCheckboxLabel': "использовать одноразовый пароль", 'loginPanelSwithLanguageDescription': "<h5>Переключить язык</h5> ", 'browserCompatibilityDescription': "<p>Clipperz адаптирован для Firefox. Но также совместим с Opera и MS Internet Explorer!</p> ", 'OTPloginMessagePanelInitialTitle': "Вход", 'OTPloginMessagePanelInitialText': "Передача данных учетной записи ...", 'OTPloginMessagePanelLoadingTitle': "Вход", 'OTPloginMessagePanelLoadingText': "Запрос аутентификационных данных с сервера ...", 'OTPloginMessagePanelProcessingTitle': "Вход", 'OTPloginMessagePanelProcessingText': "Расшифровка аутентификационных данных", 'loginMessagePanelInitialTitle': "Вход ...", 'loginMessagePanelInitialButtonLabel': "Отмена", 'loginMessagePanelConnectedTitle': "Соединен", 'loginMessagePanelConnectedText': "Выполнен", 'loginMessagePanelFailureTitle': "Ошибка", 'loginMessagePanelFailureText': "Ошибка при попытке входа", 'loginMessagePanelFailureButtonLabel': "Закрыть", 'connectionLoginSendingCredentialsMessageTitle': "Проверка учетной записи", 'connectionLoginSendingCredentialsMessageText': "Передача данных ...", 'connectionLoginCredentialsVerificationMessageTitle': "Проверка учетной записи", 'connectionLoginCredentialsVerificationMessageText': "Выполняем SRP-аутентификацию ...", 'connectionLoginDoneMessageTitle': "Проверка учетной записи", 'connectionLoginDoneMessageText': "Соединено", 'userLoginPanelUpgradingUserCredentialsMessageTitle': "Проверка учетной записи", 'userLoginPanelUpgradingUserCredentialsMessageText': "Обновляем полномочия к новой схеме аутентификации", 'userLoginPanelConnectedMessageTitle': "Пользователь аутентифицирован", 'userLoginPanelConnectedMessageText': "Успешный вход", 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle': "Проверка учетной записи", 'userLoginPanelTryingAnOlderConnectionSchemaMessageText': "Пробуем войти по старой схеме", 'userLoginPanelLoadingUserDataMessageTitle': "Пользователь аутентифицирован", 'userLoginPanelLoadingUserDataMessageText': "Загрузка зашифрованных заголовков карточек", 'userLoginPanelDecryptingUserDataMessageTitle': "Пользователь аутентифицирован", 'userLoginPanelDecryptingUserDataMessageText': "Расшифровка заголовков карточек", 'userLoginPanelDecryptingUserStatisticsMessageTitle': "Пользователь аутентифицирован", 'userLoginPanelDecryptingUserStatisticsMessageText': "Расшифровка статистики", 'splashAlertTitle': "Добро пожаловать в Clipperz!", 'splashAlertText': "<p>Несколько советов по безопасности:</p> <ul> <li> <p>Хранение данных в Clipperz зависит от того, насколько безопасен выбранный вами пароль</p> </li> <li> <p>Если собираетесь использовать Clipperz для защиты важных или критических данных, то убедитесь, что выбрали сложный пароль</p> </li> <li> <p>Clipperz не сможет восстановить забытый пароль</p> </li> </ul> <p>За дополнительной информацией обратитесь на <a href=\"http://www.clipperz.com\" target=\"_blank\">сайт</a> Clipperz.</p> ", 'splashAlertCloseButtonLabel': "OK", 'registrationFormTitle': "создать аккаунт", 'registrationFormUsernameLabel': "имя пользователя", 'registrationFormPassphraseLabel': "пароль", 'registrationFormRetypePassphraseLabel': "повторите пароль", 'registrationFormSafetyCheckLabel': "Я понимаю, что Clipperz не сможет восстановить забытый пароль", 'registrationFormTermsOfServiceCheckLabel': "Я прочитал и согласен с <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Условиями предоставления услуг</a>.", 'registrationFormDoYouAlreadyHaveAnAccountLabel': "у вас уже есть аккаунт?", 'registrationFormSimplyLoginLabel': "просто авторизируйтесь", 'registrationFormButtonLabel': "Зарегистрировать", 'registrationFormWarningMessageNotMatchingPassphrases': "Пароли не совпадают, пожайлуста, повторите ввод", 'registrationFormWarningMessageSafetyCheckNotSelected': "Прочитайте и проверьте все поля ниже", 'registrationFormWarningMessageTermsOfServiceCheckNotSelected': "Вы должны принять Условия предоставления услуг", 'registrationMessagePanelInitialTitle': "Создание аккаунта", 'registrationMessagePanelInitialButtonLabel': "Отмена", 'registrationMessagePanelRegistrationDoneTitle': "Регистрация", 'registrationMessagePanelRegistrationDoneText': "Выполнено", 'registrationMessagePanelFailureTitle': "Ошибка регистрации", 'registrationMessagePanelFailureButtonLabel': "Закрыть", 'connectionRegistrationSendingRequestMessageText': "Проверка учетной записи", 'connectionRegistrationSendingCredentialsMessageText': "Передача данных", 'registrationSplashPanelTitle': "Совет", 'registrationSplashPanelDescription': "<p>Это ваши данные учетной записи, позаботесь об их безопасности. Clipperz никогда больше не покажет ваш логин и пароль!</p> ", 'registrationSplashPanelUsernameLabel': "имя пользователя", 'registrationSplashPanelPassphraseLabel': "пароль", 'registrationSplashPanelShowPassphraseButtonLabel': "показать пароль", 'donateHeaderLinkLabel': "помочь проекту", 'creditsHeaderLinkLabel': "авторы", 'feedbackHeaderLinkLabel': "обратная связь", 'helpHeaderLinkLabel': "помощь", 'forumHeaderLinkLabel': "форум", 'recordMenuLabel': "карточки", 'accountMenuLabel': "аккаунт", 'dataMenuLabel': "данные", 'contactsMenuLabel': "контакты", 'toolsMenuLabel': "инструменты", 'logoutMenuLabel': "выход", 'lockMenuLabel': "заблокировать", diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_zh-CN.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_zh-CN.js index 1a9caed..e880954 100644 --- a/frontend/beta/js/Clipperz/PM/Strings/Strings_zh-CN.js +++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_zh-CN.js @@ -1,118 +1,116 @@ /* -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.PM.Strings.Languages['zh-CN'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 'clipperzServiceDescription': "<h2>只有你知道</h2> <ul> <li> <h3>Clipperz 是:</h3> <ul> <li> <p>一个简单而又安全的密码管理员</p> </li> <li> <p>一个有效的单一登录解决方案</p> </li> <li> <p>一个您保密的资料数据库</p> </li> </ul> </li> <li> <h3> 使用 Clipperz 你能:</h3> <ul> <li> <p>储存和管理你的密码和网上证书</p> </li> <li> <p>无需输入密码自动帮助你登录网站服务</p> </li> <li> <p>保护你的敏感数据:通讯录,口令,信用卡号码, ...</p> </li> <li> <p>与家人和伙伴分享秘密(将要上线)</p> </li> </ul> </li> <li> <h3>Clipperz 的特点:</h3> <ul> <li> <p>免费,彻底匿名</p> </li> <li> <p>在任何时间 任何电脑都可以轻松获取你的密码</p> </li> <li> <p>无需下载和安装任何软件</p> </li> <li> <p>再也无需在电脑或者纸上记录密码了</p> </li> </ul> </li> <li> <h3>Clipperz 的安全性:</h3> <ul> <li> <p>密码将在本地浏览器加密,然后上传至 Clipperz</p> </li> <li> <p>加密密钥是一个只有你知道的密码短语</p> </li> <li> <p>Clipperz 服务会加密你的敏感数据,并不会出现数据的原始形式</p> </li> <li> <p>Clipperz 基于加密标准,没有任何的花哨</p> </li> <li> <p>只要你愿意,你随时都可以查看源代码,但是做为一个使用者来说完全没有去必要去了解那些繁琐的加密原理</p> </li> </ul> </li> <li> <a href=\"http://www.clipperz.com\" target=\"_blank\">更多</a> </li> </ul> ", 'loginFormTitle': "用你的 Clipperz 帐户登录", 'loginFormUsernameLabel': "用户名", 'loginFormPassphraseLabel': "密码短语", 'loginFormDontHaveAnAccountLabel': "还未建立帐户?", 'loginFormCreateOneLabel': "创建一个新帐户", 'loginFormForgotYourCredentialsLabel': "忘记你的证书?", 'loginFormAarghThatsBadLabel': "呃?这下糟糕了", 'loginFormAfraidOfMaliciousScriptsLabel': "害怕有恶意脚本?", 'loginFormVerifyTheCodeLabel': "验证代码", 'loginFormButtonLabel': "登录", 'loginFormOneTimePasswordCheckboxLabel': "使用一次性密码短语", 'loginPanelSwithLanguageDescription': "<h5>选择你的第一语言</h5> ", 'browserCompatibilityDescription': "<p>使用 Firefox 将得到更快更安全的 Clipperz 服务。不过 Clipperz 同样可以很好的工作在 Opera 和 微软的 IE 中。</p> ", 'OTPloginMessagePanelInitialTitle': "用一次性密码短语登录", 'OTPloginMessagePanelInitialText': "发送 OTP 证书 ...", 'OTPloginMessagePanelLoadingTitle': "用一次性密码短语登录", 'OTPloginMessagePanelLoadingText': "从服务器读取加密认证数据 ...", 'OTPloginMessagePanelProcessingTitle': "用一次性密码短语登录", 'OTPloginMessagePanelProcessingText': "本地解密认证数据", 'loginMessagePanelInitialTitle': "登录中...", 'loginMessagePanelInitialButtonLabel': "取消", 'loginMessagePanelConnectedTitle': "连接成功", 'loginMessagePanelConnectedText': "完成", 'loginMessagePanelFailureTitle': "错误", 'loginMessagePanelFailureText': "登录失败", 'loginMessagePanelFailureButtonLabel': "取消", 'connectionLoginSendingCredentialsMessageTitle': "验证证书", 'connectionLoginSendingCredentialsMessageText': "传送证书", 'connectionLoginCredentialsVerificationMessageTitle': "验证证书", 'connectionLoginCredentialsVerificationMessageText': "进行 SRP 认证", 'connectionLoginDoneMessageTitle': "验证证书", 'connectionLoginDoneMessageText': "已连接", 'userLoginPanelUpgradingUserCredentialsMessageTitle': "验证证书", 'userLoginPanelUpgradingUserCredentialsMessageText': "升级证书到新的认证模式", 'userLoginPanelConnectedMessageTitle': "用户识别", 'userLoginPanelConnectedMessageText': "成功登录", 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle': "验证证书", 'userLoginPanelTryingAnOlderConnectionSchemaMessageText': "旧认证模式失效", 'userLoginPanelLoadingUserDataMessageTitle': "用户识别", 'userLoginPanelLoadingUserDataMessageText': "正在从 Clipperz 下载加密卡报头", 'userLoginPanelDecryptingUserDataMessageTitle': "用户识别", 'userLoginPanelDecryptingUserDataMessageText': "加密卡报头本地解密", 'userLoginPanelDecryptingUserStatisticsMessageTitle': "用户识别", 'userLoginPanelDecryptingUserStatisticsMessageText': "本地解密使用统计", 'splashAlertTitle': "Clipperz 欢迎您", 'splashAlertText': "<p>安全忠告</p> <ul> <li> <p>在 Clipperz ,用你选择的密码短语保存数据是安全的。没有人能够得到这些数据,除非他们有你的密码。</p> </li> <li> <p> 如果你决定使用 Clipperz 保护敏感数据和关键资料,请务必选用一个复杂的密码短语。越长越好</p> </li> <li> <p>注意:Clipperz将无法找回忘记的密码码短语!</p> </li> </ul> <p>获得更多的说明,请前往 <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a> 网站.</p> ", 'splashAlertCloseButtonLabel': "确定", 'registrationFormTitle': "创建你的帐户", 'registrationFormUsernameLabel': "用户名", 'registrationFormPassphraseLabel': "密码短语", 'registrationFormRetypePassphraseLabel': "确认密码短语", 'registrationFormSafetyCheckLabel': "我明白 Clipperz 无法找回忘记的密码短语.", 'registrationFormTermsOfServiceCheckLabel': "我同意接受 <a href='http://www.clipperz.com/terms_of_service' target='_blank'>服务条款</a> 款.", 'registrationFormDoYouAlreadyHaveAnAccountLabel': "如果已有一个 Clipperz 帐户", 'registrationFormSimplyLoginLabel': "在此登录", 'registrationFormButtonLabel': "注册", 'registrationFormWarningMessageNotMatchingPassphrases': "两次密码短语不同,请重新输入", 'registrationFormWarningMessageSafetyCheckNotSelected': "请阅读并检查下面的选项框", 'registrationFormWarningMessageTermsOfServiceCheckNotSelected': "您需要同意服务条款", 'registrationMessagePanelInitialTitle': "创建账户...", 'registrationMessagePanelInitialButtonLabel': "取消", 'registrationMessagePanelRegistrationDoneTitle': "注册", 'registrationMessagePanelRegistrationDoneText': "完成", 'registrationMessagePanelFailureTitle': "注册失败", 'registrationMessagePanelFailureButtonLabel': "关闭", 'connectionRegistrationSendingRequestMessageText': "验证证书", 'connectionRegistrationSendingCredentialsMessageText': "传送证书", 'registrationSplashPanelTitle': "安全忠告", 'registrationSplashPanelDescription': "<p>这是你的 Clipperz 证书,请保存好。Clipperz 永远不会第二次显示你的用户名和密码短语</p> ", 'registrationSplashPanelUsernameLabel': "用户名", 'registrationSplashPanelPassphraseLabel': "密码短语", 'registrationSplashPanelShowPassphraseButtonLabel': "显示密码短语", 'donateHeaderLinkLabel': "捐赠", 'creditsHeaderLinkLabel': "致谢", 'feedbackHeaderLinkLabel': "反馈", 'helpHeaderLinkLabel': "帮助", 'forumHeaderLinkLabel': "论坛", 'recordMenuLabel': "密码卡片", 'accountMenuLabel': "账户", 'dataMenuLabel': "资料", 'contactsMenuLabel': "联系", 'toolsMenuLabel': "工具", 'logoutMenuLabel': "暂时离开", 'lockMenuLabel': "安全锁", 'lockTitle': "账户被锁定", 'lockDescription': "<p>请输入你的密码短语解开账户</p> ", 'unlockButtonLabel': "解锁", 'changePasswordTabLabel': "修改密码短语", 'changePasswordTabTitle': "修改密码短语", 'changePasswordFormUsernameLabel': "用户名", 'changePasswordFormOldPassphraseLabel': "旧密码短语", diff --git a/frontend/beta/js/Clipperz/PM/Toll.js b/frontend/beta/js/Clipperz/PM/Toll.js index 3a9b48f..027d8a3 100644 --- a/frontend/beta/js/Clipperz/PM/Toll.js +++ b/frontend/beta/js/Clipperz/PM/Toll.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } //============================================================================= Clipperz.PM.Toll = function(args) { this._requestType = args.requestType; this._targetValue = args.targetValue; this._cost = args.cost; this._toll = null; return this; } Clipperz.PM.Toll.prototype = MochiKit.Base.update(null, { 'toString': function() { return "Clipperz.PM.Toll (" + this.requestType() + ": " + this.cost() + " - " + ((this.toll() == null)? 'UNPAID' : 'PAID') + ")"; }, //------------------------------------------------------------------------- 'requestType': function() { return this._requestType; }, //------------------------------------------------------------------------- 'targetValue': function() { return this._targetValue; }, //------------------------------------------------------------------------- 'cost': function() { return this._cost; }, //------------------------------------------------------------------------- 'toll': function() { return this._toll; }, //========================================================================= 'prefixMatchingBits': function(aValue1, aValue2) { var result; var i,c; result = 0; c = Math.min(aValue1.length(), aValue2.length()); i = 0; while (i<c && (aValue1.byteAtIndex(i) == aValue2.byteAtIndex(i))) { result += 8; i++; } if (i<c) { var xorValue; xorValue = (aValue1.byteAtIndex(i) ^ aValue2.byteAtIndex(i)); if (xorValue >= 128) { result += 0; } else if (xorValue >= 64) { result += 1; } else if (xorValue >= 32) { result += 2; } else if (xorValue >= 16) { result += 3; } else if (xorValue >= 8) { result += 4; } else if (xorValue >= 4) { result += 5; } else if (xorValue >= 2) { result += 6; } else if (xorValue >= 1) { result += 7; } } return result; }, //========================================================================= 'pay': function() { var result; var targetData; var targetMatchSize; var prefixMatchingBits; diff --git a/frontend/beta/js/Clipperz/Profile.js b/frontend/beta/js/Clipperz/Profile.js index fb12417..98c1e53 100644 --- a/frontend/beta/js/Clipperz/Profile.js +++ b/frontend/beta/js/Clipperz/Profile.js @@ -1,118 +1,116 @@ /* -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/. */ addEvent(window, "load", sortables_init); var SORT_COLUMN_INDEX; function sortables_init() { // Find all tables with class sortable and make them sortable if (!document.getElementsByTagName) return; tbls = document.getElementsByTagName("table"); for (ti=0;ti<tbls.length;ti++) { thisTbl = tbls[ti]; if (((' '+thisTbl.className+' ').indexOf("sortable") != -1) && (thisTbl.id)) { //initTable(thisTbl.id); ts_makeSortable(thisTbl); } } } function ts_makeSortable(table) { if (table.rows && table.rows.length > 0) { var firstRow = table.rows[0]; } if (!firstRow) return; // We have a first row: assume it's the header, and make its contents clickable links for (var i=0;i<firstRow.cells.length;i++) { var cell = firstRow.cells[i]; var txt = ts_getInnerText(cell); cell.innerHTML = '<a href="#" class="sortheader" '+ 'onclick="ts_resortTable(this, '+i+');return false;">' + txt+'<span class="sortarrow"> </span></a>'; } } function ts_getInnerText(el) { if (typeof el == "string") return el; if (typeof el == "undefined") { return el }; if (el.innerText) return el.innerText; //Not needed but it is faster var str = ""; var cs = el.childNodes; var l = cs.length; for (var i = 0; i < l; i++) { switch (cs[i].nodeType) { case 1: //ELEMENT_NODE str += ts_getInnerText(cs[i]); break; case 3: //TEXT_NODE str += cs[i].nodeValue; break; } } return str; } function ts_resortTable(lnk,clid) { // get the span var span; for (var ci=0;ci<lnk.childNodes.length;ci++) { if (lnk.childNodes[ci].tagName && lnk.childNodes[ci].tagName.toLowerCase() == 'span') span = lnk.childNodes[ci]; } var spantext = ts_getInnerText(span); var td = lnk.parentNode; var column = clid || td.cellIndex; var table = getParent(td,'TABLE'); // Work out a type for the column if (table.rows.length <= 1) return; var itm = ts_getInnerText(table.rows[1].cells[column]); sortfn = ts_sort_caseinsensitive; if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d\d\d$/)) { sortfn = ts_sort_date; } if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d$/)) { sortfn = ts_sort_date; } if (itm.match(/^[£$]/)) { sortfn = ts_sort_currency; } if (itm.match(/^[\d\.]+$/)) { sortfn = ts_sort_numeric; } SORT_COLUMN_INDEX = column; var firstRow = new Array(); var newRows = new Array(); for (i=0;i<table.rows[0].length;i++) { firstRow[i] = table.rows[0][i]; } for (j=1;j<table.rows.length;j++) { newRows[j-1] = table.rows[j]; } newRows.sort(sortfn); diff --git a/frontend/beta/js/Clipperz/Set.js b/frontend/beta/js/Clipperz/Set.js index 7023888..b3831a4 100644 --- a/frontend/beta/js/Clipperz/Set.js +++ b/frontend/beta/js/Clipperz/Set.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } //############################################################################# Clipperz.Set = function(args) { args = args || {}; // MochiKit.Base.bindMethods(this); if (args.items != null) { this._items = args.items.slice(); } else { this._items = []; } return this; } //============================================================================= Clipperz.Set.prototype = MochiKit.Base.update(null, { //------------------------------------------------------------------------- 'toString': function() { return "Clipperz.Set"; }, //------------------------------------------------------------------------- 'items': function() { return this._items; }, //------------------------------------------------------------------------- 'popAnItem': function() { var result; if (this.size() > 0) { result = this.items().pop(); } else { result = null; } return result; }, //------------------------------------------------------------------------- 'allItems': function() { return this.items(); }, //------------------------------------------------------------------------- 'contains': function(anItem) { return (this.indexOf(anItem) != -1); }, //------------------------------------------------------------------------- 'indexOf': function(anItem) { var result; var i, c; result = -1; c = this.items().length; for (i=0; (i<c) && (result == -1); i++) { if (this.items()[i] === anItem) { result = i; } } return result; }, //------------------------------------------------------------------------- 'add': function(anItem) { if (anItem.constructor == Array) { MochiKit.Base.map(MochiKit.Base.bind(this,add, this), anItem); } else { if (! this.contains(anItem)) { this.items().push(anItem); } } }, //------------------------------------------------------------------------- diff --git a/frontend/beta/js/Clipperz/Signal.js b/frontend/beta/js/Clipperz/Signal.js index 8ed37cc..996c398 100644 --- a/frontend/beta/js/Clipperz/Signal.js +++ b/frontend/beta/js/Clipperz/Signal.js @@ -1,68 +1,66 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.Signal) == 'undefined') { Clipperz.Signal = {}; } Clipperz.Signal.VERSION = "0.1"; Clipperz.Signal.NAME = "Clipperz.Signal"; MochiKit.Base.update(Clipperz.Signal, { //------------------------------------------------------------------------- '__repr__': function () { return "[" + this.NAME + " " + this.VERSION + "]"; }, //------------------------------------------------------------------------- 'toString': function () { return this.__repr__(); }, //------------------------------------------------------------------------- 'fireNativeEvent': function(element, eventName) { if (element.fireEvent) { // MSIE element.fireEvent(eventName); } else { // W3C var event; event = document.createEvent("HTMLEvents"); event.initEvent(eventName.replace(/^on/, ""), true, true); element.dispatchEvent(event); } }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/beta/js/Clipperz/Style.js b/frontend/beta/js/Clipperz/Style.js index 1eecdd1..02cf2f0 100644 --- a/frontend/beta/js/Clipperz/Style.js +++ b/frontend/beta/js/Clipperz/Style.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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.Style) == 'undefined') { Clipperz.Style = {}; } Clipperz.Style.VERSION = "0.1"; Clipperz.Style.NAME = "Clipperz.DOM"; MochiKit.Base.update(Clipperz.Style, { //------------------------------------------------------------------------- '__repr__': function () { return "[" + this.NAME + " " + this.VERSION + "]"; }, //------------------------------------------------------------------------- 'toString': function () { return this.__repr__(); }, //------------------------------------------------------------------------- 'applyZebraStylesToTable': function(aTable) { var tbody; var tbodyRows; var i,c; tbody = MochiKit.DOM.getFirstElementByTagAndClassName('tbody', null, aTable); tbodyRows = tbody.childNodes; // tbodyRows = MochiKit.DOM.getElementsByTagAndClassName('tr', null, tbody) c = tbodyRows.length; for (i=0; i<c; i++) { var element; element = YAHOO.ext.Element.get(tbodyRows[i]); element.addClass(((i%2 == 0) ? "zebra_odd": "zebra_even")); element.removeClass(((i%2 == 1) ? "zebra_odd": "zebra_even")); } }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/beta/js/Clipperz/YUI/Collapser.js b/frontend/beta/js/Clipperz/YUI/Collapser.js index b104877..849cbe9 100644 --- a/frontend/beta/js/Clipperz/YUI/Collapser.js +++ b/frontend/beta/js/Clipperz/YUI/Collapser.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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } // found on YUI-EXT forum (http://www.yui-ext.com/forum/viewtopic.php?t=683&highlight=accordion) Clipperz.YUI.Collapser = function(clickEl, collapseEl, initiallyCollapsed) { this.clickEl = getEl(clickEl); this.collapseEl = getEl(collapseEl); this.clickEl.addClass('collapser-expanded'); if (initiallyCollapsed == true) { this.afterCollapse(); } this.clickEl.mon('click', function(){ this.collapsed === true ? this.expand() : this.collapse(); }, this, true); }; Clipperz.YUI.Collapser.prototype = { 'collapse': function(){ this.collapseEl.clip(); this.collapseEl.setHeight(1, true, .35, this.afterCollapse.createDelegate(this), YAHOO.util.Easing.easeOut); this.clickEl.replaceClass('collapser-expanded','collapser-collapsed'); }, 'afterCollapse': function(){ this.collapsed = true; this.collapseEl.setDisplayed(false); this.clickEl.replaceClass('collapser-expanded','collapser-collapsed'); }, 'expand': function(){ this.collapseEl.setDisplayed(true); this.collapseEl.autoHeight(true, .35, this.afterExpand.createDelegate(this), YAHOO.util.Easing.easeOut); this.clickEl.replaceClass('collapser-collapsed','collapser-expanded'); }, 'afterExpand': function(){ this.collapsed = false; this.collapseEl.unclip(); this.collapseEl.setStyle('height', ''); this.clickEl.replaceClass('collapser-collapsed','collapser-expanded'); }, //----------------------------------------------------- __syntaxFix__: '__syntaxFix__' }; diff --git a/frontend/beta/js/Clipperz/YUI/DomHelper.js b/frontend/beta/js/Clipperz/YUI/DomHelper.js index 05edc49..2c0ba34 100644 --- a/frontend/beta/js/Clipperz/YUI/DomHelper.js +++ b/frontend/beta/js/Clipperz/YUI/DomHelper.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.ext) == 'undefined') { Clipperz.ext = {}; }
/**
* @class Clipperz.YUI.DomHelper
* Utility class for working with DOM and/or Templates. It transparently supports using HTML fragments or DOM.
* For more information see <a href="http://www.jackslocum.com/yui/2006/10/06/domhelper-create-elements-using-dom-html-fragments-or-templates/">this blog post with examples</a>.
* @singleton
*/
Clipperz.YUI.DomHelper = new function(){
/**@private*/
var d = document;
var tempTableEl = null;
/** True to force the use of DOM instead of html fragments @type Boolean */
this.useDom = false;
var emptyTags = /^(?:base|basefont|br|frame|hr|img|input|isindex|link|meta|nextid|range|spacer|wbr|audioscope|area|param|keygen|col|limittext|spot|tab|over|right|left|choose|atop|of)$/i;
/**
* Applies a style specification to an element
* @param {String/HTMLElement} el The element to apply styles to
* @param {String/Object/Function} styles A style specification string eg "width:100px", or object in the form {width:"100px"}, or
* a function which returns such a specification.
*/
this.applyStyles = function(el, styles){
if(styles){
var D = YAHOO.util.Dom;
if (typeof styles == "string"){
var re = /\s?([a-z\-]*)\:([^;]*);?/gi;
var matches;
while ((matches = re.exec(styles)) != null){
D.setStyle(el, matches[1], matches[2]);
}
}else if (typeof styles == "object"){
for (var style in styles){
D.setStyle(el, style, styles[style]);
}
}else if (typeof styles == "function"){
Clipperz.YUI.DomHelper.applyStyles(el, styles.call());
}
}
};
// build as innerHTML where available
/** @ignore */
var createHtml = function(o){
var b = '';
if(typeof(o['html']) != 'undefined') {
o['html'] = Clipperz.Base.sanitizeString(o['html']);
} else if (typeof(o['htmlString']) != 'undefined') {
o['html'] = o['htmlString'];
delete o.htmlString;
}
b += '<' + o.tag;
for(var attr in o){
if(attr == 'tag' || attr == 'children' || attr == 'html' || typeof o[attr] == 'function') continue;
if(attr == 'style'){
var s = o['style'];
if(typeof s == 'function'){
s = s.call();
}
if(typeof s == 'string'){
b += ' style="' + s + '"';
}else if(typeof s == 'object'){
b += ' style="';
for(var key in s){
if(typeof s[key] != 'function'){
b += key + ':' + s[key] + ';';
}
}
b += '"';
}
}else{
if(attr == 'cls'){
b += ' class="' + o['cls'] + '"';
}else if(attr == 'htmlFor'){
b += ' for="' + o['htmlFor'] + '"';
}else{
b += ' ' + attr + '="' + o[attr] + '"';
}
}
}
if(emptyTags.test(o.tag)){
b += ' />';
}else{
b += '>';
if(o.children){
for(var i = 0, len = o.children.length; i < len; i++) {
b += createHtml(o.children[i], b);
}
}
if(o.html){
b += o.html;
diff --git a/frontend/beta/js/Clipperz/YUI/DomQuery.js b/frontend/beta/js/Clipperz/YUI/DomQuery.js index 4ad4193..6e54b6c 100644 --- a/frontend/beta/js/Clipperz/YUI/DomQuery.js +++ b/frontend/beta/js/Clipperz/YUI/DomQuery.js @@ -1,118 +1,116 @@ /* -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/. */ /* * yui-ext 0.40 * Copyright(c) 2006, Jack Slocum. */ /** * @class Ext.DomQuery * Provides high performance selector/xpath processing by compiling queries into reusable functions. * New pseudo classes and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in). * @singleton */ Ext.DomQuery = function(){ var cache = {}, simpleCache = {}, valueCache = {}; var nonSpace = /\S/; var trimRe = /^\s*(.*?)\s*$/; var tplRe = /\{(\d+)\}/g; var modeRe = /^(\s?[\/>]\s?|\s|$)/; var clsRes = {}; function child(p, index){ var i = 0; var n = p.firstChild; while(n){ if(n.nodeType == 1){ i++; if(i == index){ return n; } } n = n.nextSibling; } return null; }; function next(d){ var n = d.nextSibling; while(n && n.nodeType != 1){ n = n.nextSibling; } return n; }; function prev(d){ var n = d.previousSibling; while(n && n.nodeType != 1){ n = n.previousSibling; } return n; }; function clean(d){ var n = d.firstChild, ni = -1; while(n){ var nx = n.nextSibling; if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){ d.removeChild(n); }else{ n.nodeIndex = ++ni; } n = nx; } return this; }; function byClassName(c, a, v){ if(!v){ return c; } var re = clsRes[v]; if(!re){ re = new RegExp('(?:^|\\s)(?:' + v + ')(?:\\s|$)'); clsRes[v] = re; } var r = []; for(var i = 0, ci; ci = c[i]; i++){ if(re.test(ci.className)){ r[r.length] = ci; } } return r; }; function convert(c){ if(c.slice){ return c; } var r = []; for(var i = 0, l = c.length; i < l; i++){ r[r.length] = c[i]; } return r; }; diff --git a/frontend/beta/js/Clipperz/YUI/Drawer.js b/frontend/beta/js/Clipperz/YUI/Drawer.js index 508bfe5..2105363 100644 --- a/frontend/beta/js/Clipperz/YUI/Drawer.js +++ b/frontend/beta/js/Clipperz/YUI/Drawer.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } Clipperz.YUI.Drawer = function(anElement, aRegion) { this._status = 'slideIn'; this._element = YAHOO.ext.Element.get(anElement); this._region = aRegion || null; this._collapsedElement = this.element().getChildrenByClassName("drawer-collapsed")[0]; this._contentElement = this.element().getChildrenByClassName("drawer-content")[0]; this._wholeCollapedElement = this.enhanceCollapsedElement(); this._wholeCollapedElement.setWidth(this.region().element().getWidth()); this._wholeCollapedElement.setHeight(this.region().element().getHeight()); this._contentWrapper = this.enhanceContentElement(); this._contentElementActor = new YAHOO.ext.Actor(this.contentWrapper().dom); this.contentElementActor().hide(); this._contentWidth = 200; }; YAHOO.extendX(Clipperz.YUI.Drawer, YAHOO.ext.util.Observable, { 'element': function() { return this._element; }, //----------------------------------------------------- 'status': function() { return this._status; }, 'setStatus': function(aValue) { this._status = aValue; }, //----------------------------------------------------- 'collapsedElement': function() { return this._collapsedElement; }, //----------------------------------------------------- 'contentElement': function() { return this._contentElement; }, //----------------------------------------------------- 'contentElementActor': function() { return this._contentElementActor; }, //----------------------------------------------------- 'contentWrapper': function() { return this._contentWrapper; }, //----------------------------------------------------- 'contentWidth': function() { return this._contentWidth; }, //----------------------------------------------------- 'region': function() { return this._region; }, //----------------------------------------------------- 'enhanceCollapsedElement': function() { var wrapper; var link; wrapper = this.collapsedElement().wrap({tag:'div', cls:'drawer-collapsedElement-wrapper', children:[ {tag:'div', cls:'drawer-pin-button', children:[ {tag:'a', cls:'drawer-pin-button', href:"#", children:[ {tag:'img', src:'./images/directLogins/drawer/mm-expand.gif'} ]} ]} ]}); link = wrapper.getChildrenByClassName('drawer-pin-button', 'a')[0]; MochiKit.Signal.connect(link.dom, 'onclick', this, 'pinDrawer'); diff --git a/frontend/beta/js/Clipperz/YUI/IBLayoutManager.js b/frontend/beta/js/Clipperz/YUI/IBLayoutManager.js index 6e2138e..d6b5782 100644 --- a/frontend/beta/js/Clipperz/YUI/IBLayoutManager.js +++ b/frontend/beta/js/Clipperz/YUI/IBLayoutManager.js @@ -1,111 +1,109 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } Clipperz.YUI.IBLayoutManager = function(container, config) { var regionName; var element; config = config || {}; Clipperz.YUI.IBLayoutManager.superclass.constructor.call(this, container); this.hideOnLayout = config.hideOnLayout || false; element = YAHOO.ext.Element.get(container); element.setStyle('position', 'absolute'); element.setStyle('overflow', 'hidden'); for (regionName in config.regions) { var newRegion; newRegion = new new Clipperz.YUI.IBLayoutRegion(this, regionName, config.regions[regionName]); this.addRegion(regionName, newRegion); } this.layout(); }; YAHOO.extendX(Clipperz.YUI.IBLayoutManager, YAHOO.ext.LayoutManager, { 'toString': function() { return "IBLayoutManager (" + this.el.id + ")"; }, //----------------------------------------------------- 'add': function(aName, aPanel) { var regionName; regionName = aName.toLowerCase(); return this.regions[regionName].add(aPanel); }, //----------------------------------------------------- 'addRegion': function(aRegion) { var regionName; regionName = aRegion.name().toLowerCase(); if (!this.regions[regionName]) { //MochiKit.Logging.logDebug("--- adding region with name: " + aRegion.name()); this.regions[regionName] = aRegion; } else { // ???? } return aRegion; }, //----------------------------------------------------- 'getRegion': function(target){ return this.regions[target.toLowerCase()]; }, //----------------------------------------------------- 'layout': function(){ var region; //MochiKit.Logging.logDebug(">>> IBLayoutManager.layout - regions: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(this.regions))); for (region in this.regions) { //MochiKit.Logging.logDebug("--- IBLayoutManager.layout - region: " + region); this.regions[region].layout(); } //MochiKit.Logging.logDebug("<<< IBLayoutManager.layout"); }, //----------------------------------------------------- 'getSize': function() { return this.el.getSize(); }, //----------------------------------------------------- __syntaxFix__: '__syntaxFix__' }); diff --git a/frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js b/frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js index f8e0cb1..11b7a6c 100644 --- a/frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js +++ b/frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } Clipperz.YUI.IBLayoutRegion = function(aManager, aName, aConfig) { this._configuration = aConfig; // Clipperz.YUI.IBLayoutRegion.superclass.constructor.call(); Clipperz.YUI.IBLayoutRegion.superclass.constructor.call(this, aManager, aConfig, aName); }; YAHOO.extendX(Clipperz.YUI.IBLayoutRegion, YAHOO.ext.LayoutRegion, { 'toString': function() { return "IBLayoutRegion (" + this.name() + ")"; }, //----------------------------------------------------- 'name': function() { return this.position; }, //----------------------------------------------------- 'manager': function() { return this.mgr; }, 'configuration': function() { return this._configuration; }, //----------------------------------------------------- 'getAttributeValue': function(anAttribute) { var result; switch(anAttribute) { case "top": result = this.element().getTop(); break; case "left": result = this.element().getLeft(); break; case "bottom": result = this.element().getBottom(); break; case "right": result = this.element().getRight(); break; case "height": result = this.element().getHeight(); break; case "width": result = this.element().getWidth(); break; } //MochiKit.Logging.logDebug("--- " + this.name() + " [" + anAttribute + "] = " + result); return result; }, //----------------------------------------------------- 'normalizeConfigureValue': function(aConfigurationValue) { var result; //MochiKit.Logging.logDebug("--- normalizeConfigureValue - " + aConfigurationValue); if (typeof(aConfigurationValue) == 'number') { result = aConfigurationValue; } else if (aConfigurationValue == 'auto') { result = aConfigurationValue; } else { var splitValues; var referenceValue; var deltaValue; var targetRegion; var targetAttribute; splitValues = aConfigurationValue.split('+'); referenceValue = Clipperz.Base.trim(splitValues[0]); deltaValue = Clipperz.Base.trim(splitValues[1] || ""); splitValues = referenceValue.split('.'); targetRegion = splitValues[0]; targetAttribute = splitValues[1]; //MochiKit.Logging.logDebug("> " + aConfigurationValue); //MochiKit.Logging.logDebug(">> manager: " + this.manager()); //MochiKit.Logging.logDebug(">> targetRegion: " + targetRegion); //MochiKit.Logging.logDebug(">>> " + this.manager().getRegion(targetRegion)); targetValue = this.manager().getRegion(targetRegion).getAttributeValue(targetAttribute); diff --git a/frontend/beta/js/Clipperz/YUI/MessageBox.js b/frontend/beta/js/Clipperz/YUI/MessageBox.js index c7b4702..8b8ca7f 100644 --- a/frontend/beta/js/Clipperz/YUI/MessageBox.js +++ b/frontend/beta/js/Clipperz/YUI/MessageBox.js @@ -1,118 +1,116 @@ /* -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.YUI.MessageBox = function(){ var dlg, opt, mask; var bodyEl, msgEl, textboxEl, textareaEl, progressEl, pp; var buttons, activeTextEl, bwidth; var handleButton = function(button){ if(typeof opt.fn == 'function'){ if(opt.fn.call(opt.scope||window, button, activeTextEl.dom.value) !== false){ dlg.hide(); } }else{ dlg.hide(); } }; return { updateButtons: function(b){ var width = 0; if(!b){ buttons['ok'].hide(); buttons['cancel'].hide(); buttons['yes'].hide(); buttons['no'].hide(); return width; } for(var k in buttons){ if(typeof buttons[k] != 'function'){ if(b[k]){ buttons[k].show(); buttons[k].setText(typeof b[k] == 'string' ? b[k] : YAHOO.ext.MessageBox.buttonText[k]); width += buttons[k].el.getWidth()+15; }else{ buttons[k].hide(); } } } return width; }, getDialog : function(){ if(!dlg){ dlg = new YAHOO.ext.BasicDialog('mb-dlg', { autoCreate:true, shadow:true, draggable:true, resizable:false, constraintoviewport:true, fixedcenter:true, shim:true, modal:true, width:400, height:100, buttonAlign:'center', closeClick : function(){ if(opt && opt.buttons && opt.buttons.no && !opt.buttons.cancel){ handleButton('no'); }else{ handleButton('cancel'); } } }); dlg.closeClick = function(){ alert('wtf'); }; mask = dlg.mask; dlg.addKeyListener(27, dlg.hide, dlg); buttons = {}; buttons['ok'] = dlg.addButton(this.buttonText['ok'], handleButton.createCallback('ok')); buttons['yes'] = dlg.addButton(this.buttonText['yes'], handleButton.createCallback('yes')); buttons['no'] = dlg.addButton(this.buttonText['no'], handleButton.createCallback('no')); buttons['cancel'] = dlg.addButton(this.buttonText['cancel'], handleButton.createCallback('cancel')); bodyEl = dlg.body.createChild({ tag:'div', html:'<span class="ext-mb-text"></span><br /><input type="text" class="ext-mb-input"><textarea class="ext-mb-textarea"></textarea><div class="ext-mb-progress-wrap"><div class="ext-mb-progress"><div class="ext-mb-progress-bar"> </div></div></div>' }); msgEl = bodyEl.dom.firstChild; textboxEl = getEl(bodyEl.dom.childNodes[2]); textboxEl.enableDisplayMode(); textboxEl.addKeyListener([10,13], function(){ if(dlg.isVisible() && opt && opt.buttons){ if(opt.buttons.ok){ handleButton('ok'); }else if(opt.buttons.yes){ handleButton('yes'); } } }); textareaEl = getEl(bodyEl.dom.childNodes[3]); textareaEl.enableDisplayMode(); progressEl = getEl(bodyEl.dom.childNodes[4]); progressEl.enableDisplayMode(); pp = getEl(progressEl.dom.firstChild.firstChild); } return dlg; diff --git a/frontend/beta/staticResources/accountDeleted.html b/frontend/beta/staticResources/accountDeleted.html index 683370a..3c5f3aa 100644 --- a/frontend/beta/staticResources/accountDeleted.html +++ b/frontend/beta/staticResources/accountDeleted.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <title>clipperz - account deleted</title> <link rel="stylesheet" type="text/css" href="./static.css" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> </head> <body> <!-- h1>clipper<span class="logo_z">z</span></h1 --> <div class="header"> <div id="logo"></div> <h5 class="clipperzPayoff">keep it to yourself!</h5> </div> <div class="block1"> <div class="languageBlock en-us"> <div class="flags"></div> <div class="content"> <h3>Your Clipperz account has been deleted!</h3> <p>You may visit the Clipperz website to sign up for a new account.</p> </div> </div> <div class="languageBlock zh-cn"> <div class="flags"></div> <div class="content"> <h3>您的 Clipperz 账户已经被删除!</h3> <p>您可以访问 Clipperz 网站重新注册一个新账户。</p> </div> </div> <!-- <div class="languageBlock fr-fr"> <div class="flags"></div> <div class="content"> <h3></h3> <p></p> </div> </div> --> <div class="languageBlock it-it"> <div class="flags"></div> <div class="content"> <h3>Il tuo account su Clipperz è stato cancellato!</h3> <p>Visita il sito di Clipperz per creartene uno nuovo.</p> </div> </div> <div class="languageBlock ja-jp"> <div class="flags"></div> <div class="content"> <h3>アカウントを削除しました。</h3> <p>Clipperz で新しいアカウントを登録することができます。</p> </div> </div> </div> <div class="block2"> <div class="languageBlock pt-br"> <div class="flags"></div> <div class="content"> <h3>Sua conta Clipperz foi apagada!</h3> <p>Você pode visitar o site Clipperz e criar uma nova conta.</p> </div> </div> <div class="languageBlock es-es"> <div class="flags"></div> <div class="content"> <h3>¡Su cuenta Clipperz ha sido borrada!</h3> <p>Usted puede visitar el sitio web de Clipperz para suscribir una nueva cuenta.</p> </div> </div> <div class="languageBlock ru-ru"> <div class="flags"></div> <div class="content"> <h3>Ваш аккаунт был удален!</h3> diff --git a/frontend/beta/staticResources/clipperz_directLogin.html b/frontend/beta/staticResources/clipperz_directLogin.html index fec12f2..939f8c3 100644 --- a/frontend/beta/staticResources/clipperz_directLogin.html +++ b/frontend/beta/staticResources/clipperz_directLogin.html @@ -1,37 +1,35 @@ <!-- -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/. --> <html> <head> <title>Clipperz DirectLogin</title> </head> <body> <form method="POST" action="./index_debug.html#formPost_secondtry"> <input type='text' name='username' value='joe' /> <input type='password' name='passphrase' value='clipperz' /> <input type='submit' name='login' value='login' /> </form> </body>
\ No newline at end of file diff --git a/frontend/beta/staticResources/error.html b/frontend/beta/staticResources/error.html index 07aa43d..392fa47 100644 --- a/frontend/beta/staticResources/error.html +++ b/frontend/beta/staticResources/error.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <title>clipperz - error</title> <link rel="stylesheet" type="text/css" href="./static.css" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> </head> <body> <!-- h1>clipper<span class="logo_z">z</span></h1 --> <div class="header"> <div id="logo"></div> <h5 class="clipperzPayoff">keep it to yourself!</h5> </div> <div class="block1"> <div class="languageBlock en-us"> <div class="flags"></div> <div class="content"> <h3>Sorry, you have been logged out!</h3> <p>Probably one or more cards have been modified by another session.</p> <p>This can happen if you access your Clipperz account from two different browser windows or from two different computers at the same time.</p> </div> </div> <div class="languageBlock zh-cn"> <div class="flags"></div> <div class="content"> <h3>对不起,您已经登出系统!</h3> <p>可能有一两张密码卡片被别的进程修改。</p> <p>这或许是你使用两个不同的窗口或者两台电脑登录 Clipperz 账户。</p> </div> </div> <!-- <div class="languageBlock fr-fr"> <div class="flags"></div> <div class="content"> <h3></h3> <p></p> </div> </div> --> <div class="languageBlock it-it"> <div class="flags"></div> <div class="content"> <h3>Attenzione, sei stato scollegato da Clipperz!</h3> <p>Probabilmente ona o più schede sono state modificate in un'altra sessione.</p> <p>Questo può accadere se accedi a Clipperz da più finestre del browser o da due computer diversi contemporaneamente.</p> </div> </div> <div class="languageBlock ja-jp"> <div class="flags"></div> <div class="content"> <h3>残念ながらログアウトしました。</h3> <p>別のセッションでカードが編集されました。</p> <p>複数のブラウザやコンピュータで同時に Clipperz にログインしている可能性があります。</p> </div> </div> </div> <div class="block2"> <div class="languageBlock pt-br"> <div class="flags"></div> <div class="content"> <h3>Desculpe, você foi desconectado!</h3> <p>Provavelmente um ou mais cards tenham sido modificados numa outra sessão.</p> <p>Isso pode acontecer quando você acessa Clipperz através de duas janelas de navegadores diferentes ou de dois computadores diferentes.</p> </div> </div> <div class="languageBlock es-es"> <div class="flags"></div> <div class="content"> <h3>¡Disculpe, acaba de cerrar su sesión!</h3> <p>Probablemente una o más tarjetas han sido modicifadas por otra sesión.</p> diff --git a/frontend/beta/staticResources/logout.html b/frontend/beta/staticResources/logout.html index 1f5cc7d..2b2bf63 100644 --- a/frontend/beta/staticResources/logout.html +++ b/frontend/beta/staticResources/logout.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <title>clipperz - logout</title> <link rel="stylesheet" type="text/css" href="./static.css" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> </head> <body> <div class="header"> <div id="logo"></div> <h5 class="clipperzPayoff">keep it to yourself!</h5> </div> <div class="contentWrapper"> <div class="block1"> <div class="languageBlock en-us"> <div class="flags"></div> <div class="content"> <h3>Goodbye! Thanks for using Clipperz.</h3> <p>You just logged out from your Clipperz account. We hope to see you again soon!</p> </div> </div> <div class="languageBlock zh-cn"> <div class="flags"></div> <div class="content"> <h3>下次再见!感谢您使用 Clipperz。</h3> <p>您仅仅是从您的 Clipperz 账户登出,我们希望很快再次见到您!</p> </div> </div> <!-- <div class="languageBlock fr-fr"> <div class="flags"></div> <div class="content"> <h3></h3> <p></p> </div> </div> --> <div class="languageBlock it-it"> <div class="flags"></div> <div class="content"> <h3>Arrivederci! Grazie per aver scelto Clipperz.</h3> <p>Sei uscito da Clipperz. Speriamo di rivederti presto.</p> </div> </div> <div class="languageBlock ja-jp"> <div class="flags"></div> <div class="content"> <h3>Clipperz をご利用いただきありがとうございました。</h3> <p>Clipperz から正常にログアウトしました。またのご利用をお待ちしています。</p> </div> </div> </div> <div class="block2"> <div class="languageBlock pt-br"> <div class="flags"></div> <div class="content"> <h3>Até logo! Obrigado por utilizar Clipperz.</h3> <p>Você acaba de sair de sua conta Clipperz. Esperamos ve-lo de volta em breve!</p> </div> </div> <div class="languageBlock es-es"> <div class="flags"></div> <div class="content"> <h3>¡Hasta luego! Gracias por usar Clipperz</h3> <p>Se acaba cerrar su sesión Clipperz. ¡Esperamos verlo nuevamente pronto!</p> </div> </div> <div class="languageBlock ru-ru"> <div class="flags"></div> <div class="content"> <h3>До свидания! Спасибо за использование Clipperz.</h3> diff --git a/frontend/beta/staticResources/static.css b/frontend/beta/staticResources/static.css index 5e94440..797613c 100644 --- a/frontend/beta/staticResources/static.css +++ b/frontend/beta/staticResources/static.css @@ -1,118 +1,116 @@ /* -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/. */ /* @override http://www.example.com/DEVELOPMENT/static.css http://www.clipperz.com/files/clipperz.com/appTips/static.css */ body { padding: 0px; margin: 0px; font-family: Helvetica, Arial, Geneva, sans-serif; color: #666666; } div.header { padding: 20px 25px; background-color: #1f2148; } div#logo { background: url(./images/logo.gif); background-repeat: no-repeat; width: 150px; height: 39px; display: block; } h5.clipperzPayoff { color: white; font-size: 13pt; font-weight: normal; padding-left: 20px; white-space: nowrap; margin: 0px; padding-left: 4px; } /* h1 { font-size: 40pt; color: #333366; } h1 span.logo_z { color: #ff9400; } */ div.contentWrapper { padding: 20px; } div.block1 { float: left; margin-right: 40px; } div.block2 { float: left; } div.languageBlock { clear: both; padding-top: 20px; } div.flags { float: left; } div.content { float: left; margin-left: 20px; width: 300px; } h3 { margin: 0px; padding-top: 10px; } p { font-size: 10pt; line-height: 20px; } /* @group RSS feed */ body.iFrame { margin: 0px; padding: 0px; border: 0px; font-family: Helvetica, Arial, Geneva, sans-serif; } div#feedContent ul { diff --git a/frontend/gamma/css/mobile.css b/frontend/gamma/css/mobile.css index 8c4c1bf..36b2b21 100644 --- a/frontend/gamma/css/mobile.css +++ b/frontend/gamma/css/mobile.css @@ -1,2571 +1,6191 @@ /* -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/. */ -/* - -Color list: -- login box: - light #ff9955 - dark #ff6622 -- login button: - regular #dd5500 - hover #773311 -- login translations: - box: #cc6622; - not-selected: - color: #ddaa99 - background: #994422 - selected: #772211; -*/ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section { + display: block; +} +audio, +canvas, +video { + display: inline-block; + *display: inline; + *zoom: 1; +} +audio:not([controls]) { + display: none; +} html { - height: 100%; - -webkit-text-size-adjust: none; - -ms-text-size-adjust: none; + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; } -body { - font-family: Helvetica-Neue, Helvetica, Arial, Geneva, sans-serif; - margin: 0px; +a:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; } -.ellipsis { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; +a:hover, +a:active { + outline: 0; } -/** - * Background noise recipe - * - * This recipe use a sass function to generate a .png file - * - * Inspired by a jQuery plugin "Noisy" by Daniel Rapp @DanielRapp - * @link https://github.com/DanielRapp/Noisy - * - * Converted using Sass by Aaron Russell @aaronrussell & Philipp Bosch @philippbosch - * @link https://gist.github.com/1021332 - * - * Ported to a sass gem by Antti Salonen @antsa - * @link https://github.com/antsa/sassy_noise - * - * Mixin: background-noise - * Function: background_noise - * - * @author Daniel Rapp @DanielRapp - * @author Aaron Russell @aaronrussell - * @author Philipp Bosch @philippbosch - * @author Antti Salonen @antsa - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * - * @class Gradients - * @author David Kaneda http://www.davidkaneda.com/ - * - */ -/** - * Adds a background gradient into a specified selector. - * - * @include background-gradient(#444, 'glossy'); - * - * You can also use color-stops if you want full control of the gradient: - * - * @include background-gradient(#444, color-stops(#333, #222, #111)); - * - * @param {color} $bg-color - * The base color of the gradient. - * - * @param {string/list} $type - * The style of the gradient, one of five pre-defined options: matte, bevel, glossy, recessed, or linear: - * - * @include background-gradient(red, 'glossy'); - * - * It can also accept a list of color-stop values:; - * - * @include background-gradient(black, color-stops(#333, #111, #000)); - * - * @param {string} $direction - * The direction of the gradient. - */ -/** - * Blueprint grid background pattern - * - * @link http://lea.verou.me/css3patterns/#blueprint-grid - * - * @author Lea Verou http://lea.verou.me/ for the original pattern - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx for the sass mixin - */ -/** - * Background overlay inspired by Google Chrome modal overlay - * - * @author Maxime Thirouin @MoOx maxime.thirouin@gmail.com - */ -/** - * Striped background pattern - * - * @link http://lea.verou.me/css3patterns/ - * - * @author Lea Verou http://lea.verou.me/ for the original pattern - * @author David Kaneda http://www.davidkaneda.com @davidkaneda for the sass mixin - */ -/** - * - * Before compass 0.11.5, you need to add - * Compass::BrowserSupport.add_support("repeating-linear-gradient", "webkit", "moz", "o", "ms") - * To your configuration (config.rb) - * @see https://github.com/chriseppstein/compass/issues/401 - * - * @link http://lea.verou.me/css3patterns/#tartan - * - * @author Marta Armada http://swwweet.com/ for the original pattern - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx for the sass mixin - */ -/** - * Carbon Fiber background pattern - * - * @author Lea Verou http://lea.verou.me/ for the original pattern - * @author David Kaneda http://www.davidkaneda.com/ for the Sass mixin - * - * @link http://lea.verou.me/css3patterns/ - * - */ -/** - * Normalize.css - * Opposite approche from CSS reset - * - * Based on normalize.css commit 9576d48fc234c5224b1fc4dccba2f5965243843d - * - * @link http://github.com/necolas/normalize.css - */ -/* normalize.css 2011-07-12T10:51 UTC · http://github.com/necolas/normalize.css */ -/* ============================================================================= - HTML5 element display - ========================================================================== */ -/* ============================================================================= - Base - ========================================================================== */ -/* ============================================================================= - Links - ========================================================================== */ -/* ============================================================================= - Typography - ========================================================================== */ -/* ============================================================================= - Lists - ========================================================================== */ -/* ============================================================================= - Embedded content - ========================================================================== */ -/* ============================================================================= - Figures - ========================================================================== */ -/* ============================================================================= - Forms - ========================================================================== */ -/* ============================================================================= - Tables - ========================================================================== */ -/** - * - * @author David Kaneda - http://www.davidkaneda.com - * - */ -/** - * @class Color - */ -/** - * Returns the brightness (out of 100) of a specified color. - * @todo explain why this is useful - * @param {color} $color The color you want the brightness value of - * @return {measurement} - */ -/** - * Returns the luminosity for a specified color - * @todo explain why this is useful - * @param {color} The color to check - * @return {measurement} - */ -/** - * Glass effect - * Use this on image for better effect render - * - * Inspired from Simurai's IMDB redisign - * - * @link http://lab.simurai.com/redesign/imdb - * @thanks Simurai @simurai - */ -/** - * Note IE7/6 doesn't understand pseudo element as ::before and ::after - * IE8 need to have :before and not ::before - * So use only : and not :: if you want to support IE8 - * IE9 Webkit Firefox Opera understand :: - */ -/** - * Scotch tape effect with pure CSS - * - * @thanks Nick La @nickla for original concept - * @link http://webdesignerwall.com/tutorials/css3-image-styles - * - * @author David Kaneda http://www.davidkaneda.com - * - */ -/** - * Note IE7/6 doesn't understand pseudo element as ::before and ::after - * IE8 need to have :before and not ::before - * So use only : and not :: if you want to support IE8 - * IE9 Webkit Firefox Opera understand :: - */ -/** - * Corner folded with pure CSS - * - * Known support: Firefox 3.5+, Chrome 4+, Safari 4+, Opera 10+, IE 9+. - * IE8 is not supported because it not render properly box-shadow and - * pseudo element should be selected with ::element and not :element - * - * @thanks Nicolas Gallagher @necolas - * @link http://nicolasgallagher.com/pure-css-folded-corner-effect/demo/ - * @todo Nix in .4 - */ -/** - * Note IE7/6 doesn't understand pseudo element as ::before and ::after - * IE8 need to have :before and not ::before - * So use only : and not :: if you want to support IE8 - * IE9 Webkit Firefox Opera understand :: - */ -/** - * Corner folded with pure CSS - * - * Known support: Firefox 3.5+, Chrome 4+, Safari 4+, Opera 10+, IE 9+. - * IE8 is not supported because it not render properly box-shadow and - * pseudo element should be selected with ::element and not :element - * - * @thanks Nicolas Gallagher @necolas - * @link http://nicolasgallagher.com/pure-css-folded-corner-effect/demo/ - */ -/** - * Note IE7/6 doesn't understand pseudo element as ::before and ::after - * IE8 need to have :before and not ::before - * So use only : and not :: if you want to support IE8 - * IE9 Webkit Firefox Opera understand :: - */ -/** - * Form element inline mixin - * This mixin allow you to have a label inline with your input - * It's simply based on inline-block behavior - * - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Vertical alignement for page - * Inspired by http://css-tricks.com/snippets/css/center-div-with-dynamic-height/ - * - * Usage: - * - * SCSS - * @include vertical-align-requirement; - * .v-align-container { @include vertical-align-container } - * .v-align-content-container { @include vertical-align-content-container } - * .v-align-content { @include vertical-align-content } - * - * HTML - * <body> - * <div class="v-align-container"> - * <div class="v-align-content-container"> - * <div class="v-align-content"> - * Your content ! - * </div> - * </div> - * </div> - * </body> - * - * @thanks Chris Coyier @chriscoyier - * @autor Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Media Queries Mixins - * - * @todo Do we have to take care of print ? - * - * @require sass-3.2 (you need eventually to do "sudo gem install sass --pre") - * @author Maxime Thirouin <maxime.thirouin@gmail.com> - */ -/* -$media-query-width-big: 1280px; -$media-query-width-medium: 960px; -$media-query-width-small: 480px; -*/ -/** - * Drop shadow mixins from Nicolas Gallagher demo - * - * @thanks Nicolas Gallagher @necolas, @simurai, @cameronmoll, @matthamm - * - * @link http://nicolasgallagher.com/css-drop-shadows-without-images/demo/ - */ -/** - * Drop shadow curled - * - * @thanks Nicolas Gallagher @necolas - * @link http://nicolasgallagher.com/css-drop-shadows-without-images/demo/ - */ -/** - * Drop shadow curved - * - * @thanks Nicolas Gallagher @necolas - * @link http://nicolasgallagher.com/css-drop-shadows-without-images/demo/ - */ -/** - * Drop shadow flying - * - * @thanks Geoffrey Crofte @geoffrey_crofte - * @link http://www.creativejuiz.fr/trytotry/css3-box-shadow-after-before/ - */ -/** - * Drop shadow w/ lifted corners - * - * @thanks Nicolas Gallagher @necolas - * @link http://nicolasgallagher.com/css-drop-shadows-without-images/demo/ - */ -/** - * Drop shadow w/ perspective - * - * @thanks Nicolas Gallagher @necolas - * @link http://nicolasgallagher.com/css-drop-shadows-without-images/demo/ - */ -/** - * Drop shadow raised - * - * @thanks Nicolas Gallagher @necolas - * @link http://nicolasgallagher.com/css-drop-shadows-without-images/demo/ - */ -/** - * Drop shadow rules required for transform on drop shadow - * - * /!\ This is required if you want to apply some transform on the element using drop shadow - * - * @thanks Nicolas Gallagher @necolas - * @link http://nicolasgallagher.com/css-drop-shadows-without-images/demo/ - */ -/** - * Shadow along the top edge of the browser viewport - * - * @link http://playground.genelocklin.com/depth/ - */ -/** -* Shapes ! -* Polygons, ellipses and symbols -* -* @thanks Chris Coyier @chriscoyier -* @link http://css-tricks.com/examples/ShapesOfCSS/ -* @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx -*/ -/** - * Shape/Ellipse - * - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Shape/Polygon - * - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Shape/Polygon/Hexagon - * - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Shape/Polygon/Octagon - * - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Shape/Polygon/Parallelogram - * - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Shape/Polygon/Pentagon - * - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Shape/Polygon/Rectangle - * - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Shape/Polygon/Rhombus - * - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Shape/Polygon/Square - * - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Shape/Polygon/Star - * - * @todo check if setting a z-index by default is a good thing - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Shape/Polygon/Trapezoid - * - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Shape/Polygon/Triangle - * - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Shape/Symbol - * - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Shape/Symbol/Diamond - * - * @todo add height support - * - * @author Alexander Futekov - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Shape/Symbol/Egg - * - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Shape/Symbol/Heart - * - * @author Nicolas Gallagher @necolas - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Shape/Symbol/Infinity - * - * @author Nicolas Gallagher @necolas - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Shape/Symbol/Pacman - * - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Shape/Symbol/Yin-yang - * - * @author Alexander Futekov - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Micro clearfix hack - * - * The clearfix hack is a popular way to clear floats without resorting to using presentational markup. This article presents an update to the clearfix method that further reduces the amount of CSS required. - * Known support: Firefox 2+, Safari 2+, Chrome, Opera 9.27+, IE 6+, IE Mac. - * - * @thanks Nicolas Gallagher @necolas - * @link http://nicolasgallagher.com/micro-clearfix-hack/ - */ -/** - * Note IE7/6 doesn't understand pseudo element as ::before and ::after - * IE8 need to have :before and not ::before - * So use only : and not :: if you want to support IE8 - * IE9 Webkit Firefox Opera understand :: - */ -/** - * UI convex effect from one color - * - * @todo merge with ui-button ? - * - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * UI Glossy helper - * - * @deprecated - * @todo Remove in 0.4 - * @see background/gradients - * - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * UI simple gradient from one color - * - * @todo merge with ui-button ? - * - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Shape/Polygon/Triangle - * - * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx - */ -/** - * Keyboard key touch - * A simple stylesheet for rendering beautiful keyboard-style elements. +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} +img { + /* Responsive images (ensure images don't scale beyond their parents) */ - * @author Michael Hüneburg http://michaelhue.com/keyscss - * @link https://github.com/michaelhue/keyscss (commit 76bb603e921d0145362e0f60eabb79d4f69cbda0) - * - * @author Maxime Thirouin @MoOx maxime.thirouin@gmail.com -*/ -/** - * Menu dropdown helper - * - * @author Maxime Thirouin @MoOx maxime.thirouin@gmail.com -*/ -/** - * Ui background overlay inspired by Google Chrome modal overlay - * - * @author Maxime Thirouin @MoOx maxime.thirouin@gmail.com - */ -/** - * Background overlay inspired by Google Chrome modal overlay - * - * @author Maxime Thirouin @MoOx maxime.thirouin@gmail.com - */ -/** - * <hr /> separator style - * - * @author Chris Coyier @chriscoyier - * @link http://jsfiddle.net/chriscoyier/GaEzp/35/ - * - * @author Maxime Thirouin @MoOx maxime.thirouin@gmail.com - */ -/** - * Micro clearfix hack - * - * The clearfix hack is a popular way to clear floats without resorting to using presentational markup. This article presents an update to the clearfix method that further reduces the amount of CSS required. - * Known support: Firefox 2+, Safari 2+, Chrome, Opera 9.27+, IE 6+, IE Mac. - * - * @thanks Nicolas Gallagher @necolas - * @link http://nicolasgallagher.com/micro-clearfix-hack/ - */ -/** - * Note IE7/6 doesn't understand pseudo element as ::before and ::after - * IE8 need to have :before and not ::before - * So use only : and not :: if you want to support IE8 - * IE9 Webkit Firefox Opera understand :: - */ -/** - * - * @class Gradients - * @author David Kaneda http://www.davidkaneda.com/ - * - */ -/** - * Adds a background gradient into a specified selector. - * - * @include background-gradient(#444, 'glossy'); - * - * You can also use color-stops if you want full control of the gradient: - * - * @include background-gradient(#444, color-stops(#333, #222, #111)); - * - * @param {color} $bg-color - * The base color of the gradient. - * - * @param {string/list} $type - * The style of the gradient, one of five pre-defined options: matte, bevel, glossy, recessed, or linear: - * - * @include background-gradient(red, 'glossy'); - * - * It can also accept a list of color-stop values:; - * - * @include background-gradient(black, color-stops(#333, #111, #000)); - * - * @param {string} $direction - * The direction of the gradient. - */ -/** - * @class Webfont Icon - * Great to use with the [Pictos font](http://pictos.drewwilson.com/) - * - */ -/** - * @cfg {color} $webfont-icon-base-color - * The default color of icons when using the {@link #webfont-icon} mixin. - * - * Defaults to `white`. - */ -/** - * @cfg {color} $webfont-icon-default-stroke - * The default color to use on the border of icons, when using the {@link #webfont-icon} mixin. - * - * Defaults to `null`. - */ -/** - * @cfg {string} $webfont-icon-default-gradient - * The default gradient to use when using the {@link #webfont-icon} mixin. - * - * Defaults to `matte`. - */ -/* line 41, ../compass-recipes/stylesheets/recipes/_webfont-icon.scss */ -.webfont-icon-base { - color: transparent; - -webkit-background-clip: text; - background-clip: text; - position: absolute; - top: 0; - left: 0; - text-indent: 0; - text-shadow: none; - -webkit-user-select: none; - user-select: none; -} -/** - * Includes a character into the specified selector, styled as an icon. - * - * @include webfont-icon('a'); - * - * @param {color} $color - * The color of the icon. Defaults to {@link #$webfont-icon-default-background $webfont-icon-default-background}. - * - * @param {measurement} $size - * The size of the icon - * - * @param {color} $stroke - * The color of the border. Defautls to {@link #$webfont-icon-default-border $webfont-icon-default-border}. - * - * @param {boolean} $include-staes - * True to include states for hover and active. Defaults to `true`. - */ -/* line 1, ../scss/include/_base.scss */ -* { + max-width: 100%; + /* Part 1: Set a maxium relative to the parent */ + + width: auto\9; + /* IE7-8 need help adjusting responsive images */ + + height: auto; + /* Part 2: Scale the height according to the width, otherwise you get stretching */ + + vertical-align: middle; + border: 0; + -ms-interpolation-mode: bicubic; +} +#map_canvas img, +.google-maps img { + max-width: none; +} +button, +input, +select, +textarea { margin: 0; + font-size: 100%; + vertical-align: middle; +} +button, +input { + *overflow: visible; + line-height: normal; +} +button::-moz-focus-inner, +input::-moz-focus-inner { padding: 0; + border: 0; } -/* line 6, ../scss/include/_base.scss */ -body { - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - -webkit-touch-callout: none; -} -/* line 11, ../scss/include/_base.scss */ -#jqt { - -webkit-text-size-adjust: none; - -webkit-user-select: none; - user-select: none; - font-family: "Helvetica Neue", Helvetica; - position: absolute; - right: 0; - top: 0; - left: 0; - bottom: 0; +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; +} +label, +select, +button, +input[type="button"], +input[type="reset"], +input[type="submit"], +input[type="radio"], +input[type="checkbox"] { + cursor: pointer; +} +input[type="search"] { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-appearance: textfield; +} +input[type="search"]::-webkit-search-decoration, +input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; +} +textarea { + overflow: auto; + vertical-align: top; +} +@media print { + * { + text-shadow: none !important; + color: #000 !important; + background: transparent !important; + box-shadow: none !important; + } + a, + a:visited { + text-decoration: underline; + } + a[href]:after { + content: " (" attr(href) ")"; + } + abbr[title]:after { + content: " (" attr(title) ")"; + } + .ir a:after, + a[href^="javascript:"]:after, + a[href^="#"]:after { + content: ""; + } + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; + } + thead { + display: table-header-group; + } + tr, + img { + page-break-inside: avoid; + } + img { + max-width: 100% !important; + } + @page { + margin: 0.5cm; + } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + h2, + h3 { + page-break-after: avoid; + } } -/* line 21, ../scss/include/_base.scss */ -#jqt a { - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - -webkit-user-drag: none; +.clearfix { + *zoom: 1; +} +.clearfix:before, +.clearfix:after { + display: table; + content: ""; + line-height: 0; } -/* line 26, ../scss/include/_base.scss */ -#jqt .selectable, -#jqt input, -#jqt textarea { - -webkit-user-select: auto; +.clearfix:after { + clear: both; } -/* line 30, ../scss/include/_base.scss */ -#jqt.notransform { - -webkit-transform: none !important; +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; } -/* line 35, ../scss/include/_base.scss */ -#jqt > * { +.input-block-level { display: block; - left: 0; - top: 0; - min-height: 100%; width: 100%; - overflow-x: hidden; - position: absolute; - z-index: 0; - display: -webkit-box; - display: box; - -webkit-box-orient: vertical; - box-orient: vertical; - -webkit-box-flex: 1; - box-flex: 1; -} -/* line 49, ../scss/include/_base.scss */ -#jqt > .current { - z-index: 10; -} -/* line 53, ../scss/include/_base.scss */ -#jqt > :not(.current) { - display: none; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } -/* line 57, ../scss/include/_base.scss */ -#jqt.touchscroll:not(.animating3d) { - overflow-y: auto; - -webkit-overflow-scrolling: touch; +body { + margin: 0; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 20px; + color: #333333; + background-color: #ffffff; } -/* line 61, ../scss/include/_base.scss */ -#jqt.touchscroll:not(.animating3d) > * { - height: 100%; +a { + color: #0088cc; + text-decoration: none; } -/* line 64, ../scss/include/_base.scss */ -#jqt.touchscroll:not(.animating3d) .scroll { - position: relative; - -webkit-box-flex: 1; - box-flex: 1; - overflow-y: auto; - -webkit-overflow-scrolling: touch; +a:hover { + color: #005580; + text-decoration: underline; +} +.img-rounded { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.img-polaroid { + padding: 4px; + background-color: #fff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); +} +.img-circle { + -webkit-border-radius: 500px; + -moz-border-radius: 500px; + border-radius: 500px; +} +.row { + margin-left: -20px; + *zoom: 1; +} +.row:before, +.row:after { + display: table; + content: ""; + line-height: 0; +} +.row:after { + clear: both; +} +[class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} +.container, +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 940px; +} +.span12 { + width: 940px; +} +.span11 { + width: 860px; +} +.span10 { + width: 780px; +} +.span9 { + width: 700px; +} +.span8 { + width: 620px; +} +.span7 { + width: 540px; +} +.span6 { + width: 460px; +} +.span5 { + width: 380px; +} +.span4 { + width: 300px; +} +.span3 { + width: 220px; +} +.span2 { + width: 140px; +} +.span1 { + width: 60px; +} +.offset12 { + margin-left: 980px; +} +.offset11 { + margin-left: 900px; +} +.offset10 { + margin-left: 820px; +} +.offset9 { + margin-left: 740px; +} +.offset8 { + margin-left: 660px; +} +.offset7 { + margin-left: 580px; +} +.offset6 { + margin-left: 500px; +} +.offset5 { + margin-left: 420px; +} +.offset4 { + margin-left: 340px; } -/* line 72, ../scss/include/_base.scss */ -#jqt .scroll { - -webkit-margin-collapse: separate; +.offset3 { + margin-left: 260px; } -/* line 76, ../scss/include/_base.scss */ -#jqt .in, -#jqt .out { - -webkit-animation-duration: 250ms; - -webkit-animation-fill-mode: both; - -webkit-animation-timing-function: ease-in-out; +.offset2 { + margin-left: 180px; } -/* line 82, ../scss/include/_base.scss */ -#jqt .in { - z-index: 10; +.offset1 { + margin-left: 100px; } -/* line 85, ../scss/include/_base.scss */ -#jqt .in:after { +.row-fluid { + width: 100%; + *zoom: 1; +} +.row-fluid:before, +.row-fluid:after { + display: table; content: ""; - position: absolute; + line-height: 0; +} +.row-fluid:after { + clear: both; +} +.row-fluid [class*="span"] { display: block; - top: 0; - left: 0; - bottom: 0; - right: 0; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + margin-left: 2.127659574468085%; + *margin-left: 2.074468085106383%; } -/* line 94, ../scss/include/_base.scss */ -#jqt .out { - z-index: 0 !important; +.row-fluid [class*="span"]:first-child { + margin-left: 0; } -/* line 98, ../scss/include/_base.scss */ -#jqt.supports3d { - -webkit-perspective: 1000; +.row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.127659574468085%; } -/* line 101, ../scss/include/_base.scss */ -#jqt.supports3d > * { - -webkit-transform: translate3d(0, 0, 0) rotate(0) scale(1); +.row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; } -/* Fade */ -/* line 3, ../scss/include/_animations.scss */ -#jqt .fade.in { - -webkit-animation-name: fadeIn; +.row-fluid .span11 { + width: 91.48936170212765%; + *width: 91.43617021276594%; } -/* line 7, ../scss/include/_animations.scss */ -#jqt .fade.out { - z-index: 10; - -webkit-animation-name: fadeOut; +.row-fluid .span10 { + width: 82.97872340425532%; + *width: 82.92553191489361%; } -@-webkit-keyframes fadeIn { - /* line 13, ../scss/include/_animations.scss */ - 0% { - opacity: 0; - } - /* line 16, ../scss/include/_animations.scss */ - 100% { - opacity: 1; - } +.row-fluid .span9 { + width: 74.46808510638297%; + *width: 74.41489361702126%; } -@-webkit-keyframes fadeOut { - /* line 22, ../scss/include/_animations.scss */ - 0% { - opacity: 1; - } - /* line 25, ../scss/include/_animations.scss */ - 100% { - opacity: 1; - } +.row-fluid .span8 { + width: 65.95744680851064%; + *width: 65.90425531914893%; } -/* Disolve */ -/* line 34, ../scss/include/_animations.scss */ -#jqt .dissolve.in { - -webkit-animation-name: dissolveIn; +.row-fluid .span7 { + width: 57.44680851063829%; + *width: 57.39361702127659%; } -/* line 38, ../scss/include/_animations.scss */ -#jqt .dissolve.out { - -webkit-animation-name: dissolveOut; +.row-fluid .span6 { + width: 48.93617021276595%; + *width: 48.88297872340425%; } -@-webkit-keyframes dissolveIn { - /* line 43, ../scss/include/_animations.scss */ - 0% { - opacity: 0; - } - /* line 46, ../scss/include/_animations.scss */ - 100% { - opacity: 1; - } +.row-fluid .span5 { + width: 40.42553191489362%; + *width: 40.37234042553192%; } -@-webkit-keyframes dissolveOut { - /* line 52, ../scss/include/_animations.scss */ - 0% { - opacity: 1; - } - /* line 55, ../scss/include/_animations.scss */ - 100% { - opacity: 0; - } +.row-fluid .span4 { + width: 31.914893617021278%; + *width: 31.861702127659576%; } -/* #Popin' */ -/* line 64, ../scss/include/_animations.scss */ -#jqt .pop.in { - -webkit-animation-name: popIn; +.row-fluid .span3 { + width: 23.404255319148934%; + *width: 23.351063829787233%; } -/* line 68, ../scss/include/_animations.scss */ -#jqt .pop.out { - -webkit-animation-name: popOut; +.row-fluid .span2 { + width: 14.893617021276595%; + *width: 14.840425531914894%; } -@-webkit-keyframes popIn { - /* line 73, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: scale(0.2); - opacity: 0; - } - /* line 77, ../scss/include/_animations.scss */ - 100% { - -webkit-transform: scale(1); - opacity: 1; - } +.row-fluid .span1 { + width: 6.382978723404255%; + *width: 6.329787234042553%; } -@-webkit-keyframes popOut { - /* line 84, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: scale(1); - opacity: 1; - } - /* line 88, ../scss/include/_animations.scss */ - 100% { - -webkit-transform: scale(0.2); - opacity: 0; - } +.row-fluid .offset12 { + margin-left: 104.25531914893617%; + *margin-left: 104.14893617021275%; } -/* Slide Left */ -/* line 98, ../scss/include/_animations.scss */ -#jqt .slideleft.in { - -webkit-animation-name: slideLeftIn; +.row-fluid .offset12:first-child { + margin-left: 102.12765957446808%; + *margin-left: 102.02127659574467%; } -/* line 102, ../scss/include/_animations.scss */ -#jqt .slideleft.out { - -webkit-animation-name: slideLeftOut; +.row-fluid .offset11 { + margin-left: 95.74468085106382%; + *margin-left: 95.6382978723404%; } -@-webkit-keyframes slideLeftIn { - /* line 107, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: translateX(100%); - } - /* line 110, ../scss/include/_animations.scss */ - 100% { - -webkit-transform: translateX(0); - } +.row-fluid .offset11:first-child { + margin-left: 93.61702127659574%; + *margin-left: 93.51063829787232%; } -@-webkit-keyframes slideLeftOut { - /* line 116, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: translateX(0px); - } - /* line 119, ../scss/include/_animations.scss */ - 100% { - -webkit-transform: translateX(-100%); - } +.row-fluid .offset10 { + margin-left: 87.23404255319149%; + *margin-left: 87.12765957446807%; } -/* Slide Right */ -/* line 128, ../scss/include/_animations.scss */ -#jqt .slideright.in { - -webkit-animation-name: slideRightIn; +.row-fluid .offset10:first-child { + margin-left: 85.1063829787234%; + *margin-left: 84.99999999999999%; } -/* line 132, ../scss/include/_animations.scss */ -#jqt .slideright.out { - -webkit-animation-name: slideRightOut; +.row-fluid .offset9 { + margin-left: 78.72340425531914%; + *margin-left: 78.61702127659572%; } -@-webkit-keyframes slideRightIn { - /* line 137, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: translateX(-100%); - } - /* line 140, ../scss/include/_animations.scss */ - 100% { - -webkit-transform: translateX(0); - } +.row-fluid .offset9:first-child { + margin-left: 76.59574468085106%; + *margin-left: 76.48936170212764%; } -@-webkit-keyframes slideRightOut { - /* line 146, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: translateX(0); - } - /* line 149, ../scss/include/_animations.scss */ - 100% { - -webkit-transform: translateX(100%); - } +.row-fluid .offset8 { + margin-left: 70.2127659574468%; + *margin-left: 70.10638297872339%; } -/* Slide Up */ -/* line 158, ../scss/include/_animations.scss */ -#jqt .slideup.in { - z-index: 10; - -webkit-animation-name: slideUpIn; +.row-fluid .offset8:first-child { + margin-left: 68.08510638297872%; + *margin-left: 67.9787234042553%; } -/* line 162, ../scss/include/_animations.scss */ -#jqt .slideup.out { - z-index: 0; - -webkit-animation-name: slideUpOut; +.row-fluid .offset7 { + margin-left: 61.70212765957446%; + *margin-left: 61.59574468085106%; } -@-webkit-keyframes slideUpIn { - /* line 168, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: translateY(100%); - } - /* line 171, ../scss/include/_animations.scss */ - 100% { - -webkit-transform: translateY(0); - } +.row-fluid .offset7:first-child { + margin-left: 59.574468085106375%; + *margin-left: 59.46808510638297%; } -@-webkit-keyframes slideUpOut { - /* line 177, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: translateY(0); - } - /* line 180, ../scss/include/_animations.scss */ - 100% { - -webkit-transform: translateY(0); - } +.row-fluid .offset6 { + margin-left: 53.191489361702125%; + *margin-left: 53.085106382978715%; } -/* Slide Down */ -/* line 189, ../scss/include/_animations.scss */ -#jqt .slidedown.in { - z-index: 0; - -webkit-animation-name: slideDownIn; +.row-fluid .offset6:first-child { + margin-left: 51.063829787234035%; + *margin-left: 50.95744680851063%; } -/* line 193, ../scss/include/_animations.scss */ -#jqt .slidedown.out { - z-index: 10; - -webkit-animation-name: slideDownOut; +.row-fluid .offset5 { + margin-left: 44.68085106382979%; + *margin-left: 44.57446808510638%; } -@-webkit-keyframes slideDownIn { - /* line 199, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: translateY(0); - } - /* line 202, ../scss/include/_animations.scss */ - 100% { - -webkit-transform: translateY(0); - } +.row-fluid .offset5:first-child { + margin-left: 42.5531914893617%; + *margin-left: 42.4468085106383%; } -@-webkit-keyframes slideDownOut { - /* line 208, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: translateY(0); - } - /* line 211, ../scss/include/_animations.scss */ - 100% { - -webkit-transform: translateY(100%); - } +.row-fluid .offset4 { + margin-left: 36.170212765957444%; + *margin-left: 36.06382978723405%; } -/* Flip Left */ -/* line 220, ../scss/include/_animations.scss */ -#jqt .flipleft { - -webkit-backface-visibility: hidden; +.row-fluid .offset4:first-child { + margin-left: 34.04255319148936%; + *margin-left: 33.93617021276596%; } -/* line 224, ../scss/include/_animations.scss */ -#jqt .flipleft.in { - -webkit-animation-name: flipLeftIn; +.row-fluid .offset3 { + margin-left: 27.659574468085104%; + *margin-left: 27.5531914893617%; } -/* line 228, ../scss/include/_animations.scss */ -#jqt .flipleft.out { - -webkit-animation-name: flipLeftOut; +.row-fluid .offset3:first-child { + margin-left: 25.53191489361702%; + *margin-left: 25.425531914893618%; } -@-webkit-keyframes flipLeftIn { - /* line 233, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: rotateY(180deg) scale(0.8); - } - /* line 236, ../scss/include/_animations.scss */ - 100% { - -webkit-transform: rotateY(0deg) scale(1); - } +.row-fluid .offset2 { + margin-left: 19.148936170212764%; + *margin-left: 19.04255319148936%; } -@-webkit-keyframes flipLeftOut { - /* line 242, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: rotateY(0deg) scale(1); - } - /* line 245, ../scss/include/_animations.scss */ - 100% { - -webkit-transform: rotateY(-180deg) scale(0.8); - } +.row-fluid .offset2:first-child { + margin-left: 17.02127659574468%; + *margin-left: 16.914893617021278%; } -/* Flip Right */ -/* line 254, ../scss/include/_animations.scss */ -#jqt .flipright { - -webkit-backface-visibility: hidden; +.row-fluid .offset1 { + margin-left: 10.638297872340425%; + *margin-left: 10.53191489361702%; } -/* line 258, ../scss/include/_animations.scss */ -#jqt .flipright.in { - -webkit-animation-name: flipRightIn; +.row-fluid .offset1:first-child { + margin-left: 8.51063829787234%; + *margin-left: 8.404255319148938%; } -/* line 262, ../scss/include/_animations.scss */ -#jqt .flipright.out { - -webkit-animation-name: flipRightOut; +[class*="span"].hide, +.row-fluid [class*="span"].hide { + display: none; } -@-webkit-keyframes flipRightIn { - /* line 267, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: rotateY(-180deg) scale(0.8); - } - /* line 270, ../scss/include/_animations.scss */ - 100% { - -webkit-transform: rotateY(0deg) scale(1); - } +[class*="span"].pull-right, +.row-fluid [class*="span"].pull-right { + float: right; } -@-webkit-keyframes flipRightOut { - /* line 276, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: rotateY(0deg) scale(1); - } - /* line 279, ../scss/include/_animations.scss */ - 100% { - -webkit-transform: rotateY(180deg) scale(0.8); - } +.container { + margin-right: auto; + margin-left: auto; + *zoom: 1; } -/* Swap Right */ -/* line 288, ../scss/include/_animations.scss */ -#jqt .swapright { - -webkit-animation-duration: .7s; - -webkit-transform: perspective(800); - -webkit-animation-timing-function: ease-out; +.container:before, +.container:after { + display: table; + content: ""; + line-height: 0; } -/* line 293, ../scss/include/_animations.scss */ -#jqt .swapright.in { - -webkit-animation-name: swapRightIn; +.container:after { + clear: both; } -/* line 296, ../scss/include/_animations.scss */ -#jqt .swapright.out { - -webkit-animation-name: swapRightOut; +.container-fluid { + padding-right: 20px; + padding-left: 20px; + *zoom: 1; } -@-webkit-keyframes swapRightIn { - /* line 301, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: translate3d(0px, 0px, -800px) rotateY(70deg); - opacity: 0; - } - /* line 305, ../scss/include/_animations.scss */ - 35% { - -webkit-transform: translate3d(-180px, 0px, -400px) rotateY(20deg); - opacity: 1; - } - /* line 309, ../scss/include/_animations.scss */ - 100% { - -webkit-transform: translate3d(0px, 0px, 0px) rotateY(0deg); - opacity: 1; - } +.container-fluid:before, +.container-fluid:after { + display: table; + content: ""; + line-height: 0; } -@-webkit-keyframes swapRightOut { - /* line 316, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: translate3d(0px, 0px, 0px) rotateY(0deg); - opacity: 1; - } - /* line 320, ../scss/include/_animations.scss */ - 35% { - -webkit-transform: translate3d(180px, 0px, -400px) rotateY(-20deg); - opacity: .5; - } - /* line 324, ../scss/include/_animations.scss */ - 100% { - -webkit-transform: translate3d(0px, 0px, -800px) rotateY(-70deg); - opacity: 0; - } -} -/* Swap Left */ -/* line 332, ../scss/include/_animations.scss */ -#jqt .swapleft { - -webkit-animation-duration: .7s; - -webkit-transform: perspective(800); - -webkit-animation-timing-function: ease-out; -} -/* line 337, ../scss/include/_animations.scss */ -#jqt .swapleft.in { - -webkit-animation-name: swapLeftIn; -} -/* line 340, ../scss/include/_animations.scss */ -#jqt .swapleft.out { - -webkit-animation-name: swapLeftOut; -} -@-webkit-keyframes swapLeftIn { - /* line 345, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: translate3d(0px, 0px, -800px) rotateY(-70deg); - opacity: 0; - } - /* line 349, ../scss/include/_animations.scss */ - 35% { - -webkit-transform: translate3d(180px, 0px, -400px) rotateY(-20deg); - opacity: 1; - } - /* line 353, ../scss/include/_animations.scss */ - 100% { - opacity: 1; - -webkit-transform: translate3d(0px, 0px, 0px) rotateY(0deg); - } +.container-fluid:after { + clear: both; } -@-webkit-keyframes swapLeftOut { - /* line 360, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: translate3d(0px, 0px, 0px) rotateY(0deg); - opacity: 1; - } - /* line 364, ../scss/include/_animations.scss */ - 35% { - -webkit-transform: translate3d(-180px, 0px, -400px) rotateY(20deg); - opacity: .5; - } - /* line 368, ../scss/include/_animations.scss */ - 100% { - -webkit-transform: translate3d(0px, 0px, -800px) rotateY(70deg); - opacity: 0; - } -} -/* Cube Left */ -/* line 382, ../scss/include/_animations.scss */ -#jqt .cubeleft.in, -#jqt .cubeleft.out, -#jqt .cuberight.in, -#jqt .cuberight.out { - -webkit-animation-duration: .6s; - -webkit-transform: perspective(800); -} -/* line 389, ../scss/include/_animations.scss */ -#jqt .cubeleft.in { - -webkit-transform-origin: 0% 50%; - -webkit-animation-name: cubeLeftIn; -} -/* line 394, ../scss/include/_animations.scss */ -#jqt .cubeleft.out { - -webkit-transform-origin: 100% 50%; - -webkit-animation-name: cubeLeftOut; -} -@-webkit-keyframes cubeLeftIn { - /* line 400, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: rotateY(90deg) translateZ(320px); - opacity: .5; - } - /* line 404, ../scss/include/_animations.scss */ - 100% { - -webkit-transform: rotateY(0deg) translateZ(0) translateX(0); - opacity: 1; - } +p { + margin: 0 0 10px; } -@-webkit-keyframes cubeLeftOut { - /* line 411, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: rotateY(0deg) translateZ(0) translateX(0); - opacity: 1; - } - /* line 415, ../scss/include/_animations.scss */ - 100% { - -webkit-transform: rotateY(-90deg) translateZ(320px); - opacity: .5; - } +.lead { + margin-bottom: 20px; + font-size: 21px; + font-weight: 200; + line-height: 30px; } -/* Cube Right */ -/* line 423, ../scss/include/_animations.scss */ -#jqt .cuberight.in { - -webkit-transform-origin: 100% 50%; - -webkit-animation-name: cubeRightIn; +small { + font-size: 85%; } -/* line 428, ../scss/include/_animations.scss */ -#jqt .cuberight.out { - -webkit-transform-origin: 0% 50%; - -webkit-animation-name: cubeRightOut; +strong { + font-weight: bold; } -@-webkit-keyframes cubeRightIn { - /* line 434, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: rotateY(-90deg) translateZ(320px); - opacity: .5; - } - /* line 438, ../scss/include/_animations.scss */ - 100% { - -webkit-transform: rotateY(0deg) translateZ(0) translateX(0); - opacity: 1; - } +em { + font-style: italic; } -@-webkit-keyframes cubeRightOut { - /* line 445, ../scss/include/_animations.scss */ - 0% { - -webkit-transform: rotateY(0deg) translateZ(0) translateX(0); - opacity: 1; - } - /* line 449, ../scss/include/_animations.scss */ - 100% { - -webkit-transform: rotateY(90deg) translateZ(320px); - opacity: .5; - } +cite { + font-style: normal; } -/* line 5, ../scss/include/_skeleton.scss */ -body { - background: black; -} -/* line 9, ../scss/include/_skeleton.scss */ -.base-chevron, -#jqt ul li.arrow:after, -#jqt ul li.forward:after { - content: '›'; - width: 22px; - height: 100%; - vertical-align: middle; - font-size: 30px; - line-height: 38px; - font-family: Futura, "Futura Condensed", Helvetica, Arial, sans-serif; - font-weight: bold; - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=60); - opacity: 0.6; - position: absolute; - right: 0; - top: 0; - pointer-events: none; - z-index: 10; -} -/* line 26, ../scss/include/_skeleton.scss */ -.base-flatlists, -#jqt ul.metal, -#jqt ul.edgetoedge, -#jqt ul.plastic { - margin: 0; - padding: 0; - border-width: 0 0 0 1px; - -webkit-border-radius: 0; - border-radius: 0; +.muted { + color: #999999; } -/* line 35, ../scss/include/_skeleton.scss */ -#jqt h1, -#jqt h2 { - font: bold 18px "Helvetica Neue", Helvetica; - margin: 10px 20px 6px; - color: #bbbcbe; - text-shadow: #3c3d3e 0 -1px 0; +a.muted:hover { + color: #808080; } -/* line 41, ../scss/include/_skeleton.scss */ -#jqt .toolbar { - -webkit-box-sizing: border-box; - box-sizing: border-box; - -webkit-box-shadow: rgba(0, 0, 0, 0.4) 0 1px 6px; - box-shadow: rgba(0, 0, 0, 0.4) 0 1px 6px; - border-bottom: 1px solid black; - z-index: 10; - position: relative; - padding: 10px; - height: 44px; +.text-warning { + color: #c09853; } -/* line 52, ../scss/include/_skeleton.scss */ -#jqt .toolbar > h1 { - position: absolute; - overflow: hidden; - left: 50%; - bottom: 9px; - margin: 1px 0 0 -75px; - width: 150px; - font-size: 20px; - font-weight: bold; - line-height: 1.3em; - text-align: center; - text-overflow: ellipsis; - white-space: nowrap; - color: white; - text-shadow: #161717 0 -1px 0; -} -/* line 71, ../scss/include/_skeleton.scss */ -#jqt.black-translucent .toolbar { - padding-top: 30px; - height: 64px; -} -/* line 75, ../scss/include/_skeleton.scss */ -#jqt.landscape .toolbar > h1 { - margin-left: -125px; - width: 250px; -} -/* line 80, ../scss/include/_skeleton.scss */ -#jqt .button, -#jqt .back, -#jqt .cancel, -#jqt .add { - position: absolute; - overflow: hidden; - width: auto; - height: 30px; +a.text-warning:hover { + color: #a47e3c; +} +.text-error { + color: #b94a48; +} +a.text-error:hover { + color: #953b39; +} +.text-info { + color: #3a87ad; +} +a.text-info:hover { + color: #2d6987; +} +.text-success { + color: #468847; +} +a.text-success:hover { + color: #356635; +} +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 10px 0; font-family: inherit; - font-size: 12px; font-weight: bold; - line-height: 30px; - text-overflow: ellipsis; - text-decoration: none; - white-space: nowrap; - background: none; - bottom: 6px; - right: 10px; - margin: 0; - padding: 0 10px; - color: #e2e3e3; - text-shadow: #000000 0 -1px 0; - -webkit-box-shadow: rgba(255, 255, 255, 0.2) 0 1px 0, rgba(0, 0, 0, 0.2) 0 1px 2px inset; - box-shadow: rgba(255, 255, 255, 0.2) 0 1px 0, rgba(0, 0, 0, 0.2) 0 1px 2px inset; - border: 1px solid black; - -webkit-border-radius: 5px; - border-radius: 5px; - background-image: none; - background-color: #0a0a0a; - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #2f3031), color-stop(50%, #161717), color-stop(51%, #0a0a0a), color-stop(100%, #000000)); - background-image: -webkit-linear-gradient(top, #2f3031, #161717 50%, #0a0a0a 51%, #000000); - background-image: linear-gradient(top, #2f3031, #161717 50%, #0a0a0a 51%, #000000); -} -/* line 107, ../scss/include/_skeleton.scss */ -#jqt .button.active, -#jqt .back.active, -#jqt .cancel.active, -#jqt .add.active { - border-color: black; - background-image: none; - background-color: black; - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #262627), color-stop(50%, #0d0d0d), color-stop(51%, #000000), color-stop(100%, #000000)); - background-image: -webkit-linear-gradient(top, #262627, #0d0d0d 50%, #000000 51%, #000000); - background-image: linear-gradient(top, #262627, #0d0d0d 50%, #000000 51%, #000000); - color: #d8d9d9; - text-shadow: #000000 0 -1px 0; -} -/* line 114, ../scss/include/_skeleton.scss */ -#jqt .back { - max-width: 60px; - margin-left: 15px; - overflow: visible; + line-height: 20px; + color: inherit; + text-rendering: optimizelegibility; +} +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small { + font-weight: normal; + line-height: 1; + color: #999999; +} +h1, +h2, +h3 { + line-height: 40px; +} +h1 { + font-size: 38.5px; +} +h2 { + font-size: 31.5px; +} +h3 { + font-size: 24.5px; +} +h4 { + font-size: 17.5px; +} +h5 { + font-size: 14px; +} +h6 { + font-size: 11.9px; +} +h1 small { + font-size: 24.5px; +} +h2 small { + font-size: 17.5px; +} +h3 small { + font-size: 14px; +} +h4 small { + font-size: 14px; +} +.page-header { + padding-bottom: 9px; + margin: 20px 0 30px; + border-bottom: 1px solid #eeeeee; +} +ul, +ol { + padding: 0; + margin: 0 0 10px 25px; +} +ul ul, +ul ol, +ol ol, +ol ul { + margin-bottom: 0; +} +li { + line-height: 20px; +} +ul.unstyled, +ol.unstyled { + margin-left: 0; + list-style: none; +} +ul.inline, +ol.inline { + margin-left: 0; + list-style: none; +} +ul.inline > li, +ol.inline > li { + display: inline-block; padding-left: 5px; + padding-right: 5px; } -/* line 121, ../scss/include/_skeleton.scss */ -#jqt .back:after, -#jqt .back:before { - content: ''; - position: absolute; - width: 20px; - height: 20px; - top: 1px; - left: 1px; - -webkit-transform: rotate(45deg) translate3d(0.2px, 0, 0); - transform: rotate(45deg) translate3d(0.2px, 0, 0); - -webkit-transform-origin: 0 0; - transform-origin: 0 0; - background-image: none; - background-color: #0a0a0a; - background-image: -webkit-gradient(linear, 0% 0%, 100% 100%, color-stop(0%, #2f3031), color-stop(50%, #161717), color-stop(51%, #0a0a0a), color-stop(100%, #000000)); - background-image: -webkit-linear-gradient(top left, #2f3031, #161717 50%, #0a0a0a 51%, #000000); - background-image: linear-gradient(top left, #2f3031, #161717 50%, #0a0a0a 51%, #000000); - background-size: 100% 98%; - -webkit-border-radius: 0 0 0 2px; - border-radius: 0 0 0 2px; - -webkit-mask-image: -webkit-linear-gradient(45deg, #000000, #000000 15px, rgba(0, 0, 0, 0) 15px); - -webkit-mask-image: -webkit-gradient(linear, left bottom, right top, from(#000000), color-stop(50%, #000000), color-stop(50%, rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0))); - -webkit-mask-clip: border-box; - -webkit-background-clip: content-box; -} -/* line 149, ../scss/include/_skeleton.scss */ -#jqt .back:after { - -webkit-box-shadow: rgba(0, 0, 0, 0.2) 1px 0 0 inset, rgba(0, 0, 0, 0.2) 0 -1px 0 inset; - box-shadow: rgba(0, 0, 0, 0.2) 1px 0 0 inset, rgba(0, 0, 0, 0.2) 0 -1px 0 inset; -} -/* line 152, ../scss/include/_skeleton.scss */ -#jqt .back:before { - margin-left: -1px; - background: black none; +dl { + margin-bottom: 20px; } -/* line 157, ../scss/include/_skeleton.scss */ -#jqt .back.active:after { - background-image: none; - background-color: black; - background-image: -webkit-gradient(linear, 0% 0%, 100% 100%, color-stop(0%, #262627), color-stop(50%, #0d0d0d), color-stop(51%, #000000), color-stop(100%, #000000)); - background-image: -webkit-linear-gradient(left top, #262627, #0d0d0d 50%, #000000 51%, #000000); - background-image: linear-gradient(left top, #262627, #0d0d0d 50%, #000000 51%, #000000); -} -/* line 160, ../scss/include/_skeleton.scss */ -#jqt .back.active:before { - background-color: black; -} -/* line 166, ../scss/include/_skeleton.scss */ -#jqt .blueButton { - background-image: #2f7ce3, glossy; - color: white; - text-shadow: #1a63c5 0 -1px 0; -} -/* line 170, ../scss/include/_skeleton.scss */ -#jqt .whiteButton, -#jqt .grayButton, -#jqt .redButton, -#jqt .blueButton, -#jqt .greenButton { - display: block; - font-size: 20px; - font-weight: bold; - margin: 10px 20px; - padding: 10px; - text-align: center; - text-decoration: inherit; - -webkit-border-radius: 8px; - border-radius: 8px; - -webkit-box-shadow: rgba(0, 0, 0, 0.4) 0 1px 3px, rgba(0, 0, 0, 0.4) 0 0 0 5px, rgba(255, 255, 255, 0.3) 0 1px 0 5px; - box-shadow: rgba(0, 0, 0, 0.4) 0 1px 3px, rgba(0, 0, 0, 0.4) 0 0 0 5px, rgba(255, 255, 255, 0.3) 0 1px 0 5px; -} -/* line 185, ../scss/include/_skeleton.scss */ -#jqt .whiteButton.active, -#jqt .whiteButton:active, -#jqt .grayButton.active, -#jqt .grayButton:active, -#jqt .redButton.active, -#jqt .redButton:active, -#jqt .blueButton.active, -#jqt .blueButton:active, -#jqt .greenButton.active, -#jqt .greenButton:active { - background-image: none; - background-color: #3c8101; - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #5fcd01), color-stop(50%, #479b01), color-stop(51%, #3c8101), color-stop(100%, #306801)); - background-image: -webkit-linear-gradient(top, #5fcd01, #479b01 50%, #3c8101 51%, #306801); - background-image: linear-gradient(top, #5fcd01, #479b01 50%, #3c8101 51%, #306801); - color: white; - text-shadow: #244f00 0 -1px 0; -} -/* line 191, ../scss/include/_skeleton.scss */ -#jqt .whiteButton { - background-image: none; - background-color: #eeeeee; - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(50%, #fbfbfb), color-stop(51%, #eeeeee), color-stop(100%, #e1e1e1)); - background-image: -webkit-linear-gradient(top, #ffffff, #fbfbfb 50%, #eeeeee 51%, #e1e1e1); - background-image: linear-gradient(top, #ffffff, #fbfbfb 50%, #eeeeee 51%, #e1e1e1); - color: #151515; - text-shadow: white 0 1px 0; -} -/* line 195, ../scss/include/_skeleton.scss */ -#jqt .grayButton { - background-image: none; - background-color: #444444; - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #6a6a6a), color-stop(50%, #515151), color-stop(51%, #444444), color-stop(100%, #373737)); - background-image: -webkit-linear-gradient(top, #6a6a6a, #515151 50%, #444444 51%, #373737); - background-image: linear-gradient(top, #6a6a6a, #515151 50%, #444444 51%, #373737); - color: white; - text-shadow: #2b2b2b 0 -1px 0; -} -/* line 200, ../scss/include/_skeleton.scss */ -#jqt .redButton { - background-image: none; - background-color: #d83b38; - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #e57a78), color-stop(50%, #dc504d), color-stop(51%, #d83b38), color-stop(100%, #ce2c28)); - background-image: -webkit-linear-gradient(top, #e57a78, #dc504d 50%, #d83b38 51%, #ce2c28); - background-image: linear-gradient(top, #e57a78, #dc504d 50%, #d83b38 51%, #ce2c28); - color: white; - text-shadow: #b92724 0 -1px 0; -} -/* line 204, ../scss/include/_skeleton.scss */ -#jqt .redButton.active, -#jqt .redButton:active { - background-image: none; - background-color: #c12926; - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #de5856), color-stop(50%, #d52e2b), color-stop(51%, #c12926), color-stop(100%, #ac2422)); - background-image: -webkit-linear-gradient(top, #de5856, #d52e2b 50%, #c12926 51%, #ac2422); - background-image: linear-gradient(top, #de5856, #d52e2b 50%, #c12926 51%, #ac2422); - color: white; - text-shadow: #97201e 0 -1px 0; -} -/* line 211, ../scss/include/_skeleton.scss */ -#jqt .greenButton { - background-image: none; - background-color: #53b401; - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #76fe04), color-stop(50%, #5fcd01), color-stop(51%, #53b401), color-stop(100%, #479b01)); - background-image: -webkit-linear-gradient(top, #76fe04, #5fcd01 50%, #53b401 51%, #479b01); - background-image: linear-gradient(top, #76fe04, #5fcd01 50%, #53b401 51%, #479b01); - color: white; - text-shadow: #3c8101 0 -1px 0; -} -/* line 216, ../scss/include/_skeleton.scss */ -#jqt .leftButton, -#jqt .cancel, -#jqt .back { - left: 6px; - right: auto; -} -/* line 221, ../scss/include/_skeleton.scss */ -#jqt .add { - font-size: 24px; - line-height: 24px; +dt, +dd { + line-height: 20px; +} +dt { font-weight: bold; } -/* line 229, ../scss/include/_skeleton.scss */ -#jqt ul { - padding: 0; - margin: 5px 10px 10px 10px; - -webkit-margin-collapse: separate; -} -/* line 231, ../scss/include/_skeleton.scss */ -#jqt ul, -#jqt ul.individual li { - background-color: #555658; - color: #d5d6d7; - text-shadow: #3c3d3e 0 -1px 0; - border: 1px solid #2f3031; - font: bold 18px "Helvetica Neue", Helvetica; -} -/* line 240, ../scss/include/_skeleton.scss */ -#jqt ul:first-child { - margin-top: 15px; +dd { + margin-left: 10px; } -/* line 246, ../scss/include/_skeleton.scss */ -#jqt ul li { - border-top: 1px solid #48494b; - list-style-type: none; - overflow: hidden; - padding: 10px; - -webkit-transform: translate3d(0, 0, 0); - /* expensive way to avoid flickr */ - +.dl-horizontal { + *zoom: 1; } -/* line 253, ../scss/include/_skeleton.scss */ -#jqt ul li a { - text-decoration: none; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - display: block; - padding: 10px; - margin: -10px; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - -webkit-transform: translateZ(0); - color: white; - text-shadow: #3c3d3e 0 -1px 0; -} -/* line 265, ../scss/include/_skeleton.scss */ -#jqt ul li a.active { - background-image: none; - background-color: #53b401; - -webkit-box-shadow: #5cc801 0 1px 0px inset; - box-shadow: #5cc801 0 1px 0px inset; - color: white; - text-shadow: #3c8101 0 -1px 0; -} -/* line 270, ../scss/include/_skeleton.scss */ -#jqt ul li a.active small { - color: #a0fe50; - text-shadow: #000000 0 -1px 0; -} -/* line 271, ../scss/include/_skeleton.scss */ -#jqt ul li a.active small.counter { - background-color: #306801; -} -/* line 280, ../scss/include/_skeleton.scss */ -#jqt ul li small { - color: #53b401; - font: 16px "Helvetica Neue", Helvetica; +.dl-horizontal:before, +.dl-horizontal:after { + display: table; + content: ""; + line-height: 0; +} +.dl-horizontal:after { + clear: both; +} +.dl-horizontal dt { + float: left; + width: 160px; + clear: left; text-align: right; + overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - overflow: hidden; +} +.dl-horizontal dd { + margin-left: 180px; +} +hr { + margin: 20px 0; + border: 0; + border-top: 1px solid #eeeeee; + border-bottom: 1px solid #ffffff; +} +abbr[title], +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted #999999; +} +abbr.initialism { + font-size: 90%; + text-transform: uppercase; +} +blockquote { + padding: 0 0 0 15px; + margin: 0 0 20px; + border-left: 5px solid #eeeeee; +} +blockquote p { + margin-bottom: 0; + font-size: 16px; + font-weight: 300; + line-height: 25px; +} +blockquote small { display: block; - width: 23%; - position: relative; - z-index: 20; + line-height: 20px; + color: #999999; +} +blockquote small:before { + content: '\2014 \00A0'; +} +blockquote.pull-right { float: right; - line-height: 16px; - padding: 2px 8px 4px 8px; -} -/* line 295, ../scss/include/_skeleton.scss */ -#jqt ul li small.counter { - background: #2f3031; - color: #949698; - text-shadow: #0a0a0a 0 -1px 0; - z-index: 10; - font-size: 16px; - font-weight: bold; + padding-right: 15px; + padding-left: 0; + border-right: 5px solid #eeeeee; + border-left: 0; +} +blockquote.pull-right p, +blockquote.pull-right small { + text-align: right; +} +blockquote.pull-right small:before { + content: ''; +} +blockquote.pull-right small:after { + content: '\00A0 \2014'; +} +q:before, +q:after, +blockquote:before, +blockquote:after { + content: ""; +} +address { + display: block; + margin-bottom: 20px; + font-style: normal; + line-height: 20px; +} +code, +pre { + padding: 0 3px 2px; + font-family: Monaco, Menlo, Consolas, "Courier New", monospace; + font-size: 12px; + color: #333333; -webkit-border-radius: 3px; + -moz-border-radius: 3px; border-radius: 3px; +} +code { + padding: 2px 4px; + color: #d14; + background-color: #f7f7f9; + border: 1px solid #e1e1e8; + white-space: nowrap; +} +pre { display: block; - width: auto; + padding: 9.5px; + margin: 0 0 10px; + font-size: 13px; + line-height: 20px; + word-break: break-all; + word-wrap: break-word; + white-space: pre; + white-space: pre-wrap; + background-color: #f5f5f5; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.15); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +pre.prettyprint { + margin-bottom: 20px; } -/* line 311, ../scss/include/_skeleton.scss */ -#jqt ul li ::-webkit-input-placeholder { - color: #949698; - text-shadow: #3c3d3e 0 -1px 0; -} -/* line 322, ../scss/include/_skeleton.scss */ -#jqt ul li input[type="text"], -#jqt ul li input[type="password"], -#jqt ul li input[type="tel"], -#jqt ul li input[type="number"], -#jqt ul li input[type="search"], -#jqt ul li input[type="email"], -#jqt ul li input[type="url"], -#jqt ul li textarea, -#jqt ul li select { - color: white; - text-shadow: #3c3d3e 0 -1px 0; - background: transparent url("data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="); +pre code { + padding: 0; + color: inherit; + white-space: pre; + white-space: pre-wrap; + background-color: transparent; border: 0; - font: normal 17px "Helvetica Neue", Helvetica; +} +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} +form { + margin: 0 0 20px; +} +fieldset { padding: 0; - display: inline-block; - margin-left: 0px; - width: 100%; - -webkit-appearance: textarea; + margin: 0; + border: 0; } -/* line 333, ../scss/include/_skeleton.scss */ -#jqt ul li textarea { - height: 120px; +legend { + display: block; + width: 100%; padding: 0; - text-indent: -2px; + margin-bottom: 20px; + font-size: 21px; + line-height: 40px; + color: #333333; + border: 0; + border-bottom: 1px solid #e5e5e5; } -/* line 338, ../scss/include/_skeleton.scss */ -#jqt ul li input[type="checkbox"], -#jqt ul li input[type="radio"] { - margin: 0; - padding: 10px; +legend small { + font-size: 15px; + color: #999999; } -/* line 342, ../scss/include/_skeleton.scss */ -#jqt ul li input[type="checkbox"]:after, -#jqt ul li input[type="radio"]:after { - content: attr(title); - position: absolute; +label, +input, +button, +select, +textarea { + font-size: 14px; + font-weight: normal; + line-height: 20px; +} +input, +button, +select, +textarea { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} +label { display: block; - width: 0; - left: 21px; - top: 12px; - font-family: "Helvetica Neue", Helvetica; - font-size: 17px; - line-height: 21px; - width: 246px; - margin: 0 0 0 17px; - color: white; - text-shadow: #3c3d3e 0 -1px 0; -} -/* line 355, ../scss/include/_skeleton.scss */ -#jqt ul li input[type='submit'] { + margin-bottom: 5px; +} +select, +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + display: inline-block; + height: 20px; + padding: 4px 6px; + margin-bottom: 10px; + font-size: 14px; + line-height: 20px; + color: #555555; -webkit-border-radius: 4px; + -moz-border-radius: 4px; border-radius: 4px; - background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#eeeeee), to(#9c9ea0)); - border: 1px outset #aaa; - display: block; - font-size: inherit; - font-weight: inherit; - padding: 10px; + vertical-align: middle; +} +input, +textarea, +.uneditable-input { + width: 206px; +} +textarea { + height: auto; +} +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + background-color: #ffffff; + border: 1px solid #cccccc; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border linear .2s, box-shadow linear .2s; + -moz-transition: border linear .2s, box-shadow linear .2s; + -o-transition: border linear .2s, box-shadow linear .2s; + transition: border linear .2s, box-shadow linear .2s; +} +textarea:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="datetime"]:focus, +input[type="datetime-local"]:focus, +input[type="date"]:focus, +input[type="month"]:focus, +input[type="time"]:focus, +input[type="week"]:focus, +input[type="number"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="color"]:focus, +.uneditable-input:focus { + border-color: rgba(82, 168, 236, 0.8); + outline: 0; + outline: thin dotted \9; + /* IE6-9 */ + + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); +} +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + *margin-top: 0; + /* IE7 */ + + margin-top: 1px \9; + /* IE8-9 */ + + line-height: normal; +} +input[type="file"], +input[type="image"], +input[type="submit"], +input[type="reset"], +input[type="button"], +input[type="radio"], +input[type="checkbox"] { + width: auto; +} +select, +input[type="file"] { + height: 30px; + /* In IE7, the height of the select element cannot be changed by height, only font-size */ + + *margin-top: 4px; + /* For IE7, add top margin to align select with labels */ + + line-height: 30px; +} +select { + width: 220px; + border: 1px solid #cccccc; + background-color: #ffffff; +} +select[multiple], +select[size] { + height: auto; +} +select:focus, +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.uneditable-input, +.uneditable-textarea { + color: #999999; + background-color: #fcfcfc; + border-color: #cccccc; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + cursor: not-allowed; +} +.uneditable-input { + overflow: hidden; + white-space: nowrap; +} +.uneditable-textarea { + width: auto; + height: auto; +} +input:-moz-placeholder, +textarea:-moz-placeholder { + color: #999999; +} +input:-ms-input-placeholder, +textarea:-ms-input-placeholder { + color: #999999; } -/* line 368, ../scss/include/_skeleton.scss */ -#jqt ul li.arrow small, -#jqt ul li.forward small { - margin-right: 24px; +input::-webkit-input-placeholder, +textarea::-webkit-input-placeholder { + color: #999999; } -/* line 380, ../scss/include/_skeleton.scss */ -#jqt ul li.forward:before { +.radio, +.checkbox { + min-height: 20px; + padding-left: 20px; +} +.radio input[type="radio"], +.checkbox input[type="checkbox"] { + float: left; + margin-left: -20px; +} +.controls > .radio:first-child, +.controls > .checkbox:first-child { + padding-top: 5px; +} +.radio.inline, +.checkbox.inline { + display: inline-block; + padding-top: 5px; + margin-bottom: 0; + vertical-align: middle; +} +.radio.inline + .radio.inline, +.checkbox.inline + .checkbox.inline { + margin-left: 10px; +} +.input-mini { + width: 60px; +} +.input-small { + width: 90px; +} +.input-medium { + width: 150px; +} +.input-large { + width: 210px; +} +.input-xlarge { + width: 270px; +} +.input-xxlarge { + width: 530px; +} +input[class*="span"], +select[class*="span"], +textarea[class*="span"], +.uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"] { + float: none; + margin-left: 0; +} +.input-append input[class*="span"], +.input-append .uneditable-input[class*="span"], +.input-prepend input[class*="span"], +.input-prepend .uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"], +.row-fluid .input-prepend [class*="span"], +.row-fluid .input-append [class*="span"] { + display: inline-block; +} +input, +textarea, +.uneditable-input { + margin-left: 0; +} +.controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; +} +input.span12, textarea.span12, .uneditable-input.span12 { + width: 926px; +} +input.span11, textarea.span11, .uneditable-input.span11 { + width: 846px; +} +input.span10, textarea.span10, .uneditable-input.span10 { + width: 766px; +} +input.span9, textarea.span9, .uneditable-input.span9 { + width: 686px; +} +input.span8, textarea.span8, .uneditable-input.span8 { + width: 606px; +} +input.span7, textarea.span7, .uneditable-input.span7 { + width: 526px; +} +input.span6, textarea.span6, .uneditable-input.span6 { + width: 446px; +} +input.span5, textarea.span5, .uneditable-input.span5 { + width: 366px; +} +input.span4, textarea.span4, .uneditable-input.span4 { + width: 286px; +} +input.span3, textarea.span3, .uneditable-input.span3 { + width: 206px; +} +input.span2, textarea.span2, .uneditable-input.span2 { + width: 126px; +} +input.span1, textarea.span1, .uneditable-input.span1 { + width: 46px; +} +.controls-row { + *zoom: 1; +} +.controls-row:before, +.controls-row:after { + display: table; content: ""; - position: absolute; - display: block; - top: 50%; - right: 6px; - margin-top: -12px; - width: 24px; - height: 24px; - -webkit-border-radius: 12px; - border-radius: 12px; - background-image: none; - background-color: #53b401; - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #76fe04), color-stop(50%, #5fcd01), color-stop(51%, #53b401), color-stop(100%, #479b01)); - background-image: -webkit-linear-gradient(top, #76fe04, #5fcd01 50%, #53b401 51%, #479b01); - background-image: linear-gradient(top, #76fe04, #5fcd01 50%, #53b401 51%, #479b01); - border: 2px solid #fff; - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); - -webkit-box-sizing: border-box; - padding: 0; - z-index: 10; line-height: 0; - pointer-events: none; } -/* line 395, ../scss/include/_skeleton.scss */ -#jqt ul li.forward:after { - color: white; - text-shadow: #3c8101 0 -1px 0; - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); - opacity: 1; - font-size: 24px; -} -/* line 404, ../scss/include/_skeleton.scss */ -#jqt ul.rounded, -#jqt ul.individual li { - -webkit-box-shadow: rgba(255, 255, 255, 0.15) 0 1px 0; - box-shadow: rgba(255, 255, 255, 0.15) 0 1px 0; - border: 1px solid #2f3031; -} -/* line 409, ../scss/include/_skeleton.scss */ -#jqt ul.rounded { - -webkit-border-radius: 8px; - border-radius: 8px; -} -/* line 412, ../scss/include/_skeleton.scss */ -#jqt ul.rounded li:first-child, -#jqt ul.rounded li:first-child a { - border-top: 0; - -webkit-border-top-left-radius: 8px; - border-top-left-radius: 8px; - -webkit-border-top-right-radius: 8px; - border-top-right-radius: 8px; -} -/* line 416, ../scss/include/_skeleton.scss */ -#jqt ul.rounded li:last-child, -#jqt ul.rounded li:last-child a { - -webkit-border-bottom-left-radius: 8px; - border-bottom-left-radius: 8px; - -webkit-border-bottom-right-radius: 8px; - border-bottom-right-radius: 8px; -} -/* line 422, ../scss/include/_skeleton.scss */ -#jqt ul.form li { - padding: 7px 10px; +.controls-row:after { + clear: both; } -/* line 425, ../scss/include/_skeleton.scss */ -#jqt ul.form li.error { - border: 2px solid red; +.controls-row [class*="span"], +.row-fluid .controls-row [class*="span"] { + float: left; } -/* line 428, ../scss/include/_skeleton.scss */ -#jqt ul.form li.error + #jqt ul.form li.error { - border-top: 0; +.controls-row .checkbox[class*="span"], +.controls-row .radio[class*="span"] { + padding-top: 5px; +} +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + cursor: not-allowed; + background-color: #eeeeee; } -/* line 438, ../scss/include/_skeleton.scss */ -#jqt ul.metal li { - background-image: none; - border-top: 1px solid #fff; - border-bottom: 1px solid #666; - font-size: 26px; +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"][readonly], +input[type="checkbox"][readonly] { + background-color: transparent; +} +.control-group.warning .control-label, +.control-group.warning .help-block, +.control-group.warning .help-inline { + color: #c09853; +} +.control-group.warning .checkbox, +.control-group.warning .radio, +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + color: #c09853; +} +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + border-color: #c09853; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.warning input:focus, +.control-group.warning select:focus, +.control-group.warning textarea:focus { + border-color: #a47e3c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; +} +.control-group.warning .input-prepend .add-on, +.control-group.warning .input-append .add-on { + color: #c09853; + background-color: #fcf8e3; + border-color: #c09853; +} +.control-group.error .control-label, +.control-group.error .help-block, +.control-group.error .help-inline { + color: #b94a48; +} +.control-group.error .checkbox, +.control-group.error .radio, +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + color: #b94a48; +} +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + border-color: #b94a48; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.error input:focus, +.control-group.error select:focus, +.control-group.error textarea:focus { + border-color: #953b39; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; +} +.control-group.error .input-prepend .add-on, +.control-group.error .input-append .add-on { + color: #b94a48; + background-color: #f2dede; + border-color: #b94a48; +} +.control-group.success .control-label, +.control-group.success .help-block, +.control-group.success .help-inline { + color: #468847; +} +.control-group.success .checkbox, +.control-group.success .radio, +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + color: #468847; +} +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + border-color: #468847; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.success input:focus, +.control-group.success select:focus, +.control-group.success textarea:focus { + border-color: #356635; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; +} +.control-group.success .input-prepend .add-on, +.control-group.success .input-append .add-on { + color: #468847; + background-color: #dff0d8; + border-color: #468847; +} +.control-group.info .control-label, +.control-group.info .help-block, +.control-group.info .help-inline { + color: #3a87ad; +} +.control-group.info .checkbox, +.control-group.info .radio, +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + color: #3a87ad; +} +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + border-color: #3a87ad; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.info input:focus, +.control-group.info select:focus, +.control-group.info textarea:focus { + border-color: #2d6987; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; +} +.control-group.info .input-prepend .add-on, +.control-group.info .input-append .add-on { + color: #3a87ad; + background-color: #d9edf7; + border-color: #3a87ad; +} +input:focus:invalid, +textarea:focus:invalid, +select:focus:invalid { + color: #b94a48; + border-color: #ee5f5b; +} +input:focus:invalid:focus, +textarea:focus:invalid:focus, +select:focus:invalid:focus { + border-color: #e9322d; + -webkit-box-shadow: 0 0 6px #f8b9b7; + -moz-box-shadow: 0 0 6px #f8b9b7; + box-shadow: 0 0 6px #f8b9b7; +} +.form-actions { + padding: 19px 20px 20px; + margin-top: 20px; + margin-bottom: 20px; + background-color: #f5f5f5; + border-top: 1px solid #e5e5e5; + *zoom: 1; +} +.form-actions:before, +.form-actions:after { + display: table; + content: ""; + line-height: 0; } -/* line 445, ../scss/include/_skeleton.scss */ -#jqt ul.metal li a { - line-height: 26px; - margin: 0; - padding: 13px 0; +.form-actions:after { + clear: both; +} +.help-block, +.help-inline { + color: #595959; } -/* line 451, ../scss/include/_skeleton.scss */ -#jqt ul.metal li em { +.help-block { display: block; + margin-bottom: 10px; +} +.help-inline { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + vertical-align: middle; + padding-left: 5px; +} +.input-append, +.input-prepend { + margin-bottom: 5px; + font-size: 0; + white-space: nowrap; +} +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input, +.input-append .dropdown-menu, +.input-prepend .dropdown-menu { font-size: 14px; - font-style: normal; - width: 50%; - line-height: 14px; } -/* line 459, ../scss/include/_skeleton.scss */ -#jqt ul.metal li small { - float: right; +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input { position: relative; + margin-bottom: 0; + *margin-left: 0; + vertical-align: top; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.input-append input:focus, +.input-prepend input:focus, +.input-append select:focus, +.input-prepend select:focus, +.input-append .uneditable-input:focus, +.input-prepend .uneditable-input:focus { + z-index: 2; +} +.input-append .add-on, +.input-prepend .add-on { + display: inline-block; + width: auto; + height: 20px; + min-width: 16px; + padding: 4px 5px; + font-size: 14px; + font-weight: normal; + line-height: 20px; + text-align: center; + text-shadow: 0 1px 0 #ffffff; + background-color: #eeeeee; + border: 1px solid #ccc; +} +.input-append .add-on, +.input-prepend .add-on, +.input-append .btn, +.input-prepend .btn, +.input-append .btn-group > .dropdown-toggle, +.input-prepend .btn-group > .dropdown-toggle { + vertical-align: top; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.input-append .active, +.input-prepend .active { + background-color: #a9dba9; + border-color: #46a546; +} +.input-prepend .add-on, +.input-prepend .btn { + margin-right: -1px; +} +.input-prepend .add-on:first-child, +.input-prepend .btn:first-child { + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.input-append input, +.input-append select, +.input-append .uneditable-input { + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.input-append input + .btn-group .btn:last-child, +.input-append select + .btn-group .btn:last-child, +.input-append .uneditable-input + .btn-group .btn:last-child { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.input-append .add-on, +.input-append .btn, +.input-append .btn-group { + margin-left: -1px; +} +.input-append .add-on:last-child, +.input-append .btn:last-child, +.input-append .btn-group:last-child > .dropdown-toggle { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.input-prepend.input-append input, +.input-prepend.input-append select, +.input-prepend.input-append .uneditable-input { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.input-prepend.input-append input + .btn-group .btn, +.input-prepend.input-append select + .btn-group .btn, +.input-prepend.input-append .uneditable-input + .btn-group .btn { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.input-prepend.input-append .add-on:first-child, +.input-prepend.input-append .btn:first-child { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.input-prepend.input-append .add-on:last-child, +.input-prepend.input-append .btn:last-child { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.input-prepend.input-append .btn-group:first-child { + margin-left: 0; +} +input.search-query { + padding-right: 14px; + padding-right: 4px \9; + padding-left: 14px; + padding-left: 4px \9; + /* IE7-8 doesn't have border-radius, so don't indent the padding */ + + margin-bottom: 0; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +/* Allow for input prepend/append in search forms */ +.form-search .input-append .search-query, +.form-search .input-prepend .search-query { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.form-search .input-append .search-query { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} +.form-search .input-append .btn { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} +.form-search .input-prepend .search-query { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} +.form-search .input-prepend .btn { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} +.form-search input, +.form-inline input, +.form-horizontal input, +.form-search textarea, +.form-inline textarea, +.form-horizontal textarea, +.form-search select, +.form-inline select, +.form-horizontal select, +.form-search .help-inline, +.form-inline .help-inline, +.form-horizontal .help-inline, +.form-search .uneditable-input, +.form-inline .uneditable-input, +.form-horizontal .uneditable-input, +.form-search .input-prepend, +.form-inline .input-prepend, +.form-horizontal .input-prepend, +.form-search .input-append, +.form-inline .input-append, +.form-horizontal .input-append { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + margin-bottom: 0; + vertical-align: middle; +} +.form-search .hide, +.form-inline .hide, +.form-horizontal .hide { + display: none; +} +.form-search label, +.form-inline label, +.form-search .btn-group, +.form-inline .btn-group { + display: inline-block; +} +.form-search .input-append, +.form-inline .input-append, +.form-search .input-prepend, +.form-inline .input-prepend { + margin-bottom: 0; +} +.form-search .radio, +.form-search .checkbox, +.form-inline .radio, +.form-inline .checkbox { + padding-left: 0; + margin-bottom: 0; + vertical-align: middle; +} +.form-search .radio input[type="radio"], +.form-search .checkbox input[type="checkbox"], +.form-inline .radio input[type="radio"], +.form-inline .checkbox input[type="checkbox"] { + float: left; + margin-right: 3px; + margin-left: 0; +} +.control-group { + margin-bottom: 10px; +} +legend + .control-group { + margin-top: 20px; + -webkit-margin-top-collapse: separate; +} +.form-horizontal .control-group { + margin-bottom: 20px; + *zoom: 1; +} +.form-horizontal .control-group:before, +.form-horizontal .control-group:after { + display: table; + content: ""; + line-height: 0; +} +.form-horizontal .control-group:after { + clear: both; +} +.form-horizontal .control-label { + float: left; + width: 160px; + padding-top: 5px; + text-align: right; +} +.form-horizontal .controls { + *display: inline-block; + *padding-left: 20px; + margin-left: 180px; + *margin-left: 0; +} +.form-horizontal .controls:first-child { + *padding-left: 180px; +} +.form-horizontal .help-block { + margin-bottom: 0; +} +.form-horizontal input + .help-block, +.form-horizontal select + .help-block, +.form-horizontal textarea + .help-block, +.form-horizontal .uneditable-input + .help-block, +.form-horizontal .input-prepend + .help-block, +.form-horizontal .input-append + .help-block { margin-top: 10px; +} +.form-horizontal .form-actions { + padding-left: 180px; +} +table { + max-width: 100%; + background-color: transparent; + border-collapse: collapse; + border-spacing: 0; +} +.table { + width: 100%; + margin-bottom: 20px; +} +.table th, +.table td { + padding: 8px; + line-height: 20px; + text-align: left; + vertical-align: top; + border-top: 1px solid #dddddd; +} +.table th { font-weight: bold; } -/* line 473, ../scss/include/_skeleton.scss */ -#jqt ul.edgetoedge li { - font-size: 20px; +.table thead th { + vertical-align: bottom; } -/* line 476, ../scss/include/_skeleton.scss */ -#jqt ul.edgetoedge li:first-child { +.table caption + thead tr:first-child th, +.table caption + thead tr:first-child td, +.table colgroup + thead tr:first-child th, +.table colgroup + thead tr:first-child td, +.table thead:first-child tr:first-child th, +.table thead:first-child tr:first-child td { border-top: 0; } -/* line 480, ../scss/include/_skeleton.scss */ -#jqt ul.edgetoedge li.sep { - font-size: 16px; - padding: 2px 10px; +.table tbody + tbody { + border-top: 2px solid #dddddd; +} +.table .table { + background-color: #ffffff; +} +.table-condensed th, +.table-condensed td { + padding: 4px 5px; +} +.table-bordered { + border: 1px solid #dddddd; + border-collapse: separate; + *border-collapse: collapse; + border-left: 0; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.table-bordered th, +.table-bordered td { + border-left: 1px solid #dddddd; +} +.table-bordered caption + thead tr:first-child th, +.table-bordered caption + tbody tr:first-child th, +.table-bordered caption + tbody tr:first-child td, +.table-bordered colgroup + thead tr:first-child th, +.table-bordered colgroup + tbody tr:first-child th, +.table-bordered colgroup + tbody tr:first-child td, +.table-bordered thead:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child td { + border-top: 0; +} +.table-bordered thead:first-child tr:first-child > th:first-child, +.table-bordered tbody:first-child tr:first-child > td:first-child { + -webkit-border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; + border-top-left-radius: 4px; +} +.table-bordered thead:first-child tr:first-child > th:last-child, +.table-bordered tbody:first-child tr:first-child > td:last-child { + -webkit-border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; + border-top-right-radius: 4px; +} +.table-bordered thead:last-child tr:last-child > th:first-child, +.table-bordered tbody:last-child tr:last-child > td:first-child, +.table-bordered tfoot:last-child tr:last-child > td:first-child { + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + border-bottom-left-radius: 4px; +} +.table-bordered thead:last-child tr:last-child > th:last-child, +.table-bordered tbody:last-child tr:last-child > td:last-child, +.table-bordered tfoot:last-child tr:last-child > td:last-child { + -webkit-border-bottom-right-radius: 4px; + -moz-border-radius-bottomright: 4px; + border-bottom-right-radius: 4px; +} +.table-bordered tfoot + tbody:last-child tr:last-child td:first-child { + -webkit-border-bottom-left-radius: 0; + -moz-border-radius-bottomleft: 0; + border-bottom-left-radius: 0; +} +.table-bordered tfoot + tbody:last-child tr:last-child td:last-child { + -webkit-border-bottom-right-radius: 0; + -moz-border-radius-bottomright: 0; + border-bottom-right-radius: 0; +} +.table-bordered caption + thead tr:first-child th:first-child, +.table-bordered caption + tbody tr:first-child td:first-child, +.table-bordered colgroup + thead tr:first-child th:first-child, +.table-bordered colgroup + tbody tr:first-child td:first-child { + -webkit-border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; + border-top-left-radius: 4px; +} +.table-bordered caption + thead tr:first-child th:last-child, +.table-bordered caption + tbody tr:first-child td:last-child, +.table-bordered colgroup + thead tr:first-child th:last-child, +.table-bordered colgroup + tbody tr:first-child td:last-child { + -webkit-border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; + border-top-right-radius: 4px; +} +.table-striped tbody > tr:nth-child(odd) > td, +.table-striped tbody > tr:nth-child(odd) > th { + background-color: #f9f9f9; +} +.table-hover tbody tr:hover td, +.table-hover tbody tr:hover th { + background-color: #f5f5f5; +} +table td[class*="span"], +table th[class*="span"], +.row-fluid table td[class*="span"], +.row-fluid table th[class*="span"] { + display: table-cell; + float: none; + margin-left: 0; +} +.table td.span1, +.table th.span1 { + float: none; + width: 44px; + margin-left: 0; +} +.table td.span2, +.table th.span2 { + float: none; + width: 124px; + margin-left: 0; +} +.table td.span3, +.table th.span3 { + float: none; + width: 204px; + margin-left: 0; +} +.table td.span4, +.table th.span4 { + float: none; + width: 284px; + margin-left: 0; +} +.table td.span5, +.table th.span5 { + float: none; + width: 364px; + margin-left: 0; +} +.table td.span6, +.table th.span6 { + float: none; + width: 444px; + margin-left: 0; +} +.table td.span7, +.table th.span7 { + float: none; + width: 524px; + margin-left: 0; +} +.table td.span8, +.table th.span8 { + float: none; + width: 604px; + margin-left: 0; +} +.table td.span9, +.table th.span9 { + float: none; + width: 684px; + margin-left: 0; +} +.table td.span10, +.table th.span10 { + float: none; + width: 764px; + margin-left: 0; +} +.table td.span11, +.table th.span11 { + float: none; + width: 844px; + margin-left: 0; +} +.table td.span12, +.table th.span12 { + float: none; + width: 924px; + margin-left: 0; +} +.table tbody tr.success td { + background-color: #dff0d8; +} +.table tbody tr.error td { + background-color: #f2dede; +} +.table tbody tr.warning td { + background-color: #fcf8e3; +} +.table tbody tr.info td { + background-color: #d9edf7; +} +.table-hover tbody tr.success:hover td { + background-color: #d0e9c6; +} +.table-hover tbody tr.error:hover td { + background-color: #ebcccc; +} +.table-hover tbody tr.warning:hover td { + background-color: #faf2cc; +} +.table-hover tbody tr.info:hover td { + background-color: #c4e3f3; +} +[class^="icon-"], +[class*=" icon-"] { + display: inline-block; + width: 14px; + height: 14px; + *margin-right: .3em; + line-height: 14px; + vertical-align: text-top; + background-image: url("../img/glyphicons-halflings.png"); + background-position: 14px 14px; + background-repeat: no-repeat; + margin-top: 1px; +} +/* White icons with optional class, or on hover/active states of certain elements */ +.icon-white, +.nav-pills > .active > a > [class^="icon-"], +.nav-pills > .active > a > [class*=" icon-"], +.nav-list > .active > a > [class^="icon-"], +.nav-list > .active > a > [class*=" icon-"], +.navbar-inverse .nav > .active > a > [class^="icon-"], +.navbar-inverse .nav > .active > a > [class*=" icon-"], +.dropdown-menu > li > a:hover > [class^="icon-"], +.dropdown-menu > li > a:hover > [class*=" icon-"], +.dropdown-menu > .active > a > [class^="icon-"], +.dropdown-menu > .active > a > [class*=" icon-"], +.dropdown-submenu:hover > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"] { + background-image: url("../img/glyphicons-halflings-white.png"); +} +.icon-glass { + background-position: 0 0; +} +.icon-music { + background-position: -24px 0; +} +.icon-search { + background-position: -48px 0; +} +.icon-envelope { + background-position: -72px 0; +} +.icon-heart { + background-position: -96px 0; +} +.icon-star { + background-position: -120px 0; +} +.icon-star-empty { + background-position: -144px 0; +} +.icon-user { + background-position: -168px 0; +} +.icon-film { + background-position: -192px 0; +} +.icon-th-large { + background-position: -216px 0; +} +.icon-th { + background-position: -240px 0; +} +.icon-th-list { + background-position: -264px 0; +} +.icon-ok { + background-position: -288px 0; +} +.icon-remove { + background-position: -312px 0; +} +.icon-zoom-in { + background-position: -336px 0; +} +.icon-zoom-out { + background-position: -360px 0; +} +.icon-off { + background-position: -384px 0; +} +.icon-signal { + background-position: -408px 0; +} +.icon-cog { + background-position: -432px 0; +} +.icon-trash { + background-position: -456px 0; +} +.icon-home { + background-position: 0 -24px; +} +.icon-file { + background-position: -24px -24px; +} +.icon-time { + background-position: -48px -24px; +} +.icon-road { + background-position: -72px -24px; +} +.icon-download-alt { + background-position: -96px -24px; +} +.icon-download { + background-position: -120px -24px; +} +.icon-upload { + background-position: -144px -24px; +} +.icon-inbox { + background-position: -168px -24px; +} +.icon-play-circle { + background-position: -192px -24px; +} +.icon-repeat { + background-position: -216px -24px; +} +.icon-refresh { + background-position: -240px -24px; +} +.icon-list-alt { + background-position: -264px -24px; +} +.icon-lock { + background-position: -287px -24px; +} +.icon-flag { + background-position: -312px -24px; +} +.icon-headphones { + background-position: -336px -24px; +} +.icon-volume-off { + background-position: -360px -24px; +} +.icon-volume-down { + background-position: -384px -24px; +} +.icon-volume-up { + background-position: -408px -24px; +} +.icon-qrcode { + background-position: -432px -24px; +} +.icon-barcode { + background-position: -456px -24px; +} +.icon-tag { + background-position: 0 -48px; +} +.icon-tags { + background-position: -25px -48px; +} +.icon-book { + background-position: -48px -48px; +} +.icon-bookmark { + background-position: -72px -48px; +} +.icon-print { + background-position: -96px -48px; +} +.icon-camera { + background-position: -120px -48px; +} +.icon-font { + background-position: -144px -48px; +} +.icon-bold { + background-position: -167px -48px; +} +.icon-italic { + background-position: -192px -48px; +} +.icon-text-height { + background-position: -216px -48px; +} +.icon-text-width { + background-position: -240px -48px; +} +.icon-align-left { + background-position: -264px -48px; +} +.icon-align-center { + background-position: -288px -48px; +} +.icon-align-right { + background-position: -312px -48px; +} +.icon-align-justify { + background-position: -336px -48px; +} +.icon-list { + background-position: -360px -48px; +} +.icon-indent-left { + background-position: -384px -48px; +} +.icon-indent-right { + background-position: -408px -48px; +} +.icon-facetime-video { + background-position: -432px -48px; +} +.icon-picture { + background-position: -456px -48px; +} +.icon-pencil { + background-position: 0 -72px; +} +.icon-map-marker { + background-position: -24px -72px; +} +.icon-adjust { + background-position: -48px -72px; +} +.icon-tint { + background-position: -72px -72px; +} +.icon-edit { + background-position: -96px -72px; +} +.icon-share { + background-position: -120px -72px; +} +.icon-check { + background-position: -144px -72px; +} +.icon-move { + background-position: -168px -72px; +} +.icon-step-backward { + background-position: -192px -72px; +} +.icon-fast-backward { + background-position: -216px -72px; +} +.icon-backward { + background-position: -240px -72px; +} +.icon-play { + background-position: -264px -72px; +} +.icon-pause { + background-position: -288px -72px; +} +.icon-stop { + background-position: -312px -72px; +} +.icon-forward { + background-position: -336px -72px; +} +.icon-fast-forward { + background-position: -360px -72px; +} +.icon-step-forward { + background-position: -384px -72px; +} +.icon-eject { + background-position: -408px -72px; +} +.icon-chevron-left { + background-position: -432px -72px; +} +.icon-chevron-right { + background-position: -456px -72px; +} +.icon-plus-sign { + background-position: 0 -96px; +} +.icon-minus-sign { + background-position: -24px -96px; +} +.icon-remove-sign { + background-position: -48px -96px; +} +.icon-ok-sign { + background-position: -72px -96px; +} +.icon-question-sign { + background-position: -96px -96px; +} +.icon-info-sign { + background-position: -120px -96px; +} +.icon-screenshot { + background-position: -144px -96px; +} +.icon-remove-circle { + background-position: -168px -96px; +} +.icon-ok-circle { + background-position: -192px -96px; +} +.icon-ban-circle { + background-position: -216px -96px; +} +.icon-arrow-left { + background-position: -240px -96px; +} +.icon-arrow-right { + background-position: -264px -96px; +} +.icon-arrow-up { + background-position: -289px -96px; +} +.icon-arrow-down { + background-position: -312px -96px; +} +.icon-share-alt { + background-position: -336px -96px; +} +.icon-resize-full { + background-position: -360px -96px; +} +.icon-resize-small { + background-position: -384px -96px; +} +.icon-plus { + background-position: -408px -96px; +} +.icon-minus { + background-position: -433px -96px; +} +.icon-asterisk { + background-position: -456px -96px; +} +.icon-exclamation-sign { + background-position: 0 -120px; +} +.icon-gift { + background-position: -24px -120px; +} +.icon-leaf { + background-position: -48px -120px; +} +.icon-fire { + background-position: -72px -120px; +} +.icon-eye-open { + background-position: -96px -120px; +} +.icon-eye-close { + background-position: -120px -120px; +} +.icon-warning-sign { + background-position: -144px -120px; +} +.icon-plane { + background-position: -168px -120px; +} +.icon-calendar { + background-position: -192px -120px; +} +.icon-random { + background-position: -216px -120px; + width: 16px; +} +.icon-comment { + background-position: -240px -120px; +} +.icon-magnet { + background-position: -264px -120px; +} +.icon-chevron-up { + background-position: -288px -120px; +} +.icon-chevron-down { + background-position: -313px -119px; +} +.icon-retweet { + background-position: -336px -120px; +} +.icon-shopping-cart { + background-position: -360px -120px; +} +.icon-folder-close { + background-position: -384px -120px; +} +.icon-folder-open { + background-position: -408px -120px; + width: 16px; +} +.icon-resize-vertical { + background-position: -432px -119px; +} +.icon-resize-horizontal { + background-position: -456px -118px; +} +.icon-hdd { + background-position: 0 -144px; +} +.icon-bullhorn { + background-position: -24px -144px; +} +.icon-bell { + background-position: -48px -144px; } -/* line 485, ../scss/include/_skeleton.scss */ -#jqt ul.edgetoedge li em { +.icon-certificate { + background-position: -72px -144px; +} +.icon-thumbs-up { + background-position: -96px -144px; +} +.icon-thumbs-down { + background-position: -120px -144px; +} +.icon-hand-right { + background-position: -144px -144px; +} +.icon-hand-left { + background-position: -168px -144px; +} +.icon-hand-up { + background-position: -192px -144px; +} +.icon-hand-down { + background-position: -216px -144px; +} +.icon-circle-arrow-right { + background-position: -240px -144px; +} +.icon-circle-arrow-left { + background-position: -264px -144px; +} +.icon-circle-arrow-up { + background-position: -288px -144px; +} +.icon-circle-arrow-down { + background-position: -312px -144px; +} +.icon-globe { + background-position: -336px -144px; +} +.icon-wrench { + background-position: -360px -144px; +} +.icon-tasks { + background-position: -384px -144px; +} +.icon-filter { + background-position: -408px -144px; +} +.icon-briefcase { + background-position: -432px -144px; +} +.icon-fullscreen { + background-position: -456px -144px; +} +.dropup, +.dropdown { + position: relative; +} +.dropdown-toggle { + *margin-bottom: -3px; +} +.dropdown-toggle:active, +.open .dropdown-toggle { + outline: 0; +} +.caret { + display: inline-block; + width: 0; + height: 0; + vertical-align: top; + border-top: 4px solid #000000; + border-right: 4px solid transparent; + border-left: 4px solid transparent; + content: ""; +} +.dropdown .caret { + margin-top: 8px; + margin-left: 2px; +} +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + list-style: none; + background-color: #ffffff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + *border-right-width: 2px; + *border-bottom-width: 2px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} +.dropdown-menu.pull-right { + right: 0; + left: auto; +} +.dropdown-menu .divider { + *width: 100%; + height: 1px; + margin: 9px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} +.dropdown-menu li > a { + display: block; + padding: 3px 20px; + clear: both; font-weight: normal; - font-style: normal; + line-height: 20px; + color: #333333; + white-space: nowrap; } -/* line 494, ../scss/include/_skeleton.scss */ -#jqt ul.plastic { - font-size: 18px; +.dropdown-menu li > a:hover, +.dropdown-menu li > a:focus, +.dropdown-submenu:hover > a { + text-decoration: none; + color: #ffffff; + background-color: #0081c2; + background-image: -moz-linear-gradient(top, #0088cc, #0077b3); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); + background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); + background-image: -o-linear-gradient(top, #0088cc, #0077b3); + background-image: linear-gradient(to bottom, #0088cc, #0077b3); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); +} +.dropdown-menu .active > a, +.dropdown-menu .active > a:hover { + color: #ffffff; + text-decoration: none; + outline: 0; + background-color: #0081c2; + background-image: -moz-linear-gradient(top, #0088cc, #0077b3); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); + background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); + background-image: -o-linear-gradient(top, #0088cc, #0077b3); + background-image: linear-gradient(to bottom, #0088cc, #0077b3); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); +} +.dropdown-menu .disabled > a, +.dropdown-menu .disabled > a:hover { + color: #999999; +} +.dropdown-menu .disabled > a:hover { + text-decoration: none; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + cursor: default; +} +.open { + *z-index: 1000; +} +.open > .dropdown-menu { + display: block; +} +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + border-top: 0; + border-bottom: 4px solid #000000; + content: ""; +} +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 1px; +} +.dropdown-submenu { + position: relative; +} +.dropdown-submenu > .dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + -webkit-border-radius: 0 6px 6px 6px; + -moz-border-radius: 0 6px 6px 6px; + border-radius: 0 6px 6px 6px; +} +.dropdown-submenu:hover > .dropdown-menu { + display: block; +} +.dropup .dropdown-submenu > .dropdown-menu { + top: auto; + bottom: 0; + margin-top: 0; + margin-bottom: -2px; + -webkit-border-radius: 5px 5px 5px 0; + -moz-border-radius: 5px 5px 5px 0; + border-radius: 5px 5px 5px 0; } -/* line 498, ../scss/include/_skeleton.scss */ -#jqt ul.plastic li { - border-width: 1px 0; +.dropdown-submenu > a:after { + display: block; + content: " "; + float: right; + width: 0; + height: 0; + border-color: transparent; border-style: solid; - background-image: none; - background-color: #2a2b2c; - border-top-color: #2f3031; - border-bottom-color: #232324; + border-width: 5px 0 5px 5px; + border-left-color: #cccccc; + margin-top: 5px; + margin-right: -10px; +} +.dropdown-submenu:hover > a:after { + border-left-color: #ffffff; +} +.dropdown-submenu.pull-left { + float: none; +} +.dropdown-submenu.pull-left > .dropdown-menu { + left: -100%; + margin-left: 10px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} +.dropdown .dropdown-menu .nav-header { + padding-left: 20px; + padding-right: 20px; +} +.typeahead { + z-index: 1051; + margin-top: 2px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; } -/* line 506, ../scss/include/_skeleton.scss */ -#jqt ul.plastic li:nth-child(odd) { - background-image: none; - background-color: #2f3031; +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); +} +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, 0.15); +} +.well-large { + padding: 24px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.well-small { + padding: 9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; } -/* line 510, ../scss/include/_skeleton.scss */ -#jqt ul.plastic li a.active.loading { - background-image: url(img/loading.gif); - background-position: 95% center; - background-repeat: no-repeat; +.fade { + opacity: 0; + -webkit-transition: opacity 0.15s linear; + -moz-transition: opacity 0.15s linear; + -o-transition: opacity 0.15s linear; + transition: opacity 0.15s linear; } -/* line 515, ../scss/include/_skeleton.scss */ -#jqt ul.plastic li small { - color: #949698; - font-size: 13px; +.fade.in { + opacity: 1; +} +.collapse { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition: height 0.35s ease; + -moz-transition: height 0.35s ease; + -o-transition: height 0.35s ease; + transition: height 0.35s ease; +} +.collapse.in { + height: auto; +} +.close { + float: right; + font-size: 20px; font-weight: bold; - text-transform: uppercase; + line-height: 20px; + color: #000000; + text-shadow: 0 1px 0 #ffffff; + opacity: 0.2; + filter: alpha(opacity=20); +} +.close:hover { + color: #000000; + text-decoration: none; + cursor: pointer; + opacity: 0.4; + filter: alpha(opacity=40); } -/* line 525, ../scss/include/_skeleton.scss */ -#jqt ul.individual { +button.close { + padding: 0; + cursor: pointer; + background: transparent; border: 0; - background: none; - clear: both; - overflow: hidden; + -webkit-appearance: none; } -/* line 531, ../scss/include/_skeleton.scss */ -#jqt ul.individual li { +.btn { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + padding: 4px 12px; + margin-bottom: 0; font-size: 14px; + line-height: 20px; text-align: center; - -webkit-border-radius: 8px; - border-radius: 8px; + vertical-align: middle; + cursor: pointer; + color: #333333; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e6e6e6; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: 1px solid #bbbbbb; + *border: 0; + border-bottom-color: #a2a2a2; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + *margin-left: .3em; + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); +} +.btn:hover, +.btn:active, +.btn.active, +.btn.disabled, +.btn[disabled] { + color: #333333; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.btn:active, +.btn.active { + background-color: #cccccc \9; +} +.btn:first-child { + *margin-left: 0; +} +.btn:hover { + color: #333333; + text-decoration: none; + background-position: 0 -15px; + -webkit-transition: background-position 0.1s linear; + -moz-transition: background-position 0.1s linear; + -o-transition: background-position 0.1s linear; + transition: background-position 0.1s linear; +} +.btn:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.btn.active, +.btn:active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.disabled, +.btn[disabled] { + cursor: default; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn-large { + padding: 11px 19px; + font-size: 17.5px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.btn-large [class^="icon-"], +.btn-large [class*=" icon-"] { + margin-top: 4px; +} +.btn-small { + padding: 2px 10px; + font-size: 11.9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.btn-small [class^="icon-"], +.btn-small [class*=" icon-"] { + margin-top: 0; +} +.btn-mini [class^="icon-"], +.btn-mini [class*=" icon-"] { + margin-top: -1px; +} +.btn-mini { + padding: 0 6px; + font-size: 10.5px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.btn-block { + display: block; + width: 100%; + padding-left: 0; + padding-right: 0; -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; box-sizing: border-box; - width: 48%; - float: left; +} +.btn-block + .btn-block { + margin-top: 5px; +} +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} +.btn-primary.active, +.btn-warning.active, +.btn-danger.active, +.btn-success.active, +.btn-info.active, +.btn-inverse.active { + color: rgba(255, 255, 255, 0.75); +} +.btn { + border-color: #c5c5c5; + border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); +} +.btn-primary { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #006dcc; + background-image: -moz-linear-gradient(top, #0088cc, #0044cc); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); + background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); + background-image: -o-linear-gradient(top, #0088cc, #0044cc); + background-image: linear-gradient(to bottom, #0088cc, #0044cc); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); + border-color: #0044cc #0044cc #002a80; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #0044cc; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-primary:hover, +.btn-primary:active, +.btn-primary.active, +.btn-primary.disabled, +.btn-primary[disabled] { + color: #ffffff; + background-color: #0044cc; + *background-color: #003bb3; +} +.btn-primary:active, +.btn-primary.active { + background-color: #003399 \9; +} +.btn-warning { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #faa732; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); + border-color: #f89406 #f89406 #ad6704; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #f89406; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-warning:hover, +.btn-warning:active, +.btn-warning.active, +.btn-warning.disabled, +.btn-warning[disabled] { + color: #ffffff; + background-color: #f89406; + *background-color: #df8505; +} +.btn-warning:active, +.btn-warning.active { + background-color: #c67605 \9; +} +.btn-danger { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #da4f49; + background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); + background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); + background-image: linear-gradient(to bottom, #ee5f5b, #bd362f); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0); + border-color: #bd362f #bd362f #802420; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #bd362f; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-danger:hover, +.btn-danger:active, +.btn-danger.active, +.btn-danger.disabled, +.btn-danger[disabled] { + color: #ffffff; + background-color: #bd362f; + *background-color: #a9302a; +} +.btn-danger:active, +.btn-danger.active { + background-color: #942a25 \9; +} +.btn-success { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #5bb75b; + background-image: -moz-linear-gradient(top, #62c462, #51a351); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); + background-image: -webkit-linear-gradient(top, #62c462, #51a351); + background-image: -o-linear-gradient(top, #62c462, #51a351); + background-image: linear-gradient(to bottom, #62c462, #51a351); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0); + border-color: #51a351 #51a351 #387038; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #51a351; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-success:hover, +.btn-success:active, +.btn-success.active, +.btn-success.disabled, +.btn-success[disabled] { + color: #ffffff; + background-color: #51a351; + *background-color: #499249; +} +.btn-success:active, +.btn-success.active { + background-color: #408140 \9; +} +.btn-info { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #49afcd; + background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); + background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); + background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); + background-image: linear-gradient(to bottom, #5bc0de, #2f96b4); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0); + border-color: #2f96b4 #2f96b4 #1f6377; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #2f96b4; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-info:hover, +.btn-info:active, +.btn-info.active, +.btn-info.disabled, +.btn-info[disabled] { + color: #ffffff; + background-color: #2f96b4; + *background-color: #2a85a0; +} +.btn-info:active, +.btn-info.active { + background-color: #24748c \9; +} +.btn-inverse { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #363636; + background-image: -moz-linear-gradient(top, #444444, #222222); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222)); + background-image: -webkit-linear-gradient(top, #444444, #222222); + background-image: -o-linear-gradient(top, #444444, #222222); + background-image: linear-gradient(to bottom, #444444, #222222); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0); + border-color: #222222 #222222 #000000; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #222222; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-inverse:hover, +.btn-inverse:active, +.btn-inverse.active, +.btn-inverse.disabled, +.btn-inverse[disabled] { + color: #ffffff; + background-color: #222222; + *background-color: #151515; +} +.btn-inverse:active, +.btn-inverse.active { + background-color: #080808 \9; +} +button.btn, +input[type="submit"].btn { + *padding-top: 3px; + *padding-bottom: 3px; +} +button.btn::-moz-focus-inner, +input[type="submit"].btn::-moz-focus-inner { + padding: 0; + border: 0; +} +button.btn.btn-large, +input[type="submit"].btn.btn-large { + *padding-top: 7px; + *padding-bottom: 7px; +} +button.btn.btn-small, +input[type="submit"].btn.btn-small { + *padding-top: 3px; + *padding-bottom: 3px; +} +button.btn.btn-mini, +input[type="submit"].btn.btn-mini { + *padding-top: 1px; + *padding-bottom: 1px; +} +.btn-link, +.btn-link:active, +.btn-link[disabled] { + background-color: transparent; + background-image: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn-link { + border-color: transparent; + cursor: pointer; + color: #0088cc; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-link:hover { + color: #005580; + text-decoration: underline; + background-color: transparent; +} +.btn-link[disabled]:hover { + color: #333333; + text-decoration: none; +} +.btn-group { + position: relative; + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + font-size: 0; + vertical-align: middle; + white-space: nowrap; + *margin-left: .3em; +} +.btn-group:first-child { + *margin-left: 0; +} +.btn-group + .btn-group { + margin-left: 5px; +} +.btn-toolbar { + font-size: 0; + margin-top: 10px; + margin-bottom: 10px; +} +.btn-toolbar > .btn + .btn, +.btn-toolbar > .btn-group + .btn, +.btn-toolbar > .btn + .btn-group { + margin-left: 5px; +} +.btn-group > .btn { + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-group > .btn + .btn { + margin-left: -1px; +} +.btn-group > .btn, +.btn-group > .dropdown-menu, +.btn-group > .popover { + font-size: 14px; +} +.btn-group > .btn-mini { + font-size: 10.5px; +} +.btn-group > .btn-small { + font-size: 11.9px; +} +.btn-group > .btn-large { + font-size: 17.5px; +} +.btn-group > .btn:first-child { + margin-left: 0; + -webkit-border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; + border-top-left-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + border-bottom-left-radius: 4px; +} +.btn-group > .btn:last-child, +.btn-group > .dropdown-toggle { + -webkit-border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; + border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -moz-border-radius-bottomright: 4px; + border-bottom-right-radius: 4px; +} +.btn-group > .btn.large:first-child { + margin-left: 0; + -webkit-border-top-left-radius: 6px; + -moz-border-radius-topleft: 6px; + border-top-left-radius: 6px; + -webkit-border-bottom-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + border-bottom-left-radius: 6px; +} +.btn-group > .btn.large:last-child, +.btn-group > .large.dropdown-toggle { + -webkit-border-top-right-radius: 6px; + -moz-border-radius-topright: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + -moz-border-radius-bottomright: 6px; + border-bottom-right-radius: 6px; +} +.btn-group > .btn:hover, +.btn-group > .btn:focus, +.btn-group > .btn:active, +.btn-group > .btn.active { + z-index: 2; +} +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} +.btn-group > .btn + .dropdown-toggle { + padding-left: 8px; + padding-right: 8px; + -webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + *padding-top: 5px; + *padding-bottom: 5px; +} +.btn-group > .btn-mini + .dropdown-toggle { + padding-left: 5px; + padding-right: 5px; + *padding-top: 2px; + *padding-bottom: 2px; +} +.btn-group > .btn-small + .dropdown-toggle { + *padding-top: 5px; + *padding-bottom: 4px; +} +.btn-group > .btn-large + .dropdown-toggle { + padding-left: 12px; + padding-right: 12px; + *padding-top: 7px; + *padding-bottom: 7px; +} +.btn-group.open .dropdown-toggle { + background-image: none; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn-group.open .btn.dropdown-toggle { + background-color: #e6e6e6; +} +.btn-group.open .btn-primary.dropdown-toggle { + background-color: #0044cc; +} +.btn-group.open .btn-warning.dropdown-toggle { + background-color: #f89406; +} +.btn-group.open .btn-danger.dropdown-toggle { + background-color: #bd362f; +} +.btn-group.open .btn-success.dropdown-toggle { + background-color: #51a351; +} +.btn-group.open .btn-info.dropdown-toggle { + background-color: #2f96b4; +} +.btn-group.open .btn-inverse.dropdown-toggle { + background-color: #222222; +} +.btn .caret { + margin-top: 8px; + margin-left: 0; +} +.btn-mini .caret, +.btn-small .caret, +.btn-large .caret { + margin-top: 6px; +} +.btn-large .caret { + border-left-width: 5px; + border-right-width: 5px; + border-top-width: 5px; +} +.dropup .btn-large .caret { + border-bottom-width: 5px; +} +.btn-primary .caret, +.btn-warning .caret, +.btn-danger .caret, +.btn-info .caret, +.btn-success .caret, +.btn-inverse .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.btn-group-vertical { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; +} +.btn-group-vertical > .btn { display: block; - padding: 11px 10px 14px 10px; + float: none; + max-width: 100%; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; } -/* line 541, ../scss/include/_skeleton.scss */ -#jqt ul.individual li + li { - float: right; +.btn-group-vertical > .btn + .btn { + margin-left: 0; + margin-top: -1px; +} +.btn-group-vertical > .btn:first-child { + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} +.btn-group-vertical > .btn:last-child { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} +.btn-group-vertical > .btn-large:first-child { + -webkit-border-radius: 6px 6px 0 0; + -moz-border-radius: 6px 6px 0 0; + border-radius: 6px 6px 0 0; +} +.btn-group-vertical > .btn-large:last-child { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} +.alert { + padding: 8px 35px 8px 14px; + margin-bottom: 20px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + background-color: #fcf8e3; + border: 1px solid #fbeed5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.alert, +.alert h4 { + color: #c09853; +} +.alert h4 { + margin: 0; } -/* line 546, ../scss/include/_skeleton.scss */ -#jqt ul.individual a { - line-height: 16px; - margin: -11px -10px -14px -10px; - padding: 11px 10px 14px 10px; - -webkit-border-radius: 8px; - border-radius: 8px; -} -/* line 555, ../scss/include/_skeleton.scss */ -#jqt .toggle { - width: 94px; +.alert .close { position: relative; - height: 27px; + top: -2px; + right: -21px; + line-height: 20px; +} +.alert-success { + background-color: #dff0d8; + border-color: #d6e9c6; + color: #468847; +} +.alert-success h4 { + color: #468847; +} +.alert-danger, +.alert-error { + background-color: #f2dede; + border-color: #eed3d7; + color: #b94a48; +} +.alert-danger h4, +.alert-error h4 { + color: #b94a48; +} +.alert-info { + background-color: #d9edf7; + border-color: #bce8f1; + color: #3a87ad; +} +.alert-info h4 { + color: #3a87ad; +} +.alert-block { + padding-top: 14px; + padding-bottom: 14px; +} +.alert-block > p, +.alert-block > ul { + margin-bottom: 0; +} +.alert-block p + p { + margin-top: 5px; +} +.nav { + margin-left: 0; + margin-bottom: 20px; + list-style: none; +} +.nav > li > a { display: block; - overflow: hidden; +} +.nav > li > a:hover { + text-decoration: none; + background-color: #eeeeee; +} +.nav > li > a > img { + max-width: none; +} +.nav > .pull-right { float: right; } -/* line 563, ../scss/include/_skeleton.scss */ -#jqt .toggle input[type="checkbox"] { - margin: 0; - -webkit-border-radius: 5px; - border-radius: 5px; - height: 27px; +.nav-header { + display: block; + padding: 3px 15px; + font-size: 11px; + font-weight: bold; + line-height: 20px; + color: #999999; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + text-transform: uppercase; +} +.nav li + .nav-header { + margin-top: 9px; +} +.nav-list { + padding-left: 15px; + padding-right: 15px; + margin-bottom: 0; +} +.nav-list > li > a, +.nav-list .nav-header { + margin-left: -15px; + margin-right: -15px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); +} +.nav-list > li > a { + padding: 3px 15px; +} +.nav-list > .active > a, +.nav-list > .active > a:hover { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); + background-color: #0088cc; +} +.nav-list [class^="icon-"], +.nav-list [class*=" icon-"] { + margin-right: 2px; +} +.nav-list .divider { + *width: 100%; + height: 1px; + margin: 9px 1px; + *margin: -5px 0 5px; overflow: hidden; - width: 149px; - border: 0; - -webkit-transition: left 0.15s ease-in-out; - transition: left 0.15s ease-in-out; - position: absolute; - top: 0; - left: -55px; - -webkit-appearance: textarea; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} +.nav-tabs, +.nav-pills { + *zoom: 1; +} +.nav-tabs:before, +.nav-pills:before, +.nav-tabs:after, +.nav-pills:after { + display: table; + content: ""; + line-height: 0; } -/* line 577, ../scss/include/_skeleton.scss */ -#jqt .toggle input[type="checkbox"]:checked { - left: 0px; +.nav-tabs:after, +.nav-pills:after { + clear: both; } -/* line 583, ../scss/include/_skeleton.scss */ -#jqt .info { - font-size: 12px; - line-height: 16px; - text-align: center; - color: #444; - padding: 15px; - font-weight: bold; +.nav-tabs > li, +.nav-pills > li { + float: left; } -/* line 12, ../scss/jqtouch.scss */ -#jqt { - /* Lists */ - +.nav-tabs > li > a, +.nav-pills > li > a { + padding-right: 12px; + padding-left: 12px; + margin-right: 2px; + line-height: 14px; } -/* line 13, ../scss/jqtouch.scss */ -#jqt > * { - background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Sr0XzcLmZHWlpLsaBodAEAWsLN56+nPRhhzrfqIILl5ShQGI71b4YSqXn2gOBh2grYtuMeNUpd021ll6V+cLpYXzo/Qm0tFJe31dZaVYx7jFtaBrzPYWy3oR9mrxfm+paFC8PDhk5tcLF3UMeywdZVGtFsCtRqz1uI5k3leW6+5yYzgF8fvQw0VsQawZz7NDkQqID7Q9R46cD/+bdQWWN64DXyGXVtDoxckhopbUTG3+TZov439ZHGGFo4l9MC4o0dgtDhgaU0P7sjflnSF/y3sH8Y95s1PFXeWeH+Y6Qgz59xmQ3q3IivM6b771tNzIHcPhqGfuHc1Pj4IdKIhmkAKLbSmat2BMfLJ9mT+mKoUeCvSgbScvYlOWzU8s6npf1NaSGW9VQvJASsWmj97UtDmKWkG+O2bDsxv2GZZq9GeJZb3YHWHmYtTc9v2aNwa7V8GPfz7BTbGsRb52efs4dgaTGpm/9p914mnBO4Ca7/4XObmWGxH6h4veAFs5PbJ4srmD8lGWPlEMUf7B2aSl4Xr4bilE53mQ2A83tnG0AfF3rL/tRlvtneyg23kwNiOHLcu0wHJKXYLHGtZyNNlapg7e1INy0CMEVEWoKAbda2Alh5yf3ZBQ2QNsApTvHJAzIPghthTI72YvRPmiolnWZxt51VAfGM6ITwRHi+LfER1zmyQzEw09RfMvQ/bwW2EDwFbhEAAAAASUVORK5CYII='), -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #7b7c7f), color-stop(30%, #696a6d), color-stop(65%, #555658), color-stop(100%, #464748)); - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAAUyUlEQVR4nFVZB5jU5Nb+ksxkkpnMZCgXpIuiIL1IURCW3ouAV5ByryCIFJUuTUQp0uXSlqqAuiILy9IEBOlVOlylCawgIFImM5lJMpkk9823w/r/8zw7Sb5yynvec76TWZYQQSBE8pL053Of+x1k3e9G4VVyc5L0R5jF/nYeUvD5RZT9hGR4/x7Jk/Kvy8OEDA61oU+7OUKahf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flnSF/y3sH8Y95s1PFXeWeH+Y6Qgz59xmQ3q3IivM6b771tNzIHcPhqGfuHc1Pj4IdKIhmkAKLbSmat2BMfLJ9mT+mKoUeCvSgbScvYlOWzU8s6npf1NaSGW9VQvJASsWmj97UtDmKWkG+O2bDsxv2GZZq9GeJZb3YHWHmYtTc9v2aNwa7V8GPfz7BTbGsRb52efs4dgaTGpm/9p914mnBO4Ca7/4XObmWGxH6h4veAFs5PbJ4srmD8lGWPlEMUf7B2aSl4Xr4bilE53mQ2A83tnG0AfF3rL/tRlvtneyg23kwNiOHLcu0wHJKXYLHGtZyNNlapg7e1INy0CMEVEWoKAbda2Alh5yf3ZBQ2QNsApTvHJAzIPghthTI72YvRPmiolnWZxt51VAfGM6ITwRHi+LfER1zmyQzEw09RfMvQ/bwW2EDwFbhEAAAAASUVORK5CYII='), -webkit-linear-gradient(top, #7b7c7f, #696a6d 30%, #555658 65%, #464748); - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAAUyUlEQVR4nFVZB5jU5Nb+ksxkkpnMZCgXpIuiIL1IURCW3ouAV5ByryCIFJUuTUQp0uXSlqqAuiILy9IEBOlVOlylCawgIFImM5lJMpkk9823w/r/8zw7Sb5yynvec76TWZYQQSBE8pL053Of+x1k3e9G4VVyc5L0R5jF/nYeUvD5RZT9hGR4/x7Jk/Kvy8OEDA61oU+7OUKahfPHm3sb0dU1mKc7WEHW9WZENQn5iWkenOdtliJkhLyFKj4cqc3oHj4RdoYkqjt/q6msDTKq+/ebE72tgu7z+6E9ZiPuLEQPjBDSLZlQ74UIOQLjmpgKVbXXnAeHLntuCcHw6/wRMt7P6koTrphMyJ1AM2dvbIRZzyJkiPGs310+OqQkjqTylfWG2DNUzVDctbYvJAiZau6OEcKT/0SH2oetWuZ93z3JJiX0g+QYmxmYgrmD2sQ0Fr9ifX1L0WIR4m9Ipifg2QHruE5I6XgaAow8r5ePlvLJgcVWRtIdGw7QbuHuUao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Lcu0wHJKXYLHGtZyNNlapg7e1INy0CMEVEWoKAbda2Alh5yf3ZBQ2QNsApTvHJAzIPghthTI72YvRPmiolnWZxt51VAfGM6ITwRHi+LfER1zmyQzEw09RfMvQ/bwW2EDwFbhEAAAAASUVORK5CYII='), linear-gradient(top, #7b7c7f, #696a6d 30%, #555658 65%, #464748); -} -/* line 20, ../scss/jqtouch.scss */ -#jqt .toolbar { - background-image: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 12.5, color-stop(12.5%, #181819), color-stop(12.5%, rgba(11, 11, 12, 0))), -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 12.5, color-stop(12.5%, #181819), color-stop(12.5%, rgba(11, 11, 12, 0))), -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 12.5, color-stop(12.5%, rgba(255, 255, 255, 0.1)), color-stop(12.5%, rgba(255, 255, 255, 0))), -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 12.5, color-stop(12.5%, rgba(255, 255, 255, 0.1)), color-stop(12.5%, rgba(255, 255, 255, 0))); - background-image: -webkit-radial-gradient(#181819 12.5%, rgba(11, 11, 12, 0) 12.5%), -webkit-radial-gradient(#181819 12.5%, rgba(11, 11, 12, 0) 12.5%), -webkit-radial-gradient(rgba(255, 255, 255, 0.1) 12.5%, rgba(255, 255, 255, 0) 12.5%), -webkit-radial-gradient(rgba(255, 255, 255, 0.1) 12.5%, rgba(255, 255, 255, 0) 12.5%); - background-image: radial-gradient(#181819 12.5%, rgba(11, 11, 12, 0) 12.5%), radial-gradient(#181819 12.5%, rgba(11, 11, 12, 0) 12.5%), radial-gradient(rgba(255, 255, 255, 0.1) 12.5%, rgba(255, 255, 255, 0) 12.5%), radial-gradient(rgba(255, 255, 255, 0.1) 12.5%, rgba(255, 255, 255, 0) 12.5%); - background-repeat: repeat; - background-position: 0 0, 8px 8px, 0 1px, 8px 9px; - background-color: #2f3031; - background-size: 16px 16px; -} -/* line 29, ../scss/jqtouch.scss */ -#jqt ul li { - border-top: 1px solid #48494b; - background-image: none; - background-color: rgba(85, 86, 88, 0.2); - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(123, 124, 127, 0.2)), color-stop(3%, rgba(98, 99, 101, 0.2)), color-stop(100%, rgba(72, 73, 75, 0.2))); - background-image: -webkit-linear-gradient(top, rgba(123, 124, 127, 0.2), rgba(98, 99, 101, 0.2) 3%, rgba(72, 73, 75, 0.2)); - background-image: linear-gradient(top, rgba(123, 124, 127, 0.2), rgba(98, 99, 101, 0.2) 3%, rgba(72, 73, 75, 0.2)); -} -/* line 33, ../scss/jqtouch.scss */ -#jqt ul li a { - color: white; - text-shadow: #3c3d3e 0 -1px 0; -} -/* line 37, ../scss/jqtouch.scss */ -#jqt ul li .toggle input[type="checkbox"] { +.nav-tabs { + border-bottom: 1px solid #ddd; +} +.nav-tabs > li { + margin-bottom: -1px; +} +.nav-tabs > li > a { + padding-top: 8px; + padding-bottom: 8px; + line-height: 20px; + border: 1px solid transparent; + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} +.nav-tabs > li > a:hover { + border-color: #eeeeee #eeeeee #dddddd; +} +.nav-tabs > .active > a, +.nav-tabs > .active > a:hover { + color: #555555; + background-color: #ffffff; + border: 1px solid #ddd; + border-bottom-color: transparent; + cursor: default; +} +.nav-pills > li > a { + padding-top: 8px; + padding-bottom: 8px; + margin-top: 2px; + margin-bottom: 2px; -webkit-border-radius: 5px; + -moz-border-radius: 5px; border-radius: 5px; - background: #ffffff url(../img/jqt/on_off.png) 0 0 no-repeat; } -/* line 42, ../scss/jqtouch.scss */ -#jqt ul li input[type='submit'] { - background-image: none; - background-color: white; - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(50%, #ffffff), color-stop(51%, #ffffff), color-stop(100%, #f2f2f2)); - background-image: -webkit-linear-gradient(top, #ffffff, #ffffff 50%, #ffffff 51%, #f2f2f2); - background-image: linear-gradient(top, #ffffff, #ffffff 50%, #ffffff 51%, #f2f2f2); - border: 1px outset black; -} -/* line 47, ../scss/jqtouch.scss */ -#jqt ul li small.counter { - -webkit-box-shadow: rgba(255, 255, 255, 0.1) 0 1px 0; - box-shadow: rgba(255, 255, 255, 0.1) 0 1px 0; -} -/* line 54, ../scss/jqtouch.scss */ -#jqt ul.metal li { - background-image: none; - border-top: 1px solid #fff; - border-bottom: 1px solid #666; - background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#eeeeee), to(#9c9ea0)); +.nav-pills > .active > a, +.nav-pills > .active > a:hover { + color: #ffffff; + background-color: #0088cc; } -/* line 60, ../scss/jqtouch.scss */ -#jqt ul.metal li a { - text-shadow: #fff 0 1px 0; +.nav-stacked > li { + float: none; } -/* line 62, ../scss/jqtouch.scss */ -#jqt ul.metal li a.active { - color: #000; +.nav-stacked > li > a { + margin-right: 0; } -/* line 65, ../scss/jqtouch.scss */ -#jqt ul.metal li em { - color: #444; +.nav-tabs.nav-stacked { + border-bottom: 0; } -/* line 71, ../scss/jqtouch.scss */ -#jqt ul.edgetoedge li { - background-image: none; - background-color: #3c3d3e; - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #282829), color-stop(100%, #2f3031)); - background-image: -webkit-linear-gradient(top, #282829, #2f3031); - background-image: linear-gradient(top, #282829, #2f3031); - border-bottom: 1px solid #1e1e1f; - border-top: 1px solid #343536; -} -/* line 76, ../scss/jqtouch.scss */ -#jqt ul.edgetoedge li.sep { - background-image: none; - background-color: rgba(0, 0, 0, 0.3); - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(38, 38, 38, 0.3)), color-stop(30%, rgba(20, 20, 20, 0.3)), color-stop(65%, rgba(0, 0, 0, 0.3)), color-stop(100%, rgba(0, 0, 0, 0.3))); - background-image: -webkit-linear-gradient(top, rgba(38, 38, 38, 0.3), rgba(20, 20, 20, 0.3) 30%, rgba(0, 0, 0, 0.3) 65%, rgba(0, 0, 0, 0.3)); - background-image: linear-gradient(top, rgba(38, 38, 38, 0.3), rgba(20, 20, 20, 0.3) 30%, rgba(0, 0, 0, 0.3) 65%, rgba(0, 0, 0, 0.3)); - color: #949698; - text-shadow: #000000 0 -1px 0; -} -/* line 83, ../scss/jqtouch.scss */ -#jqt .info { - background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#cccccc), to(#aaaaaa), color-stop(0.6, #cccccc)); - text-shadow: rgba(255, 255, 255, 0.8) 0 1px 0; - color: #444; - border-top: 1px solid rgba(255, 255, 255, 0.2); +.nav-tabs.nav-stacked > li > a { + border: 1px solid #ddd; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; } -div.spinner { +.nav-tabs.nav-stacked > li:first-child > a { + -webkit-border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; + border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; + border-top-left-radius: 4px; +} +.nav-tabs.nav-stacked > li:last-child > a { + -webkit-border-bottom-right-radius: 4px; + -moz-border-radius-bottomright: 4px; + border-bottom-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + border-bottom-left-radius: 4px; +} +.nav-tabs.nav-stacked > li > a:hover { + border-color: #ddd; + z-index: 2; +} +.nav-pills.nav-stacked > li > a { + margin-bottom: 3px; +} +.nav-pills.nav-stacked > li:last-child > a { + margin-bottom: 1px; +} +.nav-tabs .dropdown-menu { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} +.nav-pills .dropdown-menu { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.nav .dropdown-toggle .caret { + border-top-color: #0088cc; + border-bottom-color: #0088cc; + margin-top: 6px; +} +.nav .dropdown-toggle:hover .caret { + border-top-color: #005580; + border-bottom-color: #005580; +} +/* move down carets for tabs */ +.nav-tabs .dropdown-toggle .caret { + margin-top: 8px; +} +.nav .active .dropdown-toggle .caret { + border-top-color: #fff; + border-bottom-color: #fff; +} +.nav-tabs .active .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} +.nav > .dropdown.active > a:hover { + cursor: pointer; +} +.nav-tabs .open .dropdown-toggle, +.nav-pills .open .dropdown-toggle, +.nav > li.dropdown.open.active > a:hover { + color: #ffffff; + background-color: #999999; + border-color: #999999; +} +.nav li.dropdown.open .caret, +.nav li.dropdown.open.active .caret, +.nav li.dropdown.open a:hover .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; + opacity: 1; + filter: alpha(opacity=100); +} +.tabs-stacked .open > a:hover { + border-color: #999999; +} +.tabbable { + *zoom: 1; +} +.tabbable:before, +.tabbable:after { + display: table; + content: ""; + line-height: 0; +} +.tabbable:after { + clear: both; +} +.tab-content { + overflow: auto; +} +.tabs-below > .nav-tabs, +.tabs-right > .nav-tabs, +.tabs-left > .nav-tabs { + border-bottom: 0; +} +.tab-content > .tab-pane, +.pill-content > .pill-pane { + display: none; +} +.tab-content > .active, +.pill-content > .active { + display: block; +} +.tabs-below > .nav-tabs { + border-top: 1px solid #ddd; +} +.tabs-below > .nav-tabs > li { + margin-top: -1px; + margin-bottom: 0; +} +.tabs-below > .nav-tabs > li > a { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} +.tabs-below > .nav-tabs > li > a:hover { + border-bottom-color: transparent; + border-top-color: #ddd; +} +.tabs-below > .nav-tabs > .active > a, +.tabs-below > .nav-tabs > .active > a:hover { + border-color: transparent #ddd #ddd #ddd; +} +.tabs-left > .nav-tabs > li, +.tabs-right > .nav-tabs > li { + float: none; +} +.tabs-left > .nav-tabs > li > a, +.tabs-right > .nav-tabs > li > a { + min-width: 74px; + margin-right: 0; + margin-bottom: 3px; +} +.tabs-left > .nav-tabs { + float: left; + margin-right: 19px; + border-right: 1px solid #ddd; +} +.tabs-left > .nav-tabs > li > a { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.tabs-left > .nav-tabs > li > a:hover { + border-color: #eeeeee #dddddd #eeeeee #eeeeee; +} +.tabs-left > .nav-tabs .active > a, +.tabs-left > .nav-tabs .active > a:hover { + border-color: #ddd transparent #ddd #ddd; + *border-right-color: #ffffff; +} +.tabs-right > .nav-tabs { + float: right; + margin-left: 19px; + border-left: 1px solid #ddd; +} +.tabs-right > .nav-tabs > li > a { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.tabs-right > .nav-tabs > li > a:hover { + border-color: #eeeeee #eeeeee #eeeeee #dddddd; +} +.tabs-right > .nav-tabs .active > a, +.tabs-right > .nav-tabs .active > a:hover { + border-color: #ddd #ddd #ddd transparent; + *border-left-color: #ffffff; +} +.nav > .disabled > a { + color: #999999; +} +.nav > .disabled > a:hover { + text-decoration: none; + background-color: transparent; + cursor: default; +} +.navbar { + overflow: visible; + margin-bottom: 20px; + *position: relative; + *z-index: 2; +} +.navbar-inner { + min-height: 40px; + padding-left: 20px; + padding-right: 20px; + background-color: #fafafa; + background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2)); + background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -o-linear-gradient(top, #ffffff, #f2f2f2); + background-image: linear-gradient(to bottom, #ffffff, #f2f2f2); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); + border: 1px solid #d4d4d4; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + *zoom: 1; +} +.navbar-inner:before, +.navbar-inner:after { + display: table; + content: ""; + line-height: 0; +} +.navbar-inner:after { + clear: both; +} +.navbar .container { + width: auto; +} +.nav-collapse.collapse { + height: auto; + overflow: visible; +} +.navbar .brand { + float: left; + display: block; + padding: 10px 20px 10px; + margin-left: -20px; + font-size: 20px; + font-weight: 200; + color: #777777; + text-shadow: 0 1px 0 #ffffff; +} +.navbar .brand:hover { + text-decoration: none; +} +.navbar-text { + margin-bottom: 0; + line-height: 40px; + color: #777777; +} +.navbar-link { + color: #777777; +} +.navbar-link:hover { + color: #333333; +} +.navbar .divider-vertical { + height: 40px; + margin: 0 9px; + border-left: 1px solid #f2f2f2; + border-right: 1px solid #ffffff; +} +.navbar .btn, +.navbar .btn-group { + margin-top: 5px; +} +.navbar .btn-group .btn, +.navbar .input-prepend .btn, +.navbar .input-append .btn { + margin-top: 0; +} +.navbar-form { + margin-bottom: 0; + *zoom: 1; +} +.navbar-form:before, +.navbar-form:after { + display: table; + content: ""; + line-height: 0; +} +.navbar-form:after { + clear: both; +} +.navbar-form input, +.navbar-form select, +.navbar-form .radio, +.navbar-form .checkbox { + margin-top: 5px; +} +.navbar-form input, +.navbar-form select, +.navbar-form .btn { + display: inline-block; + margin-bottom: 0; +} +.navbar-form input[type="image"], +.navbar-form input[type="checkbox"], +.navbar-form input[type="radio"] { + margin-top: 3px; +} +.navbar-form .input-append, +.navbar-form .input-prepend { + margin-top: 5px; + white-space: nowrap; +} +.navbar-form .input-append input, +.navbar-form .input-prepend input { + margin-top: 0; +} +.navbar-search { position: relative; - width: 100px; - height: 100px; + float: left; + margin-top: 5px; + margin-bottom: 0; +} +.navbar-search .search-query { + margin-bottom: 0; + padding: 4px 14px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + font-weight: normal; + line-height: 1; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +.navbar-static-top { + position: static; + margin-bottom: 0; +} +.navbar-static-top .navbar-inner { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: 1030; + margin-bottom: 0; +} +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + border-width: 0 0 1px; +} +.navbar-fixed-bottom .navbar-inner { + border-width: 1px 0 0; +} +.navbar-fixed-top .navbar-inner, +.navbar-fixed-bottom .navbar-inner { + padding-left: 0; + padding-right: 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 940px; +} +.navbar-fixed-top { + top: 0; +} +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + -webkit-box-shadow: 0 1px 10px rgba(0,0,0,.1); + -moz-box-shadow: 0 1px 10px rgba(0,0,0,.1); + box-shadow: 0 1px 10px rgba(0,0,0,.1); +} +.navbar-fixed-bottom { + bottom: 0; +} +.navbar-fixed-bottom .navbar-inner { + -webkit-box-shadow: 0 -1px 10px rgba(0,0,0,.1); + -moz-box-shadow: 0 -1px 10px rgba(0,0,0,.1); + box-shadow: 0 -1px 10px rgba(0,0,0,.1); +} +.navbar .nav { + position: relative; + left: 0; + display: block; + float: left; + margin: 0 10px 0 0; +} +.navbar .nav.pull-right { + float: right; + margin-right: 0; +} +.navbar .nav > li { + float: left; +} +.navbar .nav > li > a { + float: none; + padding: 10px 15px 10px; + color: #777777; + text-decoration: none; + text-shadow: 0 1px 0 #ffffff; +} +.navbar .nav .dropdown-toggle .caret { + margin-top: 8px; +} +.navbar .nav > li > a:focus, +.navbar .nav > li > a:hover { + background-color: transparent; + color: #333333; + text-decoration: none; +} +.navbar .nav > .active > a, +.navbar .nav > .active > a:hover, +.navbar .nav > .active > a:focus { + color: #555555; + text-decoration: none; + background-color: #e5e5e5; + -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); +} +.navbar .btn-navbar { + display: none; + float: right; + padding: 7px 10px; + margin-left: 5px; + margin-right: 5px; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #ededed; + background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5)); + background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); + border-color: #e5e5e5 #e5e5e5 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e5e5e5; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); + box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); +} +.navbar .btn-navbar:hover, +.navbar .btn-navbar:active, +.navbar .btn-navbar.active, +.navbar .btn-navbar.disabled, +.navbar .btn-navbar[disabled] { + color: #ffffff; + background-color: #e5e5e5; + *background-color: #d9d9d9; +} +.navbar .btn-navbar:active, +.navbar .btn-navbar.active { + background-color: #cccccc \9; +} +.navbar .btn-navbar .icon-bar { + display: block; + width: 18px; + height: 2px; + background-color: #f5f5f5; + -webkit-border-radius: 1px; + -moz-border-radius: 1px; + border-radius: 1px; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); +} +.btn-navbar .icon-bar + .icon-bar { + margin-top: 3px; +} +.navbar .nav > li > .dropdown-menu:before { + content: ''; display: inline-block; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-bottom-color: rgba(0, 0, 0, 0.2); + position: absolute; + top: -7px; + left: 9px; } -div.spinner div { - width: 12%; - height: 26%; - background: #000; +.navbar .nav > li > .dropdown-menu:after { + content: ''; + display: inline-block; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; position: absolute; - left: 44.5%; - top: 37%; - opacity: 0; - -webkit-animation: fade 1s linear infinite; - -webkit-border-radius: 50px; - -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.2); + top: -6px; + left: 10px; +} +.navbar-fixed-bottom .nav > li > .dropdown-menu:before { + border-top: 7px solid #ccc; + border-top-color: rgba(0, 0, 0, 0.2); + border-bottom: 0; + bottom: -7px; + top: auto; +} +.navbar-fixed-bottom .nav > li > .dropdown-menu:after { + border-top: 6px solid #ffffff; + border-bottom: 0; + bottom: -6px; + top: auto; +} +.navbar .nav li.dropdown > a:hover .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} +.navbar .nav li.dropdown.open > .dropdown-toggle, +.navbar .nav li.dropdown.active > .dropdown-toggle, +.navbar .nav li.dropdown.open.active > .dropdown-toggle { + background-color: #e5e5e5; + color: #555555; +} +.navbar .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #777777; + border-bottom-color: #777777; +} +.navbar .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} +.navbar .pull-right > li > .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right { + left: auto; + right: 0; } -div.spinner div.bar01 { - -webkit-transform: rotate(0deg) translate(0, -142%); - -webkit-animation-delay: 0s; +.navbar .pull-right > li > .dropdown-menu:before, +.navbar .nav > li > .dropdown-menu.pull-right:before { + left: auto; + right: 12px; +} +.navbar .pull-right > li > .dropdown-menu:after, +.navbar .nav > li > .dropdown-menu.pull-right:after { + left: auto; + right: 13px; +} +.navbar .pull-right > li > .dropdown-menu .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu { + left: auto; + right: 100%; + margin-left: 0; + margin-right: -1px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} +.navbar-inverse .navbar-inner { + background-color: #1b1b1b; + background-image: -moz-linear-gradient(top, #222222, #111111); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111)); + background-image: -webkit-linear-gradient(top, #222222, #111111); + background-image: -o-linear-gradient(top, #222222, #111111); + background-image: linear-gradient(to bottom, #222222, #111111); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); + border-color: #252525; +} +.navbar-inverse .brand, +.navbar-inverse .nav > li > a { + color: #999999; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.navbar-inverse .brand:hover, +.navbar-inverse .nav > li > a:hover { + color: #ffffff; +} +.navbar-inverse .brand { + color: #999999; +} +.navbar-inverse .navbar-text { + color: #999999; +} +.navbar-inverse .nav > li > a:focus, +.navbar-inverse .nav > li > a:hover { + background-color: transparent; + color: #ffffff; +} +.navbar-inverse .nav .active > a, +.navbar-inverse .nav .active > a:hover, +.navbar-inverse .nav .active > a:focus { + color: #ffffff; + background-color: #111111; +} +.navbar-inverse .navbar-link { + color: #999999; +} +.navbar-inverse .navbar-link:hover { + color: #ffffff; +} +.navbar-inverse .divider-vertical { + border-left-color: #111111; + border-right-color: #222222; +} +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle { + background-color: #111111; + color: #ffffff; +} +.navbar-inverse .nav li.dropdown > a:hover .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #999999; + border-bottom-color: #999999; +} +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.navbar-inverse .navbar-search .search-query { + color: #ffffff; + background-color: #515151; + border-color: #111111; + -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); + -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); + box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none; +} +.navbar-inverse .navbar-search .search-query:-moz-placeholder { + color: #cccccc; +} +.navbar-inverse .navbar-search .search-query:-ms-input-placeholder { + color: #cccccc; +} +.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder { + color: #cccccc; +} +.navbar-inverse .navbar-search .search-query:focus, +.navbar-inverse .navbar-search .search-query.focused { + padding: 5px 15px; + color: #333333; + text-shadow: 0 1px 0 #ffffff; + background-color: #ffffff; + border: 0; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + outline: 0; +} +.navbar-inverse .btn-navbar { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e0e0e; + background-image: -moz-linear-gradient(top, #151515, #040404); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); + background-image: -webkit-linear-gradient(top, #151515, #040404); + background-image: -o-linear-gradient(top, #151515, #040404); + background-image: linear-gradient(to bottom, #151515, #040404); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); + border-color: #040404 #040404 #000000; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #040404; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.navbar-inverse .btn-navbar:hover, +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active, +.navbar-inverse .btn-navbar.disabled, +.navbar-inverse .btn-navbar[disabled] { + color: #ffffff; + background-color: #040404; + *background-color: #000000; +} +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active { + background-color: #000000 \9; +} +.breadcrumb { + padding: 8px 15px; + margin: 0 0 20px; + list-style: none; + background-color: #f5f5f5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; } -div.spinner div.bar02 { - -webkit-transform: rotate(30deg) translate(0, -142%); - -webkit-animation-delay: -0.9167s; +.breadcrumb > li { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + text-shadow: 0 1px 0 #ffffff; } -div.spinner div.bar03 { - -webkit-transform: rotate(60deg) translate(0, -142%); - -webkit-animation-delay: -0.833s; +.breadcrumb > li > .divider { + padding: 0 5px; + color: #ccc; } -div.spinner div.bar04 { - -webkit-transform: rotate(90deg) translate(0, -142%); - -webkit-animation-delay: -0.75s; +.breadcrumb > .active { + color: #999999; } -div.spinner div.bar05 { - -webkit-transform: rotate(120deg) translate(0, -142%); - -webkit-animation-delay: -0.667s; +.pagination { + margin: 20px 0; } -div.spinner div.bar06 { - -webkit-transform: rotate(150deg) translate(0, -142%); - -webkit-animation-delay: -0.5833s; +.pagination ul { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + margin-left: 0; + margin-bottom: 0; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); } -div.spinner div.bar07 { - -webkit-transform: rotate(180deg) translate(0, -142%); - -webkit-animation-delay: -0.5s; +.pagination ul > li { + display: inline; } -div.spinner div.bar08 { - -webkit-transform: rotate(210deg) translate(0, -142%); - -webkit-animation-delay: -0.41667s; +.pagination ul > li > a, +.pagination ul > li > span { + float: left; + padding: 4px 12px; + line-height: 20px; + text-decoration: none; + background-color: #ffffff; + border: 1px solid #dddddd; + border-left-width: 0; +} +.pagination ul > li > a:hover, +.pagination ul > .active > a, +.pagination ul > .active > span { + background-color: #f5f5f5; +} +.pagination ul > .active > a, +.pagination ul > .active > span { + color: #999999; + cursor: default; +} +.pagination ul > .disabled > span, +.pagination ul > .disabled > a, +.pagination ul > .disabled > a:hover { + color: #999999; + background-color: transparent; + cursor: default; +} +.pagination ul > li:first-child > a, +.pagination ul > li:first-child > span { + border-left-width: 1px; + -webkit-border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; + border-top-left-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + border-bottom-left-radius: 4px; +} +.pagination ul > li:last-child > a, +.pagination ul > li:last-child > span { + -webkit-border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; + border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -moz-border-radius-bottomright: 4px; + border-bottom-right-radius: 4px; +} +.pagination-centered { + text-align: center; } -div.spinner div.bar09 { - -webkit-transform: rotate(240deg) translate(0, -142%); - -webkit-animation-delay: -0.333s; +.pagination-right { + text-align: right; } -div.spinner div.bar10 { - -webkit-transform: rotate(270deg) translate(0, -142%); - -webkit-animation-delay: -0.25s; +.pagination-large ul > li > a, +.pagination-large ul > li > span { + padding: 11px 19px; + font-size: 17.5px; +} +.pagination-large ul > li:first-child > a, +.pagination-large ul > li:first-child > span { + -webkit-border-top-left-radius: 6px; + -moz-border-radius-topleft: 6px; + border-top-left-radius: 6px; + -webkit-border-bottom-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + border-bottom-left-radius: 6px; +} +.pagination-large ul > li:last-child > a, +.pagination-large ul > li:last-child > span { + -webkit-border-top-right-radius: 6px; + -moz-border-radius-topright: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + -moz-border-radius-bottomright: 6px; + border-bottom-right-radius: 6px; +} +.pagination-mini ul > li:first-child > a, +.pagination-small ul > li:first-child > a, +.pagination-mini ul > li:first-child > span, +.pagination-small ul > li:first-child > span { + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + border-bottom-left-radius: 3px; +} +.pagination-mini ul > li:last-child > a, +.pagination-small ul > li:last-child > a, +.pagination-mini ul > li:last-child > span, +.pagination-small ul > li:last-child > span { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.pagination-small ul > li > a, +.pagination-small ul > li > span { + padding: 2px 10px; + font-size: 11.9px; } -div.spinner div.bar11 { - -webkit-transform: rotate(300deg) translate(0, -142%); - -webkit-animation-delay: -0.1667s; +.pagination-mini ul > li > a, +.pagination-mini ul > li > span { + padding: 0 6px; + font-size: 10.5px; } -div.spinner div.bar12 { - -webkit-transform: rotate(330deg) translate(0, -142%); - -webkit-animation-delay: -0.0833s; +.pager { + margin: 20px 0; + list-style: none; + text-align: center; + *zoom: 1; } -@-webkit-keyframes fade { - from { - opacity: 1; - } - to { - opacity: 0.25; - } +.pager:before, +.pager:after { + display: table; + content: ""; + line-height: 0; } -/* +.pager:after { + clear: both; +} +.pager li { + display: inline; +} +.pager li > a, +.pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +.pager li > a:hover { + text-decoration: none; + background-color: #f5f5f5; +} +.pager .next > a, +.pager .next > span { + float: right; +} +.pager .previous > a, +.pager .previous > span { + float: left; +} +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > span { + color: #999999; + background-color: #fff; + cursor: default; +} +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000000; +} +.modal-backdrop.fade { + opacity: 0; +} +.modal-backdrop, +.modal-backdrop.fade.in { + opacity: 0.8; + filter: alpha(opacity=80); +} +.modal { + position: fixed; + top: 10%; + left: 50%; + z-index: 1050; + width: 560px; + margin-left: -280px; + background-color: #ffffff; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, 0.3); + *border: 1px solid #999; + /* IE6-7 */ -Color list: -- login box: - light #ff9955 - dark #ff6622 -- login button: - regular #dd5500 - hover #773311 -- login translations: - box: #cc6622; - not-selected: - color: #ddaa99 - background: #994422 - selected: #772211; -*/ -html { - height: 100%; - -webkit-text-size-adjust: none; - -ms-text-size-adjust: none; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -webkit-background-clip: padding-box; + -moz-background-clip: padding-box; + background-clip: padding-box; + outline: none; +} +.modal.fade { + -webkit-transition: opacity .3s linear, top .3s ease-out; + -moz-transition: opacity .3s linear, top .3s ease-out; + -o-transition: opacity .3s linear, top .3s ease-out; + transition: opacity .3s linear, top .3s ease-out; + top: -25%; +} +.modal.fade.in { + top: 10%; +} +.modal-header { + padding: 9px 15px; + border-bottom: 1px solid #eee; +} +.modal-header .close { + margin-top: 2px; +} +.modal-header h3 { + margin: 0; + line-height: 30px; } -body { - font-family: Helvetica-Neue, Helvetica, Arial, Geneva, sans-serif; - margin: 0px; +.modal-body { + position: relative; + overflow-y: auto; + max-height: 400px; + padding: 15px; } -.ellipsis { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; +.modal-form { + margin-bottom: 0; +} +.modal-footer { + padding: 14px 15px 15px; + margin-bottom: 0; + text-align: right; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; + -webkit-box-shadow: inset 0 1px 0 #ffffff; + -moz-box-shadow: inset 0 1px 0 #ffffff; + box-shadow: inset 0 1px 0 #ffffff; + *zoom: 1; +} +.modal-footer:before, +.modal-footer:after { + display: table; + content: ""; + line-height: 0; +} +.modal-footer:after { + clear: both; +} +.modal-footer .btn + .btn { + margin-left: 5px; + margin-bottom: 0; +} +.modal-footer .btn-group .btn + .btn { + margin-left: -1px; +} +.modal-footer .btn-block + .btn-block { + margin-left: 0; +} +.tooltip { + position: absolute; + z-index: 1030; + display: block; + visibility: visible; + padding: 5px; + font-size: 11px; + opacity: 0; + filter: alpha(opacity=0); +} +.tooltip.in { + opacity: 0.8; + filter: alpha(opacity=80); +} +.tooltip.top { + margin-top: -3px; +} +.tooltip.right { + margin-left: 3px; +} +.tooltip.bottom { + margin-top: 3px; +} +.tooltip.left { + margin-left: -3px; +} +.tooltip-inner { + max-width: 200px; + padding: 3px 8px; + color: #ffffff; + text-align: center; + text-decoration: none; + background-color: #000000; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000000; } -div#loginForm div.credentialsMessage.error h1 { - color: red; +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000000; } -div#loginForm div.validating div.loading { - margin-top: 50px; - margin-bottom: 50px; +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000000; +} +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000000; +} +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1010; + display: none; + width: 236px; + padding: 1px; + text-align: left; + background-color: #ffffff; + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + white-space: normal; +} +.popover.top { + margin-top: -10px; +} +.popover.right { + margin-left: 10px; +} +.popover.bottom { + margin-top: 10px; +} +.popover.left { + margin-left: -10px; +} +.popover-title { + margin: 0; + padding: 8px 14px; + font-size: 14px; + font-weight: normal; + line-height: 18px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + -webkit-border-radius: 5px 5px 0 0; + -moz-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} +.popover-content { + padding: 9px 14px; +} +.popover .arrow, +.popover .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.popover .arrow { + border-width: 11px; +} +.popover .arrow:after { + border-width: 10px; + content: ""; +} +.popover.top .arrow { + left: 50%; + margin-left: -11px; + border-bottom-width: 0; + border-top-color: #999; + border-top-color: rgba(0, 0, 0, 0.25); + bottom: -11px; +} +.popover.top .arrow:after { + bottom: 1px; + margin-left: -10px; + border-bottom-width: 0; + border-top-color: #ffffff; +} +.popover.right .arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-left-width: 0; + border-right-color: #999; + border-right-color: rgba(0, 0, 0, 0.25); +} +.popover.right .arrow:after { + left: 1px; + bottom: -10px; + border-left-width: 0; + border-right-color: #ffffff; +} +.popover.bottom .arrow { + left: 50%; + margin-left: -11px; + border-top-width: 0; + border-bottom-color: #999; + border-bottom-color: rgba(0, 0, 0, 0.25); + top: -11px; +} +.popover.bottom .arrow:after { + top: 1px; + margin-left: -10px; + border-top-width: 0; + border-bottom-color: #ffffff; +} +.popover.left .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-right-width: 0; + border-left-color: #999; + border-left-color: rgba(0, 0, 0, 0.25); +} +.popover.left .arrow:after { + right: 1px; + border-right-width: 0; + border-left-color: #ffffff; + bottom: -10px; +} +.thumbnails { + margin-left: -20px; + list-style: none; + *zoom: 1; +} +.thumbnails:before, +.thumbnails:after { + display: table; + content: ""; + line-height: 0; +} +.thumbnails:after { + clear: both; +} +.row-fluid .thumbnails { + margin-left: 0; +} +.thumbnails > li { + float: left; + margin-bottom: 20px; + margin-left: 20px; +} +.thumbnail { + display: block; + padding: 4px; + line-height: 20px; + border: 1px solid #ddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +a.thumbnail:hover { + border-color: #0088cc; + -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); +} +.thumbnail > img { + display: block; + max-width: 100%; margin-left: auto; margin-right: auto; - width: 100px; -} -/* - -Color list: -- login box: - light #ff9955 - dark #ff6622 -- login button: - regular #dd5500 - hover #773311 -- login translations: - box: #cc6622; - not-selected: - color: #ddaa99 - background: #994422 - selected: #772211; -*/ -html { - height: 100%; - -webkit-text-size-adjust: none; - -ms-text-size-adjust: none; } -body { - font-family: Helvetica-Neue, Helvetica, Arial, Geneva, sans-serif; - margin: 0px; +.thumbnail .caption { + padding: 9px; + color: #555555; } -.ellipsis { - text-overflow: ellipsis; +.media, +.media-body { overflow: hidden; + *overflow: visible; + zoom: 1; +} +.media, +.media .media { + margin-top: 15px; +} +.media:first-child { + margin-top: 0; +} +.media-object { + display: block; +} +.media-heading { + margin: 0 0 5px; +} +.media .pull-left { + margin-right: 10px; +} +.media .pull-right { + margin-left: 10px; +} +.media-list { + margin-left: 0; + list-style: none; +} +.label, +.badge { + display: inline-block; + padding: 2px 4px; + font-size: 11.844px; + font-weight: bold; + line-height: 14px; + color: #ffffff; + vertical-align: baseline; white-space: nowrap; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #999999; } -#jqt div.cardList ul li.cardListItem a small.favicon { - background: white; +.label { -webkit-border-radius: 3px; + -moz-border-radius: 3px; border-radius: 3px; - display: block; - width: 26px; - height: 26px; - padding: 0px; } -#jqt div.cardList ul li.cardListItem a small.favicon img.favicon { - margin-right: 3px; - margin-top: 3px; - width: 20px; - height: 20px; +.badge { + padding-left: 9px; + padding-right: 9px; + -webkit-border-radius: 9px; + -moz-border-radius: 9px; + border-radius: 9px; } -#jqt div.cardDetail ul li a.password { - color: gray; +.label:empty, +.badge:empty { + display: none; } -/* ---------------------------------------- */ -/* -body { - margin: 0; - font-family: Helvetica; - background: #FFFFFF; - color: #000000; - overflow-x: hidden; - -webkit-user-select: none; - -webkit-text-size-adjust: none; +a.label:hover, +a.badge:hover { + color: #ffffff; + text-decoration: none; + cursor: pointer; } - - -div.toolbar { - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - border-bottom: 1px solid #2d3642; - border-top: 1px solid #6d84a2; - padding: 10px; - height: 45px; -// background: url(./images/old/iPhone/toolbar.png) #6d84a2 repeat-x; - background: url(data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAArCAIAAAA2QHWOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAE1JREFUCNddjDEOgEAQAgn//5qltYWFnb1GB4vdSy4WBAYStKyb9+O0FJMYyjMyMWCC35lJM71r6vF1P07/lFSfPx6ZxNLcy1HtihzpA/RWcOj0zlDhAAAAAElFTkSuQmCCCg==) #6d84a2 repeat-x; +.label-important, +.badge-important { + background-color: #b94a48; } - -div.toolbar h1#pageTitle { - overflow: hidden; - margin-top: 1px; - margin-bottom: 0px; - margin-left: auto; - margin-right: auto; - width: 150px; - height: 25px; - font-size: 20px; - width: 150px; - font-weight: bold; - text-shadow: rgba(0, 0, 0, 0.4) 0px -1px 0; - text-align: center; - text-overflow: ellipsis; - white-space: nowrap; - color: #FFFFFF; +.label-important[href], +.badge-important[href] { + background-color: #953b39; } - -div.toolbar a.button { - position: absolute; - overflow: hidden; - top: 8px; - right: 6px; - margin: 0; - border-width: 0 5px; - padding: 0 3px; - width: auto; - height: 30px; - line-height: 30px; - font-family: inherit; - font-size: 12px; - font-weight: bold; - color: #FFFFFF; - text-shadow: rgba(0, 0, 0, 0.6) 0px -1px 0; - text-overflow: ellipsis; - text-decoration: none; - white-space: nowrap; - background: none; -// -webkit-border-image: url(./images/old/iPhone/toolButton.png) 0 5 0 5; +.label-warning, +.badge-warning { + background-color: #f89406; } - -div.toolbar a#backButton { - left: 6px; - right: auto; - padding: 0px; - max-width: 55px; - border-width: 0 8px 0 14px; -// -webkit-border-image: url(./images/old/iPhone/backButton.png) 0 8 0 14; - -webkit-border-image: url(data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAeCAIAAAA6iHCJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAtJJREFUeNrEV21P01AYbbtubNExBnXDbYjjZYI4BMdgEANDQoTElw/+Rw0mBs0UiSGaoJFEQEPwjRhFCW/JxrZ2Xdu1fe71bpAhCHzqupPnS5ObPOeec+5zb+lHLxao05HPiwvzr3/++J7N7FFGgaaDLe034+O+wCXyxSKET1u5+Wc98XTK39zeOzjudLmNIoAR2tlaf/Zkqm9gKNI/RBigE9dtb23MJKZj8fvuC16b3WGxsJRxOFfHeQOtH+ZnOI+XRfgEBoLAzz6fjo7ebfD4GYYhMiEdDGRAW6xOt6d7YGzl4xIL/7mgyPL044edkVt19T4EFAJEVQYud+MvOCkHc7MJ3+VrXGOzXrHeZS1s9trjOVj7tiqpONTWBRgD6BVmQFls9iMaSHnx/bu3ffEHgC2gVVqAIojKR3Iw9zLRcjVmtTnA0NydxQDg0IWvq59kYIOeZtWs9gQkagcMcgK/vLjYNXQHcEkas0AcYPdNIPr7Q/0M69B089ofavB5ZVm3OJ2cTwegzAUgxGbSe8tLS52xewjRZGabzAABZt+8mvGHBsiYNF+AAw1cXEBGNUiQqWpAlArM5MSYBXgEOl0NkLcCkxak28MRKbuDMa6KDAwAUnU8HO2Q+N0SJ3OLMCA7V1S9vt7d3tSg5LNV0ACXwOekcGfreVbVVYUqMjOvyPsH71cqkxsZ7NHFJIXBTCMONMAlEryoxAfDucyOmaOpmINyaTowrK23IyDxKbNzUIYoKU3+i37OXpCESvfGCOw11uMMcCkQke4rDlrS1coOSk2VOXftERfKtZsURmLXQUqBVqiUABgrQirc0Xp4Fv4t8kxN8dLkaJQupOVcGnTN0PuQHHlRSG1Eu9tUTLOnxZ5clclsfmK078va7/WN7axomCN2e42Xc/VEIoiiM0KePeM20DTY3M22BZtuhENW1rC/NrI3WVGTmZxSKEr7V4ABAJ+53J1I3nPjAAAAAElFTkSuQmCCCg==) 0 8 0 14; +.label-warning[href], +.badge-warning[href] { + background-color: #c67605; } - -// ------------------------------------------- - -body.iPhone form.loginForm { - min-height: 372px; - - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - padding: 10px; -// background: #c8c8c8 url(./images/old/iPhone/pinstripes.png); - background: #c8c8c8 url(data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAABCAIAAACdaSOZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpiPHrmCgMC/GNjYwNSAAEGADdNA3dnzPlQAAAAAElFTkSuQmCCCg==); +.label-success, +.badge-success { + background-color: #468847; } - -fieldset { - position: relative; - margin: 0 0 20px 0; - padding: 0; - background: #FFFFFF; - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - border: 1px solid #999999; - text-align: right; - font-size: 16px; +.label-success[href], +.badge-success[href] { + background-color: #356635; } - -.row { - position: relative; - min-height: 42px; - border-bottom: 1px solid #999999; - -webkit-border-radius: 0; - text-align: right; +.label-info, +.badge-info { + background-color: #3a87ad; } - -fieldset > .row:last-child { - border-bottom: none !important; +.label-info[href], +.badge-info[href] { + background-color: #2d6987; } - - -.row > input:not(input[type|=radio]):not(input[type|=checkbox]), -.row > div.fieldValue { - width: 100%; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - margin: 0; - border: none; - padding: 0px 10px 0 112px; - height: 42px; - background: none; - font-size: 16px; - font-weight: normal; - - color: #666a60; - -webkit-user-select: text; +.label-inverse, +.badge-inverse { + background-color: #333333; } - -.row > div.fieldValue p { - margin: 0px; - text-align: left; - height: 40px; - vertical-align: middle; - line-height: 40px; +.label-inverse[href], +.badge-inverse[href] { + background-color: #1a1a1a; } - -body[orientation="landscape"] .row > div.fieldValue.password { - padding-right: 120px; -// background: url(./images/old/iPhone/password_background.png) no-repeat 105px; - background: url(data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAAAWCAYAAAAsNNkQAAAM1GlDQ1BJQ0MgUHJvZmlsZQAAeAGtl3k8VO8ex59ZGMuYYTC2MLLLmp3sWyLZFUoau2HGklTKkpQ1SyhaUFSISqRUtJAlSQpRtoos2bNku2cG1b2v1+/ef+7zep05n/Oc85wzM8+83898AcBKu1IoJDgAwM8/ONDaRJ+wd58jAfURwAAC6lQGsq7EIIqepaU5dPQPba4duhpqbTLUew2S01TBCqXR4HGq6xejAy3/MGizGxMIPRAAmDTUweG5nnWp+dB6tqXmI8GUYOgaL2omerm6QTkMytKBttYGUL4JZYzneq6k5kPruZ6aQ4ie1LGdANDj/N28/QFAjUFZ2809iAidpj7XzS2I6AflZChb+PmRoftj+qAsQaQEQmOxDFAWoX4v0B5qTnEAKPEAwGD2p+9IOgDludCQ3X/6hB8AgHcFIC/xT9+MNe27guFbgjwUt9NuB0PrA0DXs7Y2Iwa9t1QAVlLW1pby1tZWrgGA+ARADYl4ODCEdi30QWDNAPyv4/XPvDECAU0ONMEwEVgB/BgiDBlGd5I+AhXFcIrRkLGW6QzzWXQsSwKmgtWLLQWXwp7KcZ4zHZ/Olcldy0vmy96SzX9ZoJ5wWChv6zXhFtHjYgXirZInpYq2tctEyd6W61I4s/2eYq9ygkqFar96ksYjzUGtNO2nOiN6GfrPDcaNsozrTKZNr+5qNJvbnWfxZs9by7dWrdbLtoV2H+zbHTr2djoine46f9r/+UCPS+/BvkNo4kO3r+7fPAY9h7y+ew/7cpKe+f3wHydPUCYDpgKng2aDZw//DJk7Mh+6cHTx2K/jy2HLJ1bCJSM+RMFOwaMRp5ExdGfoz6JiGeIY45kSmBPRSSznMMnYFNZUtjTcefZ0jgzOTPwFrovcWTzZvJf4Lm+5wn9VIEcwl5AndG3rdeF8kQLRG+I3xW9JFEoWSRWNFpNuS5fIlMrdkb+rcE+hbPt9pX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4LtKWkYj8/csJUQNxJBKpzXpx9tsWySeo0BGSriPtF4KFhcBhKffH16k/dF8TmW8ve2mMYM3kKuas0UnxmrDiX4jkTLFMQd13Hw/GYCJRC8EcZxn20WpG69c2N89CAMIsK6Kaew1/MGqrW/KO09IYKWCM40IC3DAsWYxcuO9DmjmXzw9ORzN0dPwPxukrSRVJ0AM5+cMUh266y8u0SL5wlu/pKdIj6TPmGqkUJZG0Mx0aKN4+5Nwl4YS/FDwnEi56k+JL1W2Red47cun8eHKoufbOiKtti+cYLT/OEVEKVIQamEvwpojr1sZCONoF0awAsFckfbsTBcV0QpKAdcIQ9t+/os0A06J0VK06KQcEpPK+kTy842ERt95rNNs5gnjM1RiDk7v6M2m4nFc8++50cHKrhkws/aqZxIwyRbXpz0JwHxsHMF17dfdtFsZzvrF6/WeT5h3lOzn+0aD+5ExGJnLCR57i5D08yLC9a02NjgD7jpsLCX24kbVtACEpvk7gazY0Q5kJHPxhk5Ge//MaHb/WBeKjrc3OvtSW9n0nxrQ61luHVqLsJHh566fXdGz0APhRUAd9dM8EsshXS0TrQeBh7F9zEBpijj4aZ/RXHRzq/yc+AnwE/A34G/Az83xj4H4iTXMrVi2PuAAAAAElFTkSuQmCCCg==) no-repeat 105px; +.btn .label, +.btn .badge { + position: relative; + top: -1px; } - -.row > div.fieldValue.password { - color: rgba(255,255,255,0.5); -// background: url(./images/old/iPhone/password_background.png) no-repeat 106px; - background: url(data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAAAWCAYAAAAsNNkQAAAM1GlDQ1BJQ0MgUHJvZmlsZQAAeAGtl3k8VO8ex59ZGMuYYTC2MLLLmp3sWyLZFUoau2HGklTKkpQ1SyhaUFSISqRUtJAlSQpRtoos2bNku2cG1b2v1+/ef+7zep05n/Oc85wzM8+83898AcBKu1IoJDgAwM8/ONDaRJ+wd58jAfURwAAC6lQGsq7EIIqepaU5dPQPba4duhpqbTLUew2S01TBCqXR4HGq6xejAy3/MGizGxMI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A06J0VK06KQcEpPK+kTy842ERt95rNNs5gnjM1RiDk7v6M2m4nFc8++50cHKrhkws/aqZxIwyRbXpz0JwHxsHMF17dfdtFsZzvrF6/WeT5h3lOzn+0aD+5ExGJnLCR57i5D08yLC9a02NjgD7jpsLCX24kbVtACEpvk7gazY0Q5kJHPxhk5Ge//MaHb/WBeKjrc3OvtSW9n0nxrQ61luHVqLsJHh566fXdGz0APhRUAd9dM8EsshXS0TrQeBh7F9zEBpijj4aZ/RXHRzq/yc+AnwE/A34G/Az83xj4H4iTXMrVi2PuAAAAAElFTkSuQmCCCg==) no-repeat 106px; +.btn-mini .label, +.btn-mini .badge { + top: 0; } - -.row > div.fieldValue.password.clear { - color: #666a60; - background: none; +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } } - -.row > input[type|=radio], .row > input[type|=checkbox] { - margin: 7px 7px 0 0; - height: 25px; - width: 25px; +@-moz-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } } - - -.row > label { - position: absolute; - margin: 0 0 0 14px; - line-height: 42px; - font-weight: bold; - max-width: 92px; - overflow: hidden; - white-space: nowrap; +@-ms-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } } - -body[orientation="landscape"] .row > label { - max-width: 150px; +@-o-keyframes progress-bar-stripes { + from { + background-position: 0 0; + } + to { + background-position: 40px 0; + } } - -body[orientation="landscape"] .row > input:not(input[type|=radio]):not(input[type|=checkbox]) { - padding-left: 140px; +@keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } } - -.row > img.favicon { - position: absolute; - width: 20px; - height: 20px; - top: 12px; - left: 11px; +.progress { + overflow: hidden; + height: 20px; + margin-bottom: 20px; + background-color: #f7f7f7; + background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); + background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; } - -.row > span { - padding: 8px 13px; - text-align: left; - display: block; - color: #666a60; - font-size: 10pt; +.progress .bar { + width: 0%; + height: 100%; + color: #ffffff; + float: left; + font-size: 12px; + text-align: center; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e90d2; + background-image: -moz-linear-gradient(top, #149bdf, #0480be); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); + background-image: -webkit-linear-gradient(top, #149bdf, #0480be); + background-image: -o-linear-gradient(top, #149bdf, #0480be); + background-image: linear-gradient(to bottom, #149bdf, #0480be); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition: width 0.6s ease; + -moz-transition: width 0.6s ease; + -o-transition: width 0.6s ease; + transition: width 0.6s ease; +} +.progress .bar + .bar { + -webkit-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); + -moz-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); + box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); +} +.progress-striped .bar { + background-color: #149bdf; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + -webkit-background-size: 40px 40px; + -moz-background-size: 40px 40px; + -o-background-size: 40px 40px; + background-size: 40px 40px; +} +.progress.active .bar { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -moz-animation: progress-bar-stripes 2s linear infinite; + -ms-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} +.progress-danger .bar, +.progress .bar-danger { + background-color: #dd514c; + background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); + background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); +} +.progress-danger.progress-striped .bar, +.progress-striped .bar-danger { + background-color: #ee5f5b; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.progress-success .bar, +.progress .bar-success { + background-color: #5eb95e; + background-image: -moz-linear-gradient(top, #62c462, #57a957); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); + background-image: -webkit-linear-gradient(top, #62c462, #57a957); + background-image: -o-linear-gradient(top, #62c462, #57a957); + background-image: linear-gradient(to bottom, #62c462, #57a957); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); +} +.progress-success.progress-striped .bar, +.progress-striped .bar-success { + background-color: #62c462; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.progress-info .bar, +.progress .bar-info { + background-color: #4bb1cf; + background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); + background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); + background-image: -o-linear-gradient(top, #5bc0de, #339bb9); + background-image: linear-gradient(to bottom, #5bc0de, #339bb9); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); +} +.progress-info.progress-striped .bar, +.progress-striped .bar-info { + background-color: #5bc0de; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.progress-warning .bar, +.progress .bar-warning { + background-color: #faa732; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); +} +.progress-warning.progress-striped .bar, +.progress-striped .bar-warning { + background-color: #fbb450; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.accordion { + margin-bottom: 20px; +} +.accordion-group { + margin-bottom: 2px; + border: 1px solid #e5e5e5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; } - -.row.notes { - -webkit-user-select: text; +.accordion-heading { + border-bottom: 0; } - -// ------------------------------------------- - -.whiteButton { - margin-left: auto; - margin-right: auto; - width: 150px; - display: block; - border-width: 0 12px; - padding: 10px; - text-align: center; - font-size: 20px; - font-weight: bold; - text-decoration: inherit; - color: inherit; - -// -webkit-border-image: url(./images/old/iPhone/whiteButton.png) 0 12 0 12; - -webkit-border-image: url(data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAuCAQAAAB+dNqHAAAACXBIWXMAAABIAAAASABGyWs+AAAACXZwQWcAAAAdAAAALgChnaVgAAAAAmJLR0QA/4ePzL8AAANhSURBVEjHnZZNaFxVFMd/5747mclMkpmxzYdJtFaJglgFpYSiBAVX7l0UUZGuSkEEu3PtSulCUXFdxYXL7kQQIWD9CsRIqdomGGOaSdJmZjKTeW/eu/e4mKRmrE3n5X83j/ve7/3POfe+d67QrTxP8QLDnMTenkv4kQ2+YZ6d/Y/Kvut+XuZVKtygzVbXC8v0cT+jXORLWneix/mAZZZwKIrSbSAIAcd5kDdZ6kaf4zzfEeLPnHrr+UeOWpMJ9rjYxe7a5ntff/YThhyneJ/Zf9Ep3uEXkhNjX50bHoiStoPE76HWiPQFfcGN+kufLKxheZJ3+aOD5vmIBaLXpz89HSVhzF2Uy2TtGxe/+JksJzjHjgCvMEHz6cnZt7dD5zlAgSlkZy7MrVDgbz43FJimhV46W2vFzutBI3aN8NJZlBbTFAKepZ/o/IszU1Gs95Tz2Uw1nFuiiTE8Rhs9fbIROt/LaISvTaO0mbIM0kTKeefoUSMDCI6SxRCT9d77XlFrCYgQi0PH72vH9CyNMSjO4tGM9do76hXB4y2KU+c8aaR41KJ4SIn6DgqgPq2rggWc+kMEjBUBVDUNKQBiOx+218Pl6tVr+jJhUZx4PYSr4XBSsAKaJH9tpirT7uIoTj3pAna43TJJWtSjYDpxp5bv5OpTb4mOq3IIX0W14ypeUq+rYBH5T9fqbRerWMClrbB4PBgUjZPUuXrUGBW51Yhc71y9LSJi1NgQxVWj3a7aw2gmONSGJtNAxC9v9+56vaoe6aubXEWy4meXe/+VXl42TvqzG4ZFCkRzv/+w3lu436/PX6NNnsUgCctjUUJwnWdGC/ZenpXw47loTRrldu3XwLkSrQmiHbkSP3FkwB4MXpjfWDE3JTfw29ZGAGHjgWJdcDW9XC/0PVS4W47fVj5cuLUmFWlOVlevei8ApVLp8bWclnWU4khpZvTRwaw5VggEINHlZuSv1mcr6zW2ZF22xqLqlWr19uYdGSkeWyn4IY5okX61GBHMrp1HJaYldW4G9Ylm7c/19a4jV6k0+fBmtjbkCwxoDovdQ0lIpEXTNIrbR6OVxWr1joNeJjM+Xhyu2+0+Z6Ocmt17Kj4bBvFgPJTUNlZX4/j/zohAJlMuF4vW5vP7Z3d2kqRW29qKuxr4P1RbNFwZtqq8AAAAAElFTkSuQmCCCg==) 0 12 0 12; - text-shadow: rgba(255, 255, 255, 0.7) 0 1px 0; +.accordion-heading .accordion-toggle { + display: block; + padding: 8px 15px; } - -// ------------------------------------------- - -body.iPhone .loginProgressPanel { - min-height: 372px; - - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - padding: 10px; -// background: #c8c8c8 url(./images/old/iPhone/pinstripes.png); - background: #c8c8c8 url(data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAABCAIAAACdaSOZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpiPHrmCgMC/GNjYwNSAAEGADdNA3dnzPlQAAAAAElFTkSuQmCCCg==); +.accordion-toggle { + cursor: pointer; } - -body.iPhone .loadingBar { - margin-left: auto; - margin-right: auto; - margin-top: 60px; +.accordion-inner { + padding: 9px 15px; + border-top: 1px solid #e5e5e5; } - -div.loadingBar { - height: 22px; - width: 214px; -// background: url(./images/old/loading/loadingBar.gif) no-repeat center; - background: url(data:image/gif;charset=utf-8;base64,R0lGODlh1gAWAMQAAP////f39/f37+/v7+/v5ubm5ubm3t7e3t7e1tbWzs7Ozs7Oxc7OvcXFvcXFtb29tb29rbW1rbW1pa2tpa2tnKWlnKWllP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFBwAXACwAAAAA1gAWAAAF/+AljkQjUVWqrmzrvnAsz3Rt33iur5S0DKPgaOCgWHbIpHLJbDpjx0ZAKDoYKz4CYMsFDBLgsHhc6Jq737E6XD6f02t1242Or+f0LdzOztf5Ynh5e2ALEEYWFAZCBhUWEwiDgIF+XIR8gnSXdplum3Gdb5N9lV6jYKFmn2APKRMFQxIWEgGSp6l/o7iWpwm7er2/prelw7rFq2ELE4lTFw+PA7bHpclkyMHYxNXZ3NuV1sqODRcDKZGa3eDqfuGk69/t7NOTwu6oCCkDDY/0gPbz0sXzh0kbNXgH5W2bUGGZhQUCExLkZLBexX8XC3qTGNHilgYVIjiSJmpgR4wbPf8iVKmQo6eAL+MVqIAopsuSN1XBxMlyIqiMFFOi5BIghQULPIe27HlS40qlPu8A/SnU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PYL2EOJTqI+hl4CaEhosSObgRIkVKaKxmHESRGAa2XDcGLLQSJElq2E1vIjpo52UAjGSlImSpkmYERey1DJMQUydHYHOFFqT6E2bKvn9MzPsAoUFIJH+XBmU6lCrRbEeNZoUYFOnDg6c3Kq167ml6dCuc1hObYyvcNOyPTtX7k6lddfebZv3bdMQACH5BAkBABcALAAAAADWABYAAAX/4CWOZGmeaKqubOu+cCzPdG3feK7vfH8tBABgoEoYjQWUcElMHZHK5bD4TJ6kU2c1yqQerSZsE/VMgEvi4gJCaSGk41P5TEprv1xh3DTPZ8lbV3BeUIJdd4Vhg4gJDSsBi4B4hnqEZn57JX2Uf3KBioeSiWiRnpOglYx0JgOlfJ+koaajda6asLWyr6exqaKXnJkkm6idu7Qmb7q3vLm+s8DFwiPEvcbMyCJ2v6vatsO4I9vQ3b3TItXO1+DN4t/U4d7L7NkX48fR1ucX6e7z8O1MLPiHLp69dwUDHiTIz+A9bPnU7esn7xm+cg/pRUTRah3Aehk/bqzoMSFIhA0V1YY0OXKhRYgYUVK0d+alxpgMZ65MeTKnQ5k/faoEOjRAnYlBbYrEqZQl05I8W+7USbRn06g4BZA4YOkp0qFCrUKlGlZqVbNlmXJtQfZq27FJ4YJ1G/erWLtohThgW7crJr/BAEsTrI+wRMP+hBDgO1fuXcQk8XqF7NJxXsuTWbyV/FdVZ26fyYW+OBpmadGBPacGvRr1YNWvWcd2XVhzX9i1ZeemfRh3b92/eScGsLgFhQgNLnNuTZq5aec3Ty+V7pRLgAJ7fWjfzr279+/gw4sfTz5FCAA7Cg==) no-repeat center; +.carousel { + position: relative; + margin-bottom: 20px; + line-height: 1; } - -div.loadingBar div.loadingBarProgress { - height: 100%; - width: 0%; +.carousel-inner { + overflow: hidden; + width: 100%; + position: relative; } - -div.loadingBar div.loadingBarProgress div.loadingBarProgress_left { - height: 100%; - max-width: 8px; -// background: url(./images/old/loading/loadingBarProgress.png) no-repeat 0; - background: url(data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAANYAAAAWCAYAAAC8C2KaAAAACXBIWXMAAAsSAAALEgHS3X78AAACIklEQVR4Ae3brU7DUBQH8HO6PQAazx4BRUKDwfChQTGFQ4wRFGEERdgQONRQoGEzGFISFI8w/DQSWHsP565r0xY2BiWY/ivW+530l52cdr0jwgEBCPy5AE9aUc7XV0kcl4jniGR20lj0QaAYAtzXWHgmNh7v3HTGXfOXgSWnKy6VqEZMCKZxcmiHgFCfAjrjva6XxfgUWNJc3tVBG9mBqEMAAmMFrrl+10r2pgJLTpYO9dZvNTkAZQhAYAoBNh3evz+KRsaBJccLevtXakYdOEMAAj8UCII6Hzx6dlY5nipBjXwTV1GAAAR+KiA1neHZWcOMJY35FS03bAMOCEAgl0CDG0/dMGP5by6xk2s1TIYABFRAjKufo8AyfoUkftyCDwQg8FsBloqdGmaswMf7qt9CYh4E0gLDWBrdCg7SXahBAAK5BEYZa9AnZmStXJSYDAEVENEtT/GtYNAjxl5AfDEgkFtAuGfXCDPW4N0jh9zci2IBCBRdwCTeY1kL2Z65RdYq+rcC159LQLjPFy9rdo0wY9nS+2uLSk5qI6FtxgEBCEwpEJg4flIvr2SrfEgOYxPulI4YBoFYwEiHL/2jqJ4KLNuowVXT4NqMBuAMAQh8I2DkSoPqLDnqU2DZTqmWF4mcXTxzJalQhkBGQJ+piEyL2/5DpifchJttjOpSLenmXMfVvboVBFmkgnOhBYbBJPqTuv41vx10C22Bi4fAfwt8AJe2flCLvH1PAAAAAElFTkSuQmCCCg==) no-repeat 0; +.carousel-inner > .item { + display: none; + position: relative; + -webkit-transition: 0.6s ease-in-out left; + -moz-transition: 0.6s ease-in-out left; + -o-transition: 0.6s ease-in-out left; + transition: 0.6s ease-in-out left; } - -div.loadingBar div.loadingBarProgress div.loadingBarProgress_right { - position: relative; - height: 100%; - margin-left: 8px; -// background: url(./images/old/loading/loadingBarProgress.png) no-repeat right; - background: url(data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAANYAAAAWCAYAAAC8C2KaAAAACXBIWXMAAAsSAAALEgHS3X78AAACIklEQVR4Ae3brU7DUBQH8HO6PQAazx4BRUKDwfChQTGFQ4wRFGEERdgQONRQoGEzGFISFI8w/DQSWHsP565r0xY2BiWY/ivW+530l52cdr0jwgEBCPy5AE9aUc7XV0kcl4jniGR20lj0QaAYAtzXWHgmNh7v3HTGXfOXgSWnKy6VqEZMCKZxcmiHgFCfAjrjva6XxfgUWNJc3tVBG9mBqEMAAmMFrrl+10r2pgJLTpYO9dZvNTkAZQhAYAoBNh3evz+KRsaBJccLevtXakYdOEMAAj8UCII6Hzx6dlY5nipBjXwTV1GAAAR+KiA1neHZWcOMJY35FS03bAMOCEAgl0CDG0/dMGP5by6xk2s1TIYABFRAjKufo8AyfoUkftyCDwQg8FsBloqdGmaswMf7qt9CYh4E0gLDWBrdCg7SXahBAAK5BEYZa9AnZmStXJSYDAEVENEtT/GtYNAjxl5AfDEgkFtAuGfXCDPW4N0jh9zci2IBCBRdwCTeY1kL2Z65RdYq+rcC159LQLjPFy9rdo0wY9nS+2uLSk5qI6FtxgEBCEwpEJg4flIvr2SrfEgOYxPulI4YBoFYwEiHL/2jqJ4KLNuowVXT4NqMBuAMAQh8I2DkSoPqLDnqU2DZTqmWF4mcXTxzJalQhkBGQJ+piEyL2/5DpifchJttjOpSLenmXMfVvboVBFmkgnOhBYbBJPqTuv41vx10C22Bi4fAfwt8AJe2flCLvH1PAAAAAElFTkSuQmCCCg==) no-repeat right; - top: -22px; +.carousel-inner > .item > img { + display: block; + line-height: 1; } - -// ------------------------------------------- - -body.iPhone .loginErrorPanel { - position: absolute; - min-height: 372px; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - padding: 10px; -// background: #c8c8c8 url(./images/old/iPhone/pinstripes.png); - background: #c8c8c8 url(data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAABCAIAAACdaSOZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpiPHrmCgMC/GNjYwNSAAEGADdNA3dnzPlQAAAAAElFTkSuQmCCCg==); +.carousel-inner > .active, +.carousel-inner > .next, +.carousel-inner > .prev { + display: block; } - -body.iPhone .loginErrorPanel h2 { - text-align: center; - color: red; - margin-top: 40px; +.carousel-inner > .active { + left: 0; } - -// ------------------------------------------- - -form.cardListSearchForm { - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - border-bottom: 1px solid #2d3642; - border-top: 1px solid #6d84a2; - padding: 6px; - height: 45px; -// background: url(./images/old/iPhone/toolbar.png) #6d84a2 repeat-x; - background: url(data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAArCAIAAAA2QHWOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAE1JREFUCNddjDEOgEAQAgn//5qltYWFnb1GB4vdSy4WBAYStKyb9+O0FJMYyjMyMWCC35lJM71r6vF1P07/lFSfPx6ZxNLcy1HtihzpA/RWcOj0zlDhAAAAAElFTkSuQmCCCg==) #6d84a2 repeat-x; - margin: 0px; +.carousel-inner > .next, +.carousel-inner > .prev { + position: absolute; + top: 0; + width: 100%; } - -form.cardListSearchForm input { - margin: 7px; - -webkit-appearance: searchfield; - width: 200px; +.carousel-inner > .next { + left: 100%; } - -ul.cardListPanel { - margin: 0px; - padding: 0px; - list-style-type: none; - min-height: 372px; +.carousel-inner > .prev { + left: -100%; } - -li.cardListItem { - height: 43px; - border-bottom: 1px solid #cccccc; -// background: url(./images/old/iPhone/listArrow.png) no-repeat right center; - background: url(data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAYAAAB4d5a9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAKVJREFUeNpi/P//PwOtARMDHcDwsYQFRJSXl8P4dVC6CZvizs5O8i1BsqARid9Ei+BiQ2KDLKumhSU1QNyKxG+hlkXoEQ+yqAPNogpapK5KNIvaKbUIVxKeAsTvkPg5QCxETUukgfgAkqFPgdgBzVKKLIFZoIJmwR1qBRdNLEC2BJQpV9LCAmRL/gBxAtRwqlqAXqzcgRrOQE0LQIBxtNIiBQAEGAA7xCa2yF9zEgAAAABJRU5ErkJgggo=) no-repeat right center; - +.carousel-inner > .next.left, +.carousel-inner > .prev.right { + left: 0; } - -li.cardListItem a { - position: relative; - top: -22px; - left: 40px; - display: block; - white-space: nowrap; - overflow: hidden; +.carousel-inner > .active.left { + left: -100%; } - -body[orientation="portrait"] li.cardListItem a { - max-width: 250px; +.carousel-inner > .active.right { + left: 100%; } - -body[orientation="landscape"] li.cardListItem a { - max-width: 400px; +.carousel-control { + position: absolute; + top: 40%; + left: 15px; + width: 40px; + height: 40px; + margin-top: -20px; + font-size: 60px; + font-weight: 100; + line-height: 30px; + color: #ffffff; + text-align: center; + background: #222222; + border: 3px solid #ffffff; + -webkit-border-radius: 23px; + -moz-border-radius: 23px; + border-radius: 23px; + opacity: 0.5; + filter: alpha(opacity=50); +} +.carousel-control.right { + left: auto; + right: 15px; +} +.carousel-control:hover { + color: #ffffff; + text-decoration: none; + opacity: 0.9; + filter: alpha(opacity=90); } - -li.cardListItem img { - height: 20px; - width: 20px; - padding: 12px 10px 0px 10px; +.carousel-caption { + position: absolute; + left: 0; + right: 0; + bottom: 0; + padding: 15px; + background: #333333; + background: rgba(0, 0, 0, 0.75); } - -li.cardListItem a { - text-decoration: none; - color: black; - font-weight: bold; - font-size: 14pt; - vertical-align: 3px; +.carousel-caption h4, +.carousel-caption p { + color: #ffffff; + line-height: 20px; } - - -div.cardDetailPanel { - position: absolute; - top: 45px; - min-height: 372px; - - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - padding: 10px; -// background: #c8c8c8 url(./images/old/iPhone/pinstripes.png); - background: #c8c8c8 url(data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAABCAIAAACdaSOZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpiPHrmCgMC/GNjYwNSAAEGADdNA3dnzPlQAAAAAElFTkSuQmCCCg==); +.carousel-caption h4 { + margin: 0 0 5px; } - -div.cardDetailPanel > fieldset > div.row > span.directLogin { +.carousel-caption p { + margin-bottom: 0; +} +.hero-unit { + padding: 60px; + margin-bottom: 30px; + font-size: 18px; + font-weight: 200; + line-height: 30px; + color: inherit; + background-color: #eeeeee; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.hero-unit h1 { + margin-bottom: 0; + font-size: 60px; + line-height: 1; + color: inherit; + letter-spacing: -1px; +} +.hero-unit li { + line-height: 30px; +} +.pull-right { + float: right; +} +.pull-left { + float: left; +} +.hide { + display: none; +} +.show { + display: block; +} +.invisible { + visibility: hidden; +} +.affix { + position: fixed; +} +.hidden { + display: none; + visibility: hidden; +} +.visible-phone { + display: none !important; +} +.visible-tablet { + display: none !important; +} +.hidden-desktop { + display: none !important; +} +.visible-desktop { + display: inherit !important; +} +@media (min-width: 768px) and (max-width: 979px) { + .hidden-desktop { + display: inherit !important; + } + .visible-desktop { + display: none !important ; + } + .visible-tablet { + display: inherit !important; + } + .hidden-tablet { + display: none !important; + } +} +@media (max-width: 767px) { + .hidden-desktop { + display: inherit !important; + } + .visible-desktop { + display: none !important; + } + .visible-phone { + display: inherit !important; + } + .hidden-phone { + display: none !important; + } +} +@media (min-width: 1200px) { + .row { + margin-left: -30px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + content: ""; + line-height: 0; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 30px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 1170px; + } + .span12 { + width: 1170px; + } + .span11 { + width: 1070px; + } + .span10 { + width: 970px; + } + .span9 { + width: 870px; + } + .span8 { + width: 770px; + } + .span7 { + width: 670px; + } + .span6 { + width: 570px; + } + .span5 { + width: 470px; + } + .span4 { + width: 370px; + } + .span3 { + width: 270px; + } + .span2 { + width: 170px; + } + .span1 { + width: 70px; + } + .offset12 { + margin-left: 1230px; + } + .offset11 { + margin-left: 1130px; + } + .offset10 { + margin-left: 1030px; + } + .offset9 { + margin-left: 930px; + } + .offset8 { + margin-left: 830px; + } + .offset7 { + margin-left: 730px; + } + .offset6 { + margin-left: 630px; + } + .offset5 { + margin-left: 530px; + } + .offset4 { + margin-left: 430px; + } + .offset3 { + margin-left: 330px; + } + .offset2 { + margin-left: 230px; + } + .offset1 { + margin-left: 130px; + } + .row-fluid { + width: 100%; + *zoom: 1; + } + .row-fluid:before, + .row-fluid:after { + display: table; + content: ""; + line-height: 0; + } + .row-fluid:after { + clear: both; + } + .row-fluid [class*="span"] { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + margin-left: 2.564102564102564%; + *margin-left: 2.5109110747408616%; + } + .row-fluid [class*="span"]:first-child { + margin-left: 0; + } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.564102564102564%; + } + .row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; + } + .row-fluid .span11 { + width: 91.45299145299145%; + *width: 91.39979996362975%; + } + .row-fluid .span10 { + width: 82.90598290598291%; + *width: 82.8527914166212%; + } + .row-fluid .span9 { + width: 74.35897435897436%; + *width: 74.30578286961266%; + } + .row-fluid .span8 { + width: 65.81196581196582%; + *width: 65.75877432260411%; + } + .row-fluid .span7 { + width: 57.26495726495726%; + *width: 57.21176577559556%; + } + .row-fluid .span6 { + width: 48.717948717948715%; + *width: 48.664757228587014%; + } + .row-fluid .span5 { + width: 40.17094017094017%; + *width: 40.11774868157847%; + } + .row-fluid .span4 { + width: 31.623931623931625%; + *width: 31.570740134569924%; + } + .row-fluid .span3 { + width: 23.076923076923077%; + *width: 23.023731587561375%; + } + .row-fluid .span2 { + width: 14.52991452991453%; + *width: 14.476723040552828%; + } + .row-fluid .span1 { + width: 5.982905982905983%; + *width: 5.929714493544281%; + } + .row-fluid .offset12 { + margin-left: 105.12820512820512%; + *margin-left: 105.02182214948171%; + } + .row-fluid .offset12:first-child { + margin-left: 102.56410256410257%; + *margin-left: 102.45771958537915%; + } + .row-fluid .offset11 { + margin-left: 96.58119658119658%; + *margin-left: 96.47481360247316%; + } + .row-fluid .offset11:first-child { + margin-left: 94.01709401709402%; + *margin-left: 93.91071103837061%; + } + .row-fluid .offset10 { + margin-left: 88.03418803418803%; + *margin-left: 87.92780505546462%; + } + .row-fluid .offset10:first-child { + margin-left: 85.47008547008548%; + *margin-left: 85.36370249136206%; + } + .row-fluid .offset9 { + margin-left: 79.48717948717949%; + *margin-left: 79.38079650845607%; + } + .row-fluid .offset9:first-child { + margin-left: 76.92307692307693%; + *margin-left: 76.81669394435352%; + } + .row-fluid .offset8 { + margin-left: 70.94017094017094%; + *margin-left: 70.83378796144753%; + } + .row-fluid .offset8:first-child { + margin-left: 68.37606837606839%; + *margin-left: 68.26968539734497%; + } + .row-fluid .offset7 { + margin-left: 62.393162393162385%; + *margin-left: 62.28677941443899%; + } + .row-fluid .offset7:first-child { + margin-left: 59.82905982905982%; + *margin-left: 59.72267685033642%; + } + .row-fluid .offset6 { + margin-left: 53.84615384615384%; + *margin-left: 53.739770867430444%; + } + .row-fluid .offset6:first-child { + margin-left: 51.28205128205128%; + *margin-left: 51.175668303327875%; + } + .row-fluid .offset5 { + margin-left: 45.299145299145295%; + *margin-left: 45.1927623204219%; + } + .row-fluid .offset5:first-child { + margin-left: 42.73504273504273%; + *margin-left: 42.62865975631933%; + } + .row-fluid .offset4 { + margin-left: 36.75213675213675%; + *margin-left: 36.645753773413354%; + } + .row-fluid .offset4:first-child { + margin-left: 34.18803418803419%; + *margin-left: 34.081651209310785%; + } + .row-fluid .offset3 { + margin-left: 28.205128205128204%; + *margin-left: 28.0987452264048%; + } + .row-fluid .offset3:first-child { + margin-left: 25.641025641025642%; + *margin-left: 25.53464266230224%; + } + .row-fluid .offset2 { + margin-left: 19.65811965811966%; + *margin-left: 19.551736679396257%; + } + .row-fluid .offset2:first-child { + margin-left: 17.094017094017094%; + *margin-left: 16.98763411529369%; + } + .row-fluid .offset1 { + margin-left: 11.11111111111111%; + *margin-left: 11.004728132387708%; + } + .row-fluid .offset1:first-child { + margin-left: 8.547008547008547%; + *margin-left: 8.440625568285142%; + } + input, + textarea, + .uneditable-input { + margin-left: 0; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 30px; + } + input.span12, textarea.span12, .uneditable-input.span12 { + width: 1156px; + } + input.span11, textarea.span11, .uneditable-input.span11 { + width: 1056px; + } + input.span10, textarea.span10, .uneditable-input.span10 { + width: 956px; + } + input.span9, textarea.span9, .uneditable-input.span9 { + width: 856px; + } + input.span8, textarea.span8, .uneditable-input.span8 { + width: 756px; + } + input.span7, textarea.span7, .uneditable-input.span7 { + width: 656px; + } + input.span6, textarea.span6, .uneditable-input.span6 { + width: 556px; + } + input.span5, textarea.span5, .uneditable-input.span5 { + width: 456px; + } + input.span4, textarea.span4, .uneditable-input.span4 { + width: 356px; + } + input.span3, textarea.span3, .uneditable-input.span3 { + width: 256px; + } + input.span2, textarea.span2, .uneditable-input.span2 { + width: 156px; + } + input.span1, textarea.span1, .uneditable-input.span1 { + width: 56px; + } + .thumbnails { + margin-left: -30px; + } + .thumbnails > li { + margin-left: 30px; + } + .row-fluid .thumbnails { + margin-left: 0; + } +} +@media (min-width: 768px) and (max-width: 979px) { + .row { + margin-left: -20px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + content: ""; + line-height: 0; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 724px; + } + .span12 { + width: 724px; + } + .span11 { + width: 662px; + } + .span10 { + width: 600px; + } + .span9 { + width: 538px; + } + .span8 { + width: 476px; + } + .span7 { + width: 414px; + } + .span6 { + width: 352px; + } + .span5 { + width: 290px; + } + .span4 { + width: 228px; + } + .span3 { + width: 166px; + } + .span2 { + width: 104px; + } + .span1 { + width: 42px; + } + .offset12 { + margin-left: 764px; + } + .offset11 { + margin-left: 702px; + } + .offset10 { + margin-left: 640px; + } + .offset9 { + margin-left: 578px; + } + .offset8 { + margin-left: 516px; + } + .offset7 { + margin-left: 454px; + } + .offset6 { + margin-left: 392px; + } + .offset5 { + margin-left: 330px; + } + .offset4 { + margin-left: 268px; + } + .offset3 { + margin-left: 206px; + } + .offset2 { + margin-left: 144px; + } + .offset1 { + margin-left: 82px; + } + .row-fluid { + width: 100%; + *zoom: 1; + } + .row-fluid:before, + .row-fluid:after { + display: table; + content: ""; + line-height: 0; + } + .row-fluid:after { + clear: both; + } + .row-fluid [class*="span"] { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + margin-left: 2.7624309392265194%; + *margin-left: 2.709239449864817%; + } + .row-fluid [class*="span"]:first-child { + margin-left: 0; + } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.7624309392265194%; + } + .row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; + } + .row-fluid .span11 { + width: 91.43646408839778%; + *width: 91.38327259903608%; + } + .row-fluid .span10 { + width: 82.87292817679558%; + *width: 82.81973668743387%; + } + .row-fluid .span9 { + width: 74.30939226519337%; + *width: 74.25620077583166%; + } + .row-fluid .span8 { + width: 65.74585635359117%; + *width: 65.69266486422946%; + } + .row-fluid .span7 { + width: 57.18232044198895%; + *width: 57.12912895262725%; + } + .row-fluid .span6 { + width: 48.61878453038674%; + *width: 48.56559304102504%; + } + .row-fluid .span5 { + width: 40.05524861878453%; + *width: 40.00205712942283%; + } + .row-fluid .span4 { + width: 31.491712707182323%; + *width: 31.43852121782062%; + } + .row-fluid .span3 { + width: 22.92817679558011%; + *width: 22.87498530621841%; + } + .row-fluid .span2 { + width: 14.3646408839779%; + *width: 14.311449394616199%; + } + .row-fluid .span1 { + width: 5.801104972375691%; + *width: 5.747913483013988%; + } + .row-fluid .offset12 { + margin-left: 105.52486187845304%; + *margin-left: 105.41847889972962%; + } + .row-fluid .offset12:first-child { + margin-left: 102.76243093922652%; + *margin-left: 102.6560479605031%; + } + .row-fluid .offset11 { + margin-left: 96.96132596685082%; + *margin-left: 96.8549429881274%; + } + .row-fluid .offset11:first-child { + margin-left: 94.1988950276243%; + *margin-left: 94.09251204890089%; + } + .row-fluid .offset10 { + margin-left: 88.39779005524862%; + *margin-left: 88.2914070765252%; + } + .row-fluid .offset10:first-child { + margin-left: 85.6353591160221%; + *margin-left: 85.52897613729868%; + } + .row-fluid .offset9 { + margin-left: 79.8342541436464%; + *margin-left: 79.72787116492299%; + } + .row-fluid .offset9:first-child { + margin-left: 77.07182320441989%; + *margin-left: 76.96544022569647%; + } + .row-fluid .offset8 { + margin-left: 71.2707182320442%; + *margin-left: 71.16433525332079%; + } + .row-fluid .offset8:first-child { + margin-left: 68.50828729281768%; + *margin-left: 68.40190431409427%; + } + .row-fluid .offset7 { + margin-left: 62.70718232044199%; + *margin-left: 62.600799341718584%; + } + .row-fluid .offset7:first-child { + margin-left: 59.94475138121547%; + *margin-left: 59.838368402492065%; + } + .row-fluid .offset6 { + margin-left: 54.14364640883978%; + *margin-left: 54.037263430116376%; + } + .row-fluid .offset6:first-child { + margin-left: 51.38121546961326%; + *margin-left: 51.27483249088986%; + } + .row-fluid .offset5 { + margin-left: 45.58011049723757%; + *margin-left: 45.47372751851417%; + } + .row-fluid .offset5:first-child { + margin-left: 42.81767955801105%; + *margin-left: 42.71129657928765%; + } + .row-fluid .offset4 { + margin-left: 37.01657458563536%; + *margin-left: 36.91019160691196%; + } + .row-fluid .offset4:first-child { + margin-left: 34.25414364640884%; + *margin-left: 34.14776066768544%; + } + .row-fluid .offset3 { + margin-left: 28.45303867403315%; + *margin-left: 28.346655695309746%; + } + .row-fluid .offset3:first-child { + margin-left: 25.69060773480663%; + *margin-left: 25.584224756083227%; + } + .row-fluid .offset2 { + margin-left: 19.88950276243094%; + *margin-left: 19.783119783707537%; + } + .row-fluid .offset2:first-child { + margin-left: 17.12707182320442%; + *margin-left: 17.02068884448102%; + } + .row-fluid .offset1 { + margin-left: 11.32596685082873%; + *margin-left: 11.219583872105325%; + } + .row-fluid .offset1:first-child { + margin-left: 8.56353591160221%; + *margin-left: 8.457152932878806%; + } + input, + textarea, + .uneditable-input { + margin-left: 0; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; + } + input.span12, textarea.span12, .uneditable-input.span12 { + width: 710px; + } + input.span11, textarea.span11, .uneditable-input.span11 { + width: 648px; + } + input.span10, textarea.span10, .uneditable-input.span10 { + width: 586px; + } + input.span9, textarea.span9, .uneditable-input.span9 { + width: 524px; + } + input.span8, textarea.span8, .uneditable-input.span8 { + width: 462px; + } + input.span7, textarea.span7, .uneditable-input.span7 { + width: 400px; + } + input.span6, textarea.span6, .uneditable-input.span6 { + width: 338px; + } + input.span5, textarea.span5, .uneditable-input.span5 { + width: 276px; + } + input.span4, textarea.span4, .uneditable-input.span4 { + width: 214px; + } + input.span3, textarea.span3, .uneditable-input.span3 { + width: 152px; + } + input.span2, textarea.span2, .uneditable-input.span2 { + width: 90px; + } + input.span1, textarea.span1, .uneditable-input.span1 { + width: 28px; + } +} +@media (max-width: 767px) { + body { + padding-left: 20px; + padding-right: 20px; + } + .navbar-fixed-top, + .navbar-fixed-bottom, + .navbar-static-top { + margin-left: -20px; + margin-right: -20px; + } + .container-fluid { + padding: 0; + } + .dl-horizontal dt { + float: none; + clear: none; + width: auto; + text-align: left; + } + .dl-horizontal dd { + margin-left: 0; + } + .container { + width: auto; + } + .row-fluid { width: 100%; + } + .row, + .thumbnails { + margin-left: 0; + } + .thumbnails > li { + float: none; + margin-left: 0; + } + [class*="span"], + .uneditable-input[class*="span"], + .row-fluid [class*="span"] { + float: none; + display: block; + width: 100%; + margin-left: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; box-sizing: border-box; + } + .span12, + .row-fluid .span12 { + width: 100%; + -webkit-box-sizing: border-box; -moz-box-sizing: border-box; + box-sizing: border-box; + } + .row-fluid [class*="offset"]:first-child { + margin-left: 0; + } + .input-large, + .input-xlarge, + .input-xxlarge, + input[class*="span"], + select[class*="span"], + textarea[class*="span"], + .uneditable-input { + display: block; + width: 100%; + min-height: 30px; -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .input-prepend input, + .input-append input, + .input-prepend input[class*="span"], + .input-append input[class*="span"] { + display: inline-block; + width: auto; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 0; + } + .modal { + position: fixed; + top: 20px; + left: 20px; + right: 20px; + width: auto; margin: 0; - border: none; - padding: 12px 10px 0 110px; - height: 42px; - background: none; - font-size: 16px; - font-weight: normal; - - padding-left: 40px; - color: black; -// background: url(./images/old/iPhone/listArrow.png) no-repeat right center; - background: url(data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAYAAAB4d5a9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAKVJREFUeNpi/P//PwOtARMDHcDwsYQFRJSXl8P4dVC6CZvizs5O8i1BsqARid9Ei+BiQ2KDLKumhSU1QNyKxG+hlkXoEQ+yqAPNogpapK5KNIvaKbUIVxKeAsTvkPg5QCxETUukgfgAkqFPgdgBzVKKLIFZoIJmwR1qBRdNLEC2BJQpV9LCAmRL/gBxAtRwqlqAXqzcgRrOQE0LQIBxtNIiBQAEGAA7xCa2yF9zEgAAAABJRU5ErkJgggo=) no-repeat right center; + } + .modal.fade { + top: -100px; + } + .modal.fade.in { + top: 20px; + } } - -body[orientation="landscape"] div.cardDetailPanel > fieldset > div.row > span.directLogin { - padding-left: 50px; +@media (max-width: 480px) { + .nav-collapse { + -webkit-transform: translate3d(0, 0, 0); + } + .page-header h1 small { + display: block; + line-height: 20px; + } + input[type="checkbox"], + input[type="radio"] { + border: 1px solid #ccc; + } + .form-horizontal .control-label { + float: none; + width: auto; + padding-top: 0; + text-align: left; + } + .form-horizontal .controls { + margin-left: 0; + } + .form-horizontal .control-list { + padding-top: 0; + } + .form-horizontal .form-actions { + padding-left: 10px; + padding-right: 10px; + } + .media .pull-left, + .media .pull-right { + float: none; + display: block; + margin-bottom: 10px; + } + .media-object { + margin-right: 0; + margin-left: 0; + } + .modal { + top: 10px; + left: 10px; + right: 10px; + } + .modal-header .close { + padding: 10px; + margin: -10px; + } + .carousel-caption { + position: static; + } } - -div.cardDetailPanel h2 { - margin: 0 0 8px 14px; - font-size: inherit; +@media (max-width: 979px) { + body { + padding-top: 0; + } + .navbar-fixed-top, + .navbar-fixed-bottom { + position: static; + } + .navbar-fixed-top { + margin-bottom: 20px; + } + .navbar-fixed-bottom { + margin-top: 20px; + } + .navbar-fixed-top .navbar-inner, + .navbar-fixed-bottom .navbar-inner { + padding: 5px; + } + .navbar .container { + width: auto; + padding: 0; + } + .navbar .brand { + padding-left: 10px; + padding-right: 10px; + margin: 0 0 0 -5px; + } + .nav-collapse { + clear: both; + } + .nav-collapse .nav { + float: none; + margin: 0 0 10px; + } + .nav-collapse .nav > li { + float: none; + } + .nav-collapse .nav > li > a { + margin-bottom: 2px; + } + .nav-collapse .nav > .divider-vertical { + display: none; + } + .nav-collapse .nav .nav-header { + color: #777777; + text-shadow: none; + } + .nav-collapse .nav > li > a, + .nav-collapse .dropdown-menu a { + padding: 9px 15px; font-weight: bold; - color: #4d4d70; - text-shadow: rgba(255, 255, 255, 0.75) 1px 1px 0; + color: #777777; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + } + .nav-collapse .btn { + padding: 4px 10px 4px; + font-weight: normal; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + } + .nav-collapse .dropdown-menu li + li a { + margin-bottom: 2px; + } + .nav-collapse .nav > li > a:hover, + .nav-collapse .dropdown-menu a:hover { + background-color: #f2f2f2; + } + .navbar-inverse .nav-collapse .nav > li > a, + .navbar-inverse .nav-collapse .dropdown-menu a { + color: #999999; + } + .navbar-inverse .nav-collapse .nav > li > a:hover, + .navbar-inverse .nav-collapse .dropdown-menu a:hover { + background-color: #111111; + } + .nav-collapse.in .btn-group { + margin-top: 5px; + padding: 0; + } + .nav-collapse .dropdown-menu { + position: static; + top: auto; + left: auto; + float: none; + display: none; + max-width: none; + margin: 0 15px; + padding: 0; + background-color: transparent; + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + } + .nav-collapse .open > .dropdown-menu { + display: block; + } + .nav-collapse .dropdown-menu:before, + .nav-collapse .dropdown-menu:after { + display: none; + } + .nav-collapse .dropdown-menu .divider { + display: none; + } + .nav-collapse .nav > li > .dropdown-menu:before, + .nav-collapse .nav > li > .dropdown-menu:after { + display: none; + } + .nav-collapse .navbar-form, + .nav-collapse .navbar-search { + float: none; + padding: 10px 15px; + margin: 10px 0; + border-top: 1px solid #f2f2f2; + border-bottom: 1px solid #f2f2f2; + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); + box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); + } + .navbar-inverse .nav-collapse .navbar-form, + .navbar-inverse .nav-collapse .navbar-search { + border-top-color: #111111; + border-bottom-color: #111111; + } + .navbar .nav-collapse .nav.pull-right { + float: none; + margin-left: 0; + } + .nav-collapse, + .nav-collapse.collapse { + overflow: hidden; + height: 0; + } + .navbar .btn-navbar { + display: block; + } + .navbar-static .navbar-inner { + padding-left: 10px; + padding-right: 10px; + } } - -body[orientation="portrait"] > * { - width: 320px; +@media (min-width: 980px) { + .nav-collapse.collapse { + height: auto !important; + overflow: visible !important; + } } - -body[orientation="landscape"] > * { - width: 480px; +div.spinner { + position: relative; + width: 100px; + height: 100px; + display: inline-block; +} +div.spinner div { + width: 12%; + height: 26%; + background: #000; + position: absolute; + left: 44.5%; + top: 37%; + opacity: 0; + -webkit-animation: fade 1s linear infinite; + -webkit-border-radius: 50px; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.2); +} +div.spinner div.bar01 { + -webkit-transform: rotate(0deg) translate(0, -142%); + -webkit-animation-delay: 0s; +} +div.spinner div.bar02 { + -webkit-transform: rotate(30deg) translate(0, -142%); + -webkit-animation-delay: -0.9167s; +} +div.spinner div.bar03 { + -webkit-transform: rotate(60deg) translate(0, -142%); + -webkit-animation-delay: -0.833s; +} +div.spinner div.bar04 { + -webkit-transform: rotate(90deg) translate(0, -142%); + -webkit-animation-delay: -0.75s; +} +div.spinner div.bar05 { + -webkit-transform: rotate(120deg) translate(0, -142%); + -webkit-animation-delay: -0.667s; +} +div.spinner div.bar06 { + -webkit-transform: rotate(150deg) translate(0, -142%); + -webkit-animation-delay: -0.5833s; +} +div.spinner div.bar07 { + -webkit-transform: rotate(180deg) translate(0, -142%); + -webkit-animation-delay: -0.5s; +} +div.spinner div.bar08 { + -webkit-transform: rotate(210deg) translate(0, -142%); + -webkit-animation-delay: -0.41667s; +} +div.spinner div.bar09 { + -webkit-transform: rotate(240deg) translate(0, -142%); + -webkit-animation-delay: -0.333s; +} +div.spinner div.bar10 { + -webkit-transform: rotate(270deg) translate(0, -142%); + -webkit-animation-delay: -0.25s; +} +div.spinner div.bar11 { + -webkit-transform: rotate(300deg) translate(0, -142%); + -webkit-animation-delay: -0.1667s; +} +div.spinner div.bar12 { + -webkit-transform: rotate(330deg) translate(0, -142%); + -webkit-animation-delay: -0.0833s; +} +@-webkit-keyframes fade { + from { + opacity: 1; + } + to { + opacity: 0.25; + } } -*/
\ No newline at end of file diff --git a/frontend/gamma/css/static.css b/frontend/gamma/css/static.css index 9953a8d..81725c5 100644 --- a/frontend/gamma/css/static.css +++ b/frontend/gamma/css/static.css @@ -1,118 +1,116 @@ /* -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/. */ body { padding: 0px; margin: 0px; font-family: Helvetica, Arial, Geneva, sans-serif; color: #666666; } div.header { padding: 20px 25px; background-color: #1f2148; } div#logo { background: url(./images/old/logo.png); width: 150px; height: 39px; display: block; } h5.clipperzPayoff { color: white; font-size: 13pt; font-weight: normal; padding-left: 20px; white-space: nowrap; margin: 0px; padding-left: 4px; } /* h1 { font-size: 40pt; color: #333366; } h1 span.logo_z { color: #ff9400; } */ div.contentWrapper { padding: 20px; } div.block1 { float: left; margin-right: 40px; } div.block2 { float: left; } div.languageBlock { clear: both; padding-top: 20px; } div.flags { float: left; } div.content { float: left; margin-left: 20px; width: 300px; } h3 { margin: 0px; padding-top: 10px; } p { font-size: 10pt; line-height: 20px; } /* @group RSS feed */ body.iFrame { margin: 0px; padding: 0px; border: 0px; font-family: Helvetica, Arial, Geneva, sans-serif; } div#feedContent ul { list-style-type: none; padding: 0px; margin: 0px; } div#feedContent ul li { display: none; } div#feedContent ul li.selected { display: block; padding-top: 6px; } div#feedContent ul li.selected em.date { display: none; } div#feedContent ul li.selected a { display: none; } div#feedContent ul li.selected h2 { font-size: 8pt; color: #c3c4cf; diff --git a/frontend/gamma/css/web.css b/frontend/gamma/css/web.css index 5d8bc20..011831a 100644 --- a/frontend/gamma/css/web.css +++ b/frontend/gamma/css/web.css @@ -1,118 +1,116 @@ /* -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/. */ /* Color list: - login box: light #ff9955 dark #ff6622 - login button: regular #dd5500 hover #773311 - login translations: box: #cc6622; not-selected: color: #ddaa99 background: #994422 selected: #772211; */ html { height: 100%; } body { font-family: Helvetica-Neue, Helvetica, Arial, Geneva, sans-serif; margin: 0px; } div.modalDialogMask.userInfoBoxMask { -moz-opacity: 0.0; opacity: .0; filter: alpha(opacity=0); z-index: 19000; } .reset-margin { margin: 0px; padding: 0px; border: 0px; } .clear { clear: both; } .hidden_none { display: none; visibility: hidden; } .keepTogether { display: inline-block; white-space: nowrap; } #mainDiv { margin: 0 auto; } /* Color list: - login box: light #ff9955 dark #ff6622 - login button: regular #dd5500 hover #773311 - login translations: box: #cc6622; not-selected: color: #ddaa99 background: #994422 selected: #772211; */ html { height: 100%; } body { font-family: Helvetica-Neue, Helvetica, Arial, Geneva, sans-serif; margin: 0px; } div.modalDialogMask.userInfoBoxMask { -moz-opacity: 0.0; opacity: .0; filter: alpha(opacity=0); z-index: 19000; } .reset-margin { margin: 0px; padding: 0px; border: 0px; } .clear { clear: both; } .hidden_none { display: none; visibility: hidden; } .keepTogether { display: inline-block; white-space: nowrap; } @@ -121,593 +119,600 @@ div.modalDialogMask.userInfoBoxMask { } div#loading { width: 100%; height: 100%; display: table; background-image: -ms-radial-gradient(center, circle farthest-corner, #4d52b3 0%, #1f2148 100%); /* IE10 */ background-image: -moz-radial-gradient(center, circle farthest-corner, #4d52b3 0%, #1f2148 100%); /* Mozilla Firefox */ background-image: -o-radial-gradient(center, circle farthest-corner, #4d52b3 0%, #1f2148 100%); /* Opera */ background-image: -webkit-radial-gradient(center, circle farthest-corner, #4d52b3 0%, #1f2148 100%); /* Webkit (Chrome 11+) */ background-image: radial-gradient(center, circle farthest-corner, #4d52b3 0%, #1f2148 100%); /* Proposed W3C Markup */ background-image: -webkit-gradient(radial, center center, 0, center center, 495, color-stop(0, #4d52b3), color-stop(1, #1f2148)); /* Webkit (Safari/Chrome 10) */ } div#loading div { display: table-cell; vertical-align: middle; width: 100%; text-align: center; } div#loading div h1 { font-size: 40pt; color: #ffffff; text-shadow: -1px -1px 2px #2e316c, 1px 1px 1px #454aa1; } div#loading div h3 { font-size: 18pt; text-shadow: -1px -1px 1px #2e316c, 1px 1px 1px #454aa1; color: #1f2148; } div#loading div h5 { padding-left: 20px; color: #ff9200; } /* Color list: - login box: light #ff9955 dark #ff6622 - login button: regular #dd5500 hover #773311 - login translations: box: #cc6622; not-selected: color: #ddaa99 background: #994422 selected: #772211; */ html { height: 100%; } body { font-family: Helvetica-Neue, Helvetica, Arial, Geneva, sans-serif; margin: 0px; } div.modalDialogMask.userInfoBoxMask { -moz-opacity: 0.0; opacity: .0; filter: alpha(opacity=0); z-index: 19000; } .reset-margin { margin: 0px; padding: 0px; border: 0px; } .clear { clear: both; } .hidden_none { display: none; visibility: hidden; } .keepTogether { display: inline-block; white-space: nowrap; } #mainDiv { margin: 0 auto; } div.tooltip { position: absolute; z-index: 30001; } div.tooltip div.tooltip_body { border-radius: 8px; -moz-border-radius: 8px; -webkit-border-radius: 8px; background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#bbbbbb), to(#555555)); background: -moz-linear-gradient(0% 100% 90deg, #555555, #bbbbbb); + background: linear-gradient(0deg, #555555, #bbbbbb); -webkit-box-shadow: 4px 4px 10px #333333; -moz-box-shadow: 4px 4px 10px #333333; box-shadow: 4px 4px 10px #333333; border-top: 1px solid #d4d4d4; border-left: 1px solid #a2a2a2; border-right: 1px solid #6f6f6f; border-bottom: 1px solid #3c3c3c; } div.tooltip div.tooltip_body span { display: block; padding: 10px; font-size: 10pt; color: white; } div.tooltip div.tooltip_body div.tooltip_text { width: 200px; } div.tooltip div.tooltip_arrow { position: absolute; width: 0; height: 0; border: 6px solid transparent; } div.tooltip.BELOW div.tooltip_arrow { top: -12px; left: 97px; border-bottom: 6px solid #bbbbbb; } div.tooltip.ABOVE div.tooltip_arrow { position: static; margin-left: 97px; border-top: 6px solid #555555; } div.tooltip.LEFT div.tooltip_arrow { left: 203px; top: 10px; border-left: 6px solid #747474; } div.tooltip.LEFT div.tooltip_body div.tooltip_text { min-height: 45px; } div.tooltip.RIGHT div.tooltip_arrow { left: -12px; top: 10px; border-right: 6px solid #9c9c9c; } div.tooltip.RIGHT div.tooltip_body div.tooltip_text { min-height: 45px; } .button.default { display: inline-block; height: 20px; cursor: pointer; background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ffa76f), to(#ff6622)); background: -moz-linear-gradient(0% 100% 90deg, #ff6622, #ffa76f); + background: linear-gradient(0deg, #ff6622, #ffa76f); border-radius: 5; -moz-border-radius: 5; -webkit-border-radius: 5; border: 1px solid #ff7f46; padding-top: 4px; padding-left: 15px; padding-right: 15px; padding-bottom: 2px; color: white; font-weight: lighter; text-shadow: -1px -1px 1px #ff6622, 1px 1px 1px #ffa76f; text-decoration: none; font-weight: normal; } .button.default:hover { background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ff8e46), to(#ff6622)); background: -moz-linear-gradient(0% 100% 90deg, #ff6622, #ff8e46); + background: linear-gradient(0deg, #ff6622, #ff8e46); } .button { display: inline-block; height: 20px; cursor: pointer; background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#bfbfbf), to(#999999)); background: -moz-linear-gradient(0% 100% 90deg, #999999, #bfbfbf); + background: linear-gradient(0deg, #999999, #bfbfbf); border-radius: 5; -moz-border-radius: 5; -webkit-border-radius: 5; border: 1px solid #ababab; padding-top: 4px; padding-left: 15px; padding-right: 15px; padding-bottom: 2px; color: white; font-weight: lighter; text-shadow: -1px -1px 1px #999999, 1px 1px 1px #bfbfbf; text-decoration: none; } .button:hover { background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ababab), to(#999999)); background: -moz-linear-gradient(0% 100% 90deg, #999999, #ababab); + background: linear-gradient(0deg, #999999, #ababab); } /* Color list: - login box: light #ff9955 dark #ff6622 - login button: regular #dd5500 hover #773311 - login translations: box: #cc6622; not-selected: color: #ddaa99 background: #994422 selected: #772211; */ html { height: 100%; } body { font-family: Helvetica-Neue, Helvetica, Arial, Geneva, sans-serif; margin: 0px; } div.modalDialogMask.userInfoBoxMask { -moz-opacity: 0.0; opacity: .0; filter: alpha(opacity=0); z-index: 19000; } .reset-margin { margin: 0px; padding: 0px; border: 0px; } .clear { clear: both; } .hidden_none { display: none; visibility: hidden; } .keepTogether { display: inline-block; white-space: nowrap; } #mainDiv { margin: 0 auto; } div.pageHeaderAndBody { height: 100%; } div.pageHeaderAndBody div#pageBody { min-width: 1013px; padding-bottom: 90px; } div.pageHeaderAndBody div.pageHeader { background-color: #1f2148; min-width: 1013px; } div.pageHeaderAndBody div.pageHeader div#miscLinks { float: right; } div.pageHeaderAndBody div.pageHeader div#miscLinks ul { margin: 12px 0px 0px; padding: 15px; } div.pageHeaderAndBody div.pageHeader div#miscLinks ul li { display: inline; margin: 0px; padding: 0px; border: 0px; } div.pageHeaderAndBody div.pageHeader div#miscLinks ul li a { color: #ffffff; margin: 0px; padding: 0px; border: 0px; padding: 15px; border-left: 1px solid #3e428f; font-weight: normal; text-decoration: none; font-size: 12pt; min-width: 70px; } div.pageHeaderAndBody div.pageHeader div#miscLinks ul li a:hover { color: #b8bae1; } div.pageHeaderAndBody div.pageHeader div#miscLinks ul li a#donateHeaderLink { border-left: 0px; } div.pageHeaderAndBody div.pageHeader div#logoFrame { padding: 16px 16px 60px 16px; min-height: 44px; } div.pageHeaderAndBody div.pageHeader div#logoFrame a { color: white; text-decoration: none; } div.pageHeaderAndBody div.pageHeader div#logoFrame a canvas { margin: 0px; padding: 0px; border: 0px; width: 150px; height: 39px; } div.pageHeaderAndBody div.pageHeader div#logoFrame a h5.clipperzPayoff { font-size: 13pt; font-weight: normal; white-space: nowrap; margin: 0px; padding-left: 4px; } div.pageHeaderAndBody div.pageHeader div#featureTabs table { width: 100%; padding: 6px; padding-left: 15px; padding-right: 15px; padding-bottom: 46px; } div.pageHeaderAndBody div.pageHeader div#featureTabs table tr td { width: 25%; vertical-align: top; font-size: 11pt; color: white; } div.pageHeaderAndBody div.pageHeader div#featureTabs table tr td img { float: left; } div.pageHeaderAndBody div.pageHeader div#featureTabs table tr td span { display: block; padding: 5 10 5 85; } div.pageHeaderAndBody div.pageHeader div#featureTabs canvas.featureIcon { width: 76px; height: 76px; display: block; float: left; background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ffad79), to(#ff6622)); background: -moz-linear-gradient(0% 100% 90deg, #ff6622, #ffad79); + background: linear-gradient(0deg, #ff6622, #ffad79); border-radius: 38px; -moz-border-radius: 38px; -webkit-border-radius: 38px; } div.pageHeaderAndBody div.pageHeader div#news { top: -82px; left: 240px; width: 310px; height: 90px; position: absolute; background-color: #616475; -webkit-border-bottom-left-radius: 8px; -moz-border-radius-bottomleft: 8px; border-bottom-left-radius: 8px; -webkit-border-bottom-right-radius: 8px; -moz-border-radius-bottomright: 8px; border-bottom-right-radius: 8px; -webkit-box-shadow: 2px 2px 9px #333333; -moz-box-shadow: 2px 2px 9px #333333; box-shadow: 2px 2px 9px #333333; } div.pageHeaderAndBody div.pageHeader div#news div#newsframe { margin-left: 10px; margin-right: 10px; height: 75px; overflow: hidden; } div.pageHeaderAndBody div.pageHeader div#news div#newsframe iframe { width: 290px; border: 0px; color: #616475; background-color: #616475; } div.pageHeaderAndBody div.pageHeader div#news div.grip { width: 310px; height: 6px; margin-top: 2px; cursor: pointer; } div.pageHeaderAndBody div.pageHeader div#news div.grip div.gripHandler { margin-left: auto; margin-right: auto; margin-top: 8px; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; } div.pageHeaderAndBody div.pageHeader div#news.open div.grip div.gripHandler { border-bottom: 5px solid #e9e9ec; } div.pageHeaderAndBody div.pageHeader div#news.hidden div.grip div.gripHandler { border-top: 5px solid #e9e9ec; } div.pageFooter { margin-top: -90px; height: 90px; clear: both; } div.pageFooter div.footerWrapper { clear: both; padding-top: 10px; } div.pageFooter div.footerWrapper div.footerContent { background-color: #eaebe6; padding: 20px; font-size: 8pt; } div.pageFooter div.footerWrapper div.footerContent canvas.footerStarIcon { width: 40px; height: 40px; float: left; } div.pageFooter div.footerWrapper div.footerContent span.copyright { padding-left: 10px; color: #a0a0a0; } div.pageFooter div.footerWrapper div.footerContent a { padding-left: 50px; display: block; color: #888888; font-weight: bold; text-decoration: none; } div.pageFooter div.footerWrapper div.footerContent div.applicationVersion { padding: 8px; color: #888888; background-color: #d2d2d2; position: relative; top: -40px; float: right; } div.pageFooter div.footerWrapper div.footerContent div.applicationVersion a { padding-left: 0px; display: inline; } /* Color list: - login box: light #ff9955 dark #ff6622 - login button: regular #dd5500 hover #773311 - login translations: box: #cc6622; not-selected: color: #ddaa99 background: #994422 selected: #772211; */ html { height: 100%; } body { font-family: Helvetica-Neue, Helvetica, Arial, Geneva, sans-serif; margin: 0px; } div.modalDialogMask.userInfoBoxMask { -moz-opacity: 0.0; opacity: .0; filter: alpha(opacity=0); z-index: 19000; } .reset-margin { margin: 0px; padding: 0px; border: 0px; } .clear { clear: both; } .hidden_none { display: none; visibility: hidden; } .keepTogether { display: inline-block; white-space: nowrap; } #mainDiv { margin: 0 auto; } div#loginBox { width: 273px; z-index: 19000; top: -30px; right: 30px; position: relative; float: right; } div#loginBox div.header { height: 25px; width: 273px; background-color: #ff9b5a; -webkit-border-top-left-radius: 20px; -moz-border-radius-topleft: 20px; border-top-left-radius: 20px; -webkit-border-top-right-radius: 20px; -moz-border-radius-topright: 20px; border-top-right-radius: 20px; } div#loginBox div.body { background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ff9b5a), to(#ff6622)); background: -moz-linear-gradient(0% 100% 90deg, #ff6622, #ff9b5a); + background: linear-gradient(0deg, #ff6622, #ff9b5a); } div#loginBox div.body h4 { color: #ffffff; font-size: 16pt; font-weight: normal; padding-left: 20px; margin: 0px; } div#loginBox div.body form.loginForm { padding: 5px 20px 0px; margin-bottom: 0px; } div#loginBox div.body form.loginForm label { color: #ffffff; font-size: 10pt; display: block; padding-top: 5px; } div#loginBox div.body form.loginForm label.checkbox { display: inline; } div#loginBox div.body form.loginForm input { width: 230px; font-size: 14pt; color: #333366; background-color: #ffffff; border: 1px solid #bb4924; padding: 2px 5px; height: 28px; } div#loginBox div.body form.loginForm input.checkbox { margin: 10px 8px 0px 0px; height: auto; width: auto; border: 0px; } div#loginBox div.body form.loginForm input.checkbox:hover { cursor: pointer; } div#loginBox div.body form.loginForm input.otp { width: 57px; display: inline; padding-left: 0px; padding-right: 0px; height: 28px; font: 8pt monospace; } div#loginBox div.body form.loginForm input.submit { margin: 0px 45px; width: 140px; color: #ffffff; background-color: #d44100; border: 1px solid #bb4924; padding: 6px; font-size: 12pt; height: auto; } div#loginBox div.body form.loginForm input.submit:hover { color: #ffffff; background-color: #7e2700; cursor: pointer; } div#loginBox div.body form.loginForm ul { list-style-type: none; padding: 0px; margin: 0px; } div#loginBox div.body form.loginForm ul li { display: block; } div#loginBox div.body form.loginForm div.translations { margin: 15px -20px; background-color: #c87b59; } div#loginBox div.body form.loginForm div.translations h4 { font-size: 9pt; padding: 6px 20px 0px; } div#loginBox div.body form.loginForm div.translations ul { margin: 0px; padding: 5px 10px 10px; margin-bottom: 15px; } div#loginBox div.body form.loginForm div.translations ul li { font-size: 8pt; color: #ddaa99; background-color: #994422; display: inline-block; padding: 2px 4px; margin: 1px; } div#loginBox div.body form.loginForm div.translations ul li.selected { color: #ffffff; background-color: #772211; } div#loginBox div.body form.loginForm div.translations ul li.selected:hover { @@ -799,192 +804,193 @@ div.activeFeatures div.keepTogether canvas { } div.activeFeatures div.createAccountLink { display: inline-block; width: 282; height: 65px; background-image: url(./images/old/home/register.png); margin-right: 20px; } div.activeFeatures div.createAccountLink a.createAccountLink { position: relative; top: -92px; left: 5px; } div.activeFeatures div.createAccountLink a.createAccountLink span.payoff { margin-top: 23px; margin-left: 40px; font-size: 17pt; color: #64626c; } div.activeFeatures div.createAccountLink a.createAccountLink span.link { padding-left: 40px; padding-right: 50px; padding-bottom: 10px; font-size: 12pt; } div.activeFeatures div.createAccountLink:hover { background-image: url(./images/old/home/register_selected.png); } div.activeFeatures div.createAccountLink:hover a.createAccountLink span.payoff { color: #54535a; } div.activeFeatures div.createAccountLink:hover a.createAccountLink span.link { color: white; } div.activeFeatures div.createAccountLink canvas { width: 282px; height: 93px; } /* Color list: - login box: light #ff9955 dark #ff6622 - login button: regular #dd5500 hover #773311 - login translations: box: #cc6622; not-selected: color: #ddaa99 background: #994422 selected: #772211; */ html { height: 100%; } body { font-family: Helvetica-Neue, Helvetica, Arial, Geneva, sans-serif; margin: 0px; } div.modalDialogMask.userInfoBoxMask { -moz-opacity: 0.0; opacity: .0; filter: alpha(opacity=0); z-index: 19000; } .reset-margin { margin: 0px; padding: 0px; border: 0px; } .clear { clear: both; } .hidden_none { display: none; visibility: hidden; } .keepTogether { display: inline-block; white-space: nowrap; } #mainDiv { margin: 0 auto; } div.userInfoBox { position: absolute; width: 160px; height: 120px; top: 100px; left: 15px; color: white; background-color: #ff9955; background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ff9a56), to(#ff6723)); background: -moz-linear-gradient(0% 100% 90deg, #ff6723, #ff9a56); + background: linear-gradient(0deg, #ff6723, #ff9a56); border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; -webkit-box-shadow: 2px 2px 9px #333333; -moz-box-shadow: 2px 2px 9px #333333; box-shadow: 2px 2px 9px #333333; } div.userInfoBox.locked { z-index: 19001; } div.userInfoBox.locked div.header a.lockButton { background: url(./images/old/lock/locked.png) no-repeat -5px -2px; } div.userInfoBox.locked div.header a.lockButton:hover { background: url(./images/old/lock/locked_hover.png) no-repeat -5px -2px; } div.userInfoBox.locked div.body a { display: none; } div.userInfoBox div.header { height: 30px; } div.userInfoBox div.header h1 { font-size: 8pt; font-weight: normal; margin: 0px; padding-top: 12px; padding-left: 12px; } div.userInfoBox div.header a.lockButton { position: absolute; top: 8px; right: 12px; display: block; width: 15px; height: 20px; text-decoration: none; background: url(./images/old/lock/unlocked.png) no-repeat -5px -2px; } div.userInfoBox div.header a.lockButton:hover { background: url(./images/old/lock/unlocked_hover.png) no-repeat -5px -2px; } div.userInfoBox div.body { padding: 0px 12px; } div.userInfoBox div.body h3 { font-size: 11pt; font-weight: bold; margin: 0px; } div.userInfoBox div.body ul { font-size: 8pt; padding: 0px; margin: 4px 0px; list-style-position: inside; } div.userInfoBox div.body ul li span.number { font-weight: bold; padding-right: 3px; } div.userInfoBox div.body a { display: block; margin-top: 8px; border-top: 1px solid white; padding-top: 6px; font-size: 10pt; font-weight: bold; color: #d15a22; border-color: #fe9a5f; text-decoration: none; } div.userInfoBox div.body a:hover { color: #8c3b15; } div.sidePanels { float: left; margin-top: 106px; margin-left: 20px; width: 160px; } div.sidePanels div.tabSidePanel { margin-right: -10px; } div.sidePanels div.tabSidePanel ul { margin: 0px; padding-left: 0px; list-style-type: none; color: #f78b46; } div.sidePanels div.tabSidePanel ul.mainTabs { margin: 0px; } div.sidePanels div.tabSidePanel ul.mainTabs li a { display: block; line-height: 30px; height: 43px; @@ -1180,241 +1186,244 @@ div.groupSidePanel { padding: 0px 4px 0px 15px; line-height: 20px; } div.groupSidePanel ul.groups li a:hover { background-color: #aaaaaa; } div.groupSidePanel ul.groups li span.groupCardinality { float: right; font-size: 8pt; color: #dddddd; margin-right: 15px; margin-top: -17px; } div.groupSidePanel ul.groups li.selected a { background-color: #bbbbbb; } div.groupSidePanel ul.groups li.selected a:hover { background-color: #bbbbbb; } div.groupSidePanel ul.groups li.selected a { font-weight: bold; } */ } div.subPanelTabs ul { margin: 0px; margin-right: 7px; padding: 0px; } div.subPanelTabs ul li { display: inline-block; vertical-align: middle; height: 50px; border-right: 1px solid #eef0e3; border-bottom: 1px solid #d5d5bc; } div.subPanelTabs ul li.first { -webkit-border-top-left-radius: 20px; -moz-border-radius-topleft: 20px; border-top-left-radius: 20px; } div.subPanelTabs ul li.selected { background-color: #eef0e3; border-bottom: 1px solid #eef0e3; border-right: 1px solid #d5d5bc; } div.subPanelTabs ul li.selected:hover { border-right: 1px solid #d5d5bc; } div.subPanelTabs ul li.selected a { color: #444440; } div.subPanelTabs ul li:hover { border-right: 1px solid #d5d5bc; background-color: #eef0e3; } div.subPanelTabs ul li a { color: #787872; text-decoration: none; display: block; text-align: center; padding-top: 15px; padding-left: 20px; padding-right: 20px; font-size: 13pt; } div.subPanelContent { padding-top: 20px; padding-left: 30px; padding-right: 30px; min-height: 280px; color: #787872; margin: 0px 6px 0 9px; } div.subPanelContent h3 { margin: 0px; border: 0px; padding: 0px; } div.subPanelContent ul { margin: 0px; padding: 0px; list-style-type: none; } div.subPanelContent ul li { display: none; } div.subPanelContent ul li.selected { display: block; } .downloadOfflineCopy { display: inline-block; height: 20px; cursor: pointer; background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#59bc4c), to(#448833)); background: -moz-linear-gradient(0% 100% 90deg, #448833, #59bc4c); + background: linear-gradient(0deg, #448833, #59bc4c); border-radius: 5; -moz-border-radius: 5; -webkit-border-radius: 5; border: 1px solid #51a23d; padding-top: 4px; padding-left: 15px; padding-right: 15px; padding-bottom: 2px; color: white; font-weight: lighter; text-shadow: -1px -1px 1px #448833, 1px 1px 1px #59bc4c; text-decoration: none; } .downloadOfflineCopy:hover { background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#49a23d), to(#448833)); background: -moz-linear-gradient(0% 100% 90deg, #448833, #49a23d); + background: linear-gradient(0deg, #448833, #49a23d); } div.SimpleMessagePanel { position: relative; left: -225px; top: -70px; width: 450px; height: 140px; } div.SimpleMessagePanel div.body { padding: 20px; padding-bottom: 15px; background-color: #f1f1ef; -webkit-box-shadow: 2px 2px 9px #333333; -moz-box-shadow: 2px 2px 9px #333333; box-shadow: 2px 2px 9px #333333; border-radius: 10; -moz-border-radius: 10; -webkit-border-radius: 10; } div.SimpleMessagePanel div.body h3 { font-size: 14pt; font-weight: normal; margin: 0px; padding-top: 4px; color: #787872; } div.SimpleMessagePanel div.body div.img { width: 50px; height: 50px; float: left; margin-right: 15px; background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ff9b5a), to(#ff6622)); background: -moz-linear-gradient(0% 100% 90deg, #ff6622, #ff9b5a); + background: linear-gradient(0deg, #ff6622, #ff9b5a); border-radius: 25px; -moz-border-radius: 25px; -webkit-border-radius: 25px; } div.SimpleMessagePanel div.body div.img canvas { width: 50px; height: 50px; } div.SimpleMessagePanel div.body p { margin: 0; font-size: 10pt; font-weight: normal; color: #787872; padding-top: 10px; padding-bottom: 5px; line-height: 1.3; } div.SimpleMessagePanel div.body div.buttonArea { height: 40px; clear: both; } div.SimpleMessagePanel div.body div.buttonArea > div { float: right; margin-left: 15px; margin-top: 10px; } div.SimpleMessagePanel div.passphrase { padding-left: 65px; } div.SimpleMessagePanel div.passphrase input { width: 250px; font-size: 14pt; border: 1px solid #bb4924; color: #333366; background-color: white; padding: 2px 5px; height: 28px; } div.SimpleMessagePanel div.progressBarWrapper { margin-left: 80px; } /* @end */ /* @group Javascript Alert */ div#javaScriptAlert div.mask { position: fixed; top: 0px; left: 0px; right: 0px; bottom: 0px; background-color: black; z-index: 1001; -moz-opacity: 0.7; opacity: .70; filter: alpha(opacity=70); } div#javaScriptAlert div.header { height: 34px; width: 468; background-image: url(./images/old/alert/header.png); } div#javaScriptAlert div.body { background-image: url(./images/old/alert/body.png); padding: 0px 20px 10px 20px; } /* div#javaScriptAlert div.body div.alert { padding-left: 100px; background: url(./images/old/alert/alert.png) no-repeat; } */ /*div#javaScriptAlert div.body img.alert {*/ div#javaScriptAlert div.body div.alertLogo { float: left; background-image: url(./images/old/alert/alert.png); width: 88px; height: 88px; } div#javaScriptAlert div.body div.alert { padding-left: 100px; } div#javaScriptAlert div.footer { height: 34px; width: 468; background-image: url(./images/old/alert/footer.png); } div#javaScriptAlert div.message { position: relative; top: -150px; z-index: 1002; /* left: 100px; right: 100px; */ margin-left: auto; margin-right: auto; diff --git a/frontend/gamma/html/mobile_template.html b/frontend/gamma/html/mobile_template.html index 184fbd9..935fbe5 100644 --- a/frontend/gamma/html/mobile_template.html +++ b/frontend/gamma/html/mobile_template.html @@ -1,66 +1,67 @@ -<!doctype html> +<!DOCTYPE html> <!-- Conditional comment for mobile ie7 blogs.msdn.com/b/iemobile/ --> <!--[if IEMobile 7 ]> <html class="no-js iem7" lang="en"> <![endif]--> <!--[if (gt IEMobile 7)|!(IEMobile)]><!--> <html class="no-js" lang="en" manifest="mobile.appcache"> <!--<![endif]--> <head> <title>@page.title@</title> <meta charset="utf-8"> <meta name="HandheldFriendly" content="True"> <meta name="MobileOptimized" content="320"> - <meta name="viewport" content="width=device-width"> + <!-- meta name="viewport" content="width=device-width" --> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- link rel="apple-touch-icon-precomposed" ... --> <link rel="apple-touch-icon" sizes="114x114" href="data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAHIAAAByCAIAAAAAvxIqAAAD8GlDQ1BJQ0MgUHJvZmlsZQAAKJGNVd1v21QUP4lvXKQWP6Cxjg4Vi69VU1u5GxqtxgZJk6XpQhq5zdgqpMl1bhpT1za2021Vn/YCbwz4A4CyBx6QeEIaDMT2su0BtElTQRXVJKQ9dNpAaJP2gqpwrq9Tu13GuJGvfznndz7v0TVAx1ea45hJGWDe8l01n5GPn5iWO1YhCc9BJ/RAp6Z7TrpcLgIuxoVH1sNfIcHeNwfa6/9zdVappwMknkJsVz19HvFpgJSpO64PIN5G+fAp30Hc8TziHS4miFhheJbjLMMzHB8POFPqKGKWi6TXtSriJcT9MzH5bAzzHIK1I08t6hq6zHpRdu2aYdJYuk9Q/881bzZa8Xrx6fLmJo/iu4/VXnfH1BB/rmu5ScQvI77m+BkmfxXxvcZcJY14L0DymZp7pML5yTcW61PvIN6JuGr4halQvmjNlCa4bXJ5zj6qhpxrujeKPYMXEd+q00KR5yNAlWZzrF+Ie+uNsdC/MO4tTOZafhbroyXuR3Df08bLiHsQf+ja6gTPWVimZl7l/oUrjl8OcxDWLbNU5D6JRL2gxkDu16fGuC054OMhclsyXTOOFEL+kmMGs4i5kfNuQ62EnBuam8tzP+Q+tSqhz9SuqpZlvR1EfBiOJTSgYMMM7jpYsAEyqJCHDL4dcFFTAwNMlFDUUpQYiadhDmXteeWAw3HEmA2s15k1RmnP4RHuhBybdBOF7MfnICmSQ2SYjIBM3iRvkcMki9IRcnDTthyLz2Ld2fTzPjTQK+Mdg8y5nkZfFO+se9LQr3/09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CyF8/7YWLi/7m3w+eO3duPE7tYXynDff3x17YdU5qWr1kTg1Lnzcs9CWY7SDg9/3f/a0v7By/WdHU0RlbvWJJI85GkoimGAP5ZG7XLf2nndU//tVu0xjHya24CpPcXcfae+D48cSU5cuWVotuy7RUiR1NXvfQ4+ccp8Izn4phW8a7vcqWldOYfoERgqGqTrnta4/3vrn3ICqUdL8MrsZKFwBnz51/9VBm+oL1cxuMjKt+8zfifE/Fxr6GQl8kmvHNXD9HSP7a57pv/NvtHd3dw82N/SGBy75P/cmW//rA6qv1xAwwSf2fn77z3ttXXBP/FGiccTXW2L1/p5vABCYwgQlMYAL/2fH/AdkCEQl+/Ar/AAAAAElFTkSuQmCCCg=="> <link rel="apple-touch-icon" sizes="72x72" href="data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAIAAADajyQQAAAD8GlDQ1BJQ0MgUHJvZmlsZQAAKJGNVd1v21QUP4lvXKQWP6Cxjg4Vi69VU1u5GxqtxgZJk6XpQhq5zdgqpMl1bhpT1za2021Vn/YCbwz4A4CyBx6QeEIaDMT2su0BtElTQRXVJKQ9dNpAaJP2gqpwrq9Tu13GuJGvfznndz7v0TVAx1ea45hJGWDe8l01n5GPn5iWO1YhCc9BJ/RAp6Z7TrpcLgIuxoVH1sNfIcHeNwfa6/9zdVappwMknkJsVz19HvFpgJSpO64PIN5G+fAp30Hc8TziHS4miFhheJbjLMMzHB8POFPqKGKWi6TXtSriJcT9MzH5bAzzHIK1I08t6hq6zHpRdu2aYdJYuk9Q/881bzZa8Xrx6fLmJo/iu4/VXnfH1BB/rmu5ScQvI77m+BkmfxXxvcZcJY14L0DymZp7pML5yTcW61PvIN6JuGr4halQvmjNlCa4bXJ5zj6qhpxrujeKPYMXEd+q00KR5yNAlWZzrF+Ie+uNsdC/MO4tTOZafhbroyXuR3Df08bLiHsQf+ja6gTPWVimZl7l/oUrjl8OcxDWLbNU5D6JRL2gxkDu16fGuC054OMhclsyXTOOFEL+kmM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AUXHu4eN9p8vJ7TWMPBWRFaerFqoUGMwI28+ibjDVVRWMbugeMJ7qLHnsj0t49Ybyli9eevsHDp686crwed25YglUMC1yqChL0hBxnel2P72mNRMev7voGgirvWlQg2Q2aUUxl5eHz41IL+iPZr551P7e/x+cPpOHJoAOSJB05feWabJtfmi/JTCSyWVSHJwtKwmW/49l3o+cvjyf7Catvj5QUed1Gv8vGOBIfy4D2bjR3kCsR77OHDQeOdlBdTfMjmVkBAKyhpedEs1Y622vkNUWR7CadcNApWgbJgXPmlw9dS38kxKh+oRMV1zstCDodAIGk4FILuodMx3qLntwfqm/tncyh0mTrgYGhwAdnhgyOAq9TDYQiVhN6/TjXY3/yTSkUyVzbhyNSV9ixvJDYBFlWceEy+mXnnnO5zx/sDgaDGYdPjRWAqionzve3h/PmFWVJIb8vKv72H5a6yxmkd9g6+0Imh6fYEuobRFvU++vDwnsnO6Z0ljTVfQFr7Rw62mwsLSmqv8q/dHhgKueX7GKHtHhe0WW//Yn9gab2/9a/ExiMZqt11hcYaLfbBHEGzue/tP9P+zclUOrCr+J20QAAAABJRU5ErkJgggo="> <meta http-equiv="cleartype" content="on"> <meta name="apple-mobile-web-app-capable" content="yes"> <!-- link rel="apple-touch-startup-image" href="data:image/png;charset=utf-8;base64,iVBORw0K...ggo=" --> <!-- @copyright@ --> @css@ <link rel="shortcut icon" href="./clipperz.ico" /> <meta name="description" content="Login to your web accounts with just one click. Never type a password again! Use multiple complex passwords and forget them. A password manager that enhances your online security." /> <meta name="keywords" content="password manager,gestor de contraseñas,gerenciador de senhas,Kennwortmanager,passwords,security,privacy,cryptography" /> <script> Clipperz_IEisBroken = false; Clipperz_normalizedNewLine = '\n'; Clipperz_dumpUrl = "/dump/"; </script> @js_LINKED@ </head> <body> <div id="mainDiv"> <div id="loading"> <div> <!-- a href="http://www.clipperz.com" target="_blank"><div id="logo"></div></a --> <h1>clipperz</h1> <h3 class="clipperzPayoff">keep it to yourself!</h3> <!-- h5>loading ...</h5 --> </div> </div> @js_EMBEDDED@ </div> <!-- div id="applicationVersionType" class="@application.version.type@"></div --> <script> Clipperz.PM.Proxy.defaultProxy = new Clipperz.PM.Proxy.JSON({'url':'@request.path@', 'shouldPayTolls':@should.pay.toll@}); /*offline_data_placeholder*/ </script> </body> </html> diff --git a/frontend/gamma/js/Bookmarklet.js b/frontend/gamma/js/Bookmarklet.js index bcdcc46..9e74ae9 100644 --- a/frontend/gamma/js/Bookmarklet.js +++ b/frontend/gamma/js/Bookmarklet.js @@ -1,118 +1,116 @@ /* -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_copiedContentToClipboard = false; //############################################################################# // Simple Set Clipboard System // Author: Joseph Huckaby var ZeroClipboard = { version: "1.0.4", clients: {}, // registered upload clients on page, indexed by id // moviePath: 'ZeroClipboard.swf', // URL to movie // moviePath: 'data:application/octet-stream;charset=utf-8;base64,Q1dTCYgGAAB4nH1V61LbRhTeXV2OJNsYczFgIEC4JCGABSRpSy+B2JDQQt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nv5q+U+9t4/MojnYLtEhc3jljjGCGT4Z7bXL7bG9Udwefz9xjk9Vhl3crtjqqXwifS8hWzblJToZmylTbk+vYuMOjsECWjZnkuDZvTmcwbscGvOiKVcxXThZNGVjkQebS+17pmLcJwl8sI1v4PI2uYEPt4UbuLItxrCwoplgrMagaOZTENf2NK0NryE8gWRCVE3p6ae5j3aOFwyZb8of6RT3FYn7Y9yvmjlDx1mKGncSfVTC9Z/v6QyZE7q5rpsburmpm490U+K/12g6WXYc+nR4CKX/H31zGG1z5m9Pt5okCg==', // moviePath: 'http://localhost:8000/tests/js/tests/Bookmarklet/ZeroClipboard.swf', moviePath: 'http://www.clipperz.com/files/clipperz.com/bookmarklet/0.3.0/ZeroClipboard_1.0.4.swf', // moviePath: './ZeroClipboard.swf', nextId: 1, // ID of next movie $: function(thingy) { // simple DOM lookup utility function if (typeof(thingy) == 'string') thingy = document.getElementById(thingy); if (!thingy.addClass) { // extend element with a few useful methods thingy.hide = function() { this.style.display = 'none'; }; thingy.show = function() { this.style.display = ''; }; thingy.addClass = function(name) { this.removeClass(name); this.className += ' ' + name; }; thingy.removeClass = function(name) { this.className = this.className.replace( new RegExp("\\s*" + name + "\\s*"), " ").replace(/^\s+/, '').replace(/\s+$/, ''); }; thingy.hasClass = function(name) { return !!this.className.match( new RegExp("\\s*" + name + "\\s*") ); } } return thingy; }, setMoviePath: function(path) { // set path to ZeroClipboard.swf this.moviePath = path; }, dispatch: function(id, eventName, args) { // receive event from flash movie, send to client var client = this.clients[id]; if (client) { client.receiveEvent(eventName, args); } }, register: function(id, client) { // register new client to receive events this.clients[id] = client; }, getDOMObjectPosition: function(obj) { // get absolute coordinates for dom element var info = { left: 0, top: 0, width: obj.width ? obj.width : obj.offsetWidth, height: obj.height ? obj.height : obj.offsetHeight }; while (obj) { info.left += obj.offsetLeft; info.top += obj.offsetTop; obj = obj.offsetParent; } return info; }, Client: function(elem) { // constructor for new simple upload client this.handlers = {}; // unique ID this.id = ZeroClipboard.nextId++; this.movieId = 'ZeroClipboardMovie_' + this.id; // register client with singleton to receive flash events ZeroClipboard.register(this.id, this); // create movie if (elem) this.glue(elem); } }; ZeroClipboard.Client.prototype = { id: 0, // unique ID for us ready: false, // whether movie is ready to receive events or not movie: null, // reference to movie object diff --git a/frontend/gamma/js/BookmarkletHash.js b/frontend/gamma/js/BookmarkletHash.js index c3039f5..11b472f 100644 --- a/frontend/gamma/js/BookmarkletHash.js +++ b/frontend/gamma/js/BookmarkletHash.js @@ -1,44 +1,42 @@ /* -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/. */ // 18f820faffcdb5e847d4c5d5c4a1de6743baa1a0 // 9b30434c73fb009b15fecaa904b44f9ced807577 // 9b30434c73fb009b15fecaa904b44f9ced807577 var xh; var documentText; try { xh=new XMLHttpRequest(); } catch(e) { xh=new ActiveXObject("Msxml2.XMLHTTP"); } xh.open("GET", window.location, false); xh.send(null); documentText = "#####" + xh.responseText + "####"; //documentText = document.body.innerHTML; //console.log(documentText);
\ No newline at end of file diff --git a/frontend/gamma/js/Bookmarklet_1.js b/frontend/gamma/js/Bookmarklet_1.js index c7c7ae6..89b83b1 100644 --- a/frontend/gamma/js/Bookmarklet_1.js +++ b/frontend/gamma/js/Bookmarklet_1.js @@ -1,118 +1,116 @@ /* -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/. */ _cble = null; //----------------------------------------------------------------------------- isLoginForm = function(aForm) { var inputFields; var passwordFieldsFound; var i,c; //console.log("is login form: " + aForm.name + " (" + aForm.id + ")"); passwordFieldsFound = 0; inputFields = aForm.elements; c = inputFields.length; for (i=0; i<c; i++) { if (inputFields[i].type == "password") { passwordFieldsFound ++; } } //console.log("number of password fields found: " + passwordFieldsFound); return (passwordFieldsFound == 1); }; //----------------------------------------------------------------------------- findLoginForm = function(aDocument, aLevel) { var result; var documentForms; var i,c; result = null; try { documentForms = aDocument.getElementsByTagName('form'); c = documentForms.length; for (i=0; (i<c) && (result == null); i++) { if (isLoginForm(documentForms[i])) { result = documentForms[i]; } } if ((result == null) && (aLevel == 0)) { var iFrames; iFrames = aDocument.getElementsByTagName('iframe'); c = iFrames.length; for (i=0; (i<c) && (result == null); i++) { result = findLoginForm(iFrames[i].contentDocument, (aLevel + 1)); } } } catch (e) { _cble = e; } return result; }; //----------------------------------------------------------------------------- inputElementValues = function(anInputElement) { var result; // if ((anInputElement instanceof HTMLInputElement) && (anInputElement.getAttribute('name') != null)) { if ((anInputElement.tagName.toLowerCase() == "input") && (anInputElement.getAttribute('name') != null)) { result = {}; result.type = anInputElement.getAttribute('type') || "text"; result.name = anInputElement.getAttribute('name'); // result.value = anInputElement.getAttribute('value'); result.value = anInputElement.value; if (anInputElement.type.toLowerCase() == 'radio') { result.checked = anInputElement.checked; } // } else if ((anInputElement instanceof HTMLSelectElement) && (anInputElement.getAttribute('name') != null)) { } else if ((anInputElement.tagName.toLowerCase() == 'select') && (anInputElement.getAttribute('name') != null)) { var options; var c,i; //console.log("input element values: %o", anInputElement); result = {}; result.type = "select"; result.name = anInputElement.getAttribute('name'); result.options = []; options = anInputElement.options; c = options.length; for (i=0; i<c; i++) { var option; option = {}; option.selected = options[i].selected; option.label = options[i].label || options[i].innerHTML; option.value = options[i].value; result.options.push(option); diff --git a/frontend/gamma/js/Bookmarklet_2.js b/frontend/gamma/js/Bookmarklet_2.js index 02f7de8..de1bbfa 100644 --- a/frontend/gamma/js/Bookmarklet_2.js +++ b/frontend/gamma/js/Bookmarklet_2.js @@ -1,118 +1,116 @@ /* -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_copiedContentToClipboard = false; //############################################################################# // Simple Set Clipboard System // Author: Joseph Huckaby var ZeroClipboard = { version: "1.0.4", clients: {}, // registered upload clients on page, indexed by id // moviePath: 'ZeroClipboard.swf', // URL to movie // moviePath: 'data:application/octet-stream;charset=utf-8;base64,Q1dTCYgGAAB4nH1V61LbRhTeXV2OJNsYczFgIEC4JCGABSRpSy+B2JDQQtWJocl0BqK1tUZqhOSRZAj/8ih9hz5AXsGZTl+ndHUhxU2nO56z3/l05uye7+wc6xr6DeUxqpcUhFCNXF9ffxjNcYhRo8U8NruO0IeRLTkm+BpEa4i8/+t3GRGUrRf5tktDe41dMC8Kpd14Q/DM911GPfHCd6zCLyzwa67Tafo0sAppuOWEHZdeyY1O4ERMbnajyPcKIYteUM+qdYPQD/It12m9jX2XBcSx5EYUON6ZwunOEXsXAY+O94HsAu8iFnjULe1mYN/je5u2WLnvAsnRNGrZ6rnfDZlxwQKxRV1XSd1ulPJ1/9KDBB13pDCiZ2ygEdsGj2WHvsXU3dc7taM3e/tHanjDZVqEV2HEzpUGa3V5dVd4Ocfz+5d1/5w6nnbgU4sF+17bFwPfjzT3k691aEDPGb92KBvNX1krmrOjqLNVrVLLb7K1ln9e3WlsVjd0/Um12XXcyPFy6ZHdyHHDkT5tt1JtF/rJerqn6Wu+F/ErsWCmPyiRjrYi54KlgZP/k2Tq9gPYSh5APZOYBVra2VicAtfyn+4qZwHt2E4rVJvszPH2HNcVD2lkS5eOxW3b9f1AtplzZkeKFdDLl/wkibodmyrUsmq241raYdye5ECpdrBf+2GQf0ncA4c3gJelHRrHjd03xs+7L9UMHh9lZN149aOSwuOfcnFO3qQmbb0V44aoSVEXlHeikXQzz1/bpzek8E50XN6o4r/KLfQpU/pMx/J/yz9cxmWhDOOyhMqD5SkJjQnKYnmpIlfuVe5XHlSWKw8rC6QoEayoWk7MFwaKg6Whx4AJEBGIBEQGQQFJBaKBlAMpD6QA0gCQIsglICNAxkGYAFIBMgkwDWQGhFkgc0DuApkHsqDmMZAVIKtA1oBUgejqOmc21E1uHwF5DOQJ4C+AfAnkKyBbQL4G8g2Qb4F8B+o2wA6QZ4DrIOyCsAfCcw0lUwR/ZvgiOP3IhwgWcDZIsCipIpJkPmskBBiBgpGiIqQJOJdYPqbiOaRiUcRIQ5hrIfT055ySiKYVzMLKkKmuDM8aAyInyW1yNCOF22Q5I8Xb5FhGSjLR8n/gnv5q+U+9t4/MojnYLtEhc3jljjGCGT4Z7bXL7bG9Udwefz9xjk9Vhl3crtjqqXwifS8hWzblJToZmylTbk+vYuMOjsECWjZnkuDZvTmcwbscGvOiKVcxXThZNGVjkQebS+17pmLcJwl8sI1v4PI2uYEPt4UbuLItxrCwoplgrMagaOZTENf2NK0NryE8gWRCVE3p6ae5j3aOFwyZb8of6RT3FYn7Y9yvmjlDx1mKGncSfVTC9Z/v6QyZE7q5rpsburmpm490U+K/12g6WXYc+nR4CKX/H31zGG1z5m9Pt5okCg==', // moviePath: 'http://localhost:8000/tests/js/tests/Bookmarklet/ZeroClipboard.swf', moviePath: 'http://www.clipperz.com/files/clipperz.com/bookmarklet/0.3.0/ZeroClipboard_1.0.4.swf', nextId: 1, // ID of next movie $: function(thingy) { // simple DOM lookup utility function if (typeof(thingy) == 'string') thingy = document.getElementById(thingy); if (!thingy.addClass) { // extend element with a few useful methods thingy.hide = function() { this.style.display = 'none'; }; thingy.show = function() { this.style.display = ''; }; thingy.addClass = function(name) { this.removeClass(name); this.className += ' ' + name; }; thingy.removeClass = function(name) { this.className = this.className.replace( new RegExp("\\s*" + name + "\\s*"), " ").replace(/^\s+/, '').replace(/\s+$/, ''); }; thingy.hasClass = function(name) { return !!this.className.match( new RegExp("\\s*" + name + "\\s*") ); } } return thingy; }, setMoviePath: function(path) { // set path to ZeroClipboard.swf this.moviePath = path; }, dispatch: function(id, eventName, args) { // receive event from flash movie, send to client var client = this.clients[id]; if (client) { client.receiveEvent(eventName, args); } }, register: function(id, client) { // register new client to receive events this.clients[id] = client; }, getDOMObjectPosition: function(obj) { // get absolute coordinates for dom element var info = { left: 0, top: 0, width: obj.width ? obj.width : obj.offsetWidth, height: obj.height ? obj.height : obj.offsetHeight }; while (obj) { info.left += obj.offsetLeft; info.top += obj.offsetTop; obj = obj.offsetParent; } return info; }, Client: function(elem) { // constructor for new simple upload client this.handlers = {}; // unique ID this.id = ZeroClipboard.nextId++; this.movieId = 'ZeroClipboardMovie_' + this.id; // register client with singleton to receive flash events ZeroClipboard.register(this.id, this); // create movie if (elem) this.glue(elem); } }; ZeroClipboard.Client.prototype = { id: 0, // unique ID for us ready: false, // whether movie is ready to receive events or not movie: null, // reference to movie object clipText: '', // text to copy to clipboard diff --git a/frontend/gamma/js/Bootstrap/bootstrap-affix.js b/frontend/gamma/js/Bootstrap/bootstrap-affix.js new file mode 100644 index 0000000..052ecad --- a/dev/null +++ b/frontend/gamma/js/Bootstrap/bootstrap-affix.js @@ -0,0 +1,140 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +/* ========================================================== + * bootstrap-affix.js v2.2.2 + * http://twitter.github.com/bootstrap/javascript.html#affix + * ========================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* AFFIX CLASS DEFINITION + * ====================== */ + + var Affix = function (element, options) { + this.options = $.extend({}, $.fn.affix.defaults, options) + this.$window = $(window) + .on('scroll.affix.data-api', $.proxy(this.checkPosition, this)) + .on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this)) + this.$element = $(element) + this.checkPosition() + } + + Affix.prototype.checkPosition = function () { + if (!this.$element.is(':visible')) return + + var scrollHeight = $(document).height() + , scrollTop = this.$window.scrollTop() + , position = this.$element.offset() + , offset = this.options.offset + , offsetBottom = offset.bottom + , offsetTop = offset.top + , reset = 'affix affix-top affix-bottom' + , affix + + if (typeof offset != 'object') offsetBottom = offsetTop = offset + if (typeof offsetTop == 'function') offsetTop = offset.top() + if (typeof offsetBottom == 'function') offsetBottom = offset.bottom() + + affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? + false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? + 'bottom' : offsetTop != null && scrollTop <= offsetTop ? + 'top' : false + + if (this.affixed === affix) return + + this.affixed = affix + this.unpin = affix == 'bottom' ? position.top - scrollTop : null + + this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : '')) + } + + + /* AFFIX PLUGIN DEFINITION + * ======================= */ + + var old = $.fn.affix + + $.fn.affix = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('affix') + , options = typeof option == 'object' && option + if (!data) $this.data('affix', (data = new Affix(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.affix.Constructor = Affix + + $.fn.affix.defaults = { + offset: 0 + } + + + /* AFFIX NO CONFLICT + * ================= */ + + $.fn.affix.noConflict = function () { + $.fn.affix = old + return this + } + + + /* AFFIX DATA-API + * ============== */ + + $(window).on('load', function () { + $('[data-spy="affix"]').each(function () { + var $spy = $(this) + , data = $spy.data() + + data.offset = data.offset || {} + + data.offsetBottom && (data.offset.bottom = data.offsetBottom) + data.offsetTop && (data.offset.top = data.offsetTop) + + $spy.affix(data) + }) + }) + + +}(window.jQuery);
\ No newline at end of file diff --git a/frontend/gamma/js/Bootstrap/bootstrap-alert.js b/frontend/gamma/js/Bootstrap/bootstrap-alert.js new file mode 100644 index 0000000..63028f2 --- a/dev/null +++ b/frontend/gamma/js/Bootstrap/bootstrap-alert.js @@ -0,0 +1,122 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +/* ========================================================== + * bootstrap-alert.js v2.2.2 + * http://twitter.github.com/bootstrap/javascript.html#alerts + * ========================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* ALERT CLASS DEFINITION + * ====================== */ + + var dismiss = '[data-dismiss="alert"]' + , Alert = function (el) { + $(el).on('click', dismiss, this.close) + } + + Alert.prototype.close = function (e) { + var $this = $(this) + , selector = $this.attr('data-target') + , $parent + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + $parent = $(selector) + + e && e.preventDefault() + + $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) + + $parent.trigger(e = $.Event('close')) + + if (e.isDefaultPrevented()) return + + $parent.removeClass('in') + + function removeElement() { + $parent + .trigger('closed') + .remove() + } + + $.support.transition && $parent.hasClass('fade') ? + $parent.on($.support.transition.end, removeElement) : + removeElement() + } + + + /* ALERT PLUGIN DEFINITION + * ======================= */ + + var old = $.fn.alert + + $.fn.alert = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('alert') + if (!data) $this.data('alert', (data = new Alert(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + $.fn.alert.Constructor = Alert + + + /* ALERT NO CONFLICT + * ================= */ + + $.fn.alert.noConflict = function () { + $.fn.alert = old + return this + } + + + /* ALERT DATA-API + * ============== */ + + $(document).on('click.alert.data-api', dismiss, Alert.prototype.close) + +}(window.jQuery);
\ No newline at end of file diff --git a/frontend/gamma/js/Bootstrap/bootstrap-button.js b/frontend/gamma/js/Bootstrap/bootstrap-button.js new file mode 100644 index 0000000..2c1226e --- a/dev/null +++ b/frontend/gamma/js/Bootstrap/bootstrap-button.js @@ -0,0 +1,128 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +/* ============================================================ + * bootstrap-button.js v2.2.2 + * http://twitter.github.com/bootstrap/javascript.html#buttons + * ============================================================ + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* BUTTON PUBLIC CLASS DEFINITION + * ============================== */ + + var Button = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, $.fn.button.defaults, options) + } + + Button.prototype.setState = function (state) { + var d = 'disabled' + , $el = this.$element + , data = $el.data() + , val = $el.is('input') ? 'val' : 'html' + + state = state + 'Text' + data.resetText || $el.data('resetText', $el[val]()) + + $el[val](data[state] || this.options[state]) + + // push to event loop to allow forms to submit + setTimeout(function () { + state == 'loadingText' ? + $el.addClass(d).attr(d, d) : + $el.removeClass(d).removeAttr(d) + }, 0) + } + + Button.prototype.toggle = function () { + var $parent = this.$element.closest('[data-toggle="buttons-radio"]') + + $parent && $parent + .find('.active') + .removeClass('active') + + this.$element.toggleClass('active') + } + + + /* BUTTON PLUGIN DEFINITION + * ======================== */ + + var old = $.fn.button + + $.fn.button = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('button') + , options = typeof option == 'object' && option + if (!data) $this.data('button', (data = new Button(this, options))) + if (option == 'toggle') data.toggle() + else if (option) data.setState(option) + }) + } + + $.fn.button.defaults = { + loadingText: 'loading...' + } + + $.fn.button.Constructor = Button + + + /* BUTTON NO CONFLICT + * ================== */ + + $.fn.button.noConflict = function () { + $.fn.button = old + return this + } + + + /* BUTTON DATA-API + * =============== */ + + $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { + var $btn = $(e.target) + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') + $btn.button('toggle') + }) + +}(window.jQuery);
\ No newline at end of file diff --git a/frontend/gamma/js/Bootstrap/bootstrap-carousel.js b/frontend/gamma/js/Bootstrap/bootstrap-carousel.js new file mode 100644 index 0000000..e127bc7 --- a/dev/null +++ b/frontend/gamma/js/Bootstrap/bootstrap-carousel.js @@ -0,0 +1,208 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +/* ========================================================== + * bootstrap-carousel.js v2.2.2 + * http://twitter.github.com/bootstrap/javascript.html#carousel + * ========================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* CAROUSEL CLASS DEFINITION + * ========================= */ + + var Carousel = function (element, options) { + this.$element = $(element) + this.options = options + this.options.pause == 'hover' && this.$element + .on('mouseenter', $.proxy(this.pause, this)) + .on('mouseleave', $.proxy(this.cycle, this)) + } + + Carousel.prototype = { + + cycle: function (e) { + if (!e) this.paused = false + this.options.interval + && !this.paused + && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) + return this + } + + , to: function (pos) { + var $active = this.$element.find('.item.active') + , children = $active.parent().children() + , activePos = children.index($active) + , that = this + + if (pos > (children.length - 1) || pos < 0) return + + if (this.sliding) { + return this.$element.one('slid', function () { + that.to(pos) + }) + } + + if (activePos == pos) { + return this.pause().cycle() + } + + return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos])) + } + + , pause: function (e) { + if (!e) this.paused = true + if (this.$element.find('.next, .prev').length && $.support.transition.end) { + this.$element.trigger($.support.transition.end) + this.cycle() + } + clearInterval(this.interval) + this.interval = null + return this + } + + , next: function () { + if (this.sliding) return + return this.slide('next') + } + + , prev: function () { + if (this.sliding) return + return this.slide('prev') + } + + , slide: function (type, next) { + var $active = this.$element.find('.item.active') + , $next = next || $active[type]() + , isCycling = this.interval + , direction = type == 'next' ? 'left' : 'right' + , fallback = type == 'next' ? 'first' : 'last' + , that = this + , e + + this.sliding = true + + isCycling && this.pause() + + $next = $next.length ? $next : this.$element.find('.item')[fallback]() + + e = $.Event('slide', { + relatedTarget: $next[0] + }) + + if ($next.hasClass('active')) return + + if ($.support.transition && this.$element.hasClass('slide')) { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + $next.addClass(type) + $next[0].offsetWidth // force reflow + $active.addClass(direction) + $next.addClass(direction) + this.$element.one($.support.transition.end, function () { + $next.removeClass([type, direction].join(' ')).addClass('active') + $active.removeClass(['active', direction].join(' ')) + that.sliding = false + setTimeout(function () { that.$element.trigger('slid') }, 0) + }) + } else { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + $active.removeClass('active') + $next.addClass('active') + this.sliding = false + this.$element.trigger('slid') + } + + isCycling && this.cycle() + + return this + } + + } + + + /* CAROUSEL PLUGIN DEFINITION + * ========================== */ + + var old = $.fn.carousel + + $.fn.carousel = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('carousel') + , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option) + , action = typeof option == 'string' ? option : options.slide + if (!data) $this.data('carousel', (data = new Carousel(this, options))) + if (typeof option == 'number') data.to(option) + else if (action) data[action]() + else if (options.interval) data.cycle() + }) + } + + $.fn.carousel.defaults = { + interval: 5000 + , pause: 'hover' + } + + $.fn.carousel.Constructor = Carousel + + + /* CAROUSEL NO CONFLICT + * ==================== */ + + $.fn.carousel.noConflict = function () { + $.fn.carousel = old + return this + } + + /* CAROUSEL DATA-API + * ================= */ + + $(document).on('click.carousel.data-api', '[data-slide]', function (e) { + var $this = $(this), href + , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 + , options = $.extend({}, $target.data(), $this.data()) + $target.carousel(options) + e.preventDefault() + }) + +}(window.jQuery);
\ No newline at end of file diff --git a/frontend/gamma/js/Bootstrap/bootstrap-collapse.js b/frontend/gamma/js/Bootstrap/bootstrap-collapse.js new file mode 100644 index 0000000..31b7168 --- a/dev/null +++ b/frontend/gamma/js/Bootstrap/bootstrap-collapse.js @@ -0,0 +1,190 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +/* ============================================================= + * bootstrap-collapse.js v2.2.2 + * http://twitter.github.com/bootstrap/javascript.html#collapse + * ============================================================= + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* COLLAPSE PUBLIC CLASS DEFINITION + * ================================ */ + + var Collapse = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, $.fn.collapse.defaults, options) + + if (this.options.parent) { + this.$parent = $(this.options.parent) + } + + this.options.toggle && this.toggle() + } + + Collapse.prototype = { + + constructor: Collapse + + , dimension: function () { + var hasWidth = this.$element.hasClass('width') + return hasWidth ? 'width' : 'height' + } + + , show: function () { + var dimension + , scroll + , actives + , hasData + + if (this.transitioning) return + + dimension = this.dimension() + scroll = $.camelCase(['scroll', dimension].join('-')) + actives = this.$parent && this.$parent.find('> .accordion-group > .in') + + if (actives && actives.length) { + hasData = actives.data('collapse') + if (hasData && hasData.transitioning) return + actives.collapse('hide') + hasData || actives.data('collapse', null) + } + + this.$element[dimension](0) + this.transition('addClass', $.Event('show'), 'shown') + $.support.transition && this.$element[dimension](this.$element[0][scroll]) + } + + , hide: function () { + var dimension + if (this.transitioning) return + dimension = this.dimension() + this.reset(this.$element[dimension]()) + this.transition('removeClass', $.Event('hide'), 'hidden') + this.$element[dimension](0) + } + + , reset: function (size) { + var dimension = this.dimension() + + this.$element + .removeClass('collapse') + [dimension](size || 'auto') + [0].offsetWidth + + this.$element[size !== null ? 'addClass' : 'removeClass']('collapse') + + return this + } + + , transition: function (method, startEvent, completeEvent) { + var that = this + , complete = function () { + if (startEvent.type == 'show') that.reset() + that.transitioning = 0 + that.$element.trigger(completeEvent) + } + + this.$element.trigger(startEvent) + + if (startEvent.isDefaultPrevented()) return + + this.transitioning = 1 + + this.$element[method]('in') + + $.support.transition && this.$element.hasClass('collapse') ? + this.$element.one($.support.transition.end, complete) : + complete() + } + + , toggle: function () { + this[this.$element.hasClass('in') ? 'hide' : 'show']() + } + + } + + + /* COLLAPSE PLUGIN DEFINITION + * ========================== */ + + var old = $.fn.collapse + + $.fn.collapse = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('collapse') + , options = typeof option == 'object' && option + if (!data) $this.data('collapse', (data = new Collapse(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.collapse.defaults = { + toggle: true + } + + $.fn.collapse.Constructor = Collapse + + + /* COLLAPSE NO CONFLICT + * ==================== */ + + $.fn.collapse.noConflict = function () { + $.fn.collapse = old + return this + } + + + /* COLLAPSE DATA-API + * ================= */ + + $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { + var $this = $(this), href + , target = $this.attr('data-target') + || e.preventDefault() + || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 + , option = $(target).data('collapse') ? 'toggle' : $this.data() + $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') + $(target).collapse(option) + }) + +}(window.jQuery);
\ No newline at end of file diff --git a/frontend/gamma/js/Bootstrap/bootstrap-dropdown.js b/frontend/gamma/js/Bootstrap/bootstrap-dropdown.js new file mode 100644 index 0000000..3b77bb3 --- a/dev/null +++ b/frontend/gamma/js/Bootstrap/bootstrap-dropdown.js @@ -0,0 +1,184 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +/* ============================================================ + * bootstrap-dropdown.js v2.2.2 + * http://twitter.github.com/bootstrap/javascript.html#dropdowns + * ============================================================ + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* DROPDOWN CLASS DEFINITION + * ========================= */ + + var toggle = '[data-toggle=dropdown]' + , Dropdown = function (element) { + var $el = $(element).on('click.dropdown.data-api', this.toggle) + $('html').on('click.dropdown.data-api', function () { + $el.parent().removeClass('open') + }) + } + + Dropdown.prototype = { + + constructor: Dropdown + + , toggle: function (e) { + var $this = $(this) + , $parent + , isActive + + if ($this.is('.disabled, :disabled')) return + + $parent = getParent($this) + + isActive = $parent.hasClass('open') + + clearMenus() + + if (!isActive) { + $parent.toggleClass('open') + } + + $this.focus() + + return false + } + + , keydown: function (e) { + var $this + , $items + , $active + , $parent + , isActive + , index + + if (!/(38|40|27)/.test(e.keyCode)) return + + $this = $(this) + + e.preventDefault() + e.stopPropagation() + + if ($this.is('.disabled, :disabled')) return + + $parent = getParent($this) + + isActive = $parent.hasClass('open') + + if (!isActive || (isActive && e.keyCode == 27)) return $this.click() + + $items = $('[role=menu] li:not(.divider):visible a', $parent) + + if (!$items.length) return + + index = $items.index($items.filter(':focus')) + + if (e.keyCode == 38 && index > 0) index-- // up + if (e.keyCode == 40 && index < $items.length - 1) index++ // down + if (!~index) index = 0 + + $items + .eq(index) + .focus() + } + + } + + function clearMenus() { + $(toggle).each(function () { + getParent($(this)).removeClass('open') + }) + } + + function getParent($this) { + var selector = $this.attr('data-target') + , $parent + + if (!selector) { + selector = $this.attr('href') + selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + $parent = $(selector) + $parent.length || ($parent = $this.parent()) + + return $parent + } + + + /* DROPDOWN PLUGIN DEFINITION + * ========================== */ + + var old = $.fn.dropdown + + $.fn.dropdown = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('dropdown') + if (!data) $this.data('dropdown', (data = new Dropdown(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + $.fn.dropdown.Constructor = Dropdown + + + /* DROPDOWN NO CONFLICT + * ==================== */ + + $.fn.dropdown.noConflict = function () { + $.fn.dropdown = old + return this + } + + + /* APPLY TO STANDARD DROPDOWN ELEMENTS + * =================================== */ + + $(document) + .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus) + .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) + .on('touchstart.dropdown.data-api', '.dropdown-menu', function (e) { e.stopPropagation() }) + .on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle) + .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) + +}(window.jQuery);
\ No newline at end of file diff --git a/frontend/gamma/js/Bootstrap/bootstrap-modal.js b/frontend/gamma/js/Bootstrap/bootstrap-modal.js new file mode 100644 index 0000000..fd7e337 --- a/dev/null +++ b/frontend/gamma/js/Bootstrap/bootstrap-modal.js @@ -0,0 +1,268 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +/* ========================================================= + * bootstrap-modal.js v2.2.2 + * http://twitter.github.com/bootstrap/javascript.html#modals + * ========================================================= + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================= */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* MODAL CLASS DEFINITION + * ====================== */ + + var Modal = function (element, options) { + this.options = options + this.$element = $(element) + .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) + this.options.remote && this.$element.find('.modal-body').load(this.options.remote) + } + + Modal.prototype = { + + constructor: Modal + + , toggle: function () { + return this[!this.isShown ? 'show' : 'hide']() + } + + , show: function () { + var that = this + , e = $.Event('show') + + this.$element.trigger(e) + + if (this.isShown || e.isDefaultPrevented()) return + + this.isShown = true + + this.escape() + + this.backdrop(function () { + var transition = $.support.transition && that.$element.hasClass('fade') + + if (!that.$element.parent().length) { + that.$element.appendTo(document.body) //don't move modals dom position + } + + that.$element + .show() + + if (transition) { + that.$element[0].offsetWidth // force reflow + } + + that.$element + .addClass('in') + .attr('aria-hidden', false) + + that.enforceFocus() + + transition ? + that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) : + that.$element.focus().trigger('shown') + + }) + } + + , hide: function (e) { + e && e.preventDefault() + + var that = this + + e = $.Event('hide') + + this.$element.trigger(e) + + if (!this.isShown || e.isDefaultPrevented()) return + + this.isShown = false + + this.escape() + + $(document).off('focusin.modal') + + this.$element + .removeClass('in') + .attr('aria-hidden', true) + + $.support.transition && this.$element.hasClass('fade') ? + this.hideWithTransition() : + this.hideModal() + } + + , enforceFocus: function () { + var that = this + $(document).on('focusin.modal', function (e) { + if (that.$element[0] !== e.target && !that.$element.has(e.target).length) { + that.$element.focus() + } + }) + } + + , escape: function () { + var that = this + if (this.isShown && this.options.keyboard) { + this.$element.on('keyup.dismiss.modal', function ( e ) { + e.which == 27 && that.hide() + }) + } else if (!this.isShown) { + this.$element.off('keyup.dismiss.modal') + } + } + + , hideWithTransition: function () { + var that = this + , timeout = setTimeout(function () { + that.$element.off($.support.transition.end) + that.hideModal() + }, 500) + + this.$element.one($.support.transition.end, function () { + clearTimeout(timeout) + that.hideModal() + }) + } + + , hideModal: function (that) { + this.$element + .hide() + .trigger('hidden') + + this.backdrop() + } + + , removeBackdrop: function () { + this.$backdrop.remove() + this.$backdrop = null + } + + , backdrop: function (callback) { + var that = this + , animate = this.$element.hasClass('fade') ? 'fade' : '' + + if (this.isShown && this.options.backdrop) { + var doAnimate = $.support.transition && animate + + this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />') + .appendTo(document.body) + + this.$backdrop.click( + this.options.backdrop == 'static' ? + $.proxy(this.$element[0].focus, this.$element[0]) + : $.proxy(this.hide, this) + ) + + if (doAnimate) this.$backdrop[0].offsetWidth // force reflow + + this.$backdrop.addClass('in') + + doAnimate ? + this.$backdrop.one($.support.transition.end, callback) : + callback() + + } else if (!this.isShown && this.$backdrop) { + this.$backdrop.removeClass('in') + + $.support.transition && this.$element.hasClass('fade')? + this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) : + this.removeBackdrop() + + } else if (callback) { + callback() + } + } + } + + + /* MODAL PLUGIN DEFINITION + * ======================= */ + + var old = $.fn.modal + + $.fn.modal = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('modal') + , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option) + if (!data) $this.data('modal', (data = new Modal(this, options))) + if (typeof option == 'string') data[option]() + else if (options.show) data.show() + }) + } + + $.fn.modal.defaults = { + backdrop: true + , keyboard: true + , show: true + } + + $.fn.modal.Constructor = Modal + + + /* MODAL NO CONFLICT + * ================= */ + + $.fn.modal.noConflict = function () { + $.fn.modal = old + return this + } + + + /* MODAL DATA-API + * ============== */ + + $(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) { + var $this = $(this) + , href = $this.attr('href') + , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7 + , option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data()) + + e.preventDefault() + + $target + .modal(option) + .one('hide', function () { + $this.focus() + }) + }) + +}(window.jQuery); diff --git a/frontend/gamma/js/Bootstrap/bootstrap-popover.js b/frontend/gamma/js/Bootstrap/bootstrap-popover.js new file mode 100644 index 0000000..89e1edb --- a/dev/null +++ b/frontend/gamma/js/Bootstrap/bootstrap-popover.js @@ -0,0 +1,137 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +/* =========================================================== + * bootstrap-popover.js v2.2.2 + * http://twitter.github.com/bootstrap/javascript.html#popovers + * =========================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * =========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* POPOVER PUBLIC CLASS DEFINITION + * =============================== */ + + var Popover = function (element, options) { + this.init('popover', element, options) + } + + + /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js + ========================================== */ + + Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, { + + constructor: Popover + + , setContent: function () { + var $tip = this.tip() + , title = this.getTitle() + , content = this.getContent() + + $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) + $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content) + + $tip.removeClass('fade top bottom left right in') + } + + , hasContent: function () { + return this.getTitle() || this.getContent() + } + + , getContent: function () { + var content + , $e = this.$element + , o = this.options + + content = $e.attr('data-content') + || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content) + + return content + } + + , tip: function () { + if (!this.$tip) { + this.$tip = $(this.options.template) + } + return this.$tip + } + + , destroy: function () { + this.hide().$element.off('.' + this.type).removeData(this.type) + } + + }) + + + /* POPOVER PLUGIN DEFINITION + * ======================= */ + + var old = $.fn.popover + + $.fn.popover = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('popover') + , options = typeof option == 'object' && option + if (!data) $this.data('popover', (data = new Popover(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.popover.Constructor = Popover + + $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, { + placement: 'right' + , trigger: 'click' + , content: '' + , template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"></div></div></div>' + }) + + + /* POPOVER NO CONFLICT + * =================== */ + + $.fn.popover.noConflict = function () { + $.fn.popover = old + return this + } + +}(window.jQuery);
\ No newline at end of file diff --git a/frontend/gamma/js/Bootstrap/bootstrap-scrollspy.js b/frontend/gamma/js/Bootstrap/bootstrap-scrollspy.js new file mode 100644 index 0000000..4366f26 --- a/dev/null +++ b/frontend/gamma/js/Bootstrap/bootstrap-scrollspy.js @@ -0,0 +1,185 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +/* ============================================================= + * bootstrap-scrollspy.js v2.2.2 + * http://twitter.github.com/bootstrap/javascript.html#scrollspy + * ============================================================= + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* SCROLLSPY CLASS DEFINITION + * ========================== */ + + function ScrollSpy(element, options) { + var process = $.proxy(this.process, this) + , $element = $(element).is('body') ? $(window) : $(element) + , href + this.options = $.extend({}, $.fn.scrollspy.defaults, options) + this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process) + this.selector = (this.options.target + || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 + || '') + ' .nav li > a' + this.$body = $('body') + this.refresh() + this.process() + } + + ScrollSpy.prototype = { + + constructor: ScrollSpy + + , refresh: function () { + var self = this + , $targets + + this.offsets = $([]) + this.targets = $([]) + + $targets = this.$body + .find(this.selector) + .map(function () { + var $el = $(this) + , href = $el.data('target') || $el.attr('href') + , $href = /^#\w/.test(href) && $(href) + return ( $href + && $href.length + && [[ $href.position().top + self.$scrollElement.scrollTop(), href ]] ) || null + }) + .sort(function (a, b) { return a[0] - b[0] }) + .each(function () { + self.offsets.push(this[0]) + self.targets.push(this[1]) + }) + } + + , process: function () { + var scrollTop = this.$scrollElement.scrollTop() + this.options.offset + , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight + , maxScroll = scrollHeight - this.$scrollElement.height() + , offsets = this.offsets + , targets = this.targets + , activeTarget = this.activeTarget + , i + + if (scrollTop >= maxScroll) { + return activeTarget != (i = targets.last()[0]) + && this.activate ( i ) + } + + for (i = offsets.length; i--;) { + activeTarget != targets[i] + && scrollTop >= offsets[i] + && (!offsets[i + 1] || scrollTop <= offsets[i + 1]) + && this.activate( targets[i] ) + } + } + + , activate: function (target) { + var active + , selector + + this.activeTarget = target + + $(this.selector) + .parent('.active') + .removeClass('active') + + selector = this.selector + + '[data-target="' + target + '"],' + + this.selector + '[href="' + target + '"]' + + active = $(selector) + .parent('li') + .addClass('active') + + if (active.parent('.dropdown-menu').length) { + active = active.closest('li.dropdown').addClass('active') + } + + active.trigger('activate') + } + + } + + + /* SCROLLSPY PLUGIN DEFINITION + * =========================== */ + + var old = $.fn.scrollspy + + $.fn.scrollspy = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('scrollspy') + , options = typeof option == 'object' && option + if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.scrollspy.Constructor = ScrollSpy + + $.fn.scrollspy.defaults = { + offset: 10 + } + + + /* SCROLLSPY NO CONFLICT + * ===================== */ + + $.fn.scrollspy.noConflict = function () { + $.fn.scrollspy = old + return this + } + + + /* SCROLLSPY DATA-API + * ================== */ + + $(window).on('load', function () { + $('[data-spy="scroll"]').each(function () { + var $spy = $(this) + $spy.scrollspy($spy.data()) + }) + }) + +}(window.jQuery);
\ No newline at end of file diff --git a/frontend/gamma/js/Bootstrap/bootstrap-tab.js b/frontend/gamma/js/Bootstrap/bootstrap-tab.js new file mode 100644 index 0000000..d7c7fc7 --- a/dev/null +++ b/frontend/gamma/js/Bootstrap/bootstrap-tab.js @@ -0,0 +1,167 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +/* ======================================================== + * bootstrap-tab.js v2.2.2 + * http://twitter.github.com/bootstrap/javascript.html#tabs + * ======================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* TAB CLASS DEFINITION + * ==================== */ + + var Tab = function (element) { + this.element = $(element) + } + + Tab.prototype = { + + constructor: Tab + + , show: function () { + var $this = this.element + , $ul = $this.closest('ul:not(.dropdown-menu)') + , selector = $this.attr('data-target') + , previous + , $target + , e + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + if ( $this.parent('li').hasClass('active') ) return + + previous = $ul.find('.active:last a')[0] + + e = $.Event('show', { + relatedTarget: previous + }) + + $this.trigger(e) + + if (e.isDefaultPrevented()) return + + $target = $(selector) + + this.activate($this.parent('li'), $ul) + this.activate($target, $target.parent(), function () { + $this.trigger({ + type: 'shown' + , relatedTarget: previous + }) + }) + } + + , activate: function ( element, container, callback) { + var $active = container.find('> .active') + , transition = callback + && $.support.transition + && $active.hasClass('fade') + + function next() { + $active + .removeClass('active') + .find('> .dropdown-menu > .active') + .removeClass('active') + + element.addClass('active') + + if (transition) { + element[0].offsetWidth // reflow for transition + element.addClass('in') + } else { + element.removeClass('fade') + } + + if ( element.parent('.dropdown-menu') ) { + element.closest('li.dropdown').addClass('active') + } + + callback && callback() + } + + transition ? + $active.one($.support.transition.end, next) : + next() + + $active.removeClass('in') + } + } + + + /* TAB PLUGIN DEFINITION + * ===================== */ + + var old = $.fn.tab + + $.fn.tab = function ( option ) { + return this.each(function () { + var $this = $(this) + , data = $this.data('tab') + if (!data) $this.data('tab', (data = new Tab(this))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.tab.Constructor = Tab + + + /* TAB NO CONFLICT + * =============== */ + + $.fn.tab.noConflict = function () { + $.fn.tab = old + return this + } + + + /* TAB DATA-API + * ============ */ + + $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) { + e.preventDefault() + $(this).tab('show') + }) + +}(window.jQuery);
\ No newline at end of file diff --git a/frontend/gamma/js/Bootstrap/bootstrap-tooltip.js b/frontend/gamma/js/Bootstrap/bootstrap-tooltip.js new file mode 100644 index 0000000..bdcff7d --- a/dev/null +++ b/frontend/gamma/js/Bootstrap/bootstrap-tooltip.js @@ -0,0 +1,310 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +/* =========================================================== + * bootstrap-tooltip.js v2.2.2 + * http://twitter.github.com/bootstrap/javascript.html#tooltips + * Inspired by the original jQuery.tipsy by Jason Frame + * =========================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* TOOLTIP PUBLIC CLASS DEFINITION + * =============================== */ + + var Tooltip = function (element, options) { + this.init('tooltip', element, options) + } + + Tooltip.prototype = { + + constructor: Tooltip + + , init: function (type, element, options) { + var eventIn + , eventOut + + this.type = type + this.$element = $(element) + this.options = this.getOptions(options) + this.enabled = true + + if (this.options.trigger == 'click') { + this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) + } else if (this.options.trigger != 'manual') { + eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus' + eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur' + this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) + this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) + } + + this.options.selector ? + (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : + this.fixTitle() + } + + , getOptions: function (options) { + options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data()) + + if (options.delay && typeof options.delay == 'number') { + options.delay = { + show: options.delay + , hide: options.delay + } + } + + return options + } + + , enter: function (e) { + var self = $(e.currentTarget)[this.type](this._options).data(this.type) + + if (!self.options.delay || !self.options.delay.show) return self.show() + + clearTimeout(this.timeout) + self.hoverState = 'in' + this.timeout = setTimeout(function() { + if (self.hoverState == 'in') self.show() + }, self.options.delay.show) + } + + , leave: function (e) { + var self = $(e.currentTarget)[this.type](this._options).data(this.type) + + if (this.timeout) clearTimeout(this.timeout) + if (!self.options.delay || !self.options.delay.hide) return self.hide() + + self.hoverState = 'out' + this.timeout = setTimeout(function() { + if (self.hoverState == 'out') self.hide() + }, self.options.delay.hide) + } + + , show: function () { + var $tip + , inside + , pos + , actualWidth + , actualHeight + , placement + , tp + + if (this.hasContent() && this.enabled) { + $tip = this.tip() + this.setContent() + + if (this.options.animation) { + $tip.addClass('fade') + } + + placement = typeof this.options.placement == 'function' ? + this.options.placement.call(this, $tip[0], this.$element[0]) : + this.options.placement + + inside = /in/.test(placement) + + $tip + .detach() + .css({ top: 0, left: 0, display: 'block' }) + .insertAfter(this.$element) + + pos = this.getPosition(inside) + + actualWidth = $tip[0].offsetWidth + actualHeight = $tip[0].offsetHeight + + switch (inside ? placement.split(' ')[1] : placement) { + case 'bottom': + tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2} + break + case 'top': + tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2} + break + case 'left': + tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth} + break + case 'right': + tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width} + break + } + + $tip + .offset(tp) + .addClass(placement) + .addClass('in') + } + } + + , setContent: function () { + var $tip = this.tip() + , title = this.getTitle() + + $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) + $tip.removeClass('fade in top bottom left right') + } + + , hide: function () { + var that = this + , $tip = this.tip() + + $tip.removeClass('in') + + function removeWithAnimation() { + var timeout = setTimeout(function () { + $tip.off($.support.transition.end).detach() + }, 500) + + $tip.one($.support.transition.end, function () { + clearTimeout(timeout) + $tip.detach() + }) + } + + $.support.transition && this.$tip.hasClass('fade') ? + removeWithAnimation() : + $tip.detach() + + return this + } + + , fixTitle: function () { + var $e = this.$element + if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') { + $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title') + } + } + + , hasContent: function () { + return this.getTitle() + } + + , getPosition: function (inside) { + return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), { + width: this.$element[0].offsetWidth + , height: this.$element[0].offsetHeight + }) + } + + , getTitle: function () { + var title + , $e = this.$element + , o = this.options + + title = $e.attr('data-original-title') + || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) + + return title + } + + , tip: function () { + return this.$tip = this.$tip || $(this.options.template) + } + + , validate: function () { + if (!this.$element[0].parentNode) { + this.hide() + this.$element = null + this.options = null + } + } + + , enable: function () { + this.enabled = true + } + + , disable: function () { + this.enabled = false + } + + , toggleEnabled: function () { + this.enabled = !this.enabled + } + + , toggle: function (e) { + var self = $(e.currentTarget)[this.type](this._options).data(this.type) + self[self.tip().hasClass('in') ? 'hide' : 'show']() + } + + , destroy: function () { + this.hide().$element.off('.' + this.type).removeData(this.type) + } + + } + + + /* TOOLTIP PLUGIN DEFINITION + * ========================= */ + + var old = $.fn.tooltip + + $.fn.tooltip = function ( option ) { + return this.each(function () { + var $this = $(this) + , data = $this.data('tooltip') + , options = typeof option == 'object' && option + if (!data) $this.data('tooltip', (data = new Tooltip(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.tooltip.Constructor = Tooltip + + $.fn.tooltip.defaults = { + animation: true + , placement: 'top' + , selector: false + , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>' + , trigger: 'hover' + , title: '' + , delay: 0 + , html: false + } + + + /* TOOLTIP NO CONFLICT + * =================== */ + + $.fn.tooltip.noConflict = function () { + $.fn.tooltip = old + return this + } + +}(window.jQuery);
\ No newline at end of file diff --git a/frontend/gamma/js/Bootstrap/bootstrap-transition.js b/frontend/gamma/js/Bootstrap/bootstrap-transition.js new file mode 100644 index 0000000..820d232 --- a/dev/null +++ b/frontend/gamma/js/Bootstrap/bootstrap-transition.js @@ -0,0 +1,83 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +/* =================================================== + * bootstrap-transition.js v2.2.2 + * http://twitter.github.com/bootstrap/javascript.html#transitions + * =================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) + * ======================================================= */ + + $(function () { + + $.support.transition = (function () { + + var transitionEnd = (function () { + + var el = document.createElement('bootstrap') + , transEndEventNames = { + 'WebkitTransition' : 'webkitTransitionEnd' + , 'MozTransition' : 'transitionend' + , 'OTransition' : 'oTransitionEnd otransitionend' + , 'transition' : 'transitionend' + } + , name + + for (name in transEndEventNames){ + if (el.style[name] !== undefined) { + return transEndEventNames[name] + } + } + + }()) + + return transitionEnd && { + end: transitionEnd + } + + })() + + }) + +}(window.jQuery);
\ No newline at end of file diff --git a/frontend/gamma/js/Bootstrap/bootstrap-typeahead.js b/frontend/gamma/js/Bootstrap/bootstrap-typeahead.js new file mode 100644 index 0000000..d3d8d32 --- a/dev/null +++ b/frontend/gamma/js/Bootstrap/bootstrap-typeahead.js @@ -0,0 +1,346 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +/* ============================================================= + * bootstrap-typeahead.js v2.2.2 + * http://twitter.github.com/bootstrap/javascript.html#typeahead + * ============================================================= + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function($){ + + "use strict"; // jshint ;_; + + + /* TYPEAHEAD PUBLIC CLASS DEFINITION + * ================================= */ + + var Typeahead = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, $.fn.typeahead.defaults, options) + this.matcher = this.options.matcher || this.matcher + this.sorter = this.options.sorter || this.sorter + this.highlighter = this.options.highlighter || this.highlighter + this.updater = this.options.updater || this.updater + this.source = this.options.source + this.$menu = $(this.options.menu) + this.shown = false + this.listen() + } + + Typeahead.prototype = { + + constructor: Typeahead + + , select: function () { + var val = this.$menu.find('.active').attr('data-value') + this.$element + .val(this.updater(val)) + .change() + return this.hide() + } + + , updater: function (item) { + return item + } + + , show: function () { + var pos = $.extend({}, this.$element.position(), { + height: this.$element[0].offsetHeight + }) + + this.$menu + .insertAfter(this.$element) + .css({ + top: pos.top + pos.height + , left: pos.left + }) + .show() + + this.shown = true + return this + } + + , hide: function () { + this.$menu.hide() + this.shown = false + return this + } + + , lookup: function (event) { + var items + + this.query = this.$element.val() + + if (!this.query || this.query.length < this.options.minLength) { + return this.shown ? this.hide() : this + } + + items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source + + return items ? this.process(items) : this + } + + , process: function (items) { + var that = this + + items = $.grep(items, function (item) { + return that.matcher(item) + }) + + items = this.sorter(items) + + if (!items.length) { + return this.shown ? this.hide() : this + } + + return this.render(items.slice(0, this.options.items)).show() + } + + , matcher: function (item) { + return ~item.toLowerCase().indexOf(this.query.toLowerCase()) + } + + , sorter: function (items) { + var beginswith = [] + , caseSensitive = [] + , caseInsensitive = [] + , item + + while (item = items.shift()) { + if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item) + else if (~item.indexOf(this.query)) caseSensitive.push(item) + else caseInsensitive.push(item) + } + + return beginswith.concat(caseSensitive, caseInsensitive) + } + + , highlighter: function (item) { + var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&') + return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) { + return '<strong>' + match + '</strong>' + }) + } + + , render: function (items) { + var that = this + + items = $(items).map(function (i, item) { + i = $(that.options.item).attr('data-value', item) + i.find('a').html(that.highlighter(item)) + return i[0] + }) + + items.first().addClass('active') + this.$menu.html(items) + return this + } + + , next: function (event) { + var active = this.$menu.find('.active').removeClass('active') + , next = active.next() + + if (!next.length) { + next = $(this.$menu.find('li')[0]) + } + + next.addClass('active') + } + + , prev: function (event) { + var active = this.$menu.find('.active').removeClass('active') + , prev = active.prev() + + if (!prev.length) { + prev = this.$menu.find('li').last() + } + + prev.addClass('active') + } + + , listen: function () { + this.$element + .on('blur', $.proxy(this.blur, this)) + .on('keypress', $.proxy(this.keypress, this)) + .on('keyup', $.proxy(this.keyup, this)) + + if (this.eventSupported('keydown')) { + this.$element.on('keydown', $.proxy(this.keydown, this)) + } + + this.$menu + .on('click', $.proxy(this.click, this)) + .on('mouseenter', 'li', $.proxy(this.mouseenter, this)) + } + + , eventSupported: function(eventName) { + var isSupported = eventName in this.$element + if (!isSupported) { + this.$element.setAttribute(eventName, 'return;') + isSupported = typeof this.$element[eventName] === 'function' + } + return isSupported + } + + , move: function (e) { + if (!this.shown) return + + switch(e.keyCode) { + case 9: // tab + case 13: // enter + case 27: // escape + e.preventDefault() + break + + case 38: // up arrow + e.preventDefault() + this.prev() + break + + case 40: // down arrow + e.preventDefault() + this.next() + break + } + + e.stopPropagation() + } + + , keydown: function (e) { + this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27]) + this.move(e) + } + + , keypress: function (e) { + if (this.suppressKeyPressRepeat) return + this.move(e) + } + + , keyup: function (e) { + switch(e.keyCode) { + case 40: // down arrow + case 38: // up arrow + case 16: // shift + case 17: // ctrl + case 18: // alt + break + + case 9: // tab + case 13: // enter + if (!this.shown) return + this.select() + break + + case 27: // escape + if (!this.shown) return + this.hide() + break + + default: + this.lookup() + } + + e.stopPropagation() + e.preventDefault() + } + + , blur: function (e) { + var that = this + setTimeout(function () { that.hide() }, 150) + } + + , click: function (e) { + e.stopPropagation() + e.preventDefault() + this.select() + } + + , mouseenter: function (e) { + this.$menu.find('.active').removeClass('active') + $(e.currentTarget).addClass('active') + } + + } + + + /* TYPEAHEAD PLUGIN DEFINITION + * =========================== */ + + var old = $.fn.typeahead + + $.fn.typeahead = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('typeahead') + , options = typeof option == 'object' && option + if (!data) $this.data('typeahead', (data = new Typeahead(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.typeahead.defaults = { + source: [] + , items: 8 + , menu: '<ul class="typeahead dropdown-menu"></ul>' + , item: '<li><a href="#"></a></li>' + , minLength: 1 + } + + $.fn.typeahead.Constructor = Typeahead + + + /* TYPEAHEAD NO CONFLICT + * =================== */ + + $.fn.typeahead.noConflict = function () { + $.fn.typeahead = old + return this + } + + + /* TYPEAHEAD DATA-API + * ================== */ + + $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) { + var $this = $(this) + if ($this.data('typeahead')) return + e.preventDefault() + $this.typeahead($this.data()) + }) + +}(window.jQuery); diff --git a/frontend/gamma/js/Clipperz/Async.js b/frontend/gamma/js/Clipperz/Async.js index f7a9517..d525453 100644 --- a/frontend/gamma/js/Clipperz/Async.js +++ b/frontend/gamma/js/Clipperz/Async.js @@ -1,476 +1,466 @@ /* -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.Async = MochiKit.Async; if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.Async) == 'undefined') { Clipperz.Async = {}; } Clipperz.Async.VERSION = "0.1"; Clipperz.Async.NAME = "Clipperz.Async"; Clipperz.Async.Deferred = function(aName, args) { args = args || {}; Clipperz.Async.Deferred.superclass.constructor.call(this, args.canceller); this._args = args; this._name = aName || "Anonymous deferred"; this._count = 0; this._shouldTrace = ((CLIPPERZ_DEFERRED_TRACING_ENABLED === true) || (args.trace === true)); this._vars = null; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.Async.Deferred, MochiKit.Async.Deferred, { 'name': function () { return this._name; }, 'args': function () { return this._args; }, //----------------------------------------------------------------------------- 'callback': function (aValue) { if (this._shouldTrace) { - // Clipperz.log("CALLBACK " + this._name, aValue); - console.log("CALLBACK " + this._name, aValue); + Clipperz.log("CALLBACK " + this._name, aValue); } if (this.chained == false) { var message; message = "ERROR [" + this._name + "]"; this.addErrback(function(aResult) { if (! (aResult instanceof MochiKit.Async.CancelledError)) { Clipperz.log(message, aResult); } return aResult; }); if (this._shouldTrace) { var resultMessage; resultMessage = "RESULT " + this._name + " <=="; // this.addCallback(function(aResult) { Clipperz.Async.Deferred.superclass.addCallback.call(this, function(aResult) { - // Clipperz.log(resultMessage, aResult); - console.log(resultMessage, aResult); - + Clipperz.log(resultMessage, aResult); return aResult; }); } } if (CLIPPERZ_DEFERRED_CALL_LOGGING_ENABLED === true) { Clipperz.log("callback " + this._name, this); } return Clipperz.Async.Deferred.superclass.callback.apply(this, arguments); }, //----------------------------------------------------------------------------- 'addCallback': function () { var message; if (this._shouldTrace) { this._count ++; message = "[" + this._count + "] " + this._name + " "; // this.addBoth(function(aResult) {Clipperz.log(message + "-->", aResult); return aResult;}); this.addCallbacks( - // function(aResult) {Clipperz.log("-OK- " + message + "-->"/*, aResult*/); return aResult;}, - function(aResult) {console.log("-OK- " + message + "-->"/*, aResult*/); return aResult;}, - // function(aResult) {Clipperz.log("FAIL " + message + "-->"/*, aResult*/); return aResult;} - function(aResult) {console.log("FAIL " + message + "-->"/*, aResult*/); return aResult;} + function(aResult) {Clipperz.log("-OK- " + message + "-->"/*, aResult*/); return aResult;}, + function(aResult) {Clipperz.log("FAIL " + message + "-->"/*, aResult*/); return aResult;} ); } Clipperz.Async.Deferred.superclass.addCallback.apply(this, arguments); if (this._shouldTrace) { // this.addBoth(function(aResult) {Clipperz.log(message + "<--", aResult); return aResult;}); this.addCallbacks( - // function(aResult) {Clipperz.log("-OK- " + message + "<--", aResult); return aResult;}, - function(aResult) {console.log("-OK- " + message + "<--", aResult); return aResult;}, - // function(aResult) {Clipperz.log("FAIL " + message + "<--", aResult); return aResult;} - function(aResult) {console.log("FAIL " + message + "<--", aResult); return aResult;} + function(aResult) {Clipperz.log("-OK- " + message + "<--", aResult); return aResult;}, + function(aResult) {Clipperz.log("FAIL " + message + "<--", aResult); return aResult;} ); } }, //============================================================================= 'addCallbackPass': function() { var passFunction; passFunction = MochiKit.Base.partial.apply(null, arguments); this.addCallback(function() { var result; result = arguments[arguments.length -1]; passFunction(); return result; }); }, //----------------------------------------------------------------------------- 'addErrbackPass': function() { var passFunction; passFunction = MochiKit.Base.partial.apply(null, arguments); this.addErrback(function() { var result; result = arguments[arguments.length -1]; passFunction(); return result; }); }, //----------------------------------------------------------------------------- 'addBothPass': function() { var passFunction; passFunction = MochiKit.Base.partial.apply(null, arguments); this.addBoth(function() { var result; result = arguments[arguments.length -1]; passFunction(); return result; }); }, //----------------------------------------------------------------------------- 'addIf': function (aThenBlock, anElseBlock) { this.addCallback(MochiKit.Base.bind(function (aValue) { var deferredResult; if (!MochiKit.Base.isUndefinedOrNull(aValue) && aValue) { deferredResult = Clipperz.Async.callbacks(this._name + " <then>", aThenBlock, null, aValue); } else { deferredResult = Clipperz.Async.callbacks(this._name + " <else>", anElseBlock, null, aValue); } return deferredResult; })) }, //----------------------------------------------------------------------------- 'addMethod': function () { this.addCallback(MochiKit.Base.method.apply(this, arguments)); }, //----------------------------------------------------------------------------- 'addMethodcaller': function () { this.addCallback(MochiKit.Base.methodcaller.apply(this, arguments)); }, //============================================================================= 'addLog': function (aLog) { if (CLIPPERZ_DEFERRED_LOGGING_ENABLED) { this.addBothPass(function(res) {Clipperz.log(aLog + " ", res);}); -// this.addBothPass(function(res) {console.log(aLog + " ", res);}); } }, //============================================================================= 'acquireLock': function (aLock) { // this.addCallback(function (aResult) { // return Clipperz.Async.callbacks("Clipperz.Async.acquireLock", [ // MochiKit.Base.method(aLock, 'acquire'), // MochiKit.Base.partial(MochiKit.Async.succeed, aResult) // ], {trace:false}); // }); this.addCallback(MochiKit.Base.method(aLock, 'acquire')); }, 'releaseLock': function (aLock) { // this.addCallback(function (aResult) { // return Clipperz.Async.callbacks("Clipperz.Async.release <ok>", [ // MochiKit.Base.method(aLock, 'release'), // MochiKit.Base.partial(MochiKit.Async.succeed, aResult) // ], {trace:false}); // }); // this.addErrback(function (aResult) { -///console.log("releaseLock.addErrback:", aResult); +///Clipperz.log("releaseLock.addErrback:", aResult); // return Clipperz.Async.callbacks("Clipperz.Async.release <fail>", [ // MochiKit.Base.method(aLock, 'release'), // MochiKit.Base.partial(MochiKit.Async.fail, aResult) // ], {trace:false}); // }); // this.addBothPass(MochiKit.Base.method(aLock, 'release')); this.addCallbackPass(MochiKit.Base.method(aLock, 'release')); this.addErrback(function (anError) { aLock.release(); return anError; }); }, //============================================================================= 'collectResults': function (someRequests) { this.addCallback(Clipperz.Async.collectResults(this._name + " <collect results>", someRequests, this._args)); }, 'addCallbackList': function (aRequestList) { this.addCallback(Clipperz.Async.callbacks, this._name + " <callback list>", aRequestList, this._args); }, //============================================================================= 'vars': function () { if (this._vars == null) { this._vars = {} } return this._vars; }, 'setValue': function (aKey) { this.addCallback(MochiKit.Base.bind(function (aValue) { this.vars()[aKey] = aValue; return aValue; }, this)); }, 'getValue': function (aKey) { this.addCallback(MochiKit.Base.bind(function () { return this.vars()[aKey]; }, this)); }, //============================================================================= __syntaxFix__: "syntax fix" }); //############################################################################# Clipperz.Async.DeferredSynchronizer = function(aName, someMethods) { this._name = aName || "Anonymous deferred Synchronizer"; this._methods = someMethods; this._numberOfMethodsDone = 0; this._methodResults = []; this._result = new Clipperz.Async.Deferred("Clipperz.Async.DeferredSynchronizer # " + this.name(), {trace:false}); this._result.addMethod(this, 'methodResults'); this._result.addCallback(function(someResults) { var cancels; var errors; var result; cancels = MochiKit.Base.filter(function(aResult) { return (aResult instanceof MochiKit.Async.CancelledError)}, someResults); if (cancels.length == 0) { errors = MochiKit.Base.filter(function(aResult) { return (aResult instanceof Error)}, someResults); if (errors.length == 0) { // result = MochiKit.Async.succeed(someResults); result = someResults; } else { result = MochiKit.Async.fail(someResults); } } else { result = MochiKit.Async.fail(cancels[0]); } return result; }/*, this._methodResults */); return this; } MochiKit.Base.update(Clipperz.Async.DeferredSynchronizer.prototype, { //----------------------------------------------------------------------------- 'name': function() { return this._name; }, //----------------------------------------------------------------------------- 'methods': function() { return this._methods; }, 'methodResults': function() { return this._methodResults; }, //----------------------------------------------------------------------------- 'result': function() { return this._result; }, //----------------------------------------------------------------------------- 'numberOfMethodsDone':function() { return this._numberOfMethodsDone; }, 'incrementNumberOfMethodsDone': function() { this._numberOfMethodsDone ++; }, //----------------------------------------------------------------------------- 'run': function(args, aValue) { var deferredResults; var i, c; deferredResults = []; args = args || {}; c = this.methods().length; for (i=0; i<c; i++) { var deferredResult; var methodCalls; var ii, cc; -//console.log("TYPEOF", typeof(this.methods()[i])); +//Clipperz.log("TYPEOF", typeof(this.methods()[i])); if (typeof(this.methods()[i]) == 'function') { methodCalls = [ this.methods()[i] ]; } else { methodCalls = this.methods()[i]; } cc = methodCalls.length; deferredResult = new Clipperz.Async.Deferred("Clipperz.Async.DeferredSynchronizer.run => " + this.name() + "[" + i + "]", args); for (ii=0; ii<cc; ii++) { deferredResult.addCallback(methodCalls[ii]); } deferredResult.addBoth(MochiKit.Base.method(this, 'handleMethodCallDone', i)); deferredResults.push(deferredResult); } for (i=0; i<c; i++) { deferredResults[i].callback(aValue); } return this.result(); }, //----------------------------------------------------------------------------- 'handleMethodCallDone': function(anIndexValue, aResult) { this.incrementNumberOfMethodsDone(); this.methodResults()[anIndexValue] = aResult; if (this.numberOfMethodsDone() < this.methods().length) { // nothing to do here other than possibly log something } else if (this.numberOfMethodsDone() == this.methods().length) { this.result().callback(); } else if (this.numberOfMethodsDone() > this.methods().length) { alert("Clipperz.Async.Deferred.handleMethodCallDone -> WTF!"); // WTF!!! :( } }, //----------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); //############################################################################# MochiKit.Base.update(Clipperz.Async, { 'callbacks': function (aName, someFunctions, someArguments, aCallbackValue) { var deferredResult; var i, c; deferredResult = new Clipperz.Async.Deferred(aName, someArguments); c = someFunctions.length; for (i=0; i<c; i++) { deferredResult.addCallback(someFunctions[i]); } deferredResult.callback(aCallbackValue); return deferredResult; }, //------------------------------------------------------------------------- 'forkAndJoin': function (aName, someMethods, args) { return MochiKit.Base.partial(function (aName, someMethods, args, aValue) { var synchronizer; var result; args = args || {}; synchronizer = new Clipperz.Async.DeferredSynchronizer(aName, someMethods); result = synchronizer.run(args, aValue); return result; }, aName, someMethods, args); }, //------------------------------------------------------------------------- 'collectResults': function(aName, someRequests, args) { return MochiKit.Base.partial(function(aName, someRequests, args, aValue) { var deferredResult; var requestKeys; var methods; requestKeys = MochiKit.Base.keys(someRequests); methods = MochiKit.Base.values(someRequests); deferredResult = new Clipperz.Async.Deferred(aName, args); deferredResult.addCallback(Clipperz.Async.forkAndJoin(aName + " [inner forkAndJoin]", methods, args)); deferredResult.addBoth(function(someResults) { var returnFunction; var results; var i,c; var result; @@ -544,168 +534,168 @@ MochiKit.Base.update(Clipperz.Async, { }, //------------------------------------------------------------------------- 'deferredIf': function (aName, aThenBlock, anElseBlock) { return function (aValue) { var deferredResult; if (!MochiKit.Base.isUndefinedOrNull(aValue) && aValue) { deferredResult = Clipperz.Async.callbacks(aName + " <then>", aThenBlock, null, aValue); } else { deferredResult = Clipperz.Async.callbacks(aName + " <else>", anElseBlock, null, aValue); } return deferredResult; } }, //------------------------------------------------------------------------- 'log': function(aMessage, aResult) { if (CLIPPERZ_DEFERRED_LOGGING_ENABLED) { Clipperz.log(aMessage + " ", aResult); } return aResult; }, //========================================================================= 'deferredCompare': function (aComparator, aDeferred, bDeferred) { var deferredResult; deferredResult = new Clipperz.Async.Deferred("Clipperz.Async.deferredCompare", {trace:false}); deferredResult.addCallback(Clipperz.Async.collectAll, [aDeferred, bDeferred]); deferredResult.addCallback(function (someResults) { var result; if (aComparator(someResults[0], someResults[1]) > 0) { result = MochiKit.Async.succeed(); } else { result = MochiKit.Async.fail(); }; return result; }); deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'insertIntoSortedArray': function (anObject, aDeferredComparator, aSortedResult) { var deferredResult; var i, c; if (aSortedResult.length == 0) { deferredResult = MochiKit.Async.succeed([anObject]); } else { deferredResult = new Clipperz.Async.Deferred("Clipperz.Async.insertIntoSortedArray", {trace:false}); c = aSortedResult.length + 1; for (i=0; i<c; i++) { deferredResult.addCallback(function (aDeferredComparator, aObject, bObject, aContext) { var innerDeferredResult; innerDeferredResult = new Clipperz.Async.Deferred("Clipperz.Async.insertIntoSortedArray <inner compare>", {trace:false}); innerDeferredResult.addCallback(aDeferredComparator, aObject, bObject); innerDeferredResult.addErrback(MochiKit.Async.fail, aContext); innerDeferredResult.callback(); return innerDeferredResult; }, aDeferredComparator, anObject, aSortedResult[i], i); } deferredResult.addMethod(aSortedResult, 'push', anObject); deferredResult.addErrback(function (anError) { aSortedResult.splice(anError.message, 0, anObject); }) deferredResult.addBoth(MochiKit.Async.succeed, aSortedResult); deferredResult.callback(); } return deferredResult; }, //------------------------------------------------------------------------- 'deferredSort': function (aDeferredComparator, someObjects) { var deferredResult; var i, c; deferredResult = new Clipperz.Async.Deferred("Clipperz.Async.deferredSort", {trace:false}); c = someObjects.length; for (i=0; i<c; i++) { deferredResult.addCallback(Clipperz.Async.insertIntoSortedArray, someObjects[i], aDeferredComparator); if ((i % 50) == 0) { -// console.log("######### sort wait ##########"); +// Clipperz.log("######### sort wait ##########"); deferredResult.addCallback(MochiKit.Async.wait, 0.5); } } deferredResult.callback([]); return deferredResult; }, //========================================================================= 'deferredFilter': function (aFunction, someObjects) { var deferredResult; var i, c; deferredResult = new Clipperz.Async.Deferred("Clipperz.Async.deferredFilter", {trace:false}); c = someObjects.length; for (i=0; i<c; i++) { deferredResult.addCallback(function (aFunction, anObject, anIndex, aResult) { var innerDeferredResult; innerDeferredResult = new Clipperz.Async.Deferred("Clipperz.Async.deferredFilter <inner - " + anIndex + ">", {trace:false}); innerDeferredResult.addCallback(aFunction, anObject); innerDeferredResult.addCallback(function (aFilterResult) { if (aFilterResult) { aResult.push(anObject); }; }); innerDeferredResult.addBoth(MochiKit.Async.succeed, aResult); innerDeferredResult.callback(); return innerDeferredResult; }, aFunction, someObjects[i], i); } deferredResult.callback([]); return deferredResult; }, 'forEach': function (aFunction) { return MochiKit.Base.partial(function (aFunction, anIterable) { MochiKit.Iter.forEach(anIterable, aFunction); }, aFunction); }, //========================================================================= 'or': function (someValues) { return Clipperz.Async.callbacks("Clipperz.Async.or", [ MochiKit.Base.values, MochiKit.Base.flattenArguments, -//function (aValue) { console.log("Record.hasAnyCleanTextData - flatten", aValue); return aValue; }, +//function (aValue) { Clipperz.log("Record.hasAnyCleanTextData - flatten", aValue); return aValue; }, function(someInnerValues) { return MochiKit.Iter.some(someInnerValues, MochiKit.Base.operator.identity); } ], {trace:false}, someValues); }, //========================================================================= 'clearResult': function () {}, //========================================================================= __syntaxFix__: "syntax fix" }); //############################################################################# CLIPPERZ_DEFERRED_LOGGING_ENABLED = true; CLIPPERZ_DEFERRED_TRACING_ENABLED = false; CLIPPERZ_DEFERRED_CALL_LOGGING_ENABLED = false; diff --git a/frontend/gamma/js/Clipperz/Base.js b/frontend/gamma/js/Clipperz/Base.js index 9d399d9..84b2172 100644 --- a/frontend/gamma/js/Clipperz/Base.js +++ b/frontend/gamma/js/Clipperz/Base.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.Base) == 'undefined') { Clipperz.Base = {}; } Clipperz.Base.VERSION = "0.2"; Clipperz.Base.NAME = "Clipperz.Base"; MochiKit.Base.update(Clipperz.Base, { //------------------------------------------------------------------------- '__repr__': function () { return "[" + this.NAME + " " + this.VERSION + "]"; }, //------------------------------------------------------------------------- 'toString': function () { return this.__repr__(); }, //------------------------------------------------------------------------- 'itemgetter': function (aKeyPath) { // return MochiKit.Base.compose.apply(null, [MochiKit.Base.itemgetter('key3')]); return MochiKit.Base.compose.apply(null, MochiKit.Base.map( MochiKit.Base.itemgetter, MochiKit.Iter.reversed( aKeyPath.split('.') ) ) ); }, //------------------------------------------------------------------------- 'isUrl': function (aValue) { return (MochiKit.Base.urlRegExp.test(aValue)); }, 'isEmail': function (aValue) { return (MochiKit.Base.emailRegExp.test(aValue)); }, //------------------------------------------------------------------------- 'caseInsensitiveCompare': function (a, b) { return MochiKit.Base.compare(a.toLowerCase(), b.toLowerCase()); }, 'reverseComparator': function (aComparator) { return MochiKit.Base.compose(function(aResult) { return -aResult; }, aComparator); }, 'caseInsensitiveKeyComparator': function (aKey) { return function (a, b) { return MochiKit.Base.compare(a[aKey].toLowerCase(), b[aKey].toLowerCase()); } }, //------------------------------------------------------------------------- /* 'dependsOn': function(module, deps) { if (!(module in Clipperz)) { MochiKit[module] = {}; } if (typeof(dojo) != 'undefined') { dojo.provide('Clipperz.' + module); } for (var i = 0; i < deps.length; i++) { if (typeof(dojo) != 'undefined') { dojo.require('Clipperz.' + deps[i]); } if (typeof(JSAN) != 'undefined') { JSAN.use('Clipperz.' + deps[i], []); } if (!(deps[i] in Clipperz)) { throw 'Clipperz.' + module + ' depends on Clipperz.' + deps[i] + '!' } } }, */ //------------------------------------------------------------------------- 'trim': function (aValue) { return aValue.replace(/^\s+|\s+$/g, ""); }, //------------------------------------------------------------------------- 'stringToByteArray': function (aValue) { var result; var i, c; @@ -348,186 +346,169 @@ MochiKit.Base.update(Clipperz.Base, { case "array": case "object": sHTML += Clipperz.Base.formatJSON(vValue, (sIndent + sIndentStyle)); break; case "boolean": case "number": sHTML += vValue.toString(); break; case "null": sHTML += "null"; break; case "string": sHTML += ("\"" + vValue + "\""); break; default: sHTML += ("TYPEOF: " + typeof(vValue)); } // loop iCount++; }); // close object if (sDataType == "array") { sHTML += ("\n" + sIndent + "]"); } else { sHTML += ("\n" + sIndent + "}"); } // return return sHTML; }, //------------------------------------------------------------------------- 'mergeItems': function (anArrayOfValues) { var result; var i, c; result = {}; c = anArrayOfValues.length; for (i=0; i<c; i++) { result[anArrayOfValues[i][0]] = anArrayOfValues[i][1]; } return result; }, //------------------------------------------------------------------------- 'map': function (fn, lstObj/*, lst... */) { var result; if (MochiKit.Base.isArrayLike(lstObj)) { result = MochiKit.Base.map.apply(this, arguments); } else { var keys; var values; var computedValues; keys = MochiKit.Base.keys(lstObj); values = MochiKit.Base.values(lstObj); computedValues = MochiKit.Base.map(fn, values); result = Clipperz.Base.mergeItems(MochiKit.Base.zip(keys, computedValues)); } return result; }, //------------------------------------------------------------------------- 'sanitizeString': function(aValue) { var result; if (Clipperz.Base.objectType(aValue) == 'string') { result = aValue; result = result.replace(/</img,"<"); result = result.replace(/>/img,">"); } else { result = aValue; } return result; }, //------------------------------------------------------------------------- 'module': function(aValue) { // aValue = 'Clipperz.PM.Compact' // // if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } // if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } // if (typeof(Clipperz.PM.UI.Common.Components) == 'undefined') { Clipperz.PM.UI.Common.Components = {}; } -//console.log(">>> module: " + aValue); var currentScope; var pathElements; var i,c; currentScope = window; pathElements = aValue.split('.'); c = pathElements.length; for (i=0; i<c; i++) { -//console.log("--- current path element: " + pathElements[i]); -//console.log("--- current scope", currentScope); if (typeof(currentScope[pathElements[i]]) == 'undefined') { currentScope[pathElements[i]] = {}; } currentScope = currentScope[pathElements[i]]; } }, //------------------------------------------------------------------------- 'exception': { 'AbstractMethod': new MochiKit.Base.NamedError("Clipperz.Base.exception.AbstractMethod"), 'UnknownType': new MochiKit.Base.NamedError("Clipperz.Base.exception.UnknownType"), 'VulnerabilityIssue': new MochiKit.Base.NamedError("Clipperz.Base.exception.VulnerabilityIssue"), 'MandatoryParameter': new MochiKit.Base.NamedError("Clipperz.Base.exception.MandatoryParameter"), 'ObjectNotFound': new MochiKit.Base.NamedError("Clipperz.Base.exception.ObjectNotFound"), 'raise': function (aName) { throw Clipperz.Base.exception[aName]; } }, //------------------------------------------------------------------------- 'extend': YAHOO.extendX, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); // Original regExp courtesy of John Gruber: http://daringfireball.net/2009/11/liberal_regex_for_matching_urls // Updated to match Clipperz usage pattern. //MochiKit.Base.urlRegExp = new RegExp(/\b(([\w-]+:\/\/?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/)))/); MochiKit.Base.urlRegExp = new RegExp(/^((([\w-]+:\/\/?)|(www\.))[^\s()<>]+((?:\([\w\d]+\)|([^[:punct:]\s]|\/)))?)/); // RegExp found here: http://www.tipsntracks.com/117/validate-an-email-address-using-regular-expressions.html MochiKit.Base.emailRegExp = new RegExp(/^([a-zA-Z0-9_\-\.]+)@(([a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3}))|(([01]?\d\d?|2[0-4]\d|25[0-5])\.){3}([01]?\d\d?|25[0-5]|2[0-4]\d))$/); MochiKit.Base.registerComparator('Object dummy comparator', function(a, b) { return ((a.constructor == Object) && (b.constructor == Object)); }, function(a, b) { var result; var aKeys; var bKeys; -//MochiKit.Logging.logDebug(">>> comparator"); -//MochiKit.Logging.logDebug("- a: " + Clipperz.Base.serializeJSON(a)); -//MochiKit.Logging.logDebug("- b: " + Clipperz.Base.serializeJSON(a)); aKeys = MochiKit.Base.keys(a).sort(); bKeys = MochiKit.Base.keys(b).sort(); - result = MochiKit.Base.compare(aKeys, bKeys); -//if (result != 0) { -// MochiKit.Logging.logDebug("- comparator 'keys':"); -// MochiKit.Logging.logDebug("- comparator aKeys: " + Clipperz.Base.serializeJSON(aKeys)); -// MochiKit.Logging.logDebug("- comparator bKeys: " + Clipperz.Base.serializeJSON(bKeys)); -//} + if (result == 0) { var i, c; c = aKeys.length; for (i=0; (i<c) && (result == 0); i++) { result = MochiKit.Base.compare(a[aKeys[i]], b[bKeys[i]]); -//if (result != 0) { -// MochiKit.Logging.logDebug("- comparator 'values':"); -// MochiKit.Logging.logDebug("- comparator a[aKeys[i]]: " + Clipperz.Base.serializeJSON(a[aKeys[i]])); -// MochiKit.Logging.logDebug("- comparator b[bKeys[i]]: " + Clipperz.Base.serializeJSON(b[bKeys[i]])); -//} } } -//MochiKit.Logging.logDebug("<<< comparator - result: " + result); return result; }, true ); diff --git a/frontend/gamma/js/Clipperz/ByteArray.js b/frontend/gamma/js/Clipperz/ByteArray.js index ae586e7..22c7c6e 100644 --- a/frontend/gamma/js/Clipperz/ByteArray.js +++ b/frontend/gamma/js/Clipperz/ByteArray.js @@ -1,619 +1,580 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } //============================================================================= Clipperz.ByteArray_abstract = function(args) { return this; } Clipperz.ByteArray_abstract.prototype = MochiKit.Base.update(null, { //------------------------------------------------------------------------- 'toString': function() { return "Clipperz.ByteArray_abstract"; }, //------------------------------------------------------------------------- 'equals': function(aValue) { return (this.compare(aValue) == 0); }, //------------------------------------------------------------------------- 'compare': function(aValue) { var result; var i; result = MochiKit.Base.compare(this.length(), aValue.length()); i = this.length(); while ((result == 0) && (i>0)) { i--; result = MochiKit.Base.compare(this.byteAtIndex(i), aValue.byteAtIndex(i)); } return result; }, //------------------------------------------------------------------------- 'clone': function() { throw Clipperz.Base.exception.AbstractMethod; }, //------------------------------------------------------------------------- 'newInstance': function() { throw Clipperz.Base.exception.AbstractMethod; }, //------------------------------------------------------------------------- 'reset': function() { throw Clipperz.Base.exception.AbstractMethod; }, //------------------------------------------------------------------------- 'length': function() { throw Clipperz.Base.exception.AbstractMethod; }, //------------------------------------------------------------------------- 'checkByteValue': function(aValue) { -//Clipperz.log("aValue", aValue.toString(16)); -//Clipperz.log("(aValue & 0xff)", (aValue & 0xff).toString(16)); - if ((aValue & 0xff) != aValue) { - MochiKit.Logging.logError("Clipperz.ByteArray.appendByte: the provided value (0x" + aValue.toString(16) + ") is not a byte value."); + Clipperz.logError("Clipperz.ByteArray.appendByte: the provided value (0x" + aValue.toString(16) + ") is not a byte value."); throw Clipperz.ByteArray.exception.InvalidValue; } }, //------------------------------------------------------------------------- 'xorMergeWithBlock': function(aBlock, anAllignment, paddingMode) { var result; var a, b; var aLength; var bLength; var i, c; if (this.length() > aBlock.length()) { a = this; b = aBlock; } else { a = aBlock; b = this; } aLength = a.length(); bLength = b.length(); if (aLength != bLength) { if (paddingMode == 'truncate') { if (anAllignment == 'left') { a = a.split(0, bLength); } else { a = a.split(aLength - bLength); } } else { var ii, cc; var padding; // padding = new Clipperz.ByteArray(); padding = this.newInstance(); cc = aLength - bLength; for (ii=0; ii<cc; ii++) { padding.appendByte(0); } if (anAllignment == 'left') { b = b.appendBlock(padding); } else { b = padding.appendBlock(b); } } } - -// result = new Clipperz.ByteArray(); result = this.newInstance(); c = a.length(); for (i=0; i<c; i++) { result.appendByte(a.byteAtIndex(i) ^ b.byteAtIndex(i)); } return result; }, //------------------------------------------------------------------------- -/* - 'shiftLeft': function(aNumberOfBitsToShift) { - var result; - - result = this.clone(); // ??????????? - - return result; - }, -*/ - //------------------------------------------------------------------------- 'appendBlock': function(aBlock) { throw Clipperz.Base.exception.AbstractMethod; }, //------------------------------------------------------------------------- 'appendByte': function(aValue) { throw Clipperz.Base.exception.AbstractMethod; }, 'appendBytes': function(args) { var values; var i,c; if (args.constructor == Array) { values = args; } else { values = arguments; } c = values.length; for (i=0; i<c; i++) { this.appendByte(values[i]); } return this; }, //------------------------------------------------------------------------- 'appendWord': function(aValue, isLittleEndian) { var result; var processAsLittleEndian; processAsLittleEndian = isLittleEndian === true ? true : false; if (processAsLittleEndian) { result = this.appendBytes( (aValue) & 0xff, (aValue >> 8) & 0xff, (aValue >> 16) & 0xff, (aValue >> 24) & 0xff ); // little endian } else { result = this.appendBytes( (aValue >> 24) & 0xff, (aValue >> 16) & 0xff, (aValue >> 8) & 0xff, (aValue) & 0xff ); // big endian - DEFAULT } return result; }, 'appendWords': function(args) { var values; var i,c; if (args.constructor == Array) { values = args; } else { values = arguments; } c = values.length; for (i=0; i<c; i++) { this.appendWord(values[i], false); } return this; }, //------------------------------------------------------------------------- 'appendBigEndianWords': function(args) { var values; var i,c; if (args.constructor == Array) { values = args; } else { values = arguments; } c = values.length; for (i=0; i<c; i++) { this.appendWord(values[i], true); } return this; }, //------------------------------------------------------------------------- 'appendBinaryString': function (aBinaryString) { var i,c; c = aBinaryString.length; for (i=0; i<c; i++) { this.appendByte(aBinaryString.charCodeAt(i)); }; return this; }, //------------------------------------------------------------------------- 'byteAtIndex': function(anIndex) { throw Clipperz.Base.exception.AbstractMethod; }, 'setByteAtIndex': function(aValue, anIndex) { throw Clipperz.Base.exception.AbstractMethod; }, //------------------------------------------------------------------------- 'bitAtIndex': function(aBitPosition) { var result; var bytePosition; var bitPositionInSelectedByte; var selectedByte; var selectedByteMask; bytePosition = this.length() - Math.ceil((aBitPosition + 1)/ 8); bitPositionInSelectedByte = aBitPosition % 8; selectedByte = this.byteAtIndex(bytePosition); if (bitPositionInSelectedByte > 0) { selectedByteMask = (1 << bitPositionInSelectedByte); } else { selectedByteMask = 1; } result = selectedByte & selectedByteMask ? 1 : 0; -//console.log("aBitPosition: " + aBitPosition + ", length: " + this.length() + ", bytePosition: " + bytePosition + ", bitPositionInSelectedByte: " + bitPositionInSelectedByte + ", selectedByteMask: " + selectedByteMask); return result; }, //------------------------------------------------------------------------- 'bitBlockAtIndexWithSize': function(aBitPosition, aSize) { var result; var bitValue; var i,c; result = 0; c = aSize; for (i=0; i<c; i++) { bitValue = this.bitAtIndex(aBitPosition + i); result = result | bitValue << i; } return result; }, //------------------------------------------------------------------------- 'asString': function() { var result; var length; var i; -//var startTime = new Date(); - -//# result = ""; result = []; i = 0; length = this.length(); while (i < length) { var currentCharacter; var currentByte; var unicode; currentByte = this.byteAtIndex(i); if ((currentByte & 0x80) == 0x00 ) { // 0xxxxxxx unicode = currentByte; currentCharacter = String.fromCharCode(unicode); } else if ((currentByte & 0xe0) == 0xc0 ) { // 110xxxxx 10xxxxxx unicode = (currentByte & 0x1f) << 6; i++; currentByte = this.byteAtIndex(i); unicode = unicode | (currentByte & 0x3f); currentCharacter = String.fromCharCode(unicode); } else if ((currentByte & 0xf0) == 0xe0 ) { // 1110xxxx 10xxxxxx 10xxxxxx unicode = (currentByte & 0x0f) << (6+6); i++; currentByte = this.byteAtIndex(i); unicode = unicode | ((currentByte & 0x3f) << 6); i++; currentByte = this.byteAtIndex(i); unicode = unicode | (currentByte & 0x3f); currentCharacter = String.fromCharCode(unicode); } else { // 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx unicode = (currentByte & 0x07) << (6+6+6); i++; currentByte = this.byteAtIndex(i); unicode = unicode | ((currentByte & 0x3f) << (6+6)); i++; currentByte = this.byteAtIndex(i); unicode = unicode | ((currentByte & 0x3f) << 6); i++; currentByte = this.byteAtIndex(i); unicode = unicode | (currentByte & 0x3f); currentCharacter = String.fromCharCode(unicode); } -// result += currentCharacter; result.push(currentCharacter); i++; } -//MochiKit.Logging.logDebug("[" + (new Date() - startTime) + "] ByteArray.asString"); - -// return result; return result.join(""); }, //------------------------------------------------------------------------- 'toHexString': function() { throw Clipperz.Base.exception.AbstractMethod; }, //------------------------------------------------------------------------- 'base64map': "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", 'base64mapIndex': "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(''), -// 'base64mapInvertedIndex': { -// 'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': 6, 'H': 7, 'I': 8, 'J': 9, -// 'K': 10, 'L': 11, 'M': 12, 'N': 13, 'O': 14, 'P': 15, 'Q': 16, 'R': 17, 'S': 18, 'T': 19, -// 'U': 20, 'V': 21, 'W': 22, 'X': 23, 'Y': 24, 'Z': 25, 'a': 26, 'b': 27, 'c': 28, 'd': 29, -// 'e': 30, 'f': 31, 'g': 32, 'h': 33, 'i': 34, 'j': 35, 'k': 36, 'l': 37, 'm': 38, 'n': 39, -// 'o': 40, 'p': 41, 'q': 42, 'r': 43, 's': 44, 't': 45, 'u': 46, 'v': 47, 'w': 48, 'x': 49, -// 'y': 50, 'z': 51, '0': 52, '1': 53, '2': 54, '3': 55, '4': 56, '5': 57, '6': 58, '7': 59, -// '8': 60, '9': 61, '+': 62, '/': 63, -// "=": -1}, //------------------------------------------------------------------------- 'appendBase64String': function(aValue) { var i; var length; length = aValue.length; if ((length % 4) != 0) { - MochiKit.Logging.logError("the value passed to the 'ByteArray.setBase64Value' is not correct"); + Clipperz.logError("the value passed to the 'ByteArray.setBase64Value' is not correct"); throw Clipperz.ByteArray.exception.InvalidValue; } i = 0; while (i<length) { var value1, value2, value3, value4; var byte1, byte2, byte3; value1 = this.base64map.indexOf(aValue.charAt(i)); value2 = this.base64map.indexOf(aValue.charAt(i+1)); value3 = this.base64map.indexOf(aValue.charAt(i+2)); value4 = this.base64map.indexOf(aValue.charAt(i+3)); -// value1 = this.base64mapInvertedIndex[aValue.charAt(i)]; -// value2 = this.base64mapInvertedIndex[aValue.charAt(i+1)]; -// value3 = this.base64mapInvertedIndex[aValue.charAt(i+2)]; -// value4 = this.base64mapInvertedIndex[aValue.charAt(i+3)]; - byte1 = (value1 << 2) | ((value2 & 0x30) >> 4); if (value3 != -1) { byte2 = ((value2 & 0x0f) << 4) | ((value3 & 0x3c) >> 2); if (value4 != -1) { byte3 = ((value3 & 0x03) << 6) | (value4); } else { byte3 = null; } } else { byte2 = null; byte3 = null; } this.appendByte(byte1); this.appendByte(byte2); this.appendByte(byte3); i += 4; } return this; }, //------------------------------------------------------------------------- 'toBase64String': function() { var result; var length; var i; var byte1, byte2, byte3; var char1, char2, char3, char4; i = 0; length = this.length(); result = new Array(Math.ceil(length/3)); while (i < length) { byte1 = this.byteAtIndex(i); if ((i+2) < length) { byte2 = this.byteAtIndex(i+1); byte3 = this.byteAtIndex(i+2); } else if ((i+2) == length) { byte2 = this.byteAtIndex(i+1); byte3 = null; } else { byte2 = null; byte3 = null; } char1 = this.base64mapIndex[byte1 >> 2]; if (byte2 != null) { char2 = this.base64mapIndex[((byte1 & 0x03) << 4) | ((byte2 & 0xf0) >> 4)]; if (byte3 != null) { char3 = this.base64mapIndex[((byte2 & 0x0f) << 2) | ((byte3 & 0xc0) >> 6)]; char4 = this.base64mapIndex[(byte3 & 0x3f)]; } else { char3 = this.base64mapIndex[(byte2 & 0x0f) << 2]; char4 = "="; } } else { char2 = this.base64mapIndex[(byte1 & 0x03) << 4]; char3 = "="; char4 = "="; } result.push(char1 + char2 + char3 + char4); i += 3; } return result.join(""); }, //------------------------------------------------------------------------- 'base32map': "0123456789abcdefghjkmnpqrstvwxyz", 'base32mapIndex': "0123456789abcdefghjkmnpqrstvwxyz".split(''), //------------------------------------------------------------------------- 'appendBase32String': function(aValue) { var value; var i; var length; var value1, value2, value3, value4, value5, value6, value7, value8; var byte1, byte2, byte3, byte4, byte5; value = aValue.toLowerCase(); value = value.replace(/[\s\-]/g, ''); value = value.replace(/[0o]/g, '0'); value = value.replace(/[1il]/g, '1'); length = value.length; if ((length % 8) != 0) { - MochiKit.Logging.logError("the value passed to the 'ByteArray.setBase32Value' is not correct"); + Clipperz.logError("the value passed to the 'ByteArray.setBase32Value' is not correct"); throw Clipperz.ByteArray.exception.InvalidValue; } i = 0; while (i<length) { value1 = this.base32map.indexOf(value.charAt(i)); value2 = this.base32map.indexOf(value.charAt(i+1)); value3 = this.base32map.indexOf(value.charAt(i+2)); value4 = this.base32map.indexOf(value.charAt(i+3)); value5 = this.base32map.indexOf(value.charAt(i+4)); value6 = this.base32map.indexOf(value.charAt(i+5)); value7 = this.base32map.indexOf(value.charAt(i+6)); value8 = this.base32map.indexOf(value.charAt(i+7)); byte1 = byte2 = byte3 = byte4 = byte5 = null; byte1 = (value1 << 3) | ((value2 & 0x1c) >> 2); if (value3 != -1) { byte2 = ((value2 & 0x03) << 6) | (value3 << 1) | ((value4 & 0x10) >> 4); if (value5 != -1) { byte3 = ((value4 & 0x0f) << 4) | ((value5 & 0x1e) >> 1); if (value6 != -1) { byte4 = ((value5 & 0x01) << 7) | (value6 << 2) | ((value7 & 0x18) >> 3); if (value8 != -1) { byte5 = ((value7 & 0x07) << 5) | (value8); } } } } this.appendByte(byte1); this.appendByte(byte2); this.appendByte(byte3); this.appendByte(byte4); this.appendByte(byte5); i += 8; } return this; }, //------------------------------------------------------------------------- 'toBase32String': function() { var result; var length; var i; var byte1, byte2, byte3, byte4, byte5; var char1, char2, char3, char4, char5, char6, char7, char8; i = 0; length = this.length(); result = new Array(Math.ceil(length/5)); while (i < length) { byte1 = this.byteAtIndex(i); if ((i+4) < length) { byte2 = this.byteAtIndex(i+1); byte3 = this.byteAtIndex(i+2); byte4 = this.byteAtIndex(i+3); byte5 = this.byteAtIndex(i+4); } else if ((i+4) == length) { byte2 = this.byteAtIndex(i+1); byte3 = this.byteAtIndex(i+2); byte4 = this.byteAtIndex(i+3); byte5 = null; } else if ((i+3) == length) { byte2 = this.byteAtIndex(i+1); byte3 = this.byteAtIndex(i+2); byte4 = null; byte5 = null; } else if ((i+2) == length) { byte2 = this.byteAtIndex(i+1); byte3 = null; byte4 = null; byte5 = null; } else { byte2 = null; byte3 = null; byte4 = null; byte5 = null; } char1 = this.base32mapIndex[byte1 >> 3]; char2 = char3 = char4 = char5 = char6 = char7 = char8 = "="; if (byte2 != null) { char2 = this.base32mapIndex[((byte1 & 0x07) << 2) | ((byte2 & 0xc0) >> 6)]; char3 = this.base32mapIndex[((byte2 & 0x3e) >> 1)]; if (byte3 != null) { char4 = this.base32mapIndex[((byte2 & 0x01) << 4) | ((byte3 & 0xf0) >> 4)]; if (byte4 != null) { char5 = this.base32mapIndex[((byte3 & 0x0f) << 1) | ((byte4 & 0x80) >> 7)]; @@ -635,379 +596,379 @@ Clipperz.ByteArray_abstract.prototype = MochiKit.Base.update(null, { char2 = this.base32mapIndex[(byte1 & 0x07) << 2]; } result.push(char1 + char2 + char3 + char4 + char5 + char6 + char7 + char8); i += 5; } return result.join(""); }, //------------------------------------------------------------------------- 'toBinaryString': function () { var i, c; var result; result = ''; c = this.length(); for (i=0; i<c; i++) { result += String.fromCharCode(this.byteAtIndex(i)); } return result; }, //------------------------------------------------------------------------- 'split': function(aStartingIndex, anEndingIndex) { throw Clipperz.Base.exception.AbstractMethod; }, //------------------------------------------------------------------------- 'increment': function() { var i; var done; done = false; i = this.length() - 1; while ((i>=0) && (done == false)) { var currentByteValue; currentByteValue = this.byteAtIndex(i); if (currentByteValue == 0xff) { this.setByteAtIndex(0, i); if (i>= 0) { i --; } else { done = true; } } else { this.setByteAtIndex(currentByteValue + 1, i); done = true; } } }, //------------------------------------------------------------------------- 'arrayValues': function() { throw Clipperz.Base.exception.AbstractMethod; }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); //============================================================================= // // Clipperz.ByteArray_hex // //============================================================================= /* Clipperz.ByteArray_hex = function (args) { this._value = ""; if (typeof(args) != 'undefined') { if (args.constructor == Array) { this.appendBytes(args); } else if (args.constructor == String) { if (args.indexOf("0x") == 0) { var value; value = args.substring(2).toLowerCase(); if (/[0123456789abcdef]* /.test(value)) { the space in the regexp shoud be removed if the code is activate if ((value.length % 2) == 0) { this._value = value; } else { this._value = "0" + value; } } else { -MochiKit.Logging.logError("Clipperz.ByteArray should be inizialized with an hex string."); +Clipperz.logError("Clipperz.ByteArray should be inizialized with an hex string."); throw Clipperz.ByteArray.exception.InvalidValue; } } else { var value; var i,c; c = args.length; value = new Array(c); for (i=0; i<c; i++) { value.push(Clipperz.ByteArray.unicodeToUtf8HexString(args.charCodeAt(i))); } this._value = value.join(""); } } else { this.appendBytes(MochiKit.Base.extend(null, arguments)); } } return this; } Clipperz.ByteArray_hex.prototype = MochiKit.Base.update(new Clipperz.ByteArray_abstract(), { //------------------------------------------------------------------------- 'toString': function() { return "Clipperz.ByteArray_hex"; }, //------------------------------------------------------------------------- 'clone': function() { var result; result = this.newInstance(); result._value = this._value; return result; }, //------------------------------------------------------------------------- 'newInstance': function() { return new Clipperz.ByteArray_hex(); }, //------------------------------------------------------------------------- 'reset': function() { this._value = ""; }, //------------------------------------------------------------------------- 'length': function() { return (this._value.length / 2); }, //------------------------------------------------------------------------- 'appendBlock': function(aBlock) { this._value = this._value += aBlock.toHexString().substring(2); return this; }, //------------------------------------------------------------------------- 'appendByte': function(aValue) { if (aValue != null) { this.checkByteValue(aValue); this._value += Clipperz.ByteArray.byteToHex(aValue); } return this; }, //------------------------------------------------------------------------- 'byteAtIndex': function(anIndex) { return parseInt(this._value.substr(anIndex*2, 2), 16); }, 'setByteAtIndex': function(aValue, anIndex) { var missingBytes; this.checkByteValue(aValue); missingBytes = anIndex - this.length(); if (missingBytes < 0) { var currentValue; var firstCutIndex; var secondCutIndex; firstCutIndex = anIndex * 2; secondCutIndex = firstCutIndex + 2; currentValue = this._value; this._value = currentValue.substring(0, firstCutIndex) + Clipperz.ByteArray.byteToHex(aValue) + currentValue.substring(secondCutIndex); } else if (missingBytes == 0) { this.appendByte(aValue); } else { var i,c; c = missingBytes; for (i=0; i<c; i++) { this.appendByte(0); } this.appendByte(aValue); } }, //------------------------------------------------------------------------- 'toHexString': function() { return "0x" + this._value; }, //------------------------------------------------------------------------- 'split': function(aStartingIndex, anEndingIndex) { var result; var startingIndex; var endingIndex; result = this.newInstance(); startingIndex = aStartingIndex * 2; if (typeof(anEndingIndex) != 'undefined') { endingIndex = anEndingIndex * 2; result._value = this._value.substring(startingIndex, endingIndex); } else { result._value = this._value.substring(startingIndex); } return result; }, //------------------------------------------------------------------------- 'arrayValues': function() { var result; var i,c; c = this.length(); result = new Array(c); for (i=0; i<c; i++) { result[i] = this.byteAtIndex(i); } return result; }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); */ //============================================================================= // // Clipperz.ByteArray_array // //============================================================================= Clipperz.ByteArray_array = function (args) { if (typeof(args) != 'undefined') { if (args.constructor == Array) { this._value = args.slice(0); } else if (args.constructor == String) { var result; var value; var i, c; if (args.indexOf("0x") == 0) { value = args.substring(2).toLowerCase(); if (/[0123456789abcdef]*/.test(value)) { if ((value.length % 2) != 0) { value = "0" + value; } } else { -MochiKit.Logging.logError("Clipperz.ByteArray should be inizialized with an hex string."); + Clipperz.logError("Clipperz.ByteArray should be inizialized with an hex string."); throw Clipperz.ByteArray.exception.InvalidValue; } c = value.length / 2 result = new Array(c); for (i=0; i<c; i++) { result[i] = parseInt(value.substr(i*2, 2), 16); } } else { var unicode; result = []; c = args.length; for (i=0; i<c; i++) { // Clipperz.ByteArray.pushUtf8BytesOfUnicodeChar(result, args.charCodeAt(i)); unicode = args.charCodeAt(i); if (unicode <= 0x7f) { // 0x00000000 - 0x0000007f -> 0xxxxxxx result.push(unicode); // } else if ((unicode >= 0x80) && (unicode <= 0x7ff)) { // 0x00000080 - 0x000007ff -> 110xxxxx 10xxxxxx } else if (unicode <= 0x7ff) { // 0x00000080 - 0x000007ff -> 110xxxxx 10xxxxxx result.push((unicode >> 6) | 0xc0); result.push((unicode & 0x3F) | 0x80); // } else if ((unicode >= 0x0800) && (unicode <= 0xffff)) { // 0x00000800 - 0x0000ffff -> 1110xxxx 10xxxxxx 10xxxxxx } else if (unicode <= 0xffff) { // 0x00000800 - 0x0000ffff -> 1110xxxx 10xxxxxx 10xxxxxx result.push((unicode >> 12) | 0xe0); result.push(((unicode >> 6) & 0x3f) | 0x80); result.push((unicode & 0x3f) | 0x80); } else { // 0x00010000 - 0x001fffff -> 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx result.push((unicode >> 18) | 0xf0); result.push(((unicode >> 12) & 0x3f) | 0x80); result.push(((unicode >> 6) & 0x3f) | 0x80); result.push((unicode & 0x3f) | 0x80); } } } this._value = result; } else { this._value = []; this.appendBytes(MochiKit.Base.extend(null, arguments)); } } else { this._value = []; } return this; } Clipperz.ByteArray_array.prototype = MochiKit.Base.update(new Clipperz.ByteArray_abstract(), { //------------------------------------------------------------------------- 'toString': function() { return "Clipperz.ByteArray_array"; }, //------------------------------------------------------------------------- 'clone': function() { var result; result = this.newInstance(); result.appendBytes(this._value); return result; }, //------------------------------------------------------------------------- 'newInstance': function() { return new Clipperz.ByteArray_array(); }, //------------------------------------------------------------------------- 'reset': function() { this._value = []; }, //------------------------------------------------------------------------- 'length': function() { return (this._value.length); }, //------------------------------------------------------------------------- 'appendBlock': function(aBlock) { MochiKit.Base.extend(this._value, aBlock._value); return this; }, //------------------------------------------------------------------------- @@ -1022,193 +983,193 @@ Clipperz.ByteArray_array.prototype = MochiKit.Base.update(new Clipperz.ByteArray }, //------------------------------------------------------------------------- 'byteAtIndex': function(anIndex) { return this._value[anIndex]; }, 'setByteAtIndex': function(aValue, anIndex) { var missingBytes; this.checkByteValue(aValue); missingBytes = anIndex - this.length(); if (missingBytes < 0) { this._value[anIndex] = aValue; } else if (missingBytes == 0) { this._value.push(aValue); } else { var i,c; c = missingBytes; for (i=0; i<c; i++) { this._value.push(0); } this._value.push(aValue); } }, //------------------------------------------------------------------------- 'toHexString': function() { var result; var i, c; result = "0x"; c = this.length(); for (i=0; i<c; i++) { result += Clipperz.ByteArray.byteToHex(this._value[i]); } return result; }, //------------------------------------------------------------------------- 'split': function(aStartingIndex, anEndingIndex) { var result; result = this.newInstance(); result._value = this._value.slice(aStartingIndex, anEndingIndex ? anEndingIndex : this.length()); return result; }, //------------------------------------------------------------------------- 'arrayValues': function() { return this._value.slice(0); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); //============================================================================= // // Clipperz.ByteArray_string // //============================================================================= /* Clipperz.ByteArray_string = function (args) { this._value = ""; if (typeof(args) != 'undefined') { if (args.constructor == Array) { this.appendBytes(args); } else if (args.constructor == String) { var result; var value; var i, c; if (args.indexOf("0x") == 0) { value = args.substring(2).toLowerCase(); if (/[0123456789abcdef]* /.test(value)) { the space in the regexp shoud be removed if the code is activated if ((value.length % 2) != 0) { value = "0" + value; } } else { -MochiKit.Logging.logError("Clipperz.ByteArray should be inizialized with an hex string."); +Clipperz.logError("Clipperz.ByteArray should be inizialized with an hex string."); throw Clipperz.ByteArray.exception.InvalidValue; } } else { value = ""; c = args.length; for (i=0; i<c; i++) { value += Clipperz.ByteArray.unicodeToUtf8HexString(args.charCodeAt(i)); } } c = value.length / 2 for (i=0; i<c; i++) { this.appendByte(parseInt(value.substr(i*2, 2), 16)); } } else { this.appendBytes(MochiKit.Base.extend(null, arguments)); } } return this; } Clipperz.ByteArray_string.prototype = MochiKit.Base.update(new Clipperz.ByteArray_abstract(), { //------------------------------------------------------------------------- 'toString': function() { return "Clipperz.ByteArray_string"; }, //------------------------------------------------------------------------- 'clone': function() { var result; result = this.newInstance(); result._value = this._value; return result; }, //------------------------------------------------------------------------- 'newInstance': function() { return new Clipperz.ByteArray_string(); }, //------------------------------------------------------------------------- 'reset': function() { this._value = ""; }, //------------------------------------------------------------------------- 'length': function() { return (this._value.length); }, //------------------------------------------------------------------------- 'appendBlock': function(aBlock) { this._value += aBlock._value; return this; }, //------------------------------------------------------------------------- 'appendByte': function(aValue) { if (aValue != null) { this.checkByteValue(aValue); this._value += String.fromCharCode(aValue); } return this; }, //------------------------------------------------------------------------- 'byteAtIndex': function(anIndex) { return this._value.charCodeAt(anIndex); }, 'setByteAtIndex': function(aValue, anIndex) { var missingBytes; this.checkByteValue(aValue); missingBytes = anIndex - this.length(); if (missingBytes < 0) { this._value = this._value.substring(0, anIndex) + String.fromCharCode(aValue) + this._value.substring(anIndex + 1); } else if (missingBytes == 0) { this.appendByte(aValue); } else { diff --git a/frontend/gamma/js/Clipperz/CSVProcessor.js b/frontend/gamma/js/Clipperz/CSVProcessor.js index 0b18731..1288ed7 100644 --- a/frontend/gamma/js/Clipperz/CSVProcessor.js +++ b/frontend/gamma/js/Clipperz/CSVProcessor.js @@ -1,346 +1,344 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } Clipperz.CSVProcessor = function(args) { args = args || {}; // this._status = undefined; // this._error_input = undefined; // this._string = undefined; // this._fields = undefined; this._quoteChar = args['quoteChar'] || "\042"; this._eol = args['eol'] || ""; this._escapeChar = args['escapeChar'] || "\042"; this._separatorChar = args['separatorChar'] || ","; this._binary = args['binary'] || false; this._alwaysQuote = args['alwaysQuote'] || false; return this; } //============================================================================= Clipperz.CSVProcessor.prototype = MochiKit.Base.update(null, { //------------------------------------------------------------------------- 'quoteChar': function() { return this._quoteChar; }, //------------------------------------------------------------------------- 'eol': function() { return this._eol; }, //------------------------------------------------------------------------- 'escapeChar': function() { return this._escapeChar; }, //------------------------------------------------------------------------- 'separatorChar': function() { return this._separatorChar; }, 'setSeparatorChar': function(aValue) { this._separatorChar = aValue; }, //------------------------------------------------------------------------- 'binary': function() { return this._binary; }, //------------------------------------------------------------------------- 'alwaysQuote': function() { return this._alwaysQuote; }, //------------------------------------------------------------------------- /* 'parse': function(aValue) { var result; var lines; var parameter; -//MochiKit.Logging.logDebug(">>> CSVProcessor.parse"); +//Clipperz.logDebug(">>> CSVProcessor.parse"); result = []; lines = aValue.replace(/\r?\n/g, "\n").replace(/^\n* /g, "").replace(/\n$/g, "");; parameter = { line: lines } do { var fields; fields = this.parseLine(parameter); if (fields != null) { result.push(fields); } parameter.line = parameter.line.replace(/^\n* /g, "").replace(/\n$/g, ""); -//MochiKit.Logging.logDebug("line: '" + parameter.line + "'"); +//Clipperz.logDebug("line: '" + parameter.line + "'"); } while (parameter.line != ""); -//MochiKit.Logging.logDebug("--- CSVProcessor.parse - result: " + Clipperz.Base.serializeJSON(result)); -//MochiKit.Logging.logDebug("<<< CSVProcessor.parse"); +//Clipperz.logDebug("--- CSVProcessor.parse - result: " + Clipperz.Base.serializeJSON(result)); +//Clipperz.logDebug("<<< CSVProcessor.parse"); return result; }, */ //------------------------------------------------------------------------- 'deferredParse_core': function(aContext) { var deferredResult; if (aContext.line == "") { deferredResult = MochiKit.Async.succeed(aContext.result); } else { var fields; fields = this.parseLine(aContext); if (fields != null) { aContext.result.push(fields); } aContext.line = aContext.line.replace(/^\n*/g, "").replace(/\n$/g, ""); deferredResult = new Clipperz.Async.Deferred("CVSProcessor.deferredParse_core"); // deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'importProcessorProgressUpdate', {status:'processing', size:aContext.size, progress:(aContext.size - aContext.line.length)}); deferredResult.addCallbackPass(MochiKit.Signal.signal, this, 'importProcessorProgressUpdate', {status:'processing', size:aContext.size, progress:(aContext.size - aContext.line.length)}); deferredResult.addCallback(MochiKit.Async.wait, 0.2); deferredResult.addMethod(this, 'deferredParse_core') deferredResult.callback(aContext); } return deferredResult; }, //......................................................................... 'deferredParse': function(aValue) { var deferredResult; var lines; var context; lines = aValue.replace(/\r?\n/g, "\n").replace(/^\n*/g, "").replace(/\n$/g, ""); context = { line: lines, size: lines.length, result: [] } deferredResult = new Clipperz.Async.Deferred("CSVProcessor.deferredParse"); deferredResult.addMethod(this, 'deferredParse_core'); deferredResult.callback(context); return deferredResult; }, //------------------------------------------------------------------------- 'parseLine': function(aParameter) { var result; var palatable; var line; var processedField; result = []; do { processedField = this.parseField(aParameter); if (processedField != null) { result.push(processedField) }; } while (processedField != null); return result; }, //------------------------------------------------------------------------- 'parseField': function(aParameter) { var result; var inQuotes; var validRegExp; var singleQuoteBeginRegexp; var escapedQuoteBeginRegexp; var singleQuoteCommaEndRegexp; var singleQuoteNewLineEndRegexp; var commaBeginRegexp; var newlineRegexp; singleQuoteBeginRegexp = new RegExp("^" + '\\' + this.quoteChar()); escapedQuoteBeginRegexp = new RegExp("^" + '\\' + this.escapeChar() + '\\' + this.quoteChar()); singleQuoteCommaEndRegexp = new RegExp("^" + '\\' + this.quoteChar() + '\\' + this.separatorChar()); singleQuoteNewLineEndRegexp = new RegExp("^" + '\\' + this.quoteChar() + "\n"); commaBeginRegexp = new RegExp("^" + '\\' + this.separatorChar()); newlineRegexp = new RegExp("^\n"); inQuotes = false; -//MochiKit.Logging.logDebug("#################################### '" + aParameter.line + "'"); +//Clipperz.logDebug("#################################### '" + aParameter.line + "'"); if (aParameter.line == "") { if (aParameter.isThereAnEmptyFinalField == true) { aParameter.isThereAnEmptyFinalField = false; result = ""; } else { result = null; } } else { if (this.binary()) { validRegexp = /^./; // validRegexp = /^[^\\]/; } else { validRegexp = /^[\t\040-\176]/; } try { var done; done = false; result = ""; while (!done) { if (aParameter.line.length < 1) { -//MochiKit.Logging.logDebug("---> 1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); +//Clipperz.logDebug("---> 1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); if (inQuotes == true) { -//MochiKit.Logging.logDebug("---> 1.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); +//Clipperz.logDebug("---> 1.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); throw new Error("CSV Parsing error; end of string, missing closing double-quote..."); } else { -//MochiKit.Logging.logDebug("---> 1.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); +//Clipperz.logDebug("---> 1.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); done = true; } } else if (escapedQuoteBeginRegexp.test(aParameter.line)) { -//MochiKit.Logging.logDebug("---> 2.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); +//Clipperz.logDebug("---> 2.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); result += this.quoteChar(); aParameter.line = aParameter.line.substr(2, aParameter.line.length - 1); -//MochiKit.Logging.logDebug("<--- 2.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); +//Clipperz.logDebug("<--- 2.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); } else if (singleQuoteBeginRegexp.test(aParameter.line)) { -//MochiKit.Logging.logDebug("---> 3: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); +//Clipperz.logDebug("---> 3: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); if (inQuotes == true) { if (aParameter.line.length == 1) { -//MochiKit.Logging.logDebug("---> 3.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); +//Clipperz.logDebug("---> 3.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); aParameter.line = ''; done = true; } else if (singleQuoteCommaEndRegexp.test(aParameter.line)) { -//MochiKit.Logging.logDebug("---> 3.3: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); +//Clipperz.logDebug("---> 3.3: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); aParameter.line = aParameter.line.substr(2, aParameter.line.length - 1); done = true; -//MochiKit.Logging.logDebug("<--- 3.3: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); +//Clipperz.logDebug("<--- 3.3: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); } else if (singleQuoteNewLineEndRegexp.test(aParameter.line)) { aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1); done = true; } else { throw new Error("CSV Parsing error; double-quote, followed by undesirable character (bad character sequence)... " + aParameter.line); } } else { -//MochiKit.Logging.logDebug("---> 4: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); +//Clipperz.logDebug("---> 4: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); if (result == "") { -//MochiKit.Logging.logDebug("---> 4.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); +//Clipperz.logDebug("---> 4.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); inQuotes = true; aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1); -//MochiKit.Logging.logDebug("<--- 4.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); +//Clipperz.logDebug("<--- 4.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); } else { throw new Error("CSV Parsing error; double-quote, outside of double-quotes (bad character sequence)..."); } } } else if (commaBeginRegexp.test(aParameter.line)) { -//MochiKit.Logging.logDebug("---> 5: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); +//Clipperz.logDebug("---> 5: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); if (inQuotes) { -//MochiKit.Logging.logDebug("---> 5.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); +//Clipperz.logDebug("---> 5.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); result += aParameter.line.substr(0 ,1); aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1); -//MochiKit.Logging.logDebug("<--- 5.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); +//Clipperz.logDebug("<--- 5.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); } else { -//MochiKit.Logging.logDebug("---> 5.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); +//Clipperz.logDebug("---> 5.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1); if (newlineRegexp.test(aParameter.line) || aParameter.line == "") { -//MochiKit.Logging.logDebug("######"); +//Clipperz.logDebug("######"); aParameter.isThereAnEmptyFinalField = true; }; done = true; -//MochiKit.Logging.logDebug("<--- 5.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); +//Clipperz.logDebug("<--- 5.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); } } else if (validRegexp.test(aParameter.line)) { -//MochiKit.Logging.logDebug("---> 6: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); +//Clipperz.logDebug("---> 6: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); result += aParameter.line.substr(0, 1); aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1); -//MochiKit.Logging.logDebug("<--- 6: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); +//Clipperz.logDebug("<--- 6: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); } else if (newlineRegexp.test(aParameter.line)) { if (inQuotes == true) { result += aParameter.line.substr(0 ,1); aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1); } else { if (result == "") { if (aParameter.isThereAnEmptyFinalField == true) { aParameter.isThereAnEmptyFinalField = false; } else { result = null; } } done = true; } } else { throw new Error("CSV Parsing error; an undesirable character... '" + aParameter.line.substr(0,1) + "'"); } } } catch(exception) { - MochiKit.Logging.logError(exception.message); + Clipperz.logError(exception.message); // result = null; throw exception; } } //if (result != null) { -// MochiKit.Logging.logDebug("<=== result: '" + result.replace(/\n/g, "\\n") + "'"); +// Clipperz.logDebug("<=== result: '" + result.replace(/\n/g, "\\n") + "'"); //} else { -// MochiKit.Logging.logDebug("<=== result: NULL"); +// Clipperz.logDebug("<=== result: NULL"); //} return result; }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/Crypto/AES.js b/frontend/gamma/js/Clipperz/Crypto/AES.js index c811f1c..cb56f11 100644 --- a/frontend/gamma/js/Clipperz/Crypto/AES.js +++ b/frontend/gamma/js/Clipperz/Crypto/AES.js @@ -1,243 +1,240 @@ /* -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/. */ try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.AES depends on Clipperz.ByteArray!"; } // Dependency commented to avoid a circular reference //try { if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { throw ""; }} catch (e) { // throw "Clipperz.Crypto.AES depends on Clipperz.Crypto.PRNG!"; //} if (typeof(Clipperz.Crypto.AES) == 'undefined') { Clipperz.Crypto.AES = {}; } //############################################################################# Clipperz.Crypto.AES.DeferredExecutionContext = function(args) { args = args || {}; this._key = args.key; this._message = args.message; this._result = args.message.clone(); this._nonce = args.nonce; this._messageLength = this._message.length(); this._messageArray = this._message.arrayValues(); this._resultArray = this._result.arrayValues(); this._nonceArray = this._nonce.arrayValues(); this._executionStep = 0; // this._elaborationChunkSize = 1024; // 4096; // 16384; // 4096; this._elaborationChunks = 10; this._pauseTime = 0.02; // 0.02 // 0.2; return this; } Clipperz.Crypto.AES.DeferredExecutionContext.prototype = MochiKit.Base.update(null, { 'key': function() { return this._key; }, 'message': function() { return this._message; }, 'messageLength': function() { return this._messageLength; }, 'result': function() { return new Clipperz.ByteArray(this.resultArray()); }, 'nonce': function() { return this._nonce; }, 'messageArray': function() { return this._messageArray; }, 'resultArray': function() { return this._resultArray; }, 'nonceArray': function() { return this._nonceArray; }, 'elaborationChunkSize': function() { // return Clipperz.Crypto.AES.DeferredExecution.chunkSize; // return this._elaborationChunkSize; return (this._elaborationChunks * 1024); }, 'executionStep': function() { return this._executionStep; }, 'setExecutionStep': function(aValue) { this._executionStep = aValue; }, 'tuneExecutionParameters': function (anElapsedTime) { //var originalChunks = this._elaborationChunks; if (anElapsedTime > 0) { this._elaborationChunks = Math.round(this._elaborationChunks * ((anElapsedTime + 1000)/(anElapsedTime * 2))); } //Clipperz.log("tuneExecutionParameters - elapsedTime: " + anElapsedTime + /*originalChunks,*/ " chunks # " + this._elaborationChunks + " [" + this._executionStep + " / " + this._messageLength + "]"); }, 'pause': function(aValue) { // return MochiKit.Async.wait(Clipperz.Crypto.AES.DeferredExecution.pauseTime, aValue); return MochiKit.Async.wait(this._pauseTime, aValue); }, 'isDone': function () { -//console.log("isDone", this.executionStep(), this.messageLength()); return (this._executionStep >= this._messageLength); }, //----------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); //############################################################################# Clipperz.Crypto.AES.Key = function(args) { args = args || {}; this._key = args.key; this._keySize = args.keySize || this.key().length(); if (this.keySize() == 128/8) { this._b = 176; this._numberOfRounds = 10; } else if (this.keySize() == 256/8) { this._b = 240; this._numberOfRounds = 14; } else { - MochiKit.Logging.logError("AES unsupported key size: " + (this.keySize() * 8) + " bits"); + Clipperz.logError("AES unsupported key size: " + (this.keySize() * 8) + " bits"); throw Clipperz.Crypto.AES.exception.UnsupportedKeySize; } this._stretchedKey = null; return this; } Clipperz.Crypto.AES.Key.prototype = MochiKit.Base.update(null, { 'asString': function() { return "Clipperz.Crypto.AES.Key (" + this.key().toHexString() + ")"; }, //----------------------------------------------------------------------------- 'key': function() { return this._key; }, 'keySize': function() { return this._keySize; }, 'b': function() { return this._b; }, 'numberOfRounds': function() { return this._numberOfRounds; }, //========================================================================= 'keyScheduleCore': function(aWord, aRoundConstantsIndex) { var result; var sbox; sbox = Clipperz.Crypto.AES.sbox(); result = [ sbox[aWord[1]] ^ Clipperz.Crypto.AES.roundConstants()[aRoundConstantsIndex], sbox[aWord[2]], sbox[aWord[3]], sbox[aWord[0]] ]; return result; }, //----------------------------------------------------------------------------- 'xorWithPreviousStretchValues': function(aKey, aWord, aPreviousWordIndex) { var result; var i,c; result = []; c = 4; for (i=0; i<c; i++) { result[i] = aWord[i] ^ aKey.byteAtIndex(aPreviousWordIndex + i); } return result; }, //----------------------------------------------------------------------------- 'sboxShakeup': function(aWord) { var result; var sbox; var i,c; result = []; sbox = Clipperz.Crypto.AES.sbox(); c =4; for (i=0; i<c; i++) { result[i] = sbox[aWord[i]]; } return result; }, //----------------------------------------------------------------------------- 'stretchKey': function(aKey) { var currentWord; var keyLength; var previousStretchIndex; var i,c; keyLength = aKey.length(); previousStretchIndex = keyLength - this.keySize(); currentWord = [ aKey.byteAtIndex(keyLength - 4), aKey.byteAtIndex(keyLength - 3), aKey.byteAtIndex(keyLength - 2), aKey.byteAtIndex(keyLength - 1) ]; currentWord = this.keyScheduleCore(currentWord, keyLength / this.keySize()); @@ -715,152 +712,148 @@ MochiKit.Base.update(Clipperz.Crypto.AES, { var messageLength; var blockSize; var executionLimit; var startTime, endTime; self = Clipperz.Crypto.AES; startTime = new Date(); blockSize = 128/8; messageLength = anExecutionContext.messageArray().length; nonce = anExecutionContext.nonceArray(); result = anExecutionContext.resultArray(); messageIndex = anExecutionContext.executionStep(); executionLimit = messageIndex + anExecutionContext.elaborationChunkSize(); executionLimit = Math.min(executionLimit, messageLength); while (messageIndex < executionLimit) { var encryptedBlock; var i,c; self.incrementNonce(nonce); encryptedBlock = self.encryptBlock(anExecutionContext.key(), nonce); if ((executionLimit - messageIndex) > blockSize) { c = blockSize; } else { c = executionLimit - messageIndex; } for (i=0; i<c; i++) { result[messageIndex + i] = result[messageIndex + i] ^ encryptedBlock[i]; } messageIndex += blockSize; } anExecutionContext.setExecutionStep(messageIndex); endTime = new Date(); anExecutionContext.tuneExecutionParameters(endTime - startTime); return anExecutionContext; }, //----------------------------------------------------------------------------- /* 'deferredEncryptBlocks': function(anExecutionContext) { var deferredResult; var messageSize; var i,c; messageSize = anExecutionContext.messageLength(); deferredResult = new Clipperz.Async.Deferred("AES.deferredEncryptBloks"); c = Math.ceil(messageSize / anExecutionContext.elaborationChunkSize()); for (i=0; i<c; i++) { deferredResult.addCallback(Clipperz.Crypto.AES.deferredEncryptExecutionChunk); deferredResult.addMethod(anExecutionContext, 'pause'); } deferredResult.callback(anExecutionContext); return deferredResult; }, */ 'deferredEncryptBlocks': function(anExecutionContext) { var deferredResult; if (! anExecutionContext.isDone()) { deferredResult = Clipperz.Async.callbacks("Clipperz.Crypto.AES.deferredEncryptBloks", [ Clipperz.Crypto.AES.deferredEncryptExecutionChunk, MochiKit.Base.method(anExecutionContext, 'pause'), Clipperz.Crypto.AES.deferredEncryptBlocks ], {trace:false}, anExecutionContext); } else { deferredResult = MochiKit.Async.succeed(anExecutionContext); } return deferredResult; }, //----------------------------------------------------------------------------- 'deferredEncrypt': function(aKey, someData, aNonce) { var deferredResult; var executionContext; var result; var nonce; var key; key = new Clipperz.Crypto.AES.Key({key:aKey}); nonce = aNonce ? aNonce.clone() : Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(128/8); executionContext = new Clipperz.Crypto.AES.DeferredExecutionContext({key:key, message:someData, nonce:nonce}); deferredResult = new Clipperz.Async.Deferred("AES.deferredEncrypt"); -//deferredResult.addCallback(function (aValue) { console.log(">>> deferredEncrypt"); return aValue; }); deferredResult.addCallback(Clipperz.Crypto.AES.deferredEncryptBlocks); deferredResult.addCallback(function(anExecutionContext) { var result; result = anExecutionContext.nonce().clone(); result.appendBytes(anExecutionContext.resultArray()); return result; }); -//deferredResult.addCallback(function (aValue) { console.log("<<< deferredEncrypt"); return aValue; }); deferredResult.callback(executionContext) return deferredResult; }, //----------------------------------------------------------------------------- 'deferredDecrypt': function(aKey, someData) { var deferredResult var nonce; var message; var key; key = new Clipperz.Crypto.AES.Key({key:aKey}); nonce = someData.split(0, (128/8)); message = someData.split(128/8); executionContext = new Clipperz.Crypto.AES.DeferredExecutionContext({key:key, message:message, nonce:nonce}); deferredResult = new Clipperz.Async.Deferred("AES.deferredDecrypt"); -//deferredResult.addCallback(function (aValue) { console.log(">>> deferredDecrypt"); return aValue; }); deferredResult.addCallback(Clipperz.Crypto.AES.deferredEncryptBlocks); deferredResult.addCallback(function(anExecutionContext) { return anExecutionContext.result(); }); -//deferredResult.addCallback(function (aValue) { console.log("<<< deferredDecrypt"); return aValue; }); deferredResult.callback(executionContext); return deferredResult; }, //----------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); //############################################################################# //Clipperz.Crypto.AES.DeferredExecution = { // 'chunkSize': 16384, // 4096, // 1024 4096 8192 16384 32768; // 'pauseTime': 0.02 // 0.2 //} Clipperz.Crypto.AES.exception = { 'UnsupportedKeySize': new MochiKit.Base.NamedError("Clipperz.Crypto.AES.exception.UnsupportedKeySize") }; diff --git a/frontend/gamma/js/Clipperz/Crypto/Base.js b/frontend/gamma/js/Clipperz/Crypto/Base.js index d3a8e36..9acfc49 100644 --- a/frontend/gamma/js/Clipperz/Crypto/Base.js +++ b/frontend/gamma/js/Clipperz/Crypto/Base.js @@ -1,118 +1,116 @@ /* -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/. */ try { if (typeof(Clipperz.Base) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.Base depends on Clipperz.Base!"; } if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } if (typeof(Clipperz.Crypto.Base) == 'undefined') { Clipperz.Crypto.Base = {}; } Clipperz.Crypto.Base.VERSION = "0.1"; Clipperz.Crypto.Base.NAME = "Clipperz.Crypto.Base"; //############################################################################# // Downloaded on March 30, 2006 from http://anmar.eu.org/projects/jssha2/files/jssha2-0.3.zip (jsSha2/sha256.js) //############################################################################# /* A JavaScript implementation of the Secure Hash Algorithm, SHA-256 * Version 0.3 Copyright Angel Marin 2003-2004 - http://anmar.eu.org/ * Distributed under the BSD License * Some bits taken from Paul Johnston's SHA-1 implementation */ var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ function safe_add (x, y) { var lsw = (x & 0xFFFF) + (y & 0xFFFF); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xFFFF); } function S (X, n) {return ( X >>> n ) | (X << (32 - n));} function R (X, n) {return ( X >>> n );} function Ch(x, y, z) {return ((x & y) ^ ((~x) & z));} function Maj(x, y, z) {return ((x & y) ^ (x & z) ^ (y & z));} function Sigma0256(x) {return (S(x, 2) ^ S(x, 13) ^ S(x, 22));} function Sigma1256(x) {return (S(x, 6) ^ S(x, 11) ^ S(x, 25));} function Gamma0256(x) {return (S(x, 7) ^ S(x, 18) ^ R(x, 3));} function Gamma1256(x) {return (S(x, 17) ^ S(x, 19) ^ R(x, 10));} function core_sha256 (m, l) { var K = new Array(0x428A2F98,0x71374491,0xB5C0FBCF,0xE9B5DBA5,0x3956C25B,0x59F111F1,0x923F82A4,0xAB1C5ED5,0xD807AA98,0x12835B01,0x243185BE,0x550C7DC3,0x72BE5D74,0x80DEB1FE,0x9BDC06A7,0xC19BF174,0xE49B69C1,0xEFBE4786,0xFC19DC6,0x240CA1CC,0x2DE92C6F,0x4A7484AA,0x5CB0A9DC,0x76F988DA,0x983E5152,0xA831C66D,0xB00327C8,0xBF597FC7,0xC6E00BF3,0xD5A79147,0x6CA6351,0x14292967,0x27B70A85,0x2E1B2138,0x4D2C6DFC,0x53380D13,0x650A7354,0x766A0ABB,0x81C2C92E,0x92722C85,0xA2BFE8A1,0xA81A664B,0xC24B8B70,0xC76C51A3,0xD192E819,0xD6990624,0xF40E3585,0x106AA070,0x19A4C116,0x1E376C08,0x2748774C,0x34B0BCB5,0x391C0CB3,0x4ED8AA4A,0x5B9CCA4F,0x682E6FF3,0x748F82EE,0x78A5636F,0x84C87814,0x8CC70208,0x90BEFFFA,0xA4506CEB,0xBEF9A3F7,0xC67178F2); var HASH = new Array(0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19); var W = new Array(64); var a, b, c, d, e, f, g, h, i, j; var T1, T2; /* append padding */ m[l >> 5] |= 0x80 << (24 - l % 32); m[((l + 64 >> 9) << 4) + 15] = l; for ( var i = 0; i<m.length; i+=16 ) { a = HASH[0]; b = HASH[1]; c = HASH[2]; d = HASH[3]; e = HASH[4]; f = HASH[5]; g = HASH[6]; h = HASH[7]; for ( var j = 0; j<64; j++) { if (j < 16) W[j] = m[j + i]; else W[j] = safe_add(safe_add(safe_add(Gamma1256(W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]); T1 = safe_add(safe_add(safe_add(safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]); T2 = safe_add(Sigma0256(a), Maj(a, b, c)); h = g; g = f; f = e; e = safe_add(d, T1); d = c; c = b; b = a; a = safe_add(T1, T2); } HASH[0] = safe_add(a, HASH[0]); HASH[1] = safe_add(b, HASH[1]); HASH[2] = safe_add(c, HASH[2]); HASH[3] = safe_add(d, HASH[3]); HASH[4] = safe_add(e, HASH[4]); HASH[5] = safe_add(f, HASH[5]); HASH[6] = safe_add(g, HASH[6]); HASH[7] = safe_add(h, HASH[7]); } return HASH; } function str2binb (str) { var bin = Array(); var mask = (1 << chrsz) - 1; for(var i = 0; i < str.length * chrsz; i += chrsz) bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - i%32); return bin; } function binb2hex (binarray) { var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; var str = ""; for (var i = 0; i < binarray.length * 4; i++) { str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) + hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8 )) & 0xF); } return str; } function hex_sha256(s){return binb2hex(core_sha256(str2binb(s),s.length * chrsz));} //############################################################################# // Downloaded on March 30, 2006 from http://www.fourmilab.ch/javascrypt/javascrypt.zip (entropy.js) //############################################################################# // Entropy collection utilities /* Start by declaring static storage and initialise the entropy vector from the time we come through here. */ var entropyData = new Array(); // Collected entropy data var edlen = 0; // Keyboard array data length addEntropyTime(); // Start entropy collection with page load time ce(); // Roll milliseconds into initial entropy // Add a byte to the entropy vector diff --git a/frontend/gamma/js/Clipperz/Crypto/BigInt.js b/frontend/gamma/js/Clipperz/Crypto/BigInt.js index 41483a3..031ed30 100644 --- a/frontend/gamma/js/Clipperz/Crypto/BigInt.js +++ b/frontend/gamma/js/Clipperz/Crypto/BigInt.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } //############################################################################# // Downloaded on March 05, 2007 from http://www.leemon.com/crypto/BigInt.js //############################################################################# //////////////////////////////////////////////////////////////////////////////////////// // Big Integer Library v. 5.0 // Created 2000, last modified 2006 // Leemon Baird // www.leemon.com // // This file is public domain. You can use it for any purpose without restriction. // I do not guarantee that it is correct, so use it at your own risk. If you use // it for something interesting, I'd appreciate hearing about it. If you find // any bugs or make any improvements, I'd appreciate hearing about those too. // It would also be nice if my name and address were left in the comments. // But none of that is required. // // This code defines a bigInt library for arbitrary-precision integers. // A bigInt is an array of integers storing the value in chunks of bpe bits, // little endian (buff[0] is the least significant word). // Negative bigInts are stored two's complement. // Some functions assume their parameters have at least one leading zero element. // Functions with an underscore at the end of the name have unpredictable behavior in case of overflow, // so the caller must make sure overflow won't happen. // For each function where a parameter is modified, that same // variable must not be used as another argument too. // So, you cannot square x by doing multMod_(x,x,n). // You must use squareMod_(x,n) instead, or do y=dup(x); multMod_(x,y,n). // // These functions are designed to avoid frequent dynamic memory allocation in the inner loop. // For most functions, if it needs a BigInt as a local variable it will actually use // a global, and will only allocate to it when it's not the right size. This ensures // that when a function is called repeatedly with same-sized parameters, it only allocates // memory on the first call. // // Note that for cryptographic purposes, the calls to Math.random() must // be replaced with calls to a better pseudorandom number generator. // // In the following, "bigInt" means a bigInt with at least one leading zero element, // and "integer" means a nonnegative integer less than radix. In some cases, integer // can be negative. Negative bigInts are 2s complement. // // The following functions do not modify their inputs, but dynamically allocate memory every time they are called: // // function bigInt2str(x,base) //convert a bigInt into a string in a given base, from base 2 up to base 95 // function dup(x) //returns a copy of bigInt x // function findPrimes(n) //return array of all primes less than integer n // function int2bigInt(t,n,m) //convert integer t to a bigInt with at least n bits and m array elements // function int2bigInt(s,b,n,m) //convert string s in base b to a bigInt with at least n bits and m array elements // function trim(x,k) //return a copy of x with exactly k leading zero elements // // The following functions do not modify their inputs, so there is never a problem with the result being too big: // // function bitSize(x) //returns how many bits long the bigInt x is, not counting leading zeros // function equals(x,y) //is the bigInt x equal to the bigint y? // function equalsInt(x,y) //is bigint x equal to integer y? // function greater(x,y) //is x>y? (x and y are nonnegative bigInts) // function greaterShift(x,y,shift)//is (x <<(shift*bpe)) > y? // function isZero(x) //is the bigInt x equal to zero? // function millerRabin(x,b) //does one round of Miller-Rabin base integer b say that bigInt x is possibly prime (as opposed to definitely composite)? // function modInt(x,n) //return x mod n for bigInt x and integer n. // function negative(x) //is bigInt x negative? // // The following functions do not modify their inputs, but allocate memory and call functions with underscores // // function add(x,y) //return (x+y) for bigInts x and y. // function addInt(x,n) //return (x+n) where x is a bigInt and n is an integer. // function expand(x,n) //return a copy of x with at least n elements, adding leading zeros if needed // function inverseMod(x,n) //return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null // function mod(x,n) //return a new bigInt equal to (x mod n) for bigInts x and n. // function mult(x,y) //return x*y for bigInts x and y. This is faster when y<x. // function multMod(x,y,n) //return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x. // function powMod(x,y,n) //return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n. // function randTruePrime(k) //return a new, random, k-bit, true prime using Maurer's algorithm. // function sub(x,y) //return (x-y) for bigInts x and y. Negative answers will be 2s complement // // The following functions write a bigInt result to one of the parameters, but // the result is never bigger than the original, so there can't be overflow problems: // // function divInt_(x,n) //do x=floor(x/n) for bigInt x and integer n, and return the remainder // function GCD_(x,y) //set x to the greatest common divisor of bigInts x and y, (y is destroyed). // function halve_(x) //do x=floor(|x|/2)*sgn(x) for bigInt x in 2's complement // function mod_(x,n) //do x=x mod n for bigInts x and n. // function rightShift_(x,n) //right shift bigInt x by n bits. 0 <= n < bpe. // // The following functions write a bigInt result to one of the parameters. The caller is responsible for // ensuring it is large enough to hold the result. // // function addInt_(x,n) //do x=x+n where x is a bigInt and n is an integer @@ -1384,193 +1382,192 @@ function mont_(x,y,n,np) { } for (;j<kn;j++) { c+=sa[j]+ui*n[j]; sa[j-1]=c & mask; c>>=bpe; } sa[j-1]=c & mask; } if (!greater(n,sa)) sub_(sa,n); copy_(x,sa); } //############################################################################# //############################################################################# //############################################################################# //############################################################################# //############################################################################# //############################################################################# //############################################################################# //############################################################################# Clipperz.Crypto.BigInt = function (aValue, aBase) { var base; var value; if (typeof(aValue) == 'object') { this._internalValue = aValue; } else { if (typeof(aValue) == 'undefined') { value = "0"; } else { value = aValue + ""; } if (typeof(aBase) == 'undefined') { base = 10; } else { base = aBase; } this._internalValue = str2bigInt(value, base, 1, 1); } return this; } //============================================================================= MochiKit.Base.update(Clipperz.Crypto.BigInt.prototype, { 'clone': function() { return new Clipperz.Crypto.BigInt(this.internalValue()); }, //------------------------------------------------------------------------- 'internalValue': function () { return this._internalValue; }, //------------------------------------------------------------------------- 'isBigInt': true, //------------------------------------------------------------------------- 'toString': function(aBase) { return this.asString(aBase); }, //------------------------------------------------------------------------- 'asString': function (aBase, minimumLength) { var result; var base; if (typeof(aBase) == 'undefined') { base = 10; } else { base = aBase; } result = bigInt2str(this.internalValue(), base).toLowerCase(); if ((typeof(minimumLength) != 'undefined') && (result.length < minimumLength)) { var i, c; -//MochiKit.Logging.logDebug(">>> FIXING BigInt.asString length issue") c = (minimumLength - result.length); for (i=0; i<c; i++) { result = '0' + result; } } return result; }, //------------------------------------------------------------------------- 'asByteArray': function() { return new Clipperz.ByteArray("0x" + this.asString(16), 16); }, //------------------------------------------------------------------------- 'equals': function (aValue) { var result; if (aValue.isBigInt) { result = equals(this.internalValue(), aValue.internalValue()); } else if (typeof(aValue) == "number") { result = equalsInt(this.internalValue(), aValue); } else { throw Clipperz.Crypt.BigInt.exception.UnknownType; } return result; }, //------------------------------------------------------------------------- 'compare': function(aValue) { /* var result; var thisAsString; var aValueAsString; thisAsString = this.asString(10); aValueAsString = aValue.asString(10); result = MochiKit.Base.compare(thisAsString.length, aValueAsString.length); if (result == 0) { result = MochiKit.Base.compare(thisAsString, aValueAsString); } return result; */ var result; if (equals(this.internalValue(), aValue.internalValue())) { result = 0; } else if (greater(this.internalValue(), aValue.internalValue())) { result = 1; } else { result = -1; } return result; }, //------------------------------------------------------------------------- 'add': function (aValue) { var result; if (aValue.isBigInt) { result = add(this.internalValue(), aValue.internalValue()); } else { result = addInt(this.internalValue(), aValue); } return new Clipperz.Crypto.BigInt(result); }, //------------------------------------------------------------------------- 'subtract': function (aValue) { var result; var value; if (aValue.isBigInt) { value = aValue; } else { value = new Clipperz.Crypto.BigInt(aValue); } result = sub(this.internalValue(), value.internalValue()); return new Clipperz.Crypto.BigInt(result); }, //------------------------------------------------------------------------- 'multiply': function (aValue, aModule) { diff --git a/frontend/gamma/js/Clipperz/Crypto/BigInt_scoped.js b/frontend/gamma/js/Clipperz/Crypto/BigInt_scoped.js index f91c7e9..bc60330 100644 --- a/frontend/gamma/js/Clipperz/Crypto/BigInt_scoped.js +++ b/frontend/gamma/js/Clipperz/Crypto/BigInt_scoped.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } if (typeof(Leemon) == 'undefined') { Leemon = {}; } if (typeof(Baird.Crypto) == 'undefined') { Baird.Crypto = {}; } if (typeof(Baird.Crypto.BigInt) == 'undefined') { Baird.Crypto.BigInt = {}; } //############################################################################# // Downloaded on March 05, 2007 from http://www.leemon.com/crypto/BigInt.js //############################################################################# //////////////////////////////////////////////////////////////////////////////////////// // Big Integer Library v. 5.0 // Created 2000, last modified 2006 // Leemon Baird // www.leemon.com // // This file is public domain. You can use it for any purpose without restriction. // I do not guarantee that it is correct, so use it at your own risk. If you use // it for something interesting, I'd appreciate hearing about it. If you find // any bugs or make any improvements, I'd appreciate hearing about those too. // It would also be nice if my name and address were left in the comments. // But none of that is required. // // This code defines a bigInt library for arbitrary-precision integers. // A bigInt is an array of integers storing the value in chunks of bpe bits, // little endian (buff[0] is the least significant word). // Negative bigInts are stored two's complement. // Some functions assume their parameters have at least one leading zero element. // Functions with an underscore at the end of the name have unpredictable behavior in case of overflow, // so the caller must make sure overflow won't happen. // For each function where a parameter is modified, that same // variable must not be used as another argument too. // So, you cannot square x by doing multMod_(x,x,n). // You must use squareMod_(x,n) instead, or do y=dup(x); multMod_(x,y,n). // // These functions are designed to avoid frequent dynamic memory allocation in the inner loop. // For most functions, if it needs a BigInt as a local variable it will actually use // a global, and will only allocate to it when it's not the right size. This ensures // that when a function is called repeatedly with same-sized parameters, it only allocates // memory on the first call. // // Note that for cryptographic purposes, the calls to Math.random() must // be replaced with calls to a better pseudorandom number generator. // // In the following, "bigInt" means a bigInt with at least one leading zero element, // and "integer" means a nonnegative integer less than radix. In some cases, integer // can be negative. Negative bigInts are 2s complement. // // The following functions do not modify their inputs, but dynamically allocate memory every time they are called: // // function bigInt2str(x,base) //convert a bigInt into a string in a given base, from base 2 up to base 95 // function dup(x) //returns a copy of bigInt x // function findPrimes(n) //return array of all primes less than integer n // function int2bigInt(t,n,m) //convert integer t to a bigInt with at least n bits and m array elements // function str2bigInt(s,b,n,m) //convert string s in base b to a bigInt with at least n bits and m array elements // function trim(x,k) //return a copy of x with exactly k leading zero elements // // The following functions do not modify their inputs, so there is never a problem with the result being too big: // // function bitSize(x) //returns how many bits long the bigInt x is, not counting leading zeros // function equals(x,y) //is the bigInt x equal to the bigint y? // function equalsInt(x,y) //is bigint x equal to integer y? // function greater(x,y) //is x>y? (x and y are nonnegative bigInts) // function greaterShift(x,y,shift)//is (x <<(shift*bpe)) > y? // function isZero(x) //is the bigInt x equal to zero? // function millerRabin(x,b) //does one round of Miller-Rabin base integer b say that bigInt x is possibly prime (as opposed to definitely composite)? // function modInt(x,n) //return x mod n for bigInt x and integer n. // function negative(x) //is bigInt x negative? // // The following functions do not modify their inputs, but allocate memory and call functions with underscores // // function add(x,y) //return (x+y) for bigInts x and y. // function addInt(x,n) //return (x+n) where x is a bigInt and n is an integer. // function expand(x,n) //return a copy of x with at least n elements, adding leading zeros if needed // function inverseMod(x,n) //return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null // function mod(x,n) //return a new bigInt equal to (x mod n) for bigInts x and n. // function mult(x,y) //return x*y for bigInts x and y. This is faster when y<x. // function multMod(x,y,n) //return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x. // function powMod(x,y,n) //return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n. // function randTruePrime(k) //return a new, random, k-bit, true prime using Maurer's algorithm. // function sub(x,y) //return (x-y) for bigInts x and y. Negative answers will be 2s complement // // The following functions write a bigInt result to one of the parameters, but // the result is never bigger than the original, so there can't be overflow problems: // // function divInt_(x,n) //do x=floor(x/n) for bigInt x and integer n, and return the remainder // function GCD_(x,y) //set x to the greatest common divisor of bigInts x and y, (y is destroyed). // function halve_(x) //do x=floor(|x|/2)*sgn(x) for bigInt x in 2's complement // function mod_(x,n) //do x=x mod n for bigInts x and n. // function rightShift_(x,n) //right shift bigInt x by n bits. 0 <= n < bpe. // diff --git a/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Curve.js b/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Curve.js index 19f19c2..0d76b9c 100644 --- a/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Curve.js +++ b/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Curve.js @@ -1,547 +1,500 @@ /* -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/. */ //try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { // throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; //} if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; } Clipperz.Crypto.ECC.BinaryField.Curve = function(args) { args = args || {}; this._modulus = args.modulus; this._a = args.a; this._b = args.b; this._G = args.G; this._r = args.r; this._h = args.h; this._finiteField = null; return this; } Clipperz.Crypto.ECC.BinaryField.Curve.prototype = MochiKit.Base.update(null, { 'asString': function() { return "Clipperz.Crypto.ECC.BinaryField.Curve"; }, //----------------------------------------------------------------------------- 'modulus': function() { return this._modulus; }, 'a': function() { return this._a; }, 'b': function() { return this._b; }, 'G': function() { return this._G; }, 'r': function() { return this._r; }, 'h': function() { return this._h; }, //----------------------------------------------------------------------------- 'finiteField': function() { if (this._finiteField == null) { this._finiteField = new Clipperz.Crypto.ECC.BinaryField.FiniteField({modulus:this.modulus()}) } return this._finiteField; }, //----------------------------------------------------------------------------- 'negate': function(aPointA) { var result; result = new Clipperz.Crypto.ECC.Point({x:aPointA.x(), y:this.finiteField().add(aPointA.y(), aPointA.x())}) return result; }, //----------------------------------------------------------------------------- 'add': function(aPointA, aPointB) { var result; -//console.log(">>> ECC.BinaryField.Curve.add"); if (aPointA.isZero()) { -//console.log("--- pointA == zero"); result = aPointB; } else if (aPointB.isZero()) { -//console.log("--- pointB == zero"); result = aPointA; } else if ( (aPointA.x().compare(aPointB.x()) == 0) && ((aPointA.y().compare(aPointB.y()) != 0) || aPointB.x().isZero())) { -//console.log("compare A.x - B.x: ", aPointA.x().compare(aPointB.x())); -//console.log("compare A.y - B.y: ", (aPointA.y().compare(aPointB.y()) != 0)); -//console.log("compare B.x.isZero(): ", aPointB.x().isZero()); - -//console.log("--- result = zero"); result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O}); } else { -//console.log("--- result = ELSE"); var f2m; var x, y; var lambda; var aX, aY, bX, bY; aX = aPointA.x()._value; aY = aPointA.y()._value; bX = aPointB.x()._value; bY = aPointB.y()._value; f2m = this.finiteField(); if (aPointA.x().compare(aPointB.x()) != 0) { -//console.log(" a.x != b.x"); lambda = f2m._fastMultiply( f2m._add(aY, bY), f2m._inverse(f2m._add(aX, bX)) ); x = f2m._add(this.a()._value, f2m._square(lambda)); f2m._overwriteAdd(x, lambda); f2m._overwriteAdd(x, aX); f2m._overwriteAdd(x, bX); } else { -//console.log(" a.x == b.x"); lambda = f2m._add(bX, f2m._fastMultiply(bY, f2m._inverse(bX))); -//console.log(" lambda: " + lambda.asString(16)); x = f2m._add(this.a()._value, f2m._square(lambda)); -//console.log(" x (step 1): " + x.asString(16)); f2m._overwriteAdd(x, lambda); -//console.log(" x (step 2): " + x.asString(16)); } y = f2m._fastMultiply(f2m._add(bX, x), lambda); -//console.log(" y (step 1): " + y.asString(16)); f2m._overwriteAdd(y, x); -//console.log(" y (step 2): " + y.asString(16)); f2m._overwriteAdd(y, bY); -//console.log(" y (step 3): " + y.asString(16)); result = new Clipperz.Crypto.ECC.BinaryField.Point({x:new Clipperz.Crypto.ECC.BinaryField.Value(x), y:new Clipperz.Crypto.ECC.BinaryField.Value(y)}) } -//console.log("<<< ECC.BinaryField.Curve.add"); return result; }, //----------------------------------------------------------------------------- 'addTwice': function(aPointA) { return this.add(aPointA, aPointA); }, //----------------------------------------------------------------------------- 'overwriteAdd': function(aPointA, aPointB) { if (aPointA.isZero()) { // result = aPointB; aPointA._x._value = aPointB._x._value; aPointA._y._value = aPointB._y._value; } else if (aPointB.isZero()) { // result = aPointA; } else if ( (aPointA.x().compare(aPointB.x()) == 0) && ((aPointA.y().compare(aPointB.y()) != 0) || aPointB.x().isZero())) { // result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O}); aPointA._x = Clipperz.Crypto.ECC.BinaryField.Value.O; aPointA._y = Clipperz.Crypto.ECC.BinaryField.Value.O; } else { var f2m; var x, y; var lambda; var aX, aY, bX, bY; aX = aPointA.x()._value; aY = aPointA.y()._value; bX = aPointB.x()._value; bY = aPointB.y()._value; f2m = this.finiteField(); if (aPointA.x().compare(aPointB.x()) != 0) { -//console.log(" a.x != b.x"); lambda = f2m._fastMultiply( f2m._add(aY, bY), f2m._inverse(f2m._add(aX, bX)) ); x = f2m._add(this.a()._value, f2m._square(lambda)); f2m._overwriteAdd(x, lambda); f2m._overwriteAdd(x, aX); f2m._overwriteAdd(x, bX); } else { -//console.log(" a.x == b.x"); lambda = f2m._add(bX, f2m._fastMultiply(bY, f2m._inverse(bX))); -//console.log(" lambda: " + lambda.asString(16)); x = f2m._add(this.a()._value, f2m._square(lambda)); -//console.log(" x (step 1): " + x.asString(16)); f2m._overwriteAdd(x, lambda); -//console.log(" x (step 2): " + x.asString(16)); } y = f2m._fastMultiply(f2m._add(bX, x), lambda); -//console.log(" y (step 1): " + y.asString(16)); f2m._overwriteAdd(y, x); -//console.log(" y (step 2): " + y.asString(16)); f2m._overwriteAdd(y, bY); -//console.log(" y (step 3): " + y.asString(16)); // result = new Clipperz.Crypto.ECC.BinaryField.Point({x:new Clipperz.Crypto.ECC.BinaryField.Value(x), y:new Clipperz.Crypto.ECC.BinaryField.Value(y)}) aPointA._x._value = x; aPointA._y._value = y; } -//console.log("<<< ECC.BinaryField.Curve.add"); return result; }, //----------------------------------------------------------------------------- 'multiply': function(aValue, aPoint) { var result; //console.profile(); result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O}); if (aValue.isZero() == false) { var k, Q; var i; var countIndex; countIndex = 0; if (aValue.compare(Clipperz.Crypto.ECC.BinaryField.Value.O) > 0) { k = aValue; Q = aPoint; } else { -MochiKit.Logging.logError("The Clipperz.Crypto.ECC.BinaryFields.Value does not work with negative values!!!!"); + Clipperz.logError("The Clipperz.Crypto.ECC.BinaryFields.Value does not work with negative values!!!!"); k = aValue.negate(); Q = this.negate(aPoint); } -//console.log("k: " + k.toString(16)); -//console.log("k.bitSize: " + k.bitSize()); for (i=k.bitSize()-1; i>=0; i--) { result = this.add(result, result); // this.overwriteAdd(result, result); if (k.isBitSet(i)) { result = this.add(result, Q); // this.overwriteAdd(result, Q); } -// if (countIndex==100) {console.log("multiply.break"); break;} else countIndex++; +// if (countIndex==100) {Clipperz.log("multiply.break"); break;} else countIndex++; } } //console.profileEnd(); return result; }, //----------------------------------------------------------------------------- 'deferredMultiply': function(aValue, aPoint) { var deferredResult; var result; -MochiKit.Logging.logDebug(">>> deferredMultiply - value: " + aValue + ", point: " + aPoint); +Clipperz.log(">>> deferredMultiply - value: " + aValue + ", point: " + aPoint); //console.profile("ECC.Curve.multiply"); deferredResult = new MochiKit.Async.Deferred(); //deferredResult.addCallback(function(res) {console.profile("ECC.Curve.deferredMultiply"); return res;} ); -//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 1: " + res); return res;}); +//deferredResult.addBoth(function(res) {Clipperz.logDebug("# 1: " + res); return res;}); result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O}); -//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 2: " + res); return res;}); +//deferredResult.addBoth(function(res) {Clipperz.logDebug("# 2: " + res); return res;}); if (aValue.isZero() == false) { var k, Q; var i; var countIndex; countIndex = 0; if (aValue.compare(Clipperz.Crypto.ECC.BinaryField.Value.O) > 0) { k = aValue; Q = aPoint; } else { -MochiKit.Logging.logError("The Clipperz.Crypto.ECC.BinaryFields.Value does not work with negative values!!!!"); + Clipperz.logError("The Clipperz.Crypto.ECC.BinaryFields.Value does not work with negative values!!!!"); k = aValue.negate(); Q = this.negate(aPoint); } -//console.log("k: " + k.toString(16)); -//console.log("k.bitSize: " + k.bitSize()); -//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 3: " + res); return res;}); for (i=k.bitSize()-1; i>=0; i--) { -//MochiKit.Logging.logDebug("====> " + i); -//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 4 > i = " + i + ": " + res); return res;}); deferredResult.addMethod(this, "addTwice"); //# result = this.add(result, result); // this.overwriteAdd(result, result); if (k.isBitSet(i)) { deferredResult.addMethod(this, "add", Q); //# result = this.add(result, Q); // this.overwriteAdd(result, Q); } if (i%20 == 0) {deferredResult.addCallback(MochiKit.Async.wait, 0.1);} - -// if (countIndex==100) {console.log("multiply.break"); break;} else countIndex++; -//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 4 < i = " + i + ": " + res); return res;}); } -//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 4: " + res); return res;}); } //#console.profileEnd(); -//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 5: " + res); return res;}); //deferredResult.addBoth(function(res) {console.profileEnd(); return res;}); -//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 6: " + res); return res;}); deferredResult.callback(result); //# return result; return deferredResult; }, //----------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); //############################################################################# Clipperz.Crypto.ECC.StandardCurves = {}; MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, { /* '_K571': null, 'K571': function() { if (Clipperz.Crypto.ECC.StandardCurves._K571 == null) { Clipperz.Crypto.ECC.StandardCurves._K571 = new Clipperz.Crypto.ECC.BinaryField.Curve({ modulus: new Clipperz.Crypto.ECC.BinaryField.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000425', 16), a: new Clipperz.Crypto.ECC.BinaryField.Value('0', 16), b: new Clipperz.Crypto.ECC.BinaryField.Value('1', 16), G: new Clipperz.Crypto.ECC.BinaryField.Point({ x: new Clipperz.Crypto.ECC.BinaryField.Value('026eb7a8 59923fbc 82189631 f8103fe4 ac9ca297 0012d5d4 60248048 01841ca4 43709584 93b205e6 47da304d b4ceb08c bbd1ba39 494776fb 988b4717 4dca88c7 e2945283 a01c8972', 16), y: new Clipperz.Crypto.ECC.BinaryField.Value('0349dc80 7f4fbf37 4f4aeade 3bca9531 4dd58cec 9f307a54 ffc61efc 006d8a2c 9d4979c0 ac44aea7 4fbebbb9 f772aedc b620b01a 7ba7af1b 320430c8 591984f6 01cd4c14 3ef1c7a3', 16) }), r: new Clipperz.Crypto.ECC.BinaryField.Value('02000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 131850e1 f19a63e4 b391a8db 917f4138 b630d84b e5d63938 1e91deb4 5cfe778f 637c1001', 16), h: new Clipperz.Crypto.ECC.BinaryField.Value('4', 16) }); } return Clipperz.Crypto.ECC.StandardCurves._K571; }, '_K283': null, 'K283': function() { // f(z) = z^283 + z^12 + z^7 + z^5 + 1 if (Clipperz.Crypto.ECC.StandardCurves._K283 == null) { Clipperz.Crypto.ECC.StandardCurves._K283 = new Clipperz.Crypto.ECC.BinaryField.Curve({ modulus: new Clipperz.Crypto.ECC.BinaryField.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000010a1', 16), a: new Clipperz.Crypto.ECC.BinaryField.Value('0', 16), b: new Clipperz.Crypto.ECC.BinaryField.Value('1', 16), G: new Clipperz.Crypto.ECC.BinaryField.Point({ x: new Clipperz.Crypto.ECC.BinaryField.Value('0503213f 78ca4488 3f1a3b81 62f188e5 53cd265f 23c1567a 16876913 b0c2ac24 58492836', 16), y: new Clipperz.Crypto.ECC.BinaryField.Value('01ccda38 0f1c9e31 8d90f95d 07e5426f e87e45c0 e8184698 e4596236 4e341161 77dd2259', 16) }), r: new Clipperz.Crypto.ECC.BinaryField.Value('01ffffff ffffffff ffffffff ffffffff ffffe9ae 2ed07577 265dff7f 94451e06 1e163c61', 16), h: new Clipperz.Crypto.ECC.BinaryField.Value('4', 16) }); } return Clipperz.Crypto.ECC.StandardCurves._K283; }, */ //----------------------------------------------------------------------------- '_B571': null, 'B571': function() { // f(z) = z^571 + z^10 + z^5 + z^2 + 1 if (Clipperz.Crypto.ECC.StandardCurves._B571 == null) { Clipperz.Crypto.ECC.StandardCurves._B571 = new Clipperz.Crypto.ECC.BinaryField.Curve({ modulus: new Clipperz.Crypto.ECC.BinaryField.Value('80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425', 16), a: new Clipperz.Crypto.ECC.BinaryField.Value('1', 16), b: new Clipperz.Crypto.ECC.BinaryField.Value('02f40e7e2221f295de297117b7f3d62f5c6a97ffcb8ceff1cd6ba8ce4a9a18ad84ffabbd8efa59332be7ad6756a66e294afd185a78ff12aa520e4de739baca0c7ffeff7f2955727a', 16), G: new Clipperz.Crypto.ECC.BinaryField.Point({ x: new Clipperz.Crypto.ECC.BinaryField.Value('0303001d 34b85629 6c16c0d4 0d3cd775 0a93d1d2 955fa80a a5f40fc8 db7b2abd bde53950 f4c0d293 cdd711a3 5b67fb14 99ae6003 8614f139 4abfa3b4 c850d927 e1e7769c 8eec2d19', 16), y: new Clipperz.Crypto.ECC.BinaryField.Value('037bf273 42da639b 6dccfffe b73d69d7 8c6c27a6 009cbbca 1980f853 3921e8a6 84423e43 bab08a57 6291af8f 461bb2a8 b3531d2f 0485c19b 16e2f151 6e23dd3c 1a4827af 1b8ac15b', 16) }), r: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff e661ce18 ff559873 08059b18 6823851e c7dd9ca1 161de93d 5174d66e 8382e9bb 2fe84e47', 16), h: new Clipperz.Crypto.ECC.BinaryField.Value('2', 16) // S: new Clipperz.Crypto.ECC.BinaryField.Value('2aa058f73a0e33ab486b0f610410c53a7f132310', 10), // n: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe661ce18ff55987308059b186823851ec7dd9ca1161de93d5174d66e8382e9bb2fe84e47', 16) }); //----------------------------------------------------------------------------- // // Guide to Elliptic Curve Cryptography // Darrel Hankerson, Alfred Menezes, Scott Vanstone // - Pag: 56, Alorithm 2.45 (with a typo!!!) // //----------------------------------------------------------------------------- // // http://www.milw0rm.com/papers/136 // // ------------------------------------------------------------------------- // Polynomial Reduction Algorithm Modulo f571 // ------------------------------------------------------------------------- // // Input: Polynomial p(x) of degree 1140 or less, stored as // an array of 2T machinewords. // Output: p(x) mod f571(x) // // FOR i = T-1, ..., 0 DO // SET X := P[i+T] // P[i] := P[i] ^ (X<<5) ^ (X<<7) ^ (X<<10) ^ (X<<15) // P[i+1] := P[i+1] ^ (X>>17) ^ (X>>22) ^ (X>>25) ^ (X>>27) // // SET X := P[T-1] >> 27 // P[0] := P[0] ^ X ^ (X<<2) ^ (X<<5) ^ (X<<10) // P[T-1] := P[T-1] & 0x07ffffff // // RETURN P[T-1],...,P[0] // // ------------------------------------------------------------------------- // Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().slowModule = Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().module; Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().module = function(aValue) { var result; if (aValue.bitSize() > 1140) { - MochiKit.Logging.logWarning("ECC.StandarCurves.B571.finiteField().module: falling back to default implementation"); + Clipperz.logWarning("ECC.StandarCurves.B571.finiteField().module: falling back to default implementation"); result = Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().slowModule(aValue); } else { var C, T; var i; -//console.log(">>> binaryField.finiteField.(improved)module"); -// C = aValue.value().slice(0); C = aValue._value.slice(0); for (i=35; i>=18; i--) { T = C[i]; C[i-18] = (((C[i-18] ^ (T<<5) ^ (T<<7) ^ (T<<10) ^ (T<<15)) & 0xffffffff) >>> 0); C[i-17] = ((C[i-17] ^ (T>>>27) ^ (T>>>25) ^ (T>>>22) ^ (T>>>17)) >>> 0); } T = (C[17] >>> 27); C[0] = ((C[0] ^ T ^ ((T<<2) ^ (T<<5) ^ (T<<10)) & 0xffffffff) >>> 0); C[17] = (C[17] & 0x07ffffff); for(i=18; i<=35; i++) { C[i] = 0; } result = new Clipperz.Crypto.ECC.BinaryField.Value(C); -//console.log("<<< binaryField.finiteField.(improved)module"); } return result; }; } return Clipperz.Crypto.ECC.StandardCurves._B571; }, //----------------------------------------------------------------------------- '_B283': null, 'B283': function() { // f(z) = z^283 + z^12 + z^7 + z^5 + 1 if (Clipperz.Crypto.ECC.StandardCurves._B283 == null) { Clipperz.Crypto.ECC.StandardCurves._B283 = new Clipperz.Crypto.ECC.BinaryField.Curve({ // modulus: new Clipperz.Crypto.ECC.BinaryField.Value('10000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000010a1', 16), modulus: new Clipperz.Crypto.ECC.BinaryField.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000010a1', 16), a: new Clipperz.Crypto.ECC.BinaryField.Value('1', 16), b: new Clipperz.Crypto.ECC.BinaryField.Value('027b680a c8b8596d a5a4af8a 19a0303f ca97fd76 45309fa2 a581485a f6263e31 3b79a2f5', 16), G: new Clipperz.Crypto.ECC.BinaryField.Point({ x: new Clipperz.Crypto.ECC.BinaryField.Value('05f93925 8db7dd90 e1934f8c 70b0dfec 2eed25b8 557eac9c 80e2e198 f8cdbecd 86b12053', 16), y: new Clipperz.Crypto.ECC.BinaryField.Value('03676854 fe24141c b98fe6d4 b20d02b4 516ff702 350eddb0 826779c8 13f0df45 be8112f4', 16) }), r: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffff ffffffff ffffffff ffffffff ffffef90 399660fc 938a9016 5b042a7c efadb307', 16), h: new Clipperz.Crypto.ECC.BinaryField.Value('2', 16) // S: new Clipperz.Crypto.ECC.BinaryField.Value('2aa058f73a0e33ab486b0f610410c53a7f132310', 10), // n: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe661ce18ff55987308059b186823851ec7dd9ca1161de93d5174d66e8382e9bb2fe84e47', 16) }); //----------------------------------------------------------------------------- // // Guide to Elliptic Curve Cryptography // Darrel Hankerson, Alfred Menezes, Scott Vanstone // - Pag: 56, Alorithm 2.43 // //----------------------------------------------------------------------------- Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().slowModule = Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().module; Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().module = function(aValue) { var result; if (aValue.bitSize() > 564) { - MochiKit.Logging.logWarning("ECC.StandarCurves.B283.finiteField().module: falling back to default implementation"); + Clipperz.logWarning("ECC.StandarCurves.B283.finiteField().module: falling back to default implementation"); result = Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().slowModule(aValue); } else { var C, T; var i; -//console.log(">>> binaryField.finiteField.(improved)module"); C = aValue._value.slice(0); for (i=17; i>=9; i--) { T = C[i]; C[i-9] = (((C[i-9] ^ (T<<5) ^ (T<<10) ^ (T<<12) ^ (T<<17)) & 0xffffffff) >>> 0); C[i-8] = ((C[i-8] ^ (T>>>27) ^ (T>>>22) ^ (T>>>20) ^ (T>>>15)) >>> 0); } T = (C[8] >>> 27); C[0] = ((C[0] ^ T ^ ((T<<5) ^ (T<<7) ^ (T<<12)) & 0xffffffff) >>> 0); C[8] = (C[8] & 0x07ffffff); for(i=9; i<=17; i++) { C[i] = 0; } result = new Clipperz.Crypto.ECC.BinaryField.Value(C); -//console.log("<<< binaryField.finiteField.(improved)module"); } return result; }; } return Clipperz.Crypto.ECC.StandardCurves._B283; }, //----------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); //############################################################################# diff --git a/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js b/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js index 56f257a..7b7c2c6 100644 --- a/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js +++ b/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js @@ -1,174 +1,170 @@ /* -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/. */ //try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { // throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; //} if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; } Clipperz.Crypto.ECC.BinaryField.FiniteField = function(args) { args = args || {}; this._modulus = args.modulus; return this; } Clipperz.Crypto.ECC.BinaryField.FiniteField.prototype = MochiKit.Base.update(null, { 'asString': function() { return "Clipperz.Crypto.ECC.BinaryField.FiniteField (" + this.modulus().asString() + ")"; }, //----------------------------------------------------------------------------- 'modulus': function() { return this._modulus; }, //----------------------------------------------------------------------------- '_module': function(aValue) { var result; var modulusComparison; -//console.log(">>> binaryField.finiteField.(standard)module"); modulusComparison = Clipperz.Crypto.ECC.BinaryField.Value._compare(aValue, this.modulus()._value); if (modulusComparison < 0) { result = aValue; } else if (modulusComparison == 0) { result = [0]; } else { var modulusBitSize; var resultBitSize; result = aValue; modulusBitSize = this.modulus().bitSize(); resultBitSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(result); while (resultBitSize >= modulusBitSize) { Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(this.modulus()._value, resultBitSize - modulusBitSize)); resultBitSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(result); } } -//console.log("<<< binaryField.finiteField.(standard)module"); - + return result; }, 'module': function(aValue) { return new Clipperz.Crypto.ECC.BinaryField.Value(this._module(aValue._value.slice(0))); }, //----------------------------------------------------------------------------- '_add': function(a, b) { return Clipperz.Crypto.ECC.BinaryField.Value._xor(a, b); }, '_overwriteAdd': function(a, b) { Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(a, b); }, 'add': function(a, b) { return new Clipperz.Crypto.ECC.BinaryField.Value(this._add(a._value, b._value)); }, //----------------------------------------------------------------------------- 'negate': function(aValue) { return aValue.clone(); }, //----------------------------------------------------------------------------- '_multiply': function(a, b) { var result; var valueToXor; var i,c; result = [0]; valueToXor = b; c = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(a); for (i=0; i<c; i++) { if (Clipperz.Crypto.ECC.BinaryField.Value._isBitSet(a, i) === true) { Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, valueToXor); } valueToXor = Clipperz.Crypto.ECC.BinaryField.Value._overwriteShiftLeft(valueToXor, 1); } result = this._module(result); return result; }, 'multiply': function(a, b) { return new Clipperz.Crypto.ECC.BinaryField.Value(this._multiply(a._value, b._value)); }, //----------------------------------------------------------------------------- '_fastMultiply': function(a, b) { var result; var B; var i,c; result = [0]; B = b.slice(0); // Is this array copy avoidable? c = 32; for (i=0; i<c; i++) { var ii, cc; cc = a.length; for (ii=0; ii<cc; ii++) { if (((a[ii] >>> i) & 0x01) == 1) { Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, B, ii); } } if (i < (c-1)) { B = Clipperz.Crypto.ECC.BinaryField.Value._overwriteShiftLeft(B, 1); } } result = this._module(result); return result; }, 'fastMultiply': function(a, b) { return new Clipperz.Crypto.ECC.BinaryField.Value(this._fastMultiply(a._value, b._value)); }, //----------------------------------------------------------------------------- // // Guide to Elliptic Curve Cryptography // Darrel Hankerson, Alfred Menezes, Scott Vanstone // - Pag: 49, Alorithm 2.34 // //----------------------------------------------------------------------------- '_square': function(aValue) { var result; var value; diff --git a/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Point.js b/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Point.js index ffe287b..fef3220 100644 --- a/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Point.js +++ b/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Point.js @@ -1,64 +1,62 @@ /* -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/. */ //try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { // throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; //} if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; } Clipperz.Crypto.ECC.BinaryField.Point = function(args) { args = args || {}; this._x = args.x; this._y = args.y; return this; } Clipperz.Crypto.ECC.BinaryField.Point.prototype = MochiKit.Base.update(null, { 'asString': function() { return "Clipperz.Crypto.ECC.BinaryField.Point (" + this.x() + ", " + this.y() + ")"; }, //----------------------------------------------------------------------------- 'x': function() { return this._x; }, 'y': function() { return this._y; }, //----------------------------------------------------------------------------- 'isZero': function() { return (this.x().isZero() && this.y().isZero()) }, //----------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Value.js b/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Value.js index b705a20..634772a 100644 --- a/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Value.js +++ b/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Value.js @@ -1,118 +1,116 @@ /* -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/. */ //try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { // throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; //} if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; } Clipperz.Crypto.ECC.BinaryField.Value = function(aValue, aBase, aBitSize) { if (aValue.constructor == String) { var value; var stringLength; var numberOfWords; var i,c; if (aBase != 16) { throw Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedBase; } value = aValue.replace(/ /g, ''); stringLength = value.length; numberOfWords = Math.ceil(stringLength / 8); this._value = new Array(numberOfWords); c = numberOfWords; for (i=0; i<c; i++) { var word; if (i < (c-1)) { word = parseInt(value.substr(stringLength-((i+1)*8), 8), 16); } else { word = parseInt(value.substr(0, stringLength-(i*8)), 16); } this._value[i] = word; } } else if (aValue.constructor == Array) { var itemsToCopy; itemsToCopy = aValue.length; while (aValue[itemsToCopy - 1] == 0) { itemsToCopy --; } this._value = aValue.slice(0, itemsToCopy); } else if (aValue.constructor == Number) { this._value = [aValue]; } else { // throw Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedConstructorValueType; } this._bitSize == aBitSize || null; return this; } Clipperz.Crypto.ECC.BinaryField.Value.prototype = MochiKit.Base.update(null, { 'value': function() { return this._value; }, //----------------------------------------------------------------------------- 'wordSize': function() { return this._value.length }, //----------------------------------------------------------------------------- 'clone': function() { return new Clipperz.Crypto.ECC.BinaryField.Value(this._value.slice(0), null, this._bitSize); }, //----------------------------------------------------------------------------- 'isZero': function() { return (this.compare(Clipperz.Crypto.ECC.BinaryField.Value.O) == 0); }, //----------------------------------------------------------------------------- 'asString': function(aBase) { var result; var i,c; if (aBase != 16) { throw Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedBase; } result = ""; c = this.wordSize(); for (i=0; i<c; i++) { @@ -275,109 +273,107 @@ Clipperz.Crypto.ECC.BinaryField.Value._overwriteShiftLeft = function(aWordArray, for (i=0; i<c; i++) { result[i] = 0; } overflowValue = 0; nextOverflowValue = 0; c = aWordArray.length; for (i=0; i<c; i++) { var value; var resultWord; // value = this.value()[i]; value = aWordArray[i]; if (numberOfBitsToShift > 0) { var nextOverflowValue; nextOverflowValue = (value >>> (32 - numberOfBitsToShift)); value = value & (0xffffffff >>> numberOfBitsToShift); resultWord = (((value << numberOfBitsToShift) | overflowValue) >>> 0); } else { resultWord = value; } result[i+numberOfWordsToShift] = resultWord; overflowValue = nextOverflowValue; } if (overflowValue != 0) { result[aWordArray.length + numberOfWordsToShift] = overflowValue; } return result; }; Clipperz.Crypto.ECC.BinaryField.Value._bitSize = function(aWordArray) { var result; var notNullElements; var mostValuableWord; var matchingBitsInMostImportantWord; var mask; var i,c; notNullElements = aWordArray.length; if ((aWordArray.length == 1) && (aWordArray[0] == 0)) { result = 0; } else { notNullElements --; while((notNullElements > 0) && (aWordArray[notNullElements] == 0)) { notNullElements --; } result = notNullElements * 32; mostValuableWord = aWordArray[notNullElements]; matchingBits = 32; mask = 0x80000000; while ((matchingBits > 0) && ((mostValuableWord & mask) == 0)) { matchingBits --; mask >>>= 1; } result += matchingBits; } return result; }; Clipperz.Crypto.ECC.BinaryField.Value._isBitSet = function(aWordArray, aBitPosition) { var result; var byteIndex; var bitIndexInSelectedByte; byteIndex = Math.floor(aBitPosition / 32); bitIndexInSelectedByte = aBitPosition % 32; if (byteIndex <= aWordArray.length) { result = ((aWordArray[byteIndex] & (1 << bitIndexInSelectedByte)) != 0); } else { result = false; } return result; }; Clipperz.Crypto.ECC.BinaryField.Value._compare = function(a,b) { var result; var i,c; result = MochiKit.Base.compare(a.length, b.length); c = a.length; for (i=0; (i<c) && (result==0); i++) { -//console.log("compare[" + c + " - " + i + " - 1] " + this.value()[c-i-1] + ", " + aValue.value()[c-i-1]); -// result = MochiKit.Base.compare(this.value()[c-i-1], aValue.value()[c-i-1]); result = MochiKit.Base.compare(a[c-i-1], b[c-i-1]); } return result; }; Clipperz.Crypto.ECC.BinaryField.Value['exception']= { 'UnsupportedBase': new MochiKit.Base.NamedError("Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedBase"), 'UnsupportedConstructorValueType': new MochiKit.Base.NamedError("Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedConstructorValueType") }; diff --git a/frontend/gamma/js/Clipperz/Crypto/ECC/StandardCurves.js b/frontend/gamma/js/Clipperz/Crypto/ECC/StandardCurves.js index be197e3..239e264 100644 --- a/frontend/gamma/js/Clipperz/Crypto/ECC/StandardCurves.js +++ b/frontend/gamma/js/Clipperz/Crypto/ECC/StandardCurves.js @@ -1,236 +1,229 @@ /* -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/. */ //try { if (typeof(Clipperz.Crypto.ECC.BinaryField.Curve) == 'undefined') { throw ""; }} catch (e) { // throw "Clipperz.Crypto.ECC depends on Clipperz.Crypto.ECC.BinaryField.Curve!"; //} //try { if (typeof(Clipperz.Crypto.ECC.Koblitz.Curve) == 'undefined') { throw ""; }} catch (e) { // throw "Clipperz.Crypto.ECC depends on Clipperz.Crypto.ECC.Koblitz.Curve!"; //} Clipperz.Crypto.ECC.StandardCurves = {}; MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, { //============================================================================== '_K571': null, 'K571': function() { // f(z) = z^571 + z^10 + z^5 + z^2 + 1 if ((Clipperz.Crypto.ECC.StandardCurves._K571 == null) && (typeof(Clipperz.Crypto.ECC.Koblitz.Curve) != 'undefined')) { Clipperz.Crypto.ECC.StandardCurves._K571 = new Clipperz.Crypto.ECC.Koblitz.Curve({ modulus: new Clipperz.Crypto.ECC.Koblitz.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000425', 16), a: new Clipperz.Crypto.ECC.Koblitz.Value('0', 16), b: new Clipperz.Crypto.ECC.Koblitz.Value('1', 16), G: new Clipperz.Crypto.ECC.Koblitz.Point({ x: new Clipperz.Crypto.ECC.Koblitz.Value('026eb7a8 59923fbc 82189631 f8103fe4 ac9ca297 0012d5d4 60248048 01841ca4 43709584 93b205e6 47da304d b4ceb08c bbd1ba39 494776fb 988b4717 4dca88c7 e2945283 a01c8972', 16), y: new Clipperz.Crypto.ECC.Koblitz.Value('0349dc80 7f4fbf37 4f4aeade 3bca9531 4dd58cec 9f307a54 ffc61efc 006d8a2c 9d4979c0 ac44aea7 4fbebbb9 f772aedc b620b01a 7ba7af1b 320430c8 591984f6 01cd4c14 3ef1c7a3', 16) }), r: new Clipperz.Crypto.ECC.Koblitz.Value('02000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 131850e1 f19a63e4 b391a8db 917f4138 b630d84b e5d63938 1e91deb4 5cfe778f 637c1001', 16), h: new Clipperz.Crypto.ECC.Koblitz.Value('4', 16), primeFactor: new Clipperz.Crypto.ECC.Koblitz.Value('02000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 131850e1 f19a63e4 b391a8db 917f4138 b630d84b e5d63938 1e91deb4 5cfe778f 637c1001', 16) }); } return Clipperz.Crypto.ECC.StandardCurves._K571; }, //----------------------------------------------------------------------------- '_K283': null, 'K283': function() { // f(z) = z^283 + z^12 + z^7 + z^5 + 1 if ((Clipperz.Crypto.ECC.StandardCurves._K283 == null) && (typeof(Clipperz.Crypto.ECC.Koblitz.Curve) != 'undefined')) { Clipperz.Crypto.ECC.StandardCurves._K283 = new Clipperz.Crypto.ECC.Koblitz.Curve({ modulus: new Clipperz.Crypto.ECC.Koblitz.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000010a1', 16), a: new Clipperz.Crypto.ECC.Koblitz.Value('0', 16), b: new Clipperz.Crypto.ECC.Koblitz.Value('1', 16), G: new Clipperz.Crypto.ECC.Koblitz.Point({ x: new Clipperz.Crypto.ECC.Koblitz.Value('0503213f 78ca4488 3f1a3b81 62f188e5 53cd265f 23c1567a 16876913 b0c2ac24 58492836', 16), y: new Clipperz.Crypto.ECC.Koblitz.Value('01ccda38 0f1c9e31 8d90f95d 07e5426f e87e45c0 e8184698 e4596236 4e341161 77dd2259', 16) }), r: new Clipperz.Crypto.ECC.Koblitz.Value('01ffffff ffffffff ffffffff ffffffff ffffe9ae 2ed07577 265dff7f 94451e06 1e163c61', 16), h: new Clipperz.Crypto.ECC.Koblitz.Value('4', 16), primeFactor: new Clipperz.Crypto.ECC.Koblitz.Value('01ffffff ffffffff ffffffff ffffffff ffffe9ae 2ed07577 265dff7f 94451e06 1e163c61', 16) }); } return Clipperz.Crypto.ECC.StandardCurves._K283; }, //============================================================================== '_B571': null, 'B571': function() { // f(z) = z^571 + z^10 + z^5 + z^2 + 1 if ((Clipperz.Crypto.ECC.StandardCurves._B571 == null) && (typeof(Clipperz.Crypto.ECC.BinaryField.Curve) != 'undefined')) { Clipperz.Crypto.ECC.StandardCurves._B571 = new Clipperz.Crypto.ECC.BinaryField.Curve({ modulus: new Clipperz.Crypto.ECC.BinaryField.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000425', 16), a: new Clipperz.Crypto.ECC.BinaryField.Value('1', 16), b: new Clipperz.Crypto.ECC.BinaryField.Value('02f40e7e 2221f295 de297117 b7f3d62f 5c6a97ff cb8ceff1 cd6ba8ce 4a9a18ad 84ffabbd 8efa5933 2be7ad67 56a66e29 4afd185a 78ff12aa 520e4de7 39baca0c 7ffeff7f 2955727a', 16), G: new Clipperz.Crypto.ECC.BinaryField.Point({ x: new Clipperz.Crypto.ECC.BinaryField.Value('0303001d 34b85629 6c16c0d4 0d3cd775 0a93d1d2 955fa80a a5f40fc8 db7b2abd bde53950 f4c0d293 cdd711a3 5b67fb14 99ae6003 8614f139 4abfa3b4 c850d927 e1e7769c 8eec2d19', 16), y: new Clipperz.Crypto.ECC.BinaryField.Value('037bf273 42da639b 6dccfffe b73d69d7 8c6c27a6 009cbbca 1980f853 3921e8a6 84423e43 bab08a57 6291af8f 461bb2a8 b3531d2f 0485c19b 16e2f151 6e23dd3c 1a4827af 1b8ac15b', 16) }), r: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff e661ce18 ff559873 08059b18 6823851e c7dd9ca1 161de93d 5174d66e 8382e9bb 2fe84e47', 16), h: new Clipperz.Crypto.ECC.BinaryField.Value('2', 16) // S: new Clipperz.Crypto.ECC.BinaryField.Value('2aa058f73a0e33ab486b0f610410c53a7f132310', 10), // n: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe661ce18ff55987308059b186823851ec7dd9ca1161de93d5174d66e8382e9bb2fe84e47', 16) }); //----------------------------------------------------------------------------- // // Guide to Elliptic Curve Cryptography // Darrel Hankerson, Alfred Menezes, Scott Vanstone // - Pag: 56, Alorithm 2.45 (with a typo!!!) // //----------------------------------------------------------------------------- // // http://www.milw0rm.com/papers/136 // // ------------------------------------------------------------------------- // Polynomial Reduction Algorithm Modulo f571 // ------------------------------------------------------------------------- // // Input: Polynomial p(x) of degree 1140 or less, stored as // an array of 2T machinewords. // Output: p(x) mod f571(x) // // FOR i = T-1, ..., 0 DO // SET X := P[i+T] // P[i] := P[i] ^ (X<<5) ^ (X<<7) ^ (X<<10) ^ (X<<15) // P[i+1] := P[i+1] ^ (X>>17) ^ (X>>22) ^ (X>>25) ^ (X>>27) // // SET X := P[T-1] >> 27 // P[0] := P[0] ^ X ^ (X<<2) ^ (X<<5) ^ (X<<10) // P[T-1] := P[T-1] & 0x07ffffff // // RETURN P[T-1],...,P[0] // // ------------------------------------------------------------------------- // Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().slowModule = Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().module; Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().module = function(aValue) { var result; if (aValue.bitSize() > 1140) { - MochiKit.Logging.logWarning("ECC.StandarCurves.B571.finiteField().module: falling back to default implementation"); + Clipperz.logWarning("ECC.StandarCurves.B571.finiteField().module: falling back to default implementation"); result = Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().slowModule(aValue); } else { var C, T; var i; -//console.log(">>> binaryField.finiteField.(improved)module"); -// C = aValue.value().slice(0); C = aValue._value.slice(0); for (i=35; i>=18; i--) { T = C[i]; C[i-18] = (((C[i-18] ^ (T<<5) ^ (T<<7) ^ (T<<10) ^ (T<<15)) & 0xffffffff) >>> 0); C[i-17] = ((C[i-17] ^ (T>>>27) ^ (T>>>25) ^ (T>>>22) ^ (T>>>17)) >>> 0); } T = (C[17] >>> 27); C[0] = ((C[0] ^ T ^ ((T<<2) ^ (T<<5) ^ (T<<10)) & 0xffffffff) >>> 0); C[17] = (C[17] & 0x07ffffff); for(i=18; i<=35; i++) { C[i] = 0; } result = new Clipperz.Crypto.ECC.BinaryField.Value(C); -//console.log("<<< binaryField.finiteField.(improved)module"); } return result; }; } return Clipperz.Crypto.ECC.StandardCurves._B571; }, //----------------------------------------------------------------------------- '_B283': null, 'B283': function() { // f(z) = z^283 + z^12 + z^7 + z^5 + 1 if ((Clipperz.Crypto.ECC.StandardCurves._B283 == null) && (typeof(Clipperz.Crypto.ECC.BinaryField.Curve) != 'undefined')) { Clipperz.Crypto.ECC.StandardCurves._B283 = new Clipperz.Crypto.ECC.BinaryField.Curve({ modulus: new Clipperz.Crypto.ECC.BinaryField.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000010a1', 16), a: new Clipperz.Crypto.ECC.BinaryField.Value('1', 16), b: new Clipperz.Crypto.ECC.BinaryField.Value('027b680a c8b8596d a5a4af8a 19a0303f ca97fd76 45309fa2 a581485a f6263e31 3b79a2f5', 16), G: new Clipperz.Crypto.ECC.BinaryField.Point({ x: new Clipperz.Crypto.ECC.BinaryField.Value('05f93925 8db7dd90 e1934f8c 70b0dfec 2eed25b8 557eac9c 80e2e198 f8cdbecd 86b12053', 16), y: new Clipperz.Crypto.ECC.BinaryField.Value('03676854 fe24141c b98fe6d4 b20d02b4 516ff702 350eddb0 826779c8 13f0df45 be8112f4', 16) }), r: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffff ffffffff ffffffff ffffffff ffffef90 399660fc 938a9016 5b042a7c efadb307', 16), h: new Clipperz.Crypto.ECC.BinaryField.Value('2', 16) }); //----------------------------------------------------------------------------- // // Guide to Elliptic Curve Cryptography // Darrel Hankerson, Alfred Menezes, Scott Vanstone // - Pag: 56, Alorithm 2.43 // //----------------------------------------------------------------------------- Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().slowModule = Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().module; Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().module = function(aValue) { var result; if (aValue.bitSize() > 564) { - MochiKit.Logging.logWarning("ECC.StandarCurves.B283.finiteField().module: falling back to default implementation"); + Clipperz.logWarning("ECC.StandarCurves.B283.finiteField().module: falling back to default implementation"); result = Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().slowModule(aValue); } else { var C, T; var i; -//console.log(">>> binaryField.finiteField.(improved)module"); C = aValue._value.slice(0); for (i=17; i>=9; i--) { T = C[i]; C[i-9] = (((C[i-9] ^ (T<<5) ^ (T<<10) ^ (T<<12) ^ (T<<17)) & 0xffffffff) >>> 0); C[i-8] = ((C[i-8] ^ (T>>>27) ^ (T>>>22) ^ (T>>>20) ^ (T>>>15)) >>> 0); } T = (C[8] >>> 27); C[0] = ((C[0] ^ T ^ ((T<<5) ^ (T<<7) ^ (T<<12)) & 0xffffffff) >>> 0); C[8] = (C[8] & 0x07ffffff); for(i=9; i<=17; i++) { C[i] = 0; } result = new Clipperz.Crypto.ECC.BinaryField.Value(C); -//console.log("<<< binaryField.finiteField.(improved)module"); } return result; }; } return Clipperz.Crypto.ECC.StandardCurves._B283; }, //============================================================================== __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/Crypto/PRNG.js b/frontend/gamma/js/Clipperz/Crypto/PRNG.js index adfdb16..c539f06 100644 --- a/frontend/gamma/js/Clipperz/Crypto/PRNG.js +++ b/frontend/gamma/js/Clipperz/Crypto/PRNG.js @@ -1,118 +1,116 @@ /* -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/. */ try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.PRNG depends on Clipperz.ByteArray!"; } try { if (typeof(Clipperz.Crypto.SHA) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.PRNG depends on Clipperz.Crypto.SHA!"; } try { if (typeof(Clipperz.Crypto.AES) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.PRNG depends on Clipperz.Crypto.AES!"; } if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { Clipperz.Crypto.PRNG = {}; } //############################################################################# Clipperz.Crypto.PRNG.EntropyAccumulator = function(args) { args = args || {}; // MochiKit.Base.bindMethods(this); this._stack = new Clipperz.ByteArray(); this._maxStackLengthBeforeHashing = args.maxStackLengthBeforeHashing || 256; return this; } Clipperz.Crypto.PRNG.EntropyAccumulator.prototype = MochiKit.Base.update(null, { 'toString': function() { return "Clipperz.Crypto.PRNG.EntropyAccumulator"; }, //------------------------------------------------------------------------- 'stack': function() { return this._stack; }, 'setStack': function(aValue) { this._stack = aValue; }, 'resetStack': function() { this.stack().reset(); }, 'maxStackLengthBeforeHashing': function() { return this._maxStackLengthBeforeHashing; }, //------------------------------------------------------------------------- 'addRandomByte': function(aValue) { this.stack().appendByte(aValue); if (this.stack().length() > this.maxStackLengthBeforeHashing()) { this.setStack(Clipperz.Crypto.SHA.sha_d256(this.stack())); } }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); //############################################################################# Clipperz.Crypto.PRNG.RandomnessSource = function(args) { args = args || {}; MochiKit.Base.bindMethods(this); this._generator = args.generator || null; this._sourceId = args.sourceId || null; this._boostMode = args.boostMode || false; this._nextPoolIndex = 0; return this; } Clipperz.Crypto.PRNG.RandomnessSource.prototype = MochiKit.Base.update(null, { 'generator': function() { return this._generator; }, 'setGenerator': function(aValue) { this._generator = aValue; }, //------------------------------------------------------------------------- 'boostMode': function() { return this._boostMode; }, @@ -396,336 +394,327 @@ Clipperz.Crypto.PRNG.Fortuna = function(args) { this._counter = 0; this._key = new Clipperz.ByteArray(); } else { this._counter = 1; } this._aesKey = null; this._firstPoolReseedLevel = args.firstPoolReseedLevel || 32 || 64; this._numberOfEntropyAccumulators = args.numberOfEntropyAccumulators || 32; this._accumulators = []; c = this.numberOfEntropyAccumulators(); for (i=0; i<c; i++) { this._accumulators.push(new Clipperz.Crypto.PRNG.EntropyAccumulator()); } this._randomnessSources = []; this._reseedCounter = 0; return this; } Clipperz.Crypto.PRNG.Fortuna.prototype = MochiKit.Base.update(null, { 'toString': function() { return "Clipperz.Crypto.PRNG.Fortuna"; }, //------------------------------------------------------------------------- 'key': function() { return this._key; }, 'setKey': function(aValue) { this._key = aValue; this._aesKey = null; }, 'aesKey': function() { if (this._aesKey == null) { this._aesKey = new Clipperz.Crypto.AES.Key({key:this.key()}); } return this._aesKey; }, 'accumulators': function() { return this._accumulators; }, 'firstPoolReseedLevel': function() { return this._firstPoolReseedLevel; }, //------------------------------------------------------------------------- 'reseedCounter': function() { return this._reseedCounter; }, 'incrementReseedCounter': function() { this._reseedCounter = this._reseedCounter +1; }, //------------------------------------------------------------------------- 'reseed': function() { var newKeySeed; var reseedCounter; var reseedCounterMask; var i, c; newKeySeed = this.key(); this.incrementReseedCounter(); reseedCounter = this.reseedCounter(); c = this.numberOfEntropyAccumulators(); reseedCounterMask = 0xffffffff >>> (32 - c); for (i=0; i<c; i++) { if ((i == 0) || ((reseedCounter & (reseedCounterMask >>> (c - i))) == 0)) { newKeySeed.appendBlock(this.accumulators()[i].stack()); this.accumulators()[i].resetStack(); } } if (reseedCounter == 1) { c = this.randomnessSources().length; for (i=0; i<c; i++) { this.randomnessSources()[i].setBoostMode(false); } } this.setKey(Clipperz.Crypto.SHA.sha_d256(newKeySeed)); if (reseedCounter == 1) { -//MochiKit.Logging.logDebug("### PRNG.readyToGenerateRandomBytes"); Clipperz.log("### PRNG.readyToGenerateRandomBytes"); MochiKit.Signal.signal(this, 'readyToGenerateRandomBytes'); } MochiKit.Signal.signal(this, 'reseeded'); }, //------------------------------------------------------------------------- 'isReadyToGenerateRandomValues': function() { return this.reseedCounter() != 0; }, //------------------------------------------------------------------------- 'entropyLevel': function() { return this.accumulators()[0].stack().length() + (this.reseedCounter() * this.firstPoolReseedLevel()); }, //------------------------------------------------------------------------- 'counter': function() { return this._counter; }, 'incrementCounter': function() { this._counter += 1; }, 'counterBlock': function() { var result; result = new Clipperz.ByteArray().appendWords(this.counter(), 0, 0, 0); return result; }, //------------------------------------------------------------------------- 'getRandomBlock': function() { var result; result = new Clipperz.ByteArray(Clipperz.Crypto.AES.encryptBlock(this.aesKey(), this.counterBlock().arrayValues())); this.incrementCounter(); return result; }, //------------------------------------------------------------------------- 'getRandomBytes': function(aSize) { var result; if (this.isReadyToGenerateRandomValues()) { var i,c; var newKey; result = new Clipperz.ByteArray(); c = Math.ceil(aSize / (128 / 8)); for (i=0; i<c; i++) { result.appendBlock(this.getRandomBlock()); } if (result.length() != aSize) { result = result.split(0, aSize); } newKey = this.getRandomBlock().appendBlock(this.getRandomBlock()); this.setKey(newKey); } else { -MochiKit.Logging.logWarning("Fortuna generator has not enough entropy, yet!"); +Clipperz.logWarning("Fortuna generator has not enough entropy, yet!"); throw Clipperz.Crypto.PRNG.exception.NotEnoughEntropy; } return result; }, //------------------------------------------------------------------------- 'addRandomByte': function(aSourceId, aPoolId, aRandomValue) { var selectedAccumulator; selectedAccumulator = this.accumulators()[aPoolId]; selectedAccumulator.addRandomByte(aRandomValue); if (aPoolId == 0) { MochiKit.Signal.signal(this, 'addedRandomByte') if (selectedAccumulator.stack().length() > this.firstPoolReseedLevel()) { this.reseed(); } } }, //------------------------------------------------------------------------- 'numberOfEntropyAccumulators': function() { return this._numberOfEntropyAccumulators; }, //------------------------------------------------------------------------- 'randomnessSources': function() { return this._randomnessSources; }, 'addRandomnessSource': function(aRandomnessSource) { aRandomnessSource.setGenerator(this); aRandomnessSource.setSourceId(this.randomnessSources().length); this.randomnessSources().push(aRandomnessSource); if (this.isReadyToGenerateRandomValues() == false) { aRandomnessSource.setBoostMode(true); } }, //------------------------------------------------------------------------- 'deferredEntropyCollection': function(aValue) { var result; -//MochiKit.Logging.logDebug(">>> PRNG.deferredEntropyCollection"); if (this.isReadyToGenerateRandomValues()) { -//MochiKit.Logging.logDebug("--- PRNG.deferredEntropyCollection - 1"); result = aValue; } else { -//MochiKit.Logging.logDebug("--- PRNG.deferredEntropyCollection - 2"); var deferredResult; -// Clipperz.NotificationCenter.notify(this, 'updatedProgressState', 'collectingEntropy', true); - deferredResult = new Clipperz.Async.Deferred("PRNG.deferredEntropyCollection"); -// deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.1 - PRNG.deferredEntropyCollection - 1: " + res); return res;}); deferredResult.addCallback(MochiKit.Base.partial(MochiKit.Async.succeed, aValue)); -// deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.2 - PRNG.deferredEntropyCollection - 2: " + res); return res;}); MochiKit.Signal.connect(this, 'readyToGenerateRandomBytes', deferredResult, 'callback'); result = deferredResult; } -//MochiKit.Logging.logDebug("<<< PRNG.deferredEntropyCollection - result: " + result); return result; }, //------------------------------------------------------------------------- 'fastEntropyAccumulationForTestingPurpose': function() { while (! this.isReadyToGenerateRandomValues()) { this.addRandomByte(Math.floor(Math.random() * 32), Math.floor(Math.random() * 32), Math.floor(Math.random() * 256)); } }, //------------------------------------------------------------------------- 'dump': function(appendToDoc) { var tbl; var i,c; tbl = document.createElement("table"); tbl.border = 0; with (tbl.style) { border = "1px solid lightgrey"; fontFamily = 'Helvetica, Arial, sans-serif'; fontSize = '8pt'; //borderCollapse = "collapse"; } var hdr = tbl.createTHead(); var hdrtr = hdr.insertRow(0); // document.createElement("tr"); { var ntd; ntd = hdrtr.insertCell(0); ntd.style.borderBottom = "1px solid lightgrey"; ntd.style.borderRight = "1px solid lightgrey"; ntd.appendChild(document.createTextNode("#")); ntd = hdrtr.insertCell(1); ntd.style.borderBottom = "1px solid lightgrey"; ntd.style.borderRight = "1px solid lightgrey"; ntd.appendChild(document.createTextNode("s")); ntd = hdrtr.insertCell(2); ntd.colSpan = this.firstPoolReseedLevel(); ntd.style.borderBottom = "1px solid lightgrey"; ntd.style.borderRight = "1px solid lightgrey"; ntd.appendChild(document.createTextNode("base values")); ntd = hdrtr.insertCell(3); ntd.colSpan = 20; ntd.style.borderBottom = "1px solid lightgrey"; ntd.appendChild(document.createTextNode("extra values")); } c = this.accumulators().length; for (i=0; i<c ; i++) { var currentAccumulator; var bdytr; var bdytd; var ii, cc; currentAccumulator = this.accumulators()[i] bdytr = tbl.insertRow(true); bdytd = bdytr.insertCell(0); bdytd.style.borderRight = "1px solid lightgrey"; bdytd.style.color = "lightgrey"; bdytd.appendChild(document.createTextNode("" + i)); bdytd = bdytr.insertCell(1); bdytd.style.borderRight = "1px solid lightgrey"; bdytd.style.color = "gray"; bdytd.appendChild(document.createTextNode("" + currentAccumulator.stack().length())); cc = Math.max(currentAccumulator.stack().length(), this.firstPoolReseedLevel()); for (ii=0; ii<cc; ii++) { var cellText; bdytd = bdytr.insertCell(ii + 2); if (ii < currentAccumulator.stack().length()) { cellText = Clipperz.ByteArray.byteToHex(currentAccumulator.stack().byteAtIndex(ii)); } else { cellText = "_"; } if (ii == (this.firstPoolReseedLevel() - 1)) { bdytd.style.borderRight = "1px solid lightgrey"; } bdytd.appendChild(document.createTextNode(cellText)); } diff --git a/frontend/gamma/js/Clipperz/Crypto/RSA.js b/frontend/gamma/js/Clipperz/Crypto/RSA.js index 6844dba..5a480f1 100644 --- a/frontend/gamma/js/Clipperz/Crypto/RSA.js +++ b/frontend/gamma/js/Clipperz/Crypto/RSA.js @@ -1,118 +1,116 @@ /* -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/. */ try { if (typeof(Clipperz.Crypto.BigInt) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.RSA depends on Clipperz.Crypto.BigInt!"; } if (typeof(Clipperz.Crypto.RSA) == 'undefined') { Clipperz.Crypto.RSA = {}; } Clipperz.Crypto.RSA.VERSION = "0.1"; Clipperz.Crypto.RSA.NAME = "Clipperz.RSA"; //############################################################################# MochiKit.Base.update(Clipperz.Crypto.RSA, { //------------------------------------------------------------------------- 'publicKeyWithValues': function (e, d, n) { var result; result = {}; if (e.isBigInt) { result.e = e; } else { result.e = new Clipperz.Crypto.BigInt(e, 16); } if (d.isBigInt) { result.d = d; } else { result.d = new Clipperz.Crypto.BigInt(d, 16); } if (n.isBigInt) { result.n = n; } else { result.n = new Clipperz.Crypto.BigInt(n, 16); } return result; }, 'privateKeyWithValues': function(e, d, n) { return Clipperz.Crypto.RSA.publicKeyWithValues(e, d, n); }, //----------------------------------------------------------------------------- 'encryptUsingPublicKey': function (aKey, aMessage) { var messageValue; var result; messageValue = new Clipperz.Crypto.BigInt(aMessage, 16); result = messageValue.powerModule(aKey.e, aKey.n); return result.asString(16); }, //............................................................................. 'decryptUsingPublicKey': function (aKey, aMessage) { return Clipperz.Crypto.RSA.encryptUsingPublicKey(aKey, aMessage); }, //----------------------------------------------------------------------------- 'encryptUsingPrivateKey': function (aKey, aMessage) { var messageValue; var result; messageValue = new Clipperz.Crypto.BigInt(aMessage, 16); result = messageValue.powerModule(aKey.d, aKey.n); return result.asString(16); }, //............................................................................. 'decryptUsingPrivateKey': function (aKey, aMessage) { return Clipperz.Crypto.RSA.encryptUsingPrivateKey(aKey, aMessage); }, //----------------------------------------------------------------------------- 'generatePublicKey': function(aNumberOfBits) { var result; var e; var d; var n; e = new Clipperz.Crypto.BigInt("10001", 16); { var p, q; diff --git a/frontend/gamma/js/Clipperz/Crypto/SHA.js b/frontend/gamma/js/Clipperz/Crypto/SHA.js index b07fa85..f8bfe6e 100644 --- a/frontend/gamma/js/Clipperz/Crypto/SHA.js +++ b/frontend/gamma/js/Clipperz/Crypto/SHA.js @@ -1,118 +1,116 @@ /* -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/. */ try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.PRNG depends on Clipperz.ByteArray!"; } if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } if (typeof(Clipperz.Crypto.SHA) == 'undefined') { Clipperz.Crypto.SHA = {}; } Clipperz.Crypto.SHA.VERSION = "0.3"; Clipperz.Crypto.SHA.NAME = "Clipperz.Crypto.SHA"; MochiKit.Base.update(Clipperz.Crypto.SHA, { '__repr__': function () { return "[" + this.NAME + " " + this.VERSION + "]"; }, 'toString': function () { return this.__repr__(); }, //----------------------------------------------------------------------------- 'rotateRight': function(aValue, aNumberOfBits) { //Clipperz.Profile.start("Clipperz.Crypto.SHA.rotateRight"); var result; result = (aValue >>> aNumberOfBits) | (aValue << (32 - aNumberOfBits)); //Clipperz.Profile.stop("Clipperz.Crypto.SHA.rotateRight"); return result; }, 'shiftRight': function(aValue, aNumberOfBits) { //Clipperz.Profile.start("Clipperz.Crypto.SHA.shiftRight"); var result; result = aValue >>> aNumberOfBits; //Clipperz.Profile.stop("Clipperz.Crypto.SHA.shiftRight"); return result; }, //----------------------------------------------------------------------------- 'safeAdd': function() { //Clipperz.Profile.start("Clipperz.Crypto.SHA.safeAdd"); var result; var i, c; result = arguments[0]; c = arguments.length; for (i=1; i<c; i++) { var lowerBytesSum; lowerBytesSum = (result & 0xffff) + (arguments[i] & 0xffff); result = (((result >> 16) + (arguments[i] >> 16) + (lowerBytesSum >> 16)) << 16) | (lowerBytesSum & 0xffff); } //Clipperz.Profile.stop("Clipperz.Crypto.SHA.safeAdd"); return result; }, //----------------------------------------------------------------------------- 'sha256_array': function(aValue) { //Clipperz.Profile.start("Clipperz.Crypto.SHA.sha256_array"); var result; var message; var h0, h1, h2, h3, h4, h5, h6, h7; var k; var messageLength; var messageLengthInBits; var _i, _c; var charBits; var rotateRight; var shiftRight; var safeAdd; var bytesPerBlock; var currentMessageIndex; bytesPerBlock = 512/8; rotateRight = Clipperz.Crypto.SHA.rotateRight; shiftRight = Clipperz.Crypto.SHA.shiftRight; safeAdd = Clipperz.Crypto.SHA.safeAdd; charBits = 8; h0 = 0x6a09e667; h1 = 0xbb67ae85; h2 = 0x3c6ef372; h3 = 0xa54ff53a; h4 = 0x510e527f; h5 = 0x9b05688c; diff --git a/frontend/gamma/js/Clipperz/Crypto/SRP.js b/frontend/gamma/js/Clipperz/Crypto/SRP.js index 3b25275..597e72d 100644 --- a/frontend/gamma/js/Clipperz/Crypto/SRP.js +++ b/frontend/gamma/js/Clipperz/Crypto/SRP.js @@ -1,328 +1,316 @@ /* -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/. */ try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.PRNG depends on Clipperz.ByteArray!"; } try { if (typeof(Clipperz.Crypto.BigInt) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.SRP depends on Clipperz.Crypto.BigInt!"; } try { if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.SRP depends on Clipperz.Crypto.PRNG!"; } if (typeof(Clipperz.Crypto.SRP) == 'undefined') { Clipperz.Crypto.SRP = {}; } Clipperz.Crypto.SRP.VERSION = "0.1"; Clipperz.Crypto.SRP.NAME = "Clipperz.Crypto.SRP"; //############################################################################# MochiKit.Base.update(Clipperz.Crypto.SRP, { '_n': null, '_g': null, //------------------------------------------------------------------------- 'n': function() { if (Clipperz.Crypto.SRP._n == null) { Clipperz.Crypto.SRP._n = new Clipperz.Crypto.BigInt("115b8b692e0e045692cf280b436735c77a5a9e8a9e7ed56c965f87db5b2a2ece3", 16); } return Clipperz.Crypto.SRP._n; }, //------------------------------------------------------------------------- 'g': function() { if (Clipperz.Crypto.SRP._g == null) { Clipperz.Crypto.SRP._g = new Clipperz.Crypto.BigInt(2); // eventually 5 (as suggested on the Diffi-Helmann documentation) } return Clipperz.Crypto.SRP._g; }, //----------------------------------------------------------------------------- 'exception': { 'InvalidValue': new MochiKit.Base.NamedError("Clipperz.Crypto.SRP.exception.InvalidValue") }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); //############################################################################# // // S R P C o n n e c t i o n version 1.0 // //============================================================================= Clipperz.Crypto.SRP.Connection = function (args) { args = args || {}; this._C = args.C; this._P = args.P; this.hash = args.hash; this._a = null; this._A = null; this._s = null; this._B = null; this._x = null; this._u = null; this._K = null; this._M1 = null; this._M2 = null; this._sessionKey = null; return this; } Clipperz.Crypto.SRP.Connection.prototype = MochiKit.Base.update(null, { 'toString': function () { return "Clipperz.Crypto.SRP.Connection (username: " + this.username() + "). Status: " + this.statusDescription(); }, //------------------------------------------------------------------------- 'C': function () { return this._C; }, //------------------------------------------------------------------------- 'P': function () { return this._P; }, //------------------------------------------------------------------------- 'a': function () { if (this._a == null) { this._a = new Clipperz.Crypto.BigInt(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2), 16); // this._a = new Clipperz.Crypto.BigInt("37532428169486597638072888476611365392249575518156687476805936694442691012367", 10); -//MochiKit.Logging.logDebug("SRP a: " + this._a); } return this._a; }, //------------------------------------------------------------------------- 'A': function () { if (this._A == null) { // Warning: this value should be strictly greater than zero: how should we perform this check? this._A = Clipperz.Crypto.SRP.g().powerModule(this.a(), Clipperz.Crypto.SRP.n()); if (this._A.equals(0)) { -MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'A' to 0."); + Clipperz.logError("Clipperz.Crypto.SRP.Connection: trying to set 'A' to 0."); throw Clipperz.Crypto.SRP.exception.InvalidValue; } -//MochiKit.Logging.logDebug("SRP A: " + this._A); } return this._A; }, //------------------------------------------------------------------------- 's': function () { return this._s; -//MochiKit.Logging.logDebug("SRP s: " + this._S); }, 'set_s': function(aValue) { this._s = aValue; }, //------------------------------------------------------------------------- 'B': function () { return this._B; }, 'set_B': function(aValue) { // Warning: this value should be strictly greater than zero: how should we perform this check? if (! aValue.equals(0)) { this._B = aValue; -//MochiKit.Logging.logDebug("SRP B: " + this._B); } else { -MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'B' to 0."); + Clipperz.logError("Clipperz.Crypto.SRP.Connection: trying to set 'B' to 0."); throw Clipperz.Crypto.SRP.exception.InvalidValue; } }, //------------------------------------------------------------------------- 'x': function () { if (this._x == null) { this._x = new Clipperz.Crypto.BigInt(this.stringHash(this.s().asString(16, 64) + this.P()), 16); -//MochiKit.Logging.logDebug("SRP x: " + this._x); } return this._x; }, //------------------------------------------------------------------------- 'u': function () { if (this._u == null) { this._u = new Clipperz.Crypto.BigInt(this.stringHash(this.B().asString()), 16); -//MochiKit.Logging.logDebug("SRP u: " + this._u); } return this._u; }, //------------------------------------------------------------------------- 'S': function () { if (this._S == null) { var bigint; var srp; bigint = Clipperz.Crypto.BigInt; srp = Clipperz.Crypto.SRP; this._S = bigint.powerModule( bigint.subtract(this.B(), bigint.powerModule(srp.g(), this.x(), srp.n())), bigint.add(this.a(), bigint.multiply(this.u(), this.x())), srp.n() ) -//MochiKit.Logging.logDebug("SRP S: " + this._S); } return this._S; }, //------------------------------------------------------------------------- 'K': function () { if (this._K == null) { this._K = this.stringHash(this.S().asString()); -//MochiKit.Logging.logDebug("SRP K: " + this._K); } return this._K; }, //------------------------------------------------------------------------- 'M1': function () { if (this._M1 == null) { this._M1 = this.stringHash(this.A().asString(10) + this.B().asString(10) + this.K()); -//MochiKit.Logging.logDebug("SRP M1: " + this._M1); } return this._M1; }, //------------------------------------------------------------------------- 'M2': function () { if (this._M2 == null) { this._M2 = this.stringHash(this.A().asString(10) + this.M1() + this.K()); -//MochiKit.Logging.logDebug("SRP M2: " + this._M2); } return this._M2; }, //========================================================================= 'serverSideCredentialsWithSalt': function(aSalt) { var result; var s, x, v; s = aSalt; x = this.stringHash(s + this.P()); v = Clipperz.Crypto.SRP.g().powerModule(new Clipperz.Crypto.BigInt(x, 16), Clipperz.Crypto.SRP.n()); result = {}; result['C'] = this.C(); result['s'] = s; result['v'] = v.asString(16); return result; }, 'serverSideCredentials': function() { var result; var s; s = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2); result = this.serverSideCredentialsWithSalt(s); return result; }, //========================================================================= /* 'computeServerSide_S': function(b) { var result; var v; var bigint; var srp; bigint = Clipperz.Crypto.BigInt; srp = Clipperz.Crypto.SRP; v = new Clipperz.Crypto.BigInt(srpConnection.serverSideCredentialsWithSalt(this.s().asString(16, 64)).v, 16); // _S = (this.A().multiply(this.v().modPow(this.u(), this.n()))).modPow(this.b(), this.n()); result = bigint.powerModule( bigint.multiply( this.A(), bigint.powerModule(v, this.u(), srp.n()) ), new Clipperz.Crypto.BigInt(b, 10), srp.n() ); return result; }, */ //========================================================================= 'stringHash': function(aValue) { var result; result = this.hash(new Clipperz.ByteArray(aValue)).toHexString().substring(2); return result; }, //========================================================================= __syntaxFix__: "syntax fix" }); //############################################################################# diff --git a/frontend/gamma/js/Clipperz/DOM.js b/frontend/gamma/js/Clipperz/DOM.js index 8f24653..1d52a4b 100644 --- a/frontend/gamma/js/Clipperz/DOM.js +++ b/frontend/gamma/js/Clipperz/DOM.js @@ -1,136 +1,134 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.DOM) == 'undefined') { Clipperz.DOM = {}; } Clipperz.DOM.VERSION = "0.1"; Clipperz.DOM.NAME = "Clipperz.DOM"; MochiKit.Base.update(Clipperz.DOM, { //------------------------------------------------------------------------- '__repr__': function () { return "[" + this.NAME + " " + this.VERSION + "]"; }, //------------------------------------------------------------------------- 'toString': function () { return this.__repr__(); }, //------------------------------------------------------------------------- 'selectOptionMatchingValue': function (aSelectElement, aValue, shouldUseCaseInsensitiveTest) { var selectedOptionIndex; var i, c; selectedOptionIndex = -1; c = aSelectElement.options.length; for (i=0; (i<c) && (selectedOptionIndex == -1); i++) { if (shouldUseCaseInsensitiveTest == true) { if (aSelectElement.options[i].value.toLowerCase() == aValue.toLowerCase()) { selectedOptionIndex = i; } } else { if (aSelectElement.options[i].value == aValue) { selectedOptionIndex = i; } } } if (selectedOptionIndex != -1) { aSelectElement.selectedIndex = selectedOptionIndex; } }, //------------------------------------------------------------------------- 'setFormContents': function(aNode, someValues) { var node; var values; var i, c; values = {}; c = someValues[0].length; for (i=0; i<c; i++) { values[someValues[0][i]] = someValues[1][i]; } // var m = MochiKit.Base; // var self = MochiKit.DOM; if (typeof(aNode) == "undefined" || aNode === null) { node = MochiKit.DOM._document.body; } else { node = MochiKit.DOM.getElement(aNode); } MochiKit.Base.nodeWalk(node, function(aNode) { var result; var name; result = null; name = aNode.name; if (MochiKit.Base.isNotEmpty(name) && (typeof(values[name]) != 'undefined')) { var tagName; tagName = aNode.tagName.toUpperCase(); if (tagName === "INPUT" && (aNode.type == "radio" || aNode.type == "checkbox")) { aNode.checked = values[name]; } else if (tagName === "SELECT") { if (aNode.type == "select-one") { Clipperz.DOM.selectOptionMatchingValue(aNode, values[name]); } else { // aNode.type == "select-multiple" -MochiKit.Logging.logWarning("### unhandled Select.type = 'select-multiple' condition"); + Clipperz.logWarning("### unhandled Select.type = 'select-multiple' condition"); } } else if (tagName === "FORM" || tagName === "P" || tagName === "SPAN" || tagName === "DIV") { result = aNode.childNodes; } else { aNode.value = values[name] } } else { result = aNode.childNodes; } return result; }); }, //------------------------------------------------------------------------- 'get': MochiKit.DOM.getElement, //------------------------------------------------------------------------- 'Helper': Clipperz.YUI.DomHelper, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/Date.js b/frontend/gamma/js/Clipperz/Date.js index 020d77b..163790e 100644 --- a/frontend/gamma/js/Clipperz/Date.js +++ b/frontend/gamma/js/Clipperz/Date.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.Date) == 'undefined') { Clipperz.Date = {}; } Clipperz.Date.VERSION = "0.1"; Clipperz.Date.NAME = "Clipperz.Date"; MochiKit.Base.update(Clipperz.Date, { //------------------------------------------------------------------------- '__repr__': function () { return "[" + this.NAME + " " + this.VERSION + "]"; }, //------------------------------------------------------------------------- 'toString': function () { return this.__repr__(); }, //------------------------------------------------------------------------- 'daysInMonth': [31,28,31,30,31,30,31,31,30,31,30,31], //------------------------------------------------------------------------- 'englishOrdinalDaySuffixForDate': function(aDate) { var result; switch (aDate.getDate()) { case 1: case 21: case 31: result = "st"; break; case 2: case 22: result = "nd"; break; case 3: case 23: result = "rd"; break; default: result = "th"; break; } return result; }, //------------------------------------------------------------------------- 'isLeapYear': function(aDate) { var year; var result; year = aDate.getFullYear(); result = ((year & 0x03) == 0 && (year % 100 || (year % 400 == 0 && year))); return result; }, //------------------------------------------------------------------------- 'getDaysInMonth': function(aDate) { var result; if (aDate.getMonth() == 1) { Clipperz.Date.isLeapYear(aDate) result += Clipperz.Date.isLeapYear(aDate) ? 29 : 28; } else { result = Clipperz.Date.daysInMonth[aDate.getMonth()]; } return result; }, //------------------------------------------------------------------------- 'getTimezone': function(aDate) { var result; result = aDate.toString(); result = result.replace(/([A-Z]{3}) [0-9]{4}/, '$1'); result = result.replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/, "$1$2$3"); return result; }, 'getGMTOffset': function(aDate) { return (aDate.getTimezoneOffset() > 0 ? "-" : "+") + MochiKit.Format.numberFormatter('00')(Math.floor(this.getTimezoneOffset() / 60)) + MochiKit.Format.numberFormatter('00')(this.getTimezoneOffset() % 60); @@ -146,157 +144,154 @@ MochiKit.Base.update(Clipperz.Date, { result = " + MochiKit.Format.numberFormatter('00')(aDate.getDate())"; break; case "D": result = " + aLocale['shortDays'][aDate.getDay()]"; break; case "j": result = " + aDate.getDate()"; break; case "l": result = " + aLocale['days'][aDate.getDay()]"; break; case "S": result = " + Clipperz.Date.englishOrdinalDaySuffixForDate(aDate)"; break; case "w": result = " + aDate.getDay()"; break; case "z": result = " + aDate.getDayOfYear()"; break; case "W": result = " + aDate.getWeekOfYear()"; break; case "F": result = " + aLocale['months'][aDate.getMonth()]"; break; case "m": result = " + MochiKit.Format.numberFormatter('00')(aDate.getMonth() + 1)"; break; case "M": result = " + aLocale['shortMonths'][aDate.getMonth()]"; break; case "n": result = " + (aDate.getMonth() + 1)"; break; case "t": result = " + Clipperz.Date.getDaysInMonth(aDate)"; break; case "L": result = " + (Clipperz.Date.isLeapYear(aDate) ? 1 : 0)"; break; case "Y": result = " + aDate.getFullYear()"; break; case "y": result = " + ('' + aDate.getFullYear()).substring(2, 4)"; break; case "a": result = " + (aDate.getHours() < 12 ? aLocale['amDesignation'] : aLocale['pmDesignation'])"; break; case "A": result = " + (aDate.getHours() < 12 ? aLocale['amDesignation'].toUpperCase() : aLocale['pmDesignation'].toUpperCase())"; break; case "g": result = " + ((aDate.getHours() %12) ? aDate.getHours() % 12 : 12)"; break; case "G": result = " + aDate.getHours()"; break; case "h": result = " + MochiKit.Format.numberFormatter('00')((aDate.getHours() %12) ? aDate.getHours() % 12 : 12)"; break; case "H": result = " + MochiKit.Format.numberFormatter('00')(aDate.getHours())"; break; case "i": result = " + MochiKit.Format.numberFormatter('00')(aDate.getMinutes())"; break; case "s": result = " + MochiKit.Format.numberFormatter('00')(aDate.getSeconds())"; break; case "O": result = " + aDate.getGMTOffset()"; break; case "T": result = " + Clipperz.Date.getTimezone(aDate)"; break; case "Z": result = " + ( + aDate.getTimezoneOffset() * -60)"; break; default: result = " + '" + aCharacter + "'"; break; }; return result; }, //========================================================================= 'formatDateWithPHPLikeTemplateAndLocale': function(aDate, aFormat, aLocale) { var result; var formatterCode; var formatter; var i,c; -//MochiKit.Logging.logDebug(">>> Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale"); formatterCode = "Clipperz.Date.__scratchFormatter = function(aDate, aLocale){return ''"; c = aFormat.length; i = 0; while (i<c) { var character; character = aFormat.charAt(i); if (character == "\\") { i++; character = aFormat.charAt(i); formatterCode += " + '" + character + "'" } else { formatterCode += Clipperz.Date.getPHPLikeFormatCode(character); } i++; } formatterCode += ";}"; -//MochiKit.Logging.logDebug("--- Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale - formatterCode: " + formatterCode); eval(formatterCode); result = Clipperz.Date.__scratchFormatter.call(this, aDate, aLocale); delete Clipperz.Date.__scratchFormatter; -//MochiKit.Logging.logDebug("<<< Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale"); return result; }, //------------------------------------------------------------------------- 'parseDateWithPHPLikeTemplateAndLocale': function(aString, aFormat, aLocale) { return new Date(); }, //========================================================================= 'formatDateWithUTCFormatAndLocale': function(aDate, aLocale) { // return Clipperz.Date.formatWithJavaLikeTemplateAndLocale(aDate, "EEE, dd MMMM yyyy HH:mm:ss zzz", aLocale); return aDate.toString(); }, 'parseDateWithUTCFormatAndLocale': function(aValue, aLocale) { return new Date(Date.parse(aValue)); }, //========================================================================= 'exception': { // 'AbstractMethod': new MochiKit.Base.NamedError("Clipperz.Base.exception.AbstractMethod"), // 'UnknownType': new MochiKit.Base.NamedError("Clipperz.Base.exception.UnknownType") }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/KeePassExportProcessor.js b/frontend/gamma/js/Clipperz/KeePassExportProcessor.js index a3c10c8..e35d729 100644 --- a/frontend/gamma/js/Clipperz/KeePassExportProcessor.js +++ b/frontend/gamma/js/Clipperz/KeePassExportProcessor.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } Clipperz.KeePassExportProcessor = function(args) { args = args || {}; return this; } //============================================================================= Clipperz.KeePassExportProcessor.prototype = MochiKit.Base.update(null, { //------------------------------------------------------------------------- 'deferredParse_core': function(aContext) { var deferredResult; if (aContext.line == "") { deferredResult = MochiKit.Async.succeed(aContext.result); } else { var record; record = this.parseRecord(aContext); if (record != null) { aContext.result.push(record); } aContext.line = aContext.line.replace(/^\n*/g, "").replace(/\n$/g, ""); deferredResult = new Clipperz.Async.Deferred("KeePassExportProcessor.deferredParse_core"); deferredResult.addCallbackPass(MochiKit.Signal.signal, this, 'importProcessorProgressUpdate', {status:'processing', size:aContext.size, progress:(aContext.size - aContext.line.length)}); deferredResult.addCallback(MochiKit.Async.wait, 0.2); deferredResult.addMethod(this, 'deferredParse_core'); deferredResult.callback(aContext); } return deferredResult; }, //......................................................................... 'deferredParse': function(aValue) { var deferredResult; var lines; var context; lines = aValue.replace(/\r?\n/g, "\n"); context = { line: lines, size: lines.length, result: [] } deferredResult = new Clipperz.Async.Deferred("KeePassExportProcessor.deferredResult"); deferredResult.addMethod(this, 'deferredParse_core'); deferredResult.callback(context); return deferredResult; }, //------------------------------------------------------------------------- 'parseRecord': function(aContext) { var result; var recordLabelRegexp; var fieldLabelRegexp; var fieldValueRegexp; var fullLineRegexp; /* [Record name] Group Tree: UserName: URL: Password: Notes: test UUID: 525f62430079bae48b79ed2961924b05 Icon: 0 Creation Time: 2007-06-26 17:56:03 Last Access: 2007-10-25 16:23:51 Last Modification: 2007-10-25 16:23:51 Expires: 2999-12-28 23:59:59 [Record name] ==> Title Group: General ==> Group Group Tree: ==> Group Tree UserName: ==> UserName URL: ==> URL Password: ==> Password Notes: test ==> Notes UUID: 525f62430079bae48b79ed2961924b05 ==> UUID Icon: 0 ==> Icon Creation Time: 2007-06-26 17:56:03 ==> Creation Time diff --git a/frontend/gamma/js/Clipperz/KeyValueObjectStore.js b/frontend/gamma/js/Clipperz/KeyValueObjectStore.js index 36cda88..8bc125b 100644 --- a/frontend/gamma/js/Clipperz/KeyValueObjectStore.js +++ b/frontend/gamma/js/Clipperz/KeyValueObjectStore.js @@ -1,173 +1,166 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } //############################################################################# Clipperz.KeyValueObjectStore = function(args) { args = args || {}; // this._name = args['name'] || "unnamed KeyValueObjectStore"; this._values = args['values'] || {}; // this._referenceObjectStore = null; -//console.log("new KeyValueObjectStore", args, this._values); return this; } Clipperz.KeyValueObjectStore.prototype = MochiKit.Base.update(null, { 'values': function() { return this._values; }, 'initWithValues': function (someValues) { this._values = Clipperz.Base.deepClone(someValues) || {}; return this; }, 'setValues': function (someValues) { -//console.log("KeyValueObjectStore.setValues", someValues); this._values = someValues; return this; }, // 'initWithObjectStore': function (anObjectStore) { // this._referenceObjectStore = anObjectStore; // }, 'removeAllData': function () { this._values = {}; }, //------------------------------------------------------------------------- 'getValue': function(aKeyPath) { var result; var keys; var i,c; result = this.values(); keys = (aKeyPath + '').split('.'); c = keys.length; i = 0; while ((i<c) && (result != null)) { if (typeof result[keys[i]] != 'undefined') { result = result[keys[i]]; } else { result = null; } i++; } return result; }, //------------------------------------------------------------------------- 'setValue': function(aKeyPath, aValue) { var targetObject; var keys; var i,c; -//console.log(">>> KeyValueObjectStore.setValue", this, this.values(), aKeyPath, aValue); targetObject = this.values(); keys = (aKeyPath + '').split('.'); c = keys.length - 1; for (i=0; i<c; i++) { -//console.log("--- KeyValueObjectStore.setValue", i, targetObject, keys[i]); if (typeof targetObject[keys[i]] == 'undefined') { targetObject[keys[i]] = {} } targetObject = targetObject[keys[i]]; } targetObject[keys[c]] = aValue; -//console.log("<<< KeyValueObjectStore.setValue"); return aValue; }, //------------------------------------------------------------------------- 'removeValue': function (aKeyPath) { // this.setValue(aKeyPath, null); var targetObject; var keys; var i,c; targetObject = this.values(); keys = ('' + aKeyPath).split('.'); c = keys.length - 1; for (i=0; i<c; i++) { if (typeof targetObject[keys[i]] == 'undefined') { targetObject[keys[i]] = {} } targetObject = targetObject[keys[i]]; } delete targetObject[keys[c]]; }, //------------------------------------------------------------------------- 'deferredGetOrSet': function(aKeyPath, aGetterFunction) { var deferredResult; if (this.getValue(aKeyPath) != null) { deferredResult = MochiKit.Async.succeed(this.getValue(aKeyPath)); } else { deferredResult = new Clipperz.Async.Deferred("KeyValueObjectStore.deferredGetOrSet [" + aKeyPath + "]", {trace:false}); deferredResult.addCallback(aGetterFunction); deferredResult.addMethod(this, 'setValue', aKeyPath); deferredResult.callback(); } return deferredResult; }, //------------------------------------------------------------------------- 'isEmpty': function () { return (MochiKit.Base.keys(this.values()).length == 0) }, //------------------------------------------------------------------------- /* 'dumpData': function () { return Clipperz.Base.serializeJSON(this.values()); }, */ //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/Logging.js b/frontend/gamma/js/Clipperz/Logging.js index 77a0896..b6b806a 100644 --- a/frontend/gamma/js/Clipperz/Logging.js +++ b/frontend/gamma/js/Clipperz/Logging.js @@ -1,39 +1,32 @@ /* -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'); -if (typeof console == 'undefined') { - Clipperz.log = MochiKit.Logging.logDebug; -// Safari/WebKit 4 -} else if (navigator.userAgent.match(/WebKit/)) { -// Clipperz.log = console.log; - Clipperz.log = MochiKit.Logging.logDebug; -} else if (navigator.userAgent.match(/Gecko/)) { - Clipperz.log = function () { -// firebug 1.3 bug see http://code.google.com/p/fbug/issues/detail?id=1347 - console.log.apply(window._firebug, arguments); - }; -}
\ No newline at end of file +Clipperz.log = function () { + console.log.apply(console, arguments); +} + +Clipperz.logError = Clipperz.log; +Clipperz.logWarning = Clipperz.log; +Clipperz.logDebug = Clipperz.log;
\ No newline at end of file diff --git a/frontend/gamma/js/Clipperz/PM/BookmarkletProcessor.js b/frontend/gamma/js/Clipperz/PM/BookmarkletProcessor.js index 897beed..4818b76 100644 --- a/frontend/gamma/js/Clipperz/PM/BookmarkletProcessor.js +++ b/frontend/gamma/js/Clipperz/PM/BookmarkletProcessor.js @@ -1,118 +1,116 @@ /* -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/. */ /* if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } Clipperz.PM.BookmarkletProcessor = function(aConfiguration) { this._configuration = aConfiguration; this._editableFields = null; this._favicon = null; return this; } Clipperz.PM.BookmarkletProcessor.prototype = MochiKit.Base.update(null, { 'toString': function() { return "Clipperz.PM.BookmarkletProcessor"; }, //------------------------------------------------------------------------- 'configuration': function() { return this._configuration; }, //------------------------------------------------------------------------- 'pageTitle': function() { return this.configuration().page.title; }, //------------------------------------------------------------------------- 'fields': function() { return this.configuration().form.inputs; }, //------------------------------------------------------------------------- 'editableFields': function() { if (this._editableFields == null) { this._editableFields = MochiKit.Base.filter(function(aField) { var result; var type; type = aField['type'].toLowerCase(); result = ((type != 'hidden') && (type != 'submit') && (type != 'checkbox') && (type != 'radio') && (type != 'select')); return result; }, this.fields()) } return this._editableFields; }, //------------------------------------------------------------------------- 'hostname': function() { if (this._hostname == null) { var actionUrl; actionUrl = this.configuration()['form']['attributes']['action']; this._hostname = actionUrl.replace(/ ^ h t t p s ? : \ / \ / ( [ ^ \ / ] * ) \ / . * /, '$1'); } return this._hostname; }, 'favicon': function() { if (this._favicon == null) { this._favicon = "http://" + this.hostname() + "/favicon.ico"; } return this._favicon; }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); //############################################################################# / * Clipperz.PM.BookmarkletProcessor.createRecordFromBookmarkletConfiguration = function(anUser, aConfiguration) { var processor; var record; var recordVersion; var directLogin; var bindings; var i,c; processor = new Clipperz.PM.BookmarkletProcessor(aConfiguration); record = new Clipperz.PM.DataModel.Record({ diff --git a/frontend/gamma/js/Clipperz/PM/Connection.js b/frontend/gamma/js/Clipperz/PM/Connection.js index a05a310..6a8f15e 100644 --- a/frontend/gamma/js/Clipperz/PM/Connection.js +++ b/frontend/gamma/js/Clipperz/PM/Connection.js @@ -1,603 +1,600 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } //----------------------------------------------------------------------------- // // Abstract C O N N E C T I O N class // //----------------------------------------------------------------------------- Clipperz.PM.Connection = function (args) { args = args || {}; this._proxy = args.proxy || Clipperz.PM.Proxy.defaultProxy; this._getCredentialsFunction = args.getCredentialsFunction; this._clipperz_pm_crypto_version = null; this._connectionId = null; this._sharedSecret = null; this._serverLockValue = null; return this; } Clipperz.PM.Connection.prototype = MochiKit.Base.update(null, { 'toString': function() { return "Connection [" + this.version() + "]"; }, //========================================================================= 'version': function() { throw Clipperz.Base.exception.AbstractMethod; }, 'clipperz_pm_crypto_version': function() { if (this._clipperz_pm_crypto_version == null) { var connectionVersions; var versions; var version; var i, c; version = null; connectionVersions = Clipperz.PM.Connection.communicationProtocol.versions; versions = MochiKit.Base.keys(connectionVersions); c = versions.length; for (i=0; i<c; i++) { if (! (versions[i] == 'current')) { if (this instanceof connectionVersions[versions[i]]) { version = versions[i]; }; } } this._clipperz_pm_crypto_version = version; } return this._clipperz_pm_crypto_version; }, //------------------------------------------------------------------------- 'defaultErrorHandler': function(anErrorString, anException) { -MochiKit.Logging.logError("### Connection.defaultErrorHandler: " + anErrorString + " (" + anException + ")"); +// Clipperz.logError("### Connection.defaultErrorHandler: " + anErrorString, anException); + Clipperz.logError("### Connection.defaultErrorHandler: " + anErrorString + " (" + anException + ")"); }, //------------------------------------------------------------------------- 'getCredentialsFunction': function () { return this._getCredentialsFunction; }, 'normalizedCredentials': function(someValues) { throw Clipperz.Base.exception.AbstractMethod; }, //========================================================================= 'proxy': function () { return this._proxy; }, //========================================================================= 'register': function () { throw Clipperz.Base.exception.AbstractMethod; }, 'login': function() { throw Clipperz.Base.exception.AbstractMethod; }, //------------------------------------------------------------------------- 'message': function(someArguments, aCallback) { throw Clipperz.Base.exception.AbstractMethod; }, //------------------------------------------------------------------------- 'serverSideUserCredentials': function() { throw Clipperz.Base.exception.AbstractMethod; }, //========================================================================= 'sharedSecret': function () { return this._sharedSecret; }, 'setSharedSecret': function (aValue) { this._sharedSecret = aValue; }, //------------------------------------------------------------------------- 'connectionId': function() { return this._connectionId; }, 'setConnectionId': function(aValue) { this._connectionId = aValue; }, //------------------------------------------------------------------------- 'serverLockValue': function () { return this._serverLockValue; }, 'setServerLockValue': function (aValue) { this._serverLockValue = aValue; }, //========================================================================= /* // TODO: ????? 'oneTimePassword': function() { return this._oneTimePassword; }, 'setOneTimePassword': function(aValue) { this._oneTimePassword = aValue; }, */ //========================================================================= 'reset': function() { this.setSharedSecret(null); this.setConnectionId(null); }, //========================================================================= __syntaxFix__: "syntax fix" } ); if (typeof(Clipperz.PM.Connection.SRP) == 'undefined') { Clipperz.PM.Connection.SRP = {}; } //----------------------------------------------------------------------------- // // S R P [ 1 . 0 ] C O N N E C T I O N class // //----------------------------------------------------------------------------- Clipperz.PM.Connection.SRP['1.0'] = function (args) { Clipperz.PM.Connection.call(this, args); return this; } Clipperz.PM.Connection.SRP['1.0'].prototype = MochiKit.Base.update(new Clipperz.PM.Connection(), { 'version': function() { return '1.0'; }, //========================================================================= 'register': function (someUserData) { var deferredResult; var cryptoVersion; var srpConnection; cryptoVersion = this.clipperz_pm_crypto_version(); deferredResult = new Clipperz.Async.Deferred("Connection.registerWithVersion", {trace:false}); deferredResult.collectResults({ 'credentials': [ this.getCredentialsFunction(), MochiKit.Base.method(this, 'normalizedCredentials'), MochiKit.Base.bind(function(someCredentials) { var srpConnection; var result; srpConnection = new Clipperz.Crypto.SRP.Connection({ C:someCredentials['username'], P:someCredentials['password'], hash:this.hash() }); result = srpConnection.serverSideCredentials(); result['version'] = Clipperz.PM.Connection.communicationProtocol.currentVersion; return result; }, this) ], 'user': MochiKit.Base.partial(MochiKit.Async.succeed, someUserData), 'version': MochiKit.Base.partial(MochiKit.Async.succeed, Clipperz.PM.Connection.communicationProtocol.currentVersion), 'message': MochiKit.Base.partial(MochiKit.Async.succeed, 'completeRegistration') }); deferredResult.addCallbackPass(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'advanceProgress'); deferredResult.addMethod(this.proxy(), 'registration'); deferredResult.addCallbackPass(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'advanceProgress'); deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'updateCredentials': function (aUsername, aPassphrase, someUserData) { var deferredResult; deferredResult = new Clipperz.Async.Deferred("Connection.updateCredentials", {trace:false}); deferredResult.collectResults({ 'credentials': [ MochiKit.Base.method(this, 'normalizedCredentials', {username:aUsername, password:aPassphrase}), MochiKit.Base.bind(function(someCredentials) { var srpConnection; var result; srpConnection = new Clipperz.Crypto.SRP.Connection({ C:someCredentials['username'], P:someCredentials['password'], hash:this.hash() }); result = srpConnection.serverSideCredentials(); result['version'] = Clipperz.PM.Connection.communicationProtocol.currentVersion; return result; }, this) ], 'user': MochiKit.Base.partial(MochiKit.Async.succeed, someUserData) }); deferredResult.addCallbackPass(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'advanceProgress'); deferredResult.addMethod(this, 'message', 'upgradeUserCredentials'); deferredResult.addCallbackPass(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'advanceProgress'); deferredResult.callback(); return deferredResult; }, //========================================================================= 'redeemOneTimePassword': function (someParameters) { -//console.log("Connections.redeemOneTimePassword", someParameters['username'], someParameters['password']); /* //========================================================================= // LOGIN WITH PASSPHRASE, extracted from the TRUNK version (LoginPanel.js) deferredResult.addCallback(function(anUsername, aOneTimePassword) { var args; args = { 'message': 'oneTimePassword', 'version': Clipperz.PM.Crypto.communicationProtocol.currentVersion, 'parameters': { 'oneTimePasswordKey': Clipperz.PM.DataModel.OneTimePassword.computeKeyWithUsernameAndPassword(anUsername, aOneTimePassword), 'oneTimePasswordKeyChecksum': Clipperz.PM.DataModel.OneTimePassword.computeKeyChecksumWithUsernameAndPassword(anUsername, aOneTimePassword) } } return args; }, anUsername, oneTimePassword); deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'OTP_login_loadingOTP'); deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Proxy.defaultProxy, 'handshake')); deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'OTP_login_extractingPassphrase'); deferredResult.addCallback(function(aResult) { return Clipperz.PM.Crypto.deferredDecrypt(oneTimePassword, aResult['data'], aResult['version']); }); deferredResult.addCallback(function(aResult) { return (new Clipperz.ByteArray().appendBase64String(aResult['passphrase'])).asString(); }); deferredResult.addMethod(this, 'doLoginWithUsernameAndPassphrase', anUsername), */ var args; var normalizedOTP; normalizedOTP = Clipperz.PM.DataModel.OneTimePassword.normalizedOneTimePassword(someParameters['password']); args = { 'message': 'oneTimePassword', 'version': Clipperz.PM.Connection.communicationProtocol.currentVersion, 'parameters': { 'oneTimePasswordKey': Clipperz.PM.DataModel.OneTimePassword.computeKeyWithUsernameAndPassword(someParameters['username'], normalizedOTP), 'oneTimePasswordKeyChecksum': Clipperz.PM.DataModel.OneTimePassword.computeKeyChecksumWithUsernameAndPassword(someParameters['username'], normalizedOTP) } } return Clipperz.Async.callbacks("Connction.redeemOTP", [ MochiKit.Base.method(this.proxy(), 'handshake', args), function(aResult) { return Clipperz.PM.Crypto.deferredDecrypt({ value: aResult['data'], key: normalizedOTP, version:aResult['version'] }); }, function(aResult) { return (new Clipperz.ByteArray().appendBase64String(aResult['passphrase'])).asString(); } ], {trace:false}) }, 'login': function(isReconnecting) { var deferredResult; var cryptoVersion; var srpConnection; cryptoVersion = this.clipperz_pm_crypto_version(); deferredResult = new Clipperz.Async.Deferred("Connection.login", {trace:false}); deferredResult.addCallback(this.getCredentialsFunction()); deferredResult.addMethod(this, 'normalizedCredentials'); // deferredResult.addCallbackPass(MochiKit.Signal.signal, this, 'updatedProgressState', 'connection_sendingCredentials'); deferredResult.addCallbackPass(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'advanceProgress'); deferredResult.addCallback(MochiKit.Base.bind(function(someCredentials) { srpConnection = new Clipperz.Crypto.SRP.Connection({ C:someCredentials['username'], P:someCredentials['password'], hash:this.hash() }); }, this)); deferredResult.addCallback(function() { var result; result = { message: 'connect', version: cryptoVersion, parameters: { C: srpConnection.C(), A: srpConnection.A().asString(16) // reconnecting: this.connectionId() } }; // TODO: ????? // if (isReconnecting == true) { // args.parameters['reconnecting'] = aConnection.connectionId(); // } return result; }); deferredResult.addMethod(this.proxy(), 'handshake'); // deferredResult.addCallbackPass(MochiKit.Signal.signal, this, 'updatedProgressState', 'connection_credentialVerification'); deferredResult.addCallbackPass(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'advanceProgress'); deferredResult.addCallback(function(someParameters) { var result; srpConnection.set_s(new Clipperz.Crypto.BigInt(someParameters['s'], 16)); srpConnection.set_B(new Clipperz.Crypto.BigInt(someParameters['B'], 16)); // TODO: ????? // if (typeof(someParameters['oneTimePassword']) != 'undefined') { // this.setOneTimePassword(someParameters['oneTimePassword']); // } result = { message: 'credentialCheck', version: cryptoVersion, parameters: { M1: srpConnection.M1() } }; return result; }); deferredResult.addMethod(this.proxy(), 'handshake'); deferredResult.addCallback(function(someParameters) { var result; if (someParameters['M2'] == srpConnection.M2()) { result = MochiKit.Async.succeed(someParameters); } else { result = MochiKit.Async.fail(Clipperz.PM.Connection.exception.WrongChecksum); } return result; }); deferredResult.addCallback(MochiKit.Base.bind(function(someParameters) { this.setConnectionId(someParameters['connectionId']); this.setSharedSecret(srpConnection.K()); // TODO: ????? // if (this.oneTimePassword() != null) { /// ?? result = this.user().oneTimePasswordManager().archiveOneTimePassword(this.oneTimePassword())); // } if ((isReconnecting == true) && (this.serverLockValue() != someParameters['lock'])) { throw Clipperz.PM.Connection.exception.StaleData; } else { this.setServerLockValue(someParameters['lock']); } return someParameters; }, this)); // deferredResult.addCallbackPass(MochiKit.Signal.signal, this, 'updatedProgressState', 'connection_loggedIn'); deferredResult.addCallbackPass(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'advanceProgress'); deferredResult.addCallback(MochiKit.Async.succeed, {result:"done"}); deferredResult.callback(); return deferredResult; }, //========================================================================= 'logout': function() { return Clipperz.Async.callbacks("Connection.logout", [ MochiKit.Base.method(this, 'setSharedSecret'), MochiKit.Base.method(this.proxy(), 'logout', {}) ], {trace:false}); }, //========================================================================= 'ping': function () { // TODO: ping the server in order to have a valid session }, //========================================================================= 'message': function(aMessageName, someParameters) { var args; var parameters; parameters = someParameters || {}; if (typeof(parameters['user']) != 'undefined') { parameters['user']['lock'] = this.serverLockValue(); } -//console.log(">>> Connection.message", aMessageName, someParameters); args = { message: aMessageName, srpSharedSecret: this.sharedSecret(), // parameters: (someParameters || {}) parameters: parameters } return this.sendMessage(args); }, //------------------------------------------------------------------------- 'sendMessage': function(someArguments) { var deferredResult; deferredResult = new Clipperz.Async.Deferred("Connection.sendMessage", {trace:false}); deferredResult.addMethod(this.proxy(), 'message', someArguments); deferredResult.addCallback(MochiKit.Base.bind(function(res) { if (typeof(res['lock']) != 'undefined') { this.setServerLockValue(res['lock']); } return res; }, this)); deferredResult.addErrback(MochiKit.Base.method(this, 'messageExceptionHandler'), someArguments); deferredResult.callback(); return deferredResult }, //------------------------------------------------------------------------- 'messageExceptionHandler': function(anOriginalMessageArguments, anError) { var result; -console.log(">>> Connection.messageExceptionHandler", anError, anError.message); +Clipperz.log(">>> Connection.messageExceptionHandler: " + anError.message, anError); if (anError instanceof MochiKit.Async.CancelledError) { result = anError; } else { if ((anError.message == 'Trying to communicate without an active connection') || (anError.message == 'No tollManager available for current session') ) { result = this.reestablishConnection(anOriginalMessageArguments); } else if (anError.message == 'Session with stale data') { MochiKit.Signal.signal(this, 'EXCEPTION'); } else { result = anError; } } -console.log("<<< Connection.messageExceptionHandler", anError) - +Clipperz.log("<<< Connection.messageExceptionHandler") + return result;; }, //========================================================================= 'reestablishConnection': function(anOriginalMessageArguments) { var deferredResult; deferredResult = new Clipperz.Async.Deferred("Connection.reestablishConnection"); deferredResult.addMethod(this, 'reset'); deferredResult.addMethod(this, 'login', true); deferredResult.addCallback(MochiKit.Base.bind(function(aMessage) { aMessage['srpSharedSecret'] = this.sharedSecret(); return aMessage; }, this), anOriginalMessageArguments); deferredResult.addMethod(this, 'sendMessage'); deferredResult.addErrback(MochiKit.Signal.signal, this, 'EXCEPTION', null); deferredResult.callback(); return deferredResult; }, //========================================================================= 'serverSideUserCredentials': function(aUsername, aPassword) { var result; var newSrpConnection; var normalizedAttributes; normalizedAttributes = this.normalizedCredentials({username:aUsername, password:aPassword}); newSrpConnection = new Clipperz.Crypto.SRP.Connection({ C:normalizedAttributes['username'], P:normalizedAttributes['password'], hash:this.hash() }); result = newSrpConnection.serverSideCredentials(); result['version'] = this.clipperz_pm_crypto_version(); return result; }, //========================================================================= 'normalizedCredentials': function(someValues) { var result; result = {} result['username'] = this.hash()(new Clipperz.ByteArray(someValues['username'])).toHexString().substring(2); result['password'] = this.hash()(new Clipperz.ByteArray(someValues['password'] + someValues['username'])).toHexString().substring(2); return result; }, //----------------------------------------------------------------------------- 'hash': function() { return Clipperz.PM.Crypto.encryptingFunctions.versions['0.1'].hash; }, //----------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); //----------------------------------------------------------------------------- // // S R P [ 1 . 1 ] C O N N E C T I O N class // //----------------------------------------------------------------------------- Clipperz.PM.Connection.SRP['1.1'] = function (args) { Clipperz.PM.Connection.SRP['1.0'].call(this, args); return this; } Clipperz.PM.Connection.SRP['1.1'].prototype = MochiKit.Base.update(new Clipperz.PM.Connection.SRP['1.0'](), { 'version': function() { return '1.1'; }, //----------------------------------------------------------------------------- 'normalizedCredentials': function(someValues) { var result; result = {} result['username'] = this.hash()(new Clipperz.ByteArray(someValues['username'] + someValues['password'])).toHexString().substring(2); result['password'] = this.hash()(new Clipperz.ByteArray(someValues['password'] + someValues['username'])).toHexString().substring(2); return result; }, //----------------------------------------------------------------------------- 'hash': function() { return Clipperz.PM.Crypto.encryptingFunctions.versions['0.2'].hash; diff --git a/frontend/gamma/js/Clipperz/PM/Crypto.js b/frontend/gamma/js/Clipperz/PM/Crypto.js index 31fe349..cd10e33 100644 --- a/frontend/gamma/js/Clipperz/PM/Crypto.js +++ b/frontend/gamma/js/Clipperz/PM/Crypto.js @@ -1,507 +1,505 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Crypto) == 'undefined') { Clipperz.PM.Crypto = {}; } Clipperz.PM.Crypto.VERSION = "0.2"; Clipperz.PM.Crypto.NAME = "Clipperz.PM.Crypto"; Clipperz.PM.Crypto.encryptingFunctions = {}; MochiKit.Base.update(Clipperz.PM.Crypto, { '__repr__': function () { return "[" + this.NAME + " " + this.VERSION + "]"; }, //------------------------------------------------------------------------- 'toString': function () { return this.__repr__(); }, //------------------------------------------------------------------------- /* 'communicationProtocol': { 'currentVersion': '0.2', 'versions': { '0.1': Clipperz.PM.Connection.SRP['1.0'], //Clipperz.Crypto.SRP.versions['1.0'].Connection, '0.2': Clipperz.PM.Connection.SRP['1.1'] //Clipperz.Crypto.SRP.versions['1.1'].Connection }, 'fallbackVersions': { 'current': '0.1', '0.2': '0.1', '0.1': null } }, */ //------------------------------------------------------------------------- 'encryptingFunctions': { 'currentVersion': '0.3', 'versions': { //##################################################################### '0.1': { 'encrypt': function(aKey, aValue) { return Clipperz.Crypto.Base.encryptUsingSecretKey(aKey, Clipperz.Base.serializeJSON(aValue)); }, 'deferredEncrypt': function(aKey, aValue) { var deferredResult; deferredResult = new Clipperz.Async.Deferred("Crypto[0.1].deferredEncrypt"); deferredResult.addCallback(Clipperz.PM.Crypto.encryptingFunctions.versions['0.1'].encrypt, aKey, aValue); deferredResult.callback(); return deferredResult; }, 'decrypt': function(aKey, aValue) { var result; if (aValue != null) { result = Clipperz.Base.evalJSON(Clipperz.Crypto.Base.decryptUsingSecretKey(aKey, aValue)); } else { result = null; } return result; }, 'deferredDecrypt': function(aKey, aValue) { var deferredResult; deferredResult = new Clipperz.Async.Deferred("Crypto.[0.1].deferredDecrypt"); deferredResult.addCallback(Clipperz.PM.Crypto.encryptingFunctions.versions['0.1'].decrypt, aKey, aValue); deferredResult.callback(); return deferredResult; }, 'hash': function(aValue) { var result; var strngResult; stringResult = Clipperz.Crypto.Base.computeHashValue(aValue.asString()); // !!!!!!! result = new Clipperz.ByteArray("0x" + stringResult); return result; }, 'deriveKey': function(aStringValue) { return Clipperz.Crypto.Base.computeHashValue(aStringValue); } }, //##################################################################### '0.2': { 'encrypt': function(aKey, aValue, aNonce) { var result; var key, value; var dataToEncrypt; var encryptedData; key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); value = new Clipperz.ByteArray(Clipperz.Base.serializeJSON(aValue)); dataToEncrypt = Clipperz.Crypto.SHA.sha_d256(value).appendBlock(value); encryptedData = Clipperz.Crypto.AES.encrypt(key, dataToEncrypt, aNonce); result = encryptedData.toBase64String(); return result; }, 'deferredEncrypt': function(aKey, aValue, aNonce) { var deferredResult; var key, value; var dataToEncrypt; // var encryptedData; key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); value = new Clipperz.ByteArray(Clipperz.Base.serializeJSON(aValue)); dataToEncrypt = Clipperz.Crypto.SHA.sha_d256(value).appendBlock(value); deferredResult = new Clipperz.Async.Deferred("Crypto[0.2].deferredEncrypt") deferredResult.addCallback(Clipperz.Crypto.AES.deferredEncrypt, key, dataToEncrypt, aNonce); deferredResult.addCallback(function(aResult) { return aResult.toBase64String(); }) deferredResult.callback(); return deferredResult; }, 'decrypt': function(aKey, aValue) { var result; if (aValue != null) { var key, value; var decryptedData; var decryptedValue; key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); value = new Clipperz.ByteArray().appendBase64String(aValue); decryptedData = Clipperz.Crypto.AES.decrypt(key, value); decryptedValue = decryptedData.split((256/8)); try { result = Clipperz.Base.evalJSON(decryptedValue.asString()); } catch (exception) { - MochiKit.Logging.logError("Error while decrypting data [1]"); + Clipperz.logError("Error while decrypting data [1]"); throw Clipperz.Crypto.Base.exception.CorruptedMessage; } } else { result = null; } return result; }, 'deferredDecrypt': function(aKey, aValue) { var result; if (aValue != null) { var deferredResult; var key, value; // var decryptedData; key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); value = new Clipperz.ByteArray().appendBase64String(aValue); deferredResult = new Clipperz.Async.Deferred("Crypto.[0.2].deferredDecrypt"); deferredResult.addCallback(Clipperz.Crypto.AES.deferredDecrypt, key, value); deferredResult.addCallback(function(aResult) { var result; var decryptedData; decryptedData = aResult.split((256/8)); try { result = Clipperz.Base.evalJSON(decryptedData.asString()); } catch (exception) { - MochiKit.Logging.logError("Error while decrypting data [2]"); + Clipperz.logError("Error while decrypting data [2]"); throw Clipperz.Crypto.Base.exception.CorruptedMessage; } return result; }) deferredResult.callback(); result = deferredResult; } else { result = MochiKit.Async.succeed(null); } return result; }, 'hash': Clipperz.Crypto.SHA.sha_d256, 'deriveKey': function(aStringValue) { var byteData; var result; byteData = new Clipperz.ByteArray(aStringValue); result = Clipperz.Crypto.SHA.sha_d256(byteData); return result; } }, //##################################################################### '0.3': { 'encrypt': function(aKey, aValue, aNonce) { var result; var key, value; var data; var dataToEncrypt; var encryptedData; key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); value = Clipperz.Base.serializeJSON(aValue); data = new Clipperz.ByteArray(value); encryptedData = Clipperz.Crypto.AES.encrypt(key, data, aNonce); result = encryptedData.toBase64String(); return result; }, 'deferredEncrypt': function(aKey, aValue, aNonce) { var deferredResult; var key, value; var data; var dataToEncrypt; var encryptedData; key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); value = Clipperz.Base.serializeJSON(aValue); data = new Clipperz.ByteArray(value); deferredResult = new Clipperz.Async.Deferred("Crypto[0.3].deferredEncrypt") deferredResult.addCallback(Clipperz.Crypto.AES.deferredEncrypt, key, data, aNonce); deferredResult.addCallback(function(aResult) { return aResult.toBase64String(); }) deferredResult.callback(); return deferredResult; }, 'decrypt': function(aKey, aValue) { var result; if (aValue != null) { var key, value; var decryptedData; key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); value = new Clipperz.ByteArray().appendBase64String(aValue); decryptedData = Clipperz.Crypto.AES.decrypt(key, value); value = decryptedData.asString(); try { result = Clipperz.Base.evalJSON(value); } catch (exception) { - MochiKit.Logging.logError("Error while decrypting data [3]"); + Clipperz.logError("Error while decrypting data [3]"); throw Clipperz.Crypto.Base.exception.CorruptedMessage; } } else { result = null; } return result; }, 'deferredDecrypt': function(aKey, aValue) { var deferredResult; deferredResult = new Clipperz.Async.Deferred("Crypto[0.3].deferredDecrypt", {trace: false}); // now = new Date; if (aValue != null) { var key, value; // var decryptedData; key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); value = new Clipperz.ByteArray().appendBase64String(aValue); deferredResult.addCallback(Clipperz.Crypto.AES.deferredDecrypt, key, value); deferredResult.addCallback(MochiKit.Async.wait, 0.1); deferredResult.addCallback(function(aResult) { return aResult.asString(); }); deferredResult.addCallback(MochiKit.Async.wait, 0.1); deferredResult.addCallback(Clipperz.Base.evalJSON); deferredResult.addErrback(function(anError) { - MochiKit.Logging.logError("Error while decrypting data [4]"); + Clipperz.logError("Error while decrypting data [4]"); throw Clipperz.Crypto.Base.exception.CorruptedMessage; }) } else { deferredResult.addCallback(function() { return null; }); } deferredResult.callback(); return deferredResult; }, 'hash': Clipperz.Crypto.SHA.sha_d256, 'deriveKey': function(aStringValue) { var byteData; var result; byteData = new Clipperz.ByteArray(aStringValue); result = Clipperz.Crypto.SHA.sha_d256(byteData); return result; } }, //##################################################################### /* '0.4': { 'encrypt': function(aKey, aValue, aNonce) { var result; var key, value; var data; var dataToEncrypt; var encryptedData; -//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt"); +//Clipperz.logDebug(">>> [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt"); key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); -//MochiKit.Logging.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 1"); +//Clipperz.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 1"); value = Clipperz.Base.serializeJSON(aValue); -//MochiKit.Logging.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 2"); +//Clipperz.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 2"); / * -//MochiKit.Logging.logDebug("--> encrypt.fullSize: " + value.length); +//Clipperz.logDebug("--> encrypt.fullSize: " + value.length); value = value.replace(/":{"label":"/g, '":{l:"'); value = value.replace(/":{"key":"/g, '":{k:"'); value = value.replace(/":{"notes":"/g, '":{n:"'); value = value.replace(/":{"record":"/g, '":{r:"'); value = value.replace(/", "label":"/g, '",l:"'); value = value.replace(/", "favicon":"/g, '",f:"'); -//MochiKit.Logging.logDebug("<-- encrypt.compressed: " + value.length); +//Clipperz.logDebug("<-- encrypt.compressed: " + value.length); * / data = new Clipperz.ByteArray(value); -//MochiKit.Logging.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 3"); +//Clipperz.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 3"); encryptedData = Clipperz.Crypto.AES.encrypt(key, data, aNonce); -//MochiKit.Logging.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 4"); +//Clipperz.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 4"); result = encryptedData.toBase64String(); -//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt"); +//Clipperz.logDebug("<<< [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt"); return result; }, 'decrypt': function(aKey, aValue) { var result; if (aValue != null) { var key, value; var decryptedData; key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); value = new Clipperz.ByteArray().appendBase64String(aValue); decryptedData = Clipperz.Crypto.AES.decrypt(key, value); value = decryptedData.asString(); / * value = value.replace(/":{l:"/g, '":{"label":"'); value = value.replace(/":{k:"/g, '":{"key":"'); value = value.replace(/":{n:"/g, '":{"notes":"'); value = value.replace(/":{r:"/g, '":{"record":"'); value = value.replace(/",l:"/g, '", "label":"'); value = value.replace(/",f:"/g, '", "favicon":"'); * / try { result = Clipperz.Base.evalJSON(value); } catch (exception) { - MochiKit.Logging.logError("Error while decrypting data"); + Clipperz.logError("Error while decrypting data"); throw Clipperz.Crypto.Base.exception.CorruptedMessage; } } else { result = null; } return result; }, 'hash': Clipperz.Crypto.SHA.sha_d256 }, */ //##################################################################### __syntaxFix__: "syntax fix" } }, //------------------------------------------------------------------------- 'encrypt': function(aKey, aValue, aVersion) { return Clipperz.PM.Crypto.encryptingFunctions.versions[aVersion].encrypt(aKey, aValue); }, 'deferredEncrypt': function(someParameters) { return Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters['version']].deferredEncrypt(someParameters['key'], someParameters['value']); }, //......................................................................... 'decrypt': function(aKey, aValue, aVersion) { return Clipperz.PM.Crypto.encryptingFunctions.versions[aVersion].decrypt(aKey, aValue); }, 'deferredDecrypt': function(someParameters) { return Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters['version']].deferredDecrypt(someParameters['key'], someParameters['value']); }, //------------------------------------------------------------------------- 'hash': function(aValue) { return Clipperz.PM.Crypto.encryptingFunctions.versions[Clipperz.PM.Crypto.encryptingFunctions.currentVersion]['hash'](aValue); }, //------------------------------------------------------------------------- 'randomKey': function() { return Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2); }, //------------------------------------------------------------------------- 'deriveKey': function(aValue) { return Clipperz.PM.Crypto.encryptingFunctions.versions[Clipperz.PM.Crypto.encryptingFunctions.currentVersion].deriveKey(aValue); }, //------------------------------------------------------------------------- 'passwordEntropy': function(aValue) { var result; var bitPerChar; bitPerChar = 4; if (/[a-z]/.test(aValue)) { bitPerChar ++; } if (/[A-Z]/.test(aValue)) { bitPerChar ++; } if (/[^a-zA-Z0-9]/.test(aValue)) { bitPerChar ++; } result = aValue.length * bitPerChar; return result; }, //------------------------------------------------------------------------- 'nullValue': '####', //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); //***************************************************************************** //MochiKit.Base.update(Clipperz.PM.Connection.communicationProtocol.versions, { // 'current': Clipperz.PM.Connection.communicationProtocol.versions[Clipperz.PM.Connection.communicationProtocol.currentVersion] //}); MochiKit.Base.update(Clipperz.PM.Crypto.encryptingFunctions.versions, { 'current': Clipperz.PM.Crypto.encryptingFunctions.versions[Clipperz.PM.Crypto.encryptingFunctions.currentVersion] diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js index 8f8696d..507ee31 100644 --- a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js +++ b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js @@ -1,118 +1,116 @@ /* -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.DataModel'); Clipperz.PM.DataModel.DirectLogin = function(args) { args = args || {}; Clipperz.PM.DataModel.DirectLogin.superclass.constructor.apply(this, arguments); this._reference = args.reference || Clipperz.PM.Crypto.randomKey(); this._record = args.record || Clipperz.Base.exception.raise('MandatoryParameter'); this._retrieveIndexDataFunction = args.retrieveIndexDataFunction || this.record().retrieveDirectLoginIndexDataFunction() || Clipperz.Base.exception.raise('MandatoryParameter'); this._setIndexDataFunction = args.setIndexDataFunction || this.record().setDirectLoginIndexDataFunction() || Clipperz.Base.exception.raise('MandatoryParameter'); this._removeIndexDataFunction = args.removeIndexDataFunction || this.record().removeDirectLoginIndexDataFunction() || Clipperz.Base.exception.raise('MandatoryParameter'); this._inputs = null; this._bindings = null; this._formValues = null; // this._inputsDeferredLock = new MochiKit.Async.DeferredLock(); // this._bindingsDeferredLock = new MochiKit.Async.DeferredLock(); // this._formValuesDeferredLock = new MochiKit.Async.DeferredLock(); this._transientState = null; this._isBrandNew = MochiKit.Base.isUndefinedOrNull(args.reference); this.record().addDirectLogin(this); return this; } Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, { 'toString': function() { return "DirectLogin (" + this.reference() + ")"; }, //========================================================================= 'reference': function () { return this._reference; }, //------------------------------------------------------------------------- 'record': function () { return this._record; }, //========================================================================= 'isBrandNew': function () { return this._isBrandNew; }, //========================================================================= 'removeIndexDataFunction': function () { return this._removeIndexDataFunction; }, 'remove': function () { return Clipperz.Async.callbacks("DirectLogin.remove", [ MochiKit.Base.partial(this.removeIndexDataFunction(), this.reference()), MochiKit.Base.method(this.record(), 'removeDirectLogin', this) ], {trace:false}); }, //========================================================================= /* 'inputsDeferredLock': function () { return this._inputsDeferredLock; }, 'bindingsDeferredLock': function () { return this._bindingsDeferredLock; }, 'formValuesDeferredLock': function () { return this._formValuesDeferredLock; }, */ //========================================================================= 'label': function () { @@ -236,550 +234,542 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, { 'serializedData': function () { return Clipperz.Async.collectResults("DirectLogin.serializedData", { 'bookmarkletVersion': MochiKit.Base.method(this, 'getValue', 'bookmarkletVersion'), 'formData': MochiKit.Base.method(this, 'getValue', 'formData'), 'formValues': MochiKit.Base.method(this, 'getValue', 'formValues'), 'bindingData': [ MochiKit.Base.method(this, 'bindings'), function (someBindings) { var result; var bindingKey; result = {} for (bindingKey in someBindings) { result[bindingKey] = someBindings[bindingKey].serializedData(); } return result; } ] }, {trace:false})() }, //========================================================================= /* 'fixFormDataFromBookmarkletVersion_0_1': function(aValue) { //{"type":"radio", "name":"action", "value":"new-user", "checked":false }, { "type":"radio", "name":"action", "value":"sign-in", "checked":true } // || // \ / // \/ //{"name":"dominio", "type":"radio", "options":[{"value":"@alice.it", "checked":true}, {"value":"@tin.it", "checked":false}, {"value":"@virgilio.it", "checked":false}, {"value":"@tim.it", "checked":false}]} var result; var inputs; var updatedInputs; var radios; result = aValue; inputs = aValue['inputs']; updatedInputs = MochiKit.Base.filter(function(anInput) { var result; var type; type = anInput['type'] || 'text'; result = type.toLowerCase() != 'radio'; return result; }, inputs); radios = MochiKit.Base.filter(function(anInput) { var result; var type; type = anInput['type'] || 'text'; result = type.toLowerCase() == 'radio'; return result; }, inputs); if (radios.length > 0) { var updatedRadios; updatedRadios = {}; MochiKit.Iter.forEach(radios, MochiKit.Base.bind(function(aRadio) { var radioConfiguration; radioConfiguration = updatedRadios[aRadio['name']]; if (radioConfiguration == null) { radioConfiguration = {type:'radio', name:aRadio['name'], options:[]}; updatedRadios[aRadio['name']] = radioConfiguration; } // TODO: remove the value: field and replace it with element.dom.value = <some value> radioConfiguration.options.push({value:aRadio['value'], checked:aRadio['checked']}); // TODO: shoud remove the 'formValues' call, as it is now deferred // if ((aRadio['checked'] == true) && (this.formValues()[aRadio['name']] == null)) { // this.formValues()[aRadio['name']] = aRadio['value']; // } }, this)) updatedInputs = MochiKit.Base.concat(updatedInputs, MochiKit.Base.values(updatedRadios)); } delete result.inputs; result.inputs = updatedInputs; return result; }, '_fixConfiguration': function (aConfiguration) { var fixedConfiguration; // var inputs; // var bindings; // var i,c; fixedConfiguration = Clipperz.Base.deepClone(aConfiguration); -//console.log("PROCESS CONFIGURATION", aConfiguration); +//Clipperz.log("PROCESS CONFIGURATION", aConfiguration); switch (aConfiguration['bookmarkletVersion']) { case '0.1': fixedConfiguration['formData'] = this.fixFormDataFromBookmarkletVersion_0_1(aConfiguration['formData']); break; case '0.2': fixedConfiguration['formData'] = aConfiguration['formData']; break; } / * aConfiguration['_inputs'] = []; c = formData['inputs'].length; for (i=0; i<c; i++) { aConfiguration['_inputs'].push(new Clipperz.PM.DataModel.DirectLoginInput(formData['inputs'][i])); } * / / * aConfiguration['_bindings'] = {}; if (aConfiguration['legacyBindingData'] == null) { if (aConfiguration['bindingData'] != null) { var bindingKey; for (bindingKey in aConfiguration['bindingData']) { var newBinding; newBinding = new Clipperz.PM.DataModel.DirectLoginBinding(bindingKey, {fieldKey:aConfiguration['bindingData'][bindingKey]}); aConfiguration['_bindings'][newBinding.key()] = newBinding; } } else { var editableFields; editableFields = MochiKit.Base.filter(function(aField) { var result; var type; type = aField['type'].toLowerCase(); result = ((type != 'hidden') && (type != 'submit') && (type != 'checkbox') && (type != 'radio') && (type != 'select')); return result; }, aConfiguration['_inputs']); MochiKit.Iter.forEach(editableFields, MochiKit.Base.bind(function(anEditableField) { var newBinding; newBinding = new Clipperz.PM.DataModel.DirectLoginBinding(anEditableField['name']); aConfiguration['_bindings'][newBinding.key()] = newBinding; }, this)); } } else { var bindingKey; for (bindingKey in aConfiguration['legacyBindingData']) { var newBinding; newBinding = new Clipperz.PM.DataModel.DirectLoginBinding(bindingKey, {fieldName:aConfiguration['legacyBindingData'][bindingKey]}); aConfiguration['_bindings'][newBinding.key()] = newBinding; } } * / return fixedConfiguration; }, //------------------------------------------------------------------------- 'getObjectDataStore': function () { var deferredResult; deferredResult = new Clipperz.Async.Deferred("DirectLogin.getObjectDataStore", {trace:false}); deferredResult.acquireLock(this.objectDataStoreDeferredLock()); deferredResult.addCallback(MochiKit.Base.bind(function () { var innerDeferredResult; if (this._objectDataStore == null) { this._objectDataStore = new Clipperz.KeyValueObjectStore(); innerDeferredResult = new Clipperz.Async.Deferred("DirectLogin.getObjectDataStore <inner deferred>", {trace:false}); // innerDeferredResult.addMethod(this.record(), 'getValue', 'directLogins' + '.' + this.reference()); innerDeferredResult.addMethod(this, 'getValue', ''), innerDeferredResult.addMethod(this, 'setOriginalState'); innerDeferredResult.addMethod(this, '_fixConfiguration'); innerDeferredResult.addMethod(this._objectDataStore, 'initWithValues'); // innerDeferredResult.addMethod(this._objectDataStore, 'setValues'); innerDeferredResult.callback(); } else { innerDeferredResult = MochiKit.Async.succeed(this._objectDataStore); } return innerDeferredResult; }, this)); deferredResult.releaseLock(this.objectDataStoreDeferredLock()); deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'hasInitiatedObjectDataStore': function () { return (this._objectDataStore != null); }, //------------------------------------------------------------------------- 'resetObjectDataStore': function () { this._objectDataStore.removeAllData(); this._objectDataStore = null; }, */ //========================================================================= 'bookmarkletConfiguration': function () { return Clipperz.Async.callbacks("DirectLogin.bookmarkletConfiguration", [ Clipperz.Async.collectResults("DirectLogin.bookmarkletConfiguration <inner results>", { 'label': MochiKit.Base.method(this, 'label'), 'configuration': MochiKit.Base.method(this, 'getValue', '') }, {trace:false}), function (someValues) { var result; if (someValues['configuration'] != null) { var configuration; configuration = { 'page': { 'title': someValues['label'] // 'favicon' // 'url' }, 'form': someValues['configuration']['formData'], 'version': someValues['configuration']['bookmarkletVersion'] } result = Clipperz.Base.formatJSON(configuration); } else { result = ''; } return result; } ], {trace:false}); }, //------------------------------------------------------------------------- 'setBookmarkletConfiguration': function (aValue) { var bookmarkletConfiguration; bookmarkletConfiguration = Clipperz.PM.DataModel.DirectLogin.checkBookmarkletConfiguration(aValue); -//console.log("BOOKMARKLET CONFIGURATION", bookmarkletConfiguration); + return Clipperz.Async.callbacks("DirectLogin.setBookmarkletConfiguration", [ MochiKit.Base.method(this, 'setValue', 'formData', bookmarkletConfiguration['form']), -//function (aValue) { console.log("SET VALUE - formData", aValue); return aValue; }, MochiKit.Base.method(this, 'setValue', 'bookmarkletVersion', bookmarkletConfiguration['version']), MochiKit.Base.method(this, 'favicon'), Clipperz.Async.deferredIf("the favicon is not set", [ ], [ MochiKit.Base.method(this, 'faviconUrlWithBookmarkletConfiguration', bookmarkletConfiguration), MochiKit.Base.method(this, 'setFavicon') ]), MochiKit.Base.method(this, 'updateInputsAfterChangingBookmarkletConfiguration'), MochiKit.Base.method(this, 'updateFormValuesAfterChangingBookmarkletConfiguration'), MochiKit.Base.method(this, 'updateBindingsAfterChangingBookmarkletConfiguration'), MochiKit.Base.noop ], {trace:false}); }, //========================================================================= 'formAttributes': function () { return this.getValue('formData.attributes'); }, //========================================================================= 'inputs': function () { return Clipperz.Async.callbacks("DirectLogin.inputs", [ Clipperz.Async.deferredIf("this._inputs is defined", [ ], [ MochiKit.Base.method(this, 'updateInputsAfterChangingBookmarkletConfiguration') ]) ], {trace:false}, this._inputs); }, 'setInputWithFormDataConfiguration': function (aFormDataConfiguration) { this._inputs = {}; if (aFormDataConfiguration != null) { MochiKit.Iter.forEach(aFormDataConfiguration['inputs'], MochiKit.Base.bind(function (anInputData) { var newInput; newInput = new Clipperz.PM.DataModel.DirectLoginInput(anInputData); this._inputs[newInput.name()] = newInput; }, this)); } return this._inputs; }, 'updateInputsAfterChangingBookmarkletConfiguration': function () { return Clipperz.Async.callbacks("DirectLogin.updateInputsAfterChangingBookmarkletConfiguration", [ -// MochiKit.Base.method(this, 'getValue', ''), -//function (aValue) { console.log("VALUE", aValue); return aValue }, MochiKit.Base.method(this, 'getValue', 'formData'), -//function (aValue) { console.log("FORM DATA", aValue); return aValue }, MochiKit.Base.method(this, 'setInputWithFormDataConfiguration') ], {trace:false}); }, //========================================================================= 'inputValues': function () { return Clipperz.Async.callbacks("DirectLogin.inputValues", [ MochiKit.Base.method(this, 'inputs'), MochiKit.Base.values, -//function (aValue) { console.log("INPUTS", aValue); return aValue; }, MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.partial(MochiKit.Base.method(this, 'inputValue'))), Clipperz.Async.collectAll, Clipperz.Base.mergeItems ], {trace:false}); }, 'inputValue': function (anInput) { var deferredResult; deferredResult = new Clipperz.Async.Deferred("DirectLogin.inputValue", {trace:false}); if (anInput.needsFormValue()) { deferredResult.addMethod(this, 'formValues'); deferredResult.addCallback(MochiKit.Base.itemgetter(anInput.name())); deferredResult.addMethodcaller('value'); } else if (anInput.needsBinding()) { deferredResult.addMethod(this, 'bindings'); deferredResult.addCallback(MochiKit.Base.itemgetter(anInput.name())); deferredResult.addMethodcaller('field'); deferredResult.addMethodcaller('value'); } else { deferredResult.addCallback(MochiKit.Async.succeed, anInput.value()); } deferredResult.addCallback(function (anActualValue) { return [anInput.name(), anActualValue]; }); deferredResult.callback(); return deferredResult; }, //========================================================================= 'bindings': function () { return Clipperz.Async.callbacks("DirectLogin.bindings", [ Clipperz.Async.deferredIf("this._bindings is defined", [ ], [ MochiKit.Base.method(this, 'updateBindingsAfterChangingBookmarkletConfiguration'), MochiKit.Base.bind(function () { return this._bindings;}, this) ]) ], {trace:false}, this._bindings); }, 'bindFormFieldWithLabelToRecordFieldWithLabel': function (aFormFieldLabel, aRecordFieldLabel) { return Clipperz.Async.callbacks("DirectLogin.bindFormFieldWithLabelToCardFieldWithLabel", [ Clipperz.Async.collectResults("DirectLogin.bindFormFieldWithLabelToCardFieldWithLabel - collect results", { 'binding': [ MochiKit.Base.method(this, 'bindings'), MochiKit.Base.itemgetter(aFormFieldLabel) ], 'field': [ MochiKit.Base.method(this.record(), 'fieldWithLabel', aRecordFieldLabel) ] }), function (someValues) { someValues['binding'].setField(someValues['field']) } ], {trace:false}); }, //------------------------------------------------------------------------- /* 'bindingValues': function () { return Clipperz.Async.callbacks("DirectLogin.bindingValues", [ Clipperz.Async.collectResults("DirectLogin.bindingValues [collectResults]", { 'fieldValues': [ MochiKit.Base.method(this, 'record'), MochiKit.Base.methodcaller('getFieldsValues') ], 'bindings': MochiKit.Base.method(this, 'bindings') }, {trace:false}), function (someData) { var result; var bindingKey; result = {}; for (bindingKey in someData['bindings']) { result[bindingKey] = someData['fieldValues'][someData['bindings'][bindingKey].fieldKey()]['value']; } return result; } ], {trace:false}); }, */ //------------------------------------------------------------------------- 'updateBindingsAfterChangingBookmarkletConfiguration': function () { return Clipperz.Async.callbacks("DirectLogin.updateBindingsAfterChangingBookmarkletConfiguration", [ Clipperz.Async.collectResults("DirectLogin.updateBindingsAfterChangingBookmarkletConfiguration<collect results>", { 'currentValues': MochiKit.Base.method(this, 'getValue', ''), 'originalValues': MochiKit.Base.method(this, 'originalConfiguration'), 'inputs': MochiKit.Base.method(this, 'inputs') }, {trace:false}), MochiKit.Base.bind(function (someValues) { var availableBindingValues; var inputRequiringBindingValues; var newBindingValues; if (MochiKit.Base.isUndefinedOrNull(someValues['originalValues']) || MochiKit.Base.isUndefinedOrNull(someValues['originalValues']['bindingData'])) { availableBindingValues = {}; } else { availableBindingValues = Clipperz.Base.deepClone(someValues['originalValues']['bindingData']) } if (someValues['currentValues'] != null) { MochiKit.Base.update(availableBindingValues, someValues['currentValues']['bindingData']); } this._bindings = {}; newBindingValues = {} MochiKit.Iter.forEach(MochiKit.Base.filter(MochiKit.Base.methodcaller('needsBinding'), MochiKit.Base.values(someValues['inputs'])), MochiKit.Base.bind(function (anInput) { var newBinding; newBindingValues[anInput.name()] = availableBindingValues[anInput.name()]; newBinding = new Clipperz.PM.DataModel.DirectLoginBinding(this, { 'key': anInput.name(), 'field': availableBindingValues[anInput.name()] }); this._bindings[anInput.name()] = newBinding; }, this)) -//console.log("THIS._BINDINGS", this._bindings); return newBindingValues; /* this._bindings = {}; -//console.log("CONFIGURATION", aConfiguration); if (someValues['currentValues'] != null) { if (someValues['currentValues']['bindingData'] != null) { var bindingKey; -//console.log("BINDING DATA", someValues['currentValues']['bindingData']); for (bindingKey in someValues['currentValues']['bindingData']) { var newBinding; newBinding = new Clipperz.PM.DataModel.DirectLoginBinding(this, { 'key': bindingKey, 'field': someValues['currentValues']['bindingData'][bindingKey] }); this._bindings[newBinding.key()] = newBinding; } } else if (someValues['currentValues']['legacyBindingData'] == null) { var bindingKey; for (bindingKey in someValues['currentValues']['legacyBindingData']) { var newBinding; newBinding = new Clipperz.PM.DataModel.DirectLoginBinding(this, { 'key': bindingKey, 'field': someValues['currentValues']['legacyBindingData'][bindingKey] }); this._bindings[newBinding.key()] = newBinding; } } else { WTF = TODO; } } return this._bindings; */ }, this), MochiKit.Base.method(this, 'setValue', 'bindingData') ], {trace:false}); }, //========================================================================= 'formValues': function () { return Clipperz.Async.callbacks("DirectLogin.formValues", [ Clipperz.Async.deferredIf("this._formValues is defined", [ ], [ MochiKit.Base.method(this, 'updateFormValuesAfterChangingBookmarkletConfiguration'), MochiKit.Base.bind(function () { return this._formValues;}, this) ]) ], {trace:false}, this._formValues); }, //------------------------------------------------------------------------- 'updateFormValuesAfterChangingBookmarkletConfiguration': function () { return Clipperz.Async.callbacks("DirectLogin.updateFormValuesAfterChangingBookmarkletConfiguration", [ Clipperz.Async.collectResults("DirectLogin.updateFormValuesAfterChangingBookmarkletConfiguration <collect results>", { 'currentValues': MochiKit.Base.method(this, 'getValue', ''), 'originalValues': MochiKit.Base.method(this, 'originalConfiguration'), 'inputs': MochiKit.Base.method(this, 'inputs') }, {trace:false}), MochiKit.Base.bind(function (someValues) { var availableFormValues; var inputRequiringFormValues; var newFormValues; if (MochiKit.Base.isUndefinedOrNull(someValues['originalValues']) || MochiKit.Base.isUndefinedOrNull(someValues['originalValues']['formValues'])) { availableFormValues = {}; } else { availableFormValues = Clipperz.Base.deepClone(someValues['originalValues']['formValues']) } MochiKit.Base.update(availableFormValues, someValues['currentValues']['formValues']); this._formValues = {}; newFormValues = {}; MochiKit.Iter.forEach(MochiKit.Base.filter(MochiKit.Base.methodcaller('needsFormValue'), MochiKit.Base.values(someValues['inputs'])), MochiKit.Base.bind(function (anInput) { var newFormValue; var fieldOptions; fieldOptions = { 'type': anInput.type(), 'options': anInput.options() }; newFormValues[anInput.name()] = availableFormValues[anInput.name()] newFormValue = new Clipperz.PM.DataModel.DirectLoginFormValue(this, { 'key': anInput.name(), 'fieldOptions': fieldOptions, 'value': availableFormValues[anInput.name()] }); this._formValues[anInput.name()] = newFormValue; }, this)) return newFormValues; }, this), MochiKit.Base.method(this, 'setValue', 'formValues') ], {trace:false}); }, //========================================================================= diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginBinding.js b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginBinding.js index 4377853..a8ebb97 100644 --- a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginBinding.js +++ b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginBinding.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } //############################################################################# Clipperz.PM.DataModel.DirectLoginBinding = function(aDirectLogin, args) { args = args || {}; this._directLogin = aDirectLogin|| Clipperz.Base.exception.raise('MandatoryParameter'); this._key = args.key || Clipperz.Base.exception.raise('MandatoryParameter'); this._fieldKey = args.field || /* this.directLogin().fieldWithName(args.fieldName).reference() || */ null; return this; } Clipperz.PM.DataModel.DirectLoginBinding.prototype = MochiKit.Base.update(null, { 'toString': function() { return "DirectLoginBinding (" + this.key() + ", " + this.fieldKey() + ")"; }, //------------------------------------------------------------------------- 'directLogin': function () { return this._directLogin; }, //------------------------------------------------------------------------- 'key': function() { return this._key; }, //------------------------------------------------------------------------- 'fieldKey': function() { return this._fieldKey; }, 'setFieldKey': function(aValue) { this._fieldKey = aValue; return this.directLogin().setValue('bindingData' + '.' + this.key(), aValue); }, // 'fieldName': function() { // return this._fieldName; // }, //------------------------------------------------------------------------- 'field': function() { var deferredResult; if (this.fieldKey() != null) { deferredResult = Clipperz.Async.callbacks("DirectLoginBinding.field [1]", [ MochiKit.Base.method(this.directLogin().record(), 'fields'), MochiKit.Base.itemgetter(this.fieldKey()) ], {trace:false}); // } else if (this.fieldName() != null) { // WTF = TODO; // result = this.directLogin().record().fieldWithName(this.fieldName()); // // this.setFieldKey(result.key()); } else { deferredResult = MochiKit.Async.succeed(null); } return deferredResult; }, 'setField': function (aField) { this.setFieldKey(aField.reference()); }, //------------------------------------------------------------------------- /* 'fieldValue': function () { return Clipperz.Async.callbacks("DirectLoginBinding.fieldValue", [ MochiKit.Base.method('field'), MochiKit.Base.methodcaller('value') ], {trace:false}); }, */ //------------------------------------------------------------------------- 'serializedData': function() { return this.fieldKey(); }, diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginFormValue.js b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginFormValue.js index a461197..2429f88 100644 --- a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginFormValue.js +++ b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginFormValue.js @@ -1,104 +1,101 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } //############################################################################# Clipperz.PM.DataModel.DirectLoginFormValue = function(aDirectLogin, args) { args = args || {}; this._directLogin = aDirectLogin|| Clipperz.Base.exception.raise('MandatoryParameter'); this._key = args.key || Clipperz.Base.exception.raise('MandatoryParameter'); this._fieldOptions = args.fieldOptions || Clipperz.Base.exception.raise('MandatoryParameter'); this._value = args.value || null; return this; } Clipperz.PM.DataModel.DirectLoginFormValue.prototype = MochiKit.Base.update(null, { 'toString': function() { return "DirectLoginFormValue (" + this.key() + ", " + this.value() + ")"; }, //------------------------------------------------------------------------- 'directLogin': function () { return this._directLogin; }, //------------------------------------------------------------------------- 'key': function() { return this._key; }, //------------------------------------------------------------------------- 'fieldOptions': function() { return this._fieldOptions; }, //------------------------------------------------------------------------- 'type': function () { return this.fieldOptions()['type']; }, //------------------------------------------------------------------------- 'value': function() { var result; result = this._value; // if ((result == null) && (this.type() == 'checkbox')) { // result = false; // }; return result; }, 'setValue': function (aValue) { -//console.log("DirectLoginFormValue.setValue", aValue); this._value = aValue; return this.directLogin().setValue('formValues' + '.' + this.key(), aValue); }, //------------------------------------------------------------------------- /* 'serializedData': function() { return this.value(); }, */ //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginInput.js b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginInput.js index 8188389..d9995fc 100644 --- a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginInput.js +++ b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginInput.js @@ -1,200 +1,192 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } //############################################################################# Clipperz.PM.DataModel.DirectLoginInput = function(args) { this._args = args; return this; } Clipperz.PM.DataModel.DirectLoginInput.prototype = MochiKit.Base.update(null, { 'args': function() { return this._args; }, //------------------------------------------------------------------------- 'name': function() { return this.args()['name']; }, //------------------------------------------------------------------------- 'type': function() { var result; result = this.args()['type']; if (result != null) { result = result.toLowerCase(); } return result; }, //------------------------------------------------------------------------- 'options': function() { return this.args()['options']; }, //------------------------------------------------------------------------- 'value': function() { return this.args()['value']; }, //------------------------------------------------------------------------- /* 'formConfiguration': function(someFormValues, someBindings, someFields) { var result; -//console.log("### DirectLoginInput.formConfiguration", someFields); + if (this.shouldSetValue()) { switch (this.type()) { case 'select': var currentValue; var options; // currentValue = this.directLogin()._configuration['formValues'][this.name()]; currentValue = someFormValues[this.name()]; options = this.args()['options']; result = MochiKit.DOM.SELECT({name:this.name()}, MochiKit.Base.map(function(anOption) { var options; options = {value:anOption['value']}; if (currentValue == anOption['value']) { options.selected = true; } return MochiKit.DOM.OPTION(options, anOption['label']) }, options) ) break; case 'checkbox': var options; options = {type:'checkbox', name: this.name()}; // if (this.directLogin()._configuration['formValues'][this.name()] == true) { if (someFormValues[this.name()] == true) { options['checked'] = true; }; result = MochiKit.DOM.INPUT(options, null); break; case 'radio': var currentName; var currentValue; var options; currentName = this.name(); // currentValue = this.directLogin()._configuration['formValues'][this.name()]; currentValue = someFormValues[this.name()]; options = this.args()['options']; result = MochiKit.DOM.DIV(null, MochiKit.Base.map(function(anOption) { var options; var isChecked; var inputNode; var divNode; options = {type:'radio', name:currentName, value:anOption['value']} isChecked = (currentValue == anOption['value']); if (isChecked) { options.checked = true; } if (Clipperz_IEisBroken == true) { var checkedValue; checkedValue = (isChecked ? " CHECKED" : ""); inputNode = MochiKit.DOM.currentDocument().createElement("<INPUT TYPE='RADIO' NAME='" + currentName + "' VALUE='" + anOption['value'] + "'" + checkedValue + ">"); } else { inputNode = MochiKit.DOM.INPUT(options, anOption['value']); } divNode = MochiKit.DOM.DIV(null, inputNode); return divNode; }, options) ); break; } } else { var binding; // binding = this.directLogin().bindings()[this.name()]; binding = someBindings[this.name()]; -//console.log("### binding", binding); -//if (binding != null) { -/// console.log(" binding.field()", binding.field()); -/// console.log(" binding.field().value()", binding.field().value()); -// console.log(" someFields[binding.fieldKey()].value()", someFields[binding.fieldKey()].value()); -//} result = MochiKit.DOM.INPUT({ type:((this.type() != 'password') ? this.type() : 'text'), name:this.name(), // value:((binding != null)? binding.field().value() : this.value()) value:((binding != null)? someFields[binding.fieldKey()]['value'] : this.value()) // value:((binding != null)? someFields[binding.fieldKey()].value() : this.value()) }, null); } return result; }, */ //------------------------------------------------------------------------- 'needsFormValue': function() { var type; var result; type = this.type(); result = ((type == 'checkbox') || (type == 'radio') || (type == 'select')); return result; }, 'needsBinding': function() { var type; var result; type = this.type(); result = ((type == 'text') || (type == 'password')); return result; }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/EncryptedRemoteObject.js b/frontend/gamma/js/Clipperz/PM/DataModel/EncryptedRemoteObject.js index cdeec8b..1aa7a52 100644 --- a/frontend/gamma/js/Clipperz/PM/DataModel/EncryptedRemoteObject.js +++ b/frontend/gamma/js/Clipperz/PM/DataModel/EncryptedRemoteObject.js @@ -1,118 +1,116 @@ /* -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/. */ try { if (typeof(Clipperz.KeyValueObjectStore) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.PM.DataModel.EncryptedRemoteObject depends on Clipperz.KeyValueObjectStore!"; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } Clipperz.PM.DataModel.EncryptedRemoteObject = function(args) { args = args || {}; this._name = args.name || null; this._reference = args.reference || Clipperz.PM.Crypto.randomKey(); this._isBrandNew = ((args.reference == null) && (args.remoteData == null)); if ((this._isBrandNew == false) && (args['retrieveKeyFunction'] == null)) { Clipperz.Base.exception.raise('MandatoryParameter'); } else { this._retrieveKeyFunction = args['retrieveKeyFunction']; } this._retrieveRemoteDataFunction = args.retrieveRemoteDataFunction || null; this._remoteData = args.remoteData || null; // this._remoteData = args.remoteData ? Clipperz.Base.deepClone(args.remoteData) : null; if ((!this._isBrandNew) && ((this._retrieveRemoteDataFunction == null) && (this._remoteData == null))) { Clipperz.Base.exception.raise('MandatoryParameter'); } this._encryptedDataKeypath = args.encryptedDataKeypath || 'data'; //Clipperz.Base.exception.raise('MandatoryParameter'); this._encryptedVersionKeypath = args.encryptedVersionKeypath || 'version'; //Clipperz.Base.exception.raise('MandatoryParameter'); this._transientState = null; this._deferredLocks = {}; if (this._isBrandNew == true) { this._objectDataStore = new Clipperz.KeyValueObjectStore(/*{'name':'EncryptedRemoteObject.objectDataStore [1]'}*/); } else { this._objectDataStore = null; } return this; } // // Basic data workflow // ======================= // // getRemoteData // unpackRemoteData // getDecryptData [encryptedDataKeypath, encryptedVersionKeypath] // unpackData // // // ?? packData // ?? encryptDataWithKey // ?? packRemoteData [encryptedDataKeypath (?), encryptedVersionKeypath (?)] // Clipperz.PM.DataModel.EncryptedRemoteObject.prototype = MochiKit.Base.update(null, { 'toString': function () { return "Clipperz.PM.DataModel.EncryptedRemoteObject" + (this.name() != null ? " - " + this.name() : ""); }, //------------------------------------------------------------------------- 'name': function () { return this._name; }, //------------------------------------------------------------------------- 'reference': function () { return this._reference; }, 'setReference': function (aValue) { this._reference = aValue; return this._reference; }, //------------------------------------------------------------------------- 'transientState': function () { if (this._transientState == null) { this._transientState = new Clipperz.KeyValueObjectStore(/*{'name':'EncryptedRemoteObject.transientState [2]'}*/); } return this._transientState; }, @@ -318,196 +316,192 @@ Clipperz.PM.DataModel.EncryptedRemoteObject.prototype = MochiKit.Base.update(nul MochiKit.Base.method(this, '_getObjectDataStore'), MochiKit.Base.methodcaller('values') ], {trace:false}); }, 'setValues': function (someValues) { return Clipperz.Async.callbacks("EncryptedRemoteObject.values", [ MochiKit.Base.method(this, '_getObjectDataStore'), MochiKit.Base.methodcaller('setValues', someValues) ], {trace:false}); }, //......................................................................... '_getObjectDataStore': function () { var deferredResult; var deferredLock; deferredLock = this.getDeferredLockForKey('objectDataStore'); deferredResult = new Clipperz.Async.Deferred("EncryptedRemoteObject._getObjectDataStore", {trace:false}); deferredResult.acquireLock(deferredLock); deferredResult.addCallback(MochiKit.Base.bind(function () { var innerDeferredResult; if (this._objectDataStore == null) { this._objectDataStore = new Clipperz.KeyValueObjectStore(/*{'name':'EncryptedRemoteObject.objectDataStore [4]'}*/); innerDeferredResult = new Clipperz.Async.Deferred("EncryptedRemoteObject._getObjectDataStore <inner deferred>", {trace:false}); innerDeferredResult.addMethod(this, 'getDecryptedData'); innerDeferredResult.addMethod(this._objectDataStore, 'initWithValues'); innerDeferredResult.callback(); } else { innerDeferredResult = MochiKit.Async.succeed(this._objectDataStore); } return innerDeferredResult; }, this)); deferredResult.releaseLock(deferredLock); deferredResult.callback(); return deferredResult; }, 'hasInitiatedObjectDataStore': function () { return (this._objectDataStore != null); }, //------------------------------------------------------------------------- 'getDeferredLockForKey': function (aKey) { var result; result = this._deferredLocks[aKey]; if (typeof(result) == 'undefined') { result = new MochiKit.Async.DeferredLock(); this._deferredLocks[aKey] = result; } return result; }, //------------------------------------------------------------------------- 'unpackData': function (someData) { // ++ return someData; }, 'packData': function (someData) { // ++ return someData; }, //------------------------------------------------------------------------- 'hasPendingChanges': function () { var deferredResult; var tempObj = this; if (this.isBrandNew()) { // deferredResult = MochiKit.Async.succeed(true); deferredResult = this.hasPendingChangesWhenBrandNew(); } else if (this.hasInitiatedObjectDataStore()) { deferredResult = new Clipperz.Async.Deferred("EncryptedRemoteObject.hasPendingChanges", {trace:false}); deferredResult.collectResults({ 'decryptedData': [ MochiKit.Base.method(this, 'getDecryptedData'), Clipperz.Base.serializeJSON ], 'objectData': [ MochiKit.Base.method(this, '_getObjectDataStore'), MochiKit.Base.methodcaller('values'), Clipperz.Base.serializeJSON ] }); deferredResult.addCallback(function (someValues) { -//if (someValues['decryptedData'] != someValues['objectData']) { -// console.log("ORIGINAL DATA", '[[[' + someValues['decryptedData'] + ']]]'); -// console.log("CURRENT DATA", '>>>' + someValues['objectData'] + '<<<'); -//} return (someValues['decryptedData'] != someValues['objectData']); }); deferredResult.callback(); } else { deferredResult = MochiKit.Async.succeed(false); } return deferredResult; }, 'hasPendingChangesWhenBrandNew': function () { return MochiKit.Async.succeed(true); }, //------------------------------------------------------------------------- 'commitTransientState': function () { var deferredResult; // if (this.transientState().getValue('__prepareRemoteData') == true) { if (this.transientState().getValue('packedRemoteData') != null) { deferredResult = Clipperz.Async.callbacks("EncryptedRemoteObject.commitTransientState - prepareRemoteData", [ MochiKit.Base.bind(function (someData) { this._remoteData = this.transientState().getValue('packedRemoteData'); }, this), MochiKit.Base.method(this, '_getObjectDataStore'), MochiKit.Base.methodcaller('values'), Clipperz.Base.deepClone, MochiKit.Base.method(this.decryptedDataStore(), 'setValue', 'decryptedData'), MochiKit.Base.method(this, 'resetTransientState', true) ], {trace:false}); } else { deferredResult = Clipperz.Async.callbacks("EncryptedRemoteObject.commitTransientState - NO prepareRemoteData", [ MochiKit.Base.method(this, 'resetTransientState', true) ], {trace:false}); } this._isBrandNew = false; return deferredResult; }, //------------------------------------------------------------------------- 'revertChanges': function () { if (this.hasInitiatedObjectDataStore()) { this._objectDataStore.removeAllData(); this._objectDataStore = null; } this.resetTransientState(false); return MochiKit.Async.succeed(); }, //------------------------------------------------------------------------- 'deleteAllCleanTextData': function () { var deferredResult; deferredResult = new Clipperz.Async.Deferred("EncryptedRemoteObject.deleteAllCleanTextData", {trace:false}); deferredResult.addMethod(this, 'resetTransientState', false); deferredResult.acquireLock(this.getDeferredLockForKey('decryptedData')); deferredResult.addCallback(MochiKit.Base.bind(function () { if (this._decryptedDataStore != null) { this._decryptedDataStore.removeAllData(); } }, this)); deferredResult.releaseLock(this.getDeferredLockForKey('decryptedData')); deferredResult.acquireLock(this.getDeferredLockForKey('objectDataStore')); deferredResult.addCallback(MochiKit.Base.bind(function () { if (this._objectDataStore != null) { this._objectDataStore.removeAllData(); this._objectDataStore = null; } }, this)); deferredResult.releaseLock(this.getDeferredLockForKey('objectDataStore')); deferredResult.callback(); return deferredResult; }, //......................................................................... 'hasAnyCleanTextData': function () { var result; result = false; result = result || (! this.decryptedDataStore().isEmpty()); diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/OneTimePassword.js b/frontend/gamma/js/Clipperz/PM/DataModel/OneTimePassword.js index 834e21b..fbca1ff 100644 --- a/frontend/gamma/js/Clipperz/PM/DataModel/OneTimePassword.js +++ b/frontend/gamma/js/Clipperz/PM/DataModel/OneTimePassword.js @@ -1,354 +1,350 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } //############################################################################# Clipperz.PM.DataModel.OneTimePassword = function(args) { args = args || {}; // this._user = args['user']; this._reference = args['reference'] || Clipperz.PM.Crypto.randomKey(); this._password = args['password']; this._passwordValue = Clipperz.PM.DataModel.OneTimePassword.normalizedOneTimePassword(args['password']); this._creationDate = args['created'] ? Clipperz.PM.Date.parseDateWithUTCFormat(args['created']) : new Date(); this._usageDate = args['used'] ? Clipperz.PM.Date.parseDateWithUTCFormat(args['used']) : null; this._status = args['status'] || 'ACTIVE'; // 'REQUESTED', 'USED', 'DISABLED' this._connectionInfo= null; this._key = null; this._keyChecksum = null; return this; } Clipperz.PM.DataModel.OneTimePassword.prototype = MochiKit.Base.update(null, { 'toString': function() { return "Clipperz.PM.DataModel.OneTimePassword"; }, /* //------------------------------------------------------------------------- 'user': function() { return this._user; }, //------------------------------------------------------------------------- 'password': function() { return this._password; }, //------------------------------------------------------------------------- 'passwordValue': function() { return this._passwordValue; }, //------------------------------------------------------------------------- 'creationDate': function() { return this._creationDate; }, //------------------------------------------------------------------------- 'reference': function() { return this._reference; }, //------------------------------------------------------------------------- 'key': function() { if (this._key == null) { this._key = Clipperz.PM.DataModel.OneTimePassword.computeKeyWithUsernameAndPassword(this.user().username(), this.passwordValue()); } return this._key; }, //------------------------------------------------------------------------- 'keyChecksum': function() { if (this._keyChecksum == null) { this._keyChecksum = Clipperz.PM.DataModel.OneTimePassword.computeKeyChecksumWithUsernameAndPassword(this.user().username(), this.passwordValue()); } return this._keyChecksum; }, */ //------------------------------------------------------------------------- 'status': function() { return this._status; }, 'setStatus': function(aValue) { this._status = aValue; }, //------------------------------------------------------------------------- /* 'serializedData': function() { var result; result = { 'password': this.password(), 'created': this.creationDate() ? Clipperz.PM.Date.formatDateWithUTCFormat(this.creationDate()) : null, 'used': this.usageDate() ? Clipperz.PM.Date.formatDateWithUTCFormat(this.usageDate()) : null, 'status': this.status() }; return result; }, //------------------------------------------------------------------------- 'packedPassphrase': function() { var result; var packedPassphrase; var encodedPassphrase; var prefixPadding; var suffixPadding; var getRandomBytes; getRandomBytes = MochiKit.Base.method(Clipperz.Crypto.PRNG.defaultRandomGenerator(), 'getRandomBytes'); encodedPassphrase = new Clipperz.ByteArray(this.user().passphrase()).toBase64String(); -//MochiKit.Logging.logDebug("--- encodedPassphrase.length: " + encodedPassphrase.length); +//Clipperz.logDebug("--- encodedPassphrase.length: " + encodedPassphrase.length); prefixPadding = getRandomBytes(getRandomBytes(1).byteAtIndex(0)).toBase64String(); -//MochiKit.Logging.logDebug("--- prefixPadding.length: " + prefixPadding.length); +//Clipperz.logDebug("--- prefixPadding.length: " + prefixPadding.length); suffixPadding = getRandomBytes((500 - prefixPadding.length - encodedPassphrase.length) * 6 / 8).toBase64String(); -//MochiKit.Logging.logDebug("--- suffixPadding.length: " + suffixPadding.length); -//MochiKit.Logging.logDebug("--- total.length: " + (prefixPadding.length + encodedPassphrase.length + suffixPadding.length)); +//Clipperz.logDebug("--- suffixPadding.length: " + suffixPadding.length); +//Clipperz.logDebug("--- total.length: " + (prefixPadding.length + encodedPassphrase.length + suffixPadding.length)); packedPassphrase = { 'prefix': prefixPadding, 'passphrase': encodedPassphrase, 'suffix': suffixPadding }; // result = Clipperz.Base.serializeJSON(packedPassphrase); result = packedPassphrase; -//MochiKit.Logging.logDebug("===== OTP packedPassprase: [" + result.length + "]" + result); -//MochiKit.Logging.logDebug("<<< OneTimePassword.packedPassphrase"); +//Clipperz.logDebug("===== OTP packedPassprase: [" + result.length + "]" + result); +//Clipperz.logDebug("<<< OneTimePassword.packedPassphrase"); return result; }, //------------------------------------------------------------------------- 'encryptedPackedPassphrase': function() { return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(this.passwordValue(), this.packedPassphrase()) }, //------------------------------------------------------------------------- 'encryptedData': function() { var deferredResult; var result; -//MochiKit.Logging.logDebug(">>> OneTimePassword.encryptedData"); -//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - id: " + this.reference()); +//Clipperz.logDebug(">>> OneTimePassword.encryptedData"); +//Clipperz.logDebug("--- OneTimePassword.encryptedData - id: " + this.reference()); result = { 'reference': this.reference(), 'key': this.key(), 'keyChecksum': this.keyChecksum(), 'data': "", 'version': Clipperz.PM.Crypto.encryptingFunctions.currentVersion } -//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 2: " + Clipperz.Base.serializeJSON(result)); +//Clipperz.logDebug("--- OneTimePassword.encryptedData - 2: " + Clipperz.Base.serializeJSON(result)); deferredResult = new MochiKit.Async.Deferred(); -//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 3"); -//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.encryptedData - 1: " + res); return res;}); +//Clipperz.logDebug("--- OneTimePassword.encryptedData - 3"); +//deferredResult.addBoth(function(res) {Clipperz.logDebug("OneTimePassword.encryptedData - 1: " + res); return res;}); //# deferredResult.addCallback(Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion, this.passwordValue(), this.packedPassphrase()); deferredResult.addCallback(MochiKit.Base.method(this, 'encryptedPackedPassphrase')); -//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 4"); -//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.encryptedData - 2: [" + res.length + "]" + res); return res;}); +//Clipperz.logDebug("--- OneTimePassword.encryptedData - 4"); +//deferredResult.addBoth(function(res) {Clipperz.logDebug("OneTimePassword.encryptedData - 2: [" + res.length + "]" + res); return res;}); deferredResult.addCallback(function(aResult, res) { aResult['data'] = res; return aResult; }, result); -//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 5"); -//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.encryptedData - 3: " + Clipperz.Base.serializeJSON(res)); return res;}); +//Clipperz.logDebug("--- OneTimePassword.encryptedData - 5"); +//deferredResult.addBoth(function(res) {Clipperz.logDebug("OneTimePassword.encryptedData - 3: " + Clipperz.Base.serializeJSON(res)); return res;}); deferredResult.callback(); -//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 6"); +//Clipperz.logDebug("--- OneTimePassword.encryptedData - 6"); return deferredResult; }, //------------------------------------------------------------------------- 'saveChanges': function() { var deferredResult; var result; -//MochiKit.Logging.logDebug(">>> OneTimePassword.saveChanges"); +//Clipperz.logDebug(">>> OneTimePassword.saveChanges"); result = {}; deferredResult = new MochiKit.Async.Deferred(); deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_encryptUserData'); deferredResult.addCallback(MochiKit.Base.method(this.user(), 'encryptedData')); deferredResult.addCallback(function(aResult, res) { aResult['user'] = res; return aResult; }, result); deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_encryptOTPData'); deferredResult.addCallback(MochiKit.Base.method(this, 'encryptedData')); deferredResult.addCallback(function(aResult, res) { aResult['oneTimePassword'] = res; return aResult; }, result); deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_sendingData'); -//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.saveChanges - 1: " + Clipperz.Base.serializeJSON(res)); return res;}); +//deferredResult.addBoth(function(res) {Clipperz.logDebug("OneTimePassword.saveChanges - 1: " + Clipperz.Base.serializeJSON(res)); return res;}); deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'addNewOneTimePassword'); deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_updatingInterface'); -//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.saveChanges - 2: " + res); return res;}); +//deferredResult.addBoth(function(res) {Clipperz.logDebug("OneTimePassword.saveChanges - 2: " + res); return res;}); deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'OTPUpdated'); deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'oneTimePassword_saveChanges_done', null); -//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.saveChanges - 2: " + res); return res;}); +//deferredResult.addBoth(function(res) {Clipperz.logDebug("OneTimePassword.saveChanges - 2: " + res); return res;}); deferredResult.callback(); -//MochiKit.Logging.logDebug("<<< OneTimePassword.saveChanges"); +//Clipperz.logDebug("<<< OneTimePassword.saveChanges"); return deferredResult; }, //------------------------------------------------------------------------- 'usageDate': function() { return this._usageDate; }, 'setUsageDate': function(aValue) { this._usageDate = aValue; }, //------------------------------------------------------------------------- 'connectionInfo': function() { return this._connectionInfo; }, 'setConnectionInfo': function(aValue) { this._connectionInfo = aValue; }, //------------------------------------------------------------------------- 'isExpired': function() { return (this.usageDate() != null); }, //------------------------------------------------------------------------- 'updateStatusWithValues': function(someValues) { var result; result = false; if (someValues['status'] != this.status()) { result = true; } this.setStatus(someValues['status']); this.setUsageDate(Clipperz.PM.Date.parseDateWithUTCFormat(someValues['requestDate'])); this.setConnectionInfo(someValues['connection']); return result; }, */ //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); //############################################################################# Clipperz.PM.DataModel.OneTimePassword.computeKeyWithUsernameAndPassword = function(anUsername, aPassword) { return Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aPassword)).toHexString().substring(2); } Clipperz.PM.DataModel.OneTimePassword.computeKeyChecksumWithUsernameAndPassword = function(anUsername, aPassword) { return Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(anUsername + aPassword)).toHexString().substring(2); } //============================================================================= Clipperz.PM.DataModel.OneTimePassword.isValidOneTimePasswordValue = function(aPassword) { var result; // "yaxx k7ww - f8y6 tqz5 - 58b6 th44 - 9cwv q0fg" -//console.log("Clipperz.PM.DataModel.OneTimePassword.isValidOneTimePasswordValue", aPassword); if (aPassword.replace(/[\s\-]/g, '').length == 32) { try { var passwordByteArray; passwordByteArray = new Clipperz.ByteArray(); passwordByteArray.appendBase32String(aPassword); result = true; } catch(exception) { result = false; } } else { result = false; } return result; } //============================================================================= Clipperz.PM.DataModel.OneTimePassword.normalizedOneTimePassword = function(aPassword) { var result; if (aPassword.replace(/[\s\-]/g, '').length == 32) { try { var passwordByteArray; passwordByteArray = new Clipperz.ByteArray(); passwordByteArray.appendBase32String(aPassword); result = passwordByteArray.toBase64String(); } catch(exception) { result = aPassword; } } else { result = aPassword; } -//console.log("Clipperz.PM.DataModel.OneTimePassword.normalizedOneTimePassword", aPassword, result); return result; } //############################################################################# diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.Field.js b/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.Field.js index f51bbc2..986db40 100644 --- a/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.Field.js +++ b/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.Field.js @@ -1,118 +1,116 @@ /* -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/. */ try { if (typeof(Clipperz.PM.DataModel.Record.Version) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.PM.DataModel.Record.Version.Field depends on Clipperz.PM.DataModel.Record.Version!"; } Clipperz.PM.DataModel.Record.Version.Field = function(args) { Clipperz.PM.DataModel.Record.Version.Field.superclass.constructor.apply(this, arguments); this._recordVersion = args.recordVersion || Clipperz.Base.exception.raise('MandatoryParameter'); this._reference = args.reference || Clipperz.PM.Crypto.randomKey(); return this; } Clipperz.Base.extend(Clipperz.PM.DataModel.Record.Version.Field, Object, { 'toString': function() { return "Record.Version.Field (" + this.reference() + ")"; }, //------------------------------------------------------------------------- 'recordVersion': function () { return this._recordVersion; }, //------------------------------------------------------------------------- 'reference': function () { return this._reference; }, //------------------------------------------------------------------------- 'getItem': function (aKey) { return Clipperz.Async.callbacks("Clipperz.PM.DataModel.Record.Version.Field.getItem", [ MochiKit.Base.method(this, 'recordVersion'), MochiKit.Base.methodcaller('getValue', 'fields' + '.' + this.reference() + '.' + aKey) ], {trace:false}); }, 'setItem': function (aKey, aValue) { return Clipperz.Async.callbacks("Clipperz.PM.DataModel.Record.Version.Field.getItem", [ MochiKit.Base.method(this, 'recordVersion'), MochiKit.Base.methodcaller('setValue', 'fields' + '.' + this.reference() + '.' + aKey, aValue) ], {trace:false}); }, //------------------------------------------------------------------------- 'label': function () { return this.getItem('label'); }, 'setLabel': function (aValue) { return this.setItem('label', aValue); }, //------------------------------------------------------------------------- 'value': function () { return this.getItem('value'); }, 'setValue': function (aValue) { return this.setItem('value', aValue); }, //------------------------------------------------------------------------- 'actionType': function () { return Clipperz.Async.callbacks("Clipperz.PM.DataModel.Record.Version.Field.actionType", [ Clipperz.Async.collectResults("Clipperz.PM.DataModel.Record.Version.Field.actionType [collect results]", { 'isHidden': MochiKit.Base.method(this, 'isHidden'), 'value': MochiKit.Base.method(this, 'value') }, {trace:false}), function (someValues) { var result; // 'NONE', 'URL', 'EMAIL', 'PASSWORD' result = 'NONE'; if (someValues['isHidden']) { result = 'PASSWORD'; } else if (Clipperz.Base.isUrl(someValues['value'])) { result = 'URL' } else if (Clipperz.Base.isEmail(someValues['value'])) { result = 'EMAIL' }; return result; } ], {trace:false}); }, diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.js b/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.js index dd35fc9..87b319c 100644 --- a/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.js +++ b/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.js @@ -1,333 +1,328 @@ /* -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/. */ try { if (typeof(Clipperz.PM.DataModel.Record) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.PM.DataModel.Record.Version depends on Clipperz.PM.DataModel.Record!"; } Clipperz.PM.DataModel.Record.Version = function(args) { -//console.log(">>> Record.new"); Clipperz.PM.DataModel.Record.Version.superclass.constructor.apply(this, arguments); this._getVersionFunction = args.getVersion || Clipperz.Base.exception.raise('MandatoryParameter'); this._fields = null; return this; } Clipperz.Base.extend(Clipperz.PM.DataModel.Record.Version, Clipperz.PM.DataModel.EncryptedRemoteObject, { 'toString': function() { return "Record.Version (" + this.reference() + ")"; }, //------------------------------------------------------------------------- 'reference': function () { return this._reference; }, //------------------------------------------------------------------------- /* 'hasPendingChanges': function () { var deferredResult; deferredResult = new Clipperz.Async.Deferred("Clipperz.PM.DataModel.Record.Version.hasPendingChanges", {trace:false}); deferredResult.addCallback(MochiKit.Base.bind(Clipperz.PM.DataModel.Record.Version.superclass.hasPendingChanges, this)); deferredResult.callback(); return deferredResult; }, */ //------------------------------------------------------------------------- 'hasPendingChangesWhenBrandNew': function () { var deferredResult; deferredResult = new Clipperz.Async.Deferred("Clipperz.PM.DataModel.Record.Version.hasPendingChangesWhenBrandNew", {trace:false}); deferredResult.addMethod(this, 'fields'); deferredResult.addCallback(MochiKit.Base.values); deferredResult.addCallback(MochiKit.Base.map, MochiKit.Base.methodcaller('isEmpty')) deferredResult.addCallback(Clipperz.Async.collectAll); deferredResult.addCallback(function(someValues) { return MochiKit.Iter.every(someValues, MochiKit.Base.operator.identity); }); deferredResult.addCallback(MochiKit.Base.operator.lognot) deferredResult.callback(); return deferredResult; }, //========================================================================= 'commitTransientState': function () { var deferredResult; deferredResult = new Clipperz.Async.Deferred("Clipperz.PM.DataModel.Record.Version.commitTransientState", {trace:false}); deferredResult.addCallback(MochiKit.Base.bind(Clipperz.PM.DataModel.Record.Version.superclass.commitTransientState, this)); deferredResult.callback(); return deferredResult; }, //========================================================================= 'unpackData': function (someData) { // ++ var result; -//console.log("Record.Version - UNPACK DATA", this, someData); result = someData; if ((someData['fields'] != null) && (someData['fields'] instanceof Array)) { var fields; var i,c; fields = someData['fields']; delete someData['fields']; someData['fields'] = {}; c = fields.length; for (i=0; i<c; i++) { someData['fields'][i] = fields[i]; } } return result; }, //========================================================================= 'fields': function () { var deferredResult; var deferredLock; deferredLock = this.getDeferredLockForKey('fields'); deferredResult = new Clipperz.Async.Deferred("Record.Version.fields", {trace:false}); deferredResult.acquireLock(deferredLock); deferredResult.addCallback(MochiKit.Base.bind(function () { var innerDeferredResult; if (this._fields == null) { innerDeferredResult = new Clipperz.Async.Deferred("Record.Version.fields <inner deferred>", {trace:false}); innerDeferredResult.addMethod(this, 'getValue', 'fields'); innerDeferredResult.addCallback(MochiKit.Base.bind(function (someObjectData) { var reference; this._fields = {}; for (reference in someObjectData) { var recordVersionField; recordVersionField = new Clipperz.PM.DataModel.Record.Version.Field({ 'recordVersion': this, 'reference': reference }); this._fields[reference] = recordVersionField; } return this._fields; }, this)); innerDeferredResult.callback(); } else { innerDeferredResult = MochiKit.Async.succeed(this._fields); } return innerDeferredResult; }, this)); deferredResult.releaseLock(deferredLock); deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'getFieldsValues': function () { return this.getValue('fields'); }, //------------------------------------------------------------------------- 'addField': function (someParameters) { var newField; newField = new Clipperz.PM.DataModel.Record.Version.Field({recordVersion:this}); return Clipperz.Async.callbacks("Record.Version.addField", [ MochiKit.Base.method(this, 'fields'), MochiKit.Base.method(this, '_getObjectDataStore'), MochiKit.Base.methodcaller('values'), Clipperz.Base.serializeJSON, MochiKit.Base.bind(function () { this._fields[newField.reference()] = newField; }, this), MochiKit.Base.method(newField, 'setLabel', someParameters['label']), MochiKit.Base.method(newField, 'setValue', someParameters['value']), MochiKit.Base.method(newField, 'setIsHidden', someParameters['isHidden']), MochiKit.Base.method(this, '_getObjectDataStore'), MochiKit.Base.methodcaller('values'), Clipperz.Base.serializeJSON, MochiKit.Base.partial(MochiKit.Async.succeed, newField) ], {trace:false}); }, //------------------------------------------------------------------------- 'removeField': function (aField) { return Clipperz.Async.callbacks("Record.Version.removeField", [ MochiKit.Base.method(this, 'fields'), MochiKit.Base.bind(function () { delete this._fields[aField.reference()]; }, this), MochiKit.Base.method(this, 'removeValue', 'fields' + '.' + aField.reference()) ], {trace:false}); }, //------------------------------------------------------------------------- /* 'sortFieldReference': function (someSortedFieldReferences) { }, */ //========================================================================= /* 'directLogins': function () { return MochiKit.Base.values(this._directLogins); }, 'addDirectLogin': function (aDirectLogin) { this._directLogins[aDirectLogin.reference()] = aDirectLogin; }, */ //========================================================================= /* 'updateValues': function (anotherVersion) { return Clipperz.Async.callbacks("Record.Version.updateValue", [ MochiKit.Base.partial(MochiKit.Async.succeed, this) ], {trace:false}); }, */ //========================================================================= 'setRemoteData': function (aValue) { this._remoteData = aValue; return aValue; }, //========================================================================= 'getVersionFunction': function () { return this._getVersionFunction; }, 'previousVersion': function () { return Clipperz.Async.callbacks("Record.Versions.previousVersion", [ MochiKit.Base.method(this, 'previousVersionReference'), this.getVersionFunction() ], {trace:false}); }, 'previousVersionReference': function () { return this.getValue('previousVersionReference'); }, 'previousVersionKey': function () { // TODO: this value i encrypted on its own. So it can not be saved in the main objectStore!!! return this.getValue('previousVersionKey'); }, //------------------------------------------------------------------------- 'setPreviousVersionReferenceAndKey': function (aVersionObjectAndKey) { // this._previousVersion = anotherVersion; return Clipperz.Async.callbacks("Record.Version.setPreviousVersion", [ MochiKit.Base.method(this, 'setValue', 'previousVersionReference', aVersionObjectAndKey['reference']), MochiKit.Base.method(this, 'setValue', 'previousVersionKey', aVersionObjectAndKey['key']) ], {trace:false}); }, //========================================================================= 'revertChanges': function () { this.setReference(this.transientState()['originalReference']); Clipperz.PM.DataModel.Record.Version.superclass.revertChanges.apply(this, arguments); }, //------------------------------------------------------------------------- 'prepareRemoteDataWithKey': function (aKey) { var deferredResult; var result; result = {}; -//console.log("prepareRemoteDataWithKey", aKey); deferredResult = new Clipperz.Async.Deferred("Record.Version.prepareRemoteDataWithKey", {trace:false}); if (this.isBrandNew() == false) { this.transientState()['originalReference'] = this.reference(); deferredResult.collectResults({ 'key': MochiKit.Base.partial(MochiKit.Async.succeed, aKey), 'value': MochiKit.Base.method(this, 'getKey'), 'version': MochiKit.Base.partial(MochiKit.Async.succeed, Clipperz.PM.Crypto.encryptingFunctions.currentVersion) }); deferredResult.addCallback(Clipperz.PM.Crypto.deferredEncrypt); deferredResult.addCallback(Clipperz.Async.setItem, result, 'previousVersionKey'); } else { deferredResult.addCallback(Clipperz.Async.setItem, result, 'previousVersionKey', Clipperz.PM.Crypto.nullValue); } deferredResult.addCallback(MochiKit.Base.bind(Clipperz.PM.DataModel.Record.superclass.prepareRemoteDataWithKey, this, aKey)); deferredResult.addCallback(MochiKit.Base.update, result); deferredResult.addMethod(this, 'setRemoteData'); deferredResult.callback(); return deferredResult; }, //========================================================================= /* 'deleteAllCleanTextData': function () { return Clipperz.PM.DataModel.Record.Version.superclass.deleteAllCleanTextData.apply(this, arguments); }, 'hasAnyCleanTextData': function () { return Clipperz.PM.DataModel.Record.Version.superclass.hasAnyCleanTextData.apply(this, arguments); }, */ //========================================================================= __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/Record.js b/frontend/gamma/js/Clipperz/PM/DataModel/Record.js index b816f80..3fc1813 100644 --- a/frontend/gamma/js/Clipperz/PM/DataModel/Record.js +++ b/frontend/gamma/js/Clipperz/PM/DataModel/Record.js @@ -1,878 +1,854 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } Clipperz.PM.DataModel.Record = function(args) { -//console.log(">>> new Clipperz.PM.DataModel.Record", args); Clipperz.PM.DataModel.Record.superclass.constructor.apply(this, arguments); this._updateDate = (args.updateDate ? Clipperz.PM.Date.parse(args.updateDate) : Clipperz.Base.exception.raise('MandatoryParameter')); this._retrieveIndexDataFunction = args.retrieveIndexDataFunction || Clipperz.Base.exception.raise('MandatoryParameter'); this._updateIndexDataFunction = args.updateIndexDataFunction || Clipperz.Base.exception.raise('MandatoryParameter'); this._retrieveDirectLoginIndexDataFunction = args.retrieveDirectLoginIndexDataFunction || null; this._setDirectLoginIndexDataFunction = args.setDirectLoginIndexDataFunction || null; this._removeDirectLoginIndexDataFunction = args.removeDirectLoginIndexDataFunction || null; this._createNewDirectLoginFunction = args.createNewDirectLoginFunction || null; this._directLogins = {}; this._versions = {}; this._currentRecordVersion = null; if (this.isBrandNew()) { var newVersion; this.setNotes(''); newVersion = new Clipperz.PM.DataModel.Record.Version({ 'retrieveKeyFunction': MochiKit.Base.method(this, 'getVersionKey'), 'getVersion': MochiKit.Base.method(this, 'getVersion') }); this._versions[newVersion.reference()] = newVersion; this._currentVersionReference = newVersion.reference(); // this.setLabel(''); } -//console.log("<<< new Clipperz.PM.DataModel.Record", args); - return this; } Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.EncryptedRemoteObject, { 'toString': function() { return "Record (" + this.reference() + ")"; }, //------------------------------------------------------------------------- 'reference': function () { return this._reference; }, //========================================================================= 'getIndexData': function () { return this._retrieveIndexDataFunction(this.reference()); }, //......................................................................... 'getIndexDataForKey': function (aKey) { return Clipperz.Async.callbacks("Record.getIndexDataForKey", [ MochiKit.Base.method(this, 'getIndexData'), MochiKit.Base.itemgetter(aKey) ], {trace:false}); }, //------------------------------------------------------------------------- 'setIndexDataForKey': function (aKey, aValue) { // return this._updateIndexDataFunction(this.reference(), aKey, aValue); var deferredResult; deferredResult = new Clipperz.Async.Deferred("Record.setIndexDataForKey", {trace:false}); deferredResult.addMethod(this, 'getIndexDataForKey', aKey); deferredResult.addCallback(MochiKit.Base.bind(function (aCurrentValue) { var result; var originalValue; originalValue = this.transientState().getValue('originalValues.indexData.' + aKey); if (originalValue == null) { originalValue = this.transientState().setValue('originalValues.indexData.' + aKey, aCurrentValue); } if (aCurrentValue != aValue) { if (originalValue != aValue) { this.transientState().setValue('hasPendingChanges.indexData.' + aKey, true); } else { this.transientState().setValue('hasPendingChanges.indexData.' + aKey, false); } result = this._updateIndexDataFunction(this.reference(), aKey, aValue); } else { result = MochiKit.Async.succeed(aValue); } return result; }, this)); deferredResult.callback(); return deferredResult; }, //========================================================================= /* 'key': function () { return this.getIndexDataForKey('key'); }, */ //========================================================================= 'label': function () { return this.getIndexDataForKey('label'); }, //......................................................................... 'setLabel': function (aValue) { return this.setIndexDataForKey('label', aValue); }, //========================================================================= 'headerNotes': function () { return this.getIndexDataForKey('notes'); }, //------------------------------------------------------------------------- 'notes': function () { return Clipperz.Async.callbacks("Record.notes", [ MochiKit.Base.method(this, 'headerNotes'), MochiKit.Base.bind(function (someHeaderNotes) { var result; if ((someHeaderNotes == null) || (typeof(someHeaderNotes) == 'undefined')) { result = this.getValue('notes'); } else { result = MochiKit.Async.succeed(someHeaderNotes); } return result; }, this) ], {trace:false}); }, //......................................................................... 'setNotes': function (aValue) { return this.setValue('notes', aValue); }, //========================================================================= 'updateDate': function () { return MochiKit.Async.succeed(this._updateDate); }, //========================================================================= 'favicon': function () { var result; var directLogins; directLogins = MochiKit.Base.values(this.directLogins()); if (directLogins.length > 0) { result = directLogins[0].favicon(); // } else if (/* is there an URL to use for searching a favicon */){ } else { result = null; // MochiKit.Async.succeed(Clipperz.PM.Strings['defaultFaviconUrl']); } return result; }, //------------------------------------------------------------------------- 'searchableContent': function () { var deferredResult; -//console.log(">>> searchableContent"); deferredResult = new Clipperz.Async.Deferred("Record.searchableContent", {trace:false}); deferredResult.collectResults({ 'recordLabel': MochiKit.Base.method(this, 'label'), 'directLoginLabels': [ MochiKit.Base.method(this, 'directLoginReferences'), MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.itemgetter('label')) ] }) deferredResult.addCallback(function (someValues) { return someValues['recordLabel'] + ' ' + someValues['directLoginLabels'].join(' '); }); deferredResult.callback(); -//console.log("<<< searchableContent"); return deferredResult; }, //------------------------------------------------------------------------- 'isMatching': function (aRegExp) { return Clipperz.Async.callbacks("deferredFilterFunction", [ MochiKit.Base.method(this, 'searchableContent'), MochiKit.Base.method(aRegExp, 'test'), function (doesItMatch) { var result; if (doesItMatch) { result = MochiKit.Async.succeed('match'); } else { result = MochiKit.Async.fail('miss'); } return result; } ], {trace:false}); }, //========================================================================= 'directLogins': function () { return this._directLogins; }, 'addDirectLogin': function (aDirectLogin) { this._directLogins[aDirectLogin.reference()] = aDirectLogin; }, 'directLoginWithReference': function (aDirectLoginReference) { return this._directLogins[aDirectLoginReference]; }, 'createNewDirectLoginFunction': function () { return this._createNewDirectLoginFunction; }, 'saveOriginalDirectLoginStatusToTransientState': function () { if (this.transientState().getValue('directLogins') == null) { // this.transientState().setValue('directLogins', this._directLogins) -//console.log("SET TRANSIENT STATE", Clipperz.Base.serializeJSON(MochiKit.Base.keys(this.transientState().getValue('directLogins')))) MochiKit.Iter.forEach(MochiKit.Base.keys(this._directLogins), MochiKit.Base.bind(function(aKey) { this.transientState().setValue('directLogins' + '.' + aKey, this._directLogins[aKey]) }, this)) } }, 'createNewDirectLogin': function () { this.saveOriginalDirectLoginStatusToTransientState(); return this.createNewDirectLoginFunction()(this); }, 'removeDirectLogin': function(aDirectLogin) { this.saveOriginalDirectLoginStatusToTransientState(); return Clipperz.Async.callbacks("Record.removeDirectLogin", [ MochiKit.Base.method(this, 'removeValue', 'directLogins' + '.' + aDirectLogin.reference()), MochiKit.Base.bind(function () { delete this._directLogins[aDirectLogin.reference()] }, this) ], {trace:false}); }, 'directLoginReferences': function () { var result; result = Clipperz.Async.callbacks("Record.directLoginReferences", [ MochiKit.Base.method(this, 'directLogins'), MochiKit.Base.values, function (someDirectLogins) { var result; var i,c; result = []; c = someDirectLogins.length; for (i=0; i<c; i++) { result.push(Clipperz.Async.collectResults("Record.directLoginReferences - collectResults", { '_rowObject': MochiKit.Async.succeed, '_reference': MochiKit.Base.methodcaller('reference'), 'label': MochiKit.Base.methodcaller('label'), 'favicon': MochiKit.Base.methodcaller('favicon') }, {trace:false})(someDirectLogins[i])); }; return result; }, Clipperz.Async.collectAll ], {trace:false}); return result; }, //========================================================================= 'unpackRemoteData': function (someData) { var result; -//console.log("new Clipperz.PM.DataModel.Record.Version [2]"); /* this._currentRecordVersion = new Clipperz.PM.DataModel.Record.Version({ 'reference': someData['currentVersion']['reference'], 'retrieveKeyFunction': MochiKit.Base.method(this, 'getCurrentRecordVersionKey'), 'remoteData': someData['currentVersion'], }); */ var versionKey; for (versionKey in someData['versions']) { -//console.log("### versionKey", versionKey); this._versions[versionKey] = new Clipperz.PM.DataModel.Record.Version({ 'reference': versionKey, 'retrieveKeyFunction': MochiKit.Base.method(this, 'getVersionKey'), 'remoteData': someData['versions'][versionKey], 'getVersion': MochiKit.Base.method(this, 'getVersion') }) } // this._currentVersionReference = someData['currentVersion']['reference']; this._currentVersionReference = someData['currentVersion']; -//console.log("=== currentVersionReference", this._currentVersionReference, someData); result = Clipperz.PM.DataModel.Record.superclass.unpackRemoteData.apply(this, arguments); return result; }, //------------------------------------------------------------------------- 'unpackData': function (someData) { var result; result = Clipperz.PM.DataModel.Record.superclass.unpackData.apply(this, arguments); if (MochiKit.Base.isUndefinedOrNull(result['notes'])) { result['notes'] = '' } return result; }, //------------------------------------------------------------------------- 'prepareRemoteDataWithKey': function (aKey) { var deferredResult; var newVersionKey; var result; newVersionKey = Clipperz.PM.Crypto.randomKey(); result = {}; deferredResult = new Clipperz.Async.Deferred("Record.prepareRemoteDataWithKey", {trace:false}); deferredResult.addCallbackList([ Clipperz.Async.collectResults("Record.prepareRemoteDataWithKey - collect results", { 'isBrandNew': MochiKit.Base.method(this, 'isBrandNew'), 'versionHasPendingChanges': [ // MochiKit.Base.method(this, 'getCurrentRecordVersion'), // MochiKit.Base.methodcaller('hasPendingChanges') MochiKit.Base.method(this, 'invokeCurrentRecordVersionMethod', 'hasPendingChanges') ] }), Clipperz.Async.or, Clipperz.Async.deferredIf("Current Version has pending changes", [ MochiKit.Base.method(this, 'createNewRecordVersion'), MochiKit.Base.methodcaller('prepareRemoteDataWithKey', newVersionKey), MochiKit.Base.partial(Clipperz.Async.setItem, result, 'currentRecordVersion'), MochiKit.Base.method(this, 'setCurrentRecordVersionKey', newVersionKey) ], []), MochiKit.Base.bind(Clipperz.PM.DataModel.Record.superclass.prepareRemoteDataWithKey, this, aKey), MochiKit.Base.partial(Clipperz.Async.setItem, result, 'record'), MochiKit.Base.partial(MochiKit.Async.succeed, result) ]); deferredResult.callback(); return deferredResult; }, //========================================================================= 'fields': function () { return this.invokeCurrentRecordVersionMethod('fields'); }, 'addField': function (someParameters) { return this.invokeCurrentRecordVersionMethod('addField', someParameters); }, 'removeField': function (someParameters) { return this.invokeCurrentRecordVersionMethod('removeField', someParameters); }, // 'sortFieldReference': function (someSortedFieldReferences) { // return this.invokeCurrentRecordVersionMethod('sortFieldReference', someSortedFieldReferences); // }, 'getFieldsValues': function () { return this.invokeCurrentRecordVersionMethod('getFieldsValues'); }, 'fieldWithLabel': function (aLabel) { return Clipperz.Async.callbacks("Record.fieldWithLabel", [ MochiKit.Base.method(this, 'fields'), MochiKit.Base.values, MochiKit.Base.partial(Clipperz.Async.deferredFilter, function (aField) { return Clipperz.Async.callbacks("Record.fieldWithLabel - check field label", [ MochiKit.Base.methodcaller('label'), MochiKit.Base.partial(MochiKit.Base.operator.eq, aLabel) ], {trace:false}, aField); }), function (someFilteredResults) { var result; switch (someFilteredResults.length) { case 0: result = null; break; case 1: result = someFilteredResults[0]; break; default: WTF = TODO; break; } return result; } ], {trace:false}); }, //========================================================================= 'getVersion': function (aVersionReference) { return Clipperz.Async.callbacks("Record.getVersion", [ MochiKit.Base.method(this, 'getVersions'), MochiKit.Base.itemgetter(aVersionReference) ], {trace:false}); }, //------------------------------------------------------------------------- 'getVersionKey': function (aVersionReference) { var deferredResult; var transientStateKey; transientStateKey = 'versionKeys' + '.' + aVersionReference; if (this.transientState().getValue(transientStateKey) != null) { deferredResult = MochiKit.Async.succeed(this.transientState().getValue(transientStateKey)); } else { deferredResult = Clipperz.Async.callbacks("Record.getVersionKey", [ MochiKit.Base.method(this, 'getVersions'), MochiKit.Base.partial(MochiKit.Base.operator.eq, aVersionReference, this.currentVersionReference()), Clipperz.Async.deferredIf("getVersionKey for current version", [ MochiKit.Base.method(this, 'getCurrentRecordVersionKey'), MochiKit.Base.method(this.transientState(), 'setValue', transientStateKey) ],[ MochiKit.Async.fail ]) ], {trace:false}); } return deferredResult; }, //------------------------------------------------------------------------- 'versions': function () { return this._versions; }, 'getVersions': function () { return Clipperz.Async.callbacks("Record.versions", [ MochiKit.Base.method(this, 'getValue', 'fakeKey, just to trigger unpackRemoteData'), MochiKit.Base.bind(function () { return this._versions; }, this) ], {trace:false}); }, //------------------------------------------------------------------------- 'getCurrentRecordVersion': function () { return Clipperz.Async.callbacks("Record.getCurrentRecordVersion", [ // MochiKit.Base.method(this, 'getValue', 'fakeKey, just to trigger unpackRemoteData'), // MochiKit.Base.bind(function () { return this._currentRecordVersion; }, this) MochiKit.Base.method(this, 'versions'), MochiKit.Base.itemgetter(this.currentVersionReference()), Clipperz.Async.deferredIf("The current version is available", [ MochiKit.Async.succeed ], [ MochiKit.Base.method(this, 'getVersions'), MochiKit.Base.bind(function (someVersions) { return someVersions[this.currentVersionReference()]}, this) ]) ], {trace:false}); }, 'setCurrentRecordVersion': function (aRecordVersion) { this._currentVersionReference = aRecordVersion.reference(); }, //......................................................................... 'currentVersionReference': function () { -//console.log("currentVersionReference"); return this._currentVersionReference; }, //------------------------------------------------------------------------- 'createNewRecordVersion': function () { var deferredResult; if (this.isBrandNew()) { deferredResult = this.getCurrentRecordVersion(); } else { var newVersion; newVersion = new Clipperz.PM.DataModel.Record.Version({ // 'reference': versionKey, 'retrieveKeyFunction': MochiKit.Base.method(this, 'getVersionKey'), // 'remoteData': {}, 'getVersion': MochiKit.Base.method(this, 'getVersion') }) this._versions[newVersion.reference()] = newVersion; deferredResult = Clipperz.Async.callbacks("Record.createNewRecordVersion", [ // MochiKit.Base.method(this, 'getCurrentRecordVersion'), // MochiKit.Base.methodcaller('values'), MochiKit.Base.method(this, 'invokeCurrentRecordVersionMethod', 'values'), MochiKit.Base.method(newVersion, 'setValues'), Clipperz.Async.collectResults("Record.createNewRecordVersion [collect results]", { 'reference': MochiKit.Base.method(this, 'currentVersionReference'), 'key': MochiKit.Base.method(this, 'getCurrentRecordVersionKey') }, {trace:false}), MochiKit.Base.method(newVersion, 'setPreviousVersionReferenceAndKey'), // MochiKit.Base.method(this, 'getCurrentRecordVersion'), // MochiKit.Base.method(this, 'revertChanges'), MochiKit.Base.method(this, 'invokeCurrentRecordVersionMethod', 'revertChanges'), MochiKit.Base.method(this, 'setCurrentRecordVersion', newVersion), MochiKit.Base.partial(MochiKit.Async.succeed, newVersion) ], {trace:false}); } return deferredResult; }, //------------------------------------------------------------------------- 'getCurrentRecordVersionKey': function () { -//console.log("getCurrentRecordVersionKey"); return Clipperz.Async.callbacks("Record.getCurrentRecordVersionKey", [ MochiKit.Base.method(this, 'getValue', 'currentVersionKey'), Clipperz.Async.deferredIf("currentVersionKey is NOT null", [ MochiKit.Async.succeed ], [ MochiKit.Base.method(this, 'getKey') ]) ], {trace:false}); }, 'setCurrentRecordVersionKey': function (aValue) { // TODO: triple check this method! return Clipperz.Async.callbacks("Record.setCurrentRecordVersionKey", [ MochiKit.Base.method(this, 'setValue', 'currentVersionKey', aValue) ], {trace:false}); }, //------------------------------------------------------------------------- 'invokeCurrentRecordVersionMethod': function (aMethodName, someValues) { -//console.log(">>> invokeCurrentRecordVersionMethod", aMethodName); return Clipperz.Async.callbacks("Record.invokeCurrentRecordVersionMethod", [ MochiKit.Base.method(this, 'getCurrentRecordVersion'), -//function (aValue) { console.log("=== getCurrentRecordVersion", aValue); return aValue}, MochiKit.Base.methodcaller(aMethodName, someValues) ], {trace:false}); }, 'lazilyinvokeCurrentRecordVersionMethod': function (aMethodName, someValues, defaultResult) { return Clipperz.Async.callbacks("Record.lazilyinvokeCurrentRecordVersionMethod", [ MochiKit.Base.method(this, 'currentVersionReference'), -//function (aValue) { console.log("LAZY -> versions", aValue); return aValue; }, Clipperz.Async.deferredIf("versions has been loaded", [ -//function (aValue) { console.log("LAZY -> then"); return aValue; }, MochiKit.Base.method(this, 'getCurrentRecordVersion'), MochiKit.Base.methodcaller(aMethodName, someValues), -//function (aValue) { console.log("LAZY <- then"); return aValue; } ], [ -//function (aValue) { console.log("LAZY -> else"); return aValue; }, MochiKit.Base.partial(MochiKit.Async.succeed, defaultResult), -//function (aValue) { console.log("LAZY <- else"); return aValue; } ]) ], {trace:false}); }, //========================================================================= 'hasPendingChanges': function () { var deferredResult; if (this.hasInitiatedObjectDataStore()) { deferredResult = new Clipperz.Async.Deferred("Clipperz.PM.DataModel.Record.hasPendingChanges", {trace:false}); deferredResult.collectResults({ 'super': MochiKit.Base.bind(Clipperz.PM.DataModel.Record.superclass.hasPendingChanges, this), 'currentVersion': [ // MochiKit.Base.method(this, 'getCurrentRecordVersion'), // MochiKit.Base.methodcaller('hasPendingChanges') MochiKit.Base.method(this, 'invokeCurrentRecordVersionMethod', 'hasPendingChanges') ], 'directLogins': [ MochiKit.Base.method(this, 'directLogins'), -//function (aValue) { console.log("Record.directLogins", aValue); return aValue; }, MochiKit.Base.values, MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.methodcaller('hasPendingChanges')), Clipperz.Async.collectAll, Clipperz.Async.or // function(someValues) { // return MochiKit.Iter.some(someValues, MochiKit.Base.operator.identity); // } ] }); -//deferredResult.addCallback(function (aValue) { console.log("Record.hasPendingResults", aValue); return aValue; }); deferredResult.addCallback(MochiKit.Base.values); deferredResult.addCallback(MochiKit.Base.bind(function(someValues) { var result; result = MochiKit.Iter.some(someValues, MochiKit.Base.operator.identity); if ((result == false) && (this.isBrandNew() == false)) { result = MochiKit.Iter.some(MochiKit.Base.values(this.transientState().getValue('hasPendingChanges.indexData')), MochiKit.Base.operator.identity); } return result; }, this)); deferredResult.callback(); } else { deferredResult = Clipperz.Async.callbacks("Recrod.hasPendingChanges [hasInitiatedObjectDataStore == false]", [ MochiKit.Base.method(this, 'directLogins'), MochiKit.Base.values, MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.methodcaller('hasPendingChanges')), Clipperz.Async.collectAll, Clipperz.Async.or // function(someValues) { // return MochiKit.Iter.some(someValues, MochiKit.Base.operator.identity); // } ], {trace:false}) } return deferredResult; }, //------------------------------------------------------------------------- 'hasPendingChangesWhenBrandNew': function () { var deferredResult; deferredResult = new Clipperz.Async.Deferred("Clipperz.PM.DataModel.Record.hasPendingChangesWhenBrandNew", {trace:false}); deferredResult.collectResults({ 'label': [ MochiKit.Base.method(this, 'label'), MochiKit.Base.partial(MochiKit.Base.operator.ne, '') ], 'notes': [ MochiKit.Base.method(this, 'notes'), MochiKit.Base.partial(MochiKit.Base.operator.ne, '') ] }); // deferredResult.addCallback(MochiKit.Base.values); // deferredResult.addCallback(function(someValues) { // return MochiKit.Iter.some(someValues, MochiKit.Base.operator.identity); // }); deferredResult.addCallback(Clipperz.Async.or); deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'isBrandNewWithNoPendingChanges': function () { var deferredResult; if (this.isBrandNew() == false) { deferredResult = MochiKit.Async.succeed(false); } else { deferredResult = Clipperz.Async.callbacks("Record.isBrandNewWithNoPendingChanges", [ MochiKit.Base.method(this, 'hasPendingChanges'), MochiKit.Base.operator.lognot ], {trace:false}); } return deferredResult; }, //========================================================================= 'revertChanges': function () { var deferredResult; if (this.isBrandNew() == false) { deferredResult = new Clipperz.Async.Deferred("Clipperz.PM.DataModel.Record.revertChanges", {trace:false}); deferredResult.addMethod(this, 'hasPendingChanges'); deferredResult.addIf([ // MochiKit.Base.method(this, 'getCurrentRecordVersion'), // MochiKit.Base.methodcaller('revertChanges'), MochiKit.Base.method(this,'invokeCurrentRecordVersionMethod', 'revertChanges'), MochiKit.Base.method(this, 'directLogins'), MochiKit.Base.values, MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.methodcaller('revertChanges')), MochiKit.Base.bind(Clipperz.PM.DataModel.Record.superclass.revertChanges, this) ], [ MochiKit.Async.succeed ]); deferredResult.callback(); } else { // this.deleteAllCleanTextData(); deferredResult = MochiKit.Async.succeed(); } return deferredResult; }, //------------------------------------------------------------------------- 'resetTransientState': function (isCommitting) { // if ((isCommitting == false) && (this.transientState().getValue('directLogins') != null)) { // this._directLogins = this.transientState().getValue('directLogins'); // } return Clipperz.Async.callbacks("Record.resetTransientState", [ //- MochiKit.Base.method(this, 'getCurrentRecordVersion'), //- MochiKit.Base.methodcaller('resetTransientState'), // MochiKit.Base.method(this, 'invokeCurrentRecordVersionMethod', 'resetTransientState'), MochiKit.Base.method(this, 'lazilyinvokeCurrentRecordVersionMethod', 'resetTransientState'), MochiKit.Base.method(this, 'directLogins'), -//function (aValue) { console.log("resetTransientState - directLogins", aValue); return aValue; }, MochiKit.Base.values, MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.methodcaller('resetTransientState')), MochiKit.Base.bind(function () { if ((isCommitting == false) && (this.transientState().getValue('directLogins') != null)) { this._directLogins = this.transientState().getValue('directLogins'); } }, this), MochiKit.Base.bind(Clipperz.PM.DataModel.Record.superclass.resetTransientState, this, isCommitting) ], {trace:false}) }, //------------------------------------------------------------------------- 'commitTransientState': function () { var deferredResult; deferredResult = new Clipperz.Async.Deferred("Clipperz.PM.DataModel.Record.commitTransientState", {trace:false}); deferredResult.addMethod(this, 'hasPendingChanges'); deferredResult.addIf([ MochiKit.Base.bind(Clipperz.PM.DataModel.Record.superclass.commitTransientState, this), // MochiKit.Base.method(this, 'getCurrentRecordVersion'), // MochiKit.Base.methodcaller('commitTransientState'), MochiKit.Base.method(this, 'invokeCurrentRecordVersionMethod', 'commitTransientState'), MochiKit.Base.method(this, 'directLogins'), MochiKit.Base.values, MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.methodcaller('commitTransientState')) ], [ MochiKit.Async.succeed ]); deferredResult.callback(); return deferredResult; }, //========================================================================= 'retrieveDirectLoginIndexDataFunction': function () { -//console.log("Record.retrieveDirectLoginIndexDataFunction", this._retrieveDirectLoginIndexDataFunction); return this._retrieveDirectLoginIndexDataFunction; }, 'setDirectLoginIndexDataFunction': function () { return this._setDirectLoginIndexDataFunction; }, 'removeDirectLoginIndexDataFunction': function () { return this._removeDirectLoginIndexDataFunction; }, //========================================================================= 'deleteAllCleanTextData': function () { // return Clipperz.PM.DataModel.Record.superclass.deleteAllCleanTextData.apply(this, arguments); return Clipperz.Async.callbacks("Record.deleteAllCleanTextData", [ MochiKit.Base.method(this, 'versions'), MochiKit.Base.values, MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.methodcaller('deleteAllCleanTextData')), MochiKit.Base.method(this, 'directLogins'), MochiKit.Base.values, MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.methodcaller('deleteAllCleanTextData')), MochiKit.Base.bind(Clipperz.PM.DataModel.Record.superclass.deleteAllCleanTextData, this) ], {trace:false}); }, 'hasAnyCleanTextData': function () { // return Clipperz.PM.DataModel.Record.superclass.hasAnyCleanTextData.apply(this, arguments); return Clipperz.Async.callbacks("Record.hasAnyCleanTextData", [ Clipperz.Async.collectResults("Record.hasAnyCleanTextData [collect results]", { 'versions': [ MochiKit.Base.method(this, 'versions'), MochiKit.Base.values, MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.methodcaller('hasAnyCleanTextData')), Clipperz.Async.collectAll ], 'directLogins': [ MochiKit.Base.method(this, 'directLogins'), MochiKit.Base.values, MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.methodcaller('hasAnyCleanTextData')), Clipperz.Async.collectAll ], 'super': [ MochiKit.Base.bind(Clipperz.PM.DataModel.Record.superclass.hasAnyCleanTextData, this) ] }, {trace:false}), Clipperz.Async.or ]) }, //========================================================================= __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Legacy.js b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Legacy.js index d6202ff..cda5a41 100644 --- a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Legacy.js +++ b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Legacy.js @@ -1,118 +1,116 @@ /* -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/. */ try { if (typeof(Clipperz.PM.DataModel.User) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.PM.DataModel.User.Header.Legacy depends on Clipperz.PM.DataModel.User!"; } if (typeof(Clipperz.PM.DataModel.User.Header) == 'undefined') { Clipperz.PM.DataModel.User.Header = {}; } Clipperz.PM.DataModel.User.Header.Legacy = function(args) { // args = args || {}; Clipperz.PM.DataModel.User.Header.Legacy.superclass.constructor.apply(this, arguments); this._retrieveRecordDetailFunction = args.retrieveRecordDetailFunction || Clipperz.Base.exception.raise('MandatoryParameter'); this._records = null; // this._directLogins = null; return this; } Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.Legacy, Clipperz.PM.DataModel.EncryptedRemoteObject, { 'toString': function() { return "Clipperz.PM.DataModel.User.Header.Legacy"; }, //------------------------------------------------------------------------- 'retrieveRecordDetailFunction': function () { return this._retrieveRecordDetailFunction; }, //------------------------------------------------------------------------- 'getRecordKey': function (aRecordReference) { var deferredResult; deferredResult = new Clipperz.Async.Deferred("User.Header.Legacy.getRecordKey", {trace:false}); deferredResult.addMethod(this, 'getRecordIndexData'); deferredResult.addCallback(MochiKit.Base.itemgetter('key')) deferredResult.callback(); return deferredResult; }, //========================================================================= 'getRecordIndexData': function (aRecordReference) { return this.getValue('records.' + aRecordReference); }, 'updateRecordIndexData': function (aRecordReference, aKey, aValue) { return this.setValue('records.' + aRecordReference + "." + aKey, aValue); }, //------------------------------------------------------------------------- 'getDirectLoginIndexData': function (aDirectLoginReference) { return this.getValue('directLogins.' + aDirectLoginReference); }, 'setDirectLoginIndexData': function (aDirectLoginReference, aKey, aValue) { return this.setValue('directLogins.' + aDirectLoginReference + '.' + aKey, aValue); }, 'removeDirectLoginIndexData': function (aDirectLoginReference) { return this.removeValue('directLogins.' + aDirectLoginReference); }, //========================================================================= 'records': function () { var deferredResult; var deferredLock; deferredLock = this.getDeferredLockForKey('records'); deferredResult = new Clipperz.Async.Deferred("User.Header.Legacy.records", {trace:false}); deferredResult.acquireLock(deferredLock); deferredResult.addCallback(MochiKit.Base.bind(function () { var innerDeferredResult; if (this._records == null) { innerDeferredResult = new Clipperz.Async.Deferred("User.Header.Legacy.records <inner deferred>", {trace:false}); innerDeferredResult.collectResults({ 'header': [ // MochiKit.Base.method(this, 'getObjectDataStore'), // MochiKit.Base.methodcaller('values') MochiKit.Base.method(this, 'values') ], 'recordsStats': [ MochiKit.Base.method(this, 'getRemoteData'), MochiKit.Base.itemgetter('recordsStats') ] }); diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.OneTimePasswords.js b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.OneTimePasswords.js index 3528db6..e82da47 100644 --- a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.OneTimePasswords.js +++ b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.OneTimePasswords.js @@ -1,125 +1,117 @@ /* -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/. */ try { if (typeof(Clipperz.PM.DataModel.User) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.PM.DataModel.User.Header.OneTimePasswords depends on Clipperz.PM.DataModel.User!"; } if (typeof(Clipperz.PM.DataModel.User.Header) == 'undefined') { Clipperz.PM.DataModel.User.Header = {}; } //----------------------------------------------------------------------------- Clipperz.PM.DataModel.User.Header.OneTimePasswords = function(args) { Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.constructor.apply(this, arguments); this._oneTimePasswords = null; return this; } //----------------------------------------------------------------------------- Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.OneTimePasswords, Clipperz.PM.DataModel.EncryptedRemoteObject, { 'toString': function() { return "Clipperz.PM.DataModel.User.Header.OneTimePasswords"; }, //------------------------------------------------------------------------- /* 'packData': function (someData) { // ++ var result; -console.log(">>> OneTimePasswords.packData", someData); result = Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.packData.apply(this, arguments); -console.log("<<< OneTimePasswords.packData"); return result; }, */ //------------------------------------------------------------------------- /* 'packRemoteData': function (someData) { var result; -console.log(">>> OneTimePasswords.packRemoteData", someData); result = Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.packRemoteData.apply(this, arguments); -console.log("<<< OneTimePasswords.packRemoteData"); return result; }, */ //------------------------------------------------------------------------- /* 'prepareRemoteDataWithKey': function (aKey) { var result; -console.log(">>> OneTimePasswords.prepareRemoteDataWithKey"); result = Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.prepareRemoteDataWithKey.apply(this, arguments); -console.log("<<< OneTimePasswords.prepareRemoteDataWithKey"); return result; }, */ //========================================================================= 'oneTimePasswords': function () { var deferredResult; deferredResult = new Clipperz.Async.Deferred("User.Header.OneTimePasswords.oneTimePasswords", {trace:false}); if (this._oneTimePasswords == null) { deferredResult.addMethod(this, 'values') deferredResult.addCallback(MochiKit.Base.bind(function (someData) { var otpKey; this._oneTimePasswords = {}; for (otpKey in someData) { var otp; var otpParameters; otpParameters = Clipperz.Base.deepClone(someData[otpKey]); otpParameters['reference'] = otpKey; otp = new Clipperz.PM.DataModel.OneTimePassword(otpParameters); this._oneTimePasswords[otpKey] = otp; } return this._oneTimePasswords; }, this)); deferredResult.callback(); } else { deferredResult = MochiKit.Async.succeed(this._oneTimePasswords); } return deferredResult; }, //========================================================================= __syntaxFix__: "syntax fix" }); //----------------------------------------------------------------------------- diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Preferences.js b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Preferences.js index b164889..f1f95e8 100644 --- a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Preferences.js +++ b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Preferences.js @@ -1,50 +1,48 @@ /* -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/. */ try { if (typeof(Clipperz.PM.DataModel.User) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.PM.DataModel.User.Header.Preferences depends on Clipperz.PM.DataModel.User!"; } if (typeof(Clipperz.PM.DataModel.User.Header) == 'undefined') { Clipperz.PM.DataModel.User.Header = {}; } Clipperz.PM.DataModel.User.Header.Preferences = function(args) { Clipperz.PM.DataModel.User.Header.Preferences.superclass.constructor.apply(this, arguments); return this; } Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.Preferences, Clipperz.PM.DataModel.EncryptedRemoteObject, { 'toString': function() { return "Clipperz.PM.DataModel.User.Header.Preferences"; }, //------------------------------------------------------------------------- //========================================================================= __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.RecordIndex.js b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.RecordIndex.js index f77ea80..5681f70 100644 --- a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.RecordIndex.js +++ b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.RecordIndex.js @@ -1,669 +1,652 @@ /* -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/. */ try { if (typeof(Clipperz.PM.DataModel.User) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.PM.DataModel.User.Header.RecordIndex depends on Clipperz.PM.DataModel.User!"; } if (typeof(Clipperz.PM.DataModel.User.Header) == 'undefined') { Clipperz.PM.DataModel.User.Header = {}; } Clipperz.PM.DataModel.User.Header.RecordIndex = function(args) { Clipperz.PM.DataModel.User.Header.RecordIndex.superclass.constructor.apply(this, arguments); -//console.log("NEW Clipperz.PM.DataModel.User.Header.RecordIndex", args); this._recordsData = new Clipperz.PM.DataModel.EncryptedRemoteObject({ 'name': 'recordsData', 'retrieveKeyFunction': args.retrieveKeyFunction, 'remoteData': { 'data': args.recordsData['data'], 'version': args.encryptedDataVersion, 'recordsStats': args.recordsStats }//, // 'encryptedDataKeypath': 'data', // 'encryptedVersionKeypath': 'version' }); this._directLoginsData = new Clipperz.PM.DataModel.EncryptedRemoteObject({ 'name': 'directLoginsData', 'retrieveKeyFunction': args.retrieveKeyFunction, 'remoteData': { 'data': args.directLoginsData['data'], 'version': args.encryptedDataVersion }//, // 'encryptedDataKeypath': 'data', // 'encryptedVersionKeypath': 'version' }); this._lock = new MochiKit.Async.DeferredLock(); this._transientState = null; this._retrieveRecordDetailFunction = args.retrieveRecordDetailFunction || Clipperz.Base.exception.raise('MandatoryParameter'); this._recordsIndex = args.recordsData['index'] || Clipperz.Base.exception.raise('MandatoryParameter'); this._directLoginsIndex = args.directLoginsData['index'] || Clipperz.Base.exception.raise('MandatoryParameter'); this._records = null; return this; } Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.RecordIndex, Object, { 'toString': function() { return "Clipperz.PM.DataModel.User.Header.RecordIndex"; }, //------------------------------------------------------------------------- 'retrieveRecordDetailFunction': function () { return this._retrieveRecordDetailFunction; }, //------------------------------------------------------------------------- 'recordsIndex': function () { return this._recordsIndex; }, 'recordsData': function () { return this._recordsData; }, //------------------------------------------------------------------------- 'directLoginsIndex': function () { return this._directLoginsIndex; }, 'directLoginsData': function () { return this._directLoginsData; }, //------------------------------------------------------------------------- 'lock': function () { return this._lock; }, //------------------------------------------------------------------------- 'transientState': function () { if (this._transientState == null) { this._transientState = new Clipperz.KeyValueObjectStore(/*{'name':'User.Header.RecordIndex.transientState [1]'}*/); } return this._transientState; }, 'resetTransientState': function (isCommitting) { -//console.log("######## UserHeaderRecordIndex - resetTransientState", Clipperz.Base.deepClone(this._transientState)); if (this._transientState != null) { this._transientState.removeAllData(); } this._transientState = null; }, //------------------------------------------------------------------------- 'getRecordKey': function (aRecordReference) { return Clipperz.Async.callbacks("User.Header.RecordIndex.getRecordKey", [ MochiKit.Base.method(this, 'getRecordIndexData', aRecordReference), MochiKit.Base.itemgetter('key') ], {trace:false}); }, 'setRecordKey': function (aRecordReference, aValue) { return this.updateRecordIndexData(aRecordReference, 'key', aValue); }, //------------------------------------------------------------------------- 'getRecordIndexData': function (aRecordReference) { return this.recordsData().getValue(this.recordsIndex()[aRecordReference]); }, //......................................................................... 'updateRecordIndexData': function (aRecordReference, aKey, aValue) { return this.recordsData().setValue(this.recordsIndex()[aRecordReference]+'.'+aKey, aValue); }, //------------------------------------------------------------------------- 'getDirectLoginIndexData': function (aDirectLoginReference) { return this.directLoginsData().getValue(this.directLoginsIndex()[aDirectLoginReference]); }, 'setDirectLoginIndexData': function (aDirectLoginReference, aKey, aValue) { -//console.log("UserHeaderRecordIndex.setDirectLoginIndexData", aDirectLoginReference, this.directLoginsIndex()[aDirectLoginReference], aKey); //if (MochiKit.Base.isUndefinedOrNull(this.directLoginsIndex()[aDirectLoginReference])) { // throw "PIPPO"; //} return this.directLoginsData().setValue(this.directLoginsIndex()[aDirectLoginReference] + '.' + aKey, aValue); }, 'addDirectLoginIndexData': function (aDirectLoginReference) { -//console.log("UserHeaderRecordIndex.addDirectLoginIndexData", aDirectLoginReference, this.directLoginsIndex()[aDirectLoginReference]); return this.directLoginsData().setValue(this.directLoginsIndex()[aDirectLoginReference], {}); }, 'removeDirectLoginIndexData': function (aDirectLoginReference) { return this.directLoginsData().removeValue(this.directLoginsIndex()[aDirectLoginReference]) }, //------------------------------------------------------------------------- 'records': function () { var deferredResult; deferredResult = new Clipperz.Async.Deferred("User.Header.RecordIndex.records", {trace:false}); deferredResult.acquireLock(this.lock()); deferredResult.addCallback(MochiKit.Base.bind(function () { var innerDeferredResult; if (this._records == null) { innerDeferredResult = new Clipperz.Async.Deferred("User.Header.RecordIndex.records <inner deferred>", {trace:false}); innerDeferredResult.collectResults({ 'records': [ // MochiKit.Base.method(this.recordsData(), 'getObjectDataStore'), // MochiKit.Base.methodcaller('values') MochiKit.Base.method(this.recordsData(), 'values') ], 'recordsStats': [ MochiKit.Base.method(this.recordsData(), 'getRemoteData'), MochiKit.Base.itemgetter('recordsStats') ], 'directLogins': [ // MochiKit.Base.method(this.directLoginsData(), 'getObjectDataStore'), // MochiKit.Base.methodcaller('values') MochiKit.Base.method(this.directLoginsData(), 'values') ] }) innerDeferredResult.addCallback(MochiKit.Base.bind(function (someData) { var indexReference; var recordsInvertedIndex; var directLoginsInvertedIndex; recordsInvertedIndex = Clipperz.PM.DataModel.User.Header.RecordIndex.invertIndex(this.recordsIndex()); directLoginsInvertedIndex = Clipperz.PM.DataModel.User.Header.RecordIndex.invertIndex(this.directLoginsIndex()); this._records = {}; for (indexReference in someData['records']) { var record; var reference; var updateDate; reference = recordsInvertedIndex[indexReference]; if (typeof(someData['recordsStats'][reference]) != 'undefined') { updateDate = someData['recordsStats'][reference]['updateDate']; record = new Clipperz.PM.DataModel.Record({ 'reference': reference, 'retrieveKeyFunction': MochiKit.Base.method(this, 'getRecordKey'), 'retrieveRemoteDataFunction': this.retrieveRecordDetailFunction(), 'retrieveIndexDataFunction': MochiKit.Base.method(this, 'getRecordIndexData'), 'updateIndexDataFunction': MochiKit.Base.method(this, 'updateRecordIndexData'), 'updateDate': updateDate, 'retrieveDirectLoginIndexDataFunction': MochiKit.Base.method(this, 'getDirectLoginIndexData'), 'setDirectLoginIndexDataFunction': MochiKit.Base.method(this, 'setDirectLoginIndexData'), 'removeDirectLoginIndexDataFunction': MochiKit.Base.method(this, 'removeDirectLoginIndexData'), 'createNewDirectLoginFunction': MochiKit.Base.method(this, 'createNewDirectLogin') }); this._records[reference] = record; } else { Clipperz.log("SKIPPING record " + reference + " as there are no stas associated - " + Clipperz.Base.serializeJSON(someData['records'][reference])); // # skip the record, as it seems it is not present in the DB // updateDate = Clipperz.PM.Date.formatDateWithUTCFormat(new Date()); } } for (indexReference in someData['directLogins']) { // var directLogin; var reference; var record; reference = directLoginsInvertedIndex[indexReference]; record = this._records[recordsInvertedIndex[someData['directLogins'][indexReference]['record']]]; if (record != null) { // directLogin = new Clipperz.PM.DataModel.DirectLogin({ new Clipperz.PM.DataModel.DirectLogin({ 'reference': reference, 'record': record }); } else { -Clipperz.log("WARNING: DIRECT LOGIN without a matching RECORD!!"); -//console.log("direct login data", someData['directLogins']); -//console.log("current direct login data", someData['directLogins'][indexReference]) -//console.log("reference", reference); -//console.log("record index", this.recordsIndex()); -//console.log("record inverted index", recordsInvertedIndex); + Clipperz.logWarning("WARNING: DIRECT LOGIN without a matching RECORD!!"); } } return this._records; }, this)); innerDeferredResult.callback(); } else { innerDeferredResult = MochiKit.Async.succeed(this._records); } return innerDeferredResult; }, this)); deferredResult.releaseLock(this.lock()); deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'updateRecordIndexForNewRecord': function (aNewRecord) { var newRecordIndex; var recordReference; recordReference = aNewRecord.reference(); newRecordIndex = (MochiKit.Base.listMax(MochiKit.Base.map(MochiKit.Base.partial(MochiKit.Base.operator.mul, 1), MochiKit.Base.values(this.recordsIndex()))) + 1) + ''; this.recordsIndex()[recordReference] = newRecordIndex; this.transientState().setValue('newlyCreatedRecordsIndex' + '.' + recordReference, newRecordIndex); this.transientState().setValue('newlyCreatedRecordsReferences' + '.' + recordReference, aNewRecord); }, //......................................................................... 'createNewRecord': function () { var deferredResult; var newRecord; -//console.log("#### new Clipperz.PM.DataModel.Record [4]"); newRecord = new Clipperz.PM.DataModel.Record({ 'retrieveKeyFunction': MochiKit.Base.method(this, 'getRecordKey'), 'retrieveRemoteDataFunction': this.retrieveRecordDetailFunction(), 'retrieveIndexDataFunction': MochiKit.Base.method(this, 'getRecordIndexData'), 'updateIndexDataFunction': MochiKit.Base.method(this, 'updateRecordIndexData'), 'updateDate': Clipperz.PM.Date.formatDateWithUTCFormat(new Date()), 'retrieveDirectLoginIndexDataFunction': MochiKit.Base.method(this, 'getDirectLoginIndexData'), 'setDirectLoginIndexDataFunction': MochiKit.Base.method(this, 'setDirectLoginIndexData'), 'removeDirectLoginIndexDataFunction': MochiKit.Base.method(this, 'removeDirectLoginIndexData'), 'createNewDirectLoginFunction': MochiKit.Base.method(this, 'createNewDirectLogin') }); this.transientState().setValue('newRecordsReferences' + '.' + newRecord.reference(), newRecord); this.updateRecordIndexForNewRecord(newRecord); deferredResult = Clipperz.Async.callbacks("User.Header.RecordIndex.createNewRecord", [ MochiKit.Base.method(this, 'records'), MochiKit.Base.partial(Clipperz.Async.setItemOnObject, newRecord.reference(), newRecord), MochiKit.Base.method(this, 'setRecordKey', newRecord.reference(), Clipperz.PM.Crypto.randomKey()), MochiKit.Base.method(newRecord, 'setLabel', ''), MochiKit.Base.partial(MochiKit.Async.succeed, newRecord) ], {trace:false}); return deferredResult; }, //------------------------------------------------------------------------- 'deleteRecord': function (aRecord) { var deferredResult; var recordReference; recordReference = aRecord.reference(); deferredResult = new Clipperz.Async.Deferred("User.Header.RecordIndex.deleteRecord", {trace:false}); deferredResult.addMethod(aRecord, 'directLogins'); deferredResult.addCallback(MochiKit.Base.values); deferredResult.addCallback(MochiKit.Base.map, MochiKit.Base.method(this, 'removeDirectLogin')); deferredResult.addMethod(this.recordsData(), 'removeValue', this.recordsIndex()[recordReference]); deferredResult.addCallback(MochiKit.Base.bind(function () { this.transientState().setValue('deleteRecordsIndex' + '.' + recordReference, this.recordsIndex()[recordReference]); delete this.recordsIndex()[recordReference]; }, this)); deferredResult.addMethod(this, 'records'); deferredResult.addCallback(MochiKit.Base.itemgetter(recordReference)); deferredResult.addMethod(this.transientState(), 'setValue', 'deleteRecordsReferences' + '.' + recordReference); deferredResult.addMethod(this, 'records'); deferredResult.addCallback(MochiKit.Base.bind(function (someRecords) { delete someRecords[recordReference]; }, this)); deferredResult.callback(); return deferredResult; }, //========================================================================= 'removeDirectLogin': function (aDirectLogin) { this.directLoginsData().removeValue(this.directLoginsIndex()[aDirectLogin.reference()]); }, //------------------------------------------------------------------------- 'createNewDirectLogin': function (aRecord) { var newDirectLogin; var newDirectLoginIndexValue; newDirectLogin = new Clipperz.PM.DataModel.DirectLogin({record:aRecord}); newDirectLoginIndexValue = MochiKit.Base.listMax(MochiKit.Base.map(function (aValue) { return aValue * 1; }, MochiKit.Base.values(this.directLoginsIndex()))) + 1; this.transientState().setValue('newDirectLoginReferences' + '.' + newDirectLogin.reference(), newDirectLogin); -//console.log("UserHeaderRecordIndex.createNewDirectLogin [1]", newDirectLogin.reference(), newDirectLoginIndexValue); this.directLoginsIndex()[newDirectLogin.reference()] = newDirectLoginIndexValue; -//console.log("UserHeaderRecordIndex.createNewDirectLogin [2]", newDirectLogin.reference(), this.directLoginsIndex()[newDirectLogin.reference()]); this.directLoginsData().setValue(this.directLoginsIndex()[newDirectLogin.reference()], {'record': this.recordsIndex()[aRecord.reference()]}); return newDirectLogin; }, //========================================================================= 'deleteAllCleanTextData': function () { return Clipperz.Async.callbacks("User.Header.RecordIndex.deleteAllCleanTextData", [ // MochiKit.Base.method(this, 'records'), // MochiKit.Base.values, // MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.methodcaller('deleteAllCleanTextData')), MochiKit.Base.method(this, 'recordsData'), MochiKit.Base.methodcaller('deleteAllCleanTextData'), MochiKit.Base.method(this, 'directLoginsData'), MochiKit.Base.methodcaller('deleteAllCleanTextData') ], {trace:false}); }, //------------------------------------------------------------------------- 'hasAnyCleanTextData': function () { var deferredResult; deferredResult = new Clipperz.Async.Deferred({trace:false}); deferredResult.collectResults({ 'recordsData': [ MochiKit.Base.method(this, 'recordsData'), MochiKit.Base.methodcaller('hasAnyCleanTextData') ], 'directLoginsData': [ MochiKit.Base.method(this, 'directLoginsData'), MochiKit.Base.methodcaller('hasAnyCleanTextData') ], // 'records': [ // MochiKit.Base.method(this, 'records'), // MochiKit.Base.values, // MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.methodcaller('hasAnyCleanTextData')), // Clipperz.Async.collectAll // ] }); -//deferredResult.addCallback(function (aValue) { console.log("USER.Header.RecordIndex.hasAnyCleanTextData", aValue); return aValue}); // deferredResult.addCallback(MochiKit.Base.values); // deferredResult.addCallback(MochiKit.Base.flattenArguments); // deferredResult.addCallback(function(someValues) { // return MochiKit.Iter.some(someValues, MochiKit.Base.operator.identity); // }); deferredResult.addCallback(Clipperz.Async.or); deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'hasPendingChanges': function () { var deferredResult; deferredResult = new Clipperz.Async.Deferred("User.Header.RecordIndex.hasPendingChanges", {trace:false}); deferredResult.collectResults({ 'recordsData': [ MochiKit.Base.method(this, 'recordsData'), MochiKit.Base.methodcaller('hasPendingChanges') ], 'directLoginsData': [ MochiKit.Base.method(this, 'directLoginsData'), MochiKit.Base.methodcaller('hasPendingChanges') ] }); -//deferredResult.addCallback(function (aValue) { console.log("UserHeaderIndex.hasPendingResults", aValue); return aValue; }); deferredResult.addCallback(Clipperz.Async.or); // deferredResult.addCallback(MochiKit.Base.values); // deferredResult.addCallback(MochiKit.Base.flattenArguments); // deferredResult.addCallback(function(someValues) { // return MochiKit.Iter.some(someValues, MochiKit.Base.operator.identity); // }); deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'commitTransientState': function () { var deferredResult; deferredResut = Clipperz.Async.callbacks("User.Header.RecordIndex.commitTransientState", [ MochiKit.Base.method(this, 'recordsData'), MochiKit.Base.methodcaller('commitTransientState'), MochiKit.Base.method(this, 'directLoginsData'), MochiKit.Base.methodcaller('commitTransientState'), MochiKit.Base.method(this, 'resetTransientState', true) ], {trace:false}); return deferredResult; }, //------------------------------------------------------------------------- 'revertChanges': function () { return Clipperz.Async.callbacks("User.Header.RecordIndex.revertChanges", [ MochiKit.Base.method(this, 'recordsData'), MochiKit.Base.methodcaller('revertChanges'), // MochiKit.Base.method(this, 'directLoginsData'), // MochiKit.Base.methodcaller('revertChanges'), MochiKit.Base.method(this, 'records'), MochiKit.Base.bind(function (someRecords) { var recordReference; for (recordReference in this.transientState().getValue('deleteRecordsReferences')) { this.recordsIndex()[recordReference] = this.transientState().getValue('deleteRecordsIndex' + '.' + recordReference); someRecords[recordReference] = this.transientState().getValue('deleteRecordsReferences' + '.' + recordReference); } for (recordReference in this.transientState().getValue('newRecordsReferences')) { delete this.recordsIndex()[recordReference]; delete someRecords[recordReference]; } }, this), // MochiKit.Base.method(this, 'directLogins'), MochiKit.Base.bind(function () { var directLoginReference; // this.transientState().setValue('newDirectLoginReferences' + '.' + newDirectLogin.reference(), newDirectLogin); // // this.directLoginsIndex()[newDirectLogin.reference()] = newDirectLoginIndexValue; // this.directLoginsData().setValue(this.directLoginsIndex()[newDirectLogin.reference()], {'record': this.recordsIndex()[aRecord.reference()]}); // for (directLoginReference in this.transientState().getValue('deleteDirectLoginReferences')) { // someDirectLogins[directLoginReference] = this.transientState().getValue('deleteDirectLoginReferences' + '.' + recordReference); // } for (directLoginReference in this.transientState().getValue('newDirectLoginReferences')) { // this.directLoginsData().removeValue(this.directLoginsIndex()[directLoginReference]); delete this.directLoginsIndex()[directLoginReference]; } }, this), MochiKit.Base.method(this, 'directLoginsData'), MochiKit.Base.methodcaller('revertChanges'), MochiKit.Base.method(this, 'resetTransientState', false) ], {trace:false}); }, //------------------------------------------------------------------------- 'prepareRemoteDataWithKey': function (aKey) { // "records": { // "index": { // "eeda70e0392261967bda71c3764da78989c45bbd2bb7be6b941b90f81d9b81b5": "0", // "13a5e52976337ab210903cd04872588e1b21fb72bc183e91aa25c494b8138551": "1", // ... // "465a067a0bd2b470fa834de5397e38494de0c7707938262fae3427932e219744": "18", // "4fd1dc2ca860b7fb47cef10a84edb3270da05510b0a30a6b0b083898712d4b9e": "19" // }, // "data": "n+AzGEEQXaSRSY4d ... BDypotrXgPo94uHfoXvGFzwCn8w=" // }, // "directLogins": { // "index": { // "61e87fdc4f1d9112e3b30c1f6812d095dcdb24f014c83319091eb6c9899ec348":"0", // "989593d4c48929f0c8f1581aa96969c622807e99619ed4732026e967530a68ad":"1", // ... // "cb9ae0bba1957075ccdbfd3b3481704d62087687a2ac7c411a4f07d444bde0f7":"17", // "7e1d069b7fa57c03bd7bf48807520feb953157834503aaff8c9d493f37dea69d":"18" // }, // "data":"5YG9KKU/OZ5guUgFlms6k1 ... ZG/5Fn0uN+LoAsNfHm+EE62x" // }, var deferredResult; var result; -//console.log("recordsIndex", this.recordsIndex()); result = {}; deferredResult = new Clipperz.Async.Deferred("User.Header.RecordIndex.prepareRemoteDataWithKey", {trace:false}); deferredResult.collectResults({ 'index': MochiKit.Base.partial(MochiKit.Async.succeed, this.recordsIndex()), 'data': [ MochiKit.Base.method(this.recordsData(), 'prepareRemoteDataWithKey', aKey), MochiKit.Base.itemgetter('data') ] }); deferredResult.addCallback(Clipperz.Async.setItem, result, 'records'); deferredResult.collectResults({ 'index': MochiKit.Base.partial(MochiKit.Async.succeed, this.directLoginsIndex()), 'data': [ MochiKit.Base.method(this.directLoginsData(), 'prepareRemoteDataWithKey', aKey), MochiKit.Base.itemgetter('data') ] }); deferredResult.addCallback(Clipperz.Async.setItem, result, 'directLogins'); deferredResult.addCallback(MochiKit.Async.succeed, result); deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'updateRecordKeyAndPrepareRemoteData': function (aRecord) { var newRecordKey; var deferredResult; newRecordKey = Clipperz.PM.Crypto.randomKey(); deferredResult = new Clipperz.Async.Deferred("User.Header.RecordIndex.updateRecordKeyAndPrepareRemoteData", {trace:false}); deferredResult.addCallback(MochiKit.Base.method(aRecord, 'prepareRemoteDataWithKey', newRecordKey)); deferredResult.addCallbackPass(MochiKit.Base.method(this, 'setRecordKey', aRecord.reference(), newRecordKey)); deferredResult.callback(); return deferredResult; }, //......................................................................... 'removeNewRecordWithNoChanges': function (aRecord) { var deferredResult; var recordReference; recordReference = aRecord.reference(); deferredResult = new Clipperz.Async.Deferred("User.Header.RecordIndex.removeNewRecordWithNoChanges", {trace:false}); deferredResult.addMethod(this.recordsData(), 'removeValue', this.recordsIndex()[recordReference]); deferredResult.addCallback(MochiKit.Base.bind(function () { delete this.recordsIndex()[recordReference]; }, this)); deferredResult.addMethod(this, 'records'); deferredResult.addCallback(MochiKit.Base.bind(function (someRecords) { delete someRecords[recordReference]; }, this)); deferredResult.callback(); return deferredResult; }, //......................................................................... 'prepareRemoteDataForChangedRecords': function () { var deferredResult; var result; result = {}; deferredResult = new Clipperz.Async.Deferred("User.Header.RecordIndex.prepareRemoteDataForChangedRecords", {trace:false}); deferredResult.addMethod(this, 'records'); deferredResult.addCallback(MochiKit.Base.values); deferredResult.addCallback(Clipperz.Async.deferredFilter, MochiKit.Base.methodcaller('isBrandNewWithNoPendingChanges')); deferredResult.addCallback(MochiKit.Base.map, MochiKit.Base.method(this, 'removeNewRecordWithNoChanges')); deferredResult.addMethod(this, 'records'); deferredResult.addCallback(MochiKit.Base.values); deferredResult.addCallback(Clipperz.Async.deferredFilter, MochiKit.Base.methodcaller('hasPendingChanges')); deferredResult.addCallback(MochiKit.Base.map, MochiKit.Base.method(this, 'updateRecordKeyAndPrepareRemoteData')); deferredResult.addCallback(Clipperz.Async.collectAll); deferredResult.addCallback(Clipperz.Async.deferredIf("updated records != null", [ MochiKit.Base.operator.identity ], [ MochiKit.Base.partial(MochiKit.Async.succeed, []) ])); deferredResult.addCallback(Clipperz.Async.setItem, result, 'updated'); diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/User.js b/frontend/gamma/js/Clipperz/PM/DataModel/User.js index 646ce21..fd18faf 100644 --- a/frontend/gamma/js/Clipperz/PM/DataModel/User.js +++ b/frontend/gamma/js/Clipperz/PM/DataModel/User.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } //############################################################################# Clipperz.PM.DataModel.User = function (args) { args = args || {}; Clipperz.PM.DataModel.User.superclass.constructor.apply(this, arguments); this._username = args.username || null; this._getPassphraseFunction = args.getPassphraseFunction || null; this._data = null; this._connection = null; this._connectionVersion = 'current'; this._serverData = null; // this._serverLockValue = null; this._transientState = null; this._deferredLocks = { 'passphrase': new MochiKit.Async.DeferredLock(), 'serverData': new MochiKit.Async.DeferredLock(), // 'recordsIndex': new MochiKit.Async.DeferredLock(), // 'directLoginsIndex': new MochiKit.Async.DeferredLock() // 'preferences': new MochiKit.Async.DeferredLock() // 'oneTimePasswords': new MochiKit.Async.DeferredLock() '__syntaxFix__': 'syntax fix' }; return this; } Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, { 'toString': function () { return "Clipperz.PM.DataModel.User - " + this.username(); }, //------------------------------------------------------------------------- 'username': function () { return this._username; }, 'setUsername': function (aValue) { this._username = aValue; }, //------------------------------------------------------------------------- 'displayName': function() { return "" + this.username() + ""; }, //------------------------------------------------------------------------- 'data': function () { if (this._data == null) { this._data = new Clipperz.KeyValueObjectStore(/*{'name':'User.data [1]'}*/); }; return this._data; }, //------------------------------------------------------------------------- /* 'serverLockValue': function () { return this._serverLockValue; }, 'setServerLockValue': function (aValue) { this._serverLockValue = aValue; }, */ //------------------------------------------------------------------------- 'transientState': function () { if (this._transientState == null) { this._transientState = {} } return this._transientState; }, 'resetTransientState': function (isCommitting) { this._transientState = null; }, @@ -235,282 +233,280 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, { 'login': function () { var deferredResult; deferredResult = new Clipperz.Async.Deferred("User.login", {trace:false}); deferredResult.addCallbackPass(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'updateProgress', {'extraSteps':3}); deferredResult.addMethod(this, 'getPassphrase'); deferredResult.addCallback(Clipperz.PM.DataModel.OneTimePassword.isValidOneTimePasswordValue); deferredResult.addCallback(Clipperz.Async.deferredIf("Is the passphrase an OTP", [ MochiKit.Base.partial(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'updateProgress', {'extraSteps':1}), MochiKit.Base.method(this, 'getCredentials'), MochiKit.Base.method(this.connection(), 'redeemOneTimePassword'), MochiKit.Base.method(this.data(), 'setValue', 'passphrase') ], [])); deferredResult.addErrback(MochiKit.Base.method(this, 'getPassphrase')); deferredResult.addMethod(this.connection(), 'login', false); deferredResult.addCallbackPass(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'userSuccessfullyLoggedIn'); deferredResult.addErrback (MochiKit.Base.method(this, 'handleConnectionFallback')); deferredResult.callback(); return deferredResult; }, //......................................................................... 'handleConnectionFallback': function(aValue) { var result; if (aValue instanceof MochiKit.Async.CancelledError) { result = aValue; } else { this.setConnectionVersion(Clipperz.PM.Connection.communicationProtocol.fallbackVersions[this.connectionVersion()]); if (this.connectionVersion() != null) { result = new Clipperz.Async.Deferred("User.handleConnectionFallback - retry"); result.addMethod(this, 'login'); result.callback(); } else { result = Clipperz.Async.callbacks("User.handleConnectionFallback - failed", [ MochiKit.Base.method(this.data(), 'removeValue', 'passphrase'), MochiKit.Base.method(this, 'setConnectionVersion', 'current'), MochiKit.Base.partial(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'userLoginFailed'), MochiKit.Base.partial(MochiKit.Async.fail, Clipperz.PM.DataModel.User.exception.LoginFailed) ], {trace:false}); } } return result; }, //------------------------------------------------------------------------- 'lock': function () { return Clipperz.Async.callbacks("User.lock", [ MochiKit.Base.method(this, 'deleteAllCleanTextData') ], {trace:false}); }, //------------------------------------------------------------------------- 'logout': function () { return Clipperz.Async.callbacks("User.logout", [ MochiKit.Base.method(this, 'deleteAllCleanTextData'), MochiKit.Base.method(this.connection(), 'logout') ], {trace:false}); }, //------------------------------------------------------------------------- 'headerFormatVersion': function(anHeader) { var result; if (anHeader.charAt(0) == '{') { var headerData; headerData = Clipperz.Base.evalJSON(anHeader); result = headerData['version']; } else { result = 'LEGACY'; } return result; }, //------------------------------------------------------------------------- 'unpackServerData': function (someServerData) { var unpackedData; var headerVersion; var recordsIndex; var preferences; var oneTimePasswords; -//console.log(">>> ***************** user.unpackServerData", someServerData); // this.setServerLockValue(someServerData['lock']); headerVersion = this.headerFormatVersion(someServerData['header']); switch (headerVersion) { case 'LEGACY': var legacyHeader; legacyHeader = new Clipperz.PM.DataModel.User.Header.Legacy({ 'retrieveKeyFunction': MochiKit.Base.method(this, 'getPassphrase'), 'remoteData': { 'data': someServerData['header'], 'version': someServerData['version'], 'recordsStats': someServerData['recordsStats'] }, // 'encryptedDataKeypath': 'data', // 'encryptedVersionKeypath': 'version', 'retrieveRecordDetailFunction': MochiKit.Base.method(this, 'getRecordDetail') }); recordsIndex = legacyHeader; preferences = legacyHeader; oneTimePasswords = legacyHeader; break; case '0.1': var headerData; headerData = Clipperz.Base.evalJSON(someServerData['header']); recordsIndex = new Clipperz.PM.DataModel.User.Header.RecordIndex({ 'retrieveKeyFunction': MochiKit.Base.method(this, 'getPassphrase'), 'recordsData': headerData['records'], 'recordsStats': someServerData['recordsStats'], 'directLoginsData': headerData['directLogins'], 'encryptedDataVersion': someServerData['version'], 'retrieveRecordDetailFunction': MochiKit.Base.method(this, 'getRecordDetail') }); // Still missing a test case that actually fais with the old version of the code, where the check for undefined was missing if (typeof(headerData['preferences']) != 'undefined') { preferences = new Clipperz.PM.DataModel.User.Header.Preferences({ 'name': 'preferences', 'retrieveKeyFunction': MochiKit.Base.method(this, 'getPassphrase'), 'remoteData': { 'data': headerData['preferences']['data'], 'version': someServerData['version'] } }); } else { preferences = new Clipperz.PM.DataModel.User.Header.Preferences({ 'name': 'preferences', 'retrieveKeyFunction': MochiKit.Base.method(this, 'getPassphrase') }); } if (typeof(headerData['oneTimePasswords']) != 'undefined') { oneTimePasswords = new Clipperz.PM.DataModel.User.Header.OneTimePasswords({ 'name': 'preferences', 'retrieveKeyFunction': MochiKit.Base.method(this, 'getPassphrase'), 'remoteData': { 'data': headerData['oneTimePasswords']['data'], 'version': someServerData['version'] } }); } else { oneTimePasswords = new Clipperz.PM.DataModel.User.Header.OneTimePasswords({ 'name': 'preferences', 'retrieveKeyFunction': MochiKit.Base.method(this, 'getPassphrase') }); } break; } unpackedData = { 'version': someServerData['version'], 'statistics': someServerData['statistics'], 'header': { 'data': someServerData['header'], 'version': headerVersion, 'recordsIndex': recordsIndex, 'preferences': preferences, 'oneTimePasswords': oneTimePasswords } }; this._serverData = unpackedData; -//console.log("<<< ***************** user.unpackServerData", this._serverData); return this._serverData; }, //------------------------------------------------------------------------- 'getServerData': function() { var deferredResult; deferredResult = new Clipperz.Async.Deferred("User.getServerData", {trace:false}); deferredResult.acquireLock(this.deferredLockForSection('serverData')); deferredResult.addCallback(MochiKit.Base.bind(function(aResult) { var innerDeferredResult; innerDeferredResult = new Clipperz.Async.Deferred("User.getUserDetails.innerDeferred", {trace:false}); if (this._serverData == null) { innerDeferredResult.addCallbackPass(MochiKit.Signal.signal, this, 'loadingUserDetails'); innerDeferredResult.addMethod(this.connection(), 'message', 'getUserDetails'); innerDeferredResult.addMethod(this, 'unpackServerData'); innerDeferredResult.addCallbackPass(MochiKit.Signal.signal, this, 'loadedUserDetails'); } innerDeferredResult.addCallback(MochiKit.Base.bind(function () { return this._serverData; },this)); innerDeferredResult.callback(); return innerDeferredResult; }, this)); deferredResult.releaseLock(this.deferredLockForSection('serverData')); deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'connectionVersion': function() { return this._connectionVersion; }, 'setConnectionVersion': function(aValue) { if (this._connectionVersion != aValue) { this.resetConnection(); } this._connectionVersion = aValue; }, //------------------------------------------------------------------------- 'connection': function() { if ((this._connection == null) && (this.connectionVersion() != null) ){ this._connection = new Clipperz.PM.Connection.communicationProtocol.versions[this.connectionVersion()]({ getCredentialsFunction: MochiKit.Base.method(this, 'getCredentials') }); } return this._connection; }, 'resetConnection': function(aValue) { if (this._connection != null) { this._connection.reset(); } this._connection = null; }, //========================================================================= 'getHeaderIndex': function (aKey) { return Clipperz.Async.callbacks("User.getHeaderIndex", [ MochiKit.Base.method(this, 'getServerData'), MochiKit.Base.itemgetter('header'), MochiKit.Base.itemgetter(aKey) ], {trace:false}) }, //========================================================================= 'getRecords': function () { return Clipperz.Async.callbacks("User.getRecords", [ MochiKit.Base.method(this, 'getHeaderIndex', 'recordsIndex'), MochiKit.Base.methodcaller('records'), MochiKit.Base.values ], {trace:false}); }, 'recordWithLabel': function (aLabel) { return Clipperz.Async.callbacks("User.recordWithLabel", [ MochiKit.Base.method(this, 'getRecords'), MochiKit.Base.partial(Clipperz.Async.deferredFilter, function (aRecord) { return Clipperz.Async.callbacks("User.recordWithLabel - check record label", [ MochiKit.Base.methodcaller('label'), MochiKit.Base.partial(MochiKit.Base.operator.eq, aLabel) ], {trace:false}, aRecord); diff --git a/frontend/gamma/js/Clipperz/PM/Date.js b/frontend/gamma/js/Clipperz/PM/Date.js index 96a2700..a62857e 100644 --- a/frontend/gamma/js/Clipperz/PM/Date.js +++ b/frontend/gamma/js/Clipperz/PM/Date.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Date) == 'undefined') { Clipperz.PM.Date = {}; } Clipperz.PM.Date.VERSION = "0.1"; Clipperz.PM.Date.NAME = "Clipperz.PM.Date"; MochiKit.Base.update(Clipperz.PM.Date, { '__repr__': function () { return "[" + this.NAME + " " + this.VERSION + "]"; }, //------------------------------------------------------------------------- 'toString': function () { return this.__repr__(); }, //------------------------------------------------------------------------- 'locale': function() { return { 'amDesignation': Clipperz.PM.Strings.getValue('calendarStrings.amDesignation'), 'pmDesignation': Clipperz.PM.Strings.getValue('calendarStrings.pmDesignation'), 'days': Clipperz.PM.Strings.getValue('calendarStrings.days'), 'shortDays': Clipperz.PM.Strings.getValue('calendarStrings.shortDays'), 'shortMonths': Clipperz.PM.Strings.getValue('calendarStrings.shortMonths'), 'months': Clipperz.PM.Strings.getValue('calendarStrings.months') } }, //========================================================================= /* 'formatDateWithPHPLikeTemplate': function(aDate, aTemplate) { return Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale()); }, 'parseDateWithPHPLikeTemplate': function(aDate, aTemplate) { return Clipperz.Date.parseDateWithPHPTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale()); }, //========================================================================= 'formatDateWithJavaLikeTemplate': function(aDate, aTemplate) { return Clipperz.Date.formatDateWithJavaLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale()); }, 'parseDateWithJavaLikeTemplate': function(aDate, aTemplate) { return Clipperz.Date.parseDateWithJavaLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale()); }, */ //========================================================================= 'formatWithTemplate': function (aTemplate, aDate) { return Clipperz.PM.Date.formatDateWithTemplate(aDate, aTemplate); }, 'formatDateWithTemplate': function(aDate, aTemplate) { var result; if (aDate == null) { result = "" } else { result = Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale()); }; return result; }, 'parseDateWithTemplate': function(aValue, aTemplate) { return Clipperz.Date.parseDateWithPHPTemplateAndLocale(aValue, aTemplate, Clipperz.PM.Date.locale()); }, //========================================================================= 'formatDateWithUTCFormat': function(aDate) { return Clipperz.Date.formatDateWithUTCFormatAndLocale(aDate, Clipperz.PM.Date.locale()); }, 'parseDateWithUTCFormat': function(aValue) { var result; if (aValue == null) { result = null; } else { result = Clipperz.Date.parseDateWithUTCFormatAndLocale(aValue, Clipperz.PM.Date.locale()); } return result; }, //========================================================================= diff --git a/frontend/gamma/js/Clipperz/PM/PIN.js b/frontend/gamma/js/Clipperz/PM/PIN.js index bc932b2..a32889a 100644 --- a/frontend/gamma/js/Clipperz/PM/PIN.js +++ b/frontend/gamma/js/Clipperz/PM/PIN.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.PIN) == 'undefined') { Clipperz.PM.PIN = {}; } MochiKit.Base.update(Clipperz.PM.PIN, { //------------------------------------------------------------------------- '__repr__': function () { return "[" + this.NAME + " " + this.VERSION + "]"; }, //------------------------------------------------------------------------- 'toString': function () { return this.__repr__(); }, 'CREDENTIALS': 'CLIPPERZ.CREDENTIALS', 'FAILURE_COUNT': 'CLIPPERZ.FAILED_LOGIN_COUNT', 'ALLOWED_RETRY': 3, //------------------------------------------------------------------------- 'isSet': function () { return (this.storedCredentials() != null); }, 'storedCredentials': function () { return localStorage[this.CREDENTIALS]; }, //------------------------------------------------------------------------- 'recordFailedAttempt': function () { var failureCount; var result; failureCount = localStorage[this.FAILURE_COUNT]; if (failureCount == null) { failureCount = 0 } failureCount ++; if (failureCount < this.ALLOWED_RETRY) { localStorage[this.FAILURE_COUNT] = failureCount; result = failureCount; } else { this.removeLocalCredentials(); result = -1; } return result; }, 'resetFailedAttemptCount': function () { localStorage.removeItem(this.FAILURE_COUNT); }, 'failureCount': function () { return localStorage[this.FAILURE_COUNT]; }, //------------------------------------------------------------------------- 'deriveKeyFromPin': function (aPIN) { return Clipperz.Crypto.SHA.sha256(new Clipperz.ByteArray(aPIN)); }, 'credentialsWithPIN': function (aPIN) { var byteArrayValue; var decryptedValue; var result; byteArrayValue = (new Clipperz.ByteArray()).appendBase64String(localStorage[this.CREDENTIALS]); decryptedValue = Clipperz.Crypto.AES.decrypt(this.deriveKeyFromPin(aPIN), byteArrayValue).asString(); try { result = Clipperz.Base.evalJSON(decryptedValue); } catch (error) { result = {'username':'fakeusername', 'passphrase':'fakepassphrase'}; } return result; }, 'setCredentialsWithPIN': function (aPIN, someCredentials) { var encodedValue; var byteArrayValue; var encryptedValue; encodedValue = Clipperz.Base.serializeJSON(someCredentials); diff --git a/frontend/gamma/js/Clipperz/PM/Proxy.js b/frontend/gamma/js/Clipperz/PM/Proxy.js index 190bffd..a5eaae6 100644 --- a/frontend/gamma/js/Clipperz/PM/Proxy.js +++ b/frontend/gamma/js/Clipperz/PM/Proxy.js @@ -1,169 +1,161 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } //============================================================================= Clipperz.PM.Proxy = function(args) { args = args || {}; this._shouldPayTolls = args.shouldPayTolls || false; this._tolls = { 'CONNECT': [], 'REGISTER': [], 'MESSAGE': [] }; if (args.isDefault === true) { Clipperz.PM.Proxy.defaultProxy = this; } return this; } Clipperz.PM.Proxy.prototype = MochiKit.Base.update(null, { 'toString': function() { return "Clipperz.PM.Proxy"; }, //========================================================================= 'shouldPayTolls': function() { return this._shouldPayTolls; }, //------------------------------------------------------------------------- 'tolls': function() { return this._tolls; }, //------------------------------------------------------------------------- 'payToll': function(aRequestType, someParameters) { var deferredResult; -//console.log(">>> Proxy.payToll", aRequestType, someParameters); if (this.shouldPayTolls()) { deferredResult = new Clipperz.Async.Deferred("Proxy.payToll", {trace:false}); if (this.tolls()[aRequestType].length == 0) { deferredResult.addMethod(this, 'sendMessage', 'knock', {requestType:aRequestType}); deferredResult.addMethod(this, 'setTollCallback'); } deferredResult.addMethod(this.tolls()[aRequestType], 'pop'); deferredResult.addCallback(MochiKit.Base.methodcaller('deferredPay')); deferredResult.addCallback(function(aToll) { var result; result = { parameters: someParameters, toll: aToll } return result; }); deferredResult.callback(); } else { deferredResult = MochiKit.Async.succeed({parameters:someParameters}); } -//console.log("<<< Proxy.payToll"); return deferredResult; }, //------------------------------------------------------------------------- 'addToll': function(aToll) { -//console.log(">>> Proxy.addToll", aToll); this.tolls()[aToll.requestType()].push(aToll); -//console.log("<<< Proxy.addToll"); }, //========================================================================= 'setTollCallback': function(someParameters) { -//console.log(">>> Proxy.setTollCallback", someParameters); if (typeof(someParameters['toll']) != 'undefined') { -//console.log("added a new toll", someParameters['toll']); this.addToll(new Clipperz.PM.Toll(someParameters['toll'])); } -//console.log("<<< Proxy.setTallCallback", someParameters['result']); + return someParameters['result']; }, //========================================================================= 'registration': function (someParameters) { return this.processMessage('registration', someParameters, 'REGISTER'); }, 'handshake': function (someParameters) { return this.processMessage('handshake', someParameters, 'CONNECT'); }, 'message': function (someParameters) { return this.processMessage('message', someParameters, 'MESSAGE'); }, 'logout': function (someParameters) { return this.processMessage('logout', someParameters, 'MESSAGE'); }, //========================================================================= 'processMessage': function (aFunctionName, someParameters, aRequestType) { var deferredResult; deferredResult = new Clipperz.Async.Deferred("Proxy.processMessage", {trace:false}); deferredResult.addMethod(this, 'payToll', aRequestType); deferredResult.addMethod(this, 'sendMessage', aFunctionName); deferredResult.addMethod(this, 'setTollCallback'); deferredResult.callback(someParameters); return deferredResult; }, //========================================================================= 'sendMessage': function () { throw Clipperz.Base.exception.AbstractMethod; }, //========================================================================= 'isReadOnly': function () { return false; }, //========================================================================= __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.JSON.js b/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.JSON.js index 5b39b4a..7d10dd4 100755 --- a/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.JSON.js +++ b/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.JSON.js @@ -1,91 +1,89 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } //============================================================================= Clipperz.PM.Proxy.JSON = function(args) { Clipperz.PM.Proxy.JSON.superclass.constructor.call(this, args); this._url = args.url || Clipperz.Base.exception.raise('MandatoryParameter'); return this; } Clipperz.Base.extend(Clipperz.PM.Proxy.JSON, Clipperz.PM.Proxy, { 'toString': function() { return "Clipperz.PM.Proxy.JSON"; }, //========================================================================= 'url': function () { return this._url; }, //========================================================================= 'sendMessage': function(aFunctionName, someParameters) { var deferredResult; var parameters; parameters = { method: aFunctionName, // version: someParameters['version'], // message: someParameters['message'], parameters: Clipperz.Base.serializeJSON(someParameters) }; deferredResult = new Clipperz.Async.Deferred("Proxy.JSON.sendMessage", {trace:false}); deferredResult.addCallbackPass(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'remoteRequestSent'); deferredResult.addCallback(MochiKit.Async.doXHR, this.url(), { method:'POST', sendContent:MochiKit.Base.queryString(parameters), headers:{"Content-Type":"application/x-www-form-urlencoded"} }); deferredResult.addCallbackPass(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'remoteRequestReceived'); // deferredResult.addCallback(MochiKit.Async.evalJSONRequest); deferredResult.addCallback(MochiKit.Base.itemgetter('responseText')); deferredResult.addCallback(Clipperz.Base.evalJSON); deferredResult.addCallback(function (someValues) { if (someValues['result'] == 'EXCEPTION') { throw someValues['message']; } return someValues; }) // return MochiKit.Base.evalJSON(req.responseText); deferredResult.callback(); return deferredResult; }, //========================================================================= __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js b/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js index 01ba122..326022c 100644 --- a/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js +++ b/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js @@ -1,221 +1,217 @@ /* -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/. */ try { if (typeof(Clipperz.PM.Proxy.Offline) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.PM.Proxy.Offline.DataStore depends on Clipperz.PM.Proxy.Offline!"; } //============================================================================= Clipperz.PM.Proxy.Offline.DataStore = function(args) { args = args || {}; this._data = args.data || (typeof(_clipperz_dump_data_) != 'undefined' ? _clipperz_dump_data_ : null); this._isReadOnly = (typeof(args.readOnly) == 'undefined' ? true : args.readOnly); this._shouldPayTolls = args.shouldPayTolls || false; this._tolls = {}; this._currentStaticConnection = null; return this; } Clipperz.Base.extend(Clipperz.PM.Proxy.Offline.DataStore, Object, { //------------------------------------------------------------------------- 'isReadOnly': function () { return this._isReadOnly; }, //------------------------------------------------------------------------- 'shouldPayTolls': function() { return this._shouldPayTolls; }, //------------------------------------------------------------------------- 'data': function () { return this._data; }, //------------------------------------------------------------------------- 'tolls': function () { return this._tolls; }, //========================================================================= 'resetData': function() { this._data = { 'users': { 'catchAllUser': { __masterkey_test_value__: 'masterkey', s: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00', v: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00' } } }; }, //------------------------------------------------------------------------- 'setupWithEncryptedData': function(someData) { this._data = Clipperz.Base.deepClone(someData); }, //------------------------------------------------------------------------- 'setupWithData': function(someData) { var deferredResult; var resultData; var i, c; //Clipperz.log(">>> Proxy.Test.setupWithData"); resultData = this._data; deferredResult = new Clipperz.Async.Deferred("Proxy.Test.seupWithData", {trace:false}); c = someData['users'].length; for (i=0; i<c; i++) { var newConnection; var recordConfiguration; deferredResult.addMethod(this, 'userSerializedEncryptedData', someData['users'][i]); deferredResult.addCallback(MochiKit.Base.bind(function(aUserSerializationContext) { -//console.log("SERIALIZED USER", aUserSerializationContext); resultData['users'][aUserSerializationContext['credentials']['C']] = { 's': aUserSerializationContext['credentials']['s'], 'v': aUserSerializationContext['credentials']['v'], 'version': aUserSerializationContext['data']['connectionVersion'], 'userDetails': aUserSerializationContext['encryptedData']['user']['header'], 'userDetailsVersion': aUserSerializationContext['encryptedData']['user']['version'], 'statistics': aUserSerializationContext['encryptedData']['user']['statistics'], 'lock': aUserSerializationContext['encryptedData']['user']['lock'], 'records': this.rearrangeRecordsData(aUserSerializationContext['encryptedData']['records']) } }, this)); } deferredResult.addCallback(MochiKit.Base.bind(function() { -//console.log("this._data", resultData); this._data = resultData; }, this)); deferredResult.callback(); //Clipperz.log("<<< Proxy.Test.setupWithData"); return deferredResult; }, //========================================================================= 'getTollForRequestType': function (aRequestType) { var result; var targetValue; var cost; targetValue = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2); switch (aRequestType) { case 'REGISTER': cost = 5; break; case 'CONNECT': cost = 5; break; case 'MESSAGE': cost = 2; break; } result = { requestType: aRequestType, targetValue: targetValue, cost: cost } if (this.shouldPayTolls()) { this.tolls()[targetValue] = result; } return result; }, //------------------------------------------------------------------------- 'checkToll': function (aFunctionName, someParameters) { if (this.shouldPayTolls()) { var localToll; var tollParameters; tollParameters = someParameters['toll']; localToll = this.tolls()[tollParameters['targetValue']]; if (localToll != null) { if (! Clipperz.PM.Toll.validate(tollParameters['targetValue'], tollParameters['toll'], localToll['cost'])) { throw "Toll value too low."; }; } else { throw "Missing toll"; } } }, //========================================================================= 'currentStaticConnection': function () { if (this._currentStaticConnection == null) { this._currentStaticConnection = {}; } return this._currentStaticConnection; }, //------------------------------------------------------------------------- 'getConnectionForRequest': function (aFunctionName, someParameters) { var result; if (this.shouldPayTolls()) { if ((typeof(someParameters['toll']) != 'undefined') && (typeof(someParameters['toll']['targetValue']) != 'undefined')) { result = this.tolls()[someParameters['toll']['targetValue']]['connection']; if (typeof(result) == 'undefined') { result = {}; } } else { result = {}; } } else { result = this.currentStaticConnection(); } return result; }, //------------------------------------------------------------------------- 'storeConnectionForRequestWithConnectionAndResponse': function (aFunctionName, someParameters, aConnection, aResponse) { @@ -302,507 +298,491 @@ Clipperz.Base.extend(Clipperz.PM.Proxy.Offline.DataStore, Object, { result: { 'lock': this.data()['users'][someParameters['credentials']['C']]['lock'], 'result': 'done' }, toll: this.getTollForRequestType('CONNECT') } return result; }, //------------------------------------------------------------------------- '_handshake': function(aConnection, someParameters) { var result; var nextTollRequestType; result = {}; if (someParameters.message == "connect") { var userData; var randomBytes; var v; userData = this.data()['users'][someParameters.parameters.C]; if ((typeof(userData) != 'undefined') && (userData['version'] == someParameters.version)) { aConnection['userData'] = userData; aConnection['C'] = someParameters.parameters.C; } else { aConnection['userData'] = this.data()['users']['catchAllUser']; } randomBytes = Clipperz.Crypto.Base.generateRandomSeed(); aConnection['b'] = new Clipperz.Crypto.BigInt(randomBytes, 16); v = new Clipperz.Crypto.BigInt(aConnection['userData']['v'], 16); aConnection['B'] = v.add(Clipperz.Crypto.SRP.g().powerModule(aConnection['b'], Clipperz.Crypto.SRP.n())); aConnection['A'] = someParameters.parameters.A; result['s'] = aConnection['userData']['s']; result['B'] = aConnection['B'].asString(16); nextTollRequestType = 'CONNECT'; } else if (someParameters.message == "credentialCheck") { var v, u, S, A, K, M1; v = new Clipperz.Crypto.BigInt(aConnection['userData']['v'], 16); u = new Clipperz.Crypto.BigInt(Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(aConnection['B'].asString(10))).toHexString(), 16); A = new Clipperz.Crypto.BigInt(aConnection['A'], 16); S = (A.multiply(v.powerModule(u, Clipperz.Crypto.SRP.n()))).powerModule(aConnection['b'], Clipperz.Crypto.SRP.n()); K = Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(S.asString(10))).toHexString().slice(2); M1 = Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(A.asString(10) + aConnection['B'].asString(10) + K)).toHexString().slice(2); if (someParameters.parameters.M1 == M1) { var M2; M2 = Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(A.asString(10) + someParameters.parameters.M1 + K)).toHexString().slice(2); result['M2'] = M2; } else { throw new Error("Client checksum verification failed! Expected <" + M1 + ">, received <" + someParameters.parameters.M1 + ">.", "Error"); } nextTollRequestType = 'MESSAGE'; } else if (someParameters.message == "oneTimePassword") { var otpData; otpData = this.data()['onetimePasswords'][someParameters.parameters.oneTimePasswordKey]; try { if (typeof(otpData) != 'undefined') { if (otpData['status'] == 'ACTIVE') { if (otpData['key_checksum'] == someParameters.parameters.oneTimePasswordKeyChecksum) { result = { 'data': otpData['data'], 'version': otpData['version'] } otpData['status'] = 'REQUESTED'; } else { otpData['status'] = 'DISABLED'; throw "The requested One Time Password has been disabled, due to a wrong keyChecksum"; } } else { throw "The requested One Time Password was not active"; } } else { throw "The requested One Time Password has not been found" } } catch (exception) { result = { 'data': Clipperz.PM.Crypto.randomKey(), 'version': Clipperz.PM.Connection.communicationProtocol.currentVersion } } nextTollRequestType = 'CONNECT'; } else { - MochiKit.Logging.logError("Clipperz.PM.Proxy.Test.handshake - unhandled message: " + someParameters.message); + Clipperz.logError("Clipperz.PM.Proxy.Test.handshake - unhandled message: " + someParameters.message); } result = { result: result, toll: this.getTollForRequestType(nextTollRequestType) } return result; }, //------------------------------------------------------------------------- '_message': function(aConnection, someParameters) { var result; result = {}; //===================================================================== // // R E A D - O N L Y M e t h o d s // //===================================================================== if (someParameters.message == 'getUserDetails') { var recordsStats; var recordReference; recordsStats = {}; for (recordReference in aConnection['userData']['records']) { recordsStats[recordReference] = { 'updateDate': aConnection['userData']['records'][recordReference]['updateDate'] } } result['header'] = this.userDetails(aConnection); result['statistics'] = this.statistics(aConnection); result['maxNumberOfRecords'] = aConnection['userData']['maxNumberOfRecords']; result['version'] = aConnection['userData']['userDetailsVersion']; result['recordsStats'] = recordsStats; if (this.isReadOnly() == false) { var lock; if (typeof(aConnection['userData']['lock']) == 'undefined') { aConnection['userData']['lock'] = "<<LOCK>>"; } result['lock'] = aConnection['userData']['lock']; } //===================================================================== } else if (someParameters.message == 'getRecordDetail') { /* var recordData; var currentVersionData; recordData = this.userData()['records'][someParameters['parameters']['reference']]; result['reference'] = someParameters['parameters']['reference']; result['data'] = recordData['data']; result['version'] = recordData['version']; result['creationData'] = recordData['creationDate']; result['updateDate'] = recordData['updateDate']; result['accessDate'] = recordData['accessDate']; currentVersionData = recordData['versions'][recordData['currentVersion']]; result['currentVersion'] = {}; result['currentVersion']['reference'] = recordData['currentVersion']; result['currentVersion']['version'] = currentVersionData['version']; result['currentVersion']['header'] = currentVersionData['header']; result['currentVersion']['data'] = currentVersionData['data']; result['currentVersion']['creationData'] = currentVersionData['creationDate']; result['currentVersion']['updateDate'] = currentVersionData['updateDate']; result['currentVersion']['accessDate'] = currentVersionData['accessDate']; if (typeof(currentVersionData['previousVersion']) != 'undefined') { result['currentVersion']['previousVersionKey'] = currentVersionData['previousVersionKey']; result['currentVersion']['previousVersion'] = currentVersionData['previousVersion']; } */ MochiKit.Base.update(result, aConnection['userData']['records'][someParameters['parameters']['reference']]); result['reference'] = someParameters['parameters']['reference']; //===================================================================== // // R E A D - W R I T E M e t h o d s // //===================================================================== } else if (someParameters.message == 'upgradeUserCredentials') { if (this.isReadOnly() == false) { var parameters; var credentials; parameters = someParameters['parameters']; credentials = parameters['credentials']; if ((credentials['C'] == null) || (credentials['s'] == null) || (credentials['v'] == null) || (credentials['version'] != Clipperz.PM.Connection.communicationProtocol.currentVersion) ) { result = Clipperz.PM.DataModel.User.exception.CredentialUpgradeFailed; } else { var oldCValue; oldCValue = aConnection['C']; this.data()['users'][credentials['C']] = aConnection['userData']; aConnection['C'] = credentials['C']; aConnection['userData']['s'] = credentials['s']; aConnection['userData']['v'] = credentials['v']; aConnection['userData']['version'] = credentials['version']; aConnection['userData']['userDetails'] = parameters['user']['header']; aConnection['userData']['userDetailsVersion'] = parameters['user']['version']; aConnection['userData']['statistics'] = parameters['user']['statistics']; aConnection['userData']['lock'] = parameters['user']['lock']; delete this.data()['users'][oldCValue]; result = {result:"done", parameters:parameters}; } } else { throw Clipperz.PM.Proxy.Offline.DataStore.exception.ReadOnly; } //===================================================================== /* } else if (someParameters.message == 'updateData') { if (this.isReadOnly() == false) { var i, c; -//console.log("###==============================================================="); -//console.log("###>>>", Clipperz.Base.serializeJSON(someParameters)); -//console.log("###--- userData", Clipperz.Base.serializeJSON(this.userData())); if (this.userData()['lock'] != someParameters['parameters']['user']['lock']) { throw "the lock attribute is not processed correctly" } this.userData()['userDetails'] = someParameters['parameters']['user']['header']; this.userData()['statistics'] = someParameters['parameters']['user']['statistics']; this.userData()['userDetailsVersions'] = someParameters['parameters']['user']['version']; c = someParameters['parameters']['records'].length; for (i=0; i<c; i++) { var currentRecord; var currentRecordData; currentRecordData = someParameters['parameters']['records'][i]; currentRecord = this.userData()['records'][currentRecordData['record']['reference']]; if (currentRecord == null) { } currentRecord['data'] = currentRecordData['record']['data']; currentRecord['version'] = currentRecordData['record']['version']; currentRecord['currentVersion'] = currentRecordData['currentRecordVersion']['reference']; currentRecord['versions'][currentRecordData['currentRecordVersion']['reference']] = { 'data': currentRecordData['currentRecordVersion']['data'], 'version': currentRecordData['currentRecordVersion']['version'], 'previousVersion': currentRecordData['currentRecordVersion']['previousVersion'], 'previousVersionKey': currentRecordData['currentRecordVersion']['previousVersionKey'] } } this.userData()['lock'] = Clipperz.PM.Crypto.randomKey(); result['lock'] = this.userData()['lock']; result['result'] = 'done'; -//console.log("###<<< userData", Clipperz.Base.serializeJSON(this.userData())); } else { throw Clipperz.PM.Proxy.Offline.DataStore.exception.ReadOnly; } */ //===================================================================== } else if (someParameters.message == 'saveChanges') { if (this.isReadOnly() == false) { var i, c; -//console.log("###==============================================================="); -//console.log("###>>>", someParameters); -//console.log("###>>>", Clipperz.Base.serializeJSON(someParameters)); -//console.log("###--- userData", Clipperz.Base.serializeJSON(this.userData())); -//console.log("###==============================================================="); -//console.log("--- userData.lock ", this.userData()['lock']); -//console.log("--- parameters.lock", someParameters['parameters']['user']['lock']); if (aConnection['userData']['lock'] != someParameters['parameters']['user']['lock']) { throw "the lock attribute is not processed correctly" } aConnection['userData']['userDetails'] = someParameters['parameters']['user']['header']; aConnection['userData']['statistics'] = someParameters['parameters']['user']['statistics']; aConnection['userData']['userDetailsVersions'] = someParameters['parameters']['user']['version']; c = someParameters['parameters']['records']['updated'].length; for (i=0; i<c; i++) { var currentRecord; var currentRecordData; currentRecordData = someParameters['parameters']['records']['updated'][i]; currentRecord = aConnection['userData']['records'][currentRecordData['record']['reference']]; if ( (typeof(aConnection['userData']['records'][currentRecordData['record']['reference']]) == 'undefined') && (typeof(currentRecordData['currentRecordVersion']) == 'undefined') ) { -//console.log("######## SHIT HAPPENS"); throw "Record added without a recordVersion"; } if (currentRecord == null) { currentRecord = {}; currentRecord['versions'] = {}; currentRecord['creationDate'] = Clipperz.PM.Date.formatDateWithUTCFormat(new Date()); currentRecord['accessDate'] = Clipperz.PM.Date.formatDateWithUTCFormat(new Date()); aConnection['userData']['records'][currentRecordData['record']['reference']] = currentRecord; } currentRecord['data'] = currentRecordData['record']['data']; currentRecord['version'] = currentRecordData['record']['version']; currentRecord['updateDate'] = Clipperz.PM.Date.formatDateWithUTCFormat(new Date()); if (typeof(currentRecordData['currentRecordVersion']) != 'undefined') { currentRecord['currentVersion'] = currentRecordData['currentRecordVersion']['reference']; currentRecord['versions'][currentRecordData['currentRecordVersion']['reference']] = { 'data': currentRecordData['currentRecordVersion']['data'], 'version': currentRecordData['currentRecordVersion']['version'], 'previousVersion': currentRecordData['currentRecordVersion']['previousVersion'], 'previousVersionKey': currentRecordData['currentRecordVersion']['previousVersionKey'], 'creationDate': Clipperz.PM.Date.formatDateWithUTCFormat(new Date()), 'updateDate': Clipperz.PM.Date.formatDateWithUTCFormat(new Date()), 'accessDate': Clipperz.PM.Date.formatDateWithUTCFormat(new Date()) } } } c = someParameters['parameters']['records']['deleted'].length; for (i=0; i<c; i++) { var currentRecordReference; currentRecordReference = someParameters['parameters']['records']['deleted'][i]; -//console.log("DELETING records", currentRecordReference); delete aConnection['userData']['records'][currentRecordReference]; } aConnection['userData']['lock'] = Clipperz.PM.Crypto.randomKey(); result['lock'] = aConnection['userData']['lock']; result['result'] = 'done'; -//console.log("###<<< userData", Clipperz.Base.serializeJSON(this.userData())); } else { throw Clipperz.PM.Proxy.Offline.DataStore.exception.ReadOnly; } //===================================================================== // // U N H A N D L E D M e t h o d // //===================================================================== } else { - MochiKit.Logging.logError("Clipperz.PM.Proxy.Test.message - unhandled message: " + someParameters.message); + Clipperz.logError("Clipperz.PM.Proxy.Test.message - unhandled message: " + someParameters.message); } result = { result: result, toll: this.getTollForRequestType('MESSAGE') } // return MochiKit.Async.succeed(result); return result; }, //------------------------------------------------------------------------- '_logout': function(someParameters) { // return MochiKit.Async.succeed({result: 'done'}); return {result: 'done'}; }, //========================================================================= //######################################################################### 'isTestData': function(aConnection) { return (typeof(aConnection['userData']['__masterkey_test_value__']) != 'undefined'); }, 'userDetails': function(aConnection) { var result; if (this.isTestData(aConnection)) { var serializedHeader; var version; -//MochiKit.Logging.logDebug("### test data"); +//Clipperz.logDebug("### test data"); version = aConnection['userData']['userDetailsVersion']; serializedHeader = Clipperz.Base.serializeJSON(aConnection['userData']['userDetails']); result = Clipperz.PM.Crypto.encryptingFunctions.versions[version].encrypt(aConnection['userData']['__masterkey_test_value__'], serializedHeader); } else { -//MochiKit.Logging.logDebug("### NOT test data"); +//Clipperz.logDebug("### NOT test data"); result = aConnection['userData']['userDetails']; } return result; }, 'statistics': function(aConnection) { var result; if (aConnection['userData']['statistics'] != null) { if (this.isTestData(aConnection)) { var serializedStatistics; var version; version = aConnection['userData']['userDetailsVersion']; serializedStatistics = Clipperz.Base.serializeJSON(aConnection['userData']['statistics']); result = Clipperz.PM.Crypto.encryptingFunctions.versions[version].encrypt(aConnection['userData']['__masterkey_test_value__'], serializedStatistics); } else { result = aConnection['userData']['statistics']; } } else { result = null; } return result; }, /* 'userSerializedEncryptedData': function(someData) { var deferredResult; var deferredContext; deferredContext = { 'data': someData }; deferredResult = new Clipperz.Async.Deferred('Proxy.Test.serializeUserEncryptedData', {trace:false}); deferredResult.addCallback(MochiKit.Base.bind(function(aDeferredContext) { aDeferredContext['user'] = this.createUserUsingConfigurationData(aDeferredContext['data']); return aDeferredContext; }, this)); deferredResult.addCallback(function(aDeferredContext) { // return aDeferredContext['user'].encryptedDataUsingVersion(aDeferredContext['data']['version']); return aDeferredContext['user'].serializedDataUsingVersion(MochiKit.Base.values(aDeferredContext['user'].records()), aDeferredContext['data']['version']); }); deferredResult.addCallback(function(aUserEncryptedData) { deferredContext['encryptedData'] = aUserEncryptedData; return deferredContext; }); deferredResult.addCallback(function(aDeferredContext) { var connection; connection = new Clipperz.PM.Connection.communicationProtocol.versions[aDeferredContext['data']['connectionVersion']]() aDeferredContext['credentials'] = connection.serverSideUserCredentials(aDeferredContext['user'].username(),aDeferredContext['user'].passphrase()); return aDeferredContext; }); // deferredResult.addCallback(function(aDeferredContext) { -//console.log("#-#-#-#-#", aDeferredContext); // return aDeferredContext['user'].serializedDataUsingVersion(MochiKit.Base.values(aDeferredContext['user'].records()), aDeferredContext['data']['version']); // }, deferredContext); // deferredResult.addCallback(function(aUserSerializedData) { -//console.log("USER SERIALIZED DATA", aUserSerializedData); // }); // // deferredResult.addCallback(MochiKit.Async.succeed, deferredContext); deferredResult.callback(deferredContext); return deferredResult; }, 'createUserUsingConfigurationData': function(someData) { var result; var user; var recordLabel; user = new Clipperz.PM.DataModel.User(); user.initForTests(); user.setUsername(someData['username']); user.setPassphrase(someData['passphrase']); for (recordLabel in someData['records']) { var recordData; var record; var i, c; recordData = someData['records'][recordLabel]; record = new Clipperz.PM.DataModel.Record({user:user, label:recordLabel}); record.setNotes(recordData['notes']); c = recordData['fields'].length; for (i=0; i<c; i++) { var recordField; recordField = new Clipperz.PM.DataModel.RecordField(); recordField.setLabel(recordData['fields'][i]['name']); recordField.setValue(recordData['fields'][i]['value']); recordField.setType(recordData['fields'][i]['type']); record.addField(recordField); } user.addRecord(record, true); } result = user; return result; }, */ //========================================================================= __syntaxFix__: "syntax fix" }); Clipperz.PM.Proxy.Offline.DataStore['exception'] = { 'ReadOnly': new MochiKit.Base.NamedError("Clipperz.PM.Proxy.Offline.DataStore.exception.ReadOnly") };
\ No newline at end of file diff --git a/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.Offline.js b/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.Offline.js index a86ac4f..5764bda 100644 --- a/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.Offline.js +++ b/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.Offline.js @@ -1,64 +1,62 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } //============================================================================= Clipperz.PM.Proxy.Offline = function(args) { args = args || {}; Clipperz.PM.Proxy.Offline.superclass.constructor.call(this, args); this._dataStore = args.dataStore || new Clipperz.PM.Proxy.Offline.DataStore(args); return this; } Clipperz.Base.extend(Clipperz.PM.Proxy.Offline, Clipperz.PM.Proxy, { 'toString': function () { return "Clipperz.PM.Proxy.Offline"; }, //------------------------------------------------------------------------- 'dataStore': function () { return this._dataStore; }, //------------------------------------------------------------------------- 'sendMessage': function(aFunctionName, someParameters) { return this.dataStore().processMessage(aFunctionName, someParameters); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.OfflineCache.js b/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.OfflineCache.js index 803c590..f628975 100644 --- a/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.OfflineCache.js +++ b/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.OfflineCache.js @@ -1,65 +1,63 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } //============================================================================= Clipperz.PM.Proxy.OfflineCache = function(args) { args = args || {}; Clipperz.PM.Proxy.Offline.superclass.constructor.call(this, args); // this._dataStore = args.dataStore || new Clipperz.PM.Proxy.Offline.DataStore(args); return this; } Clipperz.Base.extend(Clipperz.PM.Proxy.OfflineCache, Clipperz.PM.Proxy, { 'toString': function () { return "Clipperz.PM.Proxy.OfflineCache"; }, //------------------------------------------------------------------------- // 'dataStore': function () { // return this._dataStore; // }, //------------------------------------------------------------------------- 'sendMessage': function(aFunctionName, someParameters) { throw Clipperz.Base.exception.MethodNotImplementedYet; // return this.dataStore().processMessage(aFunctionName, someParameters); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.Test.js b/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.Test.js index d554c6a..d459726 100644 --- a/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.Test.js +++ b/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.Test.js @@ -1,164 +1,156 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Proxy) == 'undefined') { Clipperz.PM.Proxy = {}; } //============================================================================= Clipperz.PM.Proxy.Test = function(args) { Clipperz.PM.Proxy.Test.superclass.constructor.call(this, args); args = args || {}; this._expectedRequests = (args.shouldCheckExpectedRequests === true) ? [] : null; this._isExpectingRequests = true; this._unexpectedRequests = []; this.dataStore().resetData(); return this; } Clipperz.Base.extend(Clipperz.PM.Proxy.Test, Clipperz.PM.Proxy.Offline, { 'toString': function() { return "Clipperz.PM.Proxy.Test"; }, //========================================================================= 'expectedRequests': function () { return this._expectedRequests; }, //------------------------------------------------------------------------- 'shouldCheckExpectedRequests': function () { return (this._expectedRequests != null); }, 'setShouldCheckExpectedRequests': function(aValue) { if (aValue) { this._expectedRequests = aValue; } else { this._expectedRequests = null; } }, //------------------------------------------------------------------------- 'shouldNotReceiveAnyFurtherRequest': function () { this._isExpectingRequests = false; }, 'mayReceiveMoreRequests': function () { this._isExpectingRequests = true; this.resetUnexpectedRequests(); }, 'isExpectingRequests': function () { return this._isExpectingRequests; }, //------------------------------------------------------------------------- 'unexpectedRequests': function () { return this._unexpectedRequests; }, 'resetUnexpectedRequests': function () { this._unexpectedRequests = []; }, //------------------------------------------------------------------------- 'testExpectedRequestParameters': function (aPath, anActualRequest, anExpectedRequest) { var aKey; -//console.log(">>> Proxy.testExpectedRequestParameters [" + aPath + "]", anActualRequest, anExpectedRequest); for (aKey in anExpectedRequest) { if (typeof(anActualRequest[aKey]) == 'undefined') { throw "the expected paramter [" + aKey + "] is missing from the actual request"; } if (typeof(anExpectedRequest[aKey]) == 'object') { this.testExpectedRequestParameters(aPath + "." + aKey, anActualRequest[aKey], anExpectedRequest[aKey]) } else { if (! anExpectedRequest[aKey](anActualRequest[aKey])) { throw "wrong value for paramter [" + aKey + "]; got '" + anActualRequest[aKey] + "'"; } } } -//console.log("<<< Proxy.testExpectedRequestParameters"); }, //------------------------------------------------------------------------- 'checkRequest': function(aFunctionName, someParameters) { if (this.shouldCheckExpectedRequests()) { var expectedRequest; -//console.log(">>> Proxy.Test.checkRequest - " + aFunctionName, someParameters); expectedRequest = this.expectedRequests().pop(); -//console.log("--- Proxy.Test.checkRequest - expectedRequest", expectedRequest); if (expectedRequest == null) { throw "Proxy.Test.sentMessage: no expected result specified. Got request '" + aFunctionName + "': " + someParameters; } try { if (aFunctionName != expectedRequest.functionName) { throw "wrong function name. Got '" + aFunctionName + "', expected '" + expectedRequest.request.functionName + "'"; } this.testExpectedRequestParameters("parameters", someParameters, expectedRequest.parameters); } catch(exception) { -//console.log("EXCEPTION: Proxy.Test.sentMessage[" + expectedRequest.name + "]", exception) throw "Proxy.Test.sentMessage[" + expectedRequest.name + "]: " + exception; } } -//console.log("<<< Proxy.Test.checkRequest"); }, //========================================================================= 'sendMessage': function(aFunctionName, someParameters) { var result; if (this.isExpectingRequests() == false) { // throw Clipperz.PM.Connection.exception.UnexpectedRequest; Clipperz.log("UNEXPECTED REQUEST " + aFunctionName /* + ": " + Clipperz.Base.serializeJSON(someParameters) */); this.unexpectedRequests().push({'functionName':aFunctionName, 'someParameters': someParameters}); }; this.checkRequest(aFunctionName, someParameters); result = Clipperz.PM.Proxy.Test.superclass.sendMessage.call(this, aFunctionName, someParameters); return result; }, //========================================================================= __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/Strings.js b/frontend/gamma/js/Clipperz/PM/Strings.js index a051365..7e855ff 100644 --- a/frontend/gamma/js/Clipperz/PM/Strings.js +++ b/frontend/gamma/js/Clipperz/PM/Strings.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Strings) == 'undefined') { Clipperz.PM.Strings = {}; } if (typeof(Clipperz.PM.Strings.Languages) == 'undefined') { Clipperz.PM.Strings.Languages = {}; } //----------------------------------------------------------------------------- /* Clipperz.PM.Strings.standardStrings = { 'loginPanelSwitchLanguageSelectOptions': [ / * {tag:'option', html:"Arabic (Oman) (العربية)", value:'ar-OM', disabled:true}, {tag:'option', html:"Arabic (Syria) (العربية)", value:'ar-SY', disabled:true}, {tag:'option', html:"Bahasa Indonesia", value:'id-ID', disabled:true}, {tag:'option', html:"Bulgarian (Български)", value:'bg-BG', disabled:true}, {tag:'option', html:"Català", value:'ca-ES', disabled:true}, {tag:'option', html:"Chinese (Simplified) (简体中文)", value:'zh-CN', disabled:true}, {tag:'option', html:"Chinese (Traditional) (正體中文)", value:'zh-TW', disabled:true}, {tag:'option', html:"Czech (Česky)", value:'cs-CZ', disabled:true}, {tag:'option', html:"Dansk", value:'da-DK', disabled:true}, {tag:'option', html:"Deutsch", value:'de-DE'/ *, disabled:true* /}, {tag:'option', html:"English (American)", value:'en-US'/ *, disabled:true* /}, {tag:'option', html:"English (British)", value:'en-GB'/ *, disabled:true* /}, {tag:'option', html:"English (Canadian)", value:'en-CA'/ *, disabled:true* /}, {tag:'option', html:"Español", value:'es-ES', disabled:true}, {tag:'option', html:"Eesti", value:'et-EE', disabled:true}, {tag:'option', html:"Français", value:'fr-FR', disabled:true}, {tag:'option', html:"Galego", value:'gl-ES', disabled:true}, {tag:'option', html:"Greek (Ελληνικά)", value:'el-GR', disabled:true}, {tag:'option', html:"Íslenska", value:'is-IS', disabled:true}, {tag:'option', html:"Italiano", value:'it-IT'/ *, disabled:true* /}, {tag:'option', html:"Japanese (日本語)", value:'ja-JP', disabled:true}, {tag:'option', html:"Korean (한국어)", value:'ko-KR', disabled:true}, {tag:'option', html:"Latviešu", value:'lv-LV', disabled:true}, {tag:'option', html:"Lietuvių", value:'lt-LT', disabled:true}, {tag:'option', html:"Macedonian (Македонски)", value:'mk-MK', disabled:true}, {tag:'option', html:"Magyar", value:'hu-HU', disabled:true}, {tag:'option', html:"Nederlands", value:'nl-NL', disabled:true}, {tag:'option', html:"Norsk bokmål", value:'nb-NO', disabled:true}, {tag:'option', html:"Norsk nynorsk", value:'nn-NO', disabled:true}, {tag:'option', html:"Persian (Western) (فارسى)", value:'fa-IR', disabled:true}, {tag:'option', html:"Polski", value:'pl-PL', disabled:true}, {tag:'option', html:"Português", value:'pt-PT'/ *, disabled:true* /}, {tag:'option', html:"Português Brasileiro", value:'pt-BR'/ *, disabled:true* /}, {tag:'option', html:"Românä", value:'ro-RO', disabled:true}, {tag:'option', html:"Russian (Русский)", value:'ru-RU', disabled:true}, {tag:'option', html:"Slovak (Slovenčina)", value:'sk-SK', disabled:true}, {tag:'option', html:"Slovenian (Slovenščina)", value:'sl-SI', disabled:true}, {tag:'option', html:"Suomi", value:'fi-FI', disabled:true}, {tag:'option', html:"Svenska", value:'sv-SE', disabled:true}, {tag:'option', html:"Thai (ไทย)", value:'th-TH', disabled:true}, {tag:'option', html:"Türkçe", value:'tr-TR', disabled:true}, {tag:'option', html:"Ukrainian (Українська)", value:'uk-UA', disabled:true} * / {tag:'option', html:"Arabic (العربية)", value:"ar", disabled:true, cls:'disabledOption'}, // {tag:'option', html:"Chinese (中文)", value:"zh", disabled:true}, {tag:'option', html:"Chinese (Simplified) (简体中文)", value:'zh-CN'}, {tag:'option', html:"Dutch (Nederlands)", value:"nl-NL", disabled:true, cls:'disabledOption'}, {tag:'option', html:"English", value:"en-US"}, {tag:'option', html:"French (Français)", value:"fr-FR"}, {tag:'option', html:"German (Deutsch)", value:"de-DE", disabled:true, cls:'disabledOption'}, {tag:'option', html:"Greek (Ελληνικά)", value:"el-GR", disabled:true, cls:'disabledOption'}, {tag:'option', html:"Hebrew (עברית)", value:"he-IL", disabled:true, cls:'disabledOption'}, {tag:'option', html:"Italian (Italiano)", value:"it-IT"}, {tag:'option', html:"Japanese (日本語)", value:"ja-JP"}, {tag:'option', html:"Korean (한국어)", value:"ko-KR", disabled:true, cls:'disabledOption'}, {tag:'option', html:"Norwegian (Norsk)", value:"no", disabled:true, cls:'disabledOption'}, {tag:'option', html:"Persian (فارسی)", value:"fa-IR", disabled:true, cls:'disabledOption'}, {tag:'option', html:"Polish (Polski)", value:"pl-PL", disabled:true, cls:'disabledOption'}, {tag:'option', html:"Portuguese (Português)", value:"pt-BR"}, {tag:'option', html:"Russian (Русский)", value:"ru-RU", disabled:true, cls:'disabledOption'}, {tag:'option', html:"Spanish (Español)", value:"es-ES"}, {tag:'option', html:"Swedish (Svenska)", value:"sv-SE", disabled:true, cls:'disabledOption'}, {tag:'option', html:"Turkish (Türkçe)", value:"tr-TR", disabled:true, cls:'disabledOption'}, {tag:'option', html:"Vietnamese (Tiếng Việt)", value:"vi-VN", disabled:true, cls:'disabledOption'} ] } */ Clipperz.PM.Strings.GeneralSettings = { 'defaults': { // 'loginFormAarghThatsBadUrl': "http://www.clipperz.com/support/faq/account_faq", // 'loginFormVerifyTheCodeUrl': "http://www.clipperz.com/learn_more/reviewing_the_code", // 'donateHeaderLinkUrl': "http://www.clipperz.com/donations", // 'creditsHeaderLinkUrl': "http://www.clipperz.com/credits", // 'feedbackHeaderLinkUrl': "http://www.clipperz.com/contact", // 'helpHeaderLinkUrl': "http://www.clipperz.com/support/user_guide", // 'forumHeaderLinkUrl': "http://www.clipperz.com/forum", // 'httpAuthBookmarkletConfiguration': {tag:'textarea', id:'httpAuthDefaultConfiguration', html:"" + // "{ \"page\":{\"title\":\"HTTP authentication\"}," + "\n" + // " \"form\":{\"attributes\": {" + "\n" + // " \"action\":\"\"," + "\n" + @@ -148,145 +146,140 @@ Clipperz.PM.Strings.GeneralSettings = { Clipperz.PM.Strings.defaultLanguages = { 'default': "en-us", // 'de': "de-de", // 'el': "el-gr", // 'he': "he-il", // 'ru': "ru-ru", 'fr': "fr-fr", 'es': "es-es", 'zh': "zh-cn", 'ja': "ja-jp", 'pt': "pt-br", 'it': "it-it", 'en': "en-us" } Clipperz.PM.Strings.inputTypeToRecordFieldType = { 'text': 'TXT', 'password': 'PWD', 'checkbox': 'CHECK', 'radio': 'RADIO', 'select': 'SELECT' }; //----------------------------------------------------------------------------- Clipperz.PM.Strings.translateBookmarklet = function (aBookmarkletString) { var result; result = aBookmarkletString; result = result.replace(/@BOOKMARKLET_NO_EXCEPTION_MESSAGE@/, Clipperz.PM.Strings.getValue('bookmarkletCopy.noExceptionMessage')); result = result.replace(/@BOOKMARKLET_EXCEPTION_MESSAGE@/, Clipperz.PM.Strings.getValue('bookmarkletCopy.exceptionMessage')); result = result.replace(/@BOOKMARKLET_COPY@/, Clipperz.PM.Strings.getValue('bookmarkletCopy.copy')); result = result.replace(/@BOOKMARKLET_SUCCESSFUL_MESSAGE@/, Clipperz.PM.Strings.getValue('bookmarkletCopy.successfulMessage')); result = result.replace(/@BOOKMARKLET_FAIL_MESSAGE@/, Clipperz.PM.Strings.getValue('bookmarkletCopy.failMessage')); return result; } //----------------------------------------------------------------------------- Clipperz.PM.Strings.Languages.setSelectedLanguage = function(aLanguage) { var language; var selectedLanguage; language = (aLanguage || Clipperz.PM.Strings.preferredLanguage || 'default').toLowerCase(); if (typeof(Clipperz.PM.Strings.defaultLanguages[language]) != 'undefined') { language = Clipperz.PM.Strings.defaultLanguages[language]; } if (typeof(Clipperz.PM.Strings.Languages[language]) != 'undefined') { selectedLanguage = language; } else if (typeof(Clipperz.PM.Strings.defaultLanguages[language.substr(0,2)]) != 'undefined') { selectedLanguage = Clipperz.PM.Strings.defaultLanguages[language.substr(0,2)]; } else { selectedLanguage = Clipperz.PM.Strings.defaultLanguages['default']; } if (selectedLanguage != Clipperz.PM.Strings.selectedLanguage) { var translations; Clipperz.PM.Strings.selectedLanguage = selectedLanguage; translations = {}; // MochiKit.Base.update(translations, Clipperz.PM.Strings.standardStrings) MochiKit.Base.updatetree(translations, Clipperz.PM.Strings.Languages['defaults']); MochiKit.Base.updatetree(translations, Clipperz.PM.Strings.GeneralSettings['defaults']); MochiKit.Base.updatetree(translations, Clipperz.PM.Strings.Languages[Clipperz.PM.Strings.defaultLanguages['default']]); MochiKit.Base.updatetree(translations, Clipperz.PM.Strings.GeneralSettings[Clipperz.PM.Strings.defaultLanguages['default']]); MochiKit.Base.updatetree(translations, Clipperz.PM.Strings.Languages[selectedLanguage]); MochiKit.Base.updatetree(translations, Clipperz.PM.Strings.GeneralSettings[selectedLanguage]); Clipperz.PM.Strings.stringsObjectStore = new Clipperz.KeyValueObjectStore(/*{'name':'String.stringsObjectStore [1]'}*/); Clipperz.PM.Strings.stringsObjectStore.initWithValues(translations); if (typeof(bookmarklet) != 'undefined') { Clipperz.PM.Strings.stringsObjectStore.setValue('bookmarklet', Clipperz.PM.Strings.translateBookmarklet(bookmarklet)); } MochiKit.Signal.signal(Clipperz.PM.Strings.Languages, 'switchLanguage', selectedLanguage); } } //----------------------------------------------------------------------------- Clipperz.PM.Strings.getValue = function (aKeyPath, someKeyValues) { var result; result = Clipperz.PM.Strings.stringsObjectStore.getValue(aKeyPath); -//try { if (typeof(result) == 'string') { if (typeof (someKeyValues) != 'undefined') { var key; for (key in someKeyValues) { result = result.replace( new RegExp(key), someKeyValues[key]); - // result.replace(, ''); } } result = result.replace(new RegExp('\n'), '<br>'); } -//} catch (exception) { -// console.log("####", result, aKeyPath, someKeyValues, exception); -//} return result; } Clipperz.PM.Strings.errorDescriptionForException = function (anException) { var result; result = Clipperz.PM.Strings.getValue('exceptionsMessages' + '.' + anException.name); if (result == null) { result = anException.message; } return result; }, //----------------------------------------------------------------------------- Clipperz.PM.Strings.Languages.initSetup = function() { var language; var languageParser; language = navigator.language || navigator.userLanguage; // en, en-US, .... "de", "nb-no" languageParser = new RegExp("language=([a-z]{2}(?:\-[a-z]{2})?)(\&|$)", "i"); if (languageParser.test(window.location.search)) { language = RegExp.$1; } Clipperz.PM.Strings.preferredLanguage = language.toLowerCase(); Clipperz.PM.Strings.Languages.setSelectedLanguage(Clipperz.PM.Strings.preferredLanguage); } //----------------------------------------------------------------------------- diff --git a/frontend/gamma/js/Clipperz/PM/Strings/MessagePanelConfigurations.js b/frontend/gamma/js/Clipperz/PM/Strings/MessagePanelConfigurations.js index 7f6c52f..7565d2d 100644 --- a/frontend/gamma/js/Clipperz/PM/Strings/MessagePanelConfigurations.js +++ b/frontend/gamma/js/Clipperz/PM/Strings/MessagePanelConfigurations.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Strings) == 'undefined') { Clipperz.PM.Strings = {}; } Clipperz.PM.Strings.messagePanelConfigurations = { //------------------------------------------------------------------------- // // Registration - connection // 'registration_verify': function() { return { 'title': null, 'text': Clipperz.PM.Strings['connectionRegistrationSendingRequestMessageText'] } }, 'registration_sendingCredentials': function() { return { 'title': null, 'text': Clipperz.PM.Strings['connectionRegistrationSendingCredentialsMessageText'] } }, //------------------------------------------------------------------------- // // One Time Password login message panel // 'OTP_login_start': function() { return { 'title': Clipperz.PM.Strings['OTPloginMessagePanelInitialTitle'], 'text': Clipperz.PM.Strings['OTPloginMessagePanelInitialText'], 'steps': '+3', 'buttons': {} } }, 'OTP_login_loadingOTP': function() { return { 'title': Clipperz.PM.Strings['OTPloginMessagePanelLoadingTitle'], 'text': Clipperz.PM.Strings['OTPloginMessagePanelLoadingText'] } }, 'OTP_login_extractingPassphrase': function() { return { 'title': Clipperz.PM.Strings['OTPloginMessagePanelProcessingTitle'], 'text': Clipperz.PM.Strings['OTPloginMessagePanelProcessingText'] } }, //------------------------------------------------------------------------- // // Login message panel // 'login_start': function() { return { 'title': Clipperz.PM.Strings['loginMessagePanelInitialTitle'], 'text': Clipperz.PM.Strings['loginMessagePanelInitialText'], 'steps': '+7', 'buttons': { 'ok': Clipperz.PM.Strings['loginMessagePanelInitialButtonLabel'] } } }, 'login_connected': function() { return { 'title': Clipperz.PM.Strings['loginMessagePanelConnectedTitle'], 'text': Clipperz.PM.Strings['loginMessagePanelConnectedText'], 'buttons': {} } }, 'login_failed': function() { return { 'title': Clipperz.PM.Strings['loginMessagePanelFailureTitle'], 'text': Clipperz.PM.Strings['loginMessagePanelFailureText'], 'button': Clipperz.PM.Strings['loginMessagePanelFailureButtonLabel'] } }, //------------------------------------------------------------------------- // // Login message panel - connection // 'connection_sendingCredentials': function() { return { 'title': Clipperz.PM.Strings['connectionLoginSendingCredentialsMessageTitle'], 'text': Clipperz.PM.Strings['connectionLoginSendingCredentialsMessageText'] diff --git a/frontend/gamma/js/Clipperz/PM/Strings/Strings_defaults.js b/frontend/gamma/js/Clipperz/PM/Strings/Strings_defaults.js index 101ed3f..aefd94a 100644 --- a/frontend/gamma/js/Clipperz/PM/Strings/Strings_defaults.js +++ b/frontend/gamma/js/Clipperz/PM/Strings/Strings_defaults.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Strings) == 'undefined') { Clipperz.PM.Strings = {}; } if (typeof(Clipperz.PM.Strings.Languages) == 'undefined') { Clipperz.PM.Strings.Languages = {}; } //============================================================================= // // D E F A U L T S ( defaults ) // //============================================================================= Clipperz.PM.Strings.Languages['defaults'] = { 'elapsedTimeDescriptions': { 'MORE_THAN_A_MONTH_AGO': "more than a month ago", 'MORE_THAN_A_WEEK_AGO': "more than a week ago", 'MORE_THAN_*_WEEKS_AGO': "more than __elapsed__ weeks ago", 'YESTERDAY': "yesterday", '*_DAYS_AGO': "__elapsed__ days ago", 'ABOUT_AN_HOUR_AGO': "about an hour ago", '*_HOURS_AGO': "__elapsed__ hours ago", 'JUST_A_FEW_MINUTES_AGO': "just a few minutes ago", 'ABOUT_*_MINUTES_AGO': "about __elapsed__ minutes ago" }, /* 'unknown_ip': "unknown", 'countries': { '--': "unknown", 'AD': "Andorra", 'AE': "United Arab Emirates", 'AF': "Afghanistan", 'AG': "Antigua and Barbuda", 'AI': "Anguilla", 'AL': "Albania", 'AM': "Armenia", 'AN': "Netherlands Antilles", 'AO': "Angola", 'AP': "Non-Spec Asia Pas Location", 'AR': "Argentina", 'AS': "American Samoa", 'AT': "Austria", 'AU': "Australia", 'AW': "Aruba", 'AX': "Aland Islands", 'AZ': "Azerbaijan", 'BA': "Bosnia and Herzegowina", 'BB': "Barbados", 'BD': "Bangladesh", 'BE': "Belgium", 'BF': "Burkina Faso", 'BG': "Bulgaria", 'BH': "Bahrain", 'BI': "Burundi", 'BJ': "Benin", 'BM': "Bermuda", 'BN': "Brunei Darussalam", 'BO': "Bolivia", 'BR': "Brazil", 'BS': "Bahamas", 'BT': "Bhutan", 'BW': "Botswana", 'BY': "Belarus", 'BZ': "Belize", 'CA': "Canada", 'CD': "Congo the Democratic Republic of the", 'CF': "Central African Republic", 'CH': "Switzerland", 'CI': "Cote D'ivoire", 'CK': "Cook Islands", 'CL': "Chile", 'CM': "Cameroon", 'CN': "China", 'CO': "Colombia", 'CR': "Costa Rica", 'CS': "Serbia and Montenegro", 'CU': "Cuba", 'CY': "Cyprus", 'CZ': "Czech Republic", 'DE': "Germany", 'DJ': "Djibouti", 'DK': "Denmark", 'DO': "Dominican Republic", 'DZ': "Algeria", 'EC': "Ecuador", 'EE': "Estonia", 'EG': "Egypt", 'ER': "Eritrea", 'ES': "Spain", 'ET': "Ethiopia", 'EU': "European Union", 'FI': "Finland", 'FJ': "Fiji", diff --git a/frontend/gamma/js/Clipperz/PM/Strings/Strings_en-US.js b/frontend/gamma/js/Clipperz/PM/Strings/Strings_en-US.js index b540633..85d55c0 100644 --- a/frontend/gamma/js/Clipperz/PM/Strings/Strings_en-US.js +++ b/frontend/gamma/js/Clipperz/PM/Strings/Strings_en-US.js @@ -1,118 +1,116 @@ /* -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/. */ //============================================================================= // // E N G L I S H A M E R I C A N ( en_US ) // //============================================================================= Clipperz.PM.Strings.Languages['en-us'] = { /* // Login page - description 'clipperzServiceDescription': "\ <!-- FIX CSS DONE --> \ <h2>Keep it to yourself!</h2>\ <ul>\ <li>\ <h3>Clipperz is:</h3>\ <ul>\ <li><p>a secure and simple password manager</p></li>\ <li><p>an effective single sign-on solution</p></li>\ <li><p>a digital vault for your personal data</p></li>\ </ul>\ </li>\ <li>\ <h3>With Clipperz you can:</h3>\ <ul>\ <li><p>store and manage your passwords and online credentials</p></li>\ <li><p>login to your web services without entering any username or password</p></li>\ <li><p>protect all your sensitive data: codes for burglar alarms, PINs, credit card numbers, …</p></li>\ <li><p>share secrets with family members and associates (coming soon)</p></li>\ </ul>\ </li>\ <li>\ <h3>Clipperz benefits:</h3>\ <ul>\ <li><p>free and completely anonymous</p></li>\ <li><p>access it any time from any computer</p></li>\ <li><p>no software to download and nothing to install</p></li>\ <li><p>avoid keeping secrets on your PC or on paper</p></li>\ </ul>\ </li>\ <li>\ <h3>Clipperz security:</h3>\ <ul>\ <li><p>your secrets are locally encrypted by your browser before being uploaded to Clipperz</p></li>\ <li><p>the encryption key is a passphrase known only to you</p></li>\ <li><p>Clipperz hosts your sensitive data in encrypted form and could never actually access the data in its plain form</p></li>\ <li><p>Clipperz is built upon standard encryption schemes, nothing fancies or homemade</p></li>\ <li><p>you can review the source code anytime you like, but you need to know nothing about cryptography to be an happy user!</p></li>\ </ul>\ </li>\ <li>\ <a href=\"http://www.clipperz.com\" target=\"_blank\">Learn more</a>\ </li>\ </ul>", 'loginFormTitle': "login with your Clipperz account", 'loginFormUsernameLabel': "username", 'loginFormPassphraseLabel': "passphrase", 'loginFormDontHaveAnAccountLabel': "don\'t have an account?", 'loginFormCreateOneLabel': "create one", 'loginFormForgotYourCredentialsLabel': "forgot your credentials?", 'loginFormAarghThatsBadLabel': "aargh! that\'s bad!", 'loginFormAfraidOfMaliciousScriptsLabel': "afraid of malicious scripts?", 'loginFormVerifyTheCodeLabel': "verify the code", 'loginFormButtonLabel': "Login", 'loginFormOneTimePasswordCheckboxLabel': "use a one-time passphrase", 'loginFormOneTimePasswordCheckboxDescription': "", // Login page - language selection 'loginPanelSwithLanguageDescription': "<h5>Switch to your preferred language</h5>", // Login page - browser compatibility 'browserCompatibilityDescription': "<p>Have a better and safer Clipperz experience with Firefox. However Clipperz works just fine also with Opera, Safari and MS Internet Explorer!</p>", // Login with OTP - message panel 'OTPloginMessagePanelInitialTitle': "Logging in using a one-time passphrase", 'OTPloginMessagePanelInitialText': "Sending OTP credentials …", 'OTPloginMessagePanelLoadingTitle': "Logging in using a one-time passphrase", 'OTPloginMessagePanelLoadingText': "Fetching encrypted authentication data from the server …", 'OTPloginMessagePanelProcessingTitle': "Logging in using a one-time passphrase", 'OTPloginMessagePanelProcessingText': "Local decryption of authentication data", // Regular login - message panel 'loginMessagePanelInitialTitle': "Logging in …", 'loginMessagePanelInitialText': "---", 'loginMessagePanelInitialButtonLabel': "Cancel", 'loginMessagePanelConnectedTitle': "Connected", 'loginMessagePanelConnectedText': "Done", 'loginMessagePanelFailureTitle': "Error", 'loginMessagePanelFailureText': "Login failed", 'loginMessagePanelFailureButtonLabel': "Close", // Regular login - message panel - connection diff --git a/frontend/gamma/js/Clipperz/PM/Toll.js b/frontend/gamma/js/Clipperz/PM/Toll.js index bb31c43..e9c3092 100644 --- a/frontend/gamma/js/Clipperz/PM/Toll.js +++ b/frontend/gamma/js/Clipperz/PM/Toll.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } //============================================================================= Clipperz.PM.Toll = function(args) { args = args || {}; this._requestType = args.requestType; this._targetValue = args.targetValue; this._cost = args.cost; this._toll = null; return this; } Clipperz.PM.Toll.prototype = MochiKit.Base.update(null, { 'toString': function() { return "Clipperz.PM.Toll (" + this.requestType() + ": " + this.cost() + " - " + ((this.toll() == null)? 'UNPAID' : 'PAID') + ")"; }, //------------------------------------------------------------------------- 'requestType': function() { return this._requestType; }, //------------------------------------------------------------------------- 'targetValue': function() { return this._targetValue; }, //------------------------------------------------------------------------- 'cost': function() { return this._cost; }, //------------------------------------------------------------------------- 'toll': function() { return this._toll; }, //------------------------------------------------------------------------- /* '__pay': function() { var result; var targetData; var targetMatchSize; var prefixMatchingBits; var payment; var i; if (this.toll() == null) { i = 0; targetData = new Clipperz.ByteArray("0x" + this.targetValue()); targetMatchSize = this.cost(); payment = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32); do { var paymentData; //payment = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32); payment.increment(); paymentData = Clipperz.Crypto.SHA.sha256(payment); // prefixMatchingBits = this.prefixMatchingBits(targetData, paymentData); prefixMatchingBits = Clipperz.ByteArray.prefixMatchingBits(targetData, paymentData); i++; } while (prefixMatchingBits < targetMatchSize); this._toll = payment.toHexString().substring(2) } return this; }, */ //------------------------------------------------------------------------- 'innerDeferredPay': function (aTargetValue, aCost, aPayment) { var deferredResult; var result; var payment; var i; result = null; payment = aPayment; i = 0; while ((result == null) && (i < Clipperz.PM.Toll.numberOfCloseLoopIterations)) { diff --git a/frontend/gamma/js/Clipperz/PM/UI/Canvas/CoverActions/download.js b/frontend/gamma/js/Clipperz/PM/UI/Canvas/CoverActions/download.js index 25e82ca..f667526 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Canvas/CoverActions/download.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Canvas/CoverActions/download.js @@ -1,117 +1,115 @@ /* -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/. */ // // download.js // Download // // Created by Giulio Cesare Solaroli on 3/15/10 // Copyright 2010 Clipperz // This code was generated by Opacity. You may use or modify it in any way. // var kClipperz_PM_UI_Canvas_CoverActions_downloadWidth = 46.0; var kClipperz_PM_UI_Canvas_CoverActions_downloadHeight = 46.0; function Clipperz_PM_UI_Canvas_CoverActions_download(canvas, aColor, aFillColor, aThickness) { var context = canvas.getContext("2d"); var alignStroke; var resolution; var stroke; var path; var pointX; var pointY; if (window.devicePixelRatio) resolution = window.devicePixelRatio; else resolution = 1.0; resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_CoverActions_downloadWidth + canvas.height / kClipperz_PM_UI_Canvas_CoverActions_downloadHeight); context.save(); context.scale(canvas.width / kClipperz_PM_UI_Canvas_CoverActions_downloadWidth, canvas.height / kClipperz_PM_UI_Canvas_CoverActions_downloadHeight); context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_CoverActions_downloadWidth, kClipperz_PM_UI_Canvas_CoverActions_downloadHeight); // arrow stroke = aThickness; stroke *= resolution; if (stroke < 1.0) stroke = Math.ceil(stroke); else stroke = Math.round(stroke); stroke /= resolution; alignStroke = (0.5 * stroke * resolution) % 1.0; context.beginPath(); pointX = 16.5; pointY = 22.5; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.moveTo(pointX, pointY); pointX = 19.5; pointY = 8.5; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 30.038; pointY = 10.605; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 27.354; pointY = 24.354; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 33.28; pointY = 25.293; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 19.81; pointY = 36.828; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 10.07; pointY = 21.617; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 16.5; pointY = 22.5; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); context.closePath(); context.fillStyle = aFillColor; context.fill(); context.strokeStyle = aColor; context.lineWidth = stroke; context.lineCap = "square"; context.stroke(); context.restore(); } diff --git a/frontend/gamma/js/Clipperz/PM/UI/Canvas/CoverActions/look.js b/frontend/gamma/js/Clipperz/PM/UI/Canvas/CoverActions/look.js index ba425ec..dae5a2d 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Canvas/CoverActions/look.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Canvas/CoverActions/look.js @@ -1,118 +1,116 @@ /* -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/. */ // // look.js // Look // // Created by Giulio Cesare Solaroli on 3/15/10 // Copyright 2010 Clipperz // This code was generated by Opacity. You may use or modify it in any way. // var kClipperz_PM_UI_Canvas_CoverActions_lookWidth = 46.0; var kClipperz_PM_UI_Canvas_CoverActions_lookHeight = 46.0; function Clipperz_PM_UI_Canvas_CoverActions_look(canvas, aColor, aFillColor, aThickness) { var context = canvas.getContext("2d"); var alignStroke; var resolution; var stroke; var path; var pointX; var pointY; if (window.devicePixelRatio) resolution = window.devicePixelRatio; else resolution = 1.0; resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_CoverActions_lookWidth + canvas.height / kClipperz_PM_UI_Canvas_CoverActions_lookHeight); context.save(); context.scale(canvas.width / kClipperz_PM_UI_Canvas_CoverActions_lookWidth, canvas.height / kClipperz_PM_UI_Canvas_CoverActions_lookHeight); context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_CoverActions_lookWidth, kClipperz_PM_UI_Canvas_CoverActions_lookHeight); // Layer 6 stroke = aThickness; stroke *= resolution; if (stroke < 1.0) stroke = Math.ceil(stroke); else stroke = Math.round(stroke); stroke /= resolution; alignStroke = (0.5 * stroke * resolution) % 1.0; context.save(); context.translate(17.5, 23.0); context.rotate(-0.503); context.translate(-17.5, -23.0); context.beginPath(); pointX = 28.5; pointY = 31.5; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.moveTo(pointX, pointY); pointX = 28.5; pointY = 14.5; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 6.5; pointY = 14.5; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 6.5; pointY = 31.5; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 28.5; pointY = 31.5; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); context.closePath(); context.fillStyle = aFillColor; context.fill(); context.strokeStyle = aColor; context.lineWidth = stroke; context.lineCap = "square"; context.stroke(); context.restore(); // Layer 3 stroke = aThickness; stroke *= resolution; if (stroke < 1.0) stroke = Math.ceil(stroke); else stroke = Math.round(stroke); stroke /= resolution; alignStroke = (0.5 * stroke * resolution) % 1.0; context.save(); context.translate(22.5, 20.0); context.rotate(-0.071); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/directLogin.js b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/directLogin.js index 5c1f860..497fd05 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/directLogin.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/directLogin.js @@ -1,118 +1,116 @@ /* -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/. */ // // directLogin.js // directLogin // // Created by Giulio Cesare Solaroli on 3/7/10 // Copyright 2010 Clipperz // This code was generated by Opacity. You may use or modify it in any way. // var kClipperz_PM_UI_Canvas_Features_directLoginWidth = 76.0; var kClipperz_PM_UI_Canvas_Features_directLoginHeight = 76.0; function Clipperz_PM_UI_Canvas_Features_directLogin(canvas, aColor, aBannerColor, aBannerBackgroundColor) { var context = canvas.getContext("2d"); var alignStroke; var resolution; var stroke; var path; var pointX; var pointY; if (window.devicePixelRatio) resolution = window.devicePixelRatio; else resolution = 1.0; resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_Features_directLoginWidth + canvas.height / kClipperz_PM_UI_Canvas_Features_directLoginHeight); context.save(); context.scale(canvas.width / kClipperz_PM_UI_Canvas_Features_directLoginWidth, canvas.height / kClipperz_PM_UI_Canvas_Features_directLoginHeight); context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_Features_directLoginWidth, kClipperz_PM_UI_Canvas_Features_directLoginHeight); // Layer 2 stroke = 6.0; stroke *= resolution; if (stroke < 1.0) stroke = Math.ceil(stroke); else stroke = Math.round(stroke); stroke /= resolution; alignStroke = (0.5 * stroke * resolution) % 1.0; context.beginPath(); pointX = 30.0; pointY = 41.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.moveTo(pointX, pointY); pointX = 45.579; pointY = 25.451; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); context.strokeStyle = aColor; context.lineWidth = stroke; context.lineCap = "square"; context.stroke(); alignStroke = 0.0; context.beginPath(); pointX = 34.207; pointY = 45.697; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.moveTo(pointX, pointY); pointX = 24.101; pointY = 37.52; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 24.122; pointY = 47.828; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 34.207; pointY = 45.697; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); context.closePath(); context.fillStyle = aColor; context.fill(); stroke = 6.0; stroke *= resolution; if (stroke < 1.0) stroke = Math.ceil(stroke); else stroke = Math.round(stroke); stroke /= resolution; alignStroke = (0.5 * stroke * resolution) % 1.0; context.beginPath(); pointX = 24.631; diff --git a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/protect.js b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/protect.js index b829ed6..f015535 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/protect.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/protect.js @@ -1,118 +1,116 @@ /* -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/. */ // // protect.js // protect // // Created by Giulio Cesare Solaroli on 3/7/10 // Copyright 2010 Clipperz // This code was generated by Opacity. You may use or modify it in any way. // var kClipperz_PM_UI_Canvas_Features_protectWidth = 76.0; var kClipperz_PM_UI_Canvas_Features_protectHeight = 76.0; function Clipperz_PM_UI_Canvas_Features_protect(canvas, aColor, aBannerColor, aBannerBackgroundColor) { var context = canvas.getContext("2d"); var alignStroke; var resolution; var path; var pointX; var pointY; var controlPoint1X; var controlPoint1Y; var controlPoint2X; var controlPoint2Y; var stroke; if (window.devicePixelRatio) resolution = window.devicePixelRatio; else resolution = 1.0; resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_Features_protectWidth + canvas.height / kClipperz_PM_UI_Canvas_Features_protectHeight); context.save(); context.scale(canvas.width / kClipperz_PM_UI_Canvas_Features_protectWidth, canvas.height / kClipperz_PM_UI_Canvas_Features_protectHeight); context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_Features_protectWidth, kClipperz_PM_UI_Canvas_Features_protectHeight); // Layer 1 alignStroke = 0.0; context.beginPath(); pointX = 38.5; pointY = 36.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.moveTo(pointX, pointY); pointX = 37.068; pointY = 38.816; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 37.41; controlPoint1Y = 36.234; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 37.175; controlPoint2Y = 37.907; controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); pointX = 37.031; pointY = 40.802; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 36.991; controlPoint1Y = 39.474; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 36.98; controlPoint2Y = 40.141; controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); pointX = 37.258; pointY = 42.23; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 37.068; controlPoint1Y = 41.283; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 37.139; controlPoint2Y = 41.762; controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); pointX = 38.348; pointY = 43.979; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 37.402; controlPoint1Y = 42.799; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 37.682; controlPoint2Y = 43.798; diff --git a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/share.js b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/share.js index 8d73cc7..47972fc 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/share.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/share.js @@ -1,118 +1,116 @@ /* -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/. */ // // share.js // share // // Created by Giulio Cesare Solaroli on 3/7/10 // Copyright 2010 Clipperz // This code was generated by Opacity. You may use or modify it in any way. // var kClipperz_PM_UI_Canvas_Features_shareWidth = 76.0; var kClipperz_PM_UI_Canvas_Features_shareHeight = 76.0; function Clipperz_PM_UI_Canvas_Features_share(canvas, aColor, aBannerColor, aBannerBackgroundColor) { var context = canvas.getContext("2d"); var alignStroke; var resolution; var path; var pointX; var pointY; var controlPoint1X; var controlPoint1Y; var controlPoint2X; var controlPoint2Y; var stroke; if (window.devicePixelRatio) resolution = window.devicePixelRatio; else resolution = 1.0; resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_Features_shareWidth + canvas.height / kClipperz_PM_UI_Canvas_Features_shareHeight); context.save(); context.scale(canvas.width / kClipperz_PM_UI_Canvas_Features_shareWidth, canvas.height / kClipperz_PM_UI_Canvas_Features_shareHeight); context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_Features_shareWidth, kClipperz_PM_UI_Canvas_Features_shareHeight); // Layer 1 alignStroke = 0.0; context.beginPath(); pointX = 43.179; pointY = 18.621; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.moveTo(pointX, pointY); pointX = 37.163; pointY = 12.605; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 43.179; controlPoint1Y = 15.32; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 40.463; controlPoint2Y = 12.605; controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); pointX = 31.147; pointY = 18.621; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 33.863; controlPoint1Y = 12.605; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 31.147; controlPoint2Y = 15.32; controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); pointX = 37.163; pointY = 24.637; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 31.147; controlPoint1Y = 21.921; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 33.863; controlPoint2Y = 24.637; controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); pointX = 43.179; pointY = 18.621; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 40.463; controlPoint1Y = 24.637; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 43.179; controlPoint2Y = 21.921; diff --git a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/store.js b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/store.js index 572d9be..a4f30b2 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/store.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/store.js @@ -1,118 +1,116 @@ /* -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/. */ // // store.js // store // // Created by Giulio Cesare Solaroli on 3/7/10 // Copyright 2010 Clipperz // This code was generated by Opacity. You may use or modify it in any way. // var kClipperz_PM_UI_Canvas_Features_storeWidth = 76.0; var kClipperz_PM_UI_Canvas_Features_storeHeight = 76.0; function Clipperz_PM_UI_Canvas_Features_store(canvas, aColor, aBannerColor, aBannerBackgroundColor) { var context = canvas.getContext("2d"); var alignStroke; var resolution; var path; var pointX; var pointY; if (window.devicePixelRatio) resolution = window.devicePixelRatio; else resolution = 1.0; resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_Features_storeWidth + canvas.height / kClipperz_PM_UI_Canvas_Features_storeHeight); context.save(); context.scale(canvas.width / kClipperz_PM_UI_Canvas_Features_storeWidth, canvas.height / kClipperz_PM_UI_Canvas_Features_storeHeight); context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_Features_storeWidth, kClipperz_PM_UI_Canvas_Features_storeHeight); // Layer 1 alignStroke = 0.0; context.beginPath(); pointX = 27.0; pointY = 29.5; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.moveTo(pointX, pointY); pointX = 27.0; pointY = 24.5; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 22.0; pointY = 24.5; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 22.0; pointY = 29.5; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 27.0; pointY = 29.5; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); context.closePath(); context.fillStyle = aColor; context.fill(); alignStroke = 0.0; context.beginPath(); pointX = 54.0; pointY = 29.5; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.moveTo(pointX, pointY); pointX = 54.0; pointY = 24.5; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 29.0; pointY = 24.5; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 29.0; pointY = 29.5; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 54.0; pointY = 29.5; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); context.closePath(); context.fillStyle = aColor; context.fill(); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Canvas/GraphicFunctions.js b/frontend/gamma/js/Clipperz/PM/UI/Canvas/GraphicFunctions.js index b9443bd..dccefab 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Canvas/GraphicFunctions.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Canvas/GraphicFunctions.js @@ -1,65 +1,63 @@ /* -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.Canvas'); MochiKit.Base.update(Clipperz.PM.UI.Canvas , { 'marks': { '!': Clipperz_PM_UI_Canvas_Marks_exclamationMark, '?': Clipperz_PM_UI_Canvas_Marks_questionMark, 'i': Clipperz_PM_UI_Canvas_Marks_info }, 'features': { 'store': Clipperz_PM_UI_Canvas_Features_store, 'protect': Clipperz_PM_UI_Canvas_Features_protect, 'directLogin': Clipperz_PM_UI_Canvas_Features_directLogin, 'share': Clipperz_PM_UI_Canvas_Features_share }, 'tips': { 'open': Clipperz_PM_UI_Canvas_Tips_open, 'close': Clipperz_PM_UI_Canvas_Tips_close }, 'star': { 'normal': Clipperz_PM_UI_Canvas_Star_normal }, 'coverActions': { 'look': Clipperz_PM_UI_Canvas_CoverActions_look, 'download': Clipperz_PM_UI_Canvas_CoverActions_download }, 'registerButton': { 'normal': Clipperz_PM_UI_Canvas_RegisterButton_normal }, 'logo': { 'normal': Clipperz_PM_UI_Canvas_Logo_normal }, __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Logo/normal.js b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Logo/normal.js index cc60bba..24c0bc3 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Logo/normal.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Logo/normal.js @@ -1,54 +1,52 @@ /* -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/. */ // // normal.js // New Image // // Created by Giulio Cesare Solaroli on 2/13/12 // Copyright 2012 Clipperz // This code was generated by Opacity. You may use or modify it in any way. // var kClipperz_PM_UI_Canvas_Logo_normalWidth = 150.0; var kClipperz_PM_UI_Canvas_Logo_normalHeight = 39.0; function Clipperz_PM_UI_Canvas_Logo_normal(canvas, logo, fontSize, text_color) { var context = canvas.getContext("2d"); canvas.width = kClipperz_PM_UI_Canvas_Logo_normalWidth; canvas.height = kClipperz_PM_UI_Canvas_Logo_normalHeight; context.save(); context.scale(canvas.width / kClipperz_PM_UI_Canvas_Logo_normalWidth, canvas.height / kClipperz_PM_UI_Canvas_Logo_normalHeight); context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_Logo_normalWidth, kClipperz_PM_UI_Canvas_Logo_normalHeight); context.font = fontSize + " HelveticaNeue-Bold"; context.fillStyle = text_color; context.fillText(logo, 3, 30); context.restore(); } diff --git a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/exclamationMark.js b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/exclamationMark.js index 02f2f80..5982f0d 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/exclamationMark.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/exclamationMark.js @@ -1,118 +1,116 @@ /* -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/. */ // // exclamationMark.js // ! // // Created by Giulio Cesare Solaroli on 3/7/10 // Copyright 2010 Clipperz // This code was generated by Opacity. You may use or modify it in any way. // var kClipperz_PM_UI_Canvas_Marks_exclamationMarkWidth = 50.0; var kClipperz_PM_UI_Canvas_Marks_exclamationMarkHeight = 50.0; function Clipperz_PM_UI_Canvas_Marks_exclamationMark(canvas, aColor) { var context = canvas.getContext("2d"); var alignStroke; var resolution; var path; var pointX; var pointY; var controlPoint1X; var controlPoint1Y; var controlPoint2X; var controlPoint2Y; if (window.devicePixelRatio) resolution = window.devicePixelRatio; else resolution = 1.0; resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_Marks_exclamationMarkWidth + canvas.height / kClipperz_PM_UI_Canvas_Marks_exclamationMarkHeight); context.save(); context.scale(canvas.width / kClipperz_PM_UI_Canvas_Marks_exclamationMarkWidth, canvas.height / kClipperz_PM_UI_Canvas_Marks_exclamationMarkHeight); context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_Marks_exclamationMarkWidth, kClipperz_PM_UI_Canvas_Marks_exclamationMarkHeight); // Layer 1 alignStroke = 0.0; context.beginPath(); pointX = 26.499; pointY = 10.848; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.moveTo(pointX, pointY); pointX = 20.887; pointY = 11.584; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 25.395; controlPoint1Y = 10.802; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 22.175; controlPoint2Y = 11.078; controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); pointX = 20.013; pointY = 13.194; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 20.335; controlPoint1Y = 11.814; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 19.921; controlPoint2Y = 12.826; controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); pointX = 23.049; pointY = 28.788; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 20.243; controlPoint1Y = 15.448; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 22.589; controlPoint2Y = 26.35; controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); pointX = 25.027; pointY = 29.156; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 23.279; controlPoint1Y = 29.018; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 24.705; controlPoint2Y = 29.202; controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; diff --git a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/info.js b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/info.js index fad5c10..2501992 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/info.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/info.js @@ -1,118 +1,116 @@ /* -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/. */ // // info.js // i // // Created by Giulio Cesare Solaroli on 3/7/10 // Copyright 2010 Clipperz // This code was generated by Opacity. You may use or modify it in any way. // var kClipperz_PM_UI_Canvas_Marks_infoWidth = 50.0; var kClipperz_PM_UI_Canvas_Marks_infoHeight = 50.0; function Clipperz_PM_UI_Canvas_Marks_info(canvas, aColor) { var context = canvas.getContext("2d"); var alignStroke; var resolution; var path; var pointX; var pointY; var controlPoint1X; var controlPoint1Y; var controlPoint2X; var controlPoint2Y; var color; if (window.devicePixelRatio) resolution = window.devicePixelRatio; else resolution = 1.0; resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_Marks_infoWidth + canvas.height / kClipperz_PM_UI_Canvas_Marks_infoHeight); context.save(); context.scale(canvas.width / kClipperz_PM_UI_Canvas_Marks_infoWidth, canvas.height / kClipperz_PM_UI_Canvas_Marks_infoHeight); context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_Marks_infoWidth, kClipperz_PM_UI_Canvas_Marks_infoHeight); // Layer 1 alignStroke = 0.0; context.beginPath(); pointX = 30.253; pointY = 37.436; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.moveTo(pointX, pointY); pointX = 28.505; pointY = 37.022; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 27.677; pointY = 35.09; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 27.953; controlPoint1Y = 36.792; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 27.677; controlPoint2Y = 36.47; controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); pointX = 27.631; pointY = 27.546; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 27.631; controlPoint1Y = 32.974; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 27.631; controlPoint2Y = 29.892; controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); pointX = 27.677; pointY = 19.726; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 27.631; controlPoint1Y = 24.97; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 27.677; controlPoint2Y = 21.612; controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); pointX = 19.535; pointY = 21.336; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 25.331; diff --git a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/questionMark.js b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/questionMark.js index 5842828..9a8ac7d 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/questionMark.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/questionMark.js @@ -1,118 +1,116 @@ /* -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/. */ // // questionMark.js // ? // // Created by Giulio Cesare Solaroli on 3/7/10 // Copyright 2010 Clipperz // This code was generated by Opacity. You may use or modify it in any way. // var kClipperz_PM_UI_Canvas_Marks_questionMarkWidth = 50.0; var kClipperz_PM_UI_Canvas_Marks_questionMarkHeight = 50.0; function Clipperz_PM_UI_Canvas_Marks_questionMark(canvas, aColor) { var context = canvas.getContext("2d"); var alignStroke; var resolution; var path; var pointX; var pointY; var controlPoint1X; var controlPoint1Y; var controlPoint2X; var controlPoint2Y; var color; if (window.devicePixelRatio) resolution = window.devicePixelRatio; else resolution = 1.0; resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_Marks_questionMarkWidth + canvas.height / kClipperz_PM_UI_Canvas_Marks_questionMarkHeight); context.save(); context.scale(canvas.width / kClipperz_PM_UI_Canvas_Marks_questionMarkWidth, canvas.height / kClipperz_PM_UI_Canvas_Marks_questionMarkHeight); context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_Marks_questionMarkWidth, kClipperz_PM_UI_Canvas_Marks_questionMarkHeight); // Layer 1 alignStroke = 0.0; context.beginPath(); pointX = 24.118; pointY = 24.464; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.moveTo(pointX, pointY); pointX = 24.854; pointY = 23.406; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 24.118; controlPoint1Y = 24.05; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 24.44; controlPoint2Y = 23.636; controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); pointX = 29.454; pointY = 20.6; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 26.418; controlPoint1Y = 22.532; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 28.534; controlPoint2Y = 21.566; controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); pointX = 30.282; pointY = 17.794; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 29.868; controlPoint1Y = 20.232; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 30.282; controlPoint2Y = 19.082; controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); pointX = 27.2; pointY = 12.688; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 30.282; controlPoint1Y = 16.322; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 29.454; controlPoint2Y = 14.344; diff --git a/frontend/gamma/js/Clipperz/PM/UI/Canvas/RegisterButton/normal.js b/frontend/gamma/js/Clipperz/PM/UI/Canvas/RegisterButton/normal.js index 2462d0e..65e5ca6 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Canvas/RegisterButton/normal.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Canvas/RegisterButton/normal.js @@ -1,118 +1,116 @@ /* -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/. */ // // normal.js // normal // // Created by Giulio Cesare Solaroli on 3/24/10 // Copyright 2010 Clipperz // This code was generated by Opacity. You may use or modify it in any way. // var kClipperz_PM_UI_Canvas_RegisterButton_normalWidth = 282.0; var kClipperz_PM_UI_Canvas_RegisterButton_normalHeight = 93.0; function Clipperz_PM_UI_Canvas_RegisterButton_normal(canvas, aBackgroundColor, aDarkBackgroundColor, aLightColor, aDarkColor, aStarColor) { var context = canvas.getContext("2d"); var alignStroke; var resolution; var path; var pointX; var pointY; var controlPoint1X; var controlPoint1Y; var controlPoint2X; var controlPoint2Y; var gradient; var color; if (window.devicePixelRatio) resolution = window.devicePixelRatio; else resolution = 1.0; resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_RegisterButton_normalWidth + canvas.height / kClipperz_PM_UI_Canvas_RegisterButton_normalHeight); context.save(); context.scale(canvas.width / kClipperz_PM_UI_Canvas_RegisterButton_normalWidth, canvas.height / kClipperz_PM_UI_Canvas_RegisterButton_normalHeight); context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_RegisterButton_normalWidth, kClipperz_PM_UI_Canvas_RegisterButton_normalHeight); // background alignStroke = 0.0; context.beginPath(); pointX = 241.0; pointY = 80.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.moveTo(pointX, pointY); pointX = 274.0; pointY = 47.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 259.103; controlPoint1Y = 80.0; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 274.0; controlPoint2Y = 65.103; controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); pointX = 274.0; pointY = 45.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 241.0; pointY = 12.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 274.0; controlPoint1Y = 26.897; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 259.103; controlPoint2Y = 12.0; controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); pointX = 60.0; pointY = 12.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 27.0; pointY = 45.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; controlPoint1X = 41.897; controlPoint1Y = 12.0; controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; controlPoint2X = 27.0; controlPoint2Y = 26.897; controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; diff --git a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Star/normal.js b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Star/normal.js index cf475c6..5b344ef 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Star/normal.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Star/normal.js @@ -1,118 +1,116 @@ /* -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/. */ // // normal.js // normal // // Created by Giulio Cesare Solaroli on 3/15/10 // Copyright 2010 Clipperz // This code was generated by Opacity. You may use or modify it in any way. // var kClipperz_PM_UI_Canvas_Star_normalWidth = 46.0; var kClipperz_PM_UI_Canvas_Star_normalHeight = 46.0; function Clipperz_PM_UI_Canvas_Star_normal(canvas, aColor) { var context = canvas.getContext("2d"); var alignStroke; var resolution; var path; var pointX; var pointY; if (window.devicePixelRatio) resolution = window.devicePixelRatio; else resolution = 1.0; resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_Star_normalWidth + canvas.height / kClipperz_PM_UI_Canvas_Star_normalHeight); context.save(); context.scale(canvas.width / kClipperz_PM_UI_Canvas_Star_normalWidth, canvas.height / kClipperz_PM_UI_Canvas_Star_normalHeight); context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_Star_normalWidth, kClipperz_PM_UI_Canvas_Star_normalHeight); // * alignStroke = 0.0; context.beginPath(); pointX = 8.613; pointY = 15.583; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.moveTo(pointX, pointY); pointX = 18.563; pointY = 18.821; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 18.563; pointY = 7.347; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 26.799; pointY = 7.347; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 26.799; pointY = 18.821; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 36.749; pointY = 15.583; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 38.986; pointY = 22.677; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 28.846; pointY = 25.819; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 35.463; pointY = 35.293; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 29.369; pointY = 39.625; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 22.752; pointY = 30.675; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 15.944; pointY = 39.625; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; diff --git a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Tips/close.js b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Tips/close.js index cd7ed90..21dfcc0 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Tips/close.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Tips/close.js @@ -1,118 +1,116 @@ /* -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/. */ // // close.js // close // // Created by Giulio Cesare Solaroli on 3/14/10 // Copyright 2010 Clipperz // This code was generated by Opacity. You may use or modify it in any way. // var kClipperz_PM_UI_Canvas_Tips_closeWidth = 310.0; var kClipperz_PM_UI_Canvas_Tips_closeHeight = 6.0; function Clipperz_PM_UI_Canvas_Tips_close(canvas, aColor, aBackgroundColor) { var context = canvas.getContext("2d"); var alignStroke; var resolution; var path; var pointX; var pointY; if (window.devicePixelRatio) resolution = window.devicePixelRatio; else resolution = 1.0; resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_Tips_closeWidth + canvas.height / kClipperz_PM_UI_Canvas_Tips_closeHeight); context.save(); context.scale(canvas.width / kClipperz_PM_UI_Canvas_Tips_closeWidth, canvas.height / kClipperz_PM_UI_Canvas_Tips_closeHeight); context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_Tips_closeWidth, kClipperz_PM_UI_Canvas_Tips_closeHeight); // background alignStroke = 0.0; context.beginPath(); pointX = 310.0; pointY = 6.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.moveTo(pointX, pointY); pointX = 310.0; pointY = 0.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 0.0; pointY = 0.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 0.0; pointY = 6.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 310.0; pointY = 6.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); context.closePath(); context.fillStyle = aBackgroundColor; context.fill(); // grid // background alignStroke = 0.0; context.beginPath(); pointX = 310.0; pointY = 6.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.moveTo(pointX, pointY); pointX = 310.0; pointY = 0.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 0.0; pointY = 0.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 0.0; pointY = 6.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 310.0; pointY = 6.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; diff --git a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Tips/open.js b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Tips/open.js index 30c1c69..9c76865 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Tips/open.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Tips/open.js @@ -1,118 +1,116 @@ /* -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/. */ // // open.js // open // // Created by Giulio Cesare Solaroli on 3/14/10 // Copyright 2010 Clipperz // This code was generated by Opacity. You may use or modify it in any way. // var kClipperz_PM_UI_Canvas_Tips_openWidth = 310.0; var kClipperz_PM_UI_Canvas_Tips_openHeight = 6.0; function Clipperz_PM_UI_Canvas_Tips_open(canvas, aColor, aBackgroundColor) { var context = canvas.getContext("2d"); var alignStroke; var resolution; var path; var pointX; var pointY; var color; if (window.devicePixelRatio) resolution = window.devicePixelRatio; else resolution = 1.0; resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_Tips_openWidth + canvas.height / kClipperz_PM_UI_Canvas_Tips_openHeight); context.save(); context.scale(canvas.width / kClipperz_PM_UI_Canvas_Tips_openWidth, canvas.height / kClipperz_PM_UI_Canvas_Tips_openHeight); context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_Tips_openWidth, kClipperz_PM_UI_Canvas_Tips_openHeight); // background alignStroke = 0.0; context.beginPath(); pointX = 310.0; pointY = 6.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.moveTo(pointX, pointY); pointX = 310.0; pointY = 0.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 0.0; pointY = 0.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 0.0; pointY = 6.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 310.0; pointY = 6.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); context.closePath(); context.fillStyle = aBackgroundColor; context.fill(); // grid // background alignStroke = 0.0; context.beginPath(); pointX = 310.0; pointY = 6.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.moveTo(pointX, pointY); pointX = 310.0; pointY = 0.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 0.0; pointY = 0.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 0.0; pointY = 6.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.lineTo(pointX, pointY); pointX = 310.0; pointY = 6.0; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js index b9d7adf..58b7593 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js @@ -1,416 +1,410 @@ /* -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.Common.Components'); //############################################################################# var _Clipperz_PM_Components_base_id_ = 0; //############################################################################# Clipperz.PM.UI.Common.Components.BaseComponent = function(args) { args = args || {}; Clipperz.PM.UI.Common.Components.BaseComponent.superclass.constructor.call(this, args); this._element = args.element || null; this._ids = {}; this._slots = {}; this._slotComponents = {}; this._components = {}; this._cachedSlots = {}; this._isModal = false; this._isActive = false; this._elementUsedToEnterModalState; this._isFullyRendered = false; this._renderingWaitingQueue = []; // this._slots = { // 'header': 'header', // 'body': 'body', // 'footer': 'footer' // }; return this; } //============================================================================= //TODO get back to MochiKit.Base.update as we are not extending anything //MochiKit.Base.update(Clipperz.PM.UI.Common.Components.BaseComponent.prototype, { Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.BaseComponent, /*Ext.Component*/ Object, { 'isClipperzPMComponent': true, //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Common.Components.BaseComponent component"; }, 'componentId': function () { return this.getId('_id_'); }, //------------------------------------------------------------------------- /* 'slots': function() { return this._slots; }, */ 'slotComponents': function() { return this._slotComponents; }, //------------------------------------------------------------------------- 'components': function () { return this._components; }, 'addComponent': function (aComponent) { this.components()[aComponent.componentId()] = aComponent; }, 'removeComponent': function (aComponent) { var componentId; componentId = aComponent.componentId(); this.components()[componentId].remove(); delete this.components()[componentId]; }, //------------------------------------------------------------------------- /* 'domHelper': function() { return Clipperz.YUI.DomHelper; }, */ //------------------------------------------------------------------------- /* 'domHelperAppend': function(aValue) { Clipperz.YUI.DomHelper.append(this.element().dom, aValue); }, */ //------------------------------------------------------------------------- 'element': function() { -//MochiKit.Logging.logDebug(">>> BaseComponent.element"); return MochiKit.DOM.getElement(this._element); }, 'setElement': function(aNode) { this._element = aNode; }, //----------------------------------------------------- 'displayElement': function() { return this.element(); }, //------------------------------------------------------------------------- 'renderInNode': function(aDomNode) { this.setElement(aDomNode); this.render(); }, 'render': function() { this.clear(); this.renderSelf(); this.renderComponents(); if (this.shouldShowTranslationHints()) { this.renderTranslationHints(); } if (this.shouldShowElementWhileRendering()) { MochiKit.Style.showElement(this.displayElement()); }; this._isFullyRendered = true; MochiKit.Iter.forEach(this.renderingWaitingQueue(), MochiKit.Base.methodcaller('callback')); this.resetRenderingWaitingQueue(); }, 'renderSelf': function() { throw Clipperz.Base.exception.AbstractMethod; }, 'renderComponents': function() { var slotName; for (slotName in this.slotComponents()) { this.slotComponents()[slotName].renderInNode(this.elementForSlotNamed(slotName)); } }, //......................................................................... 'isFullyRendered': function () { return this._isFullyRendered; }, //......................................................................... 'renderingWaitingQueue': function () { return this._renderingWaitingQueue; }, 'resetRenderingWaitingQueue': function () { this._renderingWaitingQueue = []; }, //......................................................................... 'waitUntilFullyRendered': function () { var deferredResult; if (this.isFullyRendered() == true) { deferredResult = MochiKit.Async.succeed } else { deferredResult = new Clipperz.Async.Deferred("BaseComponent.waitUntilFullyRendered", {trace:false}); this.renderingWaitingQueue().push(deferredResult); } return deferredResult; }, //----------------------------------------------------- 'renderTranslationHints': function () { var translatableItems; translatableItems = MochiKit.Selector.findChildElements(this.displayElement(), ['[stringID]']); MochiKit.Iter.forEach(translatableItems, MochiKit.Base.method(this, 'enhanceTranslatableElement')) }, 'enhanceTranslatableElement': function (anElement) { //Clipperz.log(">>> enhanceTranslatableElement", anElement); // new Clipperz.PM.UI.Common.Components.TranslatorWidget({ // 'element': anElement // }); MochiKit.Signal.connect(anElement, 'onmouseenter', MochiKit.Base.partial(Clipperz.PM.UI.Common.Components.TranslatorWidget.show, anElement, MochiKit.DOM.getNodeAttribute(anElement, 'stringID'))); MochiKit.Signal.connect(anElement, 'onmouseleave', Clipperz.PM.UI.Common.Components.TranslatorWidget.hide); //Clipperz.log("<<< enhanceTranslatableElement"); }, //----------------------------------------------------- 'update': function(args) { throw Clipperz.Base.exception.AbstractMethod; }, 'updateSelf': function(args) { throw Clipperz.Base.exception.AbstractMethod; }, 'updateComponents': function(args) { throw Clipperz.Base.exception.AbstractMethod; }, //----------------------------------------------------- 'refresh': function() { throw Clipperz.Base.exception.AbstractMethod; }, 'refreshSelf': function() { throw Clipperz.Base.exception.AbstractMethod; }, 'refreshComponents': function(args) { throw Clipperz.Base.exception.AbstractMethod; }, //----------------------------------------------------- 'checkSlotNamed': function(aSlotName) { if (typeof(this._slots[aSlotName]) == 'undefined') { throw new Error("undefined slot"); }; }, //----------------------------------------------------- 'cachedSlots': function() { return this._cachedSlots; }, 'slotNamed': function(aSlotName) { var result; this.checkSlotNamed(aSlotName); if (typeof(this.cachedSlots()[aSlotName]) == 'undefined') { this.cachedSlots()[aSlotName] = new Clipperz.PM.UI.Common.Components.ComponentSlot(this,aSlotName); } result = this.cachedSlots()[aSlotName]; return result; }, //----------------------------------------------------- 'elementForSlotNamed': function(aSlotName) { return MochiKit.DOM.getElement(this._slots[aSlotName]); }, //----------------------------------------------------- 'componentForSlotNamed': function(aSlotName) { return this.slotComponents()[aSlotName]; }, 'setComponentForSlotNamed': function(aComponent, aSlotName) { var domNode; this.checkSlotNamed(aSlotName); if (this.slotComponents()[aSlotName] != null) { this.slotComponents()[aSlotName].remove(); } this.slotComponents()[aSlotName] = aComponent; // domNode = MochiKit.DOM.getElement(this.slotNamed(aSlotName)); domNode = this.elementForSlotNamed(aSlotName); if (domNode != null) { aComponent.renderInNode(domNode); } }, //----------------------------------------------------- /* 'purgeListeners': function() { -//MochiKit.Logging.logDebug(">>> Clipperz.PM.UI.Common.Components.BaseComponent.purgeListeners [" + this + "]"); -//MochiKit.Logging.logDebug("--- " + this + ".purgeListeners"); Clipperz.NotificationCenter.unregister(this); MochiKit.Signal.disconnectAllTo(this); -//MochiKit.Logging.logDebug("<<< Clipperz.PM.UI.Common.Components.BaseComponent.purgeListeners"); }, */ //----------------------------------------------------- 'clear': function() { var slotName; var componentId; MochiKit.Signal.disconnectAllTo(this); for (slotName in this.slotComponents()) { this.slotComponents()[slotName].clear(); } for (componentId in this.components()) { this.components()[componentId].clear(); } // if (this.element() != null) { // this.element().innerHTML = ""; // } if (this.displayElement() != null) { if (this.element() != this.displayElement()) { MochiKit.DOM.removeElement(this.displayElement()); } else { this.displayElement().innerHTML = ""; } } if (this.isModal()) { // TODO: cleanup when the closed element was shown modally. } }, 'remove': function() { var slotName; var componentId; for (slotName in this.slotComponents()) { this.slotComponents()[slotName].remove(); delete this.slotComponents()[slotName]; } for (componentId in this.components()) { this.components()[componentId].remove(); delete this.components()[componentId]; } this.clear(); MochiKit.Signal.disconnectAll(this); }, 'append': function(aNode, aValue) { return Clipperz.DOM.Helper.append(aNode, aValue); }, 'insertBefore': function (aNode, aValue) { return Clipperz.DOM.Helper.insertBefore(aNode, aValue); }, 'insertAfter': function (aNode, aValue) { return Clipperz.DOM.Helper.insertAfter(aNode, aValue); }, //------------------------------------------------------------------------- 'getId': function(aValue) { var result; if (typeof(aValue) != 'undefined') { result = this._ids[aValue]; if (typeof(result) == 'undefined') { _Clipperz_PM_Components_base_id_ ++; result = "Clipperz_PM_Components_" + aValue + "_" + _Clipperz_PM_Components_base_id_; this._ids[aValue] = result; } } else { // result = Clipperz.PM.UI.Common.Components.BaseComponent.superclass.getId.call(this); throw "call to BaseComponent.getId with an undefined value"; } return result; }, 'getAnchor': function (aValue) { return '#' + this.getId(aValue); }, //------------------------------------------------------------------------- 'getElement': function(aValue) { return Clipperz.DOM.get(this.getId(aValue)); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Button.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Button.js index 1010c9d..1268118 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Button.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Button.js @@ -1,113 +1,111 @@ /* -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.Common.Components'); Clipperz.PM.UI.Common.Components.Button = function(args) { args = args || {}; Clipperz.PM.UI.Common.Components.Button.superclass.constructor.apply(this, arguments); this._element = args.element || Clipperz.Base.exception.raise('MandatoryParameter'); this._text = args.text || Clipperz.Base.exception.raise('MandatoryParameter'); this._isDefault = args.isDefault || false; this.render(); return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.Button, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Common.Components.Button component"; }, //------------------------------------------------------------------------- 'text': function () { return this._text; }, 'isDefault': function () { return this._isDefault; }, //------------------------------------------------------------------------- 'renderSelf': function () { /* this.append(this.element(), {tag:'div', id:this.getId('button'), cls:'button_wrapper', children:[ {tag:'div', id:this.getId('bodyWrapper'), cls:'button_bodyWrapper', children:[ {tag:'div', id:this.getId('body'), cls:'button_body', children:[ {tag:'span', html:this.text()} ]}, {tag:'div', id:this.getId('footer'), cls:'button_footer'} ]} ]}); */ /* this.append(this.element(), {tag:'div', id:this.getId('button'), cls:'button', children:[ {tag:'span', html:this.text()} ]}); */ this.append(this.element(), {tag:'a', id:this.getId('button'), cls:'button', html:this.text()}); if (this.isDefault()) { MochiKit.DOM.addElementClass(this.getId('button'), 'default'); } // MochiKit.Signal.connect(this.getId('button'), 'onmouseenter', this, 'handleOnMouseEnter'); // MochiKit.Signal.connect(this.getId('button'), 'onmouseleave', this, 'handleOnMouseLeave'); // MochiKit.Signal.connect(this.getId('button'), 'onmousedown', this, 'handleOnMouseDown'); MochiKit.Signal.connect(this.getId('button'), 'onclick', this, 'handleOnClick'); }, //------------------------------------------------------------------------- /* 'handleOnMouseEnter': function (anEvent) { MochiKit.DOM.addElementClass(this.getId('button'), 'hover'); }, 'handleOnMouseLeave': function (anEvent) { MochiKit.DOM.removeElementClass(this.getId('button'), 'hover'); MochiKit.DOM.removeElementClass(this.getId('button'), 'clicked'); }, 'handleOnMouseDown': function (anEvent) { MochiKit.DOM.addElementClass(this.getId('button'), 'clicked'); }, */ 'handleOnClick': function (anEvent) { MochiKit.Signal.signal(this, 'onclick', anEvent); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/ComponentSlot.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/ComponentSlot.js index 7f56c1e..2f82359 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/ComponentSlot.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/ComponentSlot.js @@ -1,61 +1,59 @@ /* -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.Common.Components'); //############################################################################# Clipperz.PM.UI.Common.Components.ComponentSlot = function(aComponent, aSlotName) { this._component = aComponent; this._slotName = aSlotName; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.ComponentSlot, Object, { //------------------------------------------------------------------------- 'slotName': function() { return this._slotName; }, 'component': function() { return this._component; }, //------------------------------------------------------------------------- 'setContent': function(aComponent) { this.component().setComponentForSlotNamed(aComponent, this.slotName()); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/FaviconComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/FaviconComponent.js index 2db2489..bf00ffc 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/FaviconComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/FaviconComponent.js @@ -1,88 +1,86 @@ /* -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.Common.Components'); Clipperz.PM.UI.Common.Components.FaviconComponent = function(args) { args = args || {}; Clipperz.PM.UI.Common.Components.FaviconComponent.superclass.constructor.apply(this, arguments); this.render(); this.setSrc(args.src); return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.FaviconComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Common.Components.FaviconComponent component"; }, //------------------------------------------------------------------------- 'src': function () { return this.element().src; }, 'setSrc': function (aValue) { this.element().src = (aValue || Clipperz.PM.Strings.getValue('defaultFaviconUrl')); }, //------------------------------------------------------------------------- 'clear': function () {}, //------------------------------------------------------------------------- 'renderSelf': function () { MochiKit.Signal.connect(this.element(), 'onerror', this, 'setDefaultFavicon'); MochiKit.Signal.connect(this.element(), 'onabort', this, 'setDefaultFavicon'); MochiKit.Signal.connect(this.element(), 'onload', this, 'handleOnLoad'); }, //------------------------------------------------------------------------- 'setDefaultFavicon': function (anEvent) { MochiKit.Signal.disconnectAll(anEvent.src()); this.setSrc(null); }, 'handleOnLoad': function (anEvent) { MochiKit.Signal.disconnectAll(anEvent.src()); -//console.log("HANDLE ON LOAD", anEvent, anEvent.src().src); + if (anEvent.src().complete == false) { this.setSrc(null); } }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/MessagePanelWithProgressBar.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/MessagePanelWithProgressBar.js index 2788b79..020290b 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/MessagePanelWithProgressBar.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/MessagePanelWithProgressBar.js @@ -1,161 +1,155 @@ /* -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.Common.Components'); Clipperz.PM.UI.Common.Components.MessagePanelWithProgressBar = function(args) { args = args || {}; Clipperz.PM.UI.Common.Components.MessagePanelWithProgressBar.superclass.constructor.apply(this, arguments); // this._openFromElement = args.openFromElement || null; this._onOkCloseToElement = args.onOkCloseToElement || null; this._onCancelCloseToElement = args.onCancelCloseToElement || null; this._canCancelWhileProcessing = ((typeof(args.canCancelWhileProcessing) == 'undefined') ? true : args.canCancelWhileProcessing); return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.MessagePanelWithProgressBar, Clipperz.PM.UI.Common.Components.SimpleMessagePanel, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Common.Components.MessagePanelWithProgressBar component"; }, //------------------------------------------------------------------------- /* 'openFromElement': function () { return this._openFromElement; }, */ //------------------------------------------------------------------------- 'onOkCloseToElement': function () { return this._onOkCloseToElement; }, 'setOnOkCloseToElement': function (anElement) { this._onOkCloseToElement = anElement; }, //------------------------------------------------------------------------- 'onCancelCloseToElement': function () { return this._onCancelCloseToElement; }, 'setOnCancelCloseToElement': function (anElement) { this._onCancelCloseToElement = anElement; }, //------------------------------------------------------------------------- 'canCancelWhileProcessing': function () { return this._canCancelWhileProcessing; }, //------------------------------------------------------------------------- 'deferredShowModal': function (someArgs, aResult) { if (someArgs['onOkCloseToElement'] != null) { this.setOnOkCloseToElement(someArgs['onOkCloseToElement']); } if (someArgs['onCancelCloseToElement'] != null) { this.setOnCancelCloseToElement(someArgs['onCancelCloseToElement']); } Clipperz.PM.UI.Common.Components.MessagePanelWithProgressBar.superclass.deferredShowModal.apply(this, arguments); return this.deferred(); }, //------------------------------------------------------------------------- 'showProgressBar': function () { var progressBarElement; this.getElement('container').innerHTML = ''; progressBarElement = this.append(this.getElement('container'), {tag:'div', cls:'progressBarWrapper'}); this.addComponent(new Clipperz.PM.UI.Common.Components.ProgressBar({'element':progressBarElement})); if (this.canCancelWhileProcessing() == true) { this.setButtons([{text:"Cancel", result:'CANCEL'}]); } else { this.setButtons([]); } }, //------------------------------------------------------------------------- 'showFailure': function (someParameters) { // this.setType('ALERT'); this.setType(someParameters['type']); // this.setTitle("Login failed"); this.setTitle(someParameters['title']); // this.setText("Wrong passphrase; the unlock has failed."); this.setText(someParameters['text']); // this.getElement('container').innerHTML = ''; this.getElement('container').innerHTML = ''; // this.setButtons([{text:"Close", result:'CANCEL', isDefault:true}]); this.setButtons(someParameters['buttons']); }, //------------------------------------------------------------------------- 'closeOk': function () { -//console.log("=== closeOk"); this.showProgressBar(); MochiKit.Async.callLater(0.5, MochiKit.Base.method(this.deferred(), 'callback')); this._deferred = null; }, 'closeCancel': function () { -//console.log("=== closeCancel"); this.deferredHideModal({closeToElement:this.onCancelCloseToElement()}); this.deferred().cancel(); this._deferred = null; }, //------------------------------------------------------------------------- 'deferredDone': function () { -//console.log("=== deferredDone"); return this.deferredHideModal({closeToElement:this.onOkCloseToElement()}); }, 'deferredError': function (someParameters) { -//console.log("=== deferredError"); this.showFailure(someParameters); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/PasswordEntropyDisplay.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/PasswordEntropyDisplay.js index 089e3d4..78e8c9b 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/PasswordEntropyDisplay.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/PasswordEntropyDisplay.js @@ -1,137 +1,122 @@ /* -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.Common.Components'); Clipperz.PM.UI.Common.Components.PasswordEntropyDisplay = function(anElement, args) { args = args || {}; -//MochiKit.Logging.logDebug(">>> new TextFormField"); Clipperz.PM.UI.Common.Components.PasswordEntropyDisplay.superclass.constructor.call(this, anElement, args); this._wrapperElement = null; this._entropyElement = null; this.render(); -//MochiKit.Logging.logDebug("<<< new TextFormField"); return this; }; Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.PasswordEntropyDisplay, Clipperz.PM.UI.Common.Components.BaseComponent, { 'toString': function() { return "Clipperz.PM.UI.Common.Components.PasswordEntropyDisplay"; }, //----------------------------------------------------- 'wrapperElement': function() { return this._wrapperElement; }, 'setWrapperElement': function(aValue) { this._wrapperElement = aValue; }, //----------------------------------------------------- 'passwordElement': function() { return this.element(); }, //----------------------------------------------------- 'entropyElement': function() { return this._entropyElement; }, 'setEntropyElement': function(aValue) { this._entropyElement = aValue; }, //----------------------------------------------------- 'render': function() { /* MochiKit.Signal.disconnectAllTo(this); this.setWrapperElement(this.element().wrap({tag:'div'})); this.setEntropyElement(Clipperz.DOM.Helper.append(this.wrapperElement().dom, {tag:'div', cls:'passwordEntropy', html:" "}, true)); // this.setEntropyElement(Clipperz.DOM.Helper.insertBefore(this.element(), {tag:'div', cls:'passwordEntropy', html:" "}, true)); this.entropyElement().wrap({tag:'div', cls:'passwordEntropyWrapper'}); this.updateEntropyElement(); this.connect('onkeyup', 'updateEntropyElement'); this.connect('onchange', 'updateEntropyElement'); this.connect('onblur', 'updateEntropyElement'); */ MochiKit.Signal.disconnectAllTo(this); this.setEntropyElement(this.element()); this.entropyElement().addClass("entropyLevelIndicator"); this.updateEntropyElement(); this.connect('onkeyup', 'updateEntropyElement'); this.connect('onchange', 'updateEntropyElement'); this.connect('onblur', 'updateEntropyElement'); }, //----------------------------------------------------- 'computeEntropyForString': function(aValue) { return Clipperz.PM.Crypto.passwordEntropy(aValue); }, //----------------------------------------------------- 'updateEntropyElement': function(anEvent) { -/* -//MochiKit.Logging.logDebug(">>> PasswordEntropyDisplay.updateEntropyElement"); - var maxExtent; - var entropy; - - entropy = Math.min(128, this.computeEntropyForString(this.passwordElement().dom.value)); -//MochiKit.Logging.logDebug("--- PasswordEntropyDisplay.updateEntropyElement - entropy: " + entropy); - this.entropyElement().setStyle('background-position', "0px " + -entropy + "px"); - this.entropyElement().setWidth(this.passwordElement().getWidth() * (entropy/128)); -//MochiKit.Logging.logDebug("<<< PasswordEntropyDisplay.updateEntropyElement"); -*/ var entropy; entropy = Math.min(128, this.computeEntropyForString(this.passwordElement().dom.value)); if (entropy == 0) { this.entropyElement().setStyle('background-position', "0px 26px"); } else { this.entropyElement().setStyle('background-position', "0px -" + (128-entropy)*26 + "px"); } }, //----------------------------------------------------- __syntaxFix__: '__syntaxFix__' }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/ProgressBar.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/ProgressBar.js index 5991530..6638008 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/ProgressBar.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/ProgressBar.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.Common.Components'); Clipperz.PM.UI.Common.Components.ProgressBar = function(args) { args = args || {}; Clipperz.PM.UI.Common.Components.ProgressBar.superclass.constructor.apply(this, arguments); this._element = args.element || Clipperz.Base.exception.raise('MandatoryParameter'); this.renderSelf(); MochiKit.Signal.connect(Clipperz.PM.UI.Common.Controllers.ProgressBarController.defaultController, 'updateProgress', this, 'updateProgressHandler') return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.ProgressBar, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Common.Components.ProgressBar component"; }, //------------------------------------------------------------------------- 'renderSelf': function() { this.append(this.element(), {tag:'div', cls:'loadingBar', children:[ {tag:'div', cls:'loadingBarProgressBox', children:[ {tag:'div', id:this.getId('loadingBarProgress'), cls:'loadingBarProgress'} ]} ]}); }, //------------------------------------------------------------------------- 'updateProgressHandler': function (anEvent) { MochiKit.Style.setElementDimensions(this.getId('loadingBarProgress'), {w:anEvent}, '%'); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js index 1d816a9..8c98811 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js @@ -1,118 +1,116 @@ /* -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.Web.Components'); Clipperz.PM.UI.Common.Components.SimpleMessagePanel = function(args) { args = args || {}; Clipperz.PM.UI.Common.Components.SimpleMessagePanel.superclass.constructor.apply(this, arguments); this._title = args.title || Clipperz.Base.exception.raise('MandatoryParameter'); this._text = args.text || Clipperz.Base.exception.raise('MandatoryParameter'); this._type = args.type || Clipperz.Base.exception.raise('MandatoryParameter'); // ALERT, INFO, ERROR this._buttons = args.buttons || Clipperz.Base.exception.raise('MandatoryParameter'); this._buttonComponents = []; this._deferred = null; this.renderModalMask(); return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.SimpleMessagePanel, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Common.Components.SimpleMessagePanel component"; }, //------------------------------------------------------------------------- 'deferred': function() { if (this._deferred == null) { this._deferred = new Clipperz.Async.Deferred("SimpleMessagePanel.deferred", {trace:false}); } return this._deferred; }, //------------------------------------------------------------------------- 'title': function () { return this._title; }, 'setTitle': function (aValue) { this._title = aValue; if (this.getElement('title') != null) { this.getElement('title').innerHTML = aValue; } }, //------------------------------------------------------------------------- 'text': function () { return this._text; }, 'setText': function (aValue) { this._text = aValue; if (this.getElement('text') != null) { this.getElement('text').innerHTML = aValue; } }, //------------------------------------------------------------------------- 'type': function () { return this._type; }, 'setType': function (aValue) { // if (this.getElement('icon') != null) { // MochiKit.DOM.removeElementClass(this.getId('icon'), this._type); // MochiKit.DOM.addElementClass(this.getId('icon'), aValue); // } this._type = aValue; }, 'icon': function () { var type = this.type(); var result; if (type == 'ALERT') { result = '!'; } else if (type == 'INFO') { result = 'i'; } else if (type == 'ERROR') { result = '!'; @@ -125,173 +123,165 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.SimpleMessagePanel, Clippe 'buttons': function () { return this._buttons; }, 'setButtons': function (someValues) { MochiKit.Iter.forEach(this.buttonComponents(), MochiKit.Base.methodcaller('clear')); this._buttons = someValues; if (this.getElement('buttonArea') != null) { this.renderButtons(); } }, //......................................................................... 'buttonComponents': function () { return this._buttonComponents; }, //------------------------------------------------------------------------- 'renderSelf': function() { this.append(this.element(), {tag:'div', cls:'SimpleMessagePanel', id:this.getId('panel'), children: [ // {tag:'div', cls:'header', children:[]}, {tag:'div', cls:'body', children:[ // {tag:'div', id:this.getId('icon'), cls:'img ' + this.type(), children:[{tag:'div'}]}, {tag:'div', /*id:this.getId('icon'),*/ cls:'img ' + this.type(), children:[{tag:'canvas', id:this.getId('icon')}]}, {tag:'h3', id:this.getId('title'), html:this.title()}, {tag:'p', id:this.getId('text'), html:this.text()}, {tag:'div', id:this.getId('container')}, {tag:'div', id:this.getId('buttonArea'), cls:'buttonArea', children:[]} ]} // {tag:'div', cls:'footer', children:[]} ]}); Clipperz.PM.UI.Canvas.marks[this.icon()](this.getElement('icon'), "#ffffff"); MochiKit.Signal.connect(this.getId('panel'), 'onkeydown', this, 'keyDownHandler'); this.renderButtons(); }, //------------------------------------------------------------------------- 'renderButtons': function () { this.getElement('buttonArea').innerHTML = ''; MochiKit.Base.map(MochiKit.Base.bind(function (aButton) { var buttonElement; var buttonComponent; // element = this.append(this.getElement('buttonArea'), {tag:'div', cls:'button' + (aButton['isDefault'] === true ? ' default' : ''), children:[ // {tag:'a', href:'#'/*, id:this.getId('buttonLink')*/, html:aButton['text']} // ]}); buttonElement = this.append(this.getElement('buttonArea'), {tag:'div'}); buttonComponent = new Clipperz.PM.UI.Common.Components.Button({'element':buttonElement, 'text':aButton['text'], 'isDefault':aButton['isDefault']}); this.buttonComponents().push(buttonComponent); MochiKit.Signal.connect(buttonComponent, 'onclick', MochiKit.Base.method(this, 'buttonEventHandler', aButton)); }, this), MochiKit.Iter.reversed(this.buttons())); }, //------------------------------------------------------------------------- 'displayElement': function() { return this.getElement('panel'); }, //------------------------------------------------------------------------- 'closeOk': function () { this.deferred().callback(); this._deferred = null; }, 'closeCancel': function () { this.deferred().cancel(); this._deferred = null; }, 'closeError': function () { this.deferred().errback(); this._deferred = null; }, //------------------------------------------------------------------------- 'buttonEventHandler': function(aButton, anEvent) { anEvent.preventDefault(); // MochiKit.Signal.signal(this, 'cancelEvent'); switch (aButton['result']) { case 'OK': -//console.log("==> OK"); this.closeOk(); break; case 'CANCEL': -//console.log("==> CANCEL"); this.closeCancel(); break; default: -//console.log("==> ????"); this.closeError(); break; } -//console.log("<=="); }, //------------------------------------------------------------------------- 'deferredShow': function (someArgs, aResult) { this.deferredShowModal(someArgs); this.deferred().addMethod(this, 'deferredHideModal', {closeToElement:someArgs.onOkCloseToElement }); this.deferred().addErrback (MochiKit.Base.method(this, 'deferredHideModal', {closeToElement:someArgs.onCancelCloseToElement })); this.deferred().addCallback(MochiKit.Async.succeed, aResult); return this.deferred(); }, //------------------------------------------------------------------------- 'modalDialogMask': function () { return this.getId('modalDialogMask'); }, 'modalDialog': function () { return this.getId('modalDialog'); }, 'modalDialogFrame': function() { return this.getId('modalDialogFrame'); }, //------------------------------------------------------------------------- 'renderModalMask': function () { Clipperz.DOM.Helper.append(MochiKit.DOM.currentDocument().body, {tag:'div', id:this.getId('modalDialogWrapper'), cls:'modalDialogWrapper simpleMessagePanelMask', children:[ {tag:'div', id:this.getId('modalDialogMask'), cls:'modalDialogMask simpleMessagePanelMask'}, {tag:'div', id:this.getId('modalDialogFrame'), cls:'modalDialogFrame simpleMessagePanelMask'}, {tag:'div', id:this.getId('modalDialog'), cls:'modalDialog simpleMessagePanelMask'} ]} ); MochiKit.Style.hideElement(this.getId('modalDialogMask')); MochiKit.Style.hideElement(this.getId('modalDialogFrame')); }, //------------------------------------------------------------------------- 'keyDownHandler': function (anEvent) { if (anEvent.key().string == 'KEY_ENTER') { anEvent.preventDefault(); -//console.log("13 - RETURN ?", this); this.closeOk(); -//console.log('<<< 13') } if (anEvent.key().string == 'KEY_ESCAPE') { anEvent.preventDefault(); -//console.log("27 - ESC ?", this); this.closeCancel(); -//console.log("<<< 27"); } }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/TabPanelComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/TabPanelComponent.js index 936514a..1e2a690 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/TabPanelComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/TabPanelComponent.js @@ -1,66 +1,64 @@ /* -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.Common.Components'); Clipperz.PM.UI.Common.Components.TabPanelComponent = function(args) { args = args || {}; Clipperz.PM.UI.Common.Components.TabPanelComponent.superclass.constructor.call(this, args); this._tabPanelController = null; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.TabPanelComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { 'toString': function () { return "Clipperz.PM.UI.Common.Components.TabPanelComponent component"; }, //------------------------------------------------------------------------- 'tabPanelControllerConfiguration': function() { return this._tabPanelControllerConfiguration; }, 'tabPanelController': function() { if (this._tabPanelController == null) { this._tabPanelController = new Clipperz.PM.UI.Common.Controllers.TabPanelController({component:this, configuration:this.tabPanelControllerConfiguration()}); } return this._tabPanelController; }, 'initiallySelectedTab': function() { return this._initiallySelectedTab; }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Tooltip.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Tooltip.js index 8df7e0e..6517d2a 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Tooltip.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Tooltip.js @@ -1,214 +1,205 @@ /* -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.Common.Components'); Clipperz.PM.UI.Common.Components.Tooltip = function(args) { args = args || {}; Clipperz.PM.UI.Common.Components.Tooltip.superclass.constructor.apply(this, arguments); this._element = args.element || Clipperz.Base.exception.raise('MandatoryParameter'); this._text = args.text || Clipperz.Base.exception.raise('MandatoryParameter'); this._position = args.position || 'BELOW'; // 'BELOW', 'ABOVE', 'LEFT', 'RIGHT' this._boxDimensions = null; this._enabled = (typeof(args.enabled) == 'undefined' ? true : args.enabled); this._isVisible = false; this.renderSelf(); return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.Tooltip, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Common.Components.Tooltip component"; }, //------------------------------------------------------------------------- 'text': function () { return this._text; }, 'setText': function (aValue) { this._text = aValue; }, //------------------------------------------------------------------------- 'position': function () { return this._position; }, 'setPosition': function (aValue) { this._position = aValue; }, //------------------------------------------------------------------------- 'enabled': function () { return this._enabled; }, 'setIsEnabled': function (aValue) { this._enabled = aValue; }, //------------------------------------------------------------------------- 'isVisible': function () { return this._isVisible; }, 'setIsVisible': function (aValue) { this._isVisible = aValue; }, //------------------------------------------------------------------------- 'renderSelf': function() { // this.append(this.element(), {tag:'div', id:this.getId('tooltip'), cls:'tooltip ' + this.position(), children:[ // this.append(MochiKit.DOM.currentDocument().body, {tag:'div', id:this.getId('tooltip'), cls:'tooltip ' + this.position(), children:[ this.append(MochiKit.DOM.getElement('Clipperz_PM_UI_Common_Components_Tooltip_wrapperNode'), {tag:'div', id:this.getId('tooltip'), cls:'tooltip ' + this.position(), children:[ {tag:'div', id:this.getId('body'), cls:'tooltip_body', children:[ {tag:'div', cls:'tooltip_text', children:[ {tag:'span', html:this.text()} ]}//, // {tag:'div', id:this.getId('footer'), cls:'tooltip_footer'} ]}, {tag:'div', id:this.getId('arrow'), cls:'tooltip_arrow'} ]}); this._boxDimensions = MochiKit.Style.getElementDimensions(this.getId('body')); // this._boxDimensions.h += MochiKit.Style.getElementDimensions(this.getId('footer')).h; MochiKit.Style.hideElement(this.displayElement()); MochiKit.Signal.connect(this.element(), 'onmouseenter', this, 'show'); MochiKit.Signal.connect(this.element(), 'onmouseleave', this, 'hide'); }, //----------------------------------------------------- 'displayElement': function() { return this.getElement('tooltip'); }, //------------------------------------------------------------------------- 'boxDimensions': function () { return this._boxDimensions; }, //------------------------------------------------------------------------- 'show': function () { var elementSizeAndPosition; var arrowPosition; var bodyPosition; if (this.isVisible() == false) { arrowPosition = {}; bodyPosition = {}; this.setIsVisible(true); elementSizeAndPosition = Clipperz.Style.getSizeAndPosition(this.element()); -//console.log("ELEMENT SIZE AND POSITION", Clipperz.Base.serializeJSON(elementSizeAndPosition)); -//console.log("BOX DIMENSIONS", Clipperz.Base.serializeJSON(this.boxDimensions())); switch (this.position()) { case 'ABOVE': -//console.log("ABOVE"); // MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:36, h:13}, 'px'); bodyPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - this.boxDimensions().w/2); bodyPosition.y = elementSizeAndPosition.position.y - this.boxDimensions().h - 13; // arrowPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - 36/2); // arrowPosition.y = elementSizeAndPosition.position.y - 13; break; case 'BELOW': -//console.log("BELOW"); // MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:36, h:13}, 'px'); bodyPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - this.boxDimensions().w/2); bodyPosition.y = elementSizeAndPosition.position.y + elementSizeAndPosition.dimensions.h + 13; // arrowPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - 36/2); // arrowPosition.y = elementSizeAndPosition.position.y + elementSizeAndPosition.dimensions.h; break; case 'LEFT': -//console.log("LEFT"); // MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:13, h:36}, 'px'); bodyPosition.x = elementSizeAndPosition.position.x - this.boxDimensions().w - 13; bodyPosition.y = elementSizeAndPosition.position.y + (elementSizeAndPosition.dimensions.h/2 - this.boxDimensions().h/2); // arrowPosition.x = elementSizeAndPosition.position.x -13; // arrowPosition.y = elementSizeAndPosition.position.y + (elementSizeAndPosition.dimensions.h/2 - 36/2); break; case 'RIGHT': -//console.log("RIGHT"); // MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:13, h:36}, 'px'); bodyPosition.x = elementSizeAndPosition.position.x + elementSizeAndPosition.dimensions.w + 13; bodyPosition.y = elementSizeAndPosition.position.y + (elementSizeAndPosition.dimensions.h/2 - this.boxDimensions().h/2); // arrowPosition.x = elementSizeAndPosition.position.x + elementSizeAndPosition.dimensions.w; // arrowPosition.y = elementSizeAndPosition.position.y + (elementSizeAndPosition.dimensions.h/2 - 36/2); break; } -//console.log("X: " + bodyPosition.x + ", Y: " + bodyPosition.y); MochiKit.Style.setElementPosition(this.getId('tooltip'), bodyPosition); // MochiKit.Style.setElementPosition(this.getId('body'), bodyPosition); // MochiKit.Style.setElementPosition(this.getId('arrow'), arrowPosition); MochiKit.Visual.appear(this.displayElement(), {duration:0.4}); } }, 'hide': function () { if (this.isVisible() == true) { MochiKit.Visual.fade(this.displayElement(), {duration:0.4}); this.setIsVisible(false); } }, //------------------------------------------------------------------------- /* 'shouldRemoveElementWhenClearningUp': function () { return false; }, */ //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); Clipperz.PM.UI.Common.Components.Tooltip.initTooltips = function () { Clipperz.DOM.Helper.insertBefore(MochiKit.DOM.currentDocument().body.childNodes[0], {tag:'div', id:'Clipperz_PM_UI_Common_Components_Tooltip_wrapperNode'}); } MochiKit.DOM.addLoadEvent(Clipperz.PM.UI.Common.Components.Tooltip.initTooltips); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/TranslatorWidget.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/TranslatorWidget.js index c41fc7c..ba58edd 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/TranslatorWidget.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/TranslatorWidget.js @@ -1,118 +1,116 @@ /* -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.Common.Components'); Clipperz.PM.UI.Common.Components.TranslatorWidget = function(args) { Clipperz.log(">>> TranslatorWidget.new"); args = args || {}; Clipperz.PM.UI.Common.Components.TranslatorWidget.superclass.constructor.apply(this, arguments); // this._element = args.element || Clipperz.Base.exception.raise('MandatoryParameter'); // this._stringID = args.stringID || MochiKit.DOM.getNodeAttribute(this.element(), 'stringID') || Clipperz.Base.exception.raise('MandatoryParameter'); // MochiKit.Signal.connect(this.element(), 'onmouseenter', this, 'show'); // MochiKit.Signal.connect(this.element(), 'onmouseleave', this, 'hide'); Clipperz.log("<<< TranslatorWidget.new"); return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.TranslatorWidget, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Common.Components.TranslatorWidget component"; }, //------------------------------------------------------------------------- /* 'renderSelf': function() { this.append(this.element(), {tag:'div', id:this.getId('tooltip'), cls:'tooltip ' + this.position(), children:[ {tag:'div', id:this.getId('body'), cls:'tooltip_body', children:[ {tag:'div', cls:'tooltip_text', children:[ {tag:'span', html:this.text()} ]}, {tag:'div', id:this.getId('footer'), cls:'tooltip_footer'} ]}, {tag:'div', id:this.getId('arrow'), cls:'tooltip_arrow'} ]}); this._boxDimensions = MochiKit.Style.getElementDimensions(this.getId('body')); // this._boxDimensions.h += MochiKit.Style.getElementDimensions(this.getId('footer')).h; MochiKit.Style.hideElement(this.displayElement()); MochiKit.Signal.connect(this.element(), 'onmouseenter', this, 'show'); MochiKit.Signal.connect(this.element(), 'onmouseleave', this, 'hide'); }, */ //----------------------------------------------------- /* 'displayElement': function() { return this.getElement('tooltip'); }, */ //------------------------------------------------------------------------- /* 'boxDimensions': function () { return this._boxDimensions; }, */ //------------------------------------------------------------------------- 'show': function (anElement, aStringID) { Clipperz.log(">>> Clipperz.PM.UI.Common.Components.TranslatorWidget.show: " + aStringID); /* var elementSizeAndPosition; var arrowPosition; var bodyPosition; arrowPosition = {}; bodyPosition = {}; elementSizeAndPosition = Clipperz.Style.getSizeAndPosition(this.element()); switch (this.position()) { case 'ABOVE': MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:36, h:13}, 'px'); bodyPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - this.boxDimensions().w/2); bodyPosition.y = elementSizeAndPosition.position.y - this.boxDimensions().h - 13; arrowPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - 36/2); arrowPosition.y = elementSizeAndPosition.position.y - 13; break; case 'BELOW': MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:36, h:13}, 'px'); bodyPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - this.boxDimensions().w/2); bodyPosition.y = elementSizeAndPosition.position.y + elementSizeAndPosition.dimensions.h + 13; arrowPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - 36/2); arrowPosition.y = elementSizeAndPosition.position.y + elementSizeAndPosition.dimensions.h; break; case 'LEFT': MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:13, h:36}, 'px'); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/DirectLoginRunner.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/DirectLoginRunner.js index 5fd10f9..77d59a5 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/DirectLoginRunner.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/DirectLoginRunner.js @@ -1,264 +1,256 @@ /* -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.Common.Controllers'); Clipperz.PM.UI.Common.Controllers.DirectLoginRunner = function(args) { this._directLogin = args['directLogin'] || Clipperz.Base.exception.raise('MandatoryParameter'); this._target = Clipperz.PM.Crypto.randomKey(); return this; } MochiKit.Base.update(Clipperz.PM.UI.Common.Controllers.DirectLoginRunner.prototype, { 'toString': function() { return "Clipperz.PM.UI.Common.Controllers.DirectLoginRunner"; }, //----------------------------------------------------------------------------- 'directLogin': function () { return this._directLogin; }, //----------------------------------------------------------------------------- 'target': function () { return this._target; }, //============================================================================= 'setWindowTitle': function (aWindow, aTitle) { aWindow.document.title = aTitle; }, 'setWindowBody': function (aWindow, anHTML) { aWindow.document.body.innerHTML = anHTML; }, //============================================================================= 'initialWindowSetup': function (aWindow) { this.setWindowTitle(aWindow, "Loading Clipperz Direct Login"); this.setWindowBody (aWindow, MochiKit.DOM.toHTML(MochiKit.DOM.H3("Loading Clipperz Direct Login ..."))); }, //----------------------------------------------------------------------------- 'updateWindowWithDirectLoginLabel': function (aWindow, aLabel) { var titleText; var bodyText; titleText = "Loading '__label__' Direct Login".replace(/__label__/, aLabel) bodyText = "Loading '__label__' Direct Login... ".replace(/__label__/, aLabel) this.setWindowTitle(aWindow, titleText); this.setWindowBody (aWindow, MochiKit.DOM.toHTML(MochiKit.DOM.H3(bodyText))); }, //----------------------------------------------------------------------------- 'updateWindowWithHTMLContent': function (aWindow, anHtml) { this.setWindowBody(aWindow, anHtml); }, //============================================================================= 'submitLoginForm': function(aWindow, aSubmitFunction) { MochiKit.DOM.withWindow(aWindow, MochiKit.Base.bind(function () { var formElement; var submitButtons; formElement = MochiKit.DOM.getElement('directLoginForm'); submitButtons = MochiKit.Base.filter(function(anInputElement) { return ((anInputElement.tagName.toLowerCase() == 'input') && (anInputElement.getAttribute('type').toLowerCase() == 'submit')); }, formElement.elements); if (submitButtons.length == 0) { if (typeof(formElement.submit) == 'function') { formElement.submit(); } else { aSubmitFunction.apply(formElement); } /* var formSubmitFunction; formSubmitFunction = MochiKit.Base.method(formElement, 'submit'); if (Clipperz_IEisBroken == true) { formElement.submit(); } else { formSubmitFunction(); } */ } else { submitButtons[0].click(); } }, this)); }, //------------------------------------------------------------------------- 'runSubmitFormDirectLogin': function (aWindow, someAttributes) { var html; var formElement; var submitFunction; formElement = MochiKit.DOM.FORM({ 'id':'directLoginForm', 'method':someAttributes['formAttributes']['method'], 'action':someAttributes['formAttributes']['action'] }); submitFunction = formElement.submit; MochiKit.DOM.appendChildNodes(formElement, MochiKit.Base.map(function (anInputAttributes) { return MochiKit.DOM.INPUT({'type':'hidden', 'name':anInputAttributes[0], 'value':anInputAttributes[1]}); }, MochiKit.Base.items(someAttributes['inputValues']))); html = ''; html += '<h3>Loading ' + someAttributes['label'] + ' ...</h3>'; html += MochiKit.DOM.appendChildNodes(MochiKit.DOM.DIV(), MochiKit.DOM.appendChildNodes(MochiKit.DOM.DIV({style:'display:none; visibility:hidden;'}), formElement)).innerHTML; this.updateWindowWithHTMLContent(aWindow, html); this.submitLoginForm(aWindow, submitFunction); }, //------------------------------------------------------------------------- 'runHttpAuthDirectLogin': function(aWindow, someAttributes) { var completeUrl; var url; -//console.log("runHttpAuthDirectLogin", someAttributes); url = someAttributes['inputValues']['url']; if (/^https?\:\/\//.test(url) == false) { url = 'http://' + url; } if (Clipperz_IEisBroken === true) { completeUrl = url; } else { var username; var password; username = someAttributes['inputValues']['username']; password = someAttributes['inputValues']['password']; /(^https?\:\/\/)?(.*)/.test(url); completeUrl = RegExp.$1 + username + ':' + password + '@' + RegExp.$2; } window.open(completeUrl, this.target()); }, //============================================================================= 'runDirectLogin': function (aWindow) { var deferredResult; -//console.log(">>> runDirectLogin"); deferredResult = new Clipperz.Async.Deferred("DirectLoginRunner.openDirectLogin", {trace:false}); deferredResult.addMethod(this, 'initialWindowSetup', aWindow); deferredResult.addMethod(this.directLogin(), 'label'); deferredResult.addMethod(this, 'updateWindowWithDirectLoginLabel', aWindow); deferredResult.collectResults({ 'type': MochiKit.Base.method(this.directLogin(), 'type'), 'label': MochiKit.Base.method(this.directLogin(), 'label'), 'formAttributes': MochiKit.Base.method(this.directLogin(), 'formAttributes'), 'inputValues': MochiKit.Base.method(this.directLogin(), 'inputValues') }); -//deferredResult.addCallback(function (aValue) { console.log("SOME ATTRIBUTES", aValue); return aValue; }); deferredResult.addCallback(MochiKit.Base.bind(function (someAttributes) { -//console.log("SOME ATTRIBUTES", someAttributes); switch (someAttributes['type']) { case 'http_auth': this.runHttpAuthDirectLogin(aWindow, someAttributes); break; case 'simple_url': this.runSimpleUrlDirectLogin(aWindow, someAttributes); break; default: this.runSubmitFormDirectLogin(aWindow, someAttributes); break; } }, this)); deferredResult.callback(); -//console.log("<<< runDirectLogin"); return deferredResult; }, //============================================================================= 'run': function () { var newWindow; newWindow = window.open(Clipperz.PM.Strings.getValue('directLoginJumpPageUrl'), this.target()); return this.runDirectLogin(newWindow); }, //============================================================================= 'test': function () { var iFrame; var newWindow; iFrame = MochiKit.DOM.createDOM('iframe'); MochiKit.DOM.appendChildNodes(MochiKit.DOM.currentDocument().body, iFrame); newWindow = iFrame.contentWindow; return this.runDirectLogin(newWindow); }, //============================================================================= __syntaxFix__: "syntax fix" }); //----------------------------------------------------------------------------- Clipperz.PM.UI.Common.Controllers.DirectLoginRunner.openDirectLogin = function (aDirectLogin) { var runner; runner = new Clipperz.PM.UI.Common.Controllers.DirectLoginRunner({directLogin:aDirectLogin}); return runner.run(); }; //----------------------------------------------------------------------------- Clipperz.PM.UI.Common.Controllers.DirectLoginRunner.testDirectLogin = function (aDirectLogin) { var runner; -//console.log(">>>>>> TESTING DIRECT LOGIN"); runner = new Clipperz.PM.UI.Common.Controllers.DirectLoginRunner({directLogin:aDirectLogin}); return runner.test(); }; //----------------------------------------------------------------------------- diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/ProgressBarController.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/ProgressBarController.js index 41fe17f..52d81d4 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/ProgressBarController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/ProgressBarController.js @@ -1,118 +1,116 @@ /* -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.Common.Controllers'); Clipperz.PM.UI.Common.Controllers.ProgressBarController = function(args) { args = args || {}; this._numberOfSteps = 0; this._currentStep = 0; 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'); return this; } MochiKit.Base.update(Clipperz.PM.UI.Common.Controllers.ProgressBarController.prototype, { 'toString': function() { return "Clipperz.PM.UI.Common.Controllers.ProgressBarController"; }, //----------------------------------------------------------------------------- 'numberOfSteps': function() { return this._numberOfSteps; }, 'setNumberOfSteps': function (aValue) { this._numberOfSteps = aValue; }, 'updateNumberOfSteps': function (aValue) { this._numberOfSteps += aValue; }, //----------------------------------------------------------------------------- 'currentStep': function() { return this._currentStep; }, 'advanceCurrentStep': function () { this._currentStep ++; }, //----------------------------------------------------------------------------- 'completedPercentage': function () { var result; //Clipperz.log(">>> completedPercentage" + this.currentStep() + "/" + this.numberOfSteps(), this.currentStep() / this.numberOfSteps()); if (this.numberOfSteps() == 0) { result = 0; } else { result = (Math.min(100, 100 * (this.currentStep() / this.numberOfSteps()))); } //Clipperz.log("<<< completedPercentage", result); return result; }, //----------------------------------------------------------------------------- 'resetStatus': function () { this._numberOfSteps = 0; this._currentStep = 0; }, //----------------------------------------------------------------------------- 'updateProgress': function () { //Clipperz.log(">>> updateProgress: " + this.completedPercentage() + "%"); MochiKit.Signal.signal(this, 'updateProgress', this.completedPercentage()); }, //============================================================================= 'initProgressHandle': function (anEvent) { //Clipperz.log(">>> initProgressHandle - steps: " + (anEvent != null ? anEvent['steps'] : 0)); this.resetStatus(); if (anEvent != null) { this.setNumberOfSteps(anEvent['steps']); } MochiKit.Signal.signal(this, 'initProgress'); this.updateProgress(); }, //............................................................................. 'updateProgressHandle': function (anEvent) { this.updateNumberOfSteps(anEvent['extraSteps']); //Clipperz.log("=== updateProgressHandle - steps: " + this.numberOfSteps() + " (extra " + anEvent['extraSteps'] + ")"); this.updateProgress(); }, diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/TabPanelController.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/TabPanelController.js index 341fde9..d3e86de 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/TabPanelController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/TabPanelController.js @@ -1,118 +1,116 @@ /* -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.Common.Controllers'); Clipperz.PM.UI.Common.Controllers.TabPanelController = function(args) { args = args || {}; this._component = args.component; this._configuration = args.configuration; this._isEnabled = args.enabled || true; this._selectedTab = null; return this; } MochiKit.Base.update(Clipperz.PM.UI.Common.Controllers.TabPanelController.prototype, { 'toString': function() { return "Clipperz.PM.UI.Common.Controllers.TabPanelController"; }, //----------------------------------------------------------------------------- 'component': function() { return this._component; }, 'configuration': function() { return this._configuration; }, //----------------------------------------------------------------------------- 'getElement': function(anElementID) { return this.component().getElement(anElementID); }, 'tabForTabElement': function(anElement) { var result; for (result in this.configuration()) { if (this.getElement(this.configuration()[result]['tab']) == anElement) { break; } } return result; }, //----------------------------------------------------------------------------- 'setupTab': function(aConfiguration) { var tabElement; tabElement = this.getElement(aConfiguration['tab']); MochiKit.DOM.removeElementClass(tabElement, 'selected'); MochiKit.Signal.connect(tabElement, 'onclick', this, 'handleTabClick') }, 'setupPanel': function(aConfiguration) { this.hidePanel(aConfiguration['panel']); }, 'setup': function(args) { args = args || {}; MochiKit.Base.map(MochiKit.Base.method(this, 'setupTab'), MochiKit.Base.values(this.configuration())); MochiKit.Base.map(MochiKit.Base.method(this, 'setupPanel'), MochiKit.Base.values(this.configuration())); this.selectTab(args.selected); }, //----------------------------------------------------------------------------- 'hidePanel': function(aPanel) { MochiKit.DOM.removeElementClass(this.getElement(aPanel), 'selected'); }, 'selectTab': function(aTab) { if ((aTab != this.selectedTab()) && (this.isEnabled())) { if (this.selectedTab() != null) { MochiKit.DOM.removeElementClass(this.getElement(this.configuration()[this.selectedTab()]['tab']), 'selected'); MochiKit.DOM.removeElementClass(this.getElement(this.configuration()[this.selectedTab()]['panel']), 'selected'); } if (aTab != null) { MochiKit.DOM.addElementClass(this.getElement(this.configuration()[aTab]['tab']), 'selected'); MochiKit.DOM.addElementClass(this.getElement(this.configuration()[aTab]['panel']), 'selected'); } this.setSelectedTab(aTab); MochiKit.Signal.signal(this, 'tabSelected', aTab); } }, diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/WizardController.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/WizardController.js index ef38bc6..c13d96a 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/WizardController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/WizardController.js @@ -1,28 +1,26 @@ /* -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/. */ // Still empty, but here it should be reasonable to factor in code duplicated between // - DirectLoginWizardController // - NewUserWizardController
\ No newline at end of file diff --git a/frontend/gamma/js/Clipperz/PM/UI/Compact/MainController.js b/frontend/gamma/js/Clipperz/PM/UI/Compact/MainController.js index ea987cd..f0ccdfb 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Compact/MainController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Compact/MainController.js @@ -1,56 +1,54 @@ /* -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.Compact'); Clipperz.PM.UI.Compact.MainController = function() { // this._loginPanel = null; // this._user = null; // // this._isRunningCompact = false; // // Clipperz.NotificationCenter.register(null, 'userConnected', this, 'userConnectedCallback'); // Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); // // Clipperz.NotificationCenter.register(null, 'EXCEPTION', this, 'reportException'); return this; } MochiKit.Base.update(Clipperz.PM.UI.Compact.MainController.prototype, { 'toString': function() { return "Clipperz.PM.UI.Compact.MainController"; }, //----------------------------------------------------------------------------- 'run': function(shouldShowRegistrationForm) { -MochiKit.Logging.logDebug("running " + this.toString()); + Clipperz.logDebug("running " + this.toString()); }, //----------------------------------------------------------------------------- __syntaxFix__: "syntax fix" });
\ No newline at end of file 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,299 +1,293 @@ /* -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']} {tag:'div', cls:('fieldValue ' + (aFieldData['isHidden'] ? 'password' : 'text')), children:[ {tag:'div', children:[{tag:'p', html:aFieldData['value']}]} ]} // {tag:'input', type:'text', cls:('fieldValue ' + (aFieldData['isHidden'] ? 'password' : 'text')), value:aFieldData['value'], disabled:true} ]} }, 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,254 +1,248 @@ /* -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; }, //------------------------------------------------------------------------- 'showCardDetails': function (someData) { return this.cardDetail().showCardDetails(someData); }, //========================================================================= 'backButtonClickHandler': function (anEvent) { var offset; anEvent.preventDefault(); MochiKit.DOM.getElement('pageTitle').innerHTML = "cards"; offset = ((MochiKit.DOM.getNodeAttribute(MochiKit.DOM.currentDocument().body, 'orientation') == 'portrait') ? 320 : 480); MochiKit.Style.setElementPosition(this.getElement('cardList'), {x:-offset}); MochiKit.DOM.showElement(this.getElement('cardList')); 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:offset, y:0, mode:'relative', transition:MochiKit.Visual.Transitions.linear, sync:true}), MochiKit.Visual.fade (this.getElement('cardDetail'), { transition:MochiKit.Visual.Transitions.linear, sync:true}), MochiKit.Visual.fade ('backButton', { transition:MochiKit.Visual.Transitions.linear, sync:true}) ], {duration:1, afterFinish:MochiKit.Base.method(this, 'removeCardDetail')}) }, */ //========================================================================= __syntaxFix__: "syntax fix" }); 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,356 +1,347 @@ /* -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; }, 'setMode': function (aValue) { this._mode = aValue; }, //.......................................................................... 'pin': function () { return this._pin; }, 'setPin': function (aValue) { this._pin = aValue; }, //.......................................................................... 'username': function () { return this._username; }, 'setUsername': function (aValue) { 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(); }; this.updateRendering(); }, 'updateRendering': function () { MochiKit.Style.showElement(this.getElement('credentialsBody')); MochiKit.Style.hideElement(this.getElement('validating')); // this.hideAllPanes(); MochiKit.Base.map(function (aNode) { MochiKit.Style.hideElement(aNode); }, MochiKit.Selector.findDocElements('div.credentialsBody > div')); if (this.mode() == 'CREDENTIALS') { selectedPanel = this.getElement('credentials') } else if (this.mode() == 'PIN') { selectedPanel = this.getElement('pin') // this.updatePinDisplay(); } else { throw 'Unhandled login form mode'; } MochiKit.Style.showElement(selectedPanel); MochiKit.Style.hideElement(this.getElement('validating')); }, 'renderSelf': function() { var selectedPanel; this.append(this.element(), {tag:'div', id:'login', children:[ {tag:'div', cls:'toolbar', children:[ {tag:'h1', html:"clipperz"} ]}, {tag:'div', cls:'scroll', children:[ //================================================================== {tag:'div', cls:'credentialsMessage', id:this.getId('credentialsMessage'), children:[ {tag:'h1', cls:'message', id:this.getId('message'), html:"Message"} ]}, //================================================================== {tag:'div', cls:'credentialsBody', id:this.getId('credentialsBody'), children:[ //-------------------------------------------------------------- {tag:'div', cls:'pin', id:this.getId('pin'), children:[ {tag:'form', cls:'scroll', id:this.getId('pinForm'), children:[ {tag:'ul', cls:'edit rounded', children:[ {tag:'li', children:[{tag:'input', type:'number', name:'PIN', placeholder:"PIN", id:this.getId('PIN') }]}, ]}, {tag:'a', href:'#', cls:'greenButton', id:this.getId('pinSubmitButton'), html:"Login"} ]} ]}, //-------------------------------------------------------------- {tag:'div', cls:'credentials', id:this.getId('credentials'), children:[ {tag:'form', cls:'scroll', id:this.getId('credentialsForm'), children:[ {tag:'ul', cls:'edit rounded', children:[ {tag:'li', children:[{tag:'input', type:'email', name:'name', /*value:'joe',*/ placeholder:"username", id:this.getId('usernameField') }]}, {tag:'li', children:[{tag:'input', type:'password', name:'passphrase', /*value:'clipperz',*/ placeholder:"passphrase", id:this.getId('passphraseField') }]} ]}, {tag:'a', href:'#', cls:'greenButton', id:this.getId('credentialsSubmitButton'), html:"Login"} // {tag:'input', type:'submit', cls:'greenButton', id:this.getId('credentialsSubmitButton'), value:"Login"} ]} ]}, //-------------------------------------------------------------- ]}, //================================================================== {tag:'div', cls:'validating', id:this.getId('validating'), children:[ {tag:'div', cls:'loading', children:[ {tag:'div', cls:'spinner', children:[ {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/MO4tTOZafhbroyXuR3Df08bLiHsQf+ja6gTPWVimZl7l/oUrjl8OcxDWLbNU5D6JRL2gxkDu16fGuC054OMhclsyXTOOFEL+kmMGs4i5kfNuQ62EnBuam8tzP+Q+tSqhz9SuqpZlvR1EfBiOJTSgYMMM7jpYsAEyqJCHDL4dcFFTAwNMlFDUUpQYiadhDmXteeWAw3HEmA2s15k1RmnP4RHuhBybdBOF7MfnICmSQ2SYjIBM3iRvkcMki9IRcnDTthyLz2Ld2fTzPjTQK+Mdg8y5nkZfFO+se9LQr3/09xZr+5GcaSufeAfAww60mAPx+q8u/bAr8rFCLrx7s+vqEkw8qb+p26n11Aruq6m1iJH6PbWGv1VIY25mkNE8PkaQhxfLIF7DZXx80HD/A3l2jLclYs061xNpWCfoB6WHJTjbH0mV35Q/lRXlC+W8cndbl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XvfQ4+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 > 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" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AccountPanel.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AccountPanel.js index d6b0574..82c8dfd 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AccountPanel.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AccountPanel.js @@ -1,118 +1,116 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.AccountPanel = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.AccountPanel.superclass.constructor.apply(this, arguments); // this._initiallySelectedTab = args.selected || 'ACCOUNT'; this._initiallySelectedTab = args.selected || 'PASSPHRASE'; this._tabPanelControllerConfiguration = { // 'ACCOUNT': { // tab: 'accountTab', // panel: 'accountPanel' // }, 'PASSPHRASE': { tab: 'passphraseTab', panel: 'passphrasePanel' }, 'OTP': { tab: 'OTPTab', panel: 'OTPPanel' }, 'PREFERENCES': { tab: 'preferencesTab', panel: 'preferencesPanel' }, 'LOGIN_HISTORY': { tab: 'loginHistoryTab', panel: 'loginHistoryPanel' } }; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.AccountPanel, Clipperz.PM.UI.Common.Components.TabPanelComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.AccountPanel component"; }, //------------------------------------------------------------------------- 'renderSelf': function(/*aContainer, aPosition*/) { //Clipperz.log("AccountPanel.renderSelf element", this.element()); this.append(this.element(), [ {tag:'div', cls:'header', children:[ {tag:'div', cls:'subPanelTabs', children:[ {tag:'ul', children:[ // {tag:'li', id:this.getId('accountTab'), children:[{tag:'a', href:'#', html:'Account'}], cls:'first'}, {tag:'li', id:this.getId('passphraseTab'), children:[{tag:'a', href:'#', html:'Passphrase'}], cls:'first'}, {tag:'li', id:this.getId('OTPTab'), children:[{tag:'a', href:'#', html:'One Time Passwords'}]}, {tag:'li', id:this.getId('preferencesTab'), children:[{tag:'a', href:'#', html:'Preferences'}]}, {tag:'li', id:this.getId('loginHistoryTab'), children:[{tag:'a', href:'#', html:'Login history'}]} ]} ]} ]}, {tag:'div', cls:'body', children:[ {tag:'div', cls:'accountPanel', children:[ {tag:'div', cls:'subPanelContent', children:[ {tag:'ul', children:[ // {tag:'li', id:this.getId('accountPanel'), children:[ // {tag:'h3', html:"-- Account --"} // ]}, {tag:'li', id:this.getId('passphrasePanel'), children:[ {tag:'h3', cls:'changePassphrase', html:"Change passphrase"}, {tag:'form', id:this.getId('changePassphrase'), cls:'changePassphrase', children:[ {tag:'div', cls:'currentCredentials', children:[ {tag:'div', cls:'field username', children:[ {tag:'label', html:"username", 'for':this.getId('currentUsername')}, {tag:'input', id:this.getId('currentUsername')} ]}, {tag:'div', cls:'field passphrase', children:[ {tag:'label', html:"passphrase", 'for':this.getId('currentPassphrase')}, {tag:'input', id:this.getId('currentPassphrase')} ]} ]}, {tag:'div', cls:'newPassphrase', children:[ {tag:'div', cls:'field', children:[ {tag:'label', html:"new passphrase", 'for':this.getId('newPassphrase')}, {tag:'input', id:this.getId('newPassphrase')} ]}, {tag:'div', cls:'field', children:[ {tag:'label', html:"re-new passphrase", 'for':this.getId('reNewPassphrase')}, {tag:'input', id:this.getId('reNewPassphrase')} ]} ]}, {tag:'div', cls:'confirm', children:[ {tag:'input', type:'checkbox', id:this.getId('confirm')}, diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AppPage.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AppPage.js index 3b3c8b4..da5fd76 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AppPage.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AppPage.js @@ -1,75 +1,73 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.AppPage = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.AppPage.superclass.constructor.call(this, args); this._element = args.element || null; this._slots = { 'cardGrid' : this.getId('cardGrid'), // 'directLoginGrid' : this.getId('directLoginGrid'), 'accountPanel': this.getId('accountPanel'), 'dataPanel': this.getId('dataPanel'), 'toolsPanel': this.getId('toolsPanel'), 'userInfoBox': this.getId('userInfoBox'), 'tabSidePanel': this.getId('tabSidePanel') }; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.AppPage, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.AppPage component"; }, //------------------------------------------------------------------------- 'renderSelf': function(/*aContainer, aPosition*/) { this.append(this.element(), {tag:'div', id:this.getId('userInfoBox'), cls:'userInfoBox'}); this.append(this.element(), {tag:'div', id:this.getId('sidePanels'), cls:'sidePanels'}); this.append(this.getId('sidePanels'), {tag:'div', id:this.getId('tabSidePanel'), cls:'tabSidePanel', children:[]}); this.append(this.element(), {tag:'div', id:this.getId('mainPanels'), cls:'mainPanels'}); this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('cardGrid'), cls:'gridComponent cardGrid'}); // this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('directLoginGrid'), cls:'gridComponent directLoginGrid'}); this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('accountPanel'), cls:'otherPanel'}); this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('dataPanel'), cls:'otherPanel'}); this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('toolsPanel'), cls:'otherPanel'}); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/BookmarkletComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/BookmarkletComponent.js index 1835ca9..4cfca32 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/BookmarkletComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/BookmarkletComponent.js @@ -1,106 +1,104 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.BookmarkletComponent = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.BookmarkletComponent.superclass.constructor.apply(this, arguments); MochiKit.Signal.connect(Clipperz.PM.Strings.Languages, 'switchLanguage', this, 'updateBookmarkletURLs'); return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.BookmarkletComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.BookmarkletComponent component"; }, //------------------------------------------------------------------------- 'renderSelf': function() { // var bookmarkletUrl; // // if (Clipperz_IEisBroken == true) { // bookmarkletUrl = bookmarklet_ie; // } else { /// bookmarkletUrl = bookmarklet; // bookmarkletUrl = Clipperz.PM.Strings['bookmarklet']; // } this.append(this.element(), {tag:'div', cls:'bookmarklet', children: [ {tag:'div', id:this.getId('linkBlock'), cls:'bookmarklet_link', children:[ // {tag:'a', id:this.getId('link'), href:bookmarkletUrl, children:[ {tag:'a', id:this.getId('link'), href:'#', children:[ {tag:'div', cls:'icon'}, {tag:'div', cls:'text', children:[ {tag:'span', html:"add to Clipperz"} ]} ]} ]} ]}); new Clipperz.PM.UI.Common.Components.Tooltip({ element: this.getElement('linkBlock'), text: "Drag and drop the \"add to Clipperz\" link above to the bookmark bar.", position: 'BELOW' }); MochiKit.Signal.connect(this.getId('link'), 'onclick', this, 'handleOnclick'); this.updateBookmarkletURLs(); }, //------------------------------------------------------------------------- 'handleOnclick': function (anEvent) { anEvent.preventDefault(); Clipperz.log("BOOKMARKLET CLICK"); }, //------------------------------------------------------------------------- 'updateBookmarkletURLs': function () { var bookmarkletUrl; if (Clipperz_IEisBroken == true) { bookmarkletUrl = bookmarklet_ie; } else { // bookmarkletUrl = bookmarklet; bookmarkletUrl = Clipperz.PM.Strings.getValue('bookmarklet'); } this.getElement('link').href = bookmarkletUrl; }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogComponent.js index af33d85..8bb64f5 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogComponent.js @@ -1,118 +1,116 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.CardDialogComponent = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.CardDialogComponent.superclass.constructor.apply(this, arguments); this._tabPanelController = null; this._tabPanelControllerConfiguration = { 'DETAILS': { tab: 'detailTab', panel: 'detailTabpanel' }, 'DIRECT_LOGINS': { tab: 'directLoginTab', panel: 'directLoginTabpanel' }, 'SHARING': { tab: 'sharingTab', panel: 'sharingTabpanel' } }; this._tooltips = null; this._isSavingEnabled = false; this._hintMode = 'OFF'; // 'ON' this._fieldComponents = {}; this._directLoginComponents = {}; this._displayMode = 'fixed'; // 'scrollable'; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CardDialogComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.CardDialogComponent component"; }, //------------------------------------------------------------------------- 'tabPanelController': function () { if (this._tabPanelController == null) { this._tabPanelController = new Clipperz.PM.UI.Common.Controllers.TabPanelController({ component:this, configuration:this._tabPanelControllerConfiguration }); MochiKit.Signal.connect(this._tabPanelController, 'tabSelected', this, 'handleTabSelected') } return this._tabPanelController; }, //------------------------------------------------------------------------- 'renderSelf': function() { this.append(this.element(), {tag:'div', cls:'CardDialog mainDialog loading', id:this.getId('panel'), children: [ {tag:'form', id:this.getId('form'), children:[ // {tag:'input', type:'text', id:this.getId('hidden'), cls:'hidden'}, {tag:'div', cls:'header', children:[ {tag:'div', cls:'title', children:[ {tag:'input', type:'text', id:this.getId('title')} ]} ]}, {tag:'div', id:this.getId('body'), cls:'body', children:[ {tag:'div', cls:'tabs', children:[ {tag:'ul', cls:'tabs', children:[ {tag:'li', id:this.getId('detailTab'), children:[{tag:'span', html:"details"}]}, {tag:'li', id:this.getId('directLoginTab'), children:[ {tag:'span', html:"direct logins"}//, // {tag:'div', id:this.getId('addDirectLoginButton'), cls:'addDirectLoginButton', children:[ // {tag:'span', html:"+"} // ]} ]}, {tag:'li', id:this.getId('sharingTab'), children:[{tag:'span', html:"sharing"}]} ]} ]}, {tag:'div', cls:'tabPanels', children:[ {tag:'ul', cls:'tabPanels', children:[ {tag:'li', id:this.getId('detailTabpanel'), cls:'tabPanel', children:[ {tag:'div', id:this.getId('recordFields'), children:[ {tag:'table', cls:'fields', cellpadding:'0', id:this.getId('fieldTable'), cellspacing:'0', children:[ {tag:'thead', children:[ {tag:'tr', children:[ @@ -589,290 +587,286 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CardDialogComponent, Clipperz //------------------------------------------------------------------------- 'toggleLock': function (aFieldKey, anEvent) { var shouldRedrawAsLocked; var currentTRElement; anEvent.preventDefault(); currentTRElement = Clipperz.DOM.get(aFieldKey); shouldRedrawAsLocked = (MochiKit.DOM.hasElementClass(currentTRElement, 'locked') ? false : true); this.renderFieldTR(currentTRElement, { label:MochiKit.Selector.findChildElements(currentTRElement, ['td.fieldLabel input'])[0].value, value:MochiKit.Selector.findChildElements(currentTRElement, ['td.fieldValue input'])[0].value }, shouldRedrawAsLocked, MochiKit.DOM.hasElementClass(currentTRElement, 'new')); }, //========================================================================= 'fixNotesHeight': function () { var element; element = this.getElement('recordNote'); if (element.scrollHeight == 0) { MochiKit.Async.callLater(0.1, MochiKit.Base.method(this, 'fixNotesHeight')); } else { var textareaHeight; textareaHeight = Math.min(Math.max(50, element.scrollHeight), 500); MochiKit.Style.setElementDimensions(element, {h:textareaHeight}, 'px'); MochiKit.Async.callLater(0.1, MochiKit.Base.method(this, 'fixRendering')); } }, //------------------------------------------------------------------------- 'fixRendering': function () { // var height; var y; var scrollHeight; var viewportHeight; var viewportY; var footerElement; var footerElementPosition; var footerElementDimensions; var footerComputedHeight; // height = MochiKit.Style.getElementDimensions(this.displayElement())['h']; y = MochiKit.Style.getElementPosition(this.displayElement())['y']; footerElement = MochiKit.Selector.findChildElements(this.displayElement(), ['div.footer'])[0]; footerElementPosition = MochiKit.Style.getElementPosition(footerElement); footerElementDimensions = MochiKit.Style.getElementDimensions(footerElement); footerComputedHeight = footerElementPosition['y'] + footerElementDimensions['h'] - y; // scrollHeight = this.displayElement().scrollHeight; scrollHeight = footerComputedHeight; viewportHeight = MochiKit.Style.getViewportDimensions()['h']; viewportY = MochiKit.Style.getViewportPosition()['y']; if ((y + scrollHeight) > (viewportY + viewportHeight)) { this.setDisplayMode('scrollable'); MochiKit.DOM.addElementClass(this.element(), 'scrollable'); MochiKit.DOM.removeElementClass(this.element(), 'fixed'); MochiKit.Style.setElementPosition(this.displayElement(), {y:Math.max(0, Math.min(y, (viewportY + viewportHeight) - scrollHeight))}, 'px'); MochiKit.Visual.ScrollTo(this.displayElement(), {duration:0.5}); } else { this.setDisplayMode('fixed'); MochiKit.DOM.removeElementClass(this.element(), 'scrollable'); MochiKit.DOM.addElementClass(this.element(), 'fixed'); } }, //========================================================================= 'unselectCurrentSelectedItems': function () { MochiKit.Iter.forEach(MochiKit.Selector.findChildElements(this.displayElement(), ['.selectedField']), function (anElement) { MochiKit.DOM.removeElementClass(anElement, 'selectedField'); }); }, //========================================================================= 'hideProgressMask': function () { MochiKit.DOM.removeElementClass(this.getId('panel'), 'loading'); }, 'showProgressMask': function () { this.getElement('progressDescription').innerHTML = "Saving"; MochiKit.DOM.addElementClass(this.getId('panel'), 'loading'); }, 'showError': function (anError) { -//console.log(">>> showError", anError); MochiKit.Style.hideElement(this.getId('progress')); this.getElement('errorMessage').innerHTML = Clipperz.PM.Strings.errorDescriptionForException(anError['message']); MochiKit.Style.showElement(this.getId('error')); }, //------------------------------------------------------------------------- 'cancel': function () { /* var deferredResult; deferredResult = new Clipperz.Async.Deferred("CardDialogComponent.cancel", {trace:false}); deferredResult.addCallback(MochiKit.Base.method(this, 'isSavingEnabled')); deferredResult.addIf([ MochiKit.Base.method(this, 'askConfirmationForLoosingPendingChanges') ], []); deferredResult.addCallback(MochiKit.Base.partial(MochiKit.Signal.signal, this, 'cancel')); deferredResult.callback(); return deferredResult; */ MochiKit.Signal.signal(this, 'cancel'); }, 'handleCancelEvent': function (anEvent) { anEvent.preventDefault(); this.cancel(); }, //------------------------------------------------------------------------- 'handleSaveEvent': function (anEvent) { anEvent.preventDefault(); if (! MochiKit.DOM.hasElementClass(anEvent.src(), 'disabled')) { MochiKit.Signal.signal(this, 'save'); } }, //------------------------------------------------------------------------- 'handleAddDirectLogin': function (anEvent) { anEvent.preventDefault(); MochiKit.Signal.signal(this, 'addDirectLogin'); }, //------------------------------------------------------------------------- 'handleOnFocusEvent': function (anElement, anEvent) { this.unselectCurrentSelectedItems(); MochiKit.DOM.addElementClass(anElement, 'selectedField'); }, 'handleLooseFocusEvent': function (anElement, anEvent) { this.unselectCurrentSelectedItems(); }, //------------------------------------------------------------------------- 'handleTabSelected': function (aSelectedTab) { this.unselectCurrentSelectedItems(); switch (aSelectedTab) { case 'DETAILS': // MochiKit.Style.hideElement(this.getElement('addDirectLoginButton')); break; case 'DIRECT_LOGINS': // MochiKit.Style.showElement(this.getElement('addDirectLoginButton')); break; case 'SHARING': // MochiKit.Style.hideElement(this.getElement('addDirectLoginButton')); break; } }, //------------------------------------------------------------------------- 'handleKeyEvent': function (anEvent) { -//console.log("####", anEvent.key().string); if (anEvent.key().string == 'KEY_ESCAPE') { MochiKit.Signal.signal(this, 'changedValue'); this.cancel(); } else if (anEvent.key().string == 'KEY_ENTER') { if (anEvent.target().nodeName == 'TEXTAREA') { } else { anEvent.preventDefault(); } } }, //========================================================================= 'askConfirmationForLoosingPendingChanges': function () { var deferredResult; var confirmationDialog; confirmationDialog = new Clipperz.PM.UI.Common.Components.SimpleMessagePanel({ title: "Alert", text: "Should lost pending changes?", type: 'ALERT', buttons: [ {text:"Cancel", result:'CANCEL', isDefault:true}, {text:"Ok", result:'OK'} ] }); deferredResult = new Clipperz.Async.Deferred("CardDialogComponent.askConfirmationForLoosingPendingChanges", {trace:false}); // deferredResult = confirmationDialog.deferredShow({openFromElement:anEvent.src(), onOkCloseToElement:MochiKit.DOM.currentDocument().body, onCancelCloseToElement:anEvent.src()}); deferredResult.addMethod(confirmationDialog, 'deferredShow', { 'openFromElement': this.getElement('cancelButton'), 'onOkCloseToElement': null, // this.getElement('cancelButton'), 'onCancelCloseToElement': this.getElement('cancelButton') }); -// deferredResult.addCallback(function () { console.log("DELETE: " + anObject.toString(), anObject); }); -// deferredResult.addErrbackPass(function () { console.log("skip deletion: " + anObject.toString(), anObject); }); deferredResult.callback(); return deferredResult; }, //========================================================================= 'showDirectLoginEditingComponent': function () { var width; var transition; var duration; width = MochiKit.Style.getElementDimensions(this.getElement('directLoginsComponentContainer'))['w']; transition = MochiKit.Visual.Transitions.sinoidal; duration = 1; return Clipperz.Async.callbacks("CardDialogComponent.showDirectLoginEditingComponent", [ MochiKit.Base.method(this, 'disableCardTitleEditing'), MochiKit.Base.method(this.tabPanelController(), 'disable'), MochiKit.Base.bind(function () { MochiKit.Style.setElementPosition (this.getElement('directLoginEditDetail'), {x:width, y:-MochiKit.Style.getElementDimensions(this.getElement('directLogins'))['h']}); MochiKit.Style.setElementDimensions(this.getElement('directLoginEditDetail'), {w:width}); MochiKit.Style.showElement(this.getElement('directLoginEditDetail')); MochiKit.Style.setOpacity(this.getElement('directLoginEditDetail'), 0); MochiKit.Style.setElementDimensions(this.getElement('directLoginsComponentContainer'), { h:Math.max( MochiKit.Style.getElementDimensions(this.getElement('directLogins'))['h'], MochiKit.Style.getElementDimensions(this.getElement('directLoginEditDetail'))['h'] ) }); // MochiKit.Style.setElementDimensions(this.getElement('directLoginsComponentContainer'), {h:MochiKit.Style.getElementDimensions(this.getElement('directLogins'))['h']}); }, this), MochiKit.Base.partial(Clipperz.Visual.deferredAnimations, MochiKit.Visual.Parallel, [ new MochiKit.Visual.Move(this.getElement('directLogins'), {x:-width, y:0, mode:'relative', transition:transition, sync:true}), new MochiKit.Visual.Opacity(this.getElement('directLogins'), {from:1.0, to:0.0, transition:transition, sync:true}), new MochiKit.Visual.Move(this.getElement('directLoginEditDetail'), {x:-width, y:0, mode:'relative', transition:transition, sync:true}), new MochiKit.Visual.Opacity(this.getElement('directLoginEditDetail'), {from:0.0, to:1.0, transition:transition, sync:true}) ], {duration:duration}), MochiKit.Base.noop ], {trace:false}); }, //------------------------------------------------------------------------- 'hideDirectLoginEditingComponent': function () { var width; var transition; var duration; width = MochiKit.Style.getElementDimensions(this.getElement('directLoginsComponentContainer'))['w']; transition = MochiKit.Visual.Transitions.sinoidal; duration = 1; return Clipperz.Async.callbacks("CardDialogComponent.hideDirectLoginEditingComponent", [ MochiKit.Base.partial(Clipperz.Visual.deferredAnimations, MochiKit.Visual.Parallel, [ new MochiKit.Visual.Move(this.getElement('directLogins'), {x:width, y:0, mode:'relative', transition:transition, sync:true}), new MochiKit.Visual.Opacity(this.getElement('directLogins'), {from:0.0, to:1.0, transition:transition, sync:true}), new MochiKit.Visual.Move(this.getElement('directLoginEditDetail'), {x:width, y:0, mode:'relative', transition:transition, sync:true}), new MochiKit.Visual.Opacity(this.getElement('directLoginEditDetail'), {from:1.0, to:0.0, transition:transition, sync:true}) ], {duration:duration}), // MochiKit.Base.partial(MochiKit.Visual.appear, this.getElement('addDirectLoginButton'), {duration:0.3}), Clipperz.Async.clearResult, MochiKit.Base.partial(MochiKit.Style.hideElement, this.getElement('directLoginEditDetail')), // MochiKit.Base.partial(MochiKit.Style.showElement, this.getElement('directLogins')), MochiKit.Base.partial(MochiKit.Style.setElementDimensions, this.getElement('directLoginsComponentContainer'), {h:MochiKit.Style.getElementDimensions(this.getElement('directLogins'))['h']}), MochiKit.Base.method(this, 'enableCardTitleEditing'), MochiKit.Base.method(this.tabPanelController(), 'enable') ], {trace:false}); }, //========================================================================= __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogRecordDirectLoginComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogRecordDirectLoginComponent.js index 2e61f5f..0cee650 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogRecordDirectLoginComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogRecordDirectLoginComponent.js @@ -1,179 +1,173 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.CardDialogRecordDirectLoginComponent = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.CardDialogRecordDirectLoginComponent.superclass.constructor.apply(this, arguments); this._reference = args.reference || Clipperz.Base.exception.raise('MandatoryParameter'); this._faviconComponent = null; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CardDialogRecordDirectLoginComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.CardDialogRecordDirectLoginComponent component"; }, //------------------------------------------------------------------------- 'reference': function () { return this._reference; }, //------------------------------------------------------------------------- 'renderSelf': function() { -//console.log(">>> CardDialogRecordDirectLoginComponent.renderSelf"); this.append(this.element(), [ {tag:'div', cls:'cardDialogRecordDirectLoginComponent_favicon', children:[ {tag:'img', cls:'favicon', id:this.getId('favicon')} ]}, {tag:'div', cls:'cardDialogRecordDirectLoginComponent_label', children:[ {tag:'input', id:this.getId('label'), type:'text'} ]}, {tag:'div', cls:'open', children:[ {tag:'span', children:[ {tag:'a', href:'open', id:this.getId('open'), html:' '} ]} ]}, {tag:'div', cls:'edit', children:[ {tag:'span', children:[ {tag:'a', href:'edit', id:this.getId('edit'), html:"edit"} ]} ]}, {tag:'div', cls:'delete', children:[ {tag:'span', children:[ {tag:'a', href:'delete', id:this.getId('delete'), html:"delete"} ]} ]} /* {tag:'td', cls:'fieldState'}, {tag:'td', cls:'fieldLabel', children:[ {tag:'input', cls:'label', id:this.getId('label')} ]}, {tag:'td', cls:'fieldLock', children:[ {tag:'div', cls:'unlocked', id:this.getId('isHidden')} ]}, {tag:'td', cls:'fieldValue', children:[ {tag:'div', cls:'unlocked', id:this.getId('valueWrapper'), children:[ {tag:'input', type:'text', cls:'value', id:this.getId('value')} ]} ]}, {tag:'td', cls:'fieldAddDelete', children:[ {tag:'div', cls:'delete', children:[ {tag:'span', children:[ {tag:'a', href:'#', id:this.getId('delete'), html:"delete"} ]} ]} ]} */ ]); MochiKit.Signal.connect(this.getId('label'), 'onkeyup', MochiKit.Base.partial(MochiKit.Signal.signal, this, 'changedValue')); MochiKit.Signal.connect(this.getId('open'), 'onclick', this, 'openDirectLogin'); MochiKit.Signal.connect(this.getId('edit'), 'onclick', this, 'editDirectLogin'); MochiKit.Signal.connect(this.getId('delete'), 'onclick', this, 'deleteDirectLogin'); }, //------------------------------------------------------------------------- 'shouldShowElementWhileRendering': function () { return false; }, //------------------------------------------------------------------------- 'faviconComponent': function () { if (this._faviconComponent == null) { -//console.log("created the FAVICON component"); this._faviconComponent = new Clipperz.PM.UI.Common.Components.FaviconComponent({element:this.getId('favicon')}); } return this._faviconComponent; }, //========================================================================= 'label': function () { return this.getElement('label').value; }, 'setLabel': function (aValue) { this.getElement('label').value = Clipperz.Base.sanitizeString(aValue); }, //------------------------------------------------------------------------- 'favicon': function () { // return this.getElement('favicon').src; return this.faviconComponent().src(); }, 'setFavicon': function (aValue) { // this.getElement('favicon').src = Clipperz.Base.sanitizeString(aValue); this.faviconComponent().setSrc(Clipperz.Base.sanitizeString(aValue)); }, //========================================================================= 'openDirectLogin': function (anEvent) { anEvent.preventDefault(); MochiKit.Signal.signal(this, 'openDirectLogin', this.reference()); }, //------------------------------------------------------------------------- 'editDirectLogin': function (anEvent) { anEvent.preventDefault(); MochiKit.Signal.signal(this, 'editDirectLogin', this.reference()); -//console.log("EDIT DIRECT LOGIN"); }, //------------------------------------------------------------------------- 'deleteDirectLogin': function (anEvent) { anEvent.preventDefault(); MochiKit.Signal.signal(this, 'deleteDirectLogin', this.reference()); -//console.log("DELETE DIRECT LOGIN"); }, //========================================================================= __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogRecordFieldComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogRecordFieldComponent.js index b58062c..689406a 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogRecordFieldComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogRecordFieldComponent.js @@ -1,187 +1,183 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.CardDialogRecordFieldComponent = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.CardDialogRecordFieldComponent.superclass.constructor.apply(this, arguments); this._reference = args.reference || Clipperz.Base.exception.raise('MandatoryParameter'); this._actionType = null; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CardDialogRecordFieldComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.CardDialogRecordFieldComponent component"; }, //------------------------------------------------------------------------- 'renderSelf': function() { this.append(this.element(), [ {tag:'td', cls:'fieldState'}, {tag:'td', cls:'fieldLabel', children:[ {tag:'input', cls:'label', id:this.getId('label')} ]}, {tag:'td', cls:'fieldLock', children:[ {tag:'div', cls:'unlocked', id:this.getId('isHidden')} ]}, {tag:'td', cls:'fieldValue', children:[ {tag:'div', cls:'unlocked', id:this.getId('valueWrapper'), children:[ {tag:'input', type:'text', cls:'value', id:this.getId('value')} ]} ]}, {tag:'td', cls:'fieldAction', children:[ {tag:'a', href:'#', id:this.getId('actionLink'), html:' '} ]}, {tag:'td', cls:'fieldAddDelete', children:[ {tag:'div', cls:'delete', children:[ {tag:'span', children:[ {tag:'a', href:'#', id:this.getId('delete'), html:"delete"} ]} ]} ]} ]); MochiKit.Signal.connect(this.getId('label'), 'onkeyup', MochiKit.Base.partial(MochiKit.Signal.signal, this, 'changedValue')); MochiKit.Signal.connect(this.getId('isHidden'), 'onclick', this, 'toggleIsHidden'); MochiKit.Signal.connect(this.getId('value'), 'onkeyup', MochiKit.Base.partial(MochiKit.Signal.signal, this, 'changedValue')); MochiKit.Signal.connect(this.getId('actionLink'), 'onclick', this, 'handleActionLink'); MochiKit.Signal.connect(this.getId('delete'), 'onclick', this, 'deleteField'); // MochiKit.Signal.connect(this.getId('delete'), 'onclick', MochiKit.Base.partial(MochiKit.Signal.signal, this, 'deleteField', this.reference())); }, //------------------------------------------------------------------------- 'shouldShowElementWhileRendering': function () { return false; }, //========================================================================= 'reference': function () { return this._reference; }, //========================================================================= 'label': function () { return this.getElement('label').value; }, 'setLabel': function (aValue) { // this.getElement('label').value = Clipperz.Base.sanitizeString(aValue); this.getElement('label').value = aValue; }, //========================================================================= 'value': function () { return this.getElement('value').value; }, 'setValue': function (aValue) { // this.getElement('value').value = Clipperz.Base.sanitizeString(aValue); this.getElement('value').value = aValue; }, //------------------------------------------------------------------------- 'actionType': function () { return this._actionType; }, 'setActionType': function (anActionType) { this._actionType = anActionType; switch (this._actionType) { case 'NONE': MochiKit.Style.hideElement(this.getId('actionLink')); MochiKit.DOM.setElementClass(this.getId('actionLink'), ''); break; case 'URL': MochiKit.Style.showElement(this.getId('actionLink')); MochiKit.DOM.setElementClass(this.getId('actionLink'), 'url'); break; case 'EMAIL': MochiKit.Style.showElement(this.getId('actionLink')); MochiKit.DOM.setElementClass(this.getId('actionLink'), 'email'); break; case 'PASSWORD': MochiKit.Style.showElement(this.getId('actionLink')); MochiKit.DOM.setElementClass(this.getId('actionLink'), 'password'); break; } }, //========================================================================= 'isHidden': function () { // return this.getElement('value').value; return MochiKit.DOM.hasElementClass(this.getElement('isHidden'), 'locked'); }, 'setIsHidden': function (aValue) { // this.getElement('value').value = Clipperz.Base.sanitizeString(aValue); MochiKit.DOM.setElementClass(this.getElement('isHidden'), (aValue ? 'locked': 'unlocked')); MochiKit.DOM.setElementClass(this.getElement('valueWrapper'), (aValue ? 'locked': 'unlocked')); }, 'toggleIsHidden': function (anEvent) { anEvent.preventDefault(); this.setIsHidden(! this.isHidden()); MochiKit.Signal.signal(this, 'changedValue'); }, //========================================================================= 'handleActionLink': function (anEvent) { anEvent.preventDefault(); - -//console.log("ACTION LINK - " + this.actionType()); MochiKit.Signal.signal(this, 'performAction', this.reference(), anEvent.target()); }, //========================================================================= 'deleteField': function (anEvent) { anEvent.preventDefault(); MochiKit.Signal.signal(this, 'deleteField', this.reference()); }, //========================================================================= __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ColumnManager.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ColumnManager.js index 391c379..41e32a0 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ColumnManager.js @@ -1,118 +1,116 @@ /* -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.Web.Components'); //############################################################################# Clipperz.PM.UI.Web.Components.ColumnManager = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.ColumnManager.superclass.constructor.call(this, args); this._name = args.name || Clipperz.Base.exception.raise('MandatoryParameter'); this._selector = args.selector || Clipperz.Base.exception.raise('MandatoryParameter');; this._label = args.label || null; this._isSortable = args.sortable || false; this._comparator = args.comparator || null; this._sorted = args.sorted || 'UNSORTED'; // 'ASCENDING' | 'DESCENDING' | 'UNSORTED' this._cssClass = args.cssClass || ''; this._signalIdentifiers = []; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.ColumnManager, Clipperz.PM.UI.Common.Components.BaseComponent, { 'toString': function () { return "Clipperz.PM.UI.Web.Components.ColumnManager - " + this._name; }, 'name': function () { return this._name; }, 'label': function () { return this._label; }, 'selector': function () { return this._selector; }, 'comparator': function() { return this._comparator; }, 'cssClass': function() { return this._cssClass; }, //------------------------------------------------------------------------- 'isSortable': function () { return this._isSortable; }, //------------------------------------------------------------------------- 'sorted': function () { return this._sorted; }, 'isSorted': function () { return (this.sorted() != 'UNSORTED'); }, 'setSorted': function(aValue) { this._sorted = aValue; this.updateSortIcon(); }, //------------------------------------------------------------------------- 'signalIdentifiers': function () { return this._signalIdentifiers; }, 'resetSignalIdentifiers': function () { this._signalIdentifiers = []; }, //------------------------------------------------------------------------- 'disconnectRowsSignals': function () { MochiKit.Base.map(MochiKit.Signal.disconnect, this.signalIdentifiers()); this.resetSignalIdentifiers(); }, 'connectEvent': function () { var ident; ident = MochiKit.Signal.connect.apply(null, arguments); this.signalIdentifiers().push(ident); }, diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CreateNewCardSplashComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CreateNewCardSplashComponent.js index d3aa175..3d0ba76 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CreateNewCardSplashComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CreateNewCardSplashComponent.js @@ -1,68 +1,66 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent.superclass.constructor.apply(this, arguments); return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent component"; }, //------------------------------------------------------------------------- 'renderSelf': function() { this.append(this.element(), [ {tag:'div', cls:'createNewCardSplash', id:this.getId('button'), children:[ {tag:'span', html:"Create New Card"} ]} ]); MochiKit.Signal.connect(this.getElement('button'), 'onclick', this, 'handleClick'); }, //------------------------------------------------------------------------- 'handleClick': function (anEvent) { anEvent.preventDefault(); MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'addCard', this.element()); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js index 462d864..23f6710 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js @@ -1,116 +1,114 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.DataPanel = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.DataPanel.superclass.constructor.apply(this, arguments); this._initiallySelectedTab = args.selected || 'OFFLINE_COPY'; this._tabPanelControllerConfiguration = { 'OFFLINE_COPY': { tab: 'offlineCopyTab', panel: 'offlineCopyPanel' }, 'SHARING': { tab: 'sharingTab', panel: 'sharingPanel' }, 'IMPORT': { tab: 'importTab', panel: 'importPanel' }, 'EXPORT': { tab: 'exportTab', panel: 'exportPanel' } }; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DataPanel, Clipperz.PM.UI.Common.Components.TabPanelComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.DataPanel component"; }, //------------------------------------------------------------------------- 'renderSelf': function(/*aContainer, aPosition*/) { this.append(this.element(), [ {tag:'div', cls:'header', children:[ {tag:'div', cls:'subPanelTabs', children:[ {tag:'ul', children:[ {tag:'li', id:this.getId('offlineCopyTab'), children:[{tag:'a', href:'#', html:'Offline copy'}], cls:'first'}, {tag:'li', id:this.getId('sharingTab'), children:[{tag:'a', href:'#', html:'Sharing'}]}, {tag:'li', id:this.getId('importTab'), children:[{tag:'a', href:'#', html:'Import'}]}, {tag:'li', id:this.getId('exportTab'), children:[{tag:'a', href:'#', html:'Export'}]} ]} ]} ]}, {tag:'div', cls:'body', children:[ {tag:'div', cls:'accountPanel', children:[ {tag:'div', cls:'subPanelContent', children:[ {tag:'ul', children:[ {tag:'li', id:this.getId('offlineCopyPanel'), children:[ // {tag:'h3', html:"Offline copy"}, {tag:'p', html:"With just one click you can dump all your encrypted data from Clipperz servers to your hard disk and create a read-only offline version of Clipperz to be used when you are not connected to the Internet."}, {tag:'a', id:this.getId('offlineCopyDownloadLink'), href:'#', html:"Download", cls:'downloadOfflineCopy'} ]}, {tag:'li', id:this.getId('sharingPanel'), children:[ // {tag:'h3', html:"Sharing"} ]}, {tag:'li', id:this.getId('importPanel'), children:[ // {tag:'h3', html:"Import"} ]}, {tag:'li', id:this.getId('exportPanel'), children:[ // {tag:'h3', html:"Export"} ]} ]} ]} ]} ]}, {tag:'div', cls:'footer'} ]); this.tabPanelController().setup({selected:this.initiallySelectedTab()}); MochiKit.Signal.connect(this.getId('offlineCopyDownloadLink'), 'onclick', this, 'downloadOfflineCopy'); }, 'downloadOfflineCopy': function (anEvent) { anEvent.preventDefault(); MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'downloadOfflineCopy', anEvent.src()); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DateColumnManager.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DateColumnManager.js index ea55ba4..b305045 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DateColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DateColumnManager.js @@ -1,69 +1,67 @@ /* -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.Web.Components'); //############################################################################# Clipperz.PM.UI.Web.Components.DateColumnManager = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.DateColumnManager.superclass.constructor.call(this, args); this._format = args.format || Clipperz.Base.exception.raise('MandatoryParameter'); return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DateColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { 'toString': function () { return "Clipperz.PM.UI.Web.Components.DateColumnManager component"; }, //------------------------------------------------------------------------- 'format': function () { return this._format; }, //------------------------------------------------------------------------- 'renderCell': function(aRowElement, anObject) { Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ { tag:'span', title:Clipperz.PM.Date.formatDateWithTemplate(anObject[this.name()], "D, d M Y H:i:s"), html:Clipperz.PM.Date.formatDateWithTemplate(anObject[this.name()], this.format()) } ]}); }, //----------------------------------------------------- '__syntax_fix__' : 'syntax fix' }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DeleteObjectColumnManager.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DeleteObjectColumnManager.js index fe59494..6efe4c6 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DeleteObjectColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DeleteObjectColumnManager.js @@ -1,67 +1,65 @@ /* -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.Web.Components'); //############################################################################# Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager.superclass.constructor.call(this, args); return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager, Clipperz.PM.UI.Web.Components.LinkColumnManager, { 'toString': function () { return "Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager component"; }, //------------------------------------------------------------------------- 'renderCell': function(aRowElement, anObject) { var tdElement; var linkElement; tdElement = Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ {tag:'div', cls:'delete', children:[ {tag:'span', children:[ {tag:'a', href:'delete', html:"delete"} ]} ]} ]}); linkElement = MochiKit.DOM.getFirstElementByTagAndClassName('a', null, tdElement); // MochiKit.Signal.connect(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); this.connectEvent(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); }, //----------------------------------------------------- '__syntax_fix__' : 'syntax fix' }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginColumnManager.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginColumnManager.js index a1f0f9f..2dad703 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginColumnManager.js @@ -1,87 +1,85 @@ /* -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.Web.Components'); //############################################################################# Clipperz.PM.UI.Web.Components.DirectLoginColumnManager = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.DirectLoginColumnManager.superclass.constructor.call(this, args); this._actionMethod = args.actionMethod || null; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { 'toString': function () { return "Clipperz.PM.UI.Web.Components.DateColumnManager component"; }, //------------------------------------------------------------------------- 'actionMethod': function () { return this._actionMethod; }, //------------------------------------------------------------------------- 'renderCell': function(aRowElement, anObject) { var tdElement; var linkElement; tdElement = Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ {tag:'div', cls:'directLogin_directLogin', children:[ {tag:'div', cls:'directLogin_directLogin_body', children:[ {tag:'a', href:'#', html:anObject[this.name()]} ]} ]} ]}); linkElement = MochiKit.DOM.getFirstElementByTagAndClassName('a', null, tdElement); // MochiKit.Signal.connect(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); this.connectEvent(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); }, //----------------------------------------------------- 'handleLinkClick': function (anObject, anEvent) { anEvent.preventDefault(); if (this.actionMethod() != null) { this.actionMethod()(anObject, anEvent); } }, //----------------------------------------------------- '__syntax_fix__' : 'syntax fix' }); */
\ No newline at end of file diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingBindingComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingBindingComponent.js index 1a76b0c..f5f99d4 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingBindingComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingBindingComponent.js @@ -1,118 +1,116 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.DirectLoginEditingBindingComponent = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.DirectLoginEditingBindingComponent.superclass.constructor.apply(this, arguments); this._formFieldName = args.formFieldName || Clipperz.Base.exception.raise('MandatoryParameter'); this._fields = args.fields || Clipperz.Base.exception.raise('MandatoryParameter'); this._initiallySelectedFieldKey = args.selectedFieldKey || null; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginEditingBindingComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.DirectLoginEditingBindingComponent component"; }, //------------------------------------------------------------------------- 'formFieldName': function () { return this._formFieldName; }, //------------------------------------------------------------------------- 'fields': function () { return this._fields; }, //------------------------------------------------------------------------- 'selectedValue': function () { var result; result = this.getElement('select').value; if (result == '---') { result = null; } return result; }, 'initiallySelectedFieldKey': function () { return this._initiallySelectedFieldKey; }, //========================================================================= 'renderSelf': function() { var initiallySelectedOptions; this.append(this.element(), {tag:'div', id:this.getId('div'), cls:'binding', children:[ {tag:'span', cls:'formFieldName', html:this.formFieldName()}, {tag:'span', cls:'fieldLock', id:this.getId('isHidden'), children:[ {tag:'a', href:'#', id:this.getId('showHide'), html:' '} ]}, {tag:'input', id:this.getId('input'), cls:'formFieldExampleValue', disabled:true, value:''}, {tag:'select', name:this.formFieldName(), id:this.getId('select'), cls:'formFieldMatchinCardField', children: MochiKit.Base.flattenArguments( {tag:'option', value:'---', html:"---"}, MochiKit.Base.map( MochiKit.Base.bind(function (aField) { return {tag:'option', value:aField['reference'], html:aField['label']}; }, this), this.fields() ) ) } ]}); MochiKit.Signal.connect(this.getElement('select'), 'onchange', this, 'handleSelectChange'); MochiKit.Signal.connect(this.getElement('showHide'), 'onclick', this, 'handleShowHide'); if (! MochiKit.Base.isUndefinedOrNull(this.initiallySelectedFieldKey())) { initiallySelectedOptions = MochiKit.Selector.findChildElements(this.element(), ['option[value=' + this.initiallySelectedFieldKey() + ']']); if (initiallySelectedOptions.length == 1) { MochiKit.DOM.updateNodeAttributes(initiallySelectedOptions[0], {selected:true}); this.handleSelectChange(); } } }, //------------------------------------------------------------------------- 'setFieldValue': function (aValue) { this.getElement('input').value = aValue; }, diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingComponent.js index 5114b1d..55d2c01 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingComponent.js @@ -1,204 +1,201 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent.superclass.constructor.apply(this, arguments); this._tabPanelController = null; this._initiallySelectedTab = args.selected || 'TYPE'; this._tabPanelControllerConfiguration = { 'LABEL': { tab: 'labelTab', panel: 'labelTabpanel' }, 'TYPE': { tab: 'typeTab', panel: 'typeTabpanel' }, 'CONFIGURATION': { tab: 'configurationTab', panel: 'configurationTabpanel' }, 'BINDINGS': { tab: 'bindingsTab', panel: 'bindingsTabpanel' }, 'FAVICON': { tab: 'faviconTab', panel: 'faviconTabpanel' }, 'DONE': { tab: 'doneTab', panel: 'doneTabpanel' } }; this._directLoginReference = null; this._directLoginFavicon = null; this._updateFaviconCounter = 0; this._faviconComponent = null; this._bindingComponents = []; this._formValueComponents = []; return this; } //============================================================================= //Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent, Clipperz.PM.UI.Common.Components.TabPanelComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent component"; }, //========================================================================= 'directLoginReference': function () { return this._directLoginReference; }, //------------------------------------------------------------------------- 'setDirectLoginReference': function (aDirectLoginReference) { this._directLoginReference = aDirectLoginReference; return this._directLoginReference; }, //========================================================================= 'label': function () { return this.getElement('label').value }, 'setLabel': function (aValue) { -//console.log("##> LABEL: " + aValue); this.getElement('label').value = (aValue ? aValue : ''); }, //------------------------------------------------------------------------- 'favicon': function () { return this.getElement('faviconURL').value; }, 'setFavicon': function (aValue) { var regexp; var displayValue; regexp = new RegExp('^data\:\/\/.*', 'i'); if (regexp.test(aValue)) { displayValue = '' } else { displayValue = (aValue ? aValue : ''); } this.getElement('faviconURL').value = displayValue; this.faviconComponent().setSrc(aValue); }, // 'setFaviconData': function (aValue) { // this.getElement('faviconIcon').src = aValue; // }, 'directLoginFavicon': function () { return this._directLoginFavicon; }, 'setDirectLoginFavicon': function (aValue) { this._directLoginFavicon = aValue; this.setFavicon(aValue); }, //------------------------------------------------------------------------- 'bookmarkletConfiguration': function () { return this.getElement('bookmarkletConfiguration').value }, 'setBookmarkletConfiguration': function (aValue) { this.getElement('bookmarkletConfiguration').value = aValue; }, 'highlightConfigurationSyntaxError': function () { MochiKit.DOM.addElementClass(this.getElement('bookmarkletConfiguration'), 'error'); }, 'removeHighlightConfigurationSyntaxError': function () { MochiKit.DOM.removeElementClass(this.getElement('bookmarkletConfiguration'), 'error'); }, //========================================================================= 'disableAllPanels': function () { this.getElement('label').disabled = true; MochiKit.DOM.addElementClass(this.getElement('label').parentNode, 'disabled'); this.tabPanelController().selectTab(null); }, //------------------------------------------------------------------------- // 'disableLabelField': function () { // this.getElement('label').disabled = true; // MochiKit.DOM.addElementClass(this.getElement('label').parentNode, 'disabled'); // }, 'enableLabelField': function () { this.getElement('label').disabled = false; MochiKit.DOM.removeElementClass(this.getElement('label').parentNode, 'disabled'); this.tabPanelController().selectTab('LABEL'); }, //------------------------------------------------------------------------- // 'disableTypeField': function () { // this.tabPanelController().selectTab(null); // }, 'enableTypeField': function () { this.tabPanelController().selectTab('TYPE'); }, //------------------------------------------------------------------------- // 'disableConfigurationField': function () { // this.tabPanelController().selectTab(null); // }, 'enableConfigurationField': function () { this.tabPanelController().selectTab('CONFIGURATION'); }, diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingFormValueComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingFormValueComponent.js index fa57233..58b5b26 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingFormValueComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingFormValueComponent.js @@ -1,176 +1,169 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.DirectLoginEditingFormValueComponent = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.DirectLoginEditingFormValueComponent.superclass.constructor.apply(this, arguments); this._formFieldName = args.formFieldName || Clipperz.Base.exception.raise('MandatoryParameter'); this._fieldOptions = args.fieldOptions || Clipperz.Base.exception.raise('MandatoryParameter'); this._initialValue = args.initialValue || null; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginEditingFormValueComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.DirectLoginEditingFormValueComponent component"; }, //------------------------------------------------------------------------- 'formFieldName': function () { return this._formFieldName; }, //------------------------------------------------------------------------- 'fieldOptions': function () { return this._fieldOptions; }, 'fieldType': function () { return this.fieldOptions()['type']; }, 'optionValues': function () { return MochiKit.Base.map(function (anOptionValue) { return { 'label': anOptionValue['label'] || anOptionValue['value'], 'value': anOptionValue['value'] } }, this.fieldOptions()['options']); }, //------------------------------------------------------------------------- 'selectedValue': function () { var result; result = this.getElement('select').value; if (result == '---') { result = null; } return result; }, 'initialValue': function () { return this._initialValue; }, //========================================================================= 'renderSelf': function() { -//console.log(">>> DirectLoginEditingFormValueComponent.renderSelf"); -//console.log("FIELD OPTIONS", this.fieldOptions()); -//console.log("OPTION VALUES", this.optionValues()); this.append(this.element(), {tag:'div', id:this.getId('div'), cls:'formValue', children:[ {tag:'span', cls:'formFieldName', html:this.formFieldName()}, {tag:'div', id:this.getId('values')} ]}); if ((this.fieldType() == 'radio') || (this.fieldType() == 'select')) { this.append(this.getElement('values'), {tag:'select', name:this.formFieldName(), id:this.getId('select'), cls:'formFieldMatchinCardField', children: MochiKit.Base.flattenArguments( // {tag:'option', value:'---', html:"---"}, MochiKit.Base.map( MochiKit.Base.bind(function (aValue) { return {tag:'option', value:aValue['value'], html:aValue['label']}; }, this), this.optionValues() ) ) } ); MochiKit.Signal.connect(this.getElement('select'), 'onchange', this, 'handleSelectChange'); if (! MochiKit.Base.isUndefinedOrNull(this.initialValue())) { var initiallySelectedOptions; initiallySelectedOptions = MochiKit.Selector.findChildElements(this.element(), ['option[value=' + this.initialValue() + ']']); if (initiallySelectedOptions.length == 1) { MochiKit.DOM.updateNodeAttributes(initiallySelectedOptions[0], {selected:true}); this.handleSelectChange(); } else { Clipperz.DOM.Helper.insertBefore(this.getElement('select').childNodes[0], {tag:'option', value:'---', html:"", selected:true}); } } else { Clipperz.DOM.Helper.insertBefore(this.getElement('select').childNodes[0], {tag:'option', value:'---', html:"", selected:true}); } } else if (this.fieldType() == 'checkbox') { this.append(this.getElement('values'), {tag:'input', type:'checkbox', name:this.formFieldName(), id:this.getId('checkbox'), cls:'formFieldMatchinCardField'} ); MochiKit.Signal.connect(this.getElement('checkbox'), 'onchange', this, 'handleSelectChange'); if (this.initialValue()) { MochiKit.DOM.updateNodeAttributes(this.getElement('checkbox'), {checked:true}); } } else { WTF = TODO; } -//console.log("<<< DirectLoginEditingFormValueComponent.renderSelf"); }, //========================================================================= 'handleSelectChange': function (anEvent) { -//console.log("handleSelectChange", anEvent, anEvent.src(), anEvent.src().value); var options; options = {}; options['fieldName'] = this.formFieldName(); if (this.fieldType() == 'checkbox') { options['selectedValue'] = (this.getElement('checkbox').checked ? 1 : null); } else { options['selectedValue'] = this.selectedValue(); } MochiKit.Signal.signal(this, 'formValueChange', options); }, //========================================================================= __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginsColumnManager.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginsColumnManager.js index d8dc941..b4fc24e 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginsColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginsColumnManager.js @@ -1,118 +1,116 @@ /* -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.Web.Components'); //############################################################################# Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager.superclass.constructor.call(this, args); this._enterLeaveCounter = 0; this._selectedRowObject = null; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { 'toString': function () { return "Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager component"; }, //------------------------------------------------------------------------- 'renderHeader': function(aTRElement) { Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager.superclass.renderHeader.call(this, aTRElement); Clipperz.DOM.Helper.append(MochiKit.DOM.currentDocument().body, {tag:'div', cls:'DirectLoginListPopup', id:this.getId('DirectLoginListPopup'), children:[ {tag:'div', cls:'DirectLoginListPopup_body', children:[ {tag:'ul', id:this.getId('DirectLoginListPopup_list'), children:[ // {tag:'li', children:[ // {tag:'img', cls:'favicon', src:'http://www.microsoft.com/favicon.ico'}, // {tag:'a', href:'#', html:"Google Mail"} // ]}, // ... ]} ]}, {tag:'div', cls:'DirectLoginListPopup_footer'} ]}); MochiKit.Style.hideElement(this.getId('DirectLoginListPopup')); // BEWARE: use MochiKit.Signal.connect instead of this.connectEvent, as the HEADER is NOT redrawn after each refresh MochiKit.Signal.connect(this.getId('DirectLoginListPopup'), 'onmouseenter', this, 'handleDirectLoginListPopupEnter'); MochiKit.Signal.connect(this.getId('DirectLoginListPopup'), 'onmouseleave', this, 'handleDirectLoginListPopupLeave'); }, //------------------------------------------------------------------------- 'renderCell': function(aRowElement, anObject) { var i,c; var directLoginsInfo; directLoginsInfo = anObject[this.name()]; TDElement = Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:'card_directLogins'}); c = Math.min(2, directLoginsInfo.length); for (i=0; i<c; i++) { var elementID; elementID = 'directLogin_' + directLoginsInfo[i]['_reference']; Clipperz.DOM.Helper.append(TDElement, {tag:'div', cls:'card_directLogin', children:[ {tag:'div', cls:'card_directLogin_body', children:[ {tag:'a', href:'#', id:elementID, html:directLoginsInfo[i]['label']} ]} ]}); // MochiKit.Signal.connect(elementID, 'onclick', MochiKit.Base.method(this, 'handleDirectLoginClick', directLoginsInfo[i]['_rowObject'])); this.connectEvent(elementID, 'onclick', MochiKit.Base.method(this, 'handleDirectLoginClick', directLoginsInfo[i]['_rowObject'])); } if (directLoginsInfo.length > 2) { var ellipsesElement; ellipsesElement = Clipperz.DOM.Helper.append(TDElement, {tag:'div', cls:'card_directLogin_ellipses', children:[ {tag:'div', cls:'card_directLogin_ellipses_body', children:[ {tag:'span', html:'…'} ]} ]}); /// MochiKit.Signal.connect(ellipsesElement, 'onmouseenter', MochiKit.Base.method(this, 'handleEllipsesEnter', anObject)); /// MochiKit.Signal.connect(ellipsesElement, 'onmouseleave', MochiKit.Base.method(this, 'handleEllipsesLeave')); // MochiKit.Signal.connect(TDElement, 'onmouseleave', MochiKit.Base.method(this, 'handleTDLeave')); this.connectEvent(TDElement, 'onmouseleave', MochiKit.Base.method(this, 'handleTDLeave')); } // MochiKit.Signal.connect(TDElement, 'onmouseenter', MochiKit.Base.method(this, 'handleTDEnter', anObject)); this.connectEvent(TDElement, 'onmouseenter', MochiKit.Base.method(this, 'handleTDEnter', anObject)); }, //========================================================================= /* diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/FaviconColumnManager.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/FaviconColumnManager.js index 6297002..bdb044a 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/FaviconColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/FaviconColumnManager.js @@ -1,86 +1,84 @@ /* -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.Web.Components'); //############################################################################# Clipperz.PM.UI.Web.Components.FaviconColumnManager = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.FaviconColumnManager.superclass.constructor.call(this, args); return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.FaviconColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { 'toString': function () { return "Clipperz.PM.UI.Web.Components.FaviconColumnManager component"; }, //------------------------------------------------------------------------- 'renderCell': function(aRowElement, anObject) { var faviconImageElement; var faviconUrl; faviconImageElement = this.getId('favicon'); faviconUrl = anObject[this.name()]; if (faviconUrl == null) { faviconUrl = Clipperz.PM.Strings.getValue('defaultFaviconUrl'); } Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ {tag:'img', id:faviconImageElement, src:faviconUrl} ]}); MochiKit.Signal.connect(faviconImageElement, 'onload', this, 'handleLoadedFaviconImage'); MochiKit.Signal.connect(faviconImageElement, 'onerror', this, 'handleMissingFaviconImage'); MochiKit.Signal.connect(faviconImageElement, 'onabort', this, 'handleMissingFaviconImage'); }, //----------------------------------------------------- 'handleLoadedFaviconImage': function(anEvent) { MochiKit.Signal.disconnectAllTo(anEvent.src()); if (anEvent.src().complete == false) { anEvent.src().src = Clipperz.PM.Strings.getValue('defaultFaviconUrl'); } }, //----------------------------------------------------- 'handleMissingFaviconImage': function(anEvent) { MochiKit.Signal.disconnectAllTo(anEvent.src()); anEvent.src().src = Clipperz.PM.Strings.getValue('defaultFaviconUrl'); }, //----------------------------------------------------- '__syntax_fix__' : 'syntax fix' }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/GridComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/GridComponent.js index 51d55f4..21dddc9 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/GridComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/GridComponent.js @@ -1,230 +1,226 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.GridComponent = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.GridComponent.superclass.constructor.apply(this, arguments); this._columnsManagers = args.columnsManagers; this._rowsObjects = []; this._noRowsGridComponent = null; this._slots = { 'headerSlot': this.getId('headerSlot') }; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.GridComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.GridComponent component"; }, //------------------------------------------------------------------------- 'rows': function () { throw Clipperz.Base.exception.AbstractMethod; // return this._rows; }, //------------------------------------------------------------------------- 'columnsManagers': function () { return this._columnsManagers; }, //------------------------------------------------------------------------- 'renderSelf': function(/*aContainer, aPosition*/) { this.append(this.element(), [ {tag:'div', cls:'header', children:[ {tag:'form', id:this.getId('searchForm'), cls:'search', children:[ {tag:'div', cls:'search', children:[ {tag:'input', type:'text', id:this.getId('search'), cls:'search', placeholder:"search", name:'textToSearch'/*, value:"clipperz"*/} ]}, {tag:'div', cls:'clearSearchButton', id:this.getId('clearSearch')}, // {tag:'input', type:'button', cls:'searchButton', name:'searchButton', value:"search"}, {tag:'div', cls:'headerSlot', id:this.getId('headerSlot')} ]} ]}, {tag:'div', cls:'body', children:[ {tag:'div', cls:'rows', id:this.getId('rows'), children:[ {tag:'table', cellpadding:'0', cellspacing:'0', cls:'rows', children:[ {tag:'thead', children:[ {tag:'tr', id:this.getId('thead_tr'), children:[]} ]}, {tag:'tbody', id:this.getId('gridRows'), children:[]} ]} ]}, {tag:'div', cls:'noRowsBlock', id:this.getId('noRowsBlock'), children:[]} ]}, {tag:'div', cls:'footer'} ]); this.renderHeader(); MochiKit.Signal.connect(this.getId('clearSearch'), 'onclick', this, 'clearSearchHandler'); }, //------------------------------------------------------------------------- 'renderHeader': function () { var headerElement; headerElement = this.getElement('thead_tr'); headerElement.innerHTML = ""; MochiKit.Iter.forEach(this.columnsManagers(), function (aColumnManager) { aColumnManager.renderHeader(headerElement); }); }, //------------------------------------------------------------------------- 'update': function (someObjects) { this._rowsObjects = someObjects this.refresh(); this.focus(); }, 'focus': function () { this.getElement('search').focus(); }, //------------------------------------------------------------------------- 'startSearch': function () { -//console.log("--> startSearch"); MochiKit.DOM.addElementClass(this.getElement('search'), 'running'); }, 'endSearch': function () { MochiKit.DOM.removeElementClass(this.getElement('search'), 'running'); -//console.log("<-- startSearch"); }, //------------------------------------------------------------------------- 'disconnectColumnManagersRowsSignals': function () { MochiKit.Iter.forEach(this.columnsManagers(), function (aColumnManager) { aColumnManager.disconnectRowsSignals(); }); }, //------------------------------------------------------------------------- 'refresh': function () { var gridRowsElement; var rowClass; this.disconnectColumnManagersRowsSignals(); { MochiKit.DOM.removeElementClass(this.getElement('search'), 'disabled'); // MochiKit.DOM.setNodeAttribute(this.getElement('search'), 'disabled', null); MochiKit.DOM.removeElementClass(this.element(), 'empty'); MochiKit.DOM.removeElementClass(this.element(), 'noRows'); } gridRowsElement = this.getElement('gridRows'); gridRowsElement.innerHTML = ""; MochiKit.DOM.removeElementClass(this.element(), 'empty'); rowClass = 'odd'; MochiKit.Iter.forEach(this._rowsObjects, MochiKit.Base.bind(function (aRowObject) { var cardRowElement; cardRowElement = this.append(gridRowsElement, {tag:'tr', id:this.getId(aRowObject['_reference']), cls:rowClass}); MochiKit.Iter.forEach(this.columnsManagers(), function (aColumnManager) { aColumnManager.renderCell(cardRowElement, aRowObject); }); rowClass = (rowClass == 'odd') ? 'even' : 'odd'; }, this)); }, //----------------------------------------------------------------------------- 'filterElement': function () { return this.getElement('search'); }, //------------------------------------------------------------------------- 'shouldShowElementWhileRendering': function () { return false; }, //------------------------------------------------------------------------- 'selectRow': function (aRowObject) { MochiKit.DOM.addElementClass(this.getId(aRowObject['_reference']), 'selected'); }, 'unselectRow': function (aRowObject) { MochiKit.DOM.removeElementClass(this.getId(aRowObject['_reference']), 'selected'); }, //------------------------------------------------------------------------- /* 'passOpenDirectLogin': function(aDirectLoginReferenceId) { MochiKit.Signal.signal(this, 'openDirectLogin', aDirectLoginReferenceId); }, */ //------------------------------------------------------------------------- 'clearSearchHandler': function (anEvent) { var searchElement; anEvent.preventDefault(); searchElement = this.getElement('search'); searchElement.value = ""; searchElement.focus(); }, //------------------------------------------------------------------------- 'drawEmpty': function () { this.disconnectColumnManagersRowsSignals(); MochiKit.DOM.addElementClass(this.getElement('search'), 'disabled'); // MochiKit.DOM.setNodeAttribute(this.getElement('search'), 'disabled', 'disabled'); gridRowsElement = this.getElement('gridRows'); gridRowsElement.innerHTML = ""; MochiKit.DOM.addElementClass(this.element(), 'empty'); }, diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ImageColumnManager.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ImageColumnManager.js index 3e03fcf..d1d9d7f 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ImageColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ImageColumnManager.js @@ -1,65 +1,63 @@ /* -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.Web.Components'); //############################################################################# Clipperz.PM.UI.Web.Components.ImageColumnManager = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.ImageColumnManager.superclass.constructor.call(this, args); return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.ImageColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { 'toString': function () { return "Clipperz.PM.UI.Web.Components.ImageColumnManager component"; }, //------------------------------------------------------------------------- 'renderCell': function(aRowElement, anObject) { Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ {tag:'img', src:anObject[this.name()]} ]}); // return Clipperz.Async.callbacks("ImageColumnManager.renderCell", [ // this.selector(), // MochiKit.Base.bind(function (aValue) { // Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ // {tag:'img', src:aValue} // ]}); // }, this) // ], {trace:false}, anObject); }, //----------------------------------------------------- '__syntax_fix__' : 'syntax fix' }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LinkColumnManager.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LinkColumnManager.js index f3f9cd5..69f735b 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LinkColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LinkColumnManager.js @@ -1,89 +1,87 @@ /* -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.Web.Components'); //############################################################################# Clipperz.PM.UI.Web.Components.LinkColumnManager = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.LinkColumnManager.superclass.constructor.call(this, args); this._actionMethod = args.actionMethod || null; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LinkColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { 'toString': function () { return "Clipperz.PM.UI.Web.Components.DateColumnManager component"; }, //------------------------------------------------------------------------- 'actionMethod': function () { return this._actionMethod; }, //------------------------------------------------------------------------- 'renderCell': function(aRowElement, anObject) { var tdElement; var linkElement; tdElement = Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ {tag:'span', children:[ {tag:'a', href:'#', html:anObject[this.name()]} ]} ]}); linkElement = MochiKit.DOM.getFirstElementByTagAndClassName('a', null, tdElement); // MochiKit.Signal.connect(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); this.connectEvent(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); }, //----------------------------------------------------- 'handleLinkClick': function (anObject, anEvent) { anEvent.preventDefault(); if (this.actionMethod() != null) { var deferredResult; deferredResult = new Clipperz.Async.Deferred("LinkColumnManager.handleLinkClick", {trace:false}); // deferredResult.addCallbackPass(MochiKit.Signal.signal, this, 'selectRow', anObject); deferredResult.addCallback(this.actionMethod(), anObject, anEvent); // deferredResult.addBothPass(MochiKit.Signal.signal, this, 'unselectRow', anObject); deferredResult.callback(); } }, //----------------------------------------------------- '__syntax_fix__' : 'syntax fix' }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginForm.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginForm.js index a10ba4f..38a9421 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginForm.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginForm.js @@ -1,118 +1,116 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.LoginForm = function(args) { args = args || {}; this._autocomplete = args.autocomplete || 'off'; Clipperz.PM.UI.Web.Components.LoginForm.superclass.constructor.apply(this, arguments); this._slots = { 'passphraseEntropy': this.getId('passphraseEntropy') }; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginForm, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.LoginForm component"; }, 'autocomplete': function () { return this._autocomplete; }, //------------------------------------------------------------------------- 'renderSelf': function() { this.append(this.element(), {tag:'div', id:'loginBox', children:[ {tag:'div', cls:'header'}, {tag:'div', cls:'body', id:this.getId('body'), children:[ {tag:'div', id:this.getId('loginForm'), children:[ {tag:'div', children:[ {tag:'h4', html:'Login'}, // {tag:'form', cls:'loginForm', autocomplete:this.autocomplete(), children:[ {tag:'form', id:this.getId('form'), cls:'loginForm', children:[ {tag:'label', html:'username', 'for':this.getId('usernameField')}, {tag:'input', id:this.getId('usernameField'), type:'text', cls:'username'}, {tag:'label', html:'passphrase / OTP', 'for':this.getId('passphraseField')}, {tag:'input', id:this.getId('passphraseField'), type:'password', cls:'password'}, {tag:'div', cls:'translations', children:[ {tag:'h4', html:'choose your language'}, {tag:'ul', children:[ {tag:'li', cls:'selected', html:'english'}, {tag:'li', html:'italiano'}, {tag:'li', html:'dutch'}, {tag:'li', html:'french'}, {tag:'li', html:'spanish'}, {tag:'li', html:'chinese'}, {tag:'li', html:'japanese'}, {tag:'li', html:'portugal'}, {tag:'li', html:'arabic'} ]} ]}, {tag:'input', id:this.getId('submitButton'), type:'submit', value:'login', cls:'submit'} ]} ]} ]} ]}, {tag:'div', cls:'footer'} ]}); if (this.autocomplete() == 'off') { MochiKit.DOM.updateNodeAttributes(this.getElement('form'), {autocomplete:'off'}); } // Clipperz.Style.setBackgroundGradient(this.getElement('body'), {from:"#ff9955", to:"#ff6622"}) // this.setEntropyDisplay(new Clipperz.PM.UI.Common.Components.PasswordEntropyDisplay(this.getElement('passphraseField'))); // MochiKit.Signal.connect(this.getId('otpCheckbox'), 'onclick', this, 'togglePasswordFields'); // this.showPassphraseField(); this.getElement('usernameField').focus(); MochiKit.Signal.connect(this.getElement('loginForm'), 'onsubmit', this, 'loginEventHandler'); }, //----------------------------------------------------------------------------- /* 'togglePasswordFields': function(anEvent) { var shouldUseOTP; shouldUseOTP = this.getElement('otpCheckbox').checked; if (shouldUseOTP == false) { diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginPage.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginPage.js index 2894af8..3498e3f 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginPage.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginPage.js @@ -1,118 +1,116 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.LoginPage = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.LoginPage.superclass.constructor.apply(this, arguments); this._slots = { 'loginForm': this.getId('loginBoxSlot') }; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginPage, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.LoginPage component"; }, //------------------------------------------------------------------------- 'renderSelf': function(/*aContainer, aPosition*/) { this.append(this.element(), [ {tag:'div', id:this.getId('loginBoxSlot')}, {tag:'div', id:'main', children:[ {tag:'div', id:'featurePoints', children:[ {tag:'table', children:[ {tag:'tr', children:[ {tag:'td', children:[ {tag:'div', cls:'block', children:[ {tag:'h3', html:'Clipperz is:'}, {tag:'ul', children:[ {tag:'li', html:'a secure and simple password manager'}, {tag:'li', html:'an effective single sign-on solution'}, {tag:'li', html:'a digital vault for your personal data'} ]} ]}, {tag:'div', cls:'block', children:[ {tag:'h3', html:'Clipperz benefits:'}, {tag:'ul', children:[ {tag:'li', html:'free and completely anonymous'}, {tag:'li', html:'access it any time from any computer'}, {tag:'li', html:'no software to download and nothing to install'}, {tag:'li', html:'avoid keeping secrets on your PC or on paper'} ]} ]} ]}, {tag:'td', children:[ {tag:'div', cls:'block', children:[ {tag:'h3', html:'Clipperz security:'}, {tag:'ul', children:[ {tag:'li', html:'your secretes are locally encrypted by your browser before being uploaded to Clipperz'}, {tag:'li', html:'the encryption key is a passphrase known only to you'}, {tag:'li', html:'Clipperz hosts your sensitive data in an encrypted form and could never access the data in its plain form'}, {tag:'li', html:'Clipperz is built upon standard encryption schemes, nothing fancies of homemade'}, {tag:'li', html:'you can review the source code anytime you like, but you need to know nothing about cryptography to be an happy user!'} ]} ]} ]} ]} ]} ]}, {tag:'div', cls:'activeFeatures', children:[ {tag:'div', id:this.getId('registerButton'), cls:'createAccountLink', children:[ {tag:'canvas', id:this.getId('registerButtonIcon')}, {tag:'a', href:'#', id:this.getId('createAccountLink'), cls:'createAccountLink', children:[ {tag:'span', cls:'payoff', html:"Free sign up!"}, {tag:'span', cls:'link', html:"Create account >>"} ]} ]}, {tag:'div', cls:'keepTogether', children:[ {tag:'div', id:this.getId('screenshotLink'), cls:'screenshotLink', children:[ {tag:'canvas', id:this.getId('lookIcon')}, {tag:'a', href:'#', cls:'screenshotLink', children:[ {tag:'span', cls:'payoff', html:"Look Clipperz!"}, {tag:'span', cls:'link', html:"screenshot tour >>"} ]} ]}, {tag:'div', id:this.getId('offlineLink'), cls:'offlineLink', children:[ {tag:'canvas', id:this.getId('downloadIcon')}, {tag:'a', href:'#', cls:'offlineLink', children:[ {tag:'span', cls:'payoff', html:"Download!"}, {tag:'span', cls:'link', html:"Offline version >>"} ]} ]} ]} ]} ]} ]); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js index 26506e7..3fef6c5 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js @@ -1,156 +1,153 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.LoginProgress = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.LoginProgress.superclass.constructor.apply(this, arguments); this._deferred = null; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginProgress, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.LoginProgress component"; }, //------------------------------------------------------------------------- 'deferred': function() { return this._deferred; }, 'setDeferred': function(aValue) { this._deferred = aValue; }, //------------------------------------------------------------------------- 'renderSelf': function() { // var loginProgressElement; // // loginProgressElement = MochiKit.DOM.getElement('loginProgress'); // // if (loginProgressElement == null) { // loginProgressElement = this.append(this.element(), {tag:'div', id:'loginProgress', cls:'LoginProgress'}, true); // } -//console.log(">> LoginProgress.renderSelf", this.element()); this.append(this.element(), {tag:'div', id:'loginProgress', cls:'LoginProgress', children: [ // this.append(loginProgressElement, [ {tag:'div', cls:'header', children:[ {tag:'h3', id:this.getId('title'), html:"login progress"} ]}, {tag:'div', cls:'body', children:[ {tag:'div', id:this.getId('progressBar')}, {tag:'div', id:this.getId('errorBox'), cls:'errorBox', children:[ // {tag:'div', cls:'img ALERT', children:[{tag:'div'}]}, {tag:'div', cls:'img ALERT', children:[{tag:'canvas', id:this.getId('canvas')}]}, {tag:'p', html:"Login failed"} ]} ]}, {tag:'div', cls:'footer', children:[ {tag:'div', cls:'buttonArea', id:this.getId('buttonArea'), children:[ // {tag:'div', cls:'button', id:this.getId('button'), children:[ // {tag:'a', href:'#', id:this.getId('buttonLink'), html:"cancel"} // ]} {tag:'a', cls:'button', id:this.getId('button'), html:"cancel"} ]} ]} ]}); // ]); Clipperz.PM.UI.Canvas.marks['!'](this.getElement('canvas'), "#ffffff"); this.addComponent(new Clipperz.PM.UI.Common.Components.ProgressBar({'element':this.getElement('progressBar')})); MochiKit.Style.hideElement(this.getElement('errorBox')); // MochiKit.Signal.connect(this.getId('buttonLink'), 'onclick', this, 'cancelEventHandler'); MochiKit.Signal.connect(this.getId('button'), 'onclick', this, 'cancelEventHandler'); }, //------------------------------------------------------------------------- 'displayElement': function() { return MochiKit.DOM.getElement('loginProgress'); }, //------------------------------------------------------------------------- 'cancelEventHandler': function(anEvent) { anEvent.preventDefault(); MochiKit.Signal.signal(this, 'cancelEvent'); }, //------------------------------------------------------------------------- 'disableCancel': function() { MochiKit.Style.hideElement(this.getElement('buttonArea')); }, //------------------------------------------------------------------------- 'showErrorMessage': function() { // this.getElement('buttonLink').innerHTML = "close"; this.getElement('button').innerHTML = "close"; MochiKit.DOM.addElementClass(this.getElement('button'), 'default'); MochiKit.Style.hideElement(this.getElement('progressBar')); this.getElement('title').innerHTML = "Error"; MochiKit.Style.showElement(this.getElement('errorBox')); MochiKit.Style.showElement(this.getElement('buttonArea')); }, //------------------------------------------------------------------------- 'deferredHideModalAndRemove': function(someParameters, aResult) { var deferredResult; deferredResult = new Clipperz.Async.Deferred("LoginProgress.deferredHideModalAndRemove", {trace:false}); deferredResult.addMethod(this, 'deferredHideModal'); deferredResult.addMethod(this, 'remove'); deferredResult.addCallback(function () { return aResult; }); deferredResult.callback(someParameters); return deferredResult; }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/NewUserCreationComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/NewUserCreationComponent.js index feb16ad..06746d1 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/NewUserCreationComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/NewUserCreationComponent.js @@ -1,223 +1,219 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.NewUserCreationComponent = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.NewUserCreationComponent.superclass.constructor.apply(this, arguments); this._tabPanelController = null; this._initiallySelectedTab = args.selected || 'CREDENTIALS'; this._tabPanelControllerConfiguration = { 'CREDENTIALS': { tab: 'credentialsTab', panel: 'credentialsTabpanel' }, 'CHECK_CREDENTIALS': { tab: 'checkCredentialsTab', panel: 'checkCredentialsTabpanel' }, 'TERMS_OF_SERVICE': { tab: 'termsOfServiceTab', panel: 'termsOfServiceTabpanel' }, 'CREATE_USER': { tab: 'createUserTab', panel: 'createUserTabpanel' } //, /* 'LOGIN': { tab: 'loginTab', panel: 'loginTabpanel' } */ }; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.NewUserCreationComponent, Clipperz.PM.UI.Common.Components.TabPanelComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.NewUserCreationComponent component"; }, //========================================================================= 'disableAllPanels': function () { this.tabPanelController().selectTab(null); }, //------------------------------------------------------------------------- 'enableCredentialsPanel': function () { this.tabPanelController().selectTab('CREDENTIALS'); }, 'enableCheckCredentialsPanel': function () { this.tabPanelController().selectTab('CHECK_CREDENTIALS'); }, 'enableTermsOfServicePanel': function () { this.tabPanelController().selectTab('TERMS_OF_SERVICE'); }, 'enableCreateUserPanel': function () { this.tabPanelController().selectTab('CREATE_USER'); }, // 'enableLoginPanel': function () { // this.tabPanelController().selectTab('LOGIN'); // }, //========================================================================= 'shouldShowElementWhileRendering': function() { return false; }, //========================================================================= 'tabPanelController': function () { if (this._tabPanelController == null) { this._tabPanelController = new Clipperz.PM.UI.Common.Controllers.TabPanelController({ component:this, configuration:this._tabPanelControllerConfiguration }); MochiKit.Signal.connect(this._tabPanelController, 'tabSelected', this, 'handleTabSelected') } return this._tabPanelController; }, //------------------------------------------------------------------------- 'renderSelf': function() { -//console.log('** Clipperz.targetModalDimensionsAndPosition', Clipperz.Base.serializeJSON(Clipperz.PM.UI.Common.Components.BaseComponent.targetModalDimensionsAndPosition)); - this.append(this.element(), {tag:'div', cls:'NewUserCreation mainDialog', id:this.getId('panel'), children: [ {tag:'form', id:this.getId('form'), cls:'newUserCreationForm', children:[ {tag:'div', cls:'header', children:[ {tag:'div', cls:'title', children:[ {tag:'h3', id:this.getId('title'), html:"Create new user"} ]} ]}, {tag:'div', id:this.getId('body'), cls:'body', children:[ {tag:'div', cls:'tabContainer', children:[ {tag:'ul', cls:'tabs', children:[ {tag:'li', id:this.getId('credentialsTab'), children:[{tag:'span', html:"credentials"}]}, {tag:'li', id:this.getId('checkCredentialsTab'), children:[{tag:'span', html:"credentials check"}]}, {tag:'li', id:this.getId('termsOfServiceTab'), children:[{tag:'span', html:"terms of service"}]}, {tag:'li', id:this.getId('createUserTab'), children:[{tag:'span', html:"create user"}]} //, // {tag:'li', id:this.getId('loginTab'), children:[{tag:'span', html:"login"}]}, ]}, {tag:'ul', cls:'tabPanels', children:[ {tag:'li', id:this.getId('credentialsTabpanel'), cls:'tabPanel credentials', children:[ {tag:'div', cls:'wizardStepDescription', children:[{tag:'span', html:Clipperz.PM.Strings.getValue('Wizards.NewUserWizard.CREDENTIALS.description')}]}, {tag:'ul', cls:'credentials', children:[ {tag:'li', children:[{tag:'span', cls:'label', html:"username"}, {tag:'input', type:'text', id:this.getId('username')/*, value:'test'*/}]}, {tag:'li', children:[{tag:'span', cls:'label', html:"passphrase"}, {tag:'input', type:'password', id:this.getId('passphrase')/*, value:'test'*/}]} ]} ]}, {tag:'li', id:this.getId('checkCredentialsTabpanel'), cls:'tabPanel checkCredentials', children:[ {tag:'div', cls:'wizardStepDescription', children:[{tag:'span', html:Clipperz.PM.Strings.getValue('Wizards.NewUserWizard.CHECK_CREDENTIALS.description')}]}, {tag:'ul', cls:'credentials', children:[ {tag:'li', children:[{tag:'span', cls:'label', html:"re-passphrase"}, {tag:'input', type:'password', id:this.getId('re-passphrase')/*, value:'test'*/}]} ]} ]}, {tag:'li', id:this.getId('termsOfServiceTabpanel'), cls:'tabPanel termsOfService', children:[ {tag:'div', cls:'wizardStepDescription', children:[{tag:'span', html:Clipperz.PM.Strings.getValue('Wizards.NewUserWizard.TERMS_OF_SERVICE.description')}]}, {tag:'ul', cls:'termsOfService', children:[ {tag:'li', children:[{tag:'input', type:'checkbox', id:this.getId('awareOfUnrecoverablePassphrase')/*, checked:true*/}, {tag:'label', cls:'label', 'for':this.getId('awareOfUnrecoverablePassphrase'), html:"I understand that Clipperz will not be able to recover a lost passphrase."}]}, {tag:'li', children:[{tag:'input', type:'checkbox', id:this.getId('readTermsOfService')/*, checked:true*/}, {tag:'label', cls:'label', 'for':this.getId('readTermsOfService'), htmlString:"I have read and agreed to the <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Terms of Service</a>."}]} ]} ]}, {tag:'li', id:this.getId('createUserTabpanel'), cls:'tabPanel createUser', children:[ {tag:'div', cls:'wizardStepDescription', children:[{tag:'span', html:Clipperz.PM.Strings.getValue('Wizards.NewUserWizard.CREATE_USER.description')}]}, {tag:'ul', cls:'createUserStates', children:[ {tag:'li', cls:'creating', id:this.getId('creatingRegistering'), children:[{tag:'span', html:"registering user"}]}, {tag:'li', cls:'done', id:this.getId('creatingDone'), children:[{tag:'span', html:"done"}]}, {tag:'li', cls:'fail', id:this.getId('creatingFailed'), children:[{tag:'span', html:"fail"}]} ]} ]} //, // {tag:'li', id:this.getId('loginTabpanel'), cls:'tabPanel login', children:[ // {tag:'div', cls:'wizardStepDescription', children:[{tag:'span', html:Clipperz.PM.Strings.getValue('Wizards.NewUserWizard.LOGIN.description')}]}, // ]} ]} ]} ]}, {tag:'div', id:this.getId('footer'), cls:'footer', children:[ {tag:'div', cls:'buttonArea', children:[ // {tag:'div', cls:'cancel', id:this.getId('cancelButton'), html:"cancel"}, // {tag:'div', cls:'save disabled', id:this.getId('saveButton'), html:"save"} ]} ]} ]}, {tag:'div', cls:'clear'} ]}); this.tabPanelController().setup(); // MochiKit.Signal.connect(this.getId('panel'), 'onkeydown', this, 'handleKeyEvent'); MochiKit.Signal.connect(MochiKit.DOM.currentDocument().body, 'onkeydown', this, 'handleKeyEvent'); MochiKit.Signal.connect(this.getId('awareOfUnrecoverablePassphrase'), 'onchange', this, 'handleTermsOfServiceCheckboxChange'); MochiKit.Signal.connect(this.getId('readTermsOfService'), 'onchange', this, 'handleTermsOfServiceCheckboxChange'); }, //------------------------------------------------------------------------- /* 'resetContent': function () { this.getElement('username').value = ''; this.getElement('passphrase').value = ''; }, */ //------------------------------------------------------------------------- 'displayElement': function() { return this.getElement('panel'); }, //------------------------------------------------------------------------- 'handleTabSelected': function (aSelectedTab) { /* switch (aSelectedTab) { case 'DETAILS': break; case 'DIRECT_LOGINS': MochiKit.Style.hideElement(this.getElement('backToDirectLoginList')); break; case 'SHARING': break; } */ }, @@ -240,188 +236,184 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.NewUserCreationComponent, Cli return this.getElement('re-passphrase').value; }, 'awareOfUnrecoverablePassphrase': function () { return this.getElement('awareOfUnrecoverablePassphrase').value; }, 'readTermsOfService': function () { return this.getElement('readTermsOfService').value; }, //========================================================================= /* 'incrementUpdateFaviconCounter': function () { this._updateFaviconCounter ++; }, 'decrementUpdateFaviconCounter': function () { this._updateFaviconCounter --; }, 'updateFaviconCounter': function () { return this._updateFaviconCounter; }, */ //------------------------------------------------------------------------- /* 'updateFavicon': function () { this.decrementUpdateFaviconCounter(); if (this.updateFaviconCounter() == 0) { this.setFavicon(this.favicon()); } }, */ //========================================================================= /* 'bindingComponents': function () { return this._bindingComponents; }, 'clearAllBindingsComponents': function () { MochiKit.Iter.forEach(this.bindingComponents(), MochiKit.Base.methodcaller('remove')); this._bindingComponents = []; this.getElement('bindings').innerHTML = ''; }, 'addBindingComponent': function (aBindingComponent) { this.bindingComponents().push(aBindingComponent); aBindingComponent.renderInNode(this.append(this.getElement('bindings'), {tag:'div'})); }, */ //========================================================================= /* 'formValueComponents': function () { return this._formValueComponents; }, 'clearAllFormValueComponents': function () { MochiKit.Iter.forEach(this.formValueComponents(), MochiKit.Base.methodcaller('remove')); this._formValueComponents = []; this.getElement('formValues').innerHTML = ''; }, 'addFormValueComponent': function (aFormValueComponent) { this.formValueComponents().push(aFormValueComponent); aFormValueComponent.renderInNode(this.append(this.getElement('formValues'), {tag:'div'})); }, */ //========================================================================= 'changedValue': function (anEvent) { MochiKit.Signal.signal(this, 'changedValue', anEvent); this.incrementUpdateFaviconCounter(); MochiKit.Async.callLater(1, MochiKit.Base.method(this, 'updateFavicon')); }, //------------------------------------------------------------------------- 'handleBackClick': function (anEvent) { anEvent.preventDefault(); MochiKit.Signal.signal(this, 'back'); }, //========================================================================= 'bottomMargin': function () { var result; // TODO: WTF!!! // result = MochiKit.Style.getElementPosition(this.element())['y'] + // MochiKit.Style.getElementDimensions(this.element())['h']; // result = MochiKit.Style.getElementPosition(this.getElement('footer'))['y']; -//console.log("### bottomMargin"); -//console.log('displayElement', this.displayElement()); -//console.log('-- Clipperz.targetModalDimensionsAndPosition', Clipperz.Base.serializeJSON(Clipperz.PM.UI.Common.Components.BaseComponent.targetModalDimensionsAndPosition)); -//console.log('element', MochiKit.Style.getElementPosition('modalDialog') ['y'], MochiKit.Style.getElementDimensions('modalDialog')['h']); // result = 450; result = Clipperz.PM.UI.Common.Components.BaseComponent.targetModalDimensionsAndPosition['position']['y'] + Clipperz.PM.UI.Common.Components.BaseComponent.targetModalDimensionsAndPosition['dimensions']['h'] - 60; return result; }, //========================================================================= 'focusOnUsernameElement': function () { MochiKit.Async.callLater(0.1, MochiKit.Base.method(this.getElement('username'), 'focus')); }, 'focusOnRePassphraseElement': function () { this.getElement('re-passphrase').focus(); }, /* 'focusOnBookmarkletConfigurationElement': function () { this.getElement('bookmarkletConfiguration').focus(); }, 'focusOnFaviconElement': function () { this.getElement('faviconURL').focus(); }, */ //========================================================================= 'hideAllProgeressStates': function () { MochiKit.Style.hideElement(this.getElement('creatingRegistering')); MochiKit.Style.hideElement(this.getElement('creatingDone')); MochiKit.Style.hideElement(this.getElement('creatingFailed')); }, 'showProgressOnUserCreation': function () { //Clipperz.log(">>> NewUserCreationComponent.showProgressOnUserCreation"); this.hideAllProgeressStates(); MochiKit.Style.showElement(this.getElement('creatingRegistering')); }, 'showUserCreationDone': function () { //Clipperz.log(">>> NewUserCreationComponent.showUserCreationDone"); this.hideAllProgeressStates(); MochiKit.Style.showElement(this.getElement('creatingDone')); //Clipperz.log("<<< NewUserCreationComponent.showUserCreationDone"); }, 'showUserCreationFailed': function () { //Clipperz.log(">>> NewUserCreationComponent.showUserCreationFailed"); this.hideAllProgeressStates(); MochiKit.Style.showElement(this.getElement('creatingFailed')); }, //========================================================================= 'handleKeyEvent': function (anEvent) { MochiKit.Signal.signal(this, 'keyPressed', anEvent); /* if (anEvent.key().string == 'KEY_ENTER') { if (anEvent.target().nodeName != 'TEXTAREA') { MochiKit.Signal.signal(this, 'moveForward'); anEvent.preventDefault(); } } else if (anEvent.key().string == 'KEY_TAB') { if ((anEvent.target().nodeName == 'INPUT') || (anEvent.target().nodeName == 'TEXTAREA')) { MochiKit.Signal.signal(this, 'moveForward'); anEvent.preventDefault(); } } */ }, 'handleTermsOfServiceCheckboxChange': function (anEvent) { MochiKit.Signal.signal(this, 'changedValue'); }, //========================================================================= 'clear': function () { this.tabPanelController().selectTab(null); Clipperz.PM.UI.Web.Components.NewUserCreationComponent.superclass.clear.apply(this, arguments); }, //========================================================================= __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/Page.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/Page.js index 3cc5a37..30cbeb2 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/Page.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/Page.js @@ -1,68 +1,66 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.Page = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.Page.superclass.constructor.apply(this, arguments); this._slots = { 'header': 'pageHeader', 'body': 'pageBody', 'footer': 'pageFooter' }; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.Page, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.Page component"; }, //------------------------------------------------------------------------- 'renderSelf': function(/*aContainer, aPosition*/) { this.append(this.element(), [ {tag:'div', id:'pageHeaderAndBody', cls:'pageHeaderAndBody', children:[ {tag:'div', id:'pageHeader', cls:'pageHeader'}, {tag:'div', id:'pageBody', cls:'pageBody'} ]}, {tag:'div', id:'pageFooter', cls:'pageFooter'} ]); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageFooter.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageFooter.js index dcf506f..df3ca0c 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageFooter.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageFooter.js @@ -1,67 +1,65 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.PageFooter = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.PageFooter.superclass.constructor.apply(this, arguments); return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.PageFooter, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.PageFooter component"; }, //------------------------------------------------------------------------- 'renderSelf': function(/*aContainer, aPosition*/) { this.append(this.element(), [ {tag:'div', cls:'footerWrapper', children:[ {tag:'div', cls:'footerContent', children:[ {tag:'canvas', id:this.getId('footerStarIcon'), cls:'footerStarIcon'}, {tag:'span', cls:'copyright', html:'Copyright © 2009-2013 Clipperz Srl'}, {tag:'a', href:'http://www.clipperz.com/terms_of_service', target:'_blank', html:'terms of service'}, {tag:'a', href:'http://www.clipperz.com/privacy_policy', target:'_blank', html:'privacy policy'}, {tag:'div', cls:'applicationVersion', htmlString:'application version: <a href="https://github.com/clipperz/password-manager/tree/' + Clipperz_version + '" target="github">' + Clipperz_version + '</a>'} ]} ]} ]); Clipperz.PM.UI.Canvas.star.normal(this.getElement('footerStarIcon'), "#7e7e7e"); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageHeader.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageHeader.js index b8f3b05..5e49fb5 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageHeader.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageHeader.js @@ -1,118 +1,116 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.PageHeader = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.PageHeader.superclass.constructor.apply(this, arguments); this._newsIsOpen = args.newsIsOpen || false; this._animationDuration = args.animationDuration || 0.5; this._offset = 82; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.PageHeader, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.PageHeader component"; }, //------------------------------------------------------------------------- 'iframeURL': function () { // return './rss_view.html'; return 'http://www.clipperz.com/files/clipperz.com/appTips/index.html'; }, //------------------------------------------------------------------------- 'renderSelf': function(/*aContainer, aPosition*/) { this.append(this.element(), [ {tag:'div', id:'miscLinks', children:[ {tag:'ul', children:[ {tag:'li', children:[{tag:'a', id:'donateHeaderLink', stringID:'pageHeader.donation', href:'http://www.clipperz.com/donations', target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.donation')}]}, {tag:'li', children:[{tag:'a', id:'forumHeaderLink', stringID:'pageHeader.forum', href:'http://www.clipperz.com/forum', target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.forum')}]}, {tag:'li', children:[{tag:'a', id:'creditsHeaderLink', stringID:'pageHeader.credits', href:'http://www.clipperz.com/credits', target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.credits')}]}, {tag:'li', children:[{tag:'a', id:'feedbackHeaderLink', stringID:'pageHeader.feedback', href:'http://www.clipperz.com/contact', target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.feedback')}]}, {tag:'li', children:[{tag:'a', id:'helpHeaderLink', stringID:'pageHeader.help', href:'http://www.clipperz.com/support/user_guide', target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.help')}]} ]} ]}, {tag:'div', id:'logoFrame', children:[ {tag:'a', href:'http://www.clipperz.com', target:'_blank', children:[ // {tag:'h1', cls:'logo', html:"clipperz"}, {tag:'canvas', id:this.getId('logo'), cls:'logo'}, {tag:'h5', cls:'clipperzPayoff', html:"keep it to yourself!"} ]} ]}, {tag:'div', id:'news', cls:'hidden', children:[ // {tag:'div', cls:'close', children:[ // {tag:'a', href:'#', id:this.getId('closeTips'), html:'x'} // ]}, {tag:'div', id:'newsframe', children:[ {tag:'iframe', id:this.getId('iframe'), src:this.iframeURL()} ]}, {tag:'div', id:this.getId('newsGrip'), cls:'grip', children:[ {tag:'div', cls:'gripHandler', children:[]} ]} ]}, {tag:'div', id:'featureTabs', children:[ {tag:'table', children:[{tag:'tr', children:[ {tag:'td', children:[{tag:'div', id:'feature_store', children:[{tag:'canvas', cls:'featureIcon', id:this.getId('storeIcon')}, {tag:'span', html:"Store and manage your password and online credentials"}]}]}, {tag:'td', children:[{tag:'div', id:'feature_protect', children:[{tag:'canvas', cls:'featureIcon', id:this.getId('protectIcon')}, {tag:'span', html:"Protect all your sensitive data"}]}]}, {tag:'td', children:[{tag:'div', id:'feature_directLogin', children:[{tag:'canvas', cls:'featureIcon', id:this.getId('directLoginIcon')}, {tag:'span', html:"Login to your web services without entering any username or password"}]}]}, {tag:'td', children:[{tag:'div', id:'feature_share', children:[{tag:'canvas', cls:'featureIcon', id:this.getId('shareIcon')}, {tag:'span', html:"Share secret with family members and associates"}]}]} ]}]} ]} ]); Clipperz.PM.UI.Canvas.features.store(this.getElement('storeIcon'), "#ffffff"); Clipperz.PM.UI.Canvas.features.protect(this.getElement('protectIcon'), "#ffffff"); Clipperz.PM.UI.Canvas.features.directLogin(this.getElement('directLoginIcon'), "#ffffff"); Clipperz.PM.UI.Canvas.features.share(this.getElement('shareIcon'), "#ffffff", "#ffffff", "#ff0000"); MochiKit.Signal.connect(this.getElement('newsGrip'), 'onclick', this, 'toggleTips'); MochiKit.Signal.connect(this.getElement('iframe'), 'onload', this, 'handleIframeDidLoad'); this.setLogoDefaultColors(); }, //------------------------------------------------------------------------- 'switchToLoggedMode': function() { // MochiKit.Style.addElementClass(this.element(), 'logged'); MochiKit.Style.hideElement('featureTabs'); }, //------------------------------------------------------------------------- 'animationDuration': function () { return this._animationDuration; diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PasswordTooltip.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PasswordTooltip.js index 987e51e..5eb0c1f 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PasswordTooltip.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PasswordTooltip.js @@ -1,118 +1,116 @@ /* -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.Common.Components'); Clipperz.PM.UI.Web.Components.PasswordTooltip = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.PasswordTooltip.superclass.constructor.apply(this, arguments); this._referenceElement = args.referenceElement || Clipperz.Base.exception.raise('MandatoryParameter'); this._text = args.text || Clipperz.Base.exception.raise('MandatoryParameter'); this._boxDimensions = null; this._isVisible = false; this.renderSelf(); return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.PasswordTooltip, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.PasswordTooltip component"; }, //------------------------------------------------------------------------- 'referenceElement': function () { return this._referenceElement; }, //------------------------------------------------------------------------- 'text': function () { return this._text; }, 'setText': function (aValue) { this._text = aValue; }, //------------------------------------------------------------------------- 'isVisible': function () { return this._isVisible; }, 'setIsVisible': function (aValue) { this._isVisible = aValue; }, //------------------------------------------------------------------------- 'renderSelf': function() { this.append(MochiKit.DOM.getElement('Clipperz_PM_UI_Common_Components_Tooltip_wrapperNode'), {tag:'div', id:this.getId('tooltip'), cls:'passwordTooltip', children:[ {tag:'div', id:this.getId('body'), cls:'passwordTooltip_body', children:[ {tag:'div', cls:'passwordTooltip_text', children:[ {tag:'span', html:this.text()} ]}, {tag:'div', id:this.getId('footer'), cls:'passwordTooltip_footer'} ]}, {tag:'div', id:this.getId('arrow'), cls:'passwordTooltip_arrow'} ]}); this._boxDimensions = MochiKit.Style.getElementDimensions(this.getId('body')); // this._boxDimensions.h += MochiKit.Style.getElementDimensions(this.getId('footer')).h; MochiKit.Style.hideElement(this.displayElement()); MochiKit.Signal.connect(this.element(), 'onmouseenter', this, 'show'); MochiKit.Signal.connect(this.element(), 'onmouseleave', this, 'hide'); }, //----------------------------------------------------- 'displayElement': function() { return this.getElement('tooltip'); }, //------------------------------------------------------------------------- 'boxDimensions': function () { return this._boxDimensions; }, //------------------------------------------------------------------------- 'show': function () { var elementSizeAndPosition; var arrowPosition; var bodyPosition; diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/RulerComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/RulerComponent.js index 69c1ede..ad8d677 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/RulerComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/RulerComponent.js @@ -1,211 +1,208 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.RulerComponent = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.RulerComponent.superclass.constructor.apply(this, arguments); this._translationContext = args.translationContext || Clipperz.Base.exception.raise('MandatoryParameter'); // this._steps = args.steps || Clipperz.Base.exception.raise('MandatoryParameter'); this._steps = args.steps; this._currentStep = -1; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.RulerComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.RulerComponent component"; }, //------------------------------------------------------------------------- 'resetStatus': function (args) { args = args || {}; if (this.currentStep() != 0) { var shouldAnimateTransition; shouldAnimateTransition = args.animateTransition || false; if (shouldAnimateTransition) { this.moveToFirstStep(MochiKit.Base.method(this, 'cursorMoved')); } else { this._currentStep = 0; this.cursorMoved(); } } }, //------------------------------------------------------------------------- 'translationContext': function () { return this._translationContext; }, 'steps': function () { return this._steps; }, 'setSteps': function (aValue) { this._steps = aValue; this.renderStepsComponents(); this.resetStatus(); }, 'translatedStepDescription': function (aStep) { return Clipperz.PM.Strings.getValue(this.translationContext() + '.' + aStep + '.' + 'name'); }, //------------------------------------------------------------------------- 'renderSelf': function(/*aContainer, aPosition*/) { this.setElement(this.append(MochiKit.DOM.currentDocument().body, [ {tag:'div', id:this.getId('rulerWrapper'), cls:'rulerWrapper fixed', children:[ {tag:'div', cls:'ruler', children:[ {tag:'a', href:'#', id:this.getId('exit'), cls:'exit', html:' '}, {tag:'a', href:'#', id:this.getId('smallPreviousButton'), cls:'smallButton previous', html:' '}, {tag:'a', href:'#', id:this.getId('smallNextButton'), cls:'smallButton next', html:' '}, {tag:'div', cls:'marker', id:this.getId('marker'), children:[ {tag:'div', cls:'previous', id:this.getId('previousButton')}, {tag:'div', cls:'markerBody'}, {tag:'div', cls:'next', id:this.getId('nextButton')} ]}, {tag:'div', cls:'steps', id:this.getId('stepsFrame')}, // {tag:'div', cls:'steps' + ' ' + 'steps_' + this.steps().length, children:[ // {tag:'ul', id:this.getId('steps'), children:MochiKit.Base.map(MochiKit.Base.bind(function (aStep) { return {tag:'li', children:[{tag:'span', html:this.translatedStepDescription(aStep)}]}}, this), this.steps())} // ]}, {tag:'div', cls:'dots', id:this.getId('dotsFrame')} // {tag:'div', cls:'dots' + ' ' + 'steps_' + this.steps().length, children:[ // {tag:'ul', id:this.getId('dots'), children:MochiKit.Base.map(function (aStep) { return {tag:'li', children:[{tag:'span', html:'*'}]}}, this.steps())} // ]} ]} ]} ])); -//console.log("ELEMENT", this.element()); MochiKit.Signal.connect(this.getElement('exit'), 'onclick', this, 'handleExit'); MochiKit.Signal.connect(this.getElement('previousButton'), 'onclick', this, 'handlePrevious'); MochiKit.Signal.connect(this.getElement('smallPreviousButton'), 'onclick', this, 'handlePrevious'); MochiKit.Signal.connect(this.getElement('nextButton'), 'onclick', this, 'handleNext'); MochiKit.Signal.connect(this.getElement('smallNextButton'), 'onclick', this, 'handleNext'); this.enablePrevious(false); this.enableNext(false); // this.cursorMoved(); }, //......................................................................... 'renderStepsComponents': function () { var stepsFrame; var dotsFrame; stepsFrames = this.getElement('stepsFrame'); MochiKit.DOM.setElementClass(stepsFrames, 'steps'); MochiKit.DOM.addElementClass(stepsFrames, 'steps_' + this.steps().length); stepsFrames.innerHTML = ""; this.append(stepsFrames, {tag:'ul', id:this.getId('steps'), children:MochiKit.Base.map( MochiKit.Base.bind(function (aStep) { return {tag:'li', children:[{tag:'span', html:this.translatedStepDescription(aStep)}]}}, this), this.steps())} ); dotsFrames = this.getElement('dotsFrame'); MochiKit.DOM.setElementClass(dotsFrames, 'dots'); MochiKit.DOM.addElementClass(dotsFrames, 'steps_' + this.steps().length); dotsFrames.innerHTML = ""; this.append(dotsFrames, {tag:'ul', id:this.getId('dots'), children:MochiKit.Base.map( function (aStep) { return {tag:'li', children:[{tag:'span', html:'*'}]}; }, this.steps())} ); }, //------------------------------------------------------------------------- 'handleExit': function (anEvent) { anEvent.preventDefault(); MochiKit.Signal.signal(this, 'exit'); }, //------------------------------------------------------------------------- 'handlePrevious': function (anEvent) { anEvent.preventDefault(); // if (!MochiKit.DOM.hasElementClass(this.getElement('previousButton'), 'disabled')) { // this.moveBackward(); // } MochiKit.Signal.signal(this, 'moveBackward'); }, 'handleNext': function (anEvent) { anEvent.preventDefault(); // if (!MochiKit.DOM.hasElementClass(this.getElement('nextButton'), 'disabled')) { // this.moveForward(); // } MochiKit.Signal.signal(this, 'moveForward'); }, //------------------------------------------------------------------------- 'currentStep': function () { return this._currentStep; }, 'markerInitialOffset': function () { return -246; }, 'markerStepOffset': function () { return 410 / (this.steps().length - 1); // return 100; }, //------------------------------------------------------------------------- 'moveToFirstStep': function (aCallback) { var stepsToMove; stepsToMove = this._currentStep; this._currentStep = 0; this.enablePrevious(false); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TabSidePanel.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TabSidePanel.js index 666afe9..edcdb62 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TabSidePanel.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TabSidePanel.js @@ -1,118 +1,116 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.TabSidePanel = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.TabSidePanel.superclass.constructor.call(this, args); this._element = args.element || null; this._slots = { }; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.TabSidePanel, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.TabSidePanel component"; }, //------------------------------------------------------------------------- 'deselectAllTabs': function() { var tabListItems; tabListItems = [ 'cardsLI', // 'directLoginLI', 'accountLI', 'dataLI', 'toolsLI' ]; //Clipperz.log("=== TabSidePanel.tabSelected anEvent.src().id", anEvent.src().id); for (var i in tabListItems) { //Clipperz.log("=== TabSidePanel.tabSelected aTabListItem", tabListItems[i]); MochiKit.DOM.removeElementClass(this.getId(tabListItems[i]), 'selected'); } }, 'selectTab': function(aTabName) { this.deselectAllTabs(); MochiKit.DOM.addElementClass(this.getId(this.listItemIdForTabNamed(aTabName)), 'selected'); MochiKit.Signal.signal(this, 'tabSelected', aTabName); }, 'tabNameForAnchorId': function(anId) { var result; switch(anId) { case 'cards_tabSidePanel': result = 'cards'; break; // case 'directLogins_tabSidePanel': // result = 'directLogins'; // break; case 'account_tabSidePanel': result = 'account'; break; case 'data_tabSidePanel': result = 'data'; break; case 'tools_tabSidePanel': result = 'tools'; break; } return result; }, 'listItemIdForTabNamed': function(aTabName) { var result; switch (aTabName) { case 'cards': result = 'cardsLI'; break; // case 'directLogins': // result = 'directLoginLI'; // break; case 'account': result = 'accountLI'; break; case 'data': result = 'dataLI'; break; case 'tools': result = 'toolsLI'; break; diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TextColumnManager.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TextColumnManager.js index 3dc9ce9..9b1796a 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TextColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TextColumnManager.js @@ -1,50 +1,48 @@ /* -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.Web.Components'); //############################################################################# Clipperz.PM.UI.Web.Components.TextColumnManager = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.TextColumnManager.superclass.constructor.call(this, args); return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.TextColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { 'toString': function () { return "Clipperz.PM.UI.Web.Components.TextColumnManager component"; }, //----------------------------------------------------- '__syntax_fix__' : 'syntax fix' }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ToolsPanel.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ToolsPanel.js index 0fa369f..034ed91 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ToolsPanel.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ToolsPanel.js @@ -1,110 +1,108 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.ToolsPanel = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.ToolsPanel.superclass.constructor.apply(this, arguments); this._initiallySelectedTab = args.selected || 'PASSWORD_GENERATOR'; this._tabPanelControllerConfiguration = { 'PASSWORD_GENERATOR': { tab: 'passwordGeneratorTab', panel: 'passwordGeneratorPanel' }, 'BOOKMARKLET': { tab: 'bookmarkletTab', panel: 'bookmarkletPanel' }, 'COMPACT_EDITION': { tab: 'compactEditionTab', panel: 'compactEditionPanel' }, 'HTTP_AUTH': { tab: 'httpAuthTab', panel: 'httpAuthPanel' } }; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.ToolsPanel, Clipperz.PM.UI.Common.Components.TabPanelComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.ToolsPanel component"; }, //------------------------------------------------------------------------- 'renderSelf': function(/*aContainer, aPosition*/) { this.append(this.element(), [ {tag:'div', cls:'header', children:[ {tag:'div', cls:'subPanelTabs', children:[ {tag:'ul', children:[ {tag:'li', id:this.getId('passwordGeneratorTab'), children:[{tag:'a', href:'#', html:'Password generator'}], cls:'first'}, {tag:'li', id:this.getId('bookmarkletTab'), children:[{tag:'a', href:'#', html:'Bookmarklet'}]}, {tag:'li', id:this.getId('compactEditionTab'), children:[{tag:'a', href:'#', html:'Compact edition'}]}, {tag:'li', id:this.getId('httpAuthTab'), children:[{tag:'a', href:'#', html:'HTTP Auth'}]} ]} ]} ]}, {tag:'div', cls:'body', children:[ {tag:'div', cls:'accountPanel', children:[ {tag:'div', cls:'subPanelContent', children:[ {tag:'ul', children:[ {tag:'li', id:this.getId('passwordGeneratorPanel'), children:[ // {tag:'h3', html:"Password generator"} ]}, {tag:'li', id:this.getId('bookmarkletPanel'), children:[ // {tag:'h3', html:"Bookmarklet"} ]}, {tag:'li', id:this.getId('compactEditionPanel'), children:[ // {tag:'h3', html:"Compact edition"} ]}, {tag:'li', id:this.getId('httpAuthPanel'), children:[ // {tag:'h3', html:"HTTP Auth"} ]} ]} ]} ]} ]}, {tag:'div', cls:'footer'} ]); this.tabPanelController().setup({selected:this.initiallySelectedTab()}); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UnlockPasswordComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UnlockPasswordComponent.js index 21ccf2a..fe46729 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UnlockPasswordComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UnlockPasswordComponent.js @@ -1,181 +1,178 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.UnlockPasswordComponent = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.UnlockPasswordComponent.superclass.constructor.apply(this, arguments); this._openFromElement = args.openFromElement || null; this._onOkCloseToElement = args.onOkCloseToElement || null; this._onCancelCloseToElement = args.onCancelCloseToElement || null; this._progressBarComponent = null; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.UnlockPasswordComponent, Clipperz.PM.UI.Common.Components.SimpleMessagePanel, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.UnlockPasswordComponent component"; }, //------------------------------------------------------------------------- 'getPassphrase': function () { /* var deferredResult; if (this.passphrase() == null) { this.deferredShowModal({'openFromElement': this.openFromElement()}); deferredResult = this.deferred(); } else { deferredResult = MochiKit.Async.succeed(this.passphrase()); } return deferredResult; */ this.deferredShowModal({'openFromElement': this.openFromElement()}); return this.deferred(); }, //------------------------------------------------------------------------- 'deferredShowModal': function (someParameters) { return Clipperz.Async.callbacks("UnlockPasswordComponent.deferredShowModal", [ MochiKit.Base.bind(Clipperz.PM.UI.Web.Components.UnlockPasswordComponent.superclass.deferredShowModal, this, someParameters), MochiKit.Base.method(this, 'getElement', 'passphrase'), MochiKit.Base.methodcaller('focus') ], {trace:false}) }, //------------------------------------------------------------------------- 'openFromElement': function () { return this._openFromElement; }, 'onOkCloseToElement': function () { return this._onOkCloseToElement; }, 'onCancelCloseToElement': function () { return this._onCancelCloseToElement; }, //------------------------------------------------------------------------- 'renderSelf': function() { Clipperz.PM.UI.Web.Components.UnlockPasswordComponent.superclass.renderSelf.apply(this, arguments); this.append(this.getElement('container'), {tag:'div', cls:'passphrase', children: [ // {tag:'form', id:this.getId('passphraseForm'), children:[ {tag:'input', id:this.getId('passphrase'), type:'password', name:'passphrase', value:''} // ]} ]}); MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'userSuccessfullyLoggedIn', this, 'userSuccessfullyLoggedInHandler'); MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'userLoginFailed', this, 'userLoginFailedHandler'); // MochiKit.Async.callLater(0.1, MochiKit.Base.method(this.getElement('passphrase'), 'focus')); // this.getElement('passphrase').select(); }, //------------------------------------------------------------------------- 'showProgressBar': function () { var progressBarElement; this.getElement('container').innerHTML = ''; progressBarElement = this.append(this.getElement('container'), {tag:'div', cls:'progressBarWrapper'}); this.addComponent(new Clipperz.PM.UI.Common.Components.ProgressBar({'element':progressBarElement})); this.setButtons([{text:"Cancel", result:'CANCEL'}]); }, //------------------------------------------------------------------------- 'showFailure': function () { this.setType('ALERT'); this.setTitle("Login failed"); this.setText("Wrong passphrase; the unlock has failed."); this.getElement('container').innerHTML = ''; this.setButtons([{text:"Close", result:'CANCEL', isDefault:true}]); }, //------------------------------------------------------------------------- 'closeOk': function () { var passphrase; passphrase = this.getElement('passphrase').value; this.showProgressBar(); // this.deferred().callback(passphrase); MochiKit.Async.callLater(0.5, MochiKit.Base.method(this.deferred(), 'callback', passphrase)); this._deferred = null; }, 'closeCancel': function () { this.deferredHideModal({closeToElement:this.onCancelCloseToElement()}); this.deferred().cancel(); this._deferred = null; }, //------------------------------------------------------------------------- 'userSuccessfullyLoggedInHandler': function (anEvent) { this.deferredHideModal({closeToElement:this.onOkCloseToElement()}); }, 'userLoginFailedHandler': function (anEvent) { -//console.log("############### FAILED LOGIN ################"); this.showFailure(); }, //------------------------------------------------------------------------- /* 'deferredShow': function (someArgs, aResult) { this.deferredShowModal(someArgs); // this.deferred().addMethod(this, 'deferredHideModal', {closeToElement:someArgs.onOkCloseToElement }); // this.deferred().addErrback (MochiKit.Base.method(this, 'deferredHideModal', {closeToElement:someArgs.onCancelCloseToElement })); // this.deferred().addCallback(MochiKit.Async.succeed, aResult); return this.deferred(); }, */ //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UserInfoBox.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UserInfoBox.js index d699dc6..fbf58e0 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UserInfoBox.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UserInfoBox.js @@ -1,245 +1,239 @@ /* -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.Web.Components'); Clipperz.PM.UI.Web.Components.UserInfoBox = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.UserInfoBox.superclass.constructor.apply(this, arguments); this._slots = { }; this._isLocked = false; this._lockTooltip = null; return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.UserInfoBox, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.PM.UI.Web.Components.UserInfoBox component"; }, //------------------------------------------------------------------------- 'handleLogout': function(anEvent) { //Clipperz.log(">>> UserInfoBox.handleLogout"); anEvent.preventDefault(); MochiKit.Signal.signal(this, 'logout'); //Clipperz.log("<<< UserInfoBox.handleLogout"); }, //------------------------------------------------------------------------- 'lockTooltip': function () { return this._lockTooltip; }, //------------------------------------------------------------------------- 'isLocked': function () { return this._isLocked; }, 'setIsLocked': function (aValue) { this._isLocked = aValue; }, 'toggleLock': function(anEvent) { var deferredResult; var shouldLock; -//console.log(">>> UserInfoBox.toggleLock [locked: " + this.isLocked() + "]"); anEvent.preventDefault(); this.lockTooltip().hide(); shouldLock = (this.isLocked() == false); if (shouldLock) { var maskElement; this.setIsLocked(true); maskElement = this.getId('modalDialogMask'); deferredResult = Clipperz.Async.callbacks("UserInfoBox.toggleLock [lock]", [ MochiKit.Base.partial(MochiKit.DOM.addElementClass, this.element(), 'locked'), MochiKit.Base.partial(Clipperz.Visual.deferredAnimation, MochiKit.Visual.appear, maskElement, {from:0.0, to:0.75, duration:0.5}), MochiKit.Base.method(Clipperz.PM.RunTime.mainController, 'setPassphraseDelegate', MochiKit.Base.method(this, 'askForPassphrase')), MochiKit.Base.partial(MochiKit.Signal.signal, this, 'lock') ], {trace:false}); } else { deferredResult = Clipperz.Async.callbacks("UserInfoBox.toggleLock [unlock]", [ MochiKit.Base.partial(MochiKit.Signal.signal, this, 'unlock') ], {trace:false}); } -//console.log("<<< UserInfoBox.toggleLock"); return deferredResult; }, //------------------------------------------------------------------------- 'unlock': function () { var deferredResult; var maskElement; this.setIsLocked(false); maskElement = this.getId('modalDialogMask'); deferredResult = Clipperz.Async.callbacks("UserInfoBox.unlock", [ MochiKit.Base.partial(Clipperz.Visual.deferredAnimation, MochiKit.Visual.fade, maskElement, {from:0.75, to:0.0, duration:0.5}), // Clipperz.Visual.deferredAnimation(MochiKit.Visual.fade, maskElement, {from:0.75, to:0.0, duration:0.5}), MochiKit.Base.partial(MochiKit.DOM.removeElementClass, this.element(), 'locked') ], {trace:false}); }, //------------------------------------------------------------------------- 'askForPassphrase': function () { var unlockPasswordComponent; /* var deferredResult; deferredResult = new Clipperz.Async.Deferred("UserInfoBox.askForPassphrase", {trace:false}); deferredResult.addCallback(MochiKit.Async.succeed, 'test'); deferredResult.callback(); return deferredResult; */ -//console.log(">>> UserInfoBox.askForPassphrase"); unlockPasswordComponent = new Clipperz.PM.UI.Web.Components.UnlockPasswordComponent({ 'title': "Unlock account", 'text': "Insert the passprase to unlock the account", 'type': 'INFO', 'buttons': [ {text:"Cancel", result:'CANCEL'}, {text:"Unlock", result:'OK', isDefault:true} ], 'openFromElement': this.getElement('lock'), 'onOkCloseToElement': null, 'onCancelCloseToElement': this.getId('lock') }); -//console.log("<<< UserInfoBox.askForPassphrase"); return unlockPasswordComponent.getPassphrase(); }, //========================================================================= 'renderSelf': function(/*aContainer, aPosition*/) { this.append(this.element(), [ // {tag:'canvas', id:this.getId('canvas'), cls:'canvas', width:'188', height:'154'}, {tag:'div', cls:'header', children:[ {tag:'h1', html:"Welcome"}, {tag:'a', cls:'lockButton', href:'#', id:this.getId('lock'), html:' '} ]}, {tag:'div', cls:'body', children:[ {tag:'h3', id:this.getId('username'), html:""}, {tag:'ul', children:[ {tag:'li', id:this.getId('cards'), children:[ {tag:'span', id:this.getId('cardsNumber'), cls:'number', html:"-"}, {tag:'span', id:this.getId('cardsLabel'), html:"cards"} ]}, {tag:'li', id:this.getId('directLogins'), children:[ {tag:'span', id:this.getId('directLoginsNumber'), cls:'number', html:"-"}, {tag:'span', id:this.getId('directLoginsLabel'), html:"direct logins"} ]} ]}, {tag:'a', href:'#', id:this.getId('logout'), html:"logout >"} ]}, {tag:'div', cls:'footer'} ]); MochiKit.Signal.connect(this.getElement('logout'), 'onclick', this, 'handleLogout'); MochiKit.Signal.connect(this.getElement('lock'), 'onclick', this, 'toggleLock'); this._lockTooltip = new Clipperz.PM.UI.Common.Components.Tooltip({ element: this.getElement('lock'), text: "Click here to lock/unlock your account.", position: 'RIGHT' }); Clipperz.DOM.Helper.append(MochiKit.DOM.currentDocument().body, {tag:'div', id:this.getId('modalDialogWrapper'), cls:'modalDialogWrapper', children:[ {tag:'div', id:this.getId('modalDialogMask'), cls:'modalDialogMask userInfoBoxMask'} ]} ); MochiKit.Style.hideElement(this.getId('modalDialogMask')); // this.drawUserInfoBackground(this.getElement('canvas')); }, //------------------------------------------------------------------------- /* 'drawUserInfoBackground': function (canvas) { var kMyDrawingFunctionWidth = 188.0; var kMyDrawingFunctionHeight = 154.0; var context = canvas.getContext("2d"); var color; var resolution; var alignStroke; var path; var pointX; var pointY; var controlPoint1X; var controlPoint1Y; var controlPoint2X; var controlPoint2Y; var gradient; if (window.devicePixelRatio) resolution = window.devicePixelRatio; else resolution = 1.0; resolution *= 0.5 * (canvas.width / kMyDrawingFunctionWidth + canvas.height / kMyDrawingFunctionHeight); context.save(); context.scale(canvas.width / kMyDrawingFunctionWidth, canvas.height / kMyDrawingFunctionHeight); context.clearRect(0.0, 0.0, kMyDrawingFunctionWidth, kMyDrawingFunctionHeight); // Setup for Shadow Effect color = "rgba(0.0%, 0.0%, 0.0%, 0.667)"; context.save(); context.shadowColor = color; context.shadowBlur = 3.0; context.shadowOffsetX = 5.729 * Math.cos(7.592) * resolution; context.shadowOffsetY = 5.729 * Math.sin(7.592) * resolution; // Layer 1 alignStroke = 0.0; context.beginPath(); pointX = 169.5; pointY = 141.5; pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; context.moveTo(pointX, pointY); pointX = 177.5; pointY = 133.5; 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 1ab2e69..3d9d6d3 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js @@ -1,118 +1,116 @@ /* -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.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(); MochiKit.Signal.connect(this._userInfoBox, 'logout', this, 'handleLogout'); @@ -231,121 +229,120 @@ MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.AppController.prototype, { this.hideAllAppPageTabSlots(); this.appPage().showSlot(this.slotNameForTab('cards')); MochiKit.Signal.connect(this.tabSidePanel(), 'tabSelected', this, 'handleTabSelected'); MochiKit.Signal.connect(this.tabSidePanel(), 'addCard', this, 'handleAddCard'); MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'addCard', this, 'handleAddCard'); MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'downloadOfflineCopy', this, 'handleDownloadOfflineCopy'); deferredResult = new Clipperz.Async.Deferred("AppController.run", {trace:false}); deferredResult.addMethod(this.cardsController(), 'run', {slot:this.appPage().slotNamed('cardGrid'), user:user}); // deferredResult.addMethod(this.directLoginsController(), 'run', {slot:this.appPage().slotNamed('directLoginGrid'), user:user}); deferredResult.addMethod(this, 'populateUserInfo'); deferredResult.addCallback(MochiKit.Visual.ScrollTo, 'miscLinks', {duration:0}); deferredResult.addCallback(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'CARDS_CONTROLLER_DID_RUN'); deferredResult.addMethod(this.tabSidePanel(), 'selectTab', 'cards'); deferredResult.callback(); }, //----------------------------------------------------------------------------- 'handleTabSelected': function (selectedTabName) { var aTabName; var aSlotName; //Clipperz.log(">>> AppController.handleTabSelected", selectedTabName); this.hideAllAppPageTabSlots(); this.appPage().showSlot(this.slotNameForTab(selectedTabName)); switch (selectedTabName) { case 'cards': this.cardsController().focus(); break; // case 'directLogins': // this.directLoginsController().focus(); // break; case 'data': break; case 'account': break; case 'tools': break; } //Clipperz.log("<-- AppController.handleTabSelected", aTabName); }, //============================================================================= 'handleAddCard': function (aSourceElement) { //Clipperz.log("=== AppController.addCard", aSourceElement); this.cardsController().addCard(aSourceElement); }, //============================================================================= 'userDataSuccessfullySavedHandler': function (anEvent) { this.populateUserInfo(); }, //============================================================================= 'handleLogout': function(anEvent) { var deferredResult; deferredResult = new Clipperz.Async.Deferred("AppController.handleLogout", {trace:false}); deferredResult.addMethod(this.user(), 'logout'); deferredResult.addCallback(MochiKit.Signal.signal, this, 'logout'); deferredResult.callback(); return deferredResult; }, //----------------------------------------------------------------------------- 'handleLock': function (anEvent) { return Clipperz.Async.callbacks("AppController.handleLock", [ MochiKit.Base.method(this.cardsController(), 'deleteAllCleanTextData'), MochiKit.Base.method(this.user(), 'lock') ], {trace:false}); }, //............................................................................. 'handleUnlock': function (anEvent) { return Clipperz.Async.callbacks("AppController.handleUnock", [ MochiKit.Base.partial(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'initProgress'), MochiKit.Base.method(this.user(), 'login'), MochiKit.Base.method(this.cardsController(), 'focus'), MochiKit.Base.partial(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'progressDone'), MochiKit.Base.method(this.userInfoBox(), 'unlock') ], {trace:false}); }, 'handleDownloadOfflineCopy': function (anEvent) { -console.log("AppController.handleDownloadOfflineCopy"); var downloadHref; downloadHref = window.location.href.replace(/\/[^\/]*$/,'') + Clipperz_dumpUrl; if (Clipperz_IEisBroken == true) { window.open(downloadHref, ""); } else { var deferredResult; var newWindow; newWindow = window.open("", ""); deferredResult = new Clipperz.Async.Deferred("AppController.handleDownloadOfflineCopy", {trace:true}); deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'echo', {'echo':"echo"}); deferredResult.addCallback(function(aWindow) { aWindow.location.href = downloadHref; }, newWindow); deferredResult.callback(); } }, //============================================================================= __syntaxFix__: "syntax fix" }); 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 effde31..b1ff81f 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js @@ -1,118 +1,116 @@ /* -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.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; }, @@ -281,193 +279,192 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.CardDialogController, Object MochiKit.Base.method(this, 'fieldsReferences'), MochiKit.Base.values, MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.method(this, 'updateRecordFieldValues')), MochiKit.Base.method(this, 'directLoginReferences'), MochiKit.Base.values, MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.method(this, 'updateRecordDirectLoginValues')), MochiKit.Base.method(this.directLoginEditingComponent(), 'directLoginReference'), MochiKit.Base.method(this.record(), 'directLoginWithReference'), MochiKit.Base.method(this, 'updateRecordDirectLoginDetails'), MochiKit.Base.noop ], {trace:false}); }, //------------------------------------------------------------------------- 'updateRecordFieldValues': function (aFieldReference) { var deferredResult; deferredResult = Clipperz.Async.callbacks('CardDialogController.updateRecordFieldValues', [ MochiKit.Base.method(aFieldReference['component'], 'label'), MochiKit.Base.method(aFieldReference['field'], 'setLabel'), MochiKit.Base.method(aFieldReference['component'], 'value'), MochiKit.Base.method(aFieldReference['field'], 'setValue'), MochiKit.Base.method(aFieldReference['component'], 'isHidden'), MochiKit.Base.method(aFieldReference['field'], 'setIsHidden'), MochiKit.Base.method(aFieldReference['field'], 'actionType'), MochiKit.Base.method(aFieldReference['component'], 'setActionType') ], {trace:false}); return deferredResult; }, //------------------------------------------------------------------------- 'updateRecordDirectLoginValues': function (aDirectLoginReference) { var deferredResult; deferredResult = Clipperz.Async.callbacks('CardDialogController.updateRecordDirectLoginValues', [ MochiKit.Base.method(aDirectLoginReference['component'], 'label'), MochiKit.Base.method(aDirectLoginReference['directLogin'], 'setLabel') ], {trace:false}); return deferredResult; }, //------------------------------------------------------------------------- 'updateRecordDirectLoginDetails': function (aDirectLogin) { var result; if (MochiKit.Base.isUndefinedOrNull(aDirectLogin)) { result = MochiKit.Async.succeed(); } else { result = Clipperz.Async.callbacks("CardDialogController.updateRecordDirectLoginDetails", [ MochiKit.Base.method(this.directLoginEditingComponent(), 'label'), MochiKit.Base.method(aDirectLogin, 'setLabel'), MochiKit.Base.method(this.directLoginEditingComponent(), 'favicon'), MochiKit.Base.method(aDirectLogin, 'setFavicon') ], {trace:false}); } return result; }, //========================================================================= 'addField': function () { return this.record().addField({ 'label':this.cardDialogComponent().newFieldLabel(), 'value':this.cardDialogComponent().newFieldValue(), 'isHidden':this.cardDialogComponent().newFieldIsHidden() }); }, 'handleAddField': function () { return Clipperz.Async.callbacks("CardDialogController.handleAddField", [ MochiKit.Base.method(this, 'addField'), MochiKit.Base.method(this, 'addCardDialogComponentWithField'), MochiKit.Base.method(this.cardDialogComponent(), 'resetNewFieldInputs'), MochiKit.Base.method(this.cardDialogComponent(), 'fixRendering'), MochiKit.Base.method(this, 'handleChangedValue') ], {trace:false}) }, //------------------------------------------------------------------------- 'handlePerformFieldAction': function (aFieldID, aTargetElement) { -//console.log("### targetElement", aTargetElement); return Clipperz.Async.callbacks("CardDialogController.handleDeleteField", [ MochiKit.Base.method(this.record(), 'fields'), MochiKit.Base.itemgetter(aFieldID), Clipperz.Async.collectResults("CardDialogController.handleDeleteField <collect results>", { 'value': MochiKit.Base.methodcaller('value'), 'type': MochiKit.Base.methodcaller('actionType') }, {trace:false}), MochiKit.Base.bind(function (someValues) { switch (someValues['type']) { case 'NONE': throw "this event handler should not be triggered for fields with type 'NONE'"; break; case 'URL': var url; url = someValues['value']; if (/^https?\:\/\//.test(url) == false) { url = 'http://' + url; } window.open(url); break; case 'EMAIL': var url; url = 'mailto:' + someValues['value']; MochiKit.DOM.currentWindow().location = url; break; case 'PASSWORD': //Clipperz.log("SHOW PASSWORD " + someValues['value']); this.showPasswordTooltip(someValues['value'], aTargetElement); break; } }, this) ], {trace:false}); }, //------------------------------------------------------------------------- 'handleDeleteField': function (aFieldID) { return Clipperz.Async.callbacks("CardDialogController.handleDeleteField", [ MochiKit.Base.method(this.record(), 'fields'), MochiKit.Base.itemgetter(aFieldID), MochiKit.Base.method(this.record(), 'removeField'), MochiKit.Base.method(this, 'fieldsReferences'), MochiKit.Base.itemgetter(aFieldID), MochiKit.Base.itemgetter('component'), function (aComponent) { return Clipperz.Async.callbacks("CardDialogController.handleDeleteField [fade and remove]", [ MochiKit.Base.partial(Clipperz.Visual.deferredAnimation, MochiKit.Visual.fade, aComponent.element(), {from:1.0, to:0.0, duration:0.5}), // Clipperz.Visual.deferredAnimation(MochiKit.Visual.fade, aComponent.element(), {from:1.0, to:0.0, duration:0.5}), MochiKit.Base.method(aComponent, 'remove') ], {trace:false}); }, MochiKit.Base.bind(function () { delete this.fieldsReferences()[aFieldID]; }, this), MochiKit.Base.method(this.cardDialogComponent(), 'fixRendering'), MochiKit.Base.method(this, 'handleChangedValue') ], {trace:false}); }, //========================================================================= 'handleDeleteDirectLogin': function(aDirectLoginReference) { var cardDialogComponent; cardDialogComponent = this.cardDialogComponent(); return Clipperz.Async.callbacks("CardDialogController.handleDeleteDirectLogin", [ MochiKit.Base.method(this.record(), 'directLogins'), MochiKit.Base.itemgetter(aDirectLoginReference), MochiKit.Base.methodcaller('remove'), MochiKit.Base.method(this, 'directLoginReferences'), MochiKit.Base.itemgetter(aDirectLoginReference), MochiKit.Base.itemgetter('component'), function (aComponent) { return Clipperz.Async.callbacks("CardDialogController.handleDeleteDirectLogin [fade and remove]", [ MochiKit.Base.partial(Clipperz.Visual.deferredAnimation, MochiKit.Visual.fade, aComponent.element(), {from:1.0, to:0.0, duration:0.5}),// Clipperz.Visual.deferredAnimation(MochiKit.Visual.fade, aComponent.element(), {from:1.0, to:0.0, duration:0.5}), /// MochiKit.Base.method(aComponent, 'remove') MochiKit.Base.method(cardDialogComponent, 'removeDirectLoginComponent', aComponent) ], {trace:false}); }, MochiKit.Base.bind(function () { delete this.directLoginReferences()[aDirectLoginReference]; }, this), MochiKit.Base.method(this.cardDialogComponent(), 'fixRendering'), 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 f58f0b8..68b5b9f 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardsController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardsController.js @@ -1,118 +1,116 @@ /* -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.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 c025a51..92ed6e3 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js @@ -1,262 +1,259 @@ /* -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.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; }, 'resetBindingComponents': function () { this.directLoginEditingComponent().clearAllBindingsComponents(); this._bindingComponents = []; }, //============================================================================= 'formValueComponents': function () { return this._formValueComponents; }, 'resetFormValueComponents': function () { this.directLoginEditingComponent().clearAllFormValueComponents(); this._formValueComponents = []; }, //============================================================================= 'recordFields': function () { return this._recordFields; }, 'setRecordFields': function (aValue) { this._recordFields = aValue; }, 'recordFieldWithReference': function (aReference) { var matchingValues; var result; matchingValues = MochiKit.Base.filter(function (aField) { return aField['reference'] == aReference; }, this.recordFields()); if (matchingValues.length == 0) { result = null; } else { result = matchingValues[0]; } return result; }, //----------------------------------------------------------------------------- 'originalBindings': function () { return this._originalBindings; }, 'setOriginalBindings': function (aValue) { -//console.log("BINDINGS", aValue); this._originalBindings = aValue; }, //============================================================================= 'rulerComponent': function () { if (this._rulerComponent == null) { this._rulerComponent = new Clipperz.PM.UI.Web.Components.RulerComponent({ translationContext:'Wizards.DirectLoginWizard' }); 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'); } return this._rulerComponent; }, //----------------------------------------------------------------------------- 'showRuler': function (someSteps) { var rulerElement; this.setSteps(someSteps); rulerElement = this.rulerComponent().element(); this.directLoginEditingComponent().disableAllPanels(); MochiKit.Style.showElement(rulerElement); MochiKit.Style.setElementPosition(rulerElement, {x:-1000, y:this.directLoginEditingComponent().bottomMargin()}); new MochiKit.Visual.Move(rulerElement, { x:0, y:this.directLoginEditingComponent().bottomMargin(), mode:'absolute', duration:1, afterFinish:MochiKit.Base.method(this, 'handleCursorMoved') }); }, 'fixRulerRendering': function (aValue) { this.rulerComponent().setDisplayMode(aValue); }, //----------------------------------------------------------------------------- 'hideRuler': function () { new MochiKit.Visual.Move(this.rulerComponent().element(), {x:-1000, mode:'relative', duration:1}); }, 'doneWithRuler': function () { var rulerComponentElement; rulerComponentElement = this.rulerComponent().element(); new MochiKit.Visual.Move(this.rulerComponent().element(), { x:1000, mode:'relative', duration:1, // afterFinish:MochiKit.Base.partial(MochiKit.Style.hideElement, rulerComponentElement) afterFinish:function () { MochiKit.Style.hideElement(rulerComponentElement); } }); }, //============================================================================= 'addNewDirectLoginRulerSteps': function () { return MochiKit.Base.concat([ 'LABEL'], this.editDirectLoginRulerSteps()); }, 'editDirectLoginRulerSteps': function () { return [ /*'TYPE',*/ 'CONFIGURATION', 'BINDINGS','FAVICON', 'DONE']; }, //------------------------------------------------------------------------- 'runWithDirectLogin': function (aDirectLogin, hasJustBeenAdded) { this._directLogin = aDirectLogin; this.setDirectLoginHasJustBeenAdded(hasJustBeenAdded); return Clipperz.Async.callbacks("DirectLoginWizardController.runWithDirectLogin", [ MochiKit.Base.method(aDirectLogin, 'label'), MochiKit.Base.method(this.directLoginEditingComponent(), 'setLabel'), MochiKit.Base.method(aDirectLogin, 'favicon'), MochiKit.Base.method(this.directLoginEditingComponent(), 'setDirectLoginFavicon'), MochiKit.Base.method(aDirectLogin, 'bookmarkletConfiguration'), MochiKit.Base.method(this.directLoginEditingComponent(), 'setBookmarkletConfiguration'), MochiKit.Base.method(aDirectLogin, 'bindings'), MochiKit.Base.method(this, 'setOriginalBindings'), MochiKit.Base.method(aDirectLogin, 'record'), @@ -314,194 +311,192 @@ MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController. if (enableNext == true) { try { Clipperz.PM.DataModel.DirectLogin.checkBookmarkletConfiguration(this.directLoginEditingComponent().bookmarkletConfiguration()); this.directLoginEditingComponent().removeHighlightConfigurationSyntaxError(); } catch (e) { this.directLoginEditingComponent().highlightConfigurationSyntaxError(); enableNext = false; } } break; case 'BINDINGS': enableNext = MochiKit.Iter.every(this.bindingComponents(), function (aBindingComponent) { return aBindingComponent.selectedValue() != null; }) this.directLoginEditingComponent().enableBindingFields(); break; case 'FAVICON': enableNext = true; this.directLoginEditingComponent().enableFaviconField(); break; case 'DONE': enableNext = true; this.directLoginEditingComponent().enableDonePanel(); break; } if (this.currentStepIndex() > 0) { this.enablePrevious(enablePrevious); } else { this.enablePrevious(false); } this.enableNext(enableNext); }, //----------------------------------------------------------------------------- 'setFocus': function () { switch(this.currentStep()) { case 'LABEL': this.directLoginEditingComponent().focusOnLabelElement(); break; case 'TYPE': break; case 'CONFIGURATION': this.directLoginEditingComponent().focusOnBookmarkletConfigurationElement(); break; case 'BINDINGS': // this.directLoginEditingComponent().getElement('???').focus(); break; case 'FAVICON': this.directLoginEditingComponent().focusOnFaviconElement(); break; case 'DONE': break; } }, //============================================================================= 'steps': function () { return this._steps; }, 'setSteps': function (aValue) { this._steps = aValue; this.rulerComponent().setSteps(aValue); this.resetCurrentStepIndex(); }, 'currentStepIndex': function () { return this._currentStepIndex; }, 'currentStep': function () { return this.steps()[this.currentStepIndex()]; }, //============================================================================= 'handleExit': function () { MochiKit.Signal.signal(this, 'exit'); }, 'done': function () { this.doneWithRuler(); Clipperz.Async.callbacks("DirectLoginWizardController.done", [ MochiKit.Base.method(this.directLoginEditingComponent(), 'label'), MochiKit.Base.method(this.directLogin(), 'setLabel'), MochiKit.Base.method(this.directLoginEditingComponent(), 'bookmarkletConfiguration'), MochiKit.Base.method(this.directLogin(), 'setBookmarkletConfiguration'), // Bindings MochiKit.Base.method(this.directLoginEditingComponent(), 'bindingComponents'), // MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.bind(function (aBindingComponent) { Clipperz.Async.forEach(MochiKit.Base.bind(function (aBindingComponent) { -//console.log("aBindingComponent", aBindingComponent); -// this.directLogin(). return Clipperz.Async.callbacks("DirectLoginWizardController.done - update directLogin bindings", [ MochiKit.Base.method(this.directLogin(), 'bindings'), MochiKit.Base.itemgetter(aBindingComponent.formFieldName()), MochiKit.Base.methodcaller('setFieldKey', aBindingComponent.selectedValue()) ], {trace:false}); }, this)), MochiKit.Base.method(this.directLoginEditingComponent(), 'favicon'), MochiKit.Base.method(this.directLogin(), 'setFavicon'), MochiKit.Base.partial(MochiKit.Signal.signal, this, 'done', { 'directLogin': this.directLogin(), 'hasJustBeenAdded': this.directLoginHasJustBeenAdded() }) ], {trace:false}); }, //============================================================================= 'handleMoveBackward': function () { if (this._currentStepIndex > 0) { var afterMoveAction; this._currentStepIndex --; afterMoveAction = MochiKit.Base.noop; switch(this.currentStep()) { case 'LABEL': break; case 'TYPE': break; case 'CONFIGURATION': break; case 'BINDINGS': break; case 'FAVICON': break; case 'DONE': break; }; this.rulerComponent().moveBackward(afterMoveAction); } if (this._currentStepIndex == 0) { this.enablePrevious(false); } }, 'handleMoveForward': function () { if (this.isNextEnabled()) { var afterMoveAction; this._currentStepIndex ++; afterMoveAction = MochiKit.Base.noop; switch(this.currentStep()) { case 'LABEL': break; case 'TYPE': break; case 'CONFIGURATION': break; case 'BINDINGS': this.resetBindingComponents(); this.resetFormValueComponents(); afterMoveAction = MochiKit.Base.partial(Clipperz.Async.callbacks, "DirectLoginWizardController.handleMoveForward - BINDINGS", [ MochiKit.Base.method(this.directLogin(), 'setBookmarkletConfiguration', this.directLoginEditingComponent().bookmarkletConfiguration()), MochiKit.Base.method(this.directLogin(), 'favicon'), MochiKit.Base.method(this.directLoginEditingComponent(), 'setDirectLoginFavicon'), MochiKit.Base.method(this.directLogin(), 'bindings'), MochiKit.Base.values, Clipperz.Async.forEach(MochiKit.Base.bind(function (aBinding) { var bindingComponent; bindingComponent = new Clipperz.PM.UI.Web.Components.DirectLoginEditingBindingComponent({ formFieldName: aBinding.key(), fields: this.recordFields(), selectedFieldKey: aBinding.fieldKey() }); this.bindingComponents().push(bindingComponent); MochiKit.Signal.connect(bindingComponent, 'bindChange', this, 'handleBindChange', bindingComponent); this.directLoginEditingComponent().addBindingComponent(bindingComponent); }, this)), MochiKit.Base.method(this.directLogin(), 'formValues'), MochiKit.Base.values, Clipperz.Async.forEach(MochiKit.Base.bind(function (aFormValue) { var formValueComponent; 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 6ca3be4..7ab512a 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginsController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginsController.js @@ -1,118 +1,116 @@ /* -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.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 …", type: 'ALERT', 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 bfc093a..de59ec3 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/FilterController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/FilterController.js @@ -1,118 +1,116 @@ /* -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.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 8bb3016..44fbdef 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/GridController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/GridController.js @@ -1,118 +1,116 @@ /* -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.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) { if (aValue.sorted() != 'UNSORTED') { 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 a57152d..ac85d36 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/LoginController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/LoginController.js @@ -1,250 +1,246 @@ /* -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.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 loginProgress; var user; var getPassphraseDelegate; parameters = anEvent; 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'); deferredResult.addMethod(user, 'login'); 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()})); deferredResult.addErrbackPass (MochiKit.Base.method(aLoginForm, 'focusOnPassphraseField')); deferredResult.addBoth(MochiKit.Base.method(Clipperz.PM.RunTime.mainController, 'removePassphraseDelegate', getPassphraseDelegate)); deferredResult.callback(); MochiKit.Signal.connect(loginProgress, 'cancelEvent', deferredResult, 'cancel'); return deferredResult; }, //----------------------------------------------------------------------------- 'userLoggedIn': function(aUser) { //Clipperz.log(">>> LoginController.userLoggedIn"); MochiKit.Signal.signal(this, 'userLoggedIn', {user: aUser}); //Clipperz.log("<<< LoginController.userLoggedIn"); }, //========================================================================= 'handleCreateNewAccountClick': function (aComponent) { // return Clipperz.PM.DataModel.User.registerNewAccount("new", "user"); return Clipperz.Async.callbacks("LoginController.handleCreateNewAccountClick", [ //' MochiKit.Base.method(this, 'newUserCreationComponent'), // MochiKit.Base.methodcaller('deferredShowModal', {openFromElement:aComponent}), // MochiKit.Base.method(this.newUserWizardController(), 'run') MochiKit.Base.method(this, 'newUserCreationComponent'), Clipperz.Async.forkAndJoin("Async.test succeedingForkedAndWaitDeferrer", [ MochiKit.Base.method(this.newUserCreationComponent(), 'deferredShowModal', {openFromElement:aComponent, duration:0.5}), MochiKit.Base.method(this.newUserWizardController(), 'run') ], {trace:false}), // MochiKit.Base.method(this.newUserCreationComponent(), 'enableCredentialsField') ], {trace:false}); }, //----------------------------------------------------------------------------- 'newUserWizardController': function () { if (this._newUserWizardController == null) { this._newUserWizardController = new Clipperz.PM.UI.Web.Controllers.NewUserWizardController({ 'newUserCreationComponent': this.newUserCreationComponent() }) // MochiKit.Signal.connect(this._newUserWizardController, 'exit', this, 'handleHideNewUserCreationComponent'); MochiKit.Signal.connect(this._newUserWizardController, 'done', this, 'handleCompleteNewUserCreationComponent'); } return this._newUserWizardController; }, //------------------------------------------------------------------------- 'newUserCreationComponent': function () { if (this._newUserCreationComponent == null) { this._newUserCreationComponent = new Clipperz.PM.UI.Web.Components.NewUserCreationComponent(); } return this._newUserCreationComponent; }, 'clearNewUserCreationComponent': function () { if (this._newUserCreationComponent != null) { this._newUserCreationComponent.clear(); } this._newUserCreationComponent = null; }, //------------------------------------------------------------------------- 'handleHideNewUserCreationComponent': function () { this.clearNewUserCreationComponent(); }, 'handleCompleteNewUserCreationComponent': function (someParameters) { var deferredResult; var user; var newUserCreationComponent; user = someParameters.user; newUserCreationComponent = this.newUserCreationComponent(); MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'CARDS_CONTROLLER_DID_RUN', MochiKit.Base.method(newUserCreationComponent, 'deferredHideModal', {closeToElement:MochiKit.DOM.currentDocument().body})), deferredResult = new Clipperz.Async.Deferred("LoginController.handleCompleteNewUserCreationComponent", {trace:false}); deferredResult.addCallbackList([ MochiKit.Base.method(Clipperz.Crypto.PRNG.defaultRandomGenerator(), 'deferredEntropyCollection'), MochiKit.Base.method(user, 'login'), MochiKit.Base.method(this, 'userLoggedIn', user), MochiKit.Base.method(this, 'clearNewUserCreationComponent') ]); deferredResult.addErrback(function (aValue) { Clipperz.log("WTF!! Error doing the login after creating a new user" + aValue)}); deferredResult.callback(); return deferredResult; }, //========================================================================= 'handleFailedLogin': function(aLoginProgress, anError) { var result; -//console.log("anError", anError); if (anError instanceof MochiKit.Async.CancelledError) { result = anError; } else { var deferredResult; -MochiKit.Logging.logError("## MainController - FAILED LOGIN: " + anError); +Clipperz.logError("## MainController - FAILED LOGIN: " + anError); deferredResult = new MochiKit.Async.Deferred(); aLoginProgress.showErrorMessage("failed login"); // Clipperz.NotificationCenter.register(loginProgress, 'cancelEvent', deferredResult, 'callback'); MochiKit.Signal.connect(aLoginProgress, 'cancelEvent', deferredResult, 'callback'); deferredResult.addCallback(MochiKit.Async.fail, anError) result = deferredResult; } return result; }, 'handleGenericError': function(anError) { var result; if (anError instanceof MochiKit.Async.CancelledError) { result = anError; } else { -MochiKit.Logging.logError("## MainController - GENERIC ERROR" + "\n" + "==>> " + anError + " <<==\n" + anError.stack); -//console.log(anError); +Clipperz.logError("## MainController - GENERIC ERROR" + "\n" + "==>> " + anError + " <<==\n" + anError.stack); result = new MochiKit.Async.CancelledError(anError); } return result; }, //----------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); 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 c83e3c0..9194125 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/MainController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/MainController.js @@ -1,215 +1,207 @@ /* -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.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(); this.loginController().run({slot:this.pageComponent().slotNamed('body')}); if (shoudShowRegistrationForm) { MochiKit.Signal.signal(this.loginController().loginPage(), 'createNewAccountClick'); // this.loginController().handleCreateNewAccountClick(); } }, //----------------------------------------------------------------------------- 'getPassphrase': function () { var deferredResult; deferredResult = new Clipperz.Async.Deferred("MainController.getPassphrase", {trace:false}); deferredResult.acquireLock(this._passphraseDelegateLock); deferredResult.addMethod(this, 'invokePassphraseDelegate'); deferredResult.releaseLock(this._passphraseDelegateLock); deferredResult.callback(); return deferredResult; }, //......................................................................... 'invokePassphraseDelegate': function () { return this._passphraseDelegate(); }, 'passphraseDelegateLock': function () { return this._passphraseDelegateLock; }, //......................................................................... 'setPassphraseDelegate': function (aDelegate) { var shouldReleaseLock; shouldReleaseLock = (this._passphraseDelegate == null); this._passphraseDelegate = aDelegate; if (shouldReleaseLock) { this._passphraseDelegateLock.release(); } }, //......................................................................... 'removePassphraseDelegate': function (aDelegate) { if (this._passphraseDelegate == aDelegate) { this._passphraseDelegate = null; this._passphraseDelegateLock.acquire(); } }, //------------------------------------------------------------------------- 'loginControllerUserLoggedInCallback': function(anEvent) { -//Clipperz.log(">>> loginControllerUserLoggedInCallback", anEvent); -// this.setUser(anEvent.parameters()['user']); -//console.log("--- loginControllerUserLoggedInCallback - 1"); - -//console.log("--- loginControllerUserLoggedInCallback - 2"); this.headerComponent().switchToLoggedMode(); this.appController().run({slot:this.pageComponent().slotNamed('body'), user:anEvent['user']}); -//Clipperz.log("<<< loginControllerUserLoggedInCallback"); }, //----------------------------------------------------------------------------- 'handleRemoteRequestSent': function () { //Clipperz.log("REMOTE REQUEST sent >>>"); }, 'handleRemoteRequestReceived': function () { //Clipperz.log("REMOTE REQUEST received <<<"); }, //----------------------------------------------------------------------------- 'handleLogout': function(anEvent) { this.exit('logout.html'); }, //----------------------------------------------------------------------------- 'exit': function(aPageName) { //Clipperz.log("### exit " + aPageName); MochiKit.Async.wait(0).addCallback(function() { window.location.href = "./" + aPageName + "?ln=" + Clipperz.PM.Strings.selectedLanguage; }); }, //----------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); 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 7db6888..b70aa17 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/NewUserWizardController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/NewUserWizardController.js @@ -1,466 +1,458 @@ /* -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.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'); } return this._rulerComponent; }, 'resetRuler': function () { // if (this._rulerComponent != null) { // this._rulerComponent.clear(); // } // this._rulerComponent = null; }, //----------------------------------------------------------------------------- 'showRuler': function (someSteps) { var rulerElement; this.setSteps(someSteps); rulerElement = this.rulerComponent().element(); this.newUserCreationComponent().disableAllPanels(); MochiKit.Style.showElement(rulerElement); MochiKit.Style.setElementPosition(rulerElement, {x:-1000, y:this.newUserCreationComponent().bottomMargin()}); new MochiKit.Visual.Move(rulerElement, { x:0, y:this.newUserCreationComponent().bottomMargin(), mode:'absolute', duration:0.5, // afterFinish:MochiKit.Base.method(this, 'handleCursorMoved') afterFinish:MochiKit.Base.method(this, 'handleRulerShowed') }); }, //----------------------------------------------------------------------------- 'handleRulerShowed':function () { return Clipperz.Async.callbacks("NewUserWizardController.handlerRulerShowed", [ MochiKit.Base.method(this.newUserCreationComponent(), 'waitUntilFullyRendered'), MochiKit.Base.method(this, 'handleCursorMoved') ], {trace:false}); }, //----------------------------------------------------------------------------- 'hideRuler': function () { new MochiKit.Visual.Move(this.rulerComponent().element(), {x:-1000, mode:'relative', duration:0.5}); }, 'doneWithRuler': function () { var rulerComponentElement; rulerComponentElement = this.rulerComponent().element(); new MochiKit.Visual.Move(this.rulerComponent().element(), { x:1000, mode:'relative', duration:1, // afterFinish:MochiKit.Base.partial(MochiKit.Style.hideElement, rulerComponentElement) afterFinish:function () { MochiKit.Style.hideElement(rulerComponentElement); } }); }, //============================================================================= 'createNewUserRulerSteps': function () { return [ 'CREDENTIALS', 'CHECK_CREDENTIALS', 'TERMS_OF_SERVICE', 'CREATE_USER'/*, 'LOGIN' */]; }, //------------------------------------------------------------------------- 'run': function () { return Clipperz.Async.callbacks("NewUserWizardController.run", [ MochiKit.Base.method(this, 'createNewUserRulerSteps'), MochiKit.Base.method(this, 'showRuler') ], {trace:false}); }, //----------------------------------------------------------------------------- 'checkState': function () { var enablePrevious; var enableNext; enablePrevious = true; enableNext = false; this.newUserCreationComponent().disableAllPanels(); switch(this.currentStep()) { case 'CREDENTIALS': this.newUserCreationComponent().enableCredentialsPanel(); enableNext = ( (this.newUserCreationComponent().username() != '') && (this.newUserCreationComponent().passphrase() != '') ); // enablePrevious = false; break; case 'CHECK_CREDENTIALS': this.newUserCreationComponent().enableCheckCredentialsPanel(); enableNext = (this.newUserCreationComponent().passphrase() == this.newUserCreationComponent().rePassphrase()); // enablePrevious = true; break case 'TERMS_OF_SERVICE': this.newUserCreationComponent().enableTermsOfServicePanel(); -//console.log("awareOfUnrecoverablePassphrase", this.newUserCreationComponent().awareOfUnrecoverablePassphrase()); -//console.log("readTermsOfService", this.newUserCreationComponent().readTermsOfService()); enableNext = ( (this.newUserCreationComponent().awareOfUnrecoverablePassphrase() == 'on') && (this.newUserCreationComponent().readTermsOfService() == 'on') ) break; case 'CREATE_USER': -//console.log(">>> CREATE_USER", this.userCreationState()); this.newUserCreationComponent().enableCreateUserPanel(); switch (this.userCreationState()) { case 'IDLE': this.setUserCreationState('IN PROGRESS'); this.preformActualUserRegistration(); enablePrevious = false; enableNext = false; break; case 'IN PROGRESS': enablePrevious = false; enableNext = false; break; case 'DONE': enablePrevious = false; enableNext = true; break; case 'FAILED': enablePrevious = true; enableNext = false; break; }; break; // case 'LOGIN': // this.newUserCreationComponent().enableLoginPanel(); // break; } if (this.currentStepIndex() > 0) { this.enablePrevious(enablePrevious); } else { this.enablePrevious(false); } this.enableNext(enableNext); }, //----------------------------------------------------------------------------- 'setFocus': function () { switch(this.currentStep()) { case 'CREDENTIALS': this.newUserCreationComponent().focusOnUsernameElement(); break; case 'CHECK_CREDENTIALS': this.newUserCreationComponent().focusOnRePassphraseElement(); break case 'TERMS_OF_SERVICE': break; case 'CREATE_USER': break; // case 'LOGIN': // break; } }, //============================================================================= 'steps': function () { return this._steps; }, 'setSteps': function (aValue) { this._steps = aValue; this.rulerComponent().setSteps(aValue); this.resetCurrentStepIndex(); }, 'currentStepIndex': function () { return this._currentStepIndex; }, 'currentStep': function () { return this.steps()[this.currentStepIndex()]; }, //============================================================================= 'handleExit': function () { return Clipperz.Async.callbacks("NewUserWizardController.handleExit", [ // MochiKit.Base.method(this.newUserCreationComponent(), 'resetContent'), Clipperz.Async.forkAndJoin("NewUserWizardController.handleExit - fork and join", [ MochiKit.Base.method(this, 'hideRuler'), MochiKit.Base.method(this.newUserCreationComponent(), 'deferredHideModal') ], {trace:false}), MochiKit.Base.method(this, 'resetRuler'), // MochiKit.Base.method(this.newUserCreationComponent(), 'reset'), MochiKit.Base.partial(MochiKit.Signal.signal, this, 'exit') ], {trace:false}) }, 'done': function () { this.doneWithRuler(); MochiKit.Signal.signal(this, 'done', {'user': this.user()}); }, //============================================================================= 'handleMoveBackward': function () { if (this._currentStepIndex > 0) { var afterMoveAction; afterMoveAction = MochiKit.Base.noop; -//console.log("<-- backward", this.currentStep()); switch(this.currentStep()) { case 'CREDENTIALS': case 'CHECK_CREDENTIALS': case 'TERMS_OF_SERVICE': this._currentStepIndex --; this.rulerComponent().moveBackward(afterMoveAction); break; case 'CREATE_USER': this.setUser(null); this.newUserCreationComponent().hideAllProgeressStates(); this.resetCurrentStepIndex(); this.setUserCreationState('IDLE'); break; // case 'LOGIN': // break; }; } if (this._currentStepIndex == 0) { this.enablePrevious(false); } }, 'handleMoveForward': function () { if (this.isNextEnabled()) { var afterMoveAction; this._currentStepIndex ++; afterMoveAction = MochiKit.Base.noop; switch(this.currentStep()) { case 'CREDENTIALS': break; case 'CHECK_CREDENTIALS': break case 'TERMS_OF_SERVICE': break; case 'CREATE_USER': break; // case 'LOGIN': // break; }; this.rulerComponent().moveForward(afterMoveAction); }; }, 'handleCursorMoved': function () { // this.checkState(); // this.setFocus(); return Clipperz.Async.callbacks("NewUserWizardController.handleCursorMoved", [ MochiKit.Base.method(this.newUserCreationComponent(), 'waitUntilFullyRendered'), MochiKit.Base.method(this, 'checkState'), MochiKit.Base.method(this, 'setFocus') ], {trace:false}); }, //------------------------------------------------------------------------- 'handleChangedValue': function (anEvent) { this.checkState(); }, //------------------------------------------------------------------------- 'handleNewUserCreationComponentKeyPressed': function (anEvent) { -//console.log(">>> handleNewUserCreationComponentKeyPressed", anEvent.key().string); if (anEvent.key().string == 'KEY_ENTER') { if (anEvent.target().nodeName != 'TEXTAREA') { anEvent.preventDefault(); this.handleMoveForward(); } } else if (anEvent.key().string == 'KEY_TAB') { if (anEvent.target() == this.newUserCreationComponent().usernameElement()) { } else { this.handleMoveForward(); if ((anEvent.target().nodeName == 'INPUT') || (anEvent.target().nodeName == 'TEXTAREA')) { anEvent.preventDefault(); } } } else if ((anEvent.key().string == 'KEY_ARROW_RIGHT') && (anEvent.modifier().meta == true)) { this.handleMoveForward(); } else if ((anEvent.key().string == 'KEY_ARROW_LEFT') && (anEvent.modifier().meta == true)) { this.handleMoveBackward(); } else if (anEvent.key().string == 'KEY_ESCAPE') { anEvent.stop(); this.handleExit(); } else { MochiKit.Async.callLater(0.1, MochiKit.Base.method(this, 'checkState')); } }, //============================================================================= 'preformActualUserRegistration': function () { var deferredResult; deferredResult = new Clipperz.Async.Deferred("NewUSerWizardController.preformActualUserRegistration", {trace:false}); deferredResult.addMethod(this.newUserCreationComponent(), 'showProgressOnUserCreation'); deferredResult.addMethod(Clipperz.PM.RunTime.mainController, 'setPassphraseDelegate', MochiKit.Base.method(this.newUserCreationComponent(), 'passphrase')); deferredResult.addCallback(Clipperz.PM.DataModel.User.registerNewAccount, this.newUserCreationComponent().username(), MochiKit.Base.method(Clipperz.PM.RunTime.mainController, 'getPassphrase') ); deferredResult.addMethod(this, 'setUser'); deferredResult.addMethod(this.newUserCreationComponent(), 'showUserCreationDone'); deferredResult.addMethod(this, 'setUserCreationState', 'DONE'); // deferredResult.addErrback(MochiKit.Base.method(this.newUserCreationComponent(), 'showUserCreationFailed')); // deferredResult.addErrback(MochiKit.Base.method(this, 'setUser', null)); // deferredResult.addErrback(MochiKit.Base.method(this, 'setUserCreationState', 'FAILED')); deferredResult.addErrback(MochiKit.Base.bind(function (aValue) { this.newUserCreationComponent().showUserCreationFailed(); this.setUser(null); this.setUserCreationState('FAILED'); }, this)); deferredResult.callback(); return deferredResult; }, //============================================================================= __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/Set.js b/frontend/gamma/js/Clipperz/Set.js index 7023888..b3831a4 100644 --- a/frontend/gamma/js/Clipperz/Set.js +++ b/frontend/gamma/js/Clipperz/Set.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } //############################################################################# Clipperz.Set = function(args) { args = args || {}; // MochiKit.Base.bindMethods(this); if (args.items != null) { this._items = args.items.slice(); } else { this._items = []; } return this; } //============================================================================= Clipperz.Set.prototype = MochiKit.Base.update(null, { //------------------------------------------------------------------------- 'toString': function() { return "Clipperz.Set"; }, //------------------------------------------------------------------------- 'items': function() { return this._items; }, //------------------------------------------------------------------------- 'popAnItem': function() { var result; if (this.size() > 0) { result = this.items().pop(); } else { result = null; } return result; }, //------------------------------------------------------------------------- 'allItems': function() { return this.items(); }, //------------------------------------------------------------------------- 'contains': function(anItem) { return (this.indexOf(anItem) != -1); }, //------------------------------------------------------------------------- 'indexOf': function(anItem) { var result; var i, c; result = -1; c = this.items().length; for (i=0; (i<c) && (result == -1); i++) { if (this.items()[i] === anItem) { result = i; } } return result; }, //------------------------------------------------------------------------- 'add': function(anItem) { if (anItem.constructor == Array) { MochiKit.Base.map(MochiKit.Base.bind(this,add, this), anItem); } else { if (! this.contains(anItem)) { this.items().push(anItem); } } }, //------------------------------------------------------------------------- diff --git a/frontend/gamma/js/Clipperz/Signal.js b/frontend/gamma/js/Clipperz/Signal.js index ca3e322..f9b74c9 100644 --- a/frontend/gamma/js/Clipperz/Signal.js +++ b/frontend/gamma/js/Clipperz/Signal.js @@ -1,68 +1,66 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.Signal) == 'undefined') { Clipperz.Signal = {}; } Clipperz.Signal.VERSION = "0.1"; Clipperz.Signal.NAME = "Clipperz.Signal"; MochiKit.Base.update(Clipperz.Signal, { //------------------------------------------------------------------------- '__repr__': function () { return "[" + this.NAME + " " + this.VERSION + "]"; }, //------------------------------------------------------------------------- 'toString': function () { return this.__repr__(); }, //------------------------------------------------------------------------- 'fireNativeEvent': function(element, eventName) { if (element.fireEvent) { // MSIE element.fireEvent(eventName); } else { // W3C var event; event = document.createEvent("HTMLEvents"); event.initEvent(eventName.replace(/^on/, ""), true, true); element.dispatchEvent(event); } }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); Clipperz.Signal.NotificationCenter = {}; diff --git a/frontend/gamma/js/Clipperz/Style.js b/frontend/gamma/js/Clipperz/Style.js index d377893..acbe71b 100644 --- a/frontend/gamma/js/Clipperz/Style.js +++ b/frontend/gamma/js/Clipperz/Style.js @@ -1,91 +1,89 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.Style) == 'undefined') { Clipperz.Style = {}; } Clipperz.Style.VERSION = "0.1"; Clipperz.Style.NAME = "Clipperz.DOM"; MochiKit.Base.update(Clipperz.Style, { //------------------------------------------------------------------------- '__repr__': function () { return "[" + this.NAME + " " + this.VERSION + "]"; }, //------------------------------------------------------------------------- 'toString': function () { return this.__repr__(); }, //------------------------------------------------------------------------- 'applyZebraStylesToTable': function(aTable) { var tbody; var tbodyRows; var i,c; tbody = MochiKit.DOM.getFirstElementByTagAndClassName('tbody', null, aTable); tbodyRows = tbody.childNodes; // tbodyRows = MochiKit.DOM.getElementsByTagAndClassName('tr', null, tbody) c = tbodyRows.length; for (i=0; i<c; i++) { var element; element = YAHOO.Element.get(tbodyRows[i]); element.addClass(((i%2 == 0) ? "zebra_odd": "zebra_even")); element.removeClass(((i%2 == 1) ? "zebra_odd": "zebra_even")); } }, //------------------------------------------------------------------------- 'getSizeAndPosition': function (anElement) { var result; if (anElement != null) { result = { dimensions:MochiKit.Style.getElementDimensions(anElement), position:MochiKit.Style.getElementPosition(anElement)}; } else { result = { dimensions:MochiKit.Style.getViewportDimensions(), position:MochiKit.Style.getViewportPosition()}; } return result; }, 'setBackgroundGradient': function (anElement, someParameters) { // background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ff9955), to(#ff6622), color-stop(1,#333333)); // background: -moz-linear-gradient(0% 100% 90deg,#ff6622, #ff9955); MochiKit.Style.setStyle(anElement, {'background': '-webkit-gradient(linear, 0% 0%, 0% 100%, from(' + someParameters['from'] + '), to(' + someParameters['to'] + '), color-stop(1,#333333))'}); MochiKit.Style.setStyle(anElement, {'background': '-moz-linear-gradient(0% 100% 90deg,' + someParameters['to'] + ', ' + someParameters['from'] + ')'}); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/js/Clipperz/Visual.js b/frontend/gamma/js/Clipperz/Visual.js index c2da3b7..93ed725 100644 --- a/frontend/gamma/js/Clipperz/Visual.js +++ b/frontend/gamma/js/Clipperz/Visual.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.Visual) == 'undefined') { Clipperz.Visual = {}; } Clipperz.Visual.VERSION = "0.1"; Clipperz.Visual.NAME = "Clipperz.Visual"; MochiKit.Base.update(Clipperz.Visual, { //------------------------------------------------------------------------- '__repr__': function () { return "[" + this.NAME + " " + this.VERSION + "]"; }, //------------------------------------------------------------------------- 'toString': function () { return this.__repr__(); }, //------------------------------------------------------------------------- 'deferredResize': function (anElement, someOptions) { var deferredResult; var moveTransition; var scaleTransition; var duration; duration = someOptions.duration || 0.5; deferredResult = new Clipperz.Async.Deferred("Visual.deferredResize", {trace:false}); deferredResult.addCallback(MochiKit.Async.succeed, arguments[arguments.length - 1]); moveTransition = MochiKit.Visual.Transitions.linear; //MochiKit.Visual.Transitions.sinoidal; scaleTransition = MochiKit.Visual.Transitions.linear; //MochiKit.Visual.Transitions.sinoidal; MochiKit.Style.setElementPosition(anElement, {x:someOptions.from.position.x, y:someOptions.from.position.y }, 'px'); new MochiKit.Visual.Parallel([ new MochiKit.Visual.Move(anElement, {x:someOptions.to.position.x, y:someOptions.to.position.y, mode:'absolute', transition:moveTransition, sync:true}), new Clipperz.Visual.Resize(anElement, {fromSize:{h:someOptions.from.dimensions.h, w:someOptions.from.dimensions.w}, toSize:{h:someOptions.to.dimensions.h, w:someOptions.to.dimensions.w}, transition:scaleTransition, scaleContent:false, scaleFromCenter:false, restoreAfterFinish:true, sync:true}) ], {duration:duration, afterFinish:MochiKit.Base.method(deferredResult, 'callback')}) return deferredResult; }, //------------------------------------------------------------------------- 'deferredAnimation': function (anAnimation, someParameters, someOptions) { var deferredResult; var afterFinishCallback; var options; deferredResult = new Clipperz.Async.Deferred("Clipperz.Visual.deferredAnimation", {trace:false}); deferredResult.addCallback(MochiKit.Async.succeed, arguments[arguments.length - 1]); if (MochiKit.Base.isUndefinedOrNull(someOptions)) { options = {} } else { options = someOptions; } if (MochiKit.Base.isUndefinedOrNull(someOptions['afterFinish'])) { options['afterFinish'] = MochiKit.Base.noop; } MochiKit.Base.update(options, { 'afterFinish': MochiKit.Base.compose(options['afterFinish'], MochiKit.Base.method(deferredResult, 'callback')) }); new anAnimation(someParameters, options); return deferredResult; }, //------------------------------------------------------------------------- 'deferredAnimations': function (aSinchronizationType, someAnimations, someOptions) { var deferredResult; var options; deferredResult = new Clipperz.Async.Deferred("Visual.deferredParallelAnimations", {trace:false}); deferredResult.addCallback(MochiKit.Async.succeed, arguments[arguments.length - 1]); options = someOptions; if (MochiKit.Base.isUndefinedOrNull(someOptions['afterFinish'])) { options['afterFinish'] = MochiKit.Base.noop; } MochiKit.Base.update(options, { 'afterFinish': MochiKit.Base.compose(options['afterFinish'], MochiKit.Base.method(deferredResult, 'callback')) }); new aSinchronizationType(someAnimations, options) diff --git a/frontend/gamma/js/Clipperz/YUI/DomHelper.js b/frontend/gamma/js/Clipperz/YUI/DomHelper.js index 87c74f5..0a1f9fe 100644 --- a/frontend/gamma/js/Clipperz/YUI/DomHelper.js +++ b/frontend/gamma/js/Clipperz/YUI/DomHelper.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; }
/**
* @class Clipperz.ext.DomHelper
* Utility class for working with DOM and/or Templates. It transparently supports using HTML fragments or DOM.
* For more information see <a href="http://www.jackslocum.com/yui/2006/10/06/domhelper-create-elements-using-dom-html-fragments-or-templates/">this blog post with examples</a>.
* @singleton
*/
Clipperz.YUI.DomHelper = new function(){
/**@private*/
var d = document;
var tempTableEl = null;
/** True to force the use of DOM instead of html fragments @type Boolean */
this.useDom = false;
var emptyTags = /^(?:base|basefont|br|frame|hr|img|input|isindex|link|meta|nextid|range|spacer|wbr|audioscope|area|param|keygen|col|limittext|spot|tab|over|right|left|choose|atop|of)$/i;
/**
* Applies a style specification to an element
* @param {String/HTMLElement} el The element to apply styles to
* @param {String/Object/Function} styles A style specification string eg "width:100px", or object in the form {width:"100px"}, or
* a function which returns such a specification.
*/
this.applyStyles = function(el, styles){
if(styles){
var D = YAHOO.util.Dom;
if (typeof styles == "string"){
var re = /\s?([a-z\-]*)\:([^;]*);?/gi;
var matches;
while ((matches = re.exec(styles)) != null){
D.setStyle(el, matches[1], matches[2]);
}
}else if (typeof styles == "object"){
for (var style in styles){
D.setStyle(el, style, styles[style]);
}
}else if (typeof styles == "function"){
Clipperz.YUI.DomHelper.applyStyles(el, styles.call());
}
}
};
// build as innerHTML where available
/** @ignore */
var createHtml = function(o){
var b = '';
if(typeof(o['html']) != 'undefined') {
o['html'] = Clipperz.Base.sanitizeString(o['html']);
} else if (typeof(o['htmlString']) != 'undefined') {
o['html'] = o['htmlString'];
delete o.htmlString;
}
if (MochiKit.Base.isArrayLike(o)) {
for (var i = 0, l = o.length; i < l; i++) {
b += createHtml(o[i]);
}
return b;
}
b += '<' + o.tag;
for(var attr in o){
if(attr == 'tag' || attr == 'children' || attr == 'html' || typeof o[attr] == 'function') continue;
if(attr == 'style'){
var s = o['style'];
if(typeof s == 'function'){
s = s.call();
}
if(typeof s == 'string'){
b += ' style="' + s + '"';
}else if(typeof s == 'object'){
b += ' style="';
for(var key in s){
if(typeof s[key] != 'function'){
b += key + ':' + s[key] + ';';
}
}
b += '"';
}
}else{
if(attr == 'cls'){
b += ' class="' + o['cls'] + '"';
}else if(attr == 'htmlFor'){
b += ' for="' + o['htmlFor'] + '"';
}else{
b += ' ' + attr + '="' + o[attr] + '"';
}
}
}
if(emptyTags.test(o.tag)){
b += ' />';
}else{
@@ -347,132 +345,127 @@ Clipperz.YUI.DomHelper = new function(){ }();
/**
* @class Clipperz.YUI.DomHelper.Template
* Represents an HTML fragment template.
* For more information see <a href="http://www.jackslocum.com/yui/2006/10/06/domhelper-create-elements-using-dom-html-fragments-or-templates/">this blog post with examples</a>.
* <br>
* <b>This class is also available as Clipperz.YUI.Template</b>.
* @constructor
* @param {String/Array} html The HTML fragment or an array of fragments to join('') or multiple arguments to join('')
*/
Clipperz.YUI.DomHelper.Template = function(html){
if(html instanceof Array){
html = html.join('');
}else if(arguments.length > 1){
html = Array.prototype.join.call(arguments, '');
}
/**@private*/
this.html = html;
};
Clipperz.YUI.DomHelper.Template.prototype = {
/**
* Returns an HTML fragment of this template with the specified values applied
* @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
* @return {String}
*/
applyTemplate : function(values){
if(this.compiled){
return this.compiled(values);
}
var empty = '';
var fn = function(match, index){
if(typeof values[index] != 'undefined'){
return values[index];
}else{
return empty;
}
}
return this.html.replace(this.re, fn);
},
/**
* The regular expression used to match template variables
* @type RegExp
* @property
*/
re : /\{([\w|-]+)\}/g,
/**
* Compiles the template into an internal function, eliminating the RegEx overhead
*/
compile : function(){
var body = ["this.compiled = function(values){ return ['"];
body.push(this.html.replace(this.re, "', values['$1'], '"));
body.push("'].join('');};");
eval(body.join(''));
return this;
},
/**
* Applies the supplied values to the template and inserts the new node(s) before el
* @param {String/HTMLElement/Element} el The context element
* @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
* @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.Element
* @return {HTMLElement} The new node
*/
insertBefore: function(el, values, returnElement){
el = el.dom ? el.dom : YAHOO.util.Dom.get(el);
var newNode = Clipperz.YUI.DomHelper.insertHtml('beforeBegin', el, this.applyTemplate(values));
return returnElement ? YAHOO.Element.get(newNode, true) : newNode;
},
/**
* Applies the supplied values to the template and inserts the new node(s) after el
* @param {String/HTMLElement/Element} el The context element
* @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
* @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.Element
* @return {HTMLElement} The new node
*/
insertAfter : function(el, values, returnElement){
el = el.dom ? el.dom : YAHOO.util.Dom.get(el);
var newNode = Clipperz.YUI.DomHelper.insertHtml('afterEnd', el, this.applyTemplate(values));
return returnElement ? YAHOO.Element.get(newNode, true) : newNode;
},
/**
* Applies the supplied values to the template and append the new node(s) to el
* @param {String/HTMLElement/Element} el The context element
* @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
* @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.Element
* @return {HTMLElement} The new node
*/
append : function(el, values, returnElement){
var sanitizedValues;
var key;
-// sanitizedValues = MochiKit.Base.map(sanitizedValues)
-//console.log("values", values);
sanitizedValues = {};
for (key in values) {
sanitizedValues[key] = Clipperz.Base.sanitizeString(values[key]);
}
-//console.log("sanitizedValues", sanitizedValues);
-// el = el.dom ? el.dom : YAHOO.util.Dom.get(el);
el = (typeof el == 'string') ? YAHOO.util.Dom.get(el) : el;
-//Clipperz.log(this.applyTemplate(sanitizedValues));
var newNode = Clipperz.YUI.DomHelper.insertHtml('beforeEnd', el, this.applyTemplate(sanitizedValues));
-// return returnElement ? YAHOO.Element.get(newNode, true) : newNode;
+
return newNode;
},
/**
* Applies the supplied values to the template and overwrites the content of el with the new node(s)
* @param {String/HTMLElement/Element} el The context element
* @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
* @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.Element
* @return {HTMLElement} The new node
*/
overwrite : function(el, values, returnElement){
el = el.dom ? el.dom : YAHOO.util.Dom.get(el);
el.innerHTML = '';
var newNode = Clipperz.YUI.DomHelper.insertHtml('beforeEnd', el, this.applyTemplate(values));
return returnElement ? YAHOO.Element.get(newNode, true) : newNode;
}
};
/**
* Alias for applyTemplate
* @method
*/
Clipperz.YUI.DomHelper.Template.prototype.apply = Clipperz.YUI.DomHelper.Template.prototype.applyTemplate;
Clipperz.YUI.Template = Clipperz.YUI.DomHelper.Template;
diff --git a/frontend/gamma/js/Clipperz/YUI/DomQuery.js b/frontend/gamma/js/Clipperz/YUI/DomQuery.js index 76d0fae..c1af0ca 100644 --- a/frontend/gamma/js/Clipperz/YUI/DomQuery.js +++ b/frontend/gamma/js/Clipperz/YUI/DomQuery.js @@ -1,118 +1,116 @@ /* -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/. */ if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } /* * yui-ext 0.40 * Copyright(c) 2006, Jack Slocum. */ /** * @class Clipperz.YUI.DomQuery * Provides high performance selector/xpath processing by compiling queries into reusable functions. * New pseudo classes and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in). * @singleton */ Clipperz.YUI.DomQuery = function(){ var cache = {}, simpleCache = {}, valueCache = {}; var nonSpace = /\S/; var trimRe = /^\s*(.*?)\s*$/; var tplRe = /\{(\d+)\}/g; var modeRe = /^(\s?[\/>]\s?|\s|$)/; var clsRes = {}; function child(p, index){ var i = 0; var n = p.firstChild; while(n){ if(n.nodeType == 1){ i++; if(i == index){ return n; } } n = n.nextSibling; } return null; }; function next(d){ var n = d.nextSibling; while(n && n.nodeType != 1){ n = n.nextSibling; } return n; }; function prev(d){ var n = d.previousSibling; while(n && n.nodeType != 1){ n = n.previousSibling; } return n; }; function clean(d){ var n = d.firstChild, ni = -1; while(n){ var nx = n.nextSibling; if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){ d.removeChild(n); }else{ n.nodeIndex = ++ni; } n = nx; } return this; }; function byClassName(c, a, v){ if(!v){ return c; } var re = clsRes[v]; if(!re){ re = new RegExp('(?:^|\\s)(?:' + v + ')(?:\\s|$)'); clsRes[v] = re; } var r = []; for(var i = 0, ci; ci = c[i]; i++){ if(re.test(ci.className)){ r[r.length] = ci; } } return r; }; function convert(c){ if(c.slice){ return c; } var r = []; for(var i = 0, l = c.length; i < l; i++){ r[r.length] = c[i]; diff --git a/frontend/gamma/js/Clipperz/YUI/Utils.js b/frontend/gamma/js/Clipperz/YUI/Utils.js index e9929fc..4def842 100644 --- a/frontend/gamma/js/Clipperz/YUI/Utils.js +++ b/frontend/gamma/js/Clipperz/YUI/Utils.js @@ -1,95 +1,93 @@ /* -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/. */ if (typeof YAHOO == 'undefined') { YAHOO = {}; }; if (typeof YAHOO.util == 'undefined') { YAHOO.util = {}; }; if (typeof YAHOO.util.Dom == 'undefined') { YAHOO.util.Dom = {}; }; YAHOO.extend = function(subc, superc, overrides) { var F = function() {}; F.prototype=superc.prototype; subc.prototype=new F(); subc.prototype.constructor=subc; subc.superclass=superc.prototype; if (superc.prototype.constructor == Object.prototype.constructor) { superc.prototype.constructor=superc; } if (overrides) { for (var i in overrides) { subc.prototype[i]=overrides[i]; } } }; YAHOO.override = function(origclass, overrides){ if(overrides){ var p = origclass.prototype; for(var method in overrides){ p[method] = overrides[method]; } } }; YAHOO.extendX = function(subclass, superclass, overrides){ YAHOO.extend(subclass, superclass); subclass.override = function(o){ YAHOO.override(subclass, o); }; if(!subclass.prototype.override){ subclass.prototype.override = function(o){ for(var method in o){ this[method] = o[method]; } }; } if(overrides){ subclass.override(overrides); }; }; YAHOO.util.Dom.get = function(el) { if (!el) { return null; } // nothing to work with if (typeof el != 'string' && !(el instanceof Array) ) { // assuming HTMLElement or HTMLCollection, so pass back as is return el; } if (typeof el == 'string') { // ID return document.getElementById(el); } else { // array of ID's and/or elements var collection = []; for (var i = 0, len = el.length; i < len; ++i) { collection[collection.length] = YAHOO.util.Dom.get(el[i]); } return collection; } return null; // safety, should never happen }; diff --git a/frontend/gamma/js/ClipperzCryptoLibrary/AES.js b/frontend/gamma/js/ClipperzCryptoLibrary/AES.js new file mode 100644 index 0000000..cbbbb13 --- a/dev/null +++ b/frontend/gamma/js/ClipperzCryptoLibrary/AES.js @@ -0,0 +1,864 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { + throw "Clipperz.Crypto.AES depends on Clipperz.ByteArray!"; +} + +// Dependency commented to avoid a circular reference +//try { if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { throw ""; }} catch (e) { +// throw "Clipperz.Crypto.AES depends on Clipperz.Crypto.PRNG!"; +//} + +if (typeof(Clipperz.Crypto.AES) == 'undefined') { Clipperz.Crypto.AES = {}; } + +//############################################################################# + +Clipperz.Crypto.AES.DeferredExecutionContext = function(args) { + args = args || {}; + + this._key = args.key; + this._message = args.message; + this._result = args.message.clone(); + this._nonce = args.nonce; + this._messageLength = this._message.length(); + + this._messageArray = this._message.arrayValues(); + this._resultArray = this._result.arrayValues(); + this._nonceArray = this._nonce.arrayValues(); + + this._executionStep = 0; + +// this._elaborationChunkSize = 1024; // 4096; // 16384; // 4096; + this._elaborationChunks = 10; + this._pauseTime = 0.02; // 0.02 // 0.2; + + return this; +} + +Clipperz.Crypto.AES.DeferredExecutionContext.prototype = MochiKit.Base.update(null, { + + 'key': function() { + return this._key; + }, + + 'message': function() { + return this._message; + }, + + 'messageLength': function() { + return this._messageLength; + }, + + 'result': function() { + return new Clipperz.ByteArray(this.resultArray()); + }, + + 'nonce': function() { + return this._nonce; + }, + + 'messageArray': function() { + return this._messageArray; + }, + + 'resultArray': function() { + return this._resultArray; + }, + + 'nonceArray': function() { + return this._nonceArray; + }, + + 'elaborationChunkSize': function() { +// return Clipperz.Crypto.AES.DeferredExecution.chunkSize; +// return this._elaborationChunkSize; + return (this._elaborationChunks * 1024); + }, + + 'executionStep': function() { + return this._executionStep; + }, + + 'setExecutionStep': function(aValue) { + this._executionStep = aValue; + }, + + 'tuneExecutionParameters': function (anElapsedTime) { +//var originalChunks = this._elaborationChunks; + if (anElapsedTime > 0) { + this._elaborationChunks = Math.round(this._elaborationChunks * ((anElapsedTime + 1000)/(anElapsedTime * 2))); + } +//Clipperz.log("tuneExecutionParameters - elapsedTime: " + anElapsedTime + /*originalChunks,*/ " chunks # " + this._elaborationChunks + " [" + this._executionStep + " / " + this._messageLength + "]"); + }, + + 'pause': function(aValue) { +// return MochiKit.Async.wait(Clipperz.Crypto.AES.DeferredExecution.pauseTime, aValue); + return MochiKit.Async.wait(this._pauseTime, aValue); + }, + + 'isDone': function () { +//console.log("isDone", this.executionStep(), this.messageLength()); + return (this._executionStep >= this._messageLength); + }, + + //----------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" + +}); + +//############################################################################# + +Clipperz.Crypto.AES.Key = function(args) { + args = args || {}; + + this._key = args.key; + this._keySize = args.keySize || this.key().length(); + + if (this.keySize() == 128/8) { + this._b = 176; + this._numberOfRounds = 10; + } else if (this.keySize() == 256/8) { + this._b = 240; + this._numberOfRounds = 14; + } else { + MochiKit.Logging.logError("AES unsupported key size: " + (this.keySize() * 8) + " bits"); + throw Clipperz.Crypto.AES.exception.UnsupportedKeySize; + } + + this._stretchedKey = null; + + return this; +} + +Clipperz.Crypto.AES.Key.prototype = MochiKit.Base.update(null, { + + 'asString': function() { + return "Clipperz.Crypto.AES.Key (" + this.key().toHexString() + ")"; + }, + + //----------------------------------------------------------------------------- + + 'key': function() { + return this._key; + }, + + 'keySize': function() { + return this._keySize; + }, + + 'b': function() { + return this._b; + }, + + 'numberOfRounds': function() { + return this._numberOfRounds; + }, + //========================================================================= + + 'keyScheduleCore': function(aWord, aRoundConstantsIndex) { + var result; + var sbox; + + sbox = Clipperz.Crypto.AES.sbox(); + + result = [ sbox[aWord[1]] ^ Clipperz.Crypto.AES.roundConstants()[aRoundConstantsIndex], + sbox[aWord[2]], + sbox[aWord[3]], + sbox[aWord[0]] ]; + + return result; + }, + + //----------------------------------------------------------------------------- + + 'xorWithPreviousStretchValues': function(aKey, aWord, aPreviousWordIndex) { + var result; + var i,c; + + result = []; + c = 4; + for (i=0; i<c; i++) { + result[i] = aWord[i] ^ aKey.byteAtIndex(aPreviousWordIndex + i); + } + + return result; + }, + + //----------------------------------------------------------------------------- + + 'sboxShakeup': function(aWord) { + var result; + var sbox; + var i,c; + + result = []; + sbox = Clipperz.Crypto.AES.sbox(); + c =4; + for (i=0; i<c; i++) { + result[i] = sbox[aWord[i]]; + } + + return result; + }, + + //----------------------------------------------------------------------------- + + 'stretchKey': function(aKey) { + var currentWord; + var keyLength; + var previousStretchIndex; + var i,c; + + keyLength = aKey.length(); + previousStretchIndex = keyLength - this.keySize(); + + currentWord = [ aKey.byteAtIndex(keyLength - 4), + aKey.byteAtIndex(keyLength - 3), + aKey.byteAtIndex(keyLength - 2), + aKey.byteAtIndex(keyLength - 1) ]; + currentWord = this.keyScheduleCore(currentWord, keyLength / this.keySize()); + + if (this.keySize() == 256/8) { + c = 8; + } else if (this.keySize() == 128/8){ + c = 4; + } + + for (i=0; i<c; i++) { + if (i == 4) { + // fifth streatch word + currentWord = this.sboxShakeup(currentWord); + } + + currentWord = this.xorWithPreviousStretchValues(aKey, currentWord, previousStretchIndex + (i*4)); + aKey.appendBytes(currentWord); + } + + return aKey; + }, + + //----------------------------------------------------------------------------- + + 'stretchedKey': function() { + if (this._stretchedKey == null) { + var stretchedKey; + + stretchedKey = this.key().clone(); + + while (stretchedKey.length() < this.keySize()) { + stretchedKey.appendByte(0); + } + + while (stretchedKey.length() < this.b()) { + stretchedKey = this.stretchKey(stretchedKey); + } + + this._stretchedKey = stretchedKey.split(0, this.b()); + } + + return this._stretchedKey; + }, + + //========================================================================= + __syntaxFix__: "syntax fix" +}); + +//############################################################################# + +Clipperz.Crypto.AES.State = function(args) { + args = args || {}; + + this._data = args.block; + this._key = args.key; + + return this; +} + +Clipperz.Crypto.AES.State.prototype = MochiKit.Base.update(null, { + + 'key': function() { + return this._key; + }, + + //----------------------------------------------------------------------------- + + 'data': function() { + return this._data; + }, + + 'setData': function(aValue) { + this._data = aValue; + }, + + //========================================================================= + + 'addRoundKey': function(aRoundNumber) { + // each byte of the state is combined with the round key; each round key is derived from the cipher key using a key schedule. + var data; + var stretchedKey; + var firstStretchedKeyIndex; + var i,c; + + data = this.data(); + stretchedKey = this.key().stretchedKey(); + firstStretchedKeyIndex = aRoundNumber * (128/8); + c = 128/8; + for (i=0; i<c; i++) { + data[i] = data[i] ^ stretchedKey.byteAtIndex(firstStretchedKeyIndex + i); + } + }, + + //----------------------------------------------------------------------------- + + 'subBytes': function() { + // a non-linear substitution step where each byte is replaced with another according to a lookup table. + var i,c; + var data; + var sbox; + + data = this.data(); + sbox = Clipperz.Crypto.AES.sbox(); + + c = 16; + for (i=0; i<c; i++) { + data[i] = sbox[data[i]]; + } + }, + + //----------------------------------------------------------------------------- + + 'shiftRows': function() { + // a transposition step where each row of the state is shifted cyclically a certain number of steps. + var newValue; + var data; + var shiftMapping; + var i,c; + + newValue = new Array(16); + data = this.data(); + shiftMapping = Clipperz.Crypto.AES.shiftRowMapping(); +// [0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, 1, 6, 11]; + c = 16; + for (i=0; i<c; i++) { + newValue[i] = data[shiftMapping[i]]; + } + for (i=0; i<c; i++) { + data[i] = newValue[i]; + } + }, + + //----------------------------------------------------------------------------- +/* + 'mixColumnsWithValues': function(someValues) { + var result; + var a; + var i,c; + + c = 4; + result = []; + a = []; + for (i=0; i<c; i++) { + a[i] = []; + a[i][1] = someValues[i] + if ((a[i][1] & 0x80) == 0x80) { + a[i][2] = (a[i][1] << 1) ^ 0x11b; + } else { + a[i][2] = a[i][1] << 1; + } + + a[i][3] = a[i][2] ^ a[i][1]; + } + + for (i=0; i<c; i++) { + var x; + + x = Clipperz.Crypto.AES.mixColumnsMatrix()[i]; + result[i] = a[0][x[0]] ^ a[1][x[1]] ^ a[2][x[2]] ^ a[3][x[3]]; + } + + return result; + }, + + 'mixColumns': function() { + // a mixing operation which operates on the columns of the state, combining the four bytes in each column using a linear transformation. + var data; + var i, c; + + data = this.data(); + c = 4; + for(i=0; i<c; i++) { + var blockIndex; + var mixedValues; + + blockIndex = i * 4; + mixedValues = this.mixColumnsWithValues([ data[blockIndex + 0], + data[blockIndex + 1], + data[blockIndex + 2], + data[blockIndex + 3]]); + data[blockIndex + 0] = mixedValues[0]; + data[blockIndex + 1] = mixedValues[1]; + data[blockIndex + 2] = mixedValues[2]; + data[blockIndex + 3] = mixedValues[3]; + } + }, +*/ + + 'mixColumns': function() { + // a mixing operation which operates on the columns of the state, combining the four bytes in each column using a linear transformation. + var data; + var i, c; + var a_1; + var a_2; + + a_1 = new Array(4); + a_2 = new Array(4); + + data = this.data(); + c = 4; + for(i=0; i<c; i++) { + var blockIndex; + var ii, cc; + + blockIndex = i * 4; + + cc = 4; + for (ii=0; ii<cc; ii++) { + var value; + + value = data[blockIndex + ii]; + a_1[ii] = value; + a_2[ii] = (value & 0x80) ? ((value << 1) ^ 0x011b) : (value << 1); + } + + data[blockIndex + 0] = a_2[0] ^ a_1[1] ^ a_2[1] ^ a_1[2] ^ a_1[3]; + data[blockIndex + 1] = a_1[0] ^ a_2[1] ^ a_1[2] ^ a_2[2] ^ a_1[3]; + data[blockIndex + 2] = a_1[0] ^ a_1[1] ^ a_2[2] ^ a_1[3] ^ a_2[3]; + data[blockIndex + 3] = a_1[0] ^ a_2[0] ^ a_1[1] ^ a_1[2] ^ a_2[3]; + } + }, + + //========================================================================= + + 'spinRound': function(aRoundNumber) { + this.addRoundKey(aRoundNumber); + this.subBytes(); + this.shiftRows(); + this.mixColumns(); + }, + + 'spinLastRound': function() { + this.addRoundKey(this.key().numberOfRounds() - 1); + this.subBytes(); + this.shiftRows(); + this.addRoundKey(this.key().numberOfRounds()); + }, + + //========================================================================= + + 'encrypt': function() { + var i,c; + + c = this.key().numberOfRounds() - 1; + for (i=0; i<c; i++) { + this.spinRound(i); + } + + this.spinLastRound(); + }, + + //========================================================================= + __syntaxFix__: "syntax fix" +}); + +//############################################################################# + +Clipperz.Crypto.AES.VERSION = "0.1"; +Clipperz.Crypto.AES.NAME = "Clipperz.Crypto.AES"; + +MochiKit.Base.update(Clipperz.Crypto.AES, { + +// http://www.cs.eku.edu/faculty/styer/460/Encrypt/JS-AES.html +// http://en.wikipedia.org/wiki/Advanced_Encryption_Standard +// http://en.wikipedia.org/wiki/Rijndael_key_schedule +// http://en.wikipedia.org/wiki/Rijndael_S-box + + '__repr__': function () { + return "[" + this.NAME + " " + this.VERSION + "]"; + }, + + 'toString': function () { + return this.__repr__(); + }, + + //============================================================================= + + '_sbox': null, + 'sbox': function() { + if (Clipperz.Crypto.AES._sbox == null) { + Clipperz.Crypto.AES._sbox = [ +0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, +0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, +0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, +0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, +0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, +0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, +0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, +0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, +0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, +0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, +0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, +0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, +0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, +0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, +0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, +0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16 + ]; + } + + return Clipperz.Crypto.AES._sbox; + }, + + //----------------------------------------------------------------------------- + // + // 0 4 8 12 0 4 8 12 + // 1 5 9 13 => 5 9 13 1 + // 2 6 10 14 10 14 2 6 + // 3 7 11 15 15 3 7 11 + // + '_shiftRowMapping': null, + 'shiftRowMapping': function() { + if (Clipperz.Crypto.AES._shiftRowMapping == null) { + Clipperz.Crypto.AES._shiftRowMapping = [0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, 1, 6, 11]; + } + + return Clipperz.Crypto.AES._shiftRowMapping; + }, + + //----------------------------------------------------------------------------- + + '_mixColumnsMatrix': null, + 'mixColumnsMatrix': function() { + if (Clipperz.Crypto.AES._mixColumnsMatrix == null) { + Clipperz.Crypto.AES._mixColumnsMatrix = [ [2, 3, 1 ,1], + [1, 2, 3, 1], + [1, 1, 2, 3], + [3, 1, 1, 2] ]; + } + + return Clipperz.Crypto.AES._mixColumnsMatrix; + }, + + '_roundConstants': null, + 'roundConstants': function() { + if (Clipperz.Crypto.AES._roundConstants == null) { + Clipperz.Crypto.AES._roundConstants = [ , 1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154]; +// Clipperz.Crypto.AES._roundConstants = [ , 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a]; + } + + return Clipperz.Crypto.AES._roundConstants; + }, + + //============================================================================= + + 'incrementNonce': function(aNonce) { +//Clipperz.Profile.start("Clipperz.Crypto.AES.incrementNonce"); + var i; + var done; + + done = false; + i = aNonce.length - 1; + + while ((i>=0) && (done == false)) { + var currentByteValue; + + currentByteValue = aNonce[i]; + + if (currentByteValue == 0xff) { + aNonce[i] = 0; + if (i>= 0) { + i --; + } else { + done = true; + } + } else { + aNonce[i] = currentByteValue + 1; + done = true; + } + } +//Clipperz.Profile.stop("Clipperz.Crypto.AES.incrementNonce"); + }, + + //----------------------------------------------------------------------------- + + 'encryptBlock': function(aKey, aBlock) { + var result; + var state; + + state = new Clipperz.Crypto.AES.State({block:aBlock, key:aKey}); +//is(state.data(), 'before'); + state.encrypt(); + result = state.data(); + + return result; + }, + + //----------------------------------------------------------------------------- + + 'encryptBlocks': function(aKey, aMessage, aNonce) { + var result; + var nonce; + var self; + var messageIndex; + var messageLength; + var blockSize; + + self = Clipperz.Crypto.AES; + blockSize = 128/8; + messageLength = aMessage.length; + nonce = aNonce; + + result = aMessage; + messageIndex = 0; + while (messageIndex < messageLength) { + var encryptedBlock; + var i,c; + + self.incrementNonce(nonce); + encryptedBlock = self.encryptBlock(aKey, nonce); + + if ((messageLength - messageIndex) > blockSize) { + c = blockSize; + } else { + c = messageLength - messageIndex; + } + + for (i=0; i<c; i++) { + result[messageIndex + i] = result[messageIndex + i] ^ encryptedBlock[i]; + } + + messageIndex += blockSize; + } + + return result; + }, + + //----------------------------------------------------------------------------- + + 'encrypt': function(aKey, someData, aNonce) { + var result; + var nonce; + var encryptedData; + var key; + + key = new Clipperz.Crypto.AES.Key({key:aKey}); + nonce = aNonce ? aNonce.clone() : Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(128/8); + + encryptedData = Clipperz.Crypto.AES.encryptBlocks(key, someData.arrayValues(), nonce.arrayValues()); + + result = nonce.appendBytes(encryptedData); + + return result; + }, + + //----------------------------------------------------------------------------- + + 'decrypt': function(aKey, someData) { + var result; + var nonce; + var encryptedData; + var decryptedData; + var dataIterator; + var key; + + key = new Clipperz.Crypto.AES.Key({key:aKey}); + + encryptedData = someData.arrayValues(); + nonce = encryptedData.slice(0, (128/8)); + encryptedData = encryptedData.slice(128/8); + decryptedData = Clipperz.Crypto.AES.encryptBlocks(key, encryptedData, nonce); + + result = new Clipperz.ByteArray(decryptedData); + + return result; + }, + + //============================================================================= + + 'deferredEncryptExecutionChunk': function(anExecutionContext) { + var result; + var nonce; + var self; + var messageIndex; + var messageLength; + var blockSize; + var executionLimit; + var startTime, endTime; + + self = Clipperz.Crypto.AES; + startTime = new Date(); + blockSize = 128/8; + messageLength = anExecutionContext.messageArray().length; + nonce = anExecutionContext.nonceArray(); + result = anExecutionContext.resultArray(); + + messageIndex = anExecutionContext.executionStep(); + executionLimit = messageIndex + anExecutionContext.elaborationChunkSize(); + executionLimit = Math.min(executionLimit, messageLength); + + while (messageIndex < executionLimit) { + var encryptedBlock; + var i,c; + + self.incrementNonce(nonce); + encryptedBlock = self.encryptBlock(anExecutionContext.key(), nonce); + + if ((executionLimit - messageIndex) > blockSize) { + c = blockSize; + } else { + c = executionLimit - messageIndex; + } + + for (i=0; i<c; i++) { + result[messageIndex + i] = result[messageIndex + i] ^ encryptedBlock[i]; + } + + messageIndex += blockSize; + } + anExecutionContext.setExecutionStep(messageIndex); + endTime = new Date(); + anExecutionContext.tuneExecutionParameters(endTime - startTime); + + return anExecutionContext; + }, + + //----------------------------------------------------------------------------- +/* + 'deferredEncryptBlocks': function(anExecutionContext) { + var deferredResult; + var messageSize; + var i,c; + + messageSize = anExecutionContext.messageLength(); + + deferredResult = new Clipperz.Async.Deferred("AES.deferredEncryptBloks"); + + c = Math.ceil(messageSize / anExecutionContext.elaborationChunkSize()); + for (i=0; i<c; i++) { + deferredResult.addCallback(Clipperz.Crypto.AES.deferredEncryptExecutionChunk); + deferredResult.addMethod(anExecutionContext, 'pause'); + } + + deferredResult.callback(anExecutionContext); + + return deferredResult; + }, +*/ + + 'deferredEncryptBlocks': function(anExecutionContext) { + var deferredResult; + + if (! anExecutionContext.isDone()) { + deferredResult = Clipperz.Async.callbacks("Clipperz.Crypto.AES.deferredEncryptBloks", [ + Clipperz.Crypto.AES.deferredEncryptExecutionChunk, + MochiKit.Base.method(anExecutionContext, 'pause'), + Clipperz.Crypto.AES.deferredEncryptBlocks + ], {trace:false}, anExecutionContext); + } else { + deferredResult = MochiKit.Async.succeed(anExecutionContext); + } + + return deferredResult; + }, + + //----------------------------------------------------------------------------- + + 'deferredEncrypt': function(aKey, someData, aNonce) { + var deferredResult; + var executionContext; + var result; + var nonce; + var key; + + key = new Clipperz.Crypto.AES.Key({key:aKey}); + nonce = aNonce ? aNonce.clone() : Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(128/8); + + executionContext = new Clipperz.Crypto.AES.DeferredExecutionContext({key:key, message:someData, nonce:nonce}); + + deferredResult = new Clipperz.Async.Deferred("AES.deferredEncrypt"); +//deferredResult.addCallback(function (aValue) { console.log(">>> deferredEncrypt"); return aValue; }); + deferredResult.addCallback(Clipperz.Crypto.AES.deferredEncryptBlocks); + deferredResult.addCallback(function(anExecutionContext) { + var result; + + result = anExecutionContext.nonce().clone(); + result.appendBytes(anExecutionContext.resultArray()); + + return result; + }); +//deferredResult.addCallback(function (aValue) { console.log("<<< deferredEncrypt"); return aValue; }); + deferredResult.callback(executionContext) + + return deferredResult; + }, + + //----------------------------------------------------------------------------- + + 'deferredDecrypt': function(aKey, someData) { + var deferredResult + var nonce; + var message; + var key; + + key = new Clipperz.Crypto.AES.Key({key:aKey}); + nonce = someData.split(0, (128/8)); + message = someData.split(128/8); + executionContext = new Clipperz.Crypto.AES.DeferredExecutionContext({key:key, message:message, nonce:nonce}); + + deferredResult = new Clipperz.Async.Deferred("AES.deferredDecrypt"); +//deferredResult.addCallback(function (aValue) { console.log(">>> deferredDecrypt"); return aValue; }); + deferredResult.addCallback(Clipperz.Crypto.AES.deferredEncryptBlocks); + deferredResult.addCallback(function(anExecutionContext) { + return anExecutionContext.result(); + }); +//deferredResult.addCallback(function (aValue) { console.log("<<< deferredDecrypt"); return aValue; }); + deferredResult.callback(executionContext); + + return deferredResult; + }, + + //----------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" + +}); + +//############################################################################# + +//Clipperz.Crypto.AES.DeferredExecution = { +// 'chunkSize': 16384, // 4096, // 1024 4096 8192 16384 32768; +// 'pauseTime': 0.02 // 0.2 +//} + +Clipperz.Crypto.AES.exception = { + 'UnsupportedKeySize': new MochiKit.Base.NamedError("Clipperz.Crypto.AES.exception.UnsupportedKeySize") +}; diff --git a/frontend/gamma/js/ClipperzCryptoLibrary/Base.js b/frontend/gamma/js/ClipperzCryptoLibrary/Base.js new file mode 100644 index 0000000..9acfc49 --- a/dev/null +++ b/frontend/gamma/js/ClipperzCryptoLibrary/Base.js @@ -0,0 +1,1847 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +try { if (typeof(Clipperz.Base) == 'undefined') { throw ""; }} catch (e) { + throw "Clipperz.Crypto.Base depends on Clipperz.Base!"; +} + +if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } +if (typeof(Clipperz.Crypto.Base) == 'undefined') { Clipperz.Crypto.Base = {}; } + +Clipperz.Crypto.Base.VERSION = "0.1"; +Clipperz.Crypto.Base.NAME = "Clipperz.Crypto.Base"; + +//############################################################################# +// Downloaded on March 30, 2006 from http://anmar.eu.org/projects/jssha2/files/jssha2-0.3.zip (jsSha2/sha256.js) +//############################################################################# + +/* A JavaScript implementation of the Secure Hash Algorithm, SHA-256 + * Version 0.3 Copyright Angel Marin 2003-2004 - http://anmar.eu.org/ + * Distributed under the BSD License + * Some bits taken from Paul Johnston's SHA-1 implementation + */ +var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ +function safe_add (x, y) { + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} +function S (X, n) {return ( X >>> n ) | (X << (32 - n));} +function R (X, n) {return ( X >>> n );} +function Ch(x, y, z) {return ((x & y) ^ ((~x) & z));} +function Maj(x, y, z) {return ((x & y) ^ (x & z) ^ (y & z));} +function Sigma0256(x) {return (S(x, 2) ^ S(x, 13) ^ S(x, 22));} +function Sigma1256(x) {return (S(x, 6) ^ S(x, 11) ^ S(x, 25));} +function Gamma0256(x) {return (S(x, 7) ^ S(x, 18) ^ R(x, 3));} +function Gamma1256(x) {return (S(x, 17) ^ S(x, 19) ^ R(x, 10));} +function core_sha256 (m, l) { + var K = new Array(0x428A2F98,0x71374491,0xB5C0FBCF,0xE9B5DBA5,0x3956C25B,0x59F111F1,0x923F82A4,0xAB1C5ED5,0xD807AA98,0x12835B01,0x243185BE,0x550C7DC3,0x72BE5D74,0x80DEB1FE,0x9BDC06A7,0xC19BF174,0xE49B69C1,0xEFBE4786,0xFC19DC6,0x240CA1CC,0x2DE92C6F,0x4A7484AA,0x5CB0A9DC,0x76F988DA,0x983E5152,0xA831C66D,0xB00327C8,0xBF597FC7,0xC6E00BF3,0xD5A79147,0x6CA6351,0x14292967,0x27B70A85,0x2E1B2138,0x4D2C6DFC,0x53380D13,0x650A7354,0x766A0ABB,0x81C2C92E,0x92722C85,0xA2BFE8A1,0xA81A664B,0xC24B8B70,0xC76C51A3,0xD192E819,0xD6990624,0xF40E3585,0x106AA070,0x19A4C116,0x1E376C08,0x2748774C,0x34B0BCB5,0x391C0CB3,0x4ED8AA4A,0x5B9CCA4F,0x682E6FF3,0x748F82EE,0x78A5636F,0x84C87814,0x8CC70208,0x90BEFFFA,0xA4506CEB,0xBEF9A3F7,0xC67178F2); + var HASH = new Array(0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19); + var W = new Array(64); + var a, b, c, d, e, f, g, h, i, j; + var T1, T2; + /* append padding */ + m[l >> 5] |= 0x80 << (24 - l % 32); + m[((l + 64 >> 9) << 4) + 15] = l; + for ( var i = 0; i<m.length; i+=16 ) { + a = HASH[0]; b = HASH[1]; c = HASH[2]; d = HASH[3]; e = HASH[4]; f = HASH[5]; g = HASH[6]; h = HASH[7]; + for ( var j = 0; j<64; j++) { + if (j < 16) W[j] = m[j + i]; + else W[j] = safe_add(safe_add(safe_add(Gamma1256(W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]); + T1 = safe_add(safe_add(safe_add(safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]); + T2 = safe_add(Sigma0256(a), Maj(a, b, c)); + h = g; g = f; f = e; e = safe_add(d, T1); d = c; c = b; b = a; a = safe_add(T1, T2); + } + HASH[0] = safe_add(a, HASH[0]); HASH[1] = safe_add(b, HASH[1]); HASH[2] = safe_add(c, HASH[2]); HASH[3] = safe_add(d, HASH[3]); HASH[4] = safe_add(e, HASH[4]); HASH[5] = safe_add(f, HASH[5]); HASH[6] = safe_add(g, HASH[6]); HASH[7] = safe_add(h, HASH[7]); + } + return HASH; +} +function str2binb (str) { + var bin = Array(); + var mask = (1 << chrsz) - 1; + for(var i = 0; i < str.length * chrsz; i += chrsz) + bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - i%32); + return bin; +} +function binb2hex (binarray) { + var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ + var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; + var str = ""; + for (var i = 0; i < binarray.length * 4; i++) { + str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) + hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8 )) & 0xF); + } + return str; +} +function hex_sha256(s){return binb2hex(core_sha256(str2binb(s),s.length * chrsz));} + + + +//############################################################################# +// Downloaded on March 30, 2006 from http://www.fourmilab.ch/javascrypt/javascrypt.zip (entropy.js) +//############################################################################# + + // Entropy collection utilities + + /* Start by declaring static storage and initialise + the entropy vector from the time we come through + here. */ + + var entropyData = new Array(); // Collected entropy data + var edlen = 0; // Keyboard array data length + + addEntropyTime(); // Start entropy collection with page load time + ce(); // Roll milliseconds into initial entropy + + // Add a byte to the entropy vector + + function addEntropyByte(b) { + entropyData[edlen++] = b; + } + + /* Capture entropy. When the user presses a key or performs + various other events for which we can request + notification, add the time in 255ths of a second to the + entropyData array. The name of the function is short + so it doesn't bloat the form object declarations in + which it appears in various "onXXX" events. */ + + function ce() { + addEntropyByte(Math.floor((((new Date).getMilliseconds()) * 255) / 999)); + } + + // Add a 32 bit quantity to the entropy vector + + function addEntropy32(w) { + var i; + + for (i = 0; i < 4; i++) { + addEntropyByte(w & 0xFF); + w >>= 8; + } + } + + /* Add the current time and date (milliseconds since the epoch, + truncated to 32 bits) to the entropy vector. */ + + function addEntropyTime() { + addEntropy32((new Date()).getTime()); + } + + /* Start collection of entropy from mouse movements. The + argument specifies the number of entropy items to be + obtained from mouse motion, after which mouse motion + will be ignored. Note that you can re-enable mouse + motion collection at any time if not already underway. */ + + var mouseMotionCollect = 0; + var oldMoveHandler; // For saving and restoring mouse move handler in IE4 + + function mouseMotionEntropy(maxsamp) { + if (mouseMotionCollect <= 0) { + mouseMotionCollect = maxsamp; + if ((document.implementation.hasFeature("Events", "2.0")) && + document.addEventListener) { + // Browser supports Document Object Model (DOM) 2 events + document.addEventListener("mousemove", mouseMoveEntropy, false); + } else { + if (document.attachEvent) { + // Internet Explorer 5 and above event model + document.attachEvent("onmousemove", mouseMoveEntropy); + } else { + // Internet Explorer 4 event model + oldMoveHandler = document.onmousemove; + document.onmousemove = mouseMoveEntropy; + } + } +//dump("Mouse enable", mouseMotionCollect); + } + } + + /* Collect entropy from mouse motion events. Note that + this is craftily coded to work with either DOM2 or Internet + Explorer style events. Note that we don't use every successive + mouse movement event. Instead, we XOR the three bytes collected + from the mouse and use that to determine how many subsequent + mouse movements we ignore before capturing the next one. */ + + var mouseEntropyTime = 0; // Delay counter for mouse entropy collection + + function mouseMoveEntropy(e) { + if (!e) { + e = window.event; // Internet Explorer event model + } + if (mouseMotionCollect > 0) { + if (mouseEntropyTime-- <= 0) { + addEntropyByte(e.screenX & 0xFF); + addEntropyByte(e.screenY & 0xFF); + ce(); + mouseMotionCollect--; + mouseEntropyTime = (entropyData[edlen - 3] ^ entropyData[edlen - 2] ^ + entropyData[edlen - 1]) % 19; +//dump("Mouse Move", byteArrayToHex(entropyData.slice(-3))); + } + if (mouseMotionCollect <= 0) { + if (document.removeEventListener) { + document.removeEventListener("mousemove", mouseMoveEntropy, false); + } else if (document.detachEvent) { + document.detachEvent("onmousemove", mouseMoveEntropy); + } else { + document.onmousemove = oldMoveHandler; + } +//dump("Spung!", 0); + } + } + } + + /* Compute a 32 byte key value from the entropy vector. + We compute the value by taking the MD5 sum of the even + and odd bytes respectively of the entropy vector, then + concatenating the two MD5 sums. */ + + function keyFromEntropy() { + var i, k = new Array(32); + + if (edlen == 0) { + alert("Blooie! Entropy vector void at call to keyFromEntropy."); + } +//dump("Entropy bytes", edlen); + + md5_init(); + for (i = 0; i < edlen; i += 2) { + md5_update(entropyData[i]); + } + md5_finish(); + for (i = 0; i < 16; i++) { + k[i] = digestBits[i]; + } + + md5_init(); + for (i = 1; i < edlen; i += 2) { + md5_update(entropyData[i]); + } + md5_finish(); + for (i = 0; i < 16; i++) { + k[i + 16] = digestBits[i]; + } + +//dump("keyFromEntropy", byteArrayToHex(k)); + return k; + } + +//############################################################################# +// Downloaded on March 30, 2006 from http://www.fourmilab.ch/javascrypt/javascrypt.zip (aesprng.js) +//############################################################################# + + + // AES based pseudorandom number generator + + /* Constructor. Called with an array of 32 byte (0-255) values + containing the initial seed. */ + + function AESprng(seed) { + this.key = new Array(); + this.key = seed; + this.itext = hexToByteArray("9F489613248148F9C27945C6AE62EECA3E3367BB14064E4E6DC67A9F28AB3BD1"); + this.nbytes = 0; // Bytes left in buffer + + this.next = AESprng_next; + this.nextbits = AESprng_nextbits; + this.nextInt = AESprng_nextInt; + this.round = AESprng_round; + + /* Encrypt the initial text with the seed key + three times, feeding the output of the encryption + back into the key for the next round. */ + + bsb = blockSizeInBits; + blockSizeInBits = 256; + var i, ct; + for (i = 0; i < 3; i++) { + this.key = rijndaelEncrypt(this.itext, this.key, "ECB"); + } + + /* Now make between one and four additional + key-feedback rounds, with the number determined + by bits from the result of the first three + rounds. */ + + var n = 1 + (this.key[3] & 2) + (this.key[9] & 1); + for (i = 0; i < n; i++) { + this.key = rijndaelEncrypt(this.itext, this.key, "ECB"); + } + blockSizeInBits = bsb; + } + + function AESprng_round() { + bsb = blockSizeInBits; + blockSizeInBits = 256; + this.key = rijndaelEncrypt(this.itext, this.key, "ECB"); + this.nbytes = 32; + blockSizeInBits = bsb; + } + + // Return next byte from the generator + + function AESprng_next() { + if (this.nbytes <= 0) { + this.round(); + } + return(this.key[--this.nbytes]); + } + + // Return n bit integer value (up to maximum integer size) + + function AESprng_nextbits(n) { + var i, w = 0, nbytes = Math.floor((n + 7) / 8); + + for (i = 0; i < nbytes; i++) { + w = (w << 8) | this.next(); + } + return w & ((1 << n) - 1); + } + + // Return integer between 0 and n inclusive + + function AESprng_nextInt(n) { + var p = 1, nb = 0; + + // Determine smallest p, 2^p > n + // nb = log_2 p + + while (n >= p) { + p <<= 1; + nb++; + } + p--; + + /* Generate values from 0 through n by first generating + values v from 0 to (2^p)-1, then discarding any results v > n. + For the rationale behind this (and why taking + values mod (n + 1) is biased toward smaller values, see + Ferguson and Schneier, "Practical Cryptography", + ISBN 0-471-22357-3, section 10.8). */ + + while (true) { + var v = this.nextbits(nb) & p; + + if (v <= n) { + return v; + } + } + } + +//############################################################################# +// Downloaded on March 30, 2006 from http://www.fourmilab.ch/javascrypt/javascrypt.zip (md5.js) +//############################################################################# + +/* + * md5.jvs 1.0b 27/06/96 + * + * Javascript implementation of the RSA Data Security, Inc. MD5 + * Message-Digest Algorithm. + * + * Copyright (c) 1996 Henri Torgemane. All Rights Reserved. + * + * Permission to use, copy, modify, and distribute this software + * and its documentation for any purposes and without + * fee is hereby granted provided that this copyright notice + * appears in all copies. + * + * Of course, this soft is provided "as is" without express or implied + * warranty of any kind. + + This version contains some trivial reformatting modifications + by John Walker. + + */ + +function array(n) { + for (i = 0; i < n; i++) { + this[i] = 0; + } + this.length = n; +} + +/* Some basic logical functions had to be rewritten because of a bug in + * Javascript.. Just try to compute 0xffffffff >> 4 with it.. + * Of course, these functions are slower than the original would be, but + * at least, they work! + */ + +function integer(n) { + return n % (0xffffffff + 1); +} + +function shr(a, b) { + a = integer(a); + b = integer(b); + if (a - 0x80000000 >= 0) { + a = a % 0x80000000; + a >>= b; + a += 0x40000000 >> (b - 1); + } else { + a >>= b; + } + return a; +} + +function shl1(a) { + a = a % 0x80000000; + if (a & 0x40000000 == 0x40000000) { + a -= 0x40000000; + a *= 2; + a += 0x80000000; + } else { + a *= 2; + } + return a; +} + +function shl(a, b) { + a = integer(a); + b = integer(b); + for (var i = 0; i < b; i++) { + a = shl1(a); + } + return a; +} + +function and(a, b) { + a = integer(a); + b = integer(b); + var t1 = a - 0x80000000; + var t2 = b - 0x80000000; + if (t1 >= 0) { + if (t2 >= 0) { + return ((t1 & t2) + 0x80000000); + } else { + return (t1 & b); + } + } else { + if (t2 >= 0) { + return (a & t2); + } else { + return (a & b); + } + } +} + +function or(a, b) { + a = integer(a); + b = integer(b); + var t1 = a - 0x80000000; + var t2 = b - 0x80000000; + if (t1 >= 0) { + if (t2 >= 0) { + return ((t1 | t2) + 0x80000000); + } else { + return ((t1 | b) + 0x80000000); + } + } else { + if (t2 >= 0) { + return ((a | t2) + 0x80000000); + } else { + return (a | b); + } + } +} + +function xor(a, b) { + a = integer(a); + b = integer(b); + var t1 = a - 0x80000000; + var t2 = b - 0x80000000; + if (t1 >= 0) { + if (t2 >= 0) { + return (t1 ^ t2); + } else { + return ((t1 ^ b) + 0x80000000); + } + } else { + if (t2 >= 0) { + return ((a ^ t2) + 0x80000000); + } else { + return (a ^ b); + } + } +} + +function not(a) { + a = integer(a); + return 0xffffffff - a; +} + +/* Here begin the real algorithm */ + +var state = new array(4); +var count = new array(2); + count[0] = 0; + count[1] = 0; +var buffer = new array(64); +var transformBuffer = new array(16); +var digestBits = new array(16); + +var S11 = 7; +var S12 = 12; +var S13 = 17; +var S14 = 22; +var S21 = 5; +var S22 = 9; +var S23 = 14; +var S24 = 20; +var S31 = 4; +var S32 = 11; +var S33 = 16; +var S34 = 23; +var S41 = 6; +var S42 = 10; +var S43 = 15; +var S44 = 21; + +function F(x, y, z) { + return or(and(x, y), and(not(x), z)); +} + +function G(x, y, z) { + return or(and(x, z), and(y, not(z))); +} + +function H(x, y, z) { + return xor(xor(x, y), z); +} + +function I(x, y, z) { + return xor(y ,or(x , not(z))); +} + +function rotateLeft(a, n) { + return or(shl(a, n), (shr(a, (32 - n)))); +} + +function FF(a, b, c, d, x, s, ac) { + a = a + F(b, c, d) + x + ac; + a = rotateLeft(a, s); + a = a + b; + return a; +} + +function GG(a, b, c, d, x, s, ac) { + a = a + G(b, c, d) + x + ac; + a = rotateLeft(a, s); + a = a + b; + return a; +} + +function HH(a, b, c, d, x, s, ac) { + a = a + H(b, c, d) + x + ac; + a = rotateLeft(a, s); + a = a + b; + return a; +} + +function II(a, b, c, d, x, s, ac) { + a = a + I(b, c, d) + x + ac; + a = rotateLeft(a, s); + a = a + b; + return a; +} + +function transform(buf, offset) { + var a = 0, b = 0, c = 0, d = 0; + var x = transformBuffer; + + a = state[0]; + b = state[1]; + c = state[2]; + d = state[3]; + + for (i = 0; i < 16; i++) { + x[i] = and(buf[i * 4 + offset], 0xFF); + for (j = 1; j < 4; j++) { + x[i] += shl(and(buf[i * 4 + j + offset] ,0xFF), j * 8); + } + } + + /* Round 1 */ + a = FF( a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */ + d = FF( d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */ + c = FF( c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */ + b = FF( b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */ + a = FF( a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */ + d = FF( d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */ + c = FF( c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */ + b = FF( b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */ + a = FF( a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */ + d = FF( d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */ + c = FF( c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */ + b = FF( b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */ + a = FF( a, b, c, d, x[12], S11, 0x6b901122); /* 13 */ + d = FF( d, a, b, c, x[13], S12, 0xfd987193); /* 14 */ + c = FF( c, d, a, b, x[14], S13, 0xa679438e); /* 15 */ + b = FF( b, c, d, a, x[15], S14, 0x49b40821); /* 16 */ + + /* Round 2 */ + a = GG( a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */ + d = GG( d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */ + c = GG( c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */ + b = GG( b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */ + a = GG( a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */ + d = GG( d, a, b, c, x[10], S22, 0x2441453); /* 22 */ + c = GG( c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */ + b = GG( b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */ + a = GG( a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */ + d = GG( d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */ + c = GG( c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */ + b = GG( b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */ + a = GG( a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */ + d = GG( d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */ + c = GG( c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */ + b = GG( b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */ + + /* Round 3 */ + a = HH( a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */ + d = HH( d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */ + c = HH( c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */ + b = HH( b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */ + a = HH( a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */ + d = HH( d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */ + c = HH( c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */ + b = HH( b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */ + a = HH( a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */ + d = HH( d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */ + c = HH( c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */ + b = HH( b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */ + a = HH( a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */ + d = HH( d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */ + c = HH( c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */ + b = HH( b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */ + + /* Round 4 */ + a = II( a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */ + d = II( d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */ + c = II( c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */ + b = II( b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */ + a = II( a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */ + d = II( d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */ + c = II( c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */ + b = II( b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */ + a = II( a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */ + d = II( d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */ + c = II( c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */ + b = II( b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */ + a = II( a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */ + d = II( d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */ + c = II( c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */ + b = II( b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */ + + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + +} + +function md5_init() { + count[0] = count[1] = 0; + state[0] = 0x67452301; + state[1] = 0xefcdab89; + state[2] = 0x98badcfe; + state[3] = 0x10325476; + for (i = 0; i < digestBits.length; i++) { + digestBits[i] = 0; + } +} + +function md5_update(b) { + var index, i; + + index = and(shr(count[0],3) , 0x3F); + if (count[0] < 0xFFFFFFFF - 7) { + count[0] += 8; + } else { + count[1]++; + count[0] -= 0xFFFFFFFF + 1; + count[0] += 8; + } + buffer[index] = and(b, 0xff); + if (index >= 63) { + transform(buffer, 0); + } +} + +function md5_finish() { + var bits = new array(8); + var padding; + var i = 0, index = 0, padLen = 0; + + for (i = 0; i < 4; i++) { + bits[i] = and(shr(count[0], (i * 8)), 0xFF); + } + for (i = 0; i < 4; i++) { + bits[i + 4] = and(shr(count[1], (i * 8)), 0xFF); + } + index = and(shr(count[0], 3), 0x3F); + padLen = (index < 56) ? (56 - index) : (120 - index); + padding = new array(64); + padding[0] = 0x80; + for (i = 0; i < padLen; i++) { + md5_update(padding[i]); + } + for (i = 0; i < 8; i++) { + md5_update(bits[i]); + } + + for (i = 0; i < 4; i++) { + for (j = 0; j < 4; j++) { + digestBits[i * 4 + j] = and(shr(state[i], (j * 8)) , 0xFF); + } + } +} + +/* End of the MD5 algorithm */ + +//############################################################################# +// Downloaded on March 30, 2006 from http://www.fourmilab.ch/javascrypt/javascrypt.zip (aes.js) +//############################################################################# + + +/* rijndael.js Rijndael Reference Implementation + + This is a modified version of the software described below, + produced in September 2003 by John Walker for use in the + JavsScrypt browser-based encryption package. The principal + changes are replacing the original getRandomBytes function with + one which calls our pseudorandom generator (which must + be instantiated and seeded before the first call on getRandomBytes), + and changing keySizeInBits to 256. Some code not required by the + JavsScrypt application has been commented out. Please see + http://www.fourmilab.ch/javascrypt/ for further information on + JavaScrypt. + + The following is the original copyright and application + information. + + Copyright (c) 2001 Fritz Schneider + + This software is provided as-is, without express or implied warranty. + Permission to use, copy, modify, distribute or sell this software, with or + without fee, for any purpose and by any individual or organization, is hereby + granted, provided that the above copyright notice and this paragraph appear + in all copies. Distribution as a part of an application or binary must + include the above copyright notice in the documentation and/or other materials + provided with the application or distribution. + + As the above disclaimer notes, you are free to use this code however you + want. However, I would request that you send me an email + (fritz /at/ cs /dot/ ucsd /dot/ edu) to say hi if you find this code useful + or instructional. Seeing that people are using the code acts as + encouragement for me to continue development. If you *really* want to thank + me you can buy the book I wrote with Thomas Powell, _JavaScript: + _The_Complete_Reference_ :) + + This code is an UNOPTIMIZED REFERENCE implementation of Rijndael. + If there is sufficient interest I can write an optimized (word-based, + table-driven) version, although you might want to consider using a + compiled language if speed is critical to your application. As it stands, + one run of the monte carlo test (10,000 encryptions) can take up to + several minutes, depending upon your processor. You shouldn't expect more + than a few kilobytes per second in throughput. + + Also note that there is very little error checking in these functions. + Doing proper error checking is always a good idea, but the ideal + implementation (using the instanceof operator and exceptions) requires + IE5+/NS6+, and I've chosen to implement this code so that it is compatible + with IE4/NS4. + + And finally, because JavaScript doesn't have an explicit byte/char data + type (although JavaScript 2.0 most likely will), when I refer to "byte" + in this code I generally mean "32 bit integer with value in the interval + [0,255]" which I treat as a byte. + + See http://www-cse.ucsd.edu/~fritz/rijndael.html for more documentation + of the (very simple) API provided by this code. + + Fritz Schneider + fritz at cs.ucsd.edu + +*/ + + +// Rijndael parameters -- Valid values are 128, 192, or 256 + +var keySizeInBits = 256; +var blockSizeInBits = 128; + +// +// Note: in the following code the two dimensional arrays are indexed as +// you would probably expect, as array[row][column]. The state arrays +// are 2d arrays of the form state[4][Nb]. + + +// The number of rounds for the cipher, indexed by [Nk][Nb] +var roundsArray = [ ,,,,[,,,,10,, 12,, 14],, + [,,,,12,, 12,, 14],, + [,,,,14,, 14,, 14] ]; + +// The number of bytes to shift by in shiftRow, indexed by [Nb][row] +var shiftOffsets = [ ,,,,[,1, 2, 3],,[,1, 2, 3],,[,1, 3, 4] ]; + +// The round constants used in subkey expansion +var Rcon = [ +0x01, 0x02, 0x04, 0x08, 0x10, 0x20, +0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, +0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, +0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, +0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91 ]; + +// Precomputed lookup table for the SBox +var SBox = [ + 99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, +118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, +114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, +216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, +235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, +179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, +190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, +249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, +188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, +23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, +144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, + 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, +141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, + 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, +181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, +248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, +140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, + 22 ]; + +// Precomputed lookup table for the inverse SBox +var SBoxInverse = [ + 82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, +251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, +233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, +250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, +109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, +204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, + 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, +228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, +193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, +234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, + 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, + 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, +198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, + 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, +127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, +224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, + 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, +125 ]; + +// This method circularly shifts the array left by the number of elements +// given in its parameter. It returns the resulting array and is used for +// the ShiftRow step. Note that shift() and push() could be used for a more +// elegant solution, but they require IE5.5+, so I chose to do it manually. + +function cyclicShiftLeft(theArray, positions) { + var temp = theArray.slice(0, positions); + theArray = theArray.slice(positions).concat(temp); + return theArray; +} + +// Cipher parameters ... do not change these +var Nk = keySizeInBits / 32; +var Nb = blockSizeInBits / 32; +var Nr = roundsArray[Nk][Nb]; + +// Multiplies the element "poly" of GF(2^8) by x. See the Rijndael spec. + +function xtime(poly) { + poly <<= 1; + return ((poly & 0x100) ? (poly ^ 0x11B) : (poly)); +} + +// Multiplies the two elements of GF(2^8) together and returns the result. +// See the Rijndael spec, but should be straightforward: for each power of +// the indeterminant that has a 1 coefficient in x, add y times that power +// to the result. x and y should be bytes representing elements of GF(2^8) + +function mult_GF256(x, y) { + var bit, result = 0; + + for (bit = 1; bit < 256; bit *= 2, y = xtime(y)) { + if (x & bit) + result ^= y; + } + return result; +} + +// Performs the substitution step of the cipher. State is the 2d array of +// state information (see spec) and direction is string indicating whether +// we are performing the forward substitution ("encrypt") or inverse +// substitution (anything else) + +function byteSub(state, direction) { + var S; + if (direction == "encrypt") // Point S to the SBox we're using + S = SBox; + else + S = SBoxInverse; + for (var i = 0; i < 4; i++) // Substitute for every byte in state + for (var j = 0; j < Nb; j++) + state[i][j] = S[state[i][j]]; +} + +// Performs the row shifting step of the cipher. + +function shiftRow(state, direction) { + for (var i=1; i<4; i++) // Row 0 never shifts + if (direction == "encrypt") + state[i] = cyclicShiftLeft(state[i], shiftOffsets[Nb][i]); + else + state[i] = cyclicShiftLeft(state[i], Nb - shiftOffsets[Nb][i]); + +} + +// Performs the column mixing step of the cipher. Most of these steps can +// be combined into table lookups on 32bit values (at least for encryption) +// to greatly increase the speed. + +function mixColumn(state, direction) { + var b = []; // Result of matrix multiplications + for (var j = 0; j < Nb; j++) { // Go through each column... + for (var i = 0; i < 4; i++) { // and for each row in the column... + if (direction == "encrypt") + b[i] = mult_GF256(state[i][j], 2) ^ // perform mixing + mult_GF256(state[(i+1)%4][j], 3) ^ + state[(i+2)%4][j] ^ + state[(i+3)%4][j]; + else + b[i] = mult_GF256(state[i][j], 0xE) ^ + mult_GF256(state[(i+1)%4][j], 0xB) ^ + mult_GF256(state[(i+2)%4][j], 0xD) ^ + mult_GF256(state[(i+3)%4][j], 9); + } + for (var i = 0; i < 4; i++) // Place result back into column + state[i][j] = b[i]; + } +} + +// Adds the current round key to the state information. Straightforward. + +function addRoundKey(state, roundKey) { + for (var j = 0; j < Nb; j++) { // Step through columns... + state[0][j] ^= (roundKey[j] & 0xFF); // and XOR + state[1][j] ^= ((roundKey[j]>>8) & 0xFF); + state[2][j] ^= ((roundKey[j]>>16) & 0xFF); + state[3][j] ^= ((roundKey[j]>>24) & 0xFF); + } +} + +// This function creates the expanded key from the input (128/192/256-bit) +// key. The parameter key is an array of bytes holding the value of the key. +// The returned value is an array whose elements are the 32-bit words that +// make up the expanded key. + +function keyExpansion(key) { + var expandedKey = new Array(); + var temp; + + // in case the key size or parameters were changed... + Nk = keySizeInBits / 32; + Nb = blockSizeInBits / 32; + Nr = roundsArray[Nk][Nb]; + + for (var j=0; j < Nk; j++) // Fill in input key first + expandedKey[j] = + (key[4*j]) | (key[4*j+1]<<8) | (key[4*j+2]<<16) | (key[4*j+3]<<24); + + // Now walk down the rest of the array filling in expanded key bytes as + // per Rijndael's spec + for (j = Nk; j < Nb * (Nr + 1); j++) { // For each word of expanded key + temp = expandedKey[j - 1]; + if (j % Nk == 0) + temp = ( (SBox[(temp>>8) & 0xFF]) | + (SBox[(temp>>16) & 0xFF]<<8) | + (SBox[(temp>>24) & 0xFF]<<16) | + (SBox[temp & 0xFF]<<24) ) ^ Rcon[Math.floor(j / Nk) - 1]; + else if (Nk > 6 && j % Nk == 4) + temp = (SBox[(temp>>24) & 0xFF]<<24) | + (SBox[(temp>>16) & 0xFF]<<16) | + (SBox[(temp>>8) & 0xFF]<<8) | + (SBox[temp & 0xFF]); + expandedKey[j] = expandedKey[j-Nk] ^ temp; + } + return expandedKey; +} + +// Rijndael's round functions... + +function Round(state, roundKey) { + byteSub(state, "encrypt"); + shiftRow(state, "encrypt"); + mixColumn(state, "encrypt"); + addRoundKey(state, roundKey); +} + +function InverseRound(state, roundKey) { + addRoundKey(state, roundKey); + mixColumn(state, "decrypt"); + shiftRow(state, "decrypt"); + byteSub(state, "decrypt"); +} + +function FinalRound(state, roundKey) { + byteSub(state, "encrypt"); + shiftRow(state, "encrypt"); + addRoundKey(state, roundKey); +} + +function InverseFinalRound(state, roundKey){ + addRoundKey(state, roundKey); + shiftRow(state, "decrypt"); + byteSub(state, "decrypt"); +} + +// encrypt is the basic encryption function. It takes parameters +// block, an array of bytes representing a plaintext block, and expandedKey, +// an array of words representing the expanded key previously returned by +// keyExpansion(). The ciphertext block is returned as an array of bytes. + +function encrypt(block, expandedKey) { + var i; + if (!block || block.length*8 != blockSizeInBits) + return; + if (!expandedKey) + return; + + block = packBytes(block); + addRoundKey(block, expandedKey); + for (i=1; i<Nr; i++) + Round(block, expandedKey.slice(Nb*i, Nb*(i+1))); + FinalRound(block, expandedKey.slice(Nb*Nr)); + return unpackBytes(block); +} + +// decrypt is the basic decryption function. It takes parameters +// block, an array of bytes representing a ciphertext block, and expandedKey, +// an array of words representing the expanded key previously returned by +// keyExpansion(). The decrypted block is returned as an array of bytes. + +function decrypt(block, expandedKey) { + var i; + if (!block || block.length*8 != blockSizeInBits) + return; + if (!expandedKey) + return; + + block = packBytes(block); + InverseFinalRound(block, expandedKey.slice(Nb*Nr)); + for (i = Nr - 1; i>0; i--) + InverseRound(block, expandedKey.slice(Nb*i, Nb*(i+1))); + addRoundKey(block, expandedKey); + return unpackBytes(block); +} + +/* !NEEDED +// This method takes a byte array (byteArray) and converts it to a string by +// applying String.fromCharCode() to each value and concatenating the result. +// The resulting string is returned. Note that this function SKIPS zero bytes +// under the assumption that they are padding added in formatPlaintext(). +// Obviously, do not invoke this method on raw data that can contain zero +// bytes. It is really only appropriate for printable ASCII/Latin-1 +// values. Roll your own function for more robust functionality :) + +function byteArrayToString(byteArray) { + var result = ""; + for(var i=0; i<byteArray.length; i++) + if (byteArray[i] != 0) + result += String.fromCharCode(byteArray[i]); + return result; +} +*/ + +// This function takes an array of bytes (byteArray) and converts them +// to a hexadecimal string. Array element 0 is found at the beginning of +// the resulting string, high nibble first. Consecutive elements follow +// similarly, for example [16, 255] --> "10ff". The function returns a +// string. + +function byteArrayToHex(byteArray) { + var result = ""; + if (!byteArray) + return; + for (var i=0; i<byteArray.length; i++) + result += ((byteArray[i]<16) ? "0" : "") + byteArray[i].toString(16); + + return result; +} + +// This function converts a string containing hexadecimal digits to an +// array of bytes. The resulting byte array is filled in the order the +// values occur in the string, for example "10FF" --> [16, 255]. This +// function returns an array. + +function hexToByteArray(hexString) { + var byteArray = []; + if (hexString.length % 2) // must have even length + return; + if (hexString.indexOf("0x") == 0 || hexString.indexOf("0X") == 0) + hexString = hexString.substring(2); + for (var i = 0; i<hexString.length; i += 2) + byteArray[Math.floor(i/2)] = parseInt(hexString.slice(i, i+2), 16); + return byteArray; +} + +// This function packs an array of bytes into the four row form defined by +// Rijndael. It assumes the length of the array of bytes is divisible by +// four. Bytes are filled in according to the Rijndael spec (starting with +// column 0, row 0 to 3). This function returns a 2d array. + +function packBytes(octets) { + var state = new Array(); + if (!octets || octets.length % 4) + return; + + state[0] = new Array(); state[1] = new Array(); + state[2] = new Array(); state[3] = new Array(); + for (var j=0; j<octets.length; j+= 4) { + state[0][j/4] = octets[j]; + state[1][j/4] = octets[j+1]; + state[2][j/4] = octets[j+2]; + state[3][j/4] = octets[j+3]; + } + return state; +} + +// This function unpacks an array of bytes from the four row format preferred +// by Rijndael into a single 1d array of bytes. It assumes the input "packed" +// is a packed array. Bytes are filled in according to the Rijndael spec. +// This function returns a 1d array of bytes. + +function unpackBytes(packed) { + var result = new Array(); + for (var j=0; j<packed[0].length; j++) { + result[result.length] = packed[0][j]; + result[result.length] = packed[1][j]; + result[result.length] = packed[2][j]; + result[result.length] = packed[3][j]; + } + return result; +} + +// This function takes a prospective plaintext (string or array of bytes) +// and pads it with pseudorandom bytes if its length is not a multiple of the block +// size. If plaintext is a string, it is converted to an array of bytes +// in the process. The type checking can be made much nicer using the +// instanceof operator, but this operator is not available until IE5.0 so I +// chose to use the heuristic below. + +function formatPlaintext(plaintext) { + var bpb = blockSizeInBits / 8; // bytes per block + var fillWithRandomBits; + var i; + + // if primitive string or String instance + if ((!((typeof plaintext == "object") && + ((typeof (plaintext[0])) == "number"))) && + ((typeof plaintext == "string") || plaintext.indexOf)) + { + plaintext = plaintext.split(""); + // Unicode issues here (ignoring high byte) + for (i=0; i<plaintext.length; i++) { + plaintext[i] = plaintext[i].charCodeAt(0) & 0xFF; + } + } + + i = plaintext.length % bpb; + if (i > 0) { +//alert("adding " + (bpb - 1) + " bytes"); +// plaintext = plaintext.concat(getRandomBytes(bpb - i)); + { + var paddingBytes; + var ii,cc; + + paddingBytes = new Array(); + cc = bpb - i; + for (ii=0; ii<cc; ii++) { + paddingBytes[ii] = cc; + } + +//is("cc", cc); +//is(getRandomBytes(bpb - i) + "", paddingBytes + ""); + plaintext = plaintext.concat(paddingBytes); + } + } + + return plaintext; +} + +// Returns an array containing "howMany" random bytes. + +function getRandomBytes(howMany) { + var i, bytes = new Array(); + +//alert("getting some random bytes"); + for (i = 0; i < howMany; i++) { + bytes[i] = prng.nextInt(255); + } + return bytes; +} + +// rijndaelEncrypt(plaintext, key, mode) +// Encrypts the plaintext using the given key and in the given mode. +// The parameter "plaintext" can either be a string or an array of bytes. +// The parameter "key" must be an array of key bytes. If you have a hex +// string representing the key, invoke hexToByteArray() on it to convert it +// to an array of bytes. The third parameter "mode" is a string indicating +// the encryption mode to use, either "ECB" or "CBC". If the parameter is +// omitted, ECB is assumed. +// +// An array of bytes representing the cihpertext is returned. To convert +// this array to hex, invoke byteArrayToHex() on it. + +function rijndaelEncrypt(plaintext, key, mode) { + var expandedKey, i, aBlock; + var bpb = blockSizeInBits / 8; // bytes per block + var ct; // ciphertext + + if (!plaintext || !key) + return; + if (key.length*8 != keySizeInBits) + return; + if (mode == "CBC") { + ct = getRandomBytes(bpb); // get IV +//dump("IV", byteArrayToHex(ct)); + } else { + mode = "ECB"; + ct = new Array(); + } + + // convert plaintext to byte array and pad with zeros if necessary. + plaintext = formatPlaintext(plaintext); + + expandedKey = keyExpansion(key); + + for (var block = 0; block < plaintext.length / bpb; block++) { + aBlock = plaintext.slice(block * bpb, (block + 1) * bpb); + if (mode == "CBC") { + for (var i = 0; i < bpb; i++) { + aBlock[i] ^= ct[(block * bpb) + i]; + } + } + ct = ct.concat(encrypt(aBlock, expandedKey)); + } + + return ct; +} + +// rijndaelDecrypt(ciphertext, key, mode) +// Decrypts the using the given key and mode. The parameter "ciphertext" +// must be an array of bytes. The parameter "key" must be an array of key +// bytes. If you have a hex string representing the ciphertext or key, +// invoke hexToByteArray() on it to convert it to an array of bytes. The +// parameter "mode" is a string, either "CBC" or "ECB". +// +// An array of bytes representing the plaintext is returned. To convert +// this array to a hex string, invoke byteArrayToHex() on it. To convert it +// to a string of characters, you can use byteArrayToString(). + +function rijndaelDecrypt(ciphertext, key, mode) { + var expandedKey; + var bpb = blockSizeInBits / 8; // bytes per block + var pt = new Array(); // plaintext array + var aBlock; // a decrypted block + var block; // current block number + + if (!ciphertext || !key || typeof ciphertext == "string") + return; + if (key.length*8 != keySizeInBits) + return; + if (!mode) { + mode = "ECB"; // assume ECB if mode omitted + } + + expandedKey = keyExpansion(key); + + // work backwards to accomodate CBC mode + for (block=(ciphertext.length / bpb)-1; block>0; block--) { + aBlock = + decrypt(ciphertext.slice(block*bpb,(block+1)*bpb), expandedKey); + if (mode == "CBC") + for (var i=0; i<bpb; i++) + pt[(block-1)*bpb + i] = aBlock[i] ^ ciphertext[(block-1)*bpb + i]; + else + pt = aBlock.concat(pt); + } + + // do last block if ECB (skips the IV in CBC) + if (mode == "ECB") + pt = decrypt(ciphertext.slice(0, bpb), expandedKey).concat(pt); + + return pt; +} + +//############################################################################# +// Downloaded on March 30, 2006 from http://www.fourmilab.ch/javascrypt/javascrypt.zip (utf-8.js) +//############################################################################# + + + /* Encoding and decoding of Unicode character strings as + UTF-8 byte streams. */ + + // UNICODE_TO_UTF8 -- Encode Unicode argument string as UTF-8 return value + + function unicode_to_utf8(s) { + var utf8 = ""; + + for (var n = 0; n < s.length; n++) { + var c = s.charCodeAt(n); + + if (c <= 0x7F) { + // 0x00 - 0x7F: Emit as single byte, unchanged + utf8 += String.fromCharCode(c); + } else if ((c >= 0x80) && (c <= 0x7FF)) { + // 0x80 - 0x7FF: Output as two byte code, 0xC0 in first byte + // 0x80 in second byte + utf8 += String.fromCharCode((c >> 6) | 0xC0); + utf8 += String.fromCharCode((c & 0x3F) | 0x80); + } else { + // 0x800 - 0xFFFF: Output as three bytes, 0xE0 in first byte + // 0x80 in second byte + // 0x80 in third byte + utf8 += String.fromCharCode((c >> 12) | 0xE0); + utf8 += String.fromCharCode(((c >> 6) & 0x3F) | 0x80); + utf8 += String.fromCharCode((c & 0x3F) | 0x80); + } + } + return utf8; + } + + // UTF8_TO_UNICODE -- Decode UTF-8 argument into Unicode string return value + + function utf8_to_unicode(utf8) { + var s = "", i = 0, b1, b2, b2; + + while (i < utf8.length) { + b1 = utf8.charCodeAt(i); + if (b1 < 0x80) { // One byte code: 0x00 0x7F + s += String.fromCharCode(b1); + i++; + } else if((b1 >= 0xC0) && (b1 < 0xE0)) { // Two byte code: 0x80 - 0x7FF + b2 = utf8.charCodeAt(i + 1); + s += String.fromCharCode(((b1 & 0x1F) << 6) | (b2 & 0x3F)); + i += 2; + } else { // Three byte code: 0x800 - 0xFFFF + b2 = utf8.charCodeAt(i + 1); + b3 = utf8.charCodeAt(i + 2); + s += String.fromCharCode(((b1 & 0xF) << 12) | + ((b2 & 0x3F) << 6) | + (b3 & 0x3F)); + i += 3; + } + } + return s; + } + + /* ENCODE_UTF8 -- Encode string as UTF8 only if it contains + a character of 0x9D (Unicode OPERATING + SYSTEM COMMAND) or a character greater + than 0xFF. This permits all strings + consisting exclusively of 8 bit + graphic characters to be encoded as + themselves. We choose 0x9D as the sentinel + character as opposed to one of the more + logical PRIVATE USE characters because 0x9D + is not overloaded by the regrettable + "Windows-1252" character set. Now such characters + don't belong in JavaScript strings, but you never + know what somebody is going to paste into a + text box, so this choice keeps Windows-encoded + strings from bloating to UTF-8 encoding. */ + + function encode_utf8(s) { + var i, necessary = false; + + for (i = 0; i < s.length; i++) { + if ((s.charCodeAt(i) == 0x9D) || + (s.charCodeAt(i) > 0xFF)) { + necessary = true; + break; + } + } + if (!necessary) { + return s; + } + return String.fromCharCode(0x9D) + unicode_to_utf8(s); + } + + /* DECODE_UTF8 -- Decode a string encoded with encode_utf8 + above. If the string begins with the + sentinel character 0x9D (OPERATING + SYSTEM COMMAND), then we decode the + balance as a UTF-8 stream. Otherwise, + the string is output unchanged, as + it's guaranteed to contain only 8 bit + characters excluding 0x9D. */ + + function decode_utf8(s) { + if ((s.length > 0) && (s.charCodeAt(0) == 0x9D)) { + return utf8_to_unicode(s.substring(1)); + } + return s; + } + + +//############################################################################# +// Downloaded on April 26, 2006 from http://pajhome.org.uk/crypt/md5/md5.js +//############################################################################# + +/* + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for more info. + */ + +/* + * Configurable variables. You may need to tweak these to be compatible with + * the server-side, but the defaults work in most cases. + */ +var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ +var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ +var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ + +/* + * These are the functions you'll usually want to call + * They take string arguments and return either hex or base-64 encoded strings + */ +function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));} +function b64_md5(s){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));} +function str_md5(s){ return binl2str(core_md5(str2binl(s), s.length * chrsz));} +function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); } +function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); } +function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); } + +/* + * Perform a simple self-test to see if the VM is working + */ +function md5_vm_test() +{ + return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"; +} + +/* + * Calculate the MD5 of an array of little-endian words, and a bit length + */ +function core_md5(x, len) +{ + /* append padding */ + x[len >> 5] |= 0x80 << ((len) % 32); + x[(((len + 64) >>> 9) << 4) + 14] = len; + + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + + for(var i = 0; i < x.length; i += 16) + { + var olda = a; + var oldb = b; + var oldc = c; + var oldd = d; + + a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); + d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); + c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); + b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); + a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); + d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); + c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); + b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); + a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); + d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); + c = md5_ff(c, d, a, b, x[i+10], 17, -42063); + b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); + a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); + d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); + c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); + b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); + + a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); + d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); + c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); + b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); + a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); + d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); + c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); + b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); + a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); + d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); + c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); + b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); + a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); + d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); + c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); + b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); + + a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); + d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); + c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); + b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); + a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); + d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); + c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); + b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); + a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); + d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); + c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); + b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); + a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); + d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); + c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); + b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); + + a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); + d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); + c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); + b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); + a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); + d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); + c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); + b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); + a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); + d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); + c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); + b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); + a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); + d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); + c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); + b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); + + a = safe_add(a, olda); + b = safe_add(b, oldb); + c = safe_add(c, oldc); + d = safe_add(d, oldd); + } + return Array(a, b, c, d); + +} + +/* + * These functions implement the four basic operations the algorithm uses. + */ +function md5_cmn(q, a, b, x, s, t) +{ + return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); +} +function md5_ff(a, b, c, d, x, s, t) +{ + return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); +} +function md5_gg(a, b, c, d, x, s, t) +{ + return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); +} +function md5_hh(a, b, c, d, x, s, t) +{ + return md5_cmn(b ^ c ^ d, a, b, x, s, t); +} +function md5_ii(a, b, c, d, x, s, t) +{ + return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); +} + +/* + * Calculate the HMAC-MD5, of a key and some data + */ +function core_hmac_md5(key, data) +{ + var bkey = str2binl(key); + if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz); + + var ipad = Array(16), opad = Array(16); + for(var i = 0; i < 16; i++) + { + ipad[i] = bkey[i] ^ 0x36363636; + opad[i] = bkey[i] ^ 0x5C5C5C5C; + } + + var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz); + return core_md5(opad.concat(hash), 512 + 128); +} + +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ +function safe_add(x, y) +{ + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} + +/* + * Bitwise rotate a 32-bit number to the left. + */ +function bit_rol(num, cnt) +{ + return (num << cnt) | (num >>> (32 - cnt)); +} + +/* + * Convert a string to an array of little-endian words + * If chrsz is ASCII, characters >255 have their hi-byte silently ignored. + */ +function str2binl(str) +{ + var bin = Array(); + var mask = (1 << chrsz) - 1; + for(var i = 0; i < str.length * chrsz; i += chrsz) + bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32); + return bin; +} + +/* + * Convert an array of little-endian words to a string + */ +function binl2str(bin) +{ + var str = ""; + var mask = (1 << chrsz) - 1; + for(var i = 0; i < bin.length * 32; i += chrsz) + str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask); + return str; +} + +/* + * Convert an array of little-endian words to a hex string. + */ +function binl2hex(binarray) +{ + var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; + var str = ""; + for(var i = 0; i < binarray.length * 4; i++) + { + str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) + + hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF); + } + return str; +} + +/* + * Convert an array of little-endian words to a base-64 string + */ +function binl2b64(binarray) +{ + var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + var str = ""; + for(var i = 0; i < binarray.length * 4; i += 3) + { + var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16) + | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 ) + | ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF); + for(var j = 0; j < 4; j++) + { + if(i * 8 + j * 6 > binarray.length * 32) str += b64pad; + else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); + } + } + return str; +} + + +//############################################################################# +//############################################################################# +//############################################################################# + + + +MochiKit.Base.update(Clipperz.Crypto.Base, { + + '__repr__': function () { + return "[" + this.NAME + " " + this.VERSION + "]"; + }, + + 'toString': function () { + return this.__repr__(); + }, + + //----------------------------------------------------------------------------- + + 'encryptUsingSecretKey': function (aKey, aMessage) { +//Clipperz.Profile.start("Clipperz.Crypto.Base.encryptUsingSecretKey"); + var result; + var plaintext; + var header; + var key; + + key = hexToByteArray(Clipperz.Crypto.Base.computeHashValue(aKey)); + + addEntropyTime(); + prng = new AESprng(keyFromEntropy()); + + plaintext = encode_utf8(aMessage); + + header = Clipperz.Base.byteArrayToString(hexToByteArray(Clipperz.Crypto.Base.computeMD5HashValue(plaintext))); + + // Add message length in bytes to header + i = plaintext.length; + header += String.fromCharCode(i >>> 24); + header += String.fromCharCode(i >>> 16); + header += String.fromCharCode(i >>> 8); + header += String.fromCharCode(i & 0xFF); + + // The format of the actual message passed to rijndaelEncrypt + // is: + // + // Bytes Content + // 0-15 MD5 signature of plaintext + // 16-19 Length of plaintext, big-endian order + // 20-end Plaintext + // + // Note that this message will be padded with zero bytes + // to an integral number of AES blocks (blockSizeInBits / 8). + // This does not include the initial vector for CBC + // encryption, which is added internally by rijndaelEncrypt. + result = byteArrayToHex(rijndaelEncrypt(header + plaintext, key, "CBC")); + + delete prng; + +//Clipperz.Profile.stop("Clipperz.Crypto.Base.encryptUsingSecretKey"); + return result; + }, + + //............................................................................. + + 'decryptUsingSecretKey': function (aKey, aMessage) { +//Clipperz.Profile.start("Clipperz.Crypto.Base.decryptUsingSecretKey"); + var key; + var decryptedText; + var textLength; + var header; + var headerDigest; + var plaintext; + var i; + + key = hexToByteArray(Clipperz.Crypto.Base.computeHashValue(aKey)); + + decryptedText = rijndaelDecrypt(hexToByteArray(aMessage), key, "CBC"); + + header = decryptedText.slice(0, 20); + decryptedText = decryptedText.slice(20); + + headerDigest = byteArrayToHex(header.slice(0,16)); + textLength = (header[16] << 24) | (header[17] << 16) | (header[18] << 8) | header[19]; + + if ((textLength < 0) || (textLength > decryptedText.length)) { +// jslog.warning("Message (length " + decryptedText.length + ") truncated. " + textLength + " characters expected."); + // Try to sauve qui peut by setting length to entire message + textLength = decryptedText.length; + } + + plainText = ""; + + for (i=0; i<textLength; i++) { + plainText += String.fromCharCode(decryptedText[i]); + } + + if (Clipperz.Crypto.Base.computeMD5HashValue(plainText) != headerDigest) { +// jslog.warning("Message corrupted. Checksum of decrypted message does not match."); + throw Clipperz.Crypto.Base.exception.CorruptedMessage; +// throw new Error("Message corrupted. Checksum of decrypted message does not match. Parsed result: " + decode_utf8(plainText)); + } + + // That's it; plug plaintext into the result field + + result = decode_utf8(plainText); + +//Clipperz.Profile.stop("Clipperz.Crypto.Base.decryptUsingSecretKey"); + return result; + }, + + //----------------------------------------------------------------------------- + + 'computeHashValue': function (aMessage) { +//Clipperz.Profile.start("Clipperz.Crypto.Base.computeHashValue"); + var result; + + result = hex_sha256(aMessage); +//Clipperz.Profile.stop("Clipperz.Crypto.Base.computeHashValue"); + + return result; + }, + + //......................................................................... + + 'computeMD5HashValue': function (aMessage) { + var result; +//Clipperz.Profile.start("Clipperz.Crypto.Base.computeMD5HashValue"); + result = hex_md5(aMessage); +//Clipperz.Profile.stop("Clipperz.Crypto.Base.computeMD5HashValue"); + + return result; + }, + + //----------------------------------------------------------------------------- + + 'generateRandomSeed': function () { +//Clipperz.Profile.start("Clipperz.Crypto.Base.generateRandomSeed"); + var result; + var seed; + var prng; + var charA; + var i; + + addEntropyTime(); + + seed = keyFromEntropy(); + prng = new AESprng(seed); + + result = ""; + charA = ("A").charCodeAt(0); + + for (i = 0; i < 64; i++) { + result += String.fromCharCode(charA + prng.nextInt(25)); + } + + delete prng; + + result = Clipperz.Crypto.Base.computeHashValue(result); + +//Clipperz.Profile.stop("Clipperz.Crypto.Base.generateRandomSeed"); + return result; + }, + + //----------------------------------------------------------------------------- + + 'exception': { + 'CorruptedMessage': new MochiKit.Base.NamedError("Clipperz.Crypto.Base.exception.CorruptedMessage") + }, + + //......................................................................... + __syntaxFix__: "syntax fix" +}); + diff --git a/frontend/gamma/js/ClipperzCryptoLibrary/BigInt.js b/frontend/gamma/js/ClipperzCryptoLibrary/BigInt.js new file mode 100644 index 0000000..197cd9a --- a/dev/null +++ b/frontend/gamma/js/ClipperzCryptoLibrary/BigInt.js @@ -0,0 +1,1755 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } +if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } + +//############################################################################# +// Downloaded on March 05, 2007 from http://www.leemon.com/crypto/BigInt.js +//############################################################################# + + +//////////////////////////////////////////////////////////////////////////////////////// +// Big Integer Library v. 5.0 +// Created 2000, last modified 2006 +// Leemon Baird +// www.leemon.com +// +// This file is public domain. You can use it for any purpose without restriction. +// I do not guarantee that it is correct, so use it at your own risk. If you use +// it for something interesting, I'd appreciate hearing about it. If you find +// any bugs or make any improvements, I'd appreciate hearing about those too. +// It would also be nice if my name and address were left in the comments. +// But none of that is required. +// +// This code defines a bigInt library for arbitrary-precision integers. +// A bigInt is an array of integers storing the value in chunks of bpe bits, +// little endian (buff[0] is the least significant word). +// Negative bigInts are stored two's complement. +// Some functions assume their parameters have at least one leading zero element. +// Functions with an underscore at the end of the name have unpredictable behavior in case of overflow, +// so the caller must make sure overflow won't happen. +// For each function where a parameter is modified, that same +// variable must not be used as another argument too. +// So, you cannot square x by doing multMod_(x,x,n). +// You must use squareMod_(x,n) instead, or do y=dup(x); multMod_(x,y,n). +// +// These functions are designed to avoid frequent dynamic memory allocation in the inner loop. +// For most functions, if it needs a BigInt as a local variable it will actually use +// a global, and will only allocate to it when it's not the right size. This ensures +// that when a function is called repeatedly with same-sized parameters, it only allocates +// memory on the first call. +// +// Note that for cryptographic purposes, the calls to Math.random() must +// be replaced with calls to a better pseudorandom number generator. +// +// In the following, "bigInt" means a bigInt with at least one leading zero element, +// and "integer" means a nonnegative integer less than radix. In some cases, integer +// can be negative. Negative bigInts are 2s complement. +// +// The following functions do not modify their inputs, but dynamically allocate memory every time they are called: +// +// function bigInt2str(x,base) //convert a bigInt into a string in a given base, from base 2 up to base 95 +// function dup(x) //returns a copy of bigInt x +// function findPrimes(n) //return array of all primes less than integer n +// function int2bigInt(t,n,m) //convert integer t to a bigInt with at least n bits and m array elements +// function int2bigInt(s,b,n,m) //convert string s in base b to a bigInt with at least n bits and m array elements +// function trim(x,k) //return a copy of x with exactly k leading zero elements +// +// The following functions do not modify their inputs, so there is never a problem with the result being too big: +// +// function bitSize(x) //returns how many bits long the bigInt x is, not counting leading zeros +// function equals(x,y) //is the bigInt x equal to the bigint y? +// function equalsInt(x,y) //is bigint x equal to integer y? +// function greater(x,y) //is x>y? (x and y are nonnegative bigInts) +// function greaterShift(x,y,shift)//is (x <<(shift*bpe)) > y? +// function isZero(x) //is the bigInt x equal to zero? +// function millerRabin(x,b) //does one round of Miller-Rabin base integer b say that bigInt x is possibly prime (as opposed to definitely composite)? +// function modInt(x,n) //return x mod n for bigInt x and integer n. +// function negative(x) //is bigInt x negative? +// +// The following functions do not modify their inputs, but allocate memory and call functions with underscores +// +// function add(x,y) //return (x+y) for bigInts x and y. +// function addInt(x,n) //return (x+n) where x is a bigInt and n is an integer. +// function expand(x,n) //return a copy of x with at least n elements, adding leading zeros if needed +// function inverseMod(x,n) //return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null +// function mod(x,n) //return a new bigInt equal to (x mod n) for bigInts x and n. +// function mult(x,y) //return x*y for bigInts x and y. This is faster when y<x. +// function multMod(x,y,n) //return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x. +// function powMod(x,y,n) //return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n. +// function randTruePrime(k) //return a new, random, k-bit, true prime using Maurer's algorithm. +// function sub(x,y) //return (x-y) for bigInts x and y. Negative answers will be 2s complement +// +// The following functions write a bigInt result to one of the parameters, but +// the result is never bigger than the original, so there can't be overflow problems: +// +// function divInt_(x,n) //do x=floor(x/n) for bigInt x and integer n, and return the remainder +// function GCD_(x,y) //set x to the greatest common divisor of bigInts x and y, (y is destroyed). +// function halve_(x) //do x=floor(|x|/2)*sgn(x) for bigInt x in 2's complement +// function mod_(x,n) //do x=x mod n for bigInts x and n. +// function rightShift_(x,n) //right shift bigInt x by n bits. 0 <= n < bpe. +// +// The following functions write a bigInt result to one of the parameters. The caller is responsible for +// ensuring it is large enough to hold the result. +// +// function addInt_(x,n) //do x=x+n where x is a bigInt and n is an integer +// function add_(x,y) //do x=x+y for bigInts x and y +// function addShift_(x,y,ys) //do x=x+(y<<(ys*bpe)) +// function copy_(x,y) //do x=y on bigInts x and y +// function copyInt_(x,n) //do x=n on bigInt x and integer n +// function carry_(x) //do carries and borrows so each element of the bigInt x fits in bpe bits. +// function divide_(x,y,q,r) //divide_ x by y giving quotient q and remainder r +// function eGCD_(x,y,d,a,b) //sets a,b,d to positive big integers such that d = GCD_(x,y) = a*x-b*y +// function inverseMod_(x,n) //do x=x**(-1) mod n, for bigInts x and n. Returns 1 (0) if inverse does (doesn't) exist +// function inverseModInt_(x,n) //return x**(-1) mod n, for integers x and n. Return 0 if there is no inverse +// function leftShift_(x,n) //left shift bigInt x by n bits. n<bpe. +// function linComb_(x,y,a,b) //do x=a*x+b*y for bigInts x and y and integers a and b +// function linCombShift_(x,y,b,ys) //do x=x+b*(y<<(ys*bpe)) for bigInts x and y, and integers b and ys +// function mont_(x,y,n,np) //Montgomery multiplication (see comments where the function is defined) +// function mult_(x,y) //do x=x*y for bigInts x and y. +// function multInt_(x,n) //do x=x*n where x is a bigInt and n is an integer. +// function multMod_(x,y,n) //do x=x*y mod n for bigInts x,y,n. +// function powMod_(x,y,n) //do x=x**y mod n, where x,y,n are bigInts (n is odd) and ** is exponentiation. 0**0=1. +// function randBigInt_(b,n,s) //do b = an n-bit random BigInt. if s=1, then nth bit (most significant bit) is set to 1. n>=1. +// function randTruePrime_(ans,k) //do ans = a random k-bit true random prime (not just probable prime) with 1 in the msb. +// function squareMod_(x,n) //do x=x*x mod n for bigInts x,n +// function sub_(x,y) //do x=x-y for bigInts x and y. Negative answers will be 2s complement. +// function subShift_(x,y,ys) //do x=x-(y<<(ys*bpe)). Negative answers will be 2s complement. +// +// The following functions are based on algorithms from the _Handbook of Applied Cryptography_ +// powMod_() = algorithm 14.94, Montgomery exponentiation +// eGCD_,inverseMod_() = algorithm 14.61, Binary extended GCD_ +// GCD_() = algorothm 14.57, Lehmer's algorithm +// mont_() = algorithm 14.36, Montgomery multiplication +// divide_() = algorithm 14.20 Multiple-precision division +// squareMod_() = algorithm 14.16 Multiple-precision squaring +// randTruePrime_() = algorithm 4.62, Maurer's algorithm +// millerRabin() = algorithm 4.24, Miller-Rabin algorithm +// +// Profiling shows: +// randTruePrime_() spends: +// 10% of its time in calls to powMod_() +// 85% of its time in calls to millerRabin() +// millerRabin() spends: +// 99% of its time in calls to powMod_() (always with a base of 2) +// powMod_() spends: +// 94% of its time in calls to mont_() (almost always with x==y) +// +// This suggests there are several ways to speed up this library slightly: +// - convert powMod_ to use a Montgomery form of k-ary window (or maybe a Montgomery form of sliding window) +// -- this should especially focus on being fast when raising 2 to a power mod n +// - convert randTruePrime_() to use a minimum r of 1/3 instead of 1/2 with the appropriate change to the test +// - tune the parameters in randTruePrime_(), including c, m, and recLimit +// - speed up the single loop in mont_() that takes 95% of the runtime, perhaps by reducing checking +// within the loop when all the parameters are the same length. +// +// There are several ideas that look like they wouldn't help much at all: +// - replacing trial division in randTruePrime_() with a sieve (that speeds up something taking almost no time anyway) +// - increase bpe from 15 to 30 (that would help if we had a 32*32->64 multiplier, but not with JavaScript's 32*32->32) +// - speeding up mont_(x,y,n,np) when x==y by doing a non-modular, non-Montgomery square +// followed by a Montgomery reduction. The intermediate answer will be twice as long as x, so that +// method would be slower. This is unfortunate because the code currently spends almost all of its time +// doing mont_(x,x,...), both for randTruePrime_() and powMod_(). A faster method for Montgomery squaring +// would have a large impact on the speed of randTruePrime_() and powMod_(). HAC has a couple of poorly-worded +// sentences that seem to imply it's faster to do a non-modular square followed by a single +// Montgomery reduction, but that's obviously wrong. +//////////////////////////////////////////////////////////////////////////////////////// + +//globals +bpe=0; //bits stored per array element +mask=0; //AND this with an array element to chop it down to bpe bits +radix=mask+1; //equals 2^bpe. A single 1 bit to the left of the last bit of mask. + +//the digits for converting to different bases +digitsStr='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_=!@#$%^&*()[]{}|;:,.<>/?`~ \\\'\"+-'; + +//initialize the global variables +for (bpe=0; (1<<(bpe+1)) > (1<<bpe); bpe++); //bpe=number of bits in the mantissa on this platform +bpe>>=1; //bpe=number of bits in one element of the array representing the bigInt +mask=(1<<bpe)-1; //AND the mask with an integer to get its bpe least significant bits +radix=mask+1; //2^bpe. a single 1 bit to the left of the first bit of mask +one=int2bigInt(1,1,1); //constant used in powMod_() + +//the following global variables are scratchpad memory to +//reduce dynamic memory allocation in the inner loop +t=new Array(0); +ss=t; //used in mult_() +s0=t; //used in multMod_(), squareMod_() +s1=t; //used in powMod_(), multMod_(), squareMod_() +s2=t; //used in powMod_(), multMod_() +s3=t; //used in powMod_() +s4=t; s5=t; //used in mod_() +s6=t; //used in bigInt2str() +s7=t; //used in powMod_() +T=t; //used in GCD_() +sa=t; //used in mont_() +mr_x1=t; mr_r=t; mr_a=t; //used in millerRabin() +eg_v=t; eg_u=t; eg_A=t; eg_B=t; eg_C=t; eg_D=t; //used in eGCD_(), inverseMod_() +md_q1=t; md_q2=t; md_q3=t; md_r=t; md_r1=t; md_r2=t; md_tt=t; //used in mod_() + +primes=t; pows=t; s_i=t; s_i2=t; s_R=t; s_rm=t; s_q=t; s_n1=t; + s_a=t; s_r2=t; s_n=t; s_b=t; s_d=t; s_x1=t; s_x2=t, s_aa=t; //used in randTruePrime_() + +//////////////////////////////////////////////////////////////////////////////////////// + +//return array of all primes less than integer n +function findPrimes(n) { + var i,s,p,ans; + s=new Array(n); + for (i=0;i<n;i++) + s[i]=0; + s[0]=2; + p=0; //first p elements of s are primes, the rest are a sieve + for(;s[p]<n;) { //s[p] is the pth prime + for(i=s[p]*s[p]; i<n; i+=s[p]) //mark multiples of s[p] + s[i]=1; + p++; + s[p]=s[p-1]+1; + for(; s[p]<n && s[s[p]]; s[p]++); //find next prime (where s[p]==0) + } + ans=new Array(p); + for(i=0;i<p;i++) + ans[i]=s[i]; + return ans; +} + +//does a single round of Miller-Rabin base b consider x to be a possible prime? +//x is a bigInt, and b is an integer +function millerRabin(x,b) { + var i,j,k,s; + + if (mr_x1.length!=x.length) { + mr_x1=dup(x); + mr_r=dup(x); + mr_a=dup(x); + } + + copyInt_(mr_a,b); + copy_(mr_r,x); + copy_(mr_x1,x); + + addInt_(mr_r,-1); + addInt_(mr_x1,-1); + + //s=the highest power of two that divides mr_r + k=0; + for (i=0;i<mr_r.length;i++) + for (j=1;j<mask;j<<=1) + if (x[i] & j) { + s=(k<mr_r.length+bpe ? k : 0); + i=mr_r.length; + j=mask; + } else + k++; + + if (s) + rightShift_(mr_r,s); + + powMod_(mr_a,mr_r,x); + + if (!equalsInt(mr_a,1) && !equals(mr_a,mr_x1)) { + j=1; + while (j<=s-1 && !equals(mr_a,mr_x1)) { + squareMod_(mr_a,x); + if (equalsInt(mr_a,1)) { + return 0; + } + j++; + } + if (!equals(mr_a,mr_x1)) { + return 0; + } + } + return 1; +} + +//returns how many bits long the bigInt is, not counting leading zeros. +function bitSize(x) { + var j,z,w; + for (j=x.length-1; (x[j]==0) && (j>0); j--); + for (z=0,w=x[j]; w; (w>>=1),z++); + z+=bpe*j; + return z; +} + +//return a copy of x with at least n elements, adding leading zeros if needed +function expand(x,n) { + var ans=int2bigInt(0,(x.length>n ? x.length : n)*bpe,0); + copy_(ans,x); + return ans; +} + +//return a k-bit true random prime using Maurer's algorithm. +function randTruePrime(k) { + var ans=int2bigInt(0,k,0); + randTruePrime_(ans,k); + return trim(ans,1); +} + +//return a new bigInt equal to (x mod n) for bigInts x and n. +function mod(x,n) { + var ans=dup(x); + mod_(ans,n); + return trim(ans,1); +} + +//return (x+n) where x is a bigInt and n is an integer. +function addInt(x,n) { + var ans=expand(x,x.length+1); + addInt_(ans,n); + return trim(ans,1); +} + +//return x*y for bigInts x and y. This is faster when y<x. +function mult(x,y) { + var ans=expand(x,x.length+y.length); + mult_(ans,y); + return trim(ans,1); +} + +//return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n. +function powMod(x,y,n) { + var ans=expand(x,n.length); + powMod_(ans,trim(y,2),trim(n,2),0); //this should work without the trim, but doesn't + return trim(ans,1); +} + +//return (x-y) for bigInts x and y. Negative answers will be 2s complement +function sub(x,y) { + var ans=expand(x,(x.length>y.length ? x.length+1 : y.length+1)); + sub_(ans,y); + return trim(ans,1); +} + +//return (x+y) for bigInts x and y. +function add(x,y) { + var ans=expand(x,(x.length>y.length ? x.length+1 : y.length+1)); + add_(ans,y); + return trim(ans,1); +} + +//return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null +function inverseMod(x,n) { + var ans=expand(x,n.length); + var s; + s=inverseMod_(ans,n); + return s ? trim(ans,1) : null; +} + +//return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x. +function multMod(x,y,n) { + var ans=expand(x,n.length); + multMod_(ans,y,n); + return trim(ans,1); +} + +//generate a k-bit true random prime using Maurer's algorithm, +//and put it into ans. The bigInt ans must be large enough to hold it. +function randTruePrime_(ans,k) { + var c,m,pm,dd,j,r,B,divisible,z,zz,recSize; + + if (primes.length==0) + primes=findPrimes(30000); //check for divisibility by primes <=30000 + + if (pows.length==0) { + pows=new Array(512); + for (j=0;j<512;j++) { + pows[j]=Math.pow(2,j/511.-1.); + } + } + + //c and m should be tuned for a particular machine and value of k, to maximize speed + //this was: c=primes[primes.length-1]/k/k; //check using all the small primes. (c=0.1 in HAC) + c=0.1; + m=20; //generate this k-bit number by first recursively generating a number that has between k/2 and k-m bits + recLimit=20; /*must be at least 2 (was 29)*/ //stop recursion when k <=recLimit + + if (s_i2.length!=ans.length) { + s_i2=dup(ans); + s_R =dup(ans); + s_n1=dup(ans); + s_r2=dup(ans); + s_d =dup(ans); + s_x1=dup(ans); + s_x2=dup(ans); + s_b =dup(ans); + s_n =dup(ans); + s_i =dup(ans); + s_rm=dup(ans); + s_q =dup(ans); + s_a =dup(ans); + s_aa=dup(ans); + } + + if (k <= recLimit) { //generate small random primes by trial division up to its square root + pm=(1<<((k+2)>>1))-1; //pm is binary number with all ones, just over sqrt(2^k) + copyInt_(ans,0); + for (dd=1;dd;) { + dd=0; + ans[0]= 1 | (1<<(k-1)) | Math.floor(Math.random()*(1<<k)); //random, k-bit, odd integer, with msb 1 + for (j=1;(j<primes.length) && ((primes[j]&pm)==primes[j]);j++) { //trial division by all primes 3...sqrt(2^k) + if (0==(ans[0]%primes[j])) { + dd=1; + break; + } + } + } + carry_(ans); + return; + } + + B=c*k*k; //try small primes up to B (or all the primes[] array if the largest is less than B). + if (k>2*m) //generate this k-bit number by first recursively generating a number that has between k/2 and k-m bits + for (r=1; k-k*r<=m; ) + r=pows[Math.floor(Math.random()*512)]; //r=Math.pow(2,Math.random()-1); + else + r=.5; + + //simulation suggests the more complex algorithm using r=.333 is only slightly faster. + + recSize=Math.floor(r*k)+1; + + randTruePrime_(s_q,recSize); + copyInt_(s_i2,0); + s_i2[Math.floor((k-2)/bpe)] |= (1<<((k-2)%bpe)); //s_i2=2^(k-2) + divide_(s_i2,s_q,s_i,s_rm); //s_i=floor((2^(k-1))/(2q)) + + z=bitSize(s_i); + + for (;;) { + for (;;) { //generate z-bit numbers until one falls in the range [0,s_i-1] + randBigInt_(s_R,z,0); + if (greater(s_i,s_R)) + break; + } //now s_R is in the range [0,s_i-1] + addInt_(s_R,1); //now s_R is in the range [1,s_i] + add_(s_R,s_i); //now s_R is in the range [s_i+1,2*s_i] + + copy_(s_n,s_q); + mult_(s_n,s_R); + multInt_(s_n,2); + addInt_(s_n,1); //s_n=2*s_R*s_q+1 + + copy_(s_r2,s_R); + multInt_(s_r2,2); //s_r2=2*s_R + + //check s_n for divisibility by small primes up to B + for (divisible=0,j=0; (j<primes.length) && (primes[j]<B); j++) + if (modInt(s_n,primes[j])==0) { + divisible=1; + break; + } + + if (!divisible) //if it passes small primes check, then try a single Miller-Rabin base 2 + if (!millerRabin(s_n,2)) //this line represents 75% of the total runtime for randTruePrime_ + divisible=1; + + if (!divisible) { //if it passes that test, continue checking s_n + addInt_(s_n,-3); + for (j=s_n.length-1;(s_n[j]==0) && (j>0); j--); //strip leading zeros + for (zz=0,w=s_n[j]; w; (w>>=1),zz++); + zz+=bpe*j; //zz=number of bits in s_n, ignoring leading zeros + for (;;) { //generate z-bit numbers until one falls in the range [0,s_n-1] + randBigInt_(s_a,zz,0); + if (greater(s_n,s_a)) + break; + } //now s_a is in the range [0,s_n-1] + addInt_(s_n,3); //now s_a is in the range [0,s_n-4] + addInt_(s_a,2); //now s_a is in the range [2,s_n-2] + copy_(s_b,s_a); + copy_(s_n1,s_n); + addInt_(s_n1,-1); + powMod_(s_b,s_n1,s_n); //s_b=s_a^(s_n-1) modulo s_n + addInt_(s_b,-1); + if (isZero(s_b)) { + copy_(s_b,s_a); + powMod_(s_b,s_r2,s_n); + addInt_(s_b,-1); + copy_(s_aa,s_n); + copy_(s_d,s_b); + GCD_(s_d,s_n); //if s_b and s_n are relatively prime, then s_n is a prime + if (equalsInt(s_d,1)) { + copy_(ans,s_aa); + return; //if we've made it this far, then s_n is absolutely guaranteed to be prime + } + } + } + } +} + +//set b to an n-bit random BigInt. If s=1, then nth bit (most significant bit) is set to 1. +//array b must be big enough to hold the result. Must have n>=1 +function randBigInt_(b,n,s) { + var i,a; + for (i=0;i<b.length;i++) + b[i]=0; + a=Math.floor((n-1)/bpe)+1; //# array elements to hold the BigInt + for (i=0;i<a;i++) { + b[i]=Math.floor(Math.random()*(1<<(bpe-1))); + } + b[a-1] &= (2<<((n-1)%bpe))-1; + if (s) + b[a-1] |= (1<<((n-1)%bpe)); +} + +//set x to the greatest common divisor of x and y. +//x,y are bigInts with the same number of elements. y is destroyed. +function GCD_(x,y) { + var i,xp,yp,A,B,C,D,q,sing; + if (T.length!=x.length) + T=dup(x); + + sing=1; + while (sing) { //while y has nonzero elements other than y[0] + sing=0; + for (i=1;i<y.length;i++) //check if y has nonzero elements other than 0 + if (y[i]) { + sing=1; + break; + } + if (!sing) break; //quit when y all zero elements except possibly y[0] + + for (i=x.length;!x[i] && i>=0;i--); //find most significant element of x + xp=x[i]; + yp=y[i]; + A=1; B=0; C=0; D=1; + while ((yp+C) && (yp+D)) { + q =Math.floor((xp+A)/(yp+C)); + qp=Math.floor((xp+B)/(yp+D)); + if (q!=qp) + break; + t= A-q*C; A=C; C=t; // do (A,B,xp, C,D,yp) = (C,D,yp, A,B,xp) - q*(0,0,0, C,D,yp) + t= B-q*D; B=D; D=t; + t=xp-q*yp; xp=yp; yp=t; + } + if (B) { + copy_(T,x); + linComb_(x,y,A,B); //x=A*x+B*y + linComb_(y,T,D,C); //y=D*y+C*T + } else { + mod_(x,y); + copy_(T,x); + copy_(x,y); + copy_(y,T); + } + } + if (y[0]==0) + return; + t=modInt(x,y[0]); + copyInt_(x,y[0]); + y[0]=t; + while (y[0]) { + x[0]%=y[0]; + t=x[0]; x[0]=y[0]; y[0]=t; + } +} + +//do x=x**(-1) mod n, for bigInts x and n. +//If no inverse exists, it sets x to zero and returns 0, else it returns 1. +//The x array must be at least as large as the n array. +function inverseMod_(x,n) { + var k=1+2*Math.max(x.length,n.length); + + if(!(x[0]&1) && !(n[0]&1)) { //if both inputs are even, then inverse doesn't exist + copyInt_(x,0); + return 0; + } + + if (eg_u.length!=k) { + eg_u=new Array(k); + eg_v=new Array(k); + eg_A=new Array(k); + eg_B=new Array(k); + eg_C=new Array(k); + eg_D=new Array(k); + } + + copy_(eg_u,x); + copy_(eg_v,n); + copyInt_(eg_A,1); + copyInt_(eg_B,0); + copyInt_(eg_C,0); + copyInt_(eg_D,1); + for (;;) { + while(!(eg_u[0]&1)) { //while eg_u is even + halve_(eg_u); + if (!(eg_A[0]&1) && !(eg_B[0]&1)) { //if eg_A==eg_B==0 mod 2 + halve_(eg_A); + halve_(eg_B); + } else { + add_(eg_A,n); halve_(eg_A); + sub_(eg_B,x); halve_(eg_B); + } + } + + while (!(eg_v[0]&1)) { //while eg_v is even + halve_(eg_v); + if (!(eg_C[0]&1) && !(eg_D[0]&1)) { //if eg_C==eg_D==0 mod 2 + halve_(eg_C); + halve_(eg_D); + } else { + add_(eg_C,n); halve_(eg_C); + sub_(eg_D,x); halve_(eg_D); + } + } + + if (!greater(eg_v,eg_u)) { //eg_v <= eg_u + sub_(eg_u,eg_v); + sub_(eg_A,eg_C); + sub_(eg_B,eg_D); + } else { //eg_v > eg_u + sub_(eg_v,eg_u); + sub_(eg_C,eg_A); + sub_(eg_D,eg_B); + } + + if (equalsInt(eg_u,0)) { + if (negative(eg_C)) //make sure answer is nonnegative + add_(eg_C,n); + copy_(x,eg_C); + + if (!equalsInt(eg_v,1)) { //if GCD_(x,n)!=1, then there is no inverse + copyInt_(x,0); + return 0; + } + return 1; + } + } +} + +//return x**(-1) mod n, for integers x and n. Return 0 if there is no inverse +function inverseModInt_(x,n) { + var a=1,b=0,t; + for (;;) { + if (x==1) return a; + if (x==0) return 0; + b-=a*Math.floor(n/x); + n%=x; + + if (n==1) return b; //to avoid negatives, change this b to n-b, and each -= to += + if (n==0) return 0; + a-=b*Math.floor(x/n); + x%=n; + } +} + +//Given positive bigInts x and y, change the bigints v, a, and b to positive bigInts such that: +// v = GCD_(x,y) = a*x-b*y +//The bigInts v, a, b, must have exactly as many elements as the larger of x and y. +function eGCD_(x,y,v,a,b) { + var g=0; + var k=Math.max(x.length,y.length); + if (eg_u.length!=k) { + eg_u=new Array(k); + eg_A=new Array(k); + eg_B=new Array(k); + eg_C=new Array(k); + eg_D=new Array(k); + } + while(!(x[0]&1) && !(y[0]&1)) { //while x and y both even + halve_(x); + halve_(y); + g++; + } + copy_(eg_u,x); + copy_(v,y); + copyInt_(eg_A,1); + copyInt_(eg_B,0); + copyInt_(eg_C,0); + copyInt_(eg_D,1); + for (;;) { + while(!(eg_u[0]&1)) { //while u is even + halve_(eg_u); + if (!(eg_A[0]&1) && !(eg_B[0]&1)) { //if A==B==0 mod 2 + halve_(eg_A); + halve_(eg_B); + } else { + add_(eg_A,y); halve_(eg_A); + sub_(eg_B,x); halve_(eg_B); + } + } + + while (!(v[0]&1)) { //while v is even + halve_(v); + if (!(eg_C[0]&1) && !(eg_D[0]&1)) { //if C==D==0 mod 2 + halve_(eg_C); + halve_(eg_D); + } else { + add_(eg_C,y); halve_(eg_C); + sub_(eg_D,x); halve_(eg_D); + } + } + + if (!greater(v,eg_u)) { //v<=u + sub_(eg_u,v); + sub_(eg_A,eg_C); + sub_(eg_B,eg_D); + } else { //v>u + sub_(v,eg_u); + sub_(eg_C,eg_A); + sub_(eg_D,eg_B); + } + if (equalsInt(eg_u,0)) { + if (negative(eg_C)) { //make sure a (C)is nonnegative + add_(eg_C,y); + sub_(eg_D,x); + } + multInt_(eg_D,-1); ///make sure b (D) is nonnegative + copy_(a,eg_C); + copy_(b,eg_D); + leftShift_(v,g); + return; + } + } +} + + +//is bigInt x negative? +function negative(x) { + return ((x[x.length-1]>>(bpe-1))&1); +} + + +//is (x << (shift*bpe)) > y? +//x and y are nonnegative bigInts +//shift is a nonnegative integer +function greaterShift(x,y,shift) { + var kx=x.length, ky=y.length; + k=((kx+shift)<ky) ? (kx+shift) : ky; + for (i=ky-1-shift; i<kx && i>=0; i++) + if (x[i]>0) + return 1; //if there are nonzeros in x to the left of the first column of y, then x is bigger + for (i=kx-1+shift; i<ky; i++) + if (y[i]>0) + return 0; //if there are nonzeros in y to the left of the first column of x, then x is not bigger + for (i=k-1; i>=shift; i--) + if (x[i-shift]>y[i]) return 1; + else if (x[i-shift]<y[i]) return 0; + return 0; +} + +//is x > y? (x and y both nonnegative) +function greater(x,y) { + var i; + var k=(x.length<y.length) ? x.length : y.length; + + for (i=x.length;i<y.length;i++) + if (y[i]) + return 0; //y has more digits + + for (i=y.length;i<x.length;i++) + if (x[i]) + return 1; //x has more digits + + for (i=k-1;i>=0;i--) + if (x[i]>y[i]) + return 1; + else if (x[i]<y[i]) + return 0; + return 0; +} + +//divide_ x by y giving quotient q and remainder r. (q=floor(x/y), r=x mod y). All 4 are bigints. +//x must have at least one leading zero element. +//y must be nonzero. +//q and r must be arrays that are exactly the same length as x. +//the x array must have at least as many elements as y. +function divide_(x,y,q,r) { + var kx, ky; + var i,j,y1,y2,c,a,b; + copy_(r,x); + for (ky=y.length;y[ky-1]==0;ky--); //kx,ky is number of elements in x,y, not including leading zeros + for (kx=r.length;r[kx-1]==0 && kx>ky;kx--); + + //normalize: ensure the most significant element of y has its highest bit set + b=y[ky-1]; + for (a=0; b; a++) + b>>=1; + a=bpe-a; //a is how many bits to shift so that the high order bit of y is leftmost in its array element + leftShift_(y,a); //multiply both by 1<<a now, then divide_ both by that at the end + leftShift_(r,a); + + copyInt_(q,0); // q=0 + while (!greaterShift(y,r,kx-ky)) { // while (leftShift_(y,kx-ky) <= r) { + subShift_(r,y,kx-ky); // r=r-leftShift_(y,kx-ky) + q[kx-ky]++; // q[kx-ky]++; + } // } + + for (i=kx-1; i>=ky; i--) { + if (r[i]==y[ky-1]) + q[i-ky]=mask; + else + q[i-ky]=Math.floor((r[i]*radix+r[i-1])/y[ky-1]); + + //The following for(;;) loop is equivalent to the commented while loop, + //except that the uncommented version avoids overflow. + //The commented loop comes from HAC, which assumes r[-1]==y[-1]==0 + // while (q[i-ky]*(y[ky-1]*radix+y[ky-2]) > r[i]*radix*radix+r[i-1]*radix+r[i-2]) + // q[i-ky]--; + for (;;) { + y2=(ky>1 ? y[ky-2] : 0)*q[i-ky]; + c=y2>>bpe; + y2=y2 & mask; + y1=c+q[i-ky]*y[ky-1]; + c=y1>>bpe; + y1=y1 & mask; + + if (c==r[i] ? y1==r[i-1] ? y2>(i>1 ? r[i-2] : 0) : y1>r[i-1] : c>r[i]) + q[i-ky]--; + else + break; + } + + linCombShift_(r,y,-q[i-ky],i-ky); //r=r-q[i-ky]*leftShift_(y,i-ky) + if (negative(r)) { + addShift_(r,y,i-ky); //r=r+leftShift_(y,i-ky) + q[i-ky]--; + } + } + + rightShift_(y,a); //undo the normalization step + rightShift_(r,a); //undo the normalization step +} + +//do carries and borrows so each element of the bigInt x fits in bpe bits. +function carry_(x) { + var i,k,c,b; + k=x.length; + c=0; + for (i=0;i<k;i++) { + c+=x[i]; + b=0; + if (c<0) { + b=-(c>>bpe); + c+=b*radix; + } + x[i]=c & mask; + c=(c>>bpe)-b; + } +} + +//return x mod n for bigInt x and integer n. +function modInt(x,n) { + var i,c=0; + for (i=x.length-1; i>=0; i--) + c=(c*radix+x[i])%n; + return c; +} + +//convert the integer t into a bigInt with at least the given number of bits. +//the returned array stores the bigInt in bpe-bit chunks, little endian (buff[0] is least significant word) +//Pad the array with leading zeros so that it has at least minSize elements. +//There will always be at least one leading 0 element. +function int2bigInt(t,bits,minSize) { + var i,k; + k=Math.ceil(bits/bpe)+1; + k=minSize>k ? minSize : k; + buff=new Array(k); + copyInt_(buff,t); + return buff; +} + +//return the bigInt given a string representation in a given base. +//Pad the array with leading zeros so that it has at least minSize elements. +//If base=-1, then it reads in a space-separated list of array elements in decimal. +//The array will always have at least one leading zero, unless base=-1. +function str2bigInt(s,base,minSize) { + var d, i, j, x, y, kk; + var k=s.length; + if (base==-1) { //comma-separated list of array elements in decimal + x=new Array(0); + for (;;) { + y=new Array(x.length+1); + for (i=0;i<x.length;i++) + y[i+1]=x[i]; + y[0]=parseInt(s,10); + x=y; + d=s.indexOf(',',0); + if (d<1) + break; + s=s.substring(d+1); + if (s.length==0) + break; + } + if (x.length<minSize) { + y=new Array(minSize); + copy_(y,x); + return y; + } + return x; + } + + x=int2bigInt(0,base*k,0); + for (i=0;i<k;i++) { + d=digitsStr.indexOf(s.substring(i,i+1),0); + if (base<=36 && d>=36) //convert lowercase to uppercase if base<=36 + d-=26; + if (d<base && d>=0) { //ignore illegal characters + multInt_(x,base); + addInt_(x,d); + } + } + + for (k=x.length;k>0 && !x[k-1];k--); //strip off leading zeros + k=minSize>k+1 ? minSize : k+1; + y=new Array(k); + kk=k<x.length ? k : x.length; + for (i=0;i<kk;i++) + y[i]=x[i]; + for (;i<k;i++) + y[i]=0; + return y; +} + +//is bigint x equal to integer y? +//y must have less than bpe bits +function equalsInt(x,y) { + var i; + if (x[0]!=y) + return 0; + for (i=1;i<x.length;i++) + if (x[i]) + return 0; + return 1; +} + +//are bigints x and y equal? +//this works even if x and y are different lengths and have arbitrarily many leading zeros +function equals(x,y) { + var i; + var k=x.length<y.length ? x.length : y.length; + for (i=0;i<k;i++) + if (x[i]!=y[i]) + return 0; + if (x.length>y.length) { + for (;i<x.length;i++) + if (x[i]) + return 0; + } else { + for (;i<y.length;i++) + if (y[i]) + return 0; + } + return 1; +} + +//is the bigInt x equal to zero? +function isZero(x) { + var i; + for (i=0;i<x.length;i++) + if (x[i]) + return 0; + return 1; +} + +//convert a bigInt into a string in a given base, from base 2 up to base 95. +//Base -1 prints the contents of the array representing the number. +function bigInt2str(x,base) { + var i,t,s=""; + + if (s6.length!=x.length) + s6=dup(x); + else + copy_(s6,x); + + if (base==-1) { //return the list of array contents + for (i=x.length-1;i>0;i--) + s+=x[i]+','; + s+=x[0]; + } + else { //return it in the given base + while (!isZero(s6)) { + t=divInt_(s6,base); //t=s6 % base; s6=floor(s6/base); + s=digitsStr.substring(t,t+1)+s; + } + } + if (s.length==0) + s="0"; + return s; +} + +//returns a duplicate of bigInt x +function dup(x) { + var i; + buff=new Array(x.length); + copy_(buff,x); + return buff; +} + +//do x=y on bigInts x and y. x must be an array at least as big as y (not counting the leading zeros in y). +function copy_(x,y) { + var i; + var k=x.length<y.length ? x.length : y.length; + for (i=0;i<k;i++) + x[i]=y[i]; + for (i=k;i<x.length;i++) + x[i]=0; +} + +//do x=y on bigInt x and integer y. +function copyInt_(x,n) { + var i,c; + for (c=n,i=0;i<x.length;i++) { + x[i]=c & mask; + c>>=bpe; + } +} + +//do x=x+n where x is a bigInt and n is an integer. +//x must be large enough to hold the result. +function addInt_(x,n) { + var i,k,c,b; + x[0]+=n; + k=x.length; + c=0; + for (i=0;i<k;i++) { + c+=x[i]; + b=0; + if (c<0) { + b=-(c>>bpe); + c+=b*radix; + } + x[i]=c & mask; + c=(c>>bpe)-b; + if (!c) return; //stop carrying as soon as the carry_ is zero + } +} + +//right shift bigInt x by n bits. 0 <= n < bpe. +function rightShift_(x,n) { + var i; + var k=Math.floor(n/bpe); + if (k) { + for (i=0;i<x.length-k;i++) //right shift x by k elements + x[i]=x[i+k]; + for (;i<x.length;i++) + x[i]=0; + n%=bpe; + } + for (i=0;i<x.length-1;i++) { + x[i]=mask & ((x[i+1]<<(bpe-n)) | (x[i]>>n)); + } + x[i]>>=n; +} + +//do x=floor(|x|/2)*sgn(x) for bigInt x in 2's complement +function halve_(x) { + var i; + for (i=0;i<x.length-1;i++) { + x[i]=mask & ((x[i+1]<<(bpe-1)) | (x[i]>>1)); + } + x[i]=(x[i]>>1) | (x[i] & (radix>>1)); //most significant bit stays the same +} + +//left shift bigInt x by n bits. +function leftShift_(x,n) { + var i; + var k=Math.floor(n/bpe); + if (k) { + for (i=x.length; i>=k; i--) //left shift x by k elements + x[i]=x[i-k]; + for (;i>=0;i--) + x[i]=0; + n%=bpe; + } + if (!n) + return; + for (i=x.length-1;i>0;i--) { + x[i]=mask & ((x[i]<<n) | (x[i-1]>>(bpe-n))); + } + x[i]=mask & (x[i]<<n); +} + +//do x=x*n where x is a bigInt and n is an integer. +//x must be large enough to hold the result. +function multInt_(x,n) { + var i,k,c,b; + if (!n) + return; + k=x.length; + c=0; + for (i=0;i<k;i++) { + c+=x[i]*n; + b=0; + if (c<0) { + b=-(c>>bpe); + c+=b*radix; + } + x[i]=c & mask; + c=(c>>bpe)-b; + } +} + +//do x=floor(x/n) for bigInt x and integer n, and return the remainder +function divInt_(x,n) { + var i,r=0,s; + for (i=x.length-1;i>=0;i--) { + s=r*radix+x[i]; + x[i]=Math.floor(s/n); + r=s%n; + } + return r; +} + +//do the linear combination x=a*x+b*y for bigInts x and y, and integers a and b. +//x must be large enough to hold the answer. +function linComb_(x,y,a,b) { + var i,c,k,kk; + k=x.length<y.length ? x.length : y.length; + kk=x.length; + for (c=0,i=0;i<k;i++) { + c+=a*x[i]+b*y[i]; + x[i]=c & mask; + c>>=bpe; + } + for (i=k;i<kk;i++) { + c+=a*x[i]; + x[i]=c & mask; + c>>=bpe; + } +} + +//do the linear combination x=a*x+b*(y<<(ys*bpe)) for bigInts x and y, and integers a, b and ys. +//x must be large enough to hold the answer. +function linCombShift_(x,y,b,ys) { + var i,c,k,kk; + k=x.length<ys+y.length ? x.length : ys+y.length; + kk=x.length; + for (c=0,i=ys;i<k;i++) { + c+=x[i]+b*y[i-ys]; + x[i]=c & mask; + c>>=bpe; + } + for (i=k;c && i<kk;i++) { + c+=x[i]; + x[i]=c & mask; + c>>=bpe; + } +} + +//do x=x+(y<<(ys*bpe)) for bigInts x and y, and integers a,b and ys. +//x must be large enough to hold the answer. +function addShift_(x,y,ys) { + var i,c,k,kk; + k=x.length<ys+y.length ? x.length : ys+y.length; + kk=x.length; + for (c=0,i=ys;i<k;i++) { + c+=x[i]+y[i-ys]; + x[i]=c & mask; + c>>=bpe; + } + for (i=k;c && i<kk;i++) { + c+=x[i]; + x[i]=c & mask; + c>>=bpe; + } +} + +//do x=x-(y<<(ys*bpe)) for bigInts x and y, and integers a,b and ys. +//x must be large enough to hold the answer. +function subShift_(x,y,ys) { + var i,c,k,kk; + k=x.length<ys+y.length ? x.length : ys+y.length; + kk=x.length; + for (c=0,i=ys;i<k;i++) { + c+=x[i]-y[i-ys]; + x[i]=c & mask; + c>>=bpe; + } + for (i=k;c && i<kk;i++) { + c+=x[i]; + x[i]=c & mask; + c>>=bpe; + } +} + +//do x=x-y for bigInts x and y. +//x must be large enough to hold the answer. +//negative answers will be 2s complement +function sub_(x,y) { + var i,c,k,kk; + k=x.length<y.length ? x.length : y.length; + for (c=0,i=0;i<k;i++) { + c+=x[i]-y[i]; + x[i]=c & mask; + c>>=bpe; + } + for (i=k;c && i<x.length;i++) { + c+=x[i]; + x[i]=c & mask; + c>>=bpe; + } +} + +//do x=x+y for bigInts x and y. +//x must be large enough to hold the answer. +function add_(x,y) { + var i,c,k,kk; + k=x.length<y.length ? x.length : y.length; + for (c=0,i=0;i<k;i++) { + c+=x[i]+y[i]; + x[i]=c & mask; + c>>=bpe; + } + for (i=k;c && i<x.length;i++) { + c+=x[i]; + x[i]=c & mask; + c>>=bpe; + } +} + +//do x=x*y for bigInts x and y. This is faster when y<x. +function mult_(x,y) { + var i; + if (ss.length!=2*x.length) + ss=new Array(2*x.length); + copyInt_(ss,0); + for (i=0;i<y.length;i++) + if (y[i]) + linCombShift_(ss,x,y[i],i); //ss=1*ss+y[i]*(x<<(i*bpe)) + copy_(x,ss); +} + +//do x=x mod n for bigInts x and n. +function mod_(x,n) { + if (s4.length!=x.length) + s4=dup(x); + else + copy_(s4,x); + if (s5.length!=x.length) + s5=dup(x); + divide_(s4,n,s5,x); //x = remainder of s4 / n +} + +//do x=x*y mod n for bigInts x,y,n. +//for greater speed, let y<x. +function multMod_(x,y,n) { + var i; + if (s0.length!=2*x.length) + s0=new Array(2*x.length); + copyInt_(s0,0); + for (i=0;i<y.length;i++) + if (y[i]) + linCombShift_(s0,x,y[i],i); //s0=1*s0+y[i]*(x<<(i*bpe)) + mod_(s0,n); + copy_(x,s0); +} + +//do x=x*x mod n for bigInts x,n. +function squareMod_(x,n) { + var i,j,d,c,kx,kn,k; + for (kx=x.length; kx>0 && !x[kx-1]; kx--); //ignore leading zeros in x + k=kx>n.length ? 2*kx : 2*n.length; //k=# elements in the product, which is twice the elements in the larger of x and n + if (s0.length!=k) + s0=new Array(k); + copyInt_(s0,0); + for (i=0;i<kx;i++) { + c=s0[2*i]+x[i]*x[i]; + s0[2*i]=c & mask; + c>>=bpe; + for (j=i+1;j<kx;j++) { + c=s0[i+j]+2*x[i]*x[j]+c; + s0[i+j]=(c & mask); + c>>=bpe; + } + s0[i+kx]=c; + } + mod_(s0,n); + copy_(x,s0); +} + +//return x with exactly k leading zero elements +function trim(x,k) { + var i,y; + for (i=x.length; i>0 && !x[i-1]; i--); + y=new Array(i+k); + copy_(y,x); + return y; +} + +//do x=x**y mod n, where x,y,n are bigInts and ** is exponentiation. 0**0=1. +//this is faster when n is odd. x usually needs to have as many elements as n. +function powMod_(x,y,n) { + var k1,k2,kn,np; + if(s7.length!=n.length) + s7=dup(n); + + //for even modulus, use a simple square-and-multiply algorithm, + //rather than using the more complex Montgomery algorithm. + if ((n[0]&1)==0) { + copy_(s7,x); + copyInt_(x,1); + while(!equalsInt(y,0)) { + if (y[0]&1) + multMod_(x,s7,n); + divInt_(y,2); + squareMod_(s7,n); + } + return; + } + + //calculate np from n for the Montgomery multiplications + copyInt_(s7,0); + for (kn=n.length;kn>0 && !n[kn-1];kn--); + np=radix-inverseModInt_(modInt(n,radix),radix); + s7[kn]=1; + multMod_(x ,s7,n); // x = x * 2**(kn*bp) mod n + + if (s3.length!=x.length) + s3=dup(x); + else + copy_(s3,x); + + for (k1=y.length-1;k1>0 & !y[k1]; k1--); //k1=first nonzero element of y + if (y[k1]==0) { //anything to the 0th power is 1 + copyInt_(x,1); + return; + } + for (k2=1<<(bpe-1);k2 && !(y[k1] & k2); k2>>=1); //k2=position of first 1 bit in y[k1] + for (;;) { + if (!(k2>>=1)) { //look at next bit of y + k1--; + if (k1<0) { + mont_(x,one,n,np); + return; + } + k2=1<<(bpe-1); + } + mont_(x,x,n,np); + + if (k2 & y[k1]) //if next bit is a 1 + mont_(x,s3,n,np); + } +} + +//do x=x*y*Ri mod n for bigInts x,y,n, +// where Ri = 2**(-kn*bpe) mod n, and kn is the +// number of elements in the n array, not +// counting leading zeros. +//x must be large enough to hold the answer. +//It's OK if x and y are the same variable. +//must have: +// x,y < n +// n is odd +// np = -(n^(-1)) mod radix +function mont_(x,y,n,np) { + var i,j,c,ui,t; + var kn=n.length; + var ky=y.length; + + if (sa.length!=kn) + sa=new Array(kn); + + for (;kn>0 && n[kn-1]==0;kn--); //ignore leading zeros of n + //this function sometimes gives wrong answers when the next line is uncommented + //for (;ky>0 && y[ky-1]==0;ky--); //ignore leading zeros of y + + copyInt_(sa,0); + + //the following loop consumes 95% of the runtime for randTruePrime_() and powMod_() for large keys + for (i=0; i<kn; i++) { + t=sa[0]+x[i]*y[0]; + ui=((t & mask) * np) & mask; //the inner "& mask" is needed on Macintosh MSIE, but not windows MSIE + c=(t+ui*n[0]) >> bpe; + t=x[i]; + + //do sa=(sa+x[i]*y+ui*n)/b where b=2**bpe + for (j=1;j<ky;j++) { + c+=sa[j]+t*y[j]+ui*n[j]; + sa[j-1]=c & mask; + c>>=bpe; + } + for (;j<kn;j++) { + c+=sa[j]+ui*n[j]; + sa[j-1]=c & mask; + c>>=bpe; + } + sa[j-1]=c & mask; + } + + if (!greater(n,sa)) + sub_(sa,n); + copy_(x,sa); +} + + + + +//############################################################################# +//############################################################################# +//############################################################################# +//############################################################################# +//############################################################################# +//############################################################################# +//############################################################################# + + + + + +//############################################################################# + +Clipperz.Crypto.BigInt = function (aValue, aBase) { + var base; + var value; + + if (typeof(aValue) == 'object') { + this._internalValue = aValue; + } else { + if (typeof(aValue) == 'undefined') { + value = "0"; + } else { + value = aValue + ""; + } + + if (typeof(aBase) == 'undefined') { + base = 10; + } else { + base = aBase; + } + + this._internalValue = str2bigInt(value, base, 1, 1); + } + + return this; +} + +//============================================================================= + +MochiKit.Base.update(Clipperz.Crypto.BigInt.prototype, { + + 'clone': function() { + return new Clipperz.Crypto.BigInt(this.internalValue()); + }, + + //------------------------------------------------------------------------- + + 'internalValue': function () { + return this._internalValue; + }, + + //------------------------------------------------------------------------- + + 'isBigInt': true, + + //------------------------------------------------------------------------- + + 'toString': function(aBase) { + return this.asString(aBase); + }, + + //------------------------------------------------------------------------- + + 'asString': function (aBase, minimumLength) { + var result; + var base; + + if (typeof(aBase) == 'undefined') { + base = 10; + } else { + base = aBase; + } + + result = bigInt2str(this.internalValue(), base).toLowerCase(); + + if ((typeof(minimumLength) != 'undefined') && (result.length < minimumLength)) { + var i, c; +//MochiKit.Logging.logDebug(">>> FIXING BigInt.asString length issue") + c = (minimumLength - result.length); + for (i=0; i<c; i++) { + result = '0' + result; + } + } + + return result; + }, + + //------------------------------------------------------------------------- + + 'asByteArray': function() { + return new Clipperz.ByteArray("0x" + this.asString(16), 16); + }, + + //------------------------------------------------------------------------- + + 'equals': function (aValue) { + var result; + + if (aValue.isBigInt) { + result = equals(this.internalValue(), aValue.internalValue()); + } else if (typeof(aValue) == "number") { + result = equalsInt(this.internalValue(), aValue); + } else { + throw Clipperz.Crypt.BigInt.exception.UnknownType; + } + + return result; + }, + + //------------------------------------------------------------------------- + + 'compare': function(aValue) { +/* + var result; + var thisAsString; + var aValueAsString; + + thisAsString = this.asString(10); + aValueAsString = aValue.asString(10); + + result = MochiKit.Base.compare(thisAsString.length, aValueAsString.length); + if (result == 0) { + result = MochiKit.Base.compare(thisAsString, aValueAsString); + } + + return result; +*/ + var result; + + if (equals(this.internalValue(), aValue.internalValue())) { + result = 0; + } else if (greater(this.internalValue(), aValue.internalValue())) { + result = 1; + } else { + result = -1; + } + + return result; + }, + + //------------------------------------------------------------------------- + + 'add': function (aValue) { + var result; + + if (aValue.isBigInt) { + result = add(this.internalValue(), aValue.internalValue()); + } else { + result = addInt(this.internalValue(), aValue); + } + + return new Clipperz.Crypto.BigInt(result); + }, + + //------------------------------------------------------------------------- + + 'subtract': function (aValue) { + var result; + var value; + + if (aValue.isBigInt) { + value = aValue; + } else { + value = new Clipperz.Crypto.BigInt(aValue); + } + + result = sub(this.internalValue(), value.internalValue()); + + return new Clipperz.Crypto.BigInt(result); + }, + + //------------------------------------------------------------------------- + + 'multiply': function (aValue, aModule) { + var result; + var value; + + if (aValue.isBigInt) { + value = aValue; + } else { + value = new Clipperz.Crypto.BigInt(aValue); + } + + if (typeof(aModule) == 'undefined') { + result = mult(this.internalValue(), value.internalValue()); + } else { + if (greater(this.internalValue(), value.internalValue())) { + result = multMod(this.internalValue(), value.internalValue(), aModule); + } else { + result = multMod(value.internalValue(), this.internalValue(), aModule); + } + } + + return new Clipperz.Crypto.BigInt(result); + }, + + //------------------------------------------------------------------------- + + 'module': function (aModule) { + var result; + var module; + + if (aModule.isBigInt) { + module = aModule; + } else { + module = new Clipperz.Crypto.BigInt(aModule); + } + + result = mod(this.internalValue(), module.internalValue()); + + return new Clipperz.Crypto.BigInt(result); + }, + + //------------------------------------------------------------------------- + + 'powerModule': function(aValue, aModule) { + var result; + var value; + var module; + + if (aValue.isBigInt) { + value = aValue; + } else { + value = new Clipperz.Crypto.BigInt(aValue); + } + + if (aModule.isBigInt) { + module = aModule; + } else { + module = new Clipperz.Crypto.BigInt(aModule); + } + + if (aValue == -1) { + result = inverseMod(this.internalValue(), module.internalValue()); + } else { + result = powMod(this.internalValue(), value.internalValue(), module.internalValue()); + } + + return new Clipperz.Crypto.BigInt(result); + }, + + //------------------------------------------------------------------------- + + 'xor': function(aValue) { + var result; + var thisByteArray; + var aValueByteArray; + var xorArray; + + thisByteArray = new Clipperz.ByteArray("0x" + this.asString(16), 16); + aValueByteArray = new Clipperz.ByteArray("0x" + aValue.asString(16), 16); + xorArray = thisByteArray.xorMergeWithBlock(aValueByteArray, 'right'); + result = new Clipperz.Crypto.BigInt(xorArray.toHexString(), 16); + + return result; + }, + + //------------------------------------------------------------------------- + + 'shiftLeft': function(aNumberOfBitsToShift) { + var result; + var internalResult; + var wholeByteToShift; + var bitsLeftToShift; + + wholeByteToShift = Math.floor(aNumberOfBitsToShift / 8); + bitsLeftToShift = aNumberOfBitsToShift % 8; + + if (wholeByteToShift == 0) { + internalResult = this.internalValue(); + } else { + var hexValue; + var i,c; + + hexValue = this.asString(16); + c = wholeByteToShift; + for (i=0; i<c; i++) { + hexValue += "00"; + } + internalResult = str2bigInt(hexValue, 16, 1, 1); + } + + if (bitsLeftToShift > 0) { + leftShift_(internalResult, bitsLeftToShift); + } + result = new Clipperz.Crypto.BigInt(internalResult); + + return result; + }, + + //------------------------------------------------------------------------- + + 'bitSize': function() { + return bitSize(this.internalValue()); + }, + + //------------------------------------------------------------------------- + + 'isBitSet': function(aBitPosition) { + var result; + + if (this.asByteArray().bitAtIndex(aBitPosition) == 0) { + result = false; + } else { + result = true; + }; + + return result; + }, + + //------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" + +}); + +//############################################################################# + +Clipperz.Crypto.BigInt.randomPrime = function(aBitSize) { + return new Clipperz.Crypto.BigInt(randTruePrime(aBitSize)); +} + +//############################################################################# +//############################################################################# + +Clipperz.Crypto.BigInt.ZERO = new Clipperz.Crypto.BigInt(0); + +//############################################################################# + +Clipperz.Crypto.BigInt.equals = function(a, b) { + return a.equals(b); +} + +Clipperz.Crypto.BigInt.add = function(a, b) { + return a.add(b); +} + +Clipperz.Crypto.BigInt.subtract = function(a, b) { + return a.subtract(b); +} + +Clipperz.Crypto.BigInt.multiply = function(a, b, module) { + return a.multiply(b, module); +} + +Clipperz.Crypto.BigInt.module = function(a, module) { + return a.module(module); +} + +Clipperz.Crypto.BigInt.powerModule = function(a, b, module) { + return a.powerModule(b, module); +} + +Clipperz.Crypto.BigInt.exception = { + UnknownType: new MochiKit.Base.NamedError("Clipperz.Crypto.BigInt.exception.UnknownType") +} diff --git a/frontend/gamma/js/ClipperzCryptoLibrary/BigInt_scoped.js b/frontend/gamma/js/ClipperzCryptoLibrary/BigInt_scoped.js new file mode 100644 index 0000000..bc60330 --- a/dev/null +++ b/frontend/gamma/js/ClipperzCryptoLibrary/BigInt_scoped.js @@ -0,0 +1,1644 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } +if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } + +if (typeof(Leemon) == 'undefined') { Leemon = {}; } +if (typeof(Baird.Crypto) == 'undefined') { Baird.Crypto = {}; } +if (typeof(Baird.Crypto.BigInt) == 'undefined') { Baird.Crypto.BigInt = {}; } + + +//############################################################################# +// Downloaded on March 05, 2007 from http://www.leemon.com/crypto/BigInt.js +//############################################################################# + +//////////////////////////////////////////////////////////////////////////////////////// +// Big Integer Library v. 5.0 +// Created 2000, last modified 2006 +// Leemon Baird +// www.leemon.com +// +// This file is public domain. You can use it for any purpose without restriction. +// I do not guarantee that it is correct, so use it at your own risk. If you use +// it for something interesting, I'd appreciate hearing about it. If you find +// any bugs or make any improvements, I'd appreciate hearing about those too. +// It would also be nice if my name and address were left in the comments. +// But none of that is required. +// +// This code defines a bigInt library for arbitrary-precision integers. +// A bigInt is an array of integers storing the value in chunks of bpe bits, +// little endian (buff[0] is the least significant word). +// Negative bigInts are stored two's complement. +// Some functions assume their parameters have at least one leading zero element. +// Functions with an underscore at the end of the name have unpredictable behavior in case of overflow, +// so the caller must make sure overflow won't happen. +// For each function where a parameter is modified, that same +// variable must not be used as another argument too. +// So, you cannot square x by doing multMod_(x,x,n). +// You must use squareMod_(x,n) instead, or do y=dup(x); multMod_(x,y,n). +// +// These functions are designed to avoid frequent dynamic memory allocation in the inner loop. +// For most functions, if it needs a BigInt as a local variable it will actually use +// a global, and will only allocate to it when it's not the right size. This ensures +// that when a function is called repeatedly with same-sized parameters, it only allocates +// memory on the first call. +// +// Note that for cryptographic purposes, the calls to Math.random() must +// be replaced with calls to a better pseudorandom number generator. +// +// In the following, "bigInt" means a bigInt with at least one leading zero element, +// and "integer" means a nonnegative integer less than radix. In some cases, integer +// can be negative. Negative bigInts are 2s complement. +// +// The following functions do not modify their inputs, but dynamically allocate memory every time they are called: +// +// function bigInt2str(x,base) //convert a bigInt into a string in a given base, from base 2 up to base 95 +// function dup(x) //returns a copy of bigInt x +// function findPrimes(n) //return array of all primes less than integer n +// function int2bigInt(t,n,m) //convert integer t to a bigInt with at least n bits and m array elements +// function str2bigInt(s,b,n,m) //convert string s in base b to a bigInt with at least n bits and m array elements +// function trim(x,k) //return a copy of x with exactly k leading zero elements +// +// The following functions do not modify their inputs, so there is never a problem with the result being too big: +// +// function bitSize(x) //returns how many bits long the bigInt x is, not counting leading zeros +// function equals(x,y) //is the bigInt x equal to the bigint y? +// function equalsInt(x,y) //is bigint x equal to integer y? +// function greater(x,y) //is x>y? (x and y are nonnegative bigInts) +// function greaterShift(x,y,shift)//is (x <<(shift*bpe)) > y? +// function isZero(x) //is the bigInt x equal to zero? +// function millerRabin(x,b) //does one round of Miller-Rabin base integer b say that bigInt x is possibly prime (as opposed to definitely composite)? +// function modInt(x,n) //return x mod n for bigInt x and integer n. +// function negative(x) //is bigInt x negative? +// +// The following functions do not modify their inputs, but allocate memory and call functions with underscores +// +// function add(x,y) //return (x+y) for bigInts x and y. +// function addInt(x,n) //return (x+n) where x is a bigInt and n is an integer. +// function expand(x,n) //return a copy of x with at least n elements, adding leading zeros if needed +// function inverseMod(x,n) //return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null +// function mod(x,n) //return a new bigInt equal to (x mod n) for bigInts x and n. +// function mult(x,y) //return x*y for bigInts x and y. This is faster when y<x. +// function multMod(x,y,n) //return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x. +// function powMod(x,y,n) //return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n. +// function randTruePrime(k) //return a new, random, k-bit, true prime using Maurer's algorithm. +// function sub(x,y) //return (x-y) for bigInts x and y. Negative answers will be 2s complement +// +// The following functions write a bigInt result to one of the parameters, but +// the result is never bigger than the original, so there can't be overflow problems: +// +// function divInt_(x,n) //do x=floor(x/n) for bigInt x and integer n, and return the remainder +// function GCD_(x,y) //set x to the greatest common divisor of bigInts x and y, (y is destroyed). +// function halve_(x) //do x=floor(|x|/2)*sgn(x) for bigInt x in 2's complement +// function mod_(x,n) //do x=x mod n for bigInts x and n. +// function rightShift_(x,n) //right shift bigInt x by n bits. 0 <= n < bpe. +// +// The following functions write a bigInt result to one of the parameters. The caller is responsible for +// ensuring it is large enough to hold the result. +// +// function addInt_(x,n) //do x=x+n where x is a bigInt and n is an integer +// function add_(x,y) //do x=x+y for bigInts x and y +// function addShift_(x,y,ys) //do x=x+(y<<(ys*bpe)) +// function copy_(x,y) //do x=y on bigInts x and y +// function copyInt_(x,n) //do x=n on bigInt x and integer n +// function carry_(x) //do carries and borrows so each element of the bigInt x fits in bpe bits. +// function divide_(x,y,q,r) //divide_ x by y giving quotient q and remainder r +// function eGCD_(x,y,d,a,b) //sets a,b,d to positive big integers such that d = GCD_(x,y) = a*x-b*y +// function inverseMod_(x,n) //do x=x**(-1) mod n, for bigInts x and n. Returns 1 (0) if inverse does (doesn't) exist +// function inverseModInt_(x,n) //return x**(-1) mod n, for integers x and n. Return 0 if there is no inverse +// function leftShift_(x,n) //left shift bigInt x by n bits. n<bpe. +// function linComb_(x,y,a,b) //do x=a*x+b*y for bigInts x and y and integers a and b +// function linCombShift_(x,y,b,ys) //do x=x+b*(y<<(ys*bpe)) for bigInts x and y, and integers b and ys +// function mont_(x,y,n,np) //Montgomery multiplication (see comments where the function is defined) +// function mult_(x,y) //do x=x*y for bigInts x and y. +// function multInt_(x,n) //do x=x*n where x is a bigInt and n is an integer. +// function multMod_(x,y,n) //do x=x*y mod n for bigInts x,y,n. +// function powMod_(x,y,n) //do x=x**y mod n, where x,y,n are bigInts (n is odd) and ** is exponentiation. 0**0=1. +// function randBigInt_(b,n,s) //do b = an n-bit random BigInt. if s=1, then nth bit (most significant bit) is set to 1. n>=1. +// function randTruePrime_(ans,k) //do ans = a random k-bit true random prime (not just probable prime) with 1 in the msb. +// function squareMod_(x,n) //do x=x*x mod n for bigInts x,n +// function sub_(x,y) //do x=x-y for bigInts x and y. Negative answers will be 2s complement. +// function subShift_(x,y,ys) //do x=x-(y<<(ys*bpe)). Negative answers will be 2s complement. +// +// The following functions are based on algorithms from the _Handbook of Applied Cryptography_ +// powMod_() = algorithm 14.94, Montgomery exponentiation +// eGCD_,inverseMod_() = algorithm 14.61, Binary extended GCD_ +// GCD_() = algorothm 14.57, Lehmer's algorithm +// mont_() = algorithm 14.36, Montgomery multiplication +// divide_() = algorithm 14.20 Multiple-precision division +// squareMod_() = algorithm 14.16 Multiple-precision squaring +// randTruePrime_() = algorithm 4.62, Maurer's algorithm +// millerRabin() = algorithm 4.24, Miller-Rabin algorithm +// +// Profiling shows: +// randTruePrime_() spends: +// 10% of its time in calls to powMod_() +// 85% of its time in calls to millerRabin() +// millerRabin() spends: +// 99% of its time in calls to powMod_() (always with a base of 2) +// powMod_() spends: +// 94% of its time in calls to mont_() (almost always with x==y) +// +// This suggests there are several ways to speed up this library slightly: +// - convert powMod_ to use a Montgomery form of k-ary window (or maybe a Montgomery form of sliding window) +// -- this should especially focus on being fast when raising 2 to a power mod n +// - convert randTruePrime_() to use a minimum r of 1/3 instead of 1/2 with the appropriate change to the test +// - tune the parameters in randTruePrime_(), including c, m, and recLimit +// - speed up the single loop in mont_() that takes 95% of the runtime, perhaps by reducing checking +// within the loop when all the parameters are the same length. +// +// There are several ideas that look like they wouldn't help much at all: +// - replacing trial division in randTruePrime_() with a sieve (that speeds up something taking almost no time anyway) +// - increase bpe from 15 to 30 (that would help if we had a 32*32->64 multiplier, but not with JavaScript's 32*32->32) +// - speeding up mont_(x,y,n,np) when x==y by doing a non-modular, non-Montgomery square +// followed by a Montgomery reduction. The intermediate answer will be twice as long as x, so that +// method would be slower. This is unfortunate because the code currently spends almost all of its time +// doing mont_(x,x,...), both for randTruePrime_() and powMod_(). A faster method for Montgomery squaring +// would have a large impact on the speed of randTruePrime_() and powMod_(). HAC has a couple of poorly-worded +// sentences that seem to imply it's faster to do a non-modular square followed by a single +// Montgomery reduction, but that's obviously wrong. +//////////////////////////////////////////////////////////////////////////////////////// + +// +// The whole library has been moved into the Baird.Crypto.BigInt scope by Giulio Cesare Solaroli <giulio.cesare@clipperz.com> +// +Baird.Crypto.BigInt.VERSION = "5.0"; +Baird.Crypto.BigInt.NAME = "Baird.Crypto.BigInt"; + +MochiKit.Base.update(Baird.Crypto.BigInt, { + //globals + 'bpe': 0, //bits stored per array element + 'mask': 0, //AND this with an array element to chop it down to bpe bits + 'radix': Baird.Crypto.BigInt.mask + 1, //equals 2^bpe. A single 1 bit to the left of the last bit of mask. + + //the digits for converting to different bases + 'digitsStr': '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_=!@#$%^&*()[]{}|;:,.<>/?`~ \\\'\"+-', + +//initialize the global variables +for (bpe=0; (1<<(bpe+1)) > (1<<bpe); bpe++); //bpe=number of bits in the mantissa on this platform +bpe>>=1; //bpe=number of bits in one element of the array representing the bigInt +mask=(1<<bpe)-1; //AND the mask with an integer to get its bpe least significant bits +radix=mask+1; //2^bpe. a single 1 bit to the left of the first bit of mask +one=int2bigInt(1,1,1); //constant used in powMod_() + +//the following global variables are scratchpad memory to +//reduce dynamic memory allocation in the inner loop +t=new Array(0); +ss=t; //used in mult_() +s0=t; //used in multMod_(), squareMod_() +s1=t; //used in powMod_(), multMod_(), squareMod_() +s2=t; //used in powMod_(), multMod_() +s3=t; //used in powMod_() +s4=t; s5=t; //used in mod_() +s6=t; //used in bigInt2str() +s7=t; //used in powMod_() +T=t; //used in GCD_() +sa=t; //used in mont_() +mr_x1=t; mr_r=t; mr_a=t; //used in millerRabin() +eg_v=t; eg_u=t; eg_A=t; eg_B=t; eg_C=t; eg_D=t; //used in eGCD_(), inverseMod_() +md_q1=t; md_q2=t; md_q3=t; md_r=t; md_r1=t; md_r2=t; md_tt=t; //used in mod_() + +primes=t; pows=t; s_i=t; s_i2=t; s_R=t; s_rm=t; s_q=t; s_n1=t; + s_a=t; s_r2=t; s_n=t; s_b=t; s_d=t; s_x1=t; s_x2=t, s_aa=t; //used in randTruePrime_() + +//////////////////////////////////////////////////////////////////////////////////////// + + //return array of all primes less than integer n + 'findPrimes': function(n) { + var i,s,p,ans; + s=new Array(n); + for (i=0;i<n;i++) + s[i]=0; + s[0]=2; + p=0; //first p elements of s are primes, the rest are a sieve + for(;s[p]<n;) { //s[p] is the pth prime + for(i=s[p]*s[p]; i<n; i+=s[p]) //mark multiples of s[p] + s[i]=1; + p++; + s[p]=s[p-1]+1; + for(; s[p]<n && s[s[p]]; s[p]++); //find next prime (where s[p]==0) + } + ans=new Array(p); + for(i=0;i<p;i++) + ans[i]=s[i]; + return ans; + }, + + //does a single round of Miller-Rabin base b consider x to be a possible prime? + //x is a bigInt, and b is an integer + 'millerRabin': function(x,b) { + var i,j,k,s; + + if (mr_x1.length!=x.length) { + mr_x1=dup(x); + mr_r=dup(x); + mr_a=dup(x); + } + + copyInt_(mr_a,b); + copy_(mr_r,x); + copy_(mr_x1,x); + + addInt_(mr_r,-1); + addInt_(mr_x1,-1); + + //s=the highest power of two that divides mr_r + k=0; + for (i=0;i<mr_r.length;i++) + for (j=1;j<mask;j<<=1) + if (x[i] & j) { + s=(k<mr_r.length+bpe ? k : 0); + i=mr_r.length; + j=mask; + } else + k++; + + if (s) + rightShift_(mr_r,s); + + powMod_(mr_a,mr_r,x); + + if (!equalsInt(mr_a,1) && !equals(mr_a,mr_x1)) { + j=1; + while (j<=s-1 && !equals(mr_a,mr_x1)) { + squareMod_(mr_a,x); + if (equalsInt(mr_a,1)) { + return 0; + } + j++; + } + if (!equals(mr_a,mr_x1)) { + return 0; + } + } + + return 1; + }, + + //returns how many bits long the bigInt is, not counting leading zeros. + 'bitSize': function(x) { + var j,z,w; + for (j=x.length-1; (x[j]==0) && (j>0); j--); + for (z=0,w=x[j]; w; (w>>=1),z++); + z+=bpe*j; + return z; + }, + + //return a copy of x with at least n elements, adding leading zeros if needed + 'expand': function(x,n) { + var ans=int2bigInt(0,(x.length>n ? x.length : n)*bpe,0); + copy_(ans,x); + return ans; + }, + + //return a k-bit true random prime using Maurer's algorithm. + 'randTruePrime': function(k) { + var ans=int2bigInt(0,k,0); + randTruePrime_(ans,k); + return trim(ans,1); + }, + + //return a new bigInt equal to (x mod n) for bigInts x and n. + 'mod': function(x,n) { + var ans=dup(x); + mod_(ans,n); + return trim(ans,1); + }, + + //return (x+n) where x is a bigInt and n is an integer. + 'addInt': function(x,n) { + var ans=expand(x,x.length+1); + addInt_(ans,n); + return trim(ans,1); + }, + + //return x*y for bigInts x and y. This is faster when y<x. + 'mult': function(x,y) { + var ans=expand(x,x.length+y.length); + mult_(ans,y); + return trim(ans,1); + }, + + //return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n. + 'powMod': function(x,y,n) { + var ans=expand(x,n.length); + powMod_(ans,trim(y,2),trim(n,2),0); //this should work without the trim, but doesn't + return trim(ans,1); + }, + + //return (x-y) for bigInts x and y. Negative answers will be 2s complement + 'sub': function(x,y) { + var ans=expand(x,(x.length>y.length ? x.length+1 : y.length+1)); + sub_(ans,y); + return trim(ans,1); + }, + + //return (x+y) for bigInts x and y. + 'add': function(x,y) { + var ans=expand(x,(x.length>y.length ? x.length+1 : y.length+1)); + add_(ans,y); + return trim(ans,1); + }, + + //return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null + 'inverseMod': function(x,n) { + var ans=expand(x,n.length); + var s; + s=inverseMod_(ans,n); + return s ? trim(ans,1) : null; + }, + + //return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x. + 'multMod': function(x,y,n) { + var ans=expand(x,n.length); + multMod_(ans,y,n); + return trim(ans,1); + }, + + //generate a k-bit true random prime using Maurer's algorithm, + //and put it into ans. The bigInt ans must be large enough to hold it. + 'randTruePrime_': function(ans,k) { + var c,m,pm,dd,j,r,B,divisible,z,zz,recSize; + + if (primes.length==0) + primes=findPrimes(30000); //check for divisibility by primes <=30000 + + if (pows.length==0) { + pows=new Array(512); + for (j=0;j<512;j++) { + pows[j]=Math.pow(2,j/511.-1.); + } + } + + //c and m should be tuned for a particular machine and value of k, to maximize speed + //this was: c=primes[primes.length-1]/k/k; //check using all the small primes. (c=0.1 in HAC) + c=0.1; + m=20; //generate this k-bit number by first recursively generating a number that has between k/2 and k-m bits + recLimit=20; /*must be at least 2 (was 29)*/ //stop recursion when k <=recLimit + + if (s_i2.length!=ans.length) { + s_i2=dup(ans); + s_R =dup(ans); + s_n1=dup(ans); + s_r2=dup(ans); + s_d =dup(ans); + s_x1=dup(ans); + s_x2=dup(ans); + s_b =dup(ans); + s_n =dup(ans); + s_i =dup(ans); + s_rm=dup(ans); + s_q =dup(ans); + s_a =dup(ans); + s_aa=dup(ans); + } + + if (k <= recLimit) { //generate small random primes by trial division up to its square root + pm=(1<<((k+2)>>1))-1; //pm is binary number with all ones, just over sqrt(2^k) + copyInt_(ans,0); + for (dd=1;dd;) { + dd=0; + ans[0]= 1 | (1<<(k-1)) | Math.floor(Math.random()*(1<<k)); //random, k-bit, odd integer, with msb 1 + for (j=1;(j<primes.length) && ((primes[j]&pm)==primes[j]);j++) { //trial division by all primes 3...sqrt(2^k) + if (0==(ans[0]%primes[j])) { + dd=1; + break; + } + } + } + carry_(ans); + return; + } + + B=c*k*k; //try small primes up to B (or all the primes[] array if the largest is less than B). + if (k>2*m) //generate this k-bit number by first recursively generating a number that has between k/2 and k-m bits + for (r=1; k-k*r<=m; ) + r=pows[Math.floor(Math.random()*512)]; //r=Math.pow(2,Math.random()-1); + else + r=.5; + + //simulation suggests the more complex algorithm using r=.333 is only slightly faster. + + recSize=Math.floor(r*k)+1; + + randTruePrime_(s_q,recSize); + copyInt_(s_i2,0); + s_i2[Math.floor((k-2)/bpe)] |= (1<<((k-2)%bpe)); //s_i2=2^(k-2) + divide_(s_i2,s_q,s_i,s_rm); //s_i=floor((2^(k-1))/(2q)) + + z=bitSize(s_i); + + for (;;) { + for (;;) { //generate z-bit numbers until one falls in the range [0,s_i-1] + randBigInt_(s_R,z,0); + if (greater(s_i,s_R)) + break; + } //now s_R is in the range [0,s_i-1] + addInt_(s_R,1); //now s_R is in the range [1,s_i] + add_(s_R,s_i); //now s_R is in the range [s_i+1,2*s_i] + + copy_(s_n,s_q); + mult_(s_n,s_R); + multInt_(s_n,2); + addInt_(s_n,1); //s_n=2*s_R*s_q+1 + + copy_(s_r2,s_R); + multInt_(s_r2,2); //s_r2=2*s_R + + //check s_n for divisibility by small primes up to B + for (divisible=0,j=0; (j<primes.length) && (primes[j]<B); j++) + if (modInt(s_n,primes[j])==0) { + divisible=1; + break; + } + + if (!divisible) //if it passes small primes check, then try a single Miller-Rabin base 2 + if (!millerRabin(s_n,2)) //this line represents 75% of the total runtime for randTruePrime_ + divisible=1; + + if (!divisible) { //if it passes that test, continue checking s_n + addInt_(s_n,-3); + for (j=s_n.length-1;(s_n[j]==0) && (j>0); j--); //strip leading zeros + for (zz=0,w=s_n[j]; w; (w>>=1),zz++); + zz+=bpe*j; //zz=number of bits in s_n, ignoring leading zeros + for (;;) { //generate z-bit numbers until one falls in the range [0,s_n-1] + randBigInt_(s_a,zz,0); + if (greater(s_n,s_a)) + break; + } //now s_a is in the range [0,s_n-1] + addInt_(s_n,3); //now s_a is in the range [0,s_n-4] + addInt_(s_a,2); //now s_a is in the range [2,s_n-2] + copy_(s_b,s_a); + copy_(s_n1,s_n); + addInt_(s_n1,-1); + powMod_(s_b,s_n1,s_n); //s_b=s_a^(s_n-1) modulo s_n + addInt_(s_b,-1); + if (isZero(s_b)) { + copy_(s_b,s_a); + powMod_(s_b,s_r2,s_n); + addInt_(s_b,-1); + copy_(s_aa,s_n); + copy_(s_d,s_b); + GCD_(s_d,s_n); //if s_b and s_n are relatively prime, then s_n is a prime + if (equalsInt(s_d,1)) { + copy_(ans,s_aa); + return; //if we've made it this far, then s_n is absolutely guaranteed to be prime + } + } + } + } + }, + + //set b to an n-bit random BigInt. If s=1, then nth bit (most significant bit) is set to 1. + //array b must be big enough to hold the result. Must have n>=1 + 'randBigInt_': function(b,n,s) { + var i,a; + for (i=0;i<b.length;i++) + b[i]=0; + a=Math.floor((n-1)/bpe)+1; //# array elements to hold the BigInt + for (i=0;i<a;i++) { + b[i]=Math.floor(Math.random()*(1<<(bpe-1))); + } + b[a-1] &= (2<<((n-1)%bpe))-1; + if (s) + b[a-1] |= (1<<((n-1)%bpe)); + }, + + //set x to the greatest common divisor of x and y. + //x,y are bigInts with the same number of elements. y is destroyed. + 'GCD_': function(x,y) { + var i,xp,yp,A,B,C,D,q,sing; + if (T.length!=x.length) + T=dup(x); + + sing=1; + while (sing) { //while y has nonzero elements other than y[0] + sing=0; + for (i=1;i<y.length;i++) //check if y has nonzero elements other than 0 + if (y[i]) { + sing=1; + break; + } + if (!sing) break; //quit when y all zero elements except possibly y[0] + + for (i=x.length;!x[i] && i>=0;i--); //find most significant element of x + xp=x[i]; + yp=y[i]; + A=1; B=0; C=0; D=1; + while ((yp+C) && (yp+D)) { + q =Math.floor((xp+A)/(yp+C)); + qp=Math.floor((xp+B)/(yp+D)); + if (q!=qp) + break; + t= A-q*C; A=C; C=t; // do (A,B,xp, C,D,yp) = (C,D,yp, A,B,xp) - q*(0,0,0, C,D,yp) + t= B-q*D; B=D; D=t; + t=xp-q*yp; xp=yp; yp=t; + } + if (B) { + copy_(T,x); + linComb_(x,y,A,B); //x=A*x+B*y + linComb_(y,T,D,C); //y=D*y+C*T + } else { + mod_(x,y); + copy_(T,x); + copy_(x,y); + copy_(y,T); + } + } + if (y[0]==0) + return; + t=modInt(x,y[0]); + copyInt_(x,y[0]); + y[0]=t; + while (y[0]) { + x[0]%=y[0]; + t=x[0]; x[0]=y[0]; y[0]=t; + } + }, + +//do x=x**(-1) mod n, for bigInts x and n. +//If no inverse exists, it sets x to zero and returns 0, else it returns 1. +//The x array must be at least as large as the n array. +function inverseMod_(x,n) { + var k=1+2*Math.max(x.length,n.length); + + if(!(x[0]&1) && !(n[0]&1)) { //if both inputs are even, then inverse doesn't exist + copyInt_(x,0); + return 0; + } + + if (eg_u.length!=k) { + eg_u=new Array(k); + eg_v=new Array(k); + eg_A=new Array(k); + eg_B=new Array(k); + eg_C=new Array(k); + eg_D=new Array(k); + } + + copy_(eg_u,x); + copy_(eg_v,n); + copyInt_(eg_A,1); + copyInt_(eg_B,0); + copyInt_(eg_C,0); + copyInt_(eg_D,1); + for (;;) { + while(!(eg_u[0]&1)) { //while eg_u is even + halve_(eg_u); + if (!(eg_A[0]&1) && !(eg_B[0]&1)) { //if eg_A==eg_B==0 mod 2 + halve_(eg_A); + halve_(eg_B); + } else { + add_(eg_A,n); halve_(eg_A); + sub_(eg_B,x); halve_(eg_B); + } + } + + while (!(eg_v[0]&1)) { //while eg_v is even + halve_(eg_v); + if (!(eg_C[0]&1) && !(eg_D[0]&1)) { //if eg_C==eg_D==0 mod 2 + halve_(eg_C); + halve_(eg_D); + } else { + add_(eg_C,n); halve_(eg_C); + sub_(eg_D,x); halve_(eg_D); + } + } + + if (!greater(eg_v,eg_u)) { //eg_v <= eg_u + sub_(eg_u,eg_v); + sub_(eg_A,eg_C); + sub_(eg_B,eg_D); + } else { //eg_v > eg_u + sub_(eg_v,eg_u); + sub_(eg_C,eg_A); + sub_(eg_D,eg_B); + } + + if (equalsInt(eg_u,0)) { + if (negative(eg_C)) //make sure answer is nonnegative + add_(eg_C,n); + copy_(x,eg_C); + + if (!equalsInt(eg_v,1)) { //if GCD_(x,n)!=1, then there is no inverse + copyInt_(x,0); + return 0; + } + return 1; + } + } +} + +//return x**(-1) mod n, for integers x and n. Return 0 if there is no inverse +function inverseModInt_(x,n) { + var a=1,b=0,t; + for (;;) { + if (x==1) return a; + if (x==0) return 0; + b-=a*Math.floor(n/x); + n%=x; + + if (n==1) return b; //to avoid negatives, change this b to n-b, and each -= to += + if (n==0) return 0; + a-=b*Math.floor(x/n); + x%=n; + } +} + +//Given positive bigInts x and y, change the bigints v, a, and b to positive bigInts such that: +// v = GCD_(x,y) = a*x-b*y +//The bigInts v, a, b, must have exactly as many elements as the larger of x and y. +function eGCD_(x,y,v,a,b) { + var g=0; + var k=Math.max(x.length,y.length); + if (eg_u.length!=k) { + eg_u=new Array(k); + eg_A=new Array(k); + eg_B=new Array(k); + eg_C=new Array(k); + eg_D=new Array(k); + } + while(!(x[0]&1) && !(y[0]&1)) { //while x and y both even + halve_(x); + halve_(y); + g++; + } + copy_(eg_u,x); + copy_(v,y); + copyInt_(eg_A,1); + copyInt_(eg_B,0); + copyInt_(eg_C,0); + copyInt_(eg_D,1); + for (;;) { + while(!(eg_u[0]&1)) { //while u is even + halve_(eg_u); + if (!(eg_A[0]&1) && !(eg_B[0]&1)) { //if A==B==0 mod 2 + halve_(eg_A); + halve_(eg_B); + } else { + add_(eg_A,y); halve_(eg_A); + sub_(eg_B,x); halve_(eg_B); + } + } + + while (!(v[0]&1)) { //while v is even + halve_(v); + if (!(eg_C[0]&1) && !(eg_D[0]&1)) { //if C==D==0 mod 2 + halve_(eg_C); + halve_(eg_D); + } else { + add_(eg_C,y); halve_(eg_C); + sub_(eg_D,x); halve_(eg_D); + } + } + + if (!greater(v,eg_u)) { //v<=u + sub_(eg_u,v); + sub_(eg_A,eg_C); + sub_(eg_B,eg_D); + } else { //v>u + sub_(v,eg_u); + sub_(eg_C,eg_A); + sub_(eg_D,eg_B); + } + if (equalsInt(eg_u,0)) { + if (negative(eg_C)) { //make sure a (C)is nonnegative + add_(eg_C,y); + sub_(eg_D,x); + } + multInt_(eg_D,-1); ///make sure b (D) is nonnegative + copy_(a,eg_C); + copy_(b,eg_D); + leftShift_(v,g); + return; + } + } +} + + +//is bigInt x negative? +function negative(x) { + return ((x[x.length-1]>>(bpe-1))&1); +} + + +//is (x << (shift*bpe)) > y? +//x and y are nonnegative bigInts +//shift is a nonnegative integer +function greaterShift(x,y,shift) { + var kx=x.length, ky=y.length; + k=((kx+shift)<ky) ? (kx+shift) : ky; + for (i=ky-1-shift; i<kx && i>=0; i++) + if (x[i]>0) + return 1; //if there are nonzeros in x to the left of the first column of y, then x is bigger + for (i=kx-1+shift; i<ky; i++) + if (y[i]>0) + return 0; //if there are nonzeros in y to the left of the first column of x, then x is not bigger + for (i=k-1; i>=shift; i--) + if (x[i-shift]>y[i]) return 1; + else if (x[i-shift]<y[i]) return 0; + return 0; +} + +//is x > y? (x and y both nonnegative) +function greater(x,y) { + var i; + var k=(x.length<y.length) ? x.length : y.length; + + for (i=x.length;i<y.length;i++) + if (y[i]) + return 0; //y has more digits + + for (i=y.length;i<x.length;i++) + if (x[i]) + return 1; //x has more digits + + for (i=k-1;i>=0;i--) + if (x[i]>y[i]) + return 1; + else if (x[i]<y[i]) + return 0; + return 0; +} + +//divide_ x by y giving quotient q and remainder r. (q=floor(x/y), r=x mod y). All 4 are bigints. +//x must have at least one leading zero element. +//y must be nonzero. +//q and r must be arrays that are exactly the same length as x. +//the x array must have at least as many elements as y. +function divide_(x,y,q,r) { + var kx, ky; + var i,j,y1,y2,c,a,b; + copy_(r,x); + for (ky=y.length;y[ky-1]==0;ky--); //kx,ky is number of elements in x,y, not including leading zeros + for (kx=r.length;r[kx-1]==0 && kx>ky;kx--); + + //normalize: ensure the most significant element of y has its highest bit set + b=y[ky-1]; + for (a=0; b; a++) + b>>=1; + a=bpe-a; //a is how many bits to shift so that the high order bit of y is leftmost in its array element + leftShift_(y,a); //multiply both by 1<<a now, then divide_ both by that at the end + leftShift_(r,a); + + copyInt_(q,0); // q=0 + while (!greaterShift(y,r,kx-ky)) { // while (leftShift_(y,kx-ky) <= r) { + subShift_(r,y,kx-ky); // r=r-leftShift_(y,kx-ky) + q[kx-ky]++; // q[kx-ky]++; + } // } + + for (i=kx-1; i>=ky; i--) { + if (r[i]==y[ky-1]) + q[i-ky]=mask; + else + q[i-ky]=Math.floor((r[i]*radix+r[i-1])/y[ky-1]); + + //The following for(;;) loop is equivalent to the commented while loop, + //except that the uncommented version avoids overflow. + //The commented loop comes from HAC, which assumes r[-1]==y[-1]==0 + // while (q[i-ky]*(y[ky-1]*radix+y[ky-2]) > r[i]*radix*radix+r[i-1]*radix+r[i-2]) + // q[i-ky]--; + for (;;) { + y2=(ky>1 ? y[ky-2] : 0)*q[i-ky]; + c=y2>>bpe; + y2=y2 & mask; + y1=c+q[i-ky]*y[ky-1]; + c=y1>>bpe; + y1=y1 & mask; + + if (c==r[i] ? y1==r[i-1] ? y2>(i>1 ? r[i-2] : 0) : y1>r[i-1] : c>r[i]) + q[i-ky]--; + else + break; + } + + linCombShift_(r,y,-q[i-ky],i-ky); //r=r-q[i-ky]*leftShift_(y,i-ky) + if (negative(r)) { + addShift_(r,y,i-ky); //r=r+leftShift_(y,i-ky) + q[i-ky]--; + } + } + + rightShift_(y,a); //undo the normalization step + rightShift_(r,a); //undo the normalization step +} + +//do carries and borrows so each element of the bigInt x fits in bpe bits. +function carry_(x) { + var i,k,c,b; + k=x.length; + c=0; + for (i=0;i<k;i++) { + c+=x[i]; + b=0; + if (c<0) { + b=-(c>>bpe); + c+=b*radix; + } + x[i]=c & mask; + c=(c>>bpe)-b; + } +} + +//return x mod n for bigInt x and integer n. +function modInt(x,n) { + var i,c=0; + for (i=x.length-1; i>=0; i--) + c=(c*radix+x[i])%n; + return c; +} + +//convert the integer t into a bigInt with at least the given number of bits. +//the returned array stores the bigInt in bpe-bit chunks, little endian (buff[0] is least significant word) +//Pad the array with leading zeros so that it has at least minSize elements. +//There will always be at least one leading 0 element. +function int2bigInt(t,bits,minSize) { + var i,k; + k=Math.ceil(bits/bpe)+1; + k=minSize>k ? minSize : k; + buff=new Array(k); + copyInt_(buff,t); + return buff; +} + +//return the bigInt given a string representation in a given base. +//Pad the array with leading zeros so that it has at least minSize elements. +//If base=-1, then it reads in a space-separated list of array elements in decimal. +//The array will always have at least one leading zero, unless base=-1. +function str2bigInt(s,base,minSize) { + var d, i, j, x, y, kk; + var k=s.length; + if (base==-1) { //comma-separated list of array elements in decimal + x=new Array(0); + for (;;) { + y=new Array(x.length+1); + for (i=0;i<x.length;i++) + y[i+1]=x[i]; + y[0]=parseInt(s,10); + x=y; + d=s.indexOf(',',0); + if (d<1) + break; + s=s.substring(d+1); + if (s.length==0) + break; + } + if (x.length<minSize) { + y=new Array(minSize); + copy_(y,x); + return y; + } + return x; + } + + x=int2bigInt(0,base*k,0); + for (i=0;i<k;i++) { + d=digitsStr.indexOf(s.substring(i,i+1),0); + if (base<=36 && d>=36) //convert lowercase to uppercase if base<=36 + d-=26; + if (d<base && d>=0) { //ignore illegal characters + multInt_(x,base); + addInt_(x,d); + } + } + + for (k=x.length;k>0 && !x[k-1];k--); //strip off leading zeros + k=minSize>k+1 ? minSize : k+1; + y=new Array(k); + kk=k<x.length ? k : x.length; + for (i=0;i<kk;i++) + y[i]=x[i]; + for (;i<k;i++) + y[i]=0; + return y; +} + +//is bigint x equal to integer y? +//y must have less than bpe bits +function equalsInt(x,y) { + var i; + if (x[0]!=y) + return 0; + for (i=1;i<x.length;i++) + if (x[i]) + return 0; + return 1; +} + +//are bigints x and y equal? +//this works even if x and y are different lengths and have arbitrarily many leading zeros +function equals(x,y) { + var i; + var k=x.length<y.length ? x.length : y.length; + for (i=0;i<k;i++) + if (x[i]!=y[i]) + return 0; + if (x.length>y.length) { + for (;i<x.length;i++) + if (x[i]) + return 0; + } else { + for (;i<y.length;i++) + if (y[i]) + return 0; + } + return 1; +} + +//is the bigInt x equal to zero? +function isZero(x) { + var i; + for (i=0;i<x.length;i++) + if (x[i]) + return 0; + return 1; +} + +//convert a bigInt into a string in a given base, from base 2 up to base 95. +//Base -1 prints the contents of the array representing the number. +function bigInt2str(x,base) { + var i,t,s=""; + + if (s6.length!=x.length) + s6=dup(x); + else + copy_(s6,x); + + if (base==-1) { //return the list of array contents + for (i=x.length-1;i>0;i--) + s+=x[i]+','; + s+=x[0]; + } + else { //return it in the given base + while (!isZero(s6)) { + t=divInt_(s6,base); //t=s6 % base; s6=floor(s6/base); + s=digitsStr.substring(t,t+1)+s; + } + } + if (s.length==0) + s="0"; + return s; +} + +//returns a duplicate of bigInt x +function dup(x) { + var i; + buff=new Array(x.length); + copy_(buff,x); + return buff; +} + +//do x=y on bigInts x and y. x must be an array at least as big as y (not counting the leading zeros in y). +function copy_(x,y) { + var i; + var k=x.length<y.length ? x.length : y.length; + for (i=0;i<k;i++) + x[i]=y[i]; + for (i=k;i<x.length;i++) + x[i]=0; +} + +//do x=y on bigInt x and integer y. +function copyInt_(x,n) { + var i,c; + for (c=n,i=0;i<x.length;i++) { + x[i]=c & mask; + c>>=bpe; + } +} + +//do x=x+n where x is a bigInt and n is an integer. +//x must be large enough to hold the result. +function addInt_(x,n) { + var i,k,c,b; + x[0]+=n; + k=x.length; + c=0; + for (i=0;i<k;i++) { + c+=x[i]; + b=0; + if (c<0) { + b=-(c>>bpe); + c+=b*radix; + } + x[i]=c & mask; + c=(c>>bpe)-b; + if (!c) return; //stop carrying as soon as the carry_ is zero + } +} + +//right shift bigInt x by n bits. 0 <= n < bpe. +function rightShift_(x,n) { + var i; + var k=Math.floor(n/bpe); + if (k) { + for (i=0;i<x.length-k;i++) //right shift x by k elements + x[i]=x[i+k]; + for (;i<x.length;i++) + x[i]=0; + n%=bpe; + } + for (i=0;i<x.length-1;i++) { + x[i]=mask & ((x[i+1]<<(bpe-n)) | (x[i]>>n)); + } + x[i]>>=n; +} + +//do x=floor(|x|/2)*sgn(x) for bigInt x in 2's complement +function halve_(x) { + var i; + for (i=0;i<x.length-1;i++) { + x[i]=mask & ((x[i+1]<<(bpe-1)) | (x[i]>>1)); + } + x[i]=(x[i]>>1) | (x[i] & (radix>>1)); //most significant bit stays the same +} + +//left shift bigInt x by n bits. +function leftShift_(x,n) { + var i; + var k=Math.floor(n/bpe); + if (k) { + for (i=x.length; i>=k; i--) //left shift x by k elements + x[i]=x[i-k]; + for (;i>=0;i--) + x[i]=0; + n%=bpe; + } + if (!n) + return; + for (i=x.length-1;i>0;i--) { + x[i]=mask & ((x[i]<<n) | (x[i-1]>>(bpe-n))); + } + x[i]=mask & (x[i]<<n); +} + +//do x=x*n where x is a bigInt and n is an integer. +//x must be large enough to hold the result. +function multInt_(x,n) { + var i,k,c,b; + if (!n) + return; + k=x.length; + c=0; + for (i=0;i<k;i++) { + c+=x[i]*n; + b=0; + if (c<0) { + b=-(c>>bpe); + c+=b*radix; + } + x[i]=c & mask; + c=(c>>bpe)-b; + } +} + +//do x=floor(x/n) for bigInt x and integer n, and return the remainder +function divInt_(x,n) { + var i,r=0,s; + for (i=x.length-1;i>=0;i--) { + s=r*radix+x[i]; + x[i]=Math.floor(s/n); + r=s%n; + } + return r; +} + +//do the linear combination x=a*x+b*y for bigInts x and y, and integers a and b. +//x must be large enough to hold the answer. +function linComb_(x,y,a,b) { + var i,c,k,kk; + k=x.length<y.length ? x.length : y.length; + kk=x.length; + for (c=0,i=0;i<k;i++) { + c+=a*x[i]+b*y[i]; + x[i]=c & mask; + c>>=bpe; + } + for (i=k;i<kk;i++) { + c+=a*x[i]; + x[i]=c & mask; + c>>=bpe; + } +} + +//do the linear combination x=a*x+b*(y<<(ys*bpe)) for bigInts x and y, and integers a, b and ys. +//x must be large enough to hold the answer. +function linCombShift_(x,y,b,ys) { + var i,c,k,kk; + k=x.length<ys+y.length ? x.length : ys+y.length; + kk=x.length; + for (c=0,i=ys;i<k;i++) { + c+=x[i]+b*y[i-ys]; + x[i]=c & mask; + c>>=bpe; + } + for (i=k;c && i<kk;i++) { + c+=x[i]; + x[i]=c & mask; + c>>=bpe; + } +} + +//do x=x+(y<<(ys*bpe)) for bigInts x and y, and integers a,b and ys. +//x must be large enough to hold the answer. +function addShift_(x,y,ys) { + var i,c,k,kk; + k=x.length<ys+y.length ? x.length : ys+y.length; + kk=x.length; + for (c=0,i=ys;i<k;i++) { + c+=x[i]+y[i-ys]; + x[i]=c & mask; + c>>=bpe; + } + for (i=k;c && i<kk;i++) { + c+=x[i]; + x[i]=c & mask; + c>>=bpe; + } +} + +//do x=x-(y<<(ys*bpe)) for bigInts x and y, and integers a,b and ys. +//x must be large enough to hold the answer. +function subShift_(x,y,ys) { + var i,c,k,kk; + k=x.length<ys+y.length ? x.length : ys+y.length; + kk=x.length; + for (c=0,i=ys;i<k;i++) { + c+=x[i]-y[i-ys]; + x[i]=c & mask; + c>>=bpe; + } + for (i=k;c && i<kk;i++) { + c+=x[i]; + x[i]=c & mask; + c>>=bpe; + } +} + +//do x=x-y for bigInts x and y. +//x must be large enough to hold the answer. +//negative answers will be 2s complement +function sub_(x,y) { + var i,c,k,kk; + k=x.length<y.length ? x.length : y.length; + for (c=0,i=0;i<k;i++) { + c+=x[i]-y[i]; + x[i]=c & mask; + c>>=bpe; + } + for (i=k;c && i<x.length;i++) { + c+=x[i]; + x[i]=c & mask; + c>>=bpe; + } +} + +//do x=x+y for bigInts x and y. +//x must be large enough to hold the answer. +function add_(x,y) { + var i,c,k,kk; + k=x.length<y.length ? x.length : y.length; + for (c=0,i=0;i<k;i++) { + c+=x[i]+y[i]; + x[i]=c & mask; + c>>=bpe; + } + for (i=k;c && i<x.length;i++) { + c+=x[i]; + x[i]=c & mask; + c>>=bpe; + } +} + +//do x=x*y for bigInts x and y. This is faster when y<x. +function mult_(x,y) { + var i; + if (ss.length!=2*x.length) + ss=new Array(2*x.length); + copyInt_(ss,0); + for (i=0;i<y.length;i++) + if (y[i]) + linCombShift_(ss,x,y[i],i); //ss=1*ss+y[i]*(x<<(i*bpe)) + copy_(x,ss); +} + +//do x=x mod n for bigInts x and n. +function mod_(x,n) { + if (s4.length!=x.length) + s4=dup(x); + else + copy_(s4,x); + if (s5.length!=x.length) + s5=dup(x); + divide_(s4,n,s5,x); //x = remainder of s4 / n +} + +//do x=x*y mod n for bigInts x,y,n. +//for greater speed, let y<x. +function multMod_(x,y,n) { + var i; + if (s0.length!=2*x.length) + s0=new Array(2*x.length); + copyInt_(s0,0); + for (i=0;i<y.length;i++) + if (y[i]) + linCombShift_(s0,x,y[i],i); //s0=1*s0+y[i]*(x<<(i*bpe)) + mod_(s0,n); + copy_(x,s0); +} + +//do x=x*x mod n for bigInts x,n. +function squareMod_(x,n) { + var i,j,d,c,kx,kn,k; + for (kx=x.length; kx>0 && !x[kx-1]; kx--); //ignore leading zeros in x + k=kx>n.length ? 2*kx : 2*n.length; //k=# elements in the product, which is twice the elements in the larger of x and n + if (s0.length!=k) + s0=new Array(k); + copyInt_(s0,0); + for (i=0;i<kx;i++) { + c=s0[2*i]+x[i]*x[i]; + s0[2*i]=c & mask; + c>>=bpe; + for (j=i+1;j<kx;j++) { + c=s0[i+j]+2*x[i]*x[j]+c; + s0[i+j]=(c & mask); + c>>=bpe; + } + s0[i+kx]=c; + } + mod_(s0,n); + copy_(x,s0); +} + +//return x with exactly k leading zero elements +function trim(x,k) { + var i,y; + for (i=x.length; i>0 && !x[i-1]; i--); + y=new Array(i+k); + copy_(y,x); + return y; +} + +//do x=x**y mod n, where x,y,n are bigInts and ** is exponentiation. 0**0=1. +//this is faster when n is odd. x usually needs to have as many elements as n. +function powMod_(x,y,n) { + var k1,k2,kn,np; + if(s7.length!=n.length) + s7=dup(n); + + //for even modulus, use a simple square-and-multiply algorithm, + //rather than using the more complex Montgomery algorithm. + if ((n[0]&1)==0) { + copy_(s7,x); + copyInt_(x,1); + while(!equalsInt(y,0)) { + if (y[0]&1) + multMod_(x,s7,n); + divInt_(y,2); + squareMod_(s7,n); + } + return; + } + + //calculate np from n for the Montgomery multiplications + copyInt_(s7,0); + for (kn=n.length;kn>0 && !n[kn-1];kn--); + np=radix-inverseModInt_(modInt(n,radix),radix); + s7[kn]=1; + multMod_(x ,s7,n); // x = x * 2**(kn*bp) mod n + + if (s3.length!=x.length) + s3=dup(x); + else + copy_(s3,x); + + for (k1=y.length-1;k1>0 & !y[k1]; k1--); //k1=first nonzero element of y + if (y[k1]==0) { //anything to the 0th power is 1 + copyInt_(x,1); + return; + } + for (k2=1<<(bpe-1);k2 && !(y[k1] & k2); k2>>=1); //k2=position of first 1 bit in y[k1] + for (;;) { + if (!(k2>>=1)) { //look at next bit of y + k1--; + if (k1<0) { + mont_(x,one,n,np); + return; + } + k2=1<<(bpe-1); + } + mont_(x,x,n,np); + + if (k2 & y[k1]) //if next bit is a 1 + mont_(x,s3,n,np); + } +} + +//do x=x*y*Ri mod n for bigInts x,y,n, +// where Ri = 2**(-kn*bpe) mod n, and kn is the +// number of elements in the n array, not +// counting leading zeros. +//x must be large enough to hold the answer. +//It's OK if x and y are the same variable. +//must have: +// x,y < n +// n is odd +// np = -(n^(-1)) mod radix +function mont_(x,y,n,np) { + var i,j,c,ui,t; + var kn=n.length; + var ky=y.length; + + if (sa.length!=kn) + sa=new Array(kn); + + for (;kn>0 && n[kn-1]==0;kn--); //ignore leading zeros of n + //this function sometimes gives wrong answers when the next line is uncommented + //for (;ky>0 && y[ky-1]==0;ky--); //ignore leading zeros of y + + copyInt_(sa,0); + + //the following loop consumes 95% of the runtime for randTruePrime_() and powMod_() for large keys + for (i=0; i<kn; i++) { + t=sa[0]+x[i]*y[0]; + ui=((t & mask) * np) & mask; //the inner "& mask" is needed on Macintosh MSIE, but not windows MSIE + c=(t+ui*n[0]) >> bpe; + t=x[i]; + + //do sa=(sa+x[i]*y+ui*n)/b where b=2**bpe + for (j=1;j<ky;j++) { + c+=sa[j]+t*y[j]+ui*n[j]; + sa[j-1]=c & mask; + c>>=bpe; + } + for (;j<kn;j++) { + c+=sa[j]+ui*n[j]; + sa[j-1]=c & mask; + c>>=bpe; + } + sa[j-1]=c & mask; + } + + if (!greater(n,sa)) + sub_(sa,n); + copy_(x,sa); +} + + + + +//############################################################################# +//############################################################################# +//############################################################################# +//############################################################################# +//############################################################################# +//############################################################################# +//############################################################################# + + + + + +//############################################################################# + +Clipperz.Crypto.BigInt = function (aValue, aBase) { + var base; + var value; + + if (typeof(aValue) == 'object') { + this._internalValue = aValue; + } else { + if (typeof(aValue) == 'undefined') { + value = "0"; + } else { + value = aValue + ""; + } + + if (typeof(aBase) == 'undefined') { + base = 10; + } else { + base = aBase; + } + + this._internalValue = str2bigInt(value, base, 1, 1); + } + + return this; +} + +//============================================================================= + +MochiKit.Base.update(Clipperz.Crypto.BigInt.prototype, { + + //------------------------------------------------------------------------- + + 'internalValue': function () { + return this._internalValue; + }, + + //------------------------------------------------------------------------- + + 'isBigInt': true, + + //------------------------------------------------------------------------- + + 'toString': function(aBase) { + return this.asString(aBase); + }, + + //------------------------------------------------------------------------- + + 'asString': function (aBase) { + var base; + + if (typeof(aBase) == 'undefined') { + base = 10; + } else { + base = aBase; + } + + return bigInt2str(this.internalValue(), base).toLowerCase(); + }, + + //------------------------------------------------------------------------- + + 'equals': function (aValue) { + var result; + + if (aValue.isBigInt) { + result = equals(this.internalValue(), aValue.internalValue()); + } else if (typeof(aValue) == "number") { + result = equalsInt(this.internalValue(), aValue); + } else { + throw Clipperz.Crypt.BigInt.exception.UnknownType; + } + + return result; + }, + + //------------------------------------------------------------------------- + + 'add': function (aValue) { + var result; + + if (aValue.isBigInt) { + result = add(this.internalValue(), aValue.internalValue()); + } else { + result = addInt(this.internalValue(), aValue); + } + + return new Clipperz.Crypto.BigInt(result); + }, + + //------------------------------------------------------------------------- + + 'subtract': function (aValue) { + var result; + var value; + + if (aValue.isBigInt) { + value = aValue; + } else { + value = new Clipperz.Crypto.BigInt(aValue); + } + + result = sub(this.internalValue(), value.internalValue()); + + return new Clipperz.Crypto.BigInt(result); + }, + + //------------------------------------------------------------------------- + + 'multiply': function (aValue, aModule) { + var result; + var value; + + if (aValue.isBigInt) { + value = aValue; + } else { + value = new Clipperz.Crypto.BigInt(aValue); + } + + if (typeof(aModule) == 'undefined') { + result = mult(this.internalValue(), value.internalValue()); + } else { + result = multMod(this.internalValue(), value.internalValue(), aModule); + } + + return new Clipperz.Crypto.BigInt(result); + }, + + //------------------------------------------------------------------------- + + 'module': function (aModule) { + var result; + var module; + + if (aModule.isBigInt) { + module = aModule; + } else { + module = new Clipperz.Crypto.BigInt(aModule); + } + + result = mod(this.internalValue(), module.internalValue()); + + return new Clipperz.Crypto.BigInt(result); + }, + + //------------------------------------------------------------------------- + + 'powerModule': function(aValue, aModule) { + var result; + var value; + var module; + + if (aValue.isBigInt) { + value = aValue; + } else { + value = new Clipperz.Crypto.BigInt(aValue); + } + + if (aModule.isBigInt) { + module = aModule; + } else { + module = new Clipperz.Crypto.BigInt(aModule); + } + + if (aValue == -1) { + result = inverseMod(this.internalValue(), module.internalValue()); + } else { + result = powMod(this.internalValue(), value.internalValue(), module.internalValue()); + } + + return new Clipperz.Crypto.BigInt(result); + }, + + //------------------------------------------------------------------------- + + 'bitSize': function() { + return bitSize(this.internalValue()); + }, + + //------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" + +}); + +//############################################################################# + +Clipperz.Crypto.BigInt.randomPrime = function(aBitSize) { + return new Clipperz.Crypto.BigInt(randTruePrime(aBitSize)); +} + +//############################################################################# +//############################################################################# +//############################################################################# + +Clipperz.Crypto.BigInt.equals = function(a, b) { + return a.equals(b); +} + +Clipperz.Crypto.BigInt.add = function(a, b) { + return a.add(b); +} + +Clipperz.Crypto.BigInt.subtract = function(a, b) { + return a.subtract(b); +} + +Clipperz.Crypto.BigInt.multiply = function(a, b, module) { + return a.multiply(b, module); +} + +Clipperz.Crypto.BigInt.module = function(a, module) { + return a.module(module); +} + +Clipperz.Crypto.BigInt.powerModule = function(a, b, module) { + return a.powerModule(b, module); +} + +Clipperz.Crypto.BigInt.exception = { + UnknownType: new MochiKit.Base.NamedError("Clipperz.Crypto.BigInt.exception.UnknownType") +} diff --git a/frontend/gamma/js/ClipperzCryptoLibrary/ByteArray.js b/frontend/gamma/js/ClipperzCryptoLibrary/ByteArray.js new file mode 100644 index 0000000..aca1c00 --- a/dev/null +++ b/frontend/gamma/js/ClipperzCryptoLibrary/ByteArray.js @@ -0,0 +1,1496 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } + +//============================================================================= + +Clipperz.ByteArray_abstract = function(args) { + return this; +} + +Clipperz.ByteArray_abstract.prototype = MochiKit.Base.update(null, { + + //------------------------------------------------------------------------- + + 'toString': function() { + return "Clipperz.ByteArray_abstract"; + }, + + //------------------------------------------------------------------------- + + 'equals': function(aValue) { + return (this.compare(aValue) == 0); + }, + + //------------------------------------------------------------------------- + + 'compare': function(aValue) { + var result; + var i; + + result = MochiKit.Base.compare(this.length(), aValue.length()); + i = this.length(); + + while ((result == 0) && (i>0)) { + i--; + result = MochiKit.Base.compare(this.byteAtIndex(i), aValue.byteAtIndex(i)); + } + + return result; + }, + + //------------------------------------------------------------------------- + + 'clone': function() { + throw Clipperz.Base.exception.AbstractMethod; + }, + + //------------------------------------------------------------------------- + + 'newInstance': function() { + throw Clipperz.Base.exception.AbstractMethod; + }, + + //------------------------------------------------------------------------- + + 'reset': function() { + throw Clipperz.Base.exception.AbstractMethod; + }, + + //------------------------------------------------------------------------- + + 'length': function() { + throw Clipperz.Base.exception.AbstractMethod; + }, + + //------------------------------------------------------------------------- + + 'checkByteValue': function(aValue) { +//Clipperz.log("aValue", aValue.toString(16)); +//Clipperz.log("(aValue & 0xff)", (aValue & 0xff).toString(16)); + + if ((aValue & 0xff) != aValue) { + MochiKit.Logging.logError("Clipperz.ByteArray.appendByte: the provided value (0x" + aValue.toString(16) + ") is not a byte value."); + throw Clipperz.ByteArray.exception.InvalidValue; + } + }, + + //------------------------------------------------------------------------- + + 'xorMergeWithBlock': function(aBlock, anAllignment, paddingMode) { + var result; + var a, b; + var aLength; + var bLength; + var i, c; + + if (this.length() > aBlock.length()) { + a = this; + b = aBlock; + } else { + a = aBlock; + b = this; + } + + aLength = a.length(); + bLength = b.length(); + + if (aLength != bLength) { + if (paddingMode == 'truncate') { + if (anAllignment == 'left') { + a = a.split(0, bLength); + } else { + a = a.split(aLength - bLength); + } + } else { + var ii, cc; + var padding; + +// padding = new Clipperz.ByteArray(); + padding = this.newInstance(); + cc = aLength - bLength; + for (ii=0; ii<cc; ii++) { + padding.appendByte(0); + } + + if (anAllignment == 'left') { + b = b.appendBlock(padding); + } else { + b = padding.appendBlock(b); + } + } + } + + +// result = new Clipperz.ByteArray(); + result = this.newInstance(); + c = a.length(); + for (i=0; i<c; i++) { + result.appendByte(a.byteAtIndex(i) ^ b.byteAtIndex(i)); + } + + return result; + }, + + //------------------------------------------------------------------------- +/* + 'shiftLeft': function(aNumberOfBitsToShift) { + var result; + + result = this.clone(); // ??????????? + + return result; + }, +*/ + //------------------------------------------------------------------------- + + 'appendBlock': function(aBlock) { + throw Clipperz.Base.exception.AbstractMethod; + }, + + //------------------------------------------------------------------------- + + 'appendByte': function(aValue) { + throw Clipperz.Base.exception.AbstractMethod; + }, + + 'appendBytes': function(args) { + var values; + var i,c; + + if (args.constructor == Array) { + values = args; + } else { + values = arguments; + } + + c = values.length; + for (i=0; i<c; i++) { + this.appendByte(values[i]); + } + + return this; + }, + + //------------------------------------------------------------------------- + + 'appendWord': function(aValue, isLittleEndian) { + var result; + var processAsLittleEndian; + + processAsLittleEndian = isLittleEndian === true ? true : false; + + if (processAsLittleEndian) { + result = this.appendBytes( (aValue) & 0xff, (aValue >> 8) & 0xff, (aValue >> 16) & 0xff, (aValue >> 24) & 0xff ); // little endian + } else { + result = this.appendBytes( (aValue >> 24) & 0xff, (aValue >> 16) & 0xff, (aValue >> 8) & 0xff, (aValue) & 0xff ); // big endian - DEFAULT + } + + return result; + }, + + 'appendWords': function(args) { + var values; + var i,c; + + if (args.constructor == Array) { + values = args; + } else { + values = arguments; + } + + c = values.length; + for (i=0; i<c; i++) { + this.appendWord(values[i], false); + } + + return this; + }, + + //------------------------------------------------------------------------- + + 'appendBigEndianWords': function(args) { + var values; + var i,c; + + if (args.constructor == Array) { + values = args; + } else { + values = arguments; + } + + c = values.length; + for (i=0; i<c; i++) { + this.appendWord(values[i], true); + } + + return this; + }, + + //------------------------------------------------------------------------- + + 'appendBinaryString': function (aBinaryString) { + var i,c; + + c = aBinaryString.length; + for (i=0; i<c; i++) { + this.appendByte(aBinaryString.charCodeAt(i)); + }; + + return this; + }, + + //------------------------------------------------------------------------- + + 'byteAtIndex': function(anIndex) { + throw Clipperz.Base.exception.AbstractMethod; + }, + + 'setByteAtIndex': function(aValue, anIndex) { + throw Clipperz.Base.exception.AbstractMethod; + }, + + //------------------------------------------------------------------------- + + 'bitAtIndex': function(aBitPosition) { + var result; + var bytePosition; + var bitPositionInSelectedByte; + var selectedByte; + var selectedByteMask; + + bytePosition = this.length() - Math.ceil((aBitPosition + 1)/ 8); + bitPositionInSelectedByte = aBitPosition % 8; + selectedByte = this.byteAtIndex(bytePosition); + + if (bitPositionInSelectedByte > 0) { + selectedByteMask = (1 << bitPositionInSelectedByte); + } else { + selectedByteMask = 1; + } + result = selectedByte & selectedByteMask ? 1 : 0; +//console.log("aBitPosition: " + aBitPosition + ", length: " + this.length() + ", bytePosition: " + bytePosition + ", bitPositionInSelectedByte: " + bitPositionInSelectedByte + ", selectedByteMask: " + selectedByteMask); + + return result; + }, + + //------------------------------------------------------------------------- + + 'bitBlockAtIndexWithSize': function(aBitPosition, aSize) { + var result; + var bitValue; + var i,c; + + result = 0; + c = aSize; + for (i=0; i<c; i++) { + bitValue = this.bitAtIndex(aBitPosition + i); + result = result | bitValue << i; + } + + return result; + }, + + //------------------------------------------------------------------------- + + 'asString': function() { + var result; + var length; + var i; + +//var startTime = new Date(); + +//# result = ""; + result = []; + + i = 0; + length = this.length(); + + while (i < length) { + var currentCharacter; + var currentByte; + var unicode; + + currentByte = this.byteAtIndex(i); + + if ((currentByte & 0x80) == 0x00 ) { // 0xxxxxxx + unicode = currentByte; + currentCharacter = String.fromCharCode(unicode); + } else if ((currentByte & 0xe0) == 0xc0 ) { // 110xxxxx 10xxxxxx + unicode = (currentByte & 0x1f) << 6; + i++; currentByte = this.byteAtIndex(i); + unicode = unicode | (currentByte & 0x3f); + + currentCharacter = String.fromCharCode(unicode); + } else if ((currentByte & 0xf0) == 0xe0 ) { // 1110xxxx 10xxxxxx 10xxxxxx + unicode = (currentByte & 0x0f) << (6+6); + i++; currentByte = this.byteAtIndex(i); + unicode = unicode | ((currentByte & 0x3f) << 6); + i++; currentByte = this.byteAtIndex(i); + unicode = unicode | (currentByte & 0x3f); + + currentCharacter = String.fromCharCode(unicode); + } else { // 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + unicode = (currentByte & 0x07) << (6+6+6); + i++; currentByte = this.byteAtIndex(i); + unicode = unicode | ((currentByte & 0x3f) << (6+6)); + i++; currentByte = this.byteAtIndex(i); + unicode = unicode | ((currentByte & 0x3f) << 6); + i++; currentByte = this.byteAtIndex(i); + unicode = unicode | (currentByte & 0x3f); + + currentCharacter = String.fromCharCode(unicode); + } + +// result += currentCharacter; + result.push(currentCharacter); + i++; + } + +//MochiKit.Logging.logDebug("[" + (new Date() - startTime) + "] ByteArray.asString"); + +// return result; + return result.join(""); + }, + + //------------------------------------------------------------------------- + + 'toHexString': function() { + throw Clipperz.Base.exception.AbstractMethod; + }, + + //------------------------------------------------------------------------- + + 'base64map': "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", + 'base64mapIndex': "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(''), +// 'base64mapInvertedIndex': { +// 'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': 6, 'H': 7, 'I': 8, 'J': 9, +// 'K': 10, 'L': 11, 'M': 12, 'N': 13, 'O': 14, 'P': 15, 'Q': 16, 'R': 17, 'S': 18, 'T': 19, +// 'U': 20, 'V': 21, 'W': 22, 'X': 23, 'Y': 24, 'Z': 25, 'a': 26, 'b': 27, 'c': 28, 'd': 29, +// 'e': 30, 'f': 31, 'g': 32, 'h': 33, 'i': 34, 'j': 35, 'k': 36, 'l': 37, 'm': 38, 'n': 39, +// 'o': 40, 'p': 41, 'q': 42, 'r': 43, 's': 44, 't': 45, 'u': 46, 'v': 47, 'w': 48, 'x': 49, +// 'y': 50, 'z': 51, '0': 52, '1': 53, '2': 54, '3': 55, '4': 56, '5': 57, '6': 58, '7': 59, +// '8': 60, '9': 61, '+': 62, '/': 63, +// "=": -1}, + + //------------------------------------------------------------------------- + + 'appendBase64String': function(aValue) { + var i; + var length; + + length = aValue.length; + + if ((length % 4) != 0) { + MochiKit.Logging.logError("the value passed to the 'ByteArray.setBase64Value' is not correct"); + throw Clipperz.ByteArray.exception.InvalidValue; + } + + i = 0; + while (i<length) { + var value1, value2, value3, value4; + var byte1, byte2, byte3; + + value1 = this.base64map.indexOf(aValue.charAt(i)); + value2 = this.base64map.indexOf(aValue.charAt(i+1)); + value3 = this.base64map.indexOf(aValue.charAt(i+2)); + value4 = this.base64map.indexOf(aValue.charAt(i+3)); + +// value1 = this.base64mapInvertedIndex[aValue.charAt(i)]; +// value2 = this.base64mapInvertedIndex[aValue.charAt(i+1)]; +// value3 = this.base64mapInvertedIndex[aValue.charAt(i+2)]; +// value4 = this.base64mapInvertedIndex[aValue.charAt(i+3)]; + + byte1 = (value1 << 2) | ((value2 & 0x30) >> 4); + if (value3 != -1) { + byte2 = ((value2 & 0x0f) << 4) | ((value3 & 0x3c) >> 2); + + if (value4 != -1) { + byte3 = ((value3 & 0x03) << 6) | (value4); + } else { + byte3 = null; + } + } else { + byte2 = null; + byte3 = null; + } + + this.appendByte(byte1); + this.appendByte(byte2); + this.appendByte(byte3); + + i += 4; + } + + return this; + }, + + //------------------------------------------------------------------------- + + 'toBase64String': function() { + var result; + var length; + var i; + var byte1, byte2, byte3; + var char1, char2, char3, char4; + + i = 0; + length = this.length(); + result = new Array(Math.ceil(length/3)); + + while (i < length) { + byte1 = this.byteAtIndex(i); + if ((i+2) < length) { + byte2 = this.byteAtIndex(i+1); + byte3 = this.byteAtIndex(i+2); + } else if ((i+2) == length) { + byte2 = this.byteAtIndex(i+1); + byte3 = null; + } else { + byte2 = null; + byte3 = null; + } + + char1 = this.base64mapIndex[byte1 >> 2]; + if (byte2 != null) { + char2 = this.base64mapIndex[((byte1 & 0x03) << 4) | ((byte2 & 0xf0) >> 4)]; + if (byte3 != null) { + char3 = this.base64mapIndex[((byte2 & 0x0f) << 2) | ((byte3 & 0xc0) >> 6)]; + char4 = this.base64mapIndex[(byte3 & 0x3f)]; + } else { + char3 = this.base64mapIndex[(byte2 & 0x0f) << 2]; + char4 = "="; + } + } else { + char2 = this.base64mapIndex[(byte1 & 0x03) << 4]; + char3 = "="; + char4 = "="; + } + + result.push(char1 + char2 + char3 + char4); + + i += 3; + } + + return result.join(""); + }, + + //------------------------------------------------------------------------- + + 'base32map': "0123456789abcdefghjkmnpqrstvwxyz", + 'base32mapIndex': "0123456789abcdefghjkmnpqrstvwxyz".split(''), + + //------------------------------------------------------------------------- + + 'appendBase32String': function(aValue) { + var value; + var i; + var length; + var value1, value2, value3, value4, value5, value6, value7, value8; + var byte1, byte2, byte3, byte4, byte5; + + value = aValue.toLowerCase(); + value = value.replace(/[\s\-]/g, ''); + value = value.replace(/[0o]/g, '0'); + value = value.replace(/[1il]/g, '1'); + + length = value.length; + + if ((length % 8) != 0) { + MochiKit.Logging.logError("the value passed to the 'ByteArray.setBase32Value' is not correct"); + throw Clipperz.ByteArray.exception.InvalidValue; + } + + i = 0; + while (i<length) { + value1 = this.base32map.indexOf(value.charAt(i)); + value2 = this.base32map.indexOf(value.charAt(i+1)); + value3 = this.base32map.indexOf(value.charAt(i+2)); + value4 = this.base32map.indexOf(value.charAt(i+3)); + value5 = this.base32map.indexOf(value.charAt(i+4)); + value6 = this.base32map.indexOf(value.charAt(i+5)); + value7 = this.base32map.indexOf(value.charAt(i+6)); + value8 = this.base32map.indexOf(value.charAt(i+7)); + + byte1 = byte2 = byte3 = byte4 = byte5 = null; + + byte1 = (value1 << 3) | ((value2 & 0x1c) >> 2); + if (value3 != -1) { + byte2 = ((value2 & 0x03) << 6) | (value3 << 1) | ((value4 & 0x10) >> 4); + if (value5 != -1) { + byte3 = ((value4 & 0x0f) << 4) | ((value5 & 0x1e) >> 1); + if (value6 != -1) { + byte4 = ((value5 & 0x01) << 7) | (value6 << 2) | ((value7 & 0x18) >> 3); + if (value8 != -1) { + byte5 = ((value7 & 0x07) << 5) | (value8); + } + } + } + } + + this.appendByte(byte1); + this.appendByte(byte2); + this.appendByte(byte3); + this.appendByte(byte4); + this.appendByte(byte5); + + i += 8; + } + + return this; + }, + + //------------------------------------------------------------------------- + + 'toBase32String': function() { + var result; + var length; + var i; + var byte1, byte2, byte3, byte4, byte5; + var char1, char2, char3, char4, char5, char6, char7, char8; + + i = 0; + length = this.length(); + result = new Array(Math.ceil(length/5)); + + while (i < length) { + byte1 = this.byteAtIndex(i); + + if ((i+4) < length) { + byte2 = this.byteAtIndex(i+1); + byte3 = this.byteAtIndex(i+2); + byte4 = this.byteAtIndex(i+3); + byte5 = this.byteAtIndex(i+4); + } else if ((i+4) == length) { + byte2 = this.byteAtIndex(i+1); + byte3 = this.byteAtIndex(i+2); + byte4 = this.byteAtIndex(i+3); + byte5 = null; + } else if ((i+3) == length) { + byte2 = this.byteAtIndex(i+1); + byte3 = this.byteAtIndex(i+2); + byte4 = null; + byte5 = null; + } else if ((i+2) == length) { + byte2 = this.byteAtIndex(i+1); + byte3 = null; + byte4 = null; + byte5 = null; + } else { + byte2 = null; + byte3 = null; + byte4 = null; + byte5 = null; + } + + + char1 = this.base32mapIndex[byte1 >> 3]; + char2 = char3 = char4 = char5 = char6 = char7 = char8 = "="; + + if (byte2 != null) { + char2 = this.base32mapIndex[((byte1 & 0x07) << 2) | ((byte2 & 0xc0) >> 6)]; + char3 = this.base32mapIndex[((byte2 & 0x3e) >> 1)]; + if (byte3 != null) { + char4 = this.base32mapIndex[((byte2 & 0x01) << 4) | ((byte3 & 0xf0) >> 4)]; + if (byte4 != null) { + char5 = this.base32mapIndex[((byte3 & 0x0f) << 1) | ((byte4 & 0x80) >> 7)]; + char6 = this.base32mapIndex[(byte4 & 0x7c) >> 2]; + if (byte5 != null) { + char7 = this.base32mapIndex[((byte4 & 0x03) << 3) | ((byte5 & 0xe0) >> 5)]; + char8 = this.base32mapIndex[(byte5 & 0x1f)]; + } else { + char7 = this.base32mapIndex[(byte4 & 0x03) << 3]; + } + } else { + char5 = this.base32mapIndex[(byte3 & 0x0f) << 1]; + } + + } else { + char4 = this.base32mapIndex[(byte2 & 0x01) << 4]; + } + } else { + char2 = this.base32mapIndex[(byte1 & 0x07) << 2]; + } + + result.push(char1 + char2 + char3 + char4 + char5 + char6 + char7 + char8); + i += 5; + } + + return result.join(""); + }, + + //------------------------------------------------------------------------- + + 'toBinaryString': function () { + var i, c; + var result; + + result = ''; + + c = this.length(); + for (i=0; i<c; i++) { + result += String.fromCharCode(this.byteAtIndex(i)); + } + + return result; + }, + + + //------------------------------------------------------------------------- + + 'split': function(aStartingIndex, anEndingIndex) { + throw Clipperz.Base.exception.AbstractMethod; + }, + + //------------------------------------------------------------------------- + + 'increment': function() { + var i; + var done; + + done = false; + i = this.length() - 1; + + while ((i>=0) && (done == false)) { + var currentByteValue; + + currentByteValue = this.byteAtIndex(i); + + if (currentByteValue == 0xff) { + this.setByteAtIndex(0, i); + if (i>= 0) { + i --; + } else { + done = true; + } + } else { + this.setByteAtIndex(currentByteValue + 1, i); + done = true; + } + } + }, + + //------------------------------------------------------------------------- + + 'arrayValues': function() { + throw Clipperz.Base.exception.AbstractMethod; + }, + + //------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" + +}); + +//============================================================================= +// +// Clipperz.ByteArray_hex +// +//============================================================================= +/* +Clipperz.ByteArray_hex = function (args) { + this._value = ""; + + if (typeof(args) != 'undefined') { + if (args.constructor == Array) { + this.appendBytes(args); + } else if (args.constructor == String) { + if (args.indexOf("0x") == 0) { + var value; + + value = args.substring(2).toLowerCase(); + if (/[0123456789abcdef]* /.test(value)) { the space in the regexp shoud be removed if the code is activate + if ((value.length % 2) == 0) { + this._value = value; + } else { + this._value = "0" + value; + } + } else { +MochiKit.Logging.logError("Clipperz.ByteArray should be inizialized with an hex string."); + throw Clipperz.ByteArray.exception.InvalidValue; + } + } else { + var value; + var i,c; + + c = args.length; + value = new Array(c); + for (i=0; i<c; i++) { + value.push(Clipperz.ByteArray.unicodeToUtf8HexString(args.charCodeAt(i))); + } + + this._value = value.join(""); + } + } else { + this.appendBytes(MochiKit.Base.extend(null, arguments)); + } + } + return this; +} + +Clipperz.ByteArray_hex.prototype = MochiKit.Base.update(new Clipperz.ByteArray_abstract(), { + + //------------------------------------------------------------------------- + + 'toString': function() { + return "Clipperz.ByteArray_hex"; + }, + + //------------------------------------------------------------------------- + + 'clone': function() { + var result; + + result = this.newInstance(); + result._value = this._value; + + return result; + }, + + //------------------------------------------------------------------------- + + 'newInstance': function() { + return new Clipperz.ByteArray_hex(); + }, + + //------------------------------------------------------------------------- + + 'reset': function() { + this._value = ""; + }, + + //------------------------------------------------------------------------- + + 'length': function() { + return (this._value.length / 2); + }, + + //------------------------------------------------------------------------- + + 'appendBlock': function(aBlock) { + this._value = this._value += aBlock.toHexString().substring(2); + + return this; + }, + + //------------------------------------------------------------------------- + + 'appendByte': function(aValue) { + if (aValue != null) { + this.checkByteValue(aValue); + this._value += Clipperz.ByteArray.byteToHex(aValue); + } + + return this; + }, + + //------------------------------------------------------------------------- + + 'byteAtIndex': function(anIndex) { + return parseInt(this._value.substr(anIndex*2, 2), 16); + }, + + 'setByteAtIndex': function(aValue, anIndex) { + var missingBytes; + + this.checkByteValue(aValue); + + missingBytes = anIndex - this.length(); + + if (missingBytes < 0) { + var currentValue; + var firstCutIndex; + var secondCutIndex; + + firstCutIndex = anIndex * 2; + secondCutIndex = firstCutIndex + 2; + currentValue = this._value; + this._value = currentValue.substring(0, firstCutIndex) + + Clipperz.ByteArray.byteToHex(aValue) + + currentValue.substring(secondCutIndex); + } else if (missingBytes == 0) { + this.appendByte(aValue); + } else { + var i,c; + + c = missingBytes; + for (i=0; i<c; i++) { + this.appendByte(0); + } + + this.appendByte(aValue); + } + }, + + //------------------------------------------------------------------------- + + 'toHexString': function() { + return "0x" + this._value; + }, + + //------------------------------------------------------------------------- + + 'split': function(aStartingIndex, anEndingIndex) { + var result; + var startingIndex; + var endingIndex; + + result = this.newInstance(); + + startingIndex = aStartingIndex * 2; + if (typeof(anEndingIndex) != 'undefined') { + endingIndex = anEndingIndex * 2; + result._value = this._value.substring(startingIndex, endingIndex); + } else { + result._value = this._value.substring(startingIndex); + } + + return result; + }, + + //------------------------------------------------------------------------- + + 'arrayValues': function() { + var result; + var i,c; + + c = this.length(); + + result = new Array(c); + for (i=0; i<c; i++) { + result[i] = this.byteAtIndex(i); + } + + return result; + }, + + //------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" +}); +*/ + +//============================================================================= +// +// Clipperz.ByteArray_array +// +//============================================================================= + +Clipperz.ByteArray_array = function (args) { + if (typeof(args) != 'undefined') { + if (args.constructor == Array) { + this._value = args.slice(0); + } else if (args.constructor == String) { + var result; + var value; + var i, c; + + if (args.indexOf("0x") == 0) { + + value = args.substring(2).toLowerCase(); + if (/[0123456789abcdef]*/.test(value)) { + if ((value.length % 2) != 0) { + value = "0" + value; + } + } else { +MochiKit.Logging.logError("Clipperz.ByteArray should be inizialized with an hex string."); + throw Clipperz.ByteArray.exception.InvalidValue; + } + + c = value.length / 2 + result = new Array(c); + for (i=0; i<c; i++) { + result[i] = parseInt(value.substr(i*2, 2), 16); + } + + } else { + var unicode; + result = []; + c = args.length; + for (i=0; i<c; i++) { +// Clipperz.ByteArray.pushUtf8BytesOfUnicodeChar(result, args.charCodeAt(i)); + + unicode = args.charCodeAt(i); + if (unicode <= 0x7f) { // 0x00000000 - 0x0000007f -> 0xxxxxxx + result.push(unicode); + // } else if ((unicode >= 0x80) && (unicode <= 0x7ff)) { // 0x00000080 - 0x000007ff -> 110xxxxx 10xxxxxx + } else if (unicode <= 0x7ff) { // 0x00000080 - 0x000007ff -> 110xxxxx 10xxxxxx + result.push((unicode >> 6) | 0xc0); + result.push((unicode & 0x3F) | 0x80); + // } else if ((unicode >= 0x0800) && (unicode <= 0xffff)) { // 0x00000800 - 0x0000ffff -> 1110xxxx 10xxxxxx 10xxxxxx + } else if (unicode <= 0xffff) { // 0x00000800 - 0x0000ffff -> 1110xxxx 10xxxxxx 10xxxxxx + result.push((unicode >> 12) | 0xe0); + result.push(((unicode >> 6) & 0x3f) | 0x80); + result.push((unicode & 0x3f) | 0x80); + } else { // 0x00010000 - 0x001fffff -> 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + result.push((unicode >> 18) | 0xf0); + result.push(((unicode >> 12) & 0x3f) | 0x80); + result.push(((unicode >> 6) & 0x3f) | 0x80); + result.push((unicode & 0x3f) | 0x80); + } + } + } + + + this._value = result; + } else { + this._value = []; + this.appendBytes(MochiKit.Base.extend(null, arguments)); + } + } else { + this._value = []; + } + + return this; +} + +Clipperz.ByteArray_array.prototype = MochiKit.Base.update(new Clipperz.ByteArray_abstract(), { + + //------------------------------------------------------------------------- + + 'toString': function() { + return "Clipperz.ByteArray_array"; + }, + + //------------------------------------------------------------------------- + + 'clone': function() { + var result; + + result = this.newInstance(); + result.appendBytes(this._value); + + return result; + }, + + //------------------------------------------------------------------------- + + 'newInstance': function() { + return new Clipperz.ByteArray_array(); + }, + + //------------------------------------------------------------------------- + + 'reset': function() { + this._value = []; + }, + + //------------------------------------------------------------------------- + + 'length': function() { + return (this._value.length); + }, + + //------------------------------------------------------------------------- + + 'appendBlock': function(aBlock) { + MochiKit.Base.extend(this._value, aBlock._value); + + return this; + }, + + //------------------------------------------------------------------------- + + 'appendByte': function(aValue) { + if (aValue != null) { + this.checkByteValue(aValue); + this._value.push(aValue); + } + + return this; + }, + + //------------------------------------------------------------------------- + + 'byteAtIndex': function(anIndex) { + return this._value[anIndex]; + }, + + 'setByteAtIndex': function(aValue, anIndex) { + var missingBytes; + + this.checkByteValue(aValue); + + missingBytes = anIndex - this.length(); + + if (missingBytes < 0) { + this._value[anIndex] = aValue; + } else if (missingBytes == 0) { + this._value.push(aValue); + } else { + var i,c; + + c = missingBytes; + for (i=0; i<c; i++) { + this._value.push(0); + } + + this._value.push(aValue); + } + }, + + //------------------------------------------------------------------------- + + 'toHexString': function() { + var result; + var i, c; + + result = "0x"; + c = this.length(); + for (i=0; i<c; i++) { + result += Clipperz.ByteArray.byteToHex(this._value[i]); + } + + return result; + }, + + //------------------------------------------------------------------------- + + 'split': function(aStartingIndex, anEndingIndex) { + var result; + + result = this.newInstance(); + result._value = this._value.slice(aStartingIndex, anEndingIndex ? anEndingIndex : this.length()); + + return result; + }, + + //------------------------------------------------------------------------- + + 'arrayValues': function() { + return this._value.slice(0); + }, + + //------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" +}); + + + + + +//============================================================================= +// +// Clipperz.ByteArray_string +// +//============================================================================= +/* +Clipperz.ByteArray_string = function (args) { + this._value = ""; + + if (typeof(args) != 'undefined') { + if (args.constructor == Array) { + this.appendBytes(args); + } else if (args.constructor == String) { + var result; + var value; + var i, c; + + if (args.indexOf("0x") == 0) { + + value = args.substring(2).toLowerCase(); + if (/[0123456789abcdef]* /.test(value)) { the space in the regexp shoud be removed if the code is activated + if ((value.length % 2) != 0) { + value = "0" + value; + } + } else { +MochiKit.Logging.logError("Clipperz.ByteArray should be inizialized with an hex string."); + throw Clipperz.ByteArray.exception.InvalidValue; + } + } else { + value = ""; + c = args.length; + for (i=0; i<c; i++) { + value += Clipperz.ByteArray.unicodeToUtf8HexString(args.charCodeAt(i)); + } + } + + c = value.length / 2 + for (i=0; i<c; i++) { + this.appendByte(parseInt(value.substr(i*2, 2), 16)); + } + } else { + this.appendBytes(MochiKit.Base.extend(null, arguments)); + } + } + + return this; +} + +Clipperz.ByteArray_string.prototype = MochiKit.Base.update(new Clipperz.ByteArray_abstract(), { + + //------------------------------------------------------------------------- + + 'toString': function() { + return "Clipperz.ByteArray_string"; + }, + + //------------------------------------------------------------------------- + + 'clone': function() { + var result; + + result = this.newInstance(); + result._value = this._value; + + return result; + }, + + //------------------------------------------------------------------------- + + 'newInstance': function() { + return new Clipperz.ByteArray_string(); + }, + + //------------------------------------------------------------------------- + + 'reset': function() { + this._value = ""; + }, + + //------------------------------------------------------------------------- + + 'length': function() { + return (this._value.length); + }, + + //------------------------------------------------------------------------- + + 'appendBlock': function(aBlock) { + this._value += aBlock._value; + + return this; + }, + + //------------------------------------------------------------------------- + + 'appendByte': function(aValue) { + if (aValue != null) { + this.checkByteValue(aValue); + this._value += String.fromCharCode(aValue); + } + + return this; + }, + + //------------------------------------------------------------------------- + + 'byteAtIndex': function(anIndex) { + return this._value.charCodeAt(anIndex); + }, + + 'setByteAtIndex': function(aValue, anIndex) { + var missingBytes; + + this.checkByteValue(aValue); + + missingBytes = anIndex - this.length(); + + if (missingBytes < 0) { + this._value = this._value.substring(0, anIndex) + String.fromCharCode(aValue) + this._value.substring(anIndex + 1); + } else if (missingBytes == 0) { + this.appendByte(aValue); + } else { + var i,c; + + c = missingBytes; + for (i=0; i<c; i++) { + this.appendByte(0); + } + + this.appendByte(aValue); + } + }, + + //------------------------------------------------------------------------- + + 'toHexString': function() { + var result; + var i, c; + + result = "0x"; + c = this.length(); + for (i=0; i<c; i++) { + result += Clipperz.ByteArray.byteToHex(this.byteAtIndex(i)); + } + + return result; + }, + + //------------------------------------------------------------------------- + + 'split': function(aStartingIndex, anEndingIndex) { + var result; + result = this.newInstance(); + result._value = this._value.substring(aStartingIndex, anEndingIndex ? anEndingIndex : this.length()); + + return result; + }, + + //------------------------------------------------------------------------- + + 'arrayValues': function() { + var result; + var i,c; + + c = this.length(); + + result = new Array(c); + for (i=0; i<c; i++) { + result[i] = this.byteAtIndex(i); + } + + return result; + }, + + //------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" +}); +*/ + +//============================================================================= +// +// Clipperz.ByteArray +// +//============================================================================= + +Clipperz.ByteArray = Clipperz.ByteArray_array; +//Clipperz.ByteArray = Clipperz.ByteArray_string; +//Clipperz.ByteArray = Clipperz.ByteArray_hex; + +//############################################################################# + +Clipperz.ByteArray.byteToHex = function(aByte) { + return ((aByte < 16) ? "0" : "") + aByte.toString(16); +} + + +Clipperz.ByteArray.unicodeToUtf8HexString = function(aUnicode) { + var result; + var self; + + self = Clipperz.ByteArray; + + if (aUnicode <= 0x7f) { // 0x00000000 - 0x0000007f -> 0xxxxxxx + result = self.byteToHex(aUnicode); +// } else if ((aUnicode >= 0x80) && (aUnicode <= 0x7ff)) { // 0x00000080 - 0x000007ff -> 110xxxxx 10xxxxxx + } else if (aUnicode <= 0x7ff) { // 0x00000080 - 0x000007ff -> 110xxxxx 10xxxxxx + result = self.byteToHex((aUnicode >> 6) | 0xc0); + result += self.byteToHex((aUnicode & 0x3F) | 0x80); +// } else if ((aUnicode >= 0x0800) && (aUnicode <= 0xffff)) { // 0x00000800 - 0x0000ffff -> 1110xxxx 10xxxxxx 10xxxxxx + } else if (aUnicode <= 0xffff) { // 0x00000800 - 0x0000ffff -> 1110xxxx 10xxxxxx 10xxxxxx + result = self.byteToHex((aUnicode >> 12) | 0xe0); + result += self.byteToHex(((aUnicode >> 6) & 0x3f) | 0x80); + result += self.byteToHex((aUnicode & 0x3f) | 0x80); + } else { // 0x00010000 - 0x001fffff -> 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + result = self.byteToHex((aUnicode >> 18) | 0xf0); + result += self.byteToHex(((aUnicode >> 12) & 0x3f) | 0x80); + result += self.byteToHex(((aUnicode >> 6) & 0x3f) | 0x80); + result += self.byteToHex((aUnicode & 0x3f) | 0x80); + } + + return result; +} + +Clipperz.ByteArray.pushUtf8BytesOfUnicodeChar = function(anArray, aUnicode) { + var self; + + self = Clipperz.ByteArray; + + if (aUnicode <= 0x7f) { // 0x00000000 - 0x0000007f -> 0xxxxxxx + anArray.push(aUnicode); +// } else if ((aUnicode >= 0x80) && (aUnicode <= 0x7ff)) { // 0x00000080 - 0x000007ff -> 110xxxxx 10xxxxxx + } else if (aUnicode <= 0x7ff) { // 0x00000080 - 0x000007ff -> 110xxxxx 10xxxxxx + anArray.push((aUnicode >> 6) | 0xc0); + anArray.push((aUnicode & 0x3F) | 0x80); +// } else if ((aUnicode >= 0x0800) && (aUnicode <= 0xffff)) { // 0x00000800 - 0x0000ffff -> 1110xxxx 10xxxxxx 10xxxxxx + } else if (aUnicode <= 0xffff) { // 0x00000800 - 0x0000ffff -> 1110xxxx 10xxxxxx 10xxxxxx + anArray.push((aUnicode >> 12) | 0xe0); + anArray.push(((aUnicode >> 6) & 0x3f) | 0x80); + anArray.push((aUnicode & 0x3f) | 0x80); + } else { // 0x00010000 - 0x001fffff -> 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + anArray.push((aUnicode >> 18) | 0xf0); + anArray.push(((aUnicode >> 12) & 0x3f) | 0x80); + anArray.push(((aUnicode >> 6) & 0x3f) | 0x80); + anArray.push((aUnicode & 0x3f) | 0x80); + } +} + +Clipperz.ByteArray.prefixMatchingBits = function (aValue, bValue) { + var result; + var i,c; + + result = 0; + + c = Math.min(aValue.length(), bValue.length()); + i = 0; + while (i<c && (aValue.byteAtIndex(i) == bValue.byteAtIndex(i))) { + result += 8; + i++; + } + + if (i<c) { + var xorValue; + + xorValue = (aValue.byteAtIndex(i) ^ bValue.byteAtIndex(i)); + + if (xorValue >= 128) { + result += 0; + } else if (xorValue >= 64) { + result += 1; + } else if (xorValue >= 32) { + result += 2; + } else if (xorValue >= 16) { + result += 3; + } else if (xorValue >= 8) { + result += 4; + } else if (xorValue >= 4) { + result += 5; + } else if (xorValue >= 2) { + result += 6; + } else if (xorValue >= 1) { + result += 7; + } + } + + return result; +}; + +Clipperz.ByteArray.exception = { + InvalidValue: new MochiKit.Base.NamedError("Clipperz.ByteArray.exception.InvalidValue") +}; + +//############################################################################# + +Clipperz.ByteArrayIterator = function(args) { + args = args || {}; + + this._byteArray = args.byteArray; + this._blockSize = args.blockSize; + this._finalPadding = args.finalPadding || false; + + this._currentPosition = 0; + + return this; +} + +Clipperz.ByteArrayIterator.prototype = MochiKit.Base.update(null, { + + //------------------------------------------------------------------------- + + 'toString': function() { + return "Clipperz.ByteArrayIterator"; + }, + + //------------------------------------------------------------------------- + + 'blockSize': function() { + var result; + + result = this._blockSize; + + return result; + }, + + //------------------------------------------------------------------------- + + 'currentPosition': function() { + var result; + + result = this._currentPosition; + + return result; + }, + + //------------------------------------------------------------------------- + + 'byteArray': function() { + var result; + + result = this._byteArray; + + return result; + }, + + //------------------------------------------------------------------------- + + 'finalPadding': function() { + var result; + + result = this._finalPadding; + + return result; + }, + + //------------------------------------------------------------------------- + + 'nextBlock': function() { + var result; + var currentPosition; + var byteArrayLength; + + currentPosition = this._currentPosition; + byteArrayLength = this.byteArray().length(); + + if (currentPosition < byteArrayLength) { + var i,c; + + c = this.blockSize(); + result = new Array(c); + for (i=0; i<c; i++) { + if (currentPosition < byteArrayLength) { + result[i] = this.byteArray().byteAtIndex(currentPosition); + currentPosition++; + } else if (this.finalPadding() == true) { + result[i] = 0; + } + } + + this._currentPosition = currentPosition; + } else { + result = null; + } + + return result; + }, + + //------------------------------------------------------------------------- + + 'nextBlockArray': function() { + var result; + var nextBlock; + + nextBlock = this.nextBlock(); + + if (nextBlock != null) { + result = new Clipperz.ByteArray(nextBlock); + } else { + result = null; + } + + return result; + }, + + //----------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" + +}); diff --git a/frontend/gamma/js/ClipperzCryptoLibrary/ECC/BinaryField/Curve.js b/frontend/gamma/js/ClipperzCryptoLibrary/ECC/BinaryField/Curve.js new file mode 100644 index 0000000..9c61bab --- a/dev/null +++ b/frontend/gamma/js/ClipperzCryptoLibrary/ECC/BinaryField/Curve.js @@ -0,0 +1,545 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +//try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { +// throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; +//} +if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } +if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; } + +Clipperz.Crypto.ECC.BinaryField.Curve = function(args) { + args = args || {}; + + this._modulus = args.modulus; + + this._a = args.a; + this._b = args.b; + this._G = args.G; + this._r = args.r; + this._h = args.h; + + this._finiteField = null; + + return this; +} + +Clipperz.Crypto.ECC.BinaryField.Curve.prototype = MochiKit.Base.update(null, { + + 'asString': function() { + return "Clipperz.Crypto.ECC.BinaryField.Curve"; + }, + + //----------------------------------------------------------------------------- + + 'modulus': function() { + return this._modulus; + }, + + 'a': function() { + return this._a; + }, + + 'b': function() { + return this._b; + }, + + 'G': function() { + return this._G; + }, + + 'r': function() { + return this._r; + }, + + 'h': function() { + return this._h; + }, + + //----------------------------------------------------------------------------- + + 'finiteField': function() { + if (this._finiteField == null) { + this._finiteField = new Clipperz.Crypto.ECC.BinaryField.FiniteField({modulus:this.modulus()}) + } + + return this._finiteField; + }, + + //----------------------------------------------------------------------------- + + 'negate': function(aPointA) { + var result; + + result = new Clipperz.Crypto.ECC.Point({x:aPointA.x(), y:this.finiteField().add(aPointA.y(), aPointA.x())}) + + return result; + }, + + //----------------------------------------------------------------------------- + + 'add': function(aPointA, aPointB) { + var result; + +//console.log(">>> ECC.BinaryField.Curve.add"); + if (aPointA.isZero()) { +//console.log("--- pointA == zero"); + result = aPointB; + } else if (aPointB.isZero()) { +//console.log("--- pointB == zero"); + result = aPointA; + } else if ( (aPointA.x().compare(aPointB.x()) == 0) && ((aPointA.y().compare(aPointB.y()) != 0) || aPointB.x().isZero())) { +//console.log("compare A.x - B.x: ", aPointA.x().compare(aPointB.x())); +//console.log("compare A.y - B.y: ", (aPointA.y().compare(aPointB.y()) != 0)); +//console.log("compare B.x.isZero(): ", aPointB.x().isZero()); + +//console.log("--- result = zero"); + result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O}); + } else { +//console.log("--- result = ELSE"); + var f2m; + var x, y; + var lambda; + var aX, aY, bX, bY; + + aX = aPointA.x()._value; + aY = aPointA.y()._value; + bX = aPointB.x()._value; + bY = aPointB.y()._value; + + f2m = this.finiteField(); + + if (aPointA.x().compare(aPointB.x()) != 0) { +//console.log(" a.x != b.x"); + lambda = f2m._fastMultiply( + f2m._add(aY, bY), + f2m._inverse(f2m._add(aX, bX)) + ); + x = f2m._add(this.a()._value, f2m._square(lambda)); + f2m._overwriteAdd(x, lambda); + f2m._overwriteAdd(x, aX); + f2m._overwriteAdd(x, bX); + } else { +//console.log(" a.x == b.x"); + lambda = f2m._add(bX, f2m._fastMultiply(bY, f2m._inverse(bX))); +//console.log(" lambda: " + lambda.asString(16)); + x = f2m._add(this.a()._value, f2m._square(lambda)); +//console.log(" x (step 1): " + x.asString(16)); + f2m._overwriteAdd(x, lambda); +//console.log(" x (step 2): " + x.asString(16)); + } + + y = f2m._fastMultiply(f2m._add(bX, x), lambda); +//console.log(" y (step 1): " + y.asString(16)); + f2m._overwriteAdd(y, x); +//console.log(" y (step 2): " + y.asString(16)); + f2m._overwriteAdd(y, bY); +//console.log(" y (step 3): " + y.asString(16)); + + result = new Clipperz.Crypto.ECC.BinaryField.Point({x:new Clipperz.Crypto.ECC.BinaryField.Value(x), y:new Clipperz.Crypto.ECC.BinaryField.Value(y)}) + } +//console.log("<<< ECC.BinaryField.Curve.add"); + + return result; + }, + + //----------------------------------------------------------------------------- + + 'addTwice': function(aPointA) { + return this.add(aPointA, aPointA); + }, + + //----------------------------------------------------------------------------- + + 'overwriteAdd': function(aPointA, aPointB) { + if (aPointA.isZero()) { +// result = aPointB; + aPointA._x._value = aPointB._x._value; + aPointA._y._value = aPointB._y._value; + } else if (aPointB.isZero()) { +// result = aPointA; + } else if ( (aPointA.x().compare(aPointB.x()) == 0) && ((aPointA.y().compare(aPointB.y()) != 0) || aPointB.x().isZero())) { +// result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O}); + aPointA._x = Clipperz.Crypto.ECC.BinaryField.Value.O; + aPointA._y = Clipperz.Crypto.ECC.BinaryField.Value.O; + } else { + var f2m; + var x, y; + var lambda; + var aX, aY, bX, bY; + + aX = aPointA.x()._value; + aY = aPointA.y()._value; + bX = aPointB.x()._value; + bY = aPointB.y()._value; + + f2m = this.finiteField(); + + if (aPointA.x().compare(aPointB.x()) != 0) { +//console.log(" a.x != b.x"); + lambda = f2m._fastMultiply( + f2m._add(aY, bY), + f2m._inverse(f2m._add(aX, bX)) + ); + x = f2m._add(this.a()._value, f2m._square(lambda)); + f2m._overwriteAdd(x, lambda); + f2m._overwriteAdd(x, aX); + f2m._overwriteAdd(x, bX); + } else { +//console.log(" a.x == b.x"); + lambda = f2m._add(bX, f2m._fastMultiply(bY, f2m._inverse(bX))); +//console.log(" lambda: " + lambda.asString(16)); + x = f2m._add(this.a()._value, f2m._square(lambda)); +//console.log(" x (step 1): " + x.asString(16)); + f2m._overwriteAdd(x, lambda); +//console.log(" x (step 2): " + x.asString(16)); + } + + y = f2m._fastMultiply(f2m._add(bX, x), lambda); +//console.log(" y (step 1): " + y.asString(16)); + f2m._overwriteAdd(y, x); +//console.log(" y (step 2): " + y.asString(16)); + f2m._overwriteAdd(y, bY); +//console.log(" y (step 3): " + y.asString(16)); + +// result = new Clipperz.Crypto.ECC.BinaryField.Point({x:new Clipperz.Crypto.ECC.BinaryField.Value(x), y:new Clipperz.Crypto.ECC.BinaryField.Value(y)}) + aPointA._x._value = x; + aPointA._y._value = y; + + } +//console.log("<<< ECC.BinaryField.Curve.add"); + + return result; + }, + + //----------------------------------------------------------------------------- + + 'multiply': function(aValue, aPoint) { + var result; + +//console.profile(); + result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O}); + + if (aValue.isZero() == false) { + var k, Q; + var i; + var countIndex; countIndex = 0; + + if (aValue.compare(Clipperz.Crypto.ECC.BinaryField.Value.O) > 0) { + k = aValue; + Q = aPoint; + } else { +MochiKit.Logging.logError("The Clipperz.Crypto.ECC.BinaryFields.Value does not work with negative values!!!!"); + k = aValue.negate(); + Q = this.negate(aPoint); + } + +//console.log("k: " + k.toString(16)); +//console.log("k.bitSize: " + k.bitSize()); + for (i=k.bitSize()-1; i>=0; i--) { + result = this.add(result, result); +// this.overwriteAdd(result, result); + if (k.isBitSet(i)) { + result = this.add(result, Q); +// this.overwriteAdd(result, Q); + } + +// if (countIndex==100) {console.log("multiply.break"); break;} else countIndex++; + } + } +//console.profileEnd(); + + return result; + }, + + //----------------------------------------------------------------------------- + + 'deferredMultiply': function(aValue, aPoint) { + var deferredResult; + var result; + +MochiKit.Logging.logDebug(">>> deferredMultiply - value: " + aValue + ", point: " + aPoint); +//console.profile("ECC.Curve.multiply"); + deferredResult = new MochiKit.Async.Deferred(); +//deferredResult.addCallback(function(res) {console.profile("ECC.Curve.deferredMultiply"); return res;} ); +//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 1: " + res); return res;}); + + result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O}); +//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 2: " + res); return res;}); + + if (aValue.isZero() == false) { + var k, Q; + var i; + var countIndex; countIndex = 0; + + if (aValue.compare(Clipperz.Crypto.ECC.BinaryField.Value.O) > 0) { + k = aValue; + Q = aPoint; + } else { +MochiKit.Logging.logError("The Clipperz.Crypto.ECC.BinaryFields.Value does not work with negative values!!!!"); + k = aValue.negate(); + Q = this.negate(aPoint); + } + +//console.log("k: " + k.toString(16)); +//console.log("k.bitSize: " + k.bitSize()); + +//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 3: " + res); return res;}); + for (i=k.bitSize()-1; i>=0; i--) { +//MochiKit.Logging.logDebug("====> " + i); +//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 4 > i = " + i + ": " + res); return res;}); + deferredResult.addMethod(this, "addTwice"); +//# result = this.add(result, result); +// this.overwriteAdd(result, result); + if (k.isBitSet(i)) { + deferredResult.addMethod(this, "add", Q); +//# result = this.add(result, Q); +// this.overwriteAdd(result, Q); + } + if (i%20 == 0) {deferredResult.addCallback(MochiKit.Async.wait, 0.1);} + +// if (countIndex==100) {console.log("multiply.break"); break;} else countIndex++; +//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 4 < i = " + i + ": " + res); return res;}); + } +//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 4: " + res); return res;}); + } +//#console.profileEnd(); +//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 5: " + res); return res;}); +//deferredResult.addBoth(function(res) {console.profileEnd(); return res;}); +//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 6: " + res); return res;}); + deferredResult.callback(result); + +//# return result; + return deferredResult; + }, + + //----------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" +}); + + +//############################################################################# + +Clipperz.Crypto.ECC.StandardCurves = {}; + +MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, { +/* + '_K571': null, + 'K571': function() { + if (Clipperz.Crypto.ECC.StandardCurves._K571 == null) { + Clipperz.Crypto.ECC.StandardCurves._K571 = new Clipperz.Crypto.ECC.BinaryField.Curve({ + modulus: new Clipperz.Crypto.ECC.BinaryField.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000425', 16), + a: new Clipperz.Crypto.ECC.BinaryField.Value('0', 16), + b: new Clipperz.Crypto.ECC.BinaryField.Value('1', 16), + G: new Clipperz.Crypto.ECC.BinaryField.Point({ + x: new Clipperz.Crypto.ECC.BinaryField.Value('026eb7a8 59923fbc 82189631 f8103fe4 ac9ca297 0012d5d4 60248048 01841ca4 43709584 93b205e6 47da304d b4ceb08c bbd1ba39 494776fb 988b4717 4dca88c7 e2945283 a01c8972', 16), + y: new Clipperz.Crypto.ECC.BinaryField.Value('0349dc80 7f4fbf37 4f4aeade 3bca9531 4dd58cec 9f307a54 ffc61efc 006d8a2c 9d4979c0 ac44aea7 4fbebbb9 f772aedc b620b01a 7ba7af1b 320430c8 591984f6 01cd4c14 3ef1c7a3', 16) + }), + r: new Clipperz.Crypto.ECC.BinaryField.Value('02000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 131850e1 f19a63e4 b391a8db 917f4138 b630d84b e5d63938 1e91deb4 5cfe778f 637c1001', 16), + h: new Clipperz.Crypto.ECC.BinaryField.Value('4', 16) + }); + } + + return Clipperz.Crypto.ECC.StandardCurves._K571; + }, + + + + '_K283': null, + 'K283': function() { // f(z) = z^283 + z^12 + z^7 + z^5 + 1 + if (Clipperz.Crypto.ECC.StandardCurves._K283 == null) { + Clipperz.Crypto.ECC.StandardCurves._K283 = new Clipperz.Crypto.ECC.BinaryField.Curve({ + modulus: new Clipperz.Crypto.ECC.BinaryField.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000010a1', 16), + a: new Clipperz.Crypto.ECC.BinaryField.Value('0', 16), + b: new Clipperz.Crypto.ECC.BinaryField.Value('1', 16), + G: new Clipperz.Crypto.ECC.BinaryField.Point({ + x: new Clipperz.Crypto.ECC.BinaryField.Value('0503213f 78ca4488 3f1a3b81 62f188e5 53cd265f 23c1567a 16876913 b0c2ac24 58492836', 16), + y: new Clipperz.Crypto.ECC.BinaryField.Value('01ccda38 0f1c9e31 8d90f95d 07e5426f e87e45c0 e8184698 e4596236 4e341161 77dd2259', 16) + }), + r: new Clipperz.Crypto.ECC.BinaryField.Value('01ffffff ffffffff ffffffff ffffffff ffffe9ae 2ed07577 265dff7f 94451e06 1e163c61', 16), + h: new Clipperz.Crypto.ECC.BinaryField.Value('4', 16) + }); + } + + return Clipperz.Crypto.ECC.StandardCurves._K283; + }, +*/ + //----------------------------------------------------------------------------- + + '_B571': null, + 'B571': function() { // f(z) = z^571 + z^10 + z^5 + z^2 + 1 + if (Clipperz.Crypto.ECC.StandardCurves._B571 == null) { + Clipperz.Crypto.ECC.StandardCurves._B571 = new Clipperz.Crypto.ECC.BinaryField.Curve({ + modulus: new Clipperz.Crypto.ECC.BinaryField.Value('80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425', 16), + a: new Clipperz.Crypto.ECC.BinaryField.Value('1', 16), + b: new Clipperz.Crypto.ECC.BinaryField.Value('02f40e7e2221f295de297117b7f3d62f5c6a97ffcb8ceff1cd6ba8ce4a9a18ad84ffabbd8efa59332be7ad6756a66e294afd185a78ff12aa520e4de739baca0c7ffeff7f2955727a', 16), + G: new Clipperz.Crypto.ECC.BinaryField.Point({ + x: new Clipperz.Crypto.ECC.BinaryField.Value('0303001d 34b85629 6c16c0d4 0d3cd775 0a93d1d2 955fa80a a5f40fc8 db7b2abd bde53950 f4c0d293 cdd711a3 5b67fb14 99ae6003 8614f139 4abfa3b4 c850d927 e1e7769c 8eec2d19', 16), + y: new Clipperz.Crypto.ECC.BinaryField.Value('037bf273 42da639b 6dccfffe b73d69d7 8c6c27a6 009cbbca 1980f853 3921e8a6 84423e43 bab08a57 6291af8f 461bb2a8 b3531d2f 0485c19b 16e2f151 6e23dd3c 1a4827af 1b8ac15b', 16) + }), + r: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff e661ce18 ff559873 08059b18 6823851e c7dd9ca1 161de93d 5174d66e 8382e9bb 2fe84e47', 16), + h: new Clipperz.Crypto.ECC.BinaryField.Value('2', 16) + +// S: new Clipperz.Crypto.ECC.BinaryField.Value('2aa058f73a0e33ab486b0f610410c53a7f132310', 10), +// n: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe661ce18ff55987308059b186823851ec7dd9ca1161de93d5174d66e8382e9bb2fe84e47', 16) + }); + + //----------------------------------------------------------------------------- + // + // Guide to Elliptic Curve Cryptography + // Darrel Hankerson, Alfred Menezes, Scott Vanstone + // - Pag: 56, Alorithm 2.45 (with a typo!!!) + // + //----------------------------------------------------------------------------- + // + // http://www.milw0rm.com/papers/136 + // + // ------------------------------------------------------------------------- + // Polynomial Reduction Algorithm Modulo f571 + // ------------------------------------------------------------------------- + // + // Input: Polynomial p(x) of degree 1140 or less, stored as + // an array of 2T machinewords. + // Output: p(x) mod f571(x) + // + // FOR i = T-1, ..., 0 DO + // SET X := P[i+T] + // P[i] := P[i] ^ (X<<5) ^ (X<<7) ^ (X<<10) ^ (X<<15) + // P[i+1] := P[i+1] ^ (X>>17) ^ (X>>22) ^ (X>>25) ^ (X>>27) + // + // SET X := P[T-1] >> 27 + // P[0] := P[0] ^ X ^ (X<<2) ^ (X<<5) ^ (X<<10) + // P[T-1] := P[T-1] & 0x07ffffff + // + // RETURN P[T-1],...,P[0] + // + // ------------------------------------------------------------------------- + // + Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().slowModule = Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().module; + Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().module = function(aValue) { + var result; + + if (aValue.bitSize() > 1140) { + MochiKit.Logging.logWarning("ECC.StandarCurves.B571.finiteField().module: falling back to default implementation"); + result = Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().slowModule(aValue); + } else { + var C, T; + var i; + +//console.log(">>> binaryField.finiteField.(improved)module"); +// C = aValue.value().slice(0); + C = aValue._value.slice(0); + for (i=35; i>=18; i--) { + T = C[i]; + C[i-18] = (((C[i-18] ^ (T<<5) ^ (T<<7) ^ (T<<10) ^ (T<<15)) & 0xffffffff) >>> 0); + C[i-17] = ((C[i-17] ^ (T>>>27) ^ (T>>>25) ^ (T>>>22) ^ (T>>>17)) >>> 0); + } + T = (C[17] >>> 27); + C[0] = ((C[0] ^ T ^ ((T<<2) ^ (T<<5) ^ (T<<10)) & 0xffffffff) >>> 0); + C[17] = (C[17] & 0x07ffffff); + + for(i=18; i<=35; i++) { + C[i] = 0; + } + + result = new Clipperz.Crypto.ECC.BinaryField.Value(C); +//console.log("<<< binaryField.finiteField.(improved)module"); + } + + return result; + }; + } + + return Clipperz.Crypto.ECC.StandardCurves._B571; + }, + + //----------------------------------------------------------------------------- + + '_B283': null, + 'B283': function() { // f(z) = z^283 + z^12 + z^7 + z^5 + 1 + if (Clipperz.Crypto.ECC.StandardCurves._B283 == null) { + Clipperz.Crypto.ECC.StandardCurves._B283 = new Clipperz.Crypto.ECC.BinaryField.Curve({ +// modulus: new Clipperz.Crypto.ECC.BinaryField.Value('10000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000010a1', 16), + modulus: new Clipperz.Crypto.ECC.BinaryField.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000010a1', 16), + a: new Clipperz.Crypto.ECC.BinaryField.Value('1', 16), + b: new Clipperz.Crypto.ECC.BinaryField.Value('027b680a c8b8596d a5a4af8a 19a0303f ca97fd76 45309fa2 a581485a f6263e31 3b79a2f5', 16), + G: new Clipperz.Crypto.ECC.BinaryField.Point({ + x: new Clipperz.Crypto.ECC.BinaryField.Value('05f93925 8db7dd90 e1934f8c 70b0dfec 2eed25b8 557eac9c 80e2e198 f8cdbecd 86b12053', 16), + y: new Clipperz.Crypto.ECC.BinaryField.Value('03676854 fe24141c b98fe6d4 b20d02b4 516ff702 350eddb0 826779c8 13f0df45 be8112f4', 16) + }), + r: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffff ffffffff ffffffff ffffffff ffffef90 399660fc 938a9016 5b042a7c efadb307', 16), + h: new Clipperz.Crypto.ECC.BinaryField.Value('2', 16) + +// S: new Clipperz.Crypto.ECC.BinaryField.Value('2aa058f73a0e33ab486b0f610410c53a7f132310', 10), +// n: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe661ce18ff55987308059b186823851ec7dd9ca1161de93d5174d66e8382e9bb2fe84e47', 16) + }); + + //----------------------------------------------------------------------------- + // + // Guide to Elliptic Curve Cryptography + // Darrel Hankerson, Alfred Menezes, Scott Vanstone + // - Pag: 56, Alorithm 2.43 + // + //----------------------------------------------------------------------------- + Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().slowModule = Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().module; + Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().module = function(aValue) { + var result; + + if (aValue.bitSize() > 564) { + MochiKit.Logging.logWarning("ECC.StandarCurves.B283.finiteField().module: falling back to default implementation"); + result = Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().slowModule(aValue); + } else { + var C, T; + var i; + +//console.log(">>> binaryField.finiteField.(improved)module"); + C = aValue._value.slice(0); + for (i=17; i>=9; i--) { + T = C[i]; + C[i-9] = (((C[i-9] ^ (T<<5) ^ (T<<10) ^ (T<<12) ^ (T<<17)) & 0xffffffff) >>> 0); + C[i-8] = ((C[i-8] ^ (T>>>27) ^ (T>>>22) ^ (T>>>20) ^ (T>>>15)) >>> 0); + } + T = (C[8] >>> 27); + C[0] = ((C[0] ^ T ^ ((T<<5) ^ (T<<7) ^ (T<<12)) & 0xffffffff) >>> 0); + C[8] = (C[8] & 0x07ffffff); + + for(i=9; i<=17; i++) { + C[i] = 0; + } + + result = new Clipperz.Crypto.ECC.BinaryField.Value(C); +//console.log("<<< binaryField.finiteField.(improved)module"); + } + + return result; + }; + } + + return Clipperz.Crypto.ECC.StandardCurves._B283; + }, + + //----------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" +}); + +//############################################################################# + diff --git a/frontend/gamma/js/ClipperzCryptoLibrary/ECC/BinaryField/FiniteField.js b/frontend/gamma/js/ClipperzCryptoLibrary/ECC/BinaryField/FiniteField.js new file mode 100644 index 0000000..4d1ca67 --- a/dev/null +++ b/frontend/gamma/js/ClipperzCryptoLibrary/ECC/BinaryField/FiniteField.js @@ -0,0 +1,521 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +//try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { +// throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; +//} +if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } +if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; } + +Clipperz.Crypto.ECC.BinaryField.FiniteField = function(args) { + args = args || {}; + this._modulus = args.modulus; + + return this; +} + +Clipperz.Crypto.ECC.BinaryField.FiniteField.prototype = MochiKit.Base.update(null, { + + 'asString': function() { + return "Clipperz.Crypto.ECC.BinaryField.FiniteField (" + this.modulus().asString() + ")"; + }, + + //----------------------------------------------------------------------------- + + 'modulus': function() { + return this._modulus; + }, + + //----------------------------------------------------------------------------- + + '_module': function(aValue) { + var result; + var modulusComparison; +//console.log(">>> binaryField.finiteField.(standard)module"); + + modulusComparison = Clipperz.Crypto.ECC.BinaryField.Value._compare(aValue, this.modulus()._value); + + if (modulusComparison < 0) { + result = aValue; + } else if (modulusComparison == 0) { + result = [0]; + } else { + var modulusBitSize; + var resultBitSize; + + result = aValue; + + modulusBitSize = this.modulus().bitSize(); + resultBitSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(result); + while (resultBitSize >= modulusBitSize) { + Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(this.modulus()._value, resultBitSize - modulusBitSize)); + resultBitSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(result); + } + } +//console.log("<<< binaryField.finiteField.(standard)module"); + + return result; + }, + + 'module': function(aValue) { + return new Clipperz.Crypto.ECC.BinaryField.Value(this._module(aValue._value.slice(0))); + }, + + //----------------------------------------------------------------------------- + + '_add': function(a, b) { + return Clipperz.Crypto.ECC.BinaryField.Value._xor(a, b); + }, + + '_overwriteAdd': function(a, b) { + Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(a, b); + }, + + 'add': function(a, b) { + return new Clipperz.Crypto.ECC.BinaryField.Value(this._add(a._value, b._value)); + }, + + //----------------------------------------------------------------------------- + + 'negate': function(aValue) { + return aValue.clone(); + }, + + //----------------------------------------------------------------------------- + + '_multiply': function(a, b) { + var result; + var valueToXor; + var i,c; + + result = [0]; + valueToXor = b; + c = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(a); + for (i=0; i<c; i++) { + if (Clipperz.Crypto.ECC.BinaryField.Value._isBitSet(a, i) === true) { + Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, valueToXor); + } + valueToXor = Clipperz.Crypto.ECC.BinaryField.Value._overwriteShiftLeft(valueToXor, 1); + } + result = this._module(result); + + return result; + }, + + 'multiply': function(a, b) { + return new Clipperz.Crypto.ECC.BinaryField.Value(this._multiply(a._value, b._value)); + }, + + //----------------------------------------------------------------------------- + + '_fastMultiply': function(a, b) { + var result; + var B; + var i,c; + + result = [0]; + B = b.slice(0); // Is this array copy avoidable? + c = 32; + for (i=0; i<c; i++) { + var ii, cc; + + cc = a.length; + for (ii=0; ii<cc; ii++) { + if (((a[ii] >>> i) & 0x01) == 1) { + Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, B, ii); + } + } + + if (i < (c-1)) { + B = Clipperz.Crypto.ECC.BinaryField.Value._overwriteShiftLeft(B, 1); + } + } + result = this._module(result); + + return result; + }, + + 'fastMultiply': function(a, b) { + return new Clipperz.Crypto.ECC.BinaryField.Value(this._fastMultiply(a._value, b._value)); + }, + + //----------------------------------------------------------------------------- + // + // Guide to Elliptic Curve Cryptography + // Darrel Hankerson, Alfred Menezes, Scott Vanstone + // - Pag: 49, Alorithm 2.34 + // + //----------------------------------------------------------------------------- + + '_square': function(aValue) { + var result; + var value; + var c,i; + var precomputedValues; + + value = aValue; + result = new Array(value.length * 2); + precomputedValues = Clipperz.Crypto.ECC.BinaryField.FiniteField.squarePrecomputedBytes; + + c = value.length; + for (i=0; i<c; i++) { + result[i*2] = precomputedValues[(value[i] & 0x000000ff)]; + result[i*2] |= ((precomputedValues[(value[i] & 0x0000ff00) >>> 8]) << 16); + + result[i*2 + 1] = precomputedValues[(value[i] & 0x00ff0000) >>> 16]; + result[i*2 + 1] |= ((precomputedValues[(value[i] & 0xff000000) >>> 24]) << 16); + } + + return this._module(result); + }, + + 'square': function(aValue) { + return new Clipperz.Crypto.ECC.BinaryField.Value(this._square(aValue._value)); + }, + + //----------------------------------------------------------------------------- + + '_inverse': function(aValue) { + var result; + var b, c; + var u, v; + +// b = Clipperz.Crypto.ECC.BinaryField.Value.I._value; + b = [1]; +// c = Clipperz.Crypto.ECC.BinaryField.Value.O._value; + c = [0]; + u = this._module(aValue); + v = this.modulus()._value.slice(0); + + while (Clipperz.Crypto.ECC.BinaryField.Value._bitSize(u) > 1) { + var bitDifferenceSize; + + bitDifferenceSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(u) - Clipperz.Crypto.ECC.BinaryField.Value._bitSize(v); + if (bitDifferenceSize < 0) { + var swap; + + swap = u; + u = v; + v = swap; + + swap = c; + c = b; + b = swap; + + bitDifferenceSize = -bitDifferenceSize; + } + + u = this._add(u, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(v, bitDifferenceSize)); + b = this._add(b, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(c, bitDifferenceSize)); +// this._overwriteAdd(u, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(v, bitDifferenceSize)); +// this._overwriteAdd(b, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(c, bitDifferenceSize)); + } + + result = this._module(b); + + return result; + }, + + 'inverse': function(aValue) { + return new Clipperz.Crypto.ECC.BinaryField.Value(this._inverse(aValue._value)); + }, + + //----------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" +}); + + +Clipperz.Crypto.ECC.BinaryField.FiniteField.squarePrecomputedBytes = [ + 0x0000, // 0 = 0000 0000 -> 0000 0000 0000 0000 + 0x0001, // 1 = 0000 0001 -> 0000 0000 0000 0001 + 0x0004, // 2 = 0000 0010 -> 0000 0000 0000 0100 + 0x0005, // 3 = 0000 0011 -> 0000 0000 0000 0101 + 0x0010, // 4 = 0000 0100 -> 0000 0000 0001 0000 + 0x0011, // 5 = 0000 0101 -> 0000 0000 0001 0001 + 0x0014, // 6 = 0000 0110 -> 0000 0000 0001 0100 + 0x0015, // 7 = 0000 0111 -> 0000 0000 0001 0101 + 0x0040, // 8 = 0000 1000 -> 0000 0000 0100 0000 + 0x0041, // 9 = 0000 1001 -> 0000 0000 0100 0001 + 0x0044, // 10 = 0000 1010 -> 0000 0000 0100 0100 + 0x0045, // 11 = 0000 1011 -> 0000 0000 0100 0101 + 0x0050, // 12 = 0000 1100 -> 0000 0000 0101 0000 + 0x0051, // 13 = 0000 1101 -> 0000 0000 0101 0001 + 0x0054, // 14 = 0000 1110 -> 0000 0000 0101 0100 + 0x0055, // 15 = 0000 1111 -> 0000 0000 0101 0101 + + 0x0100, // 16 = 0001 0000 -> 0000 0001 0000 0000 + 0x0101, // 17 = 0001 0001 -> 0000 0001 0000 0001 + 0x0104, // 18 = 0001 0010 -> 0000 0001 0000 0100 + 0x0105, // 19 = 0001 0011 -> 0000 0001 0000 0101 + 0x0110, // 20 = 0001 0100 -> 0000 0001 0001 0000 + 0x0111, // 21 = 0001 0101 -> 0000 0001 0001 0001 + 0x0114, // 22 = 0001 0110 -> 0000 0001 0001 0100 + 0x0115, // 23 = 0001 0111 -> 0000 0001 0001 0101 + 0x0140, // 24 = 0001 1000 -> 0000 0001 0100 0000 + 0x0141, // 25 = 0001 1001 -> 0000 0001 0100 0001 + 0x0144, // 26 = 0001 1010 -> 0000 0001 0100 0100 + 0x0145, // 27 = 0001 1011 -> 0000 0001 0100 0101 + 0x0150, // 28 = 0001 1100 -> 0000 0001 0101 0000 + 0x0151, // 28 = 0001 1101 -> 0000 0001 0101 0001 + 0x0154, // 30 = 0001 1110 -> 0000 0001 0101 0100 + 0x0155, // 31 = 0001 1111 -> 0000 0001 0101 0101 + + 0x0400, // 32 = 0010 0000 -> 0000 0100 0000 0000 + 0x0401, // 33 = 0010 0001 -> 0000 0100 0000 0001 + 0x0404, // 34 = 0010 0010 -> 0000 0100 0000 0100 + 0x0405, // 35 = 0010 0011 -> 0000 0100 0000 0101 + 0x0410, // 36 = 0010 0100 -> 0000 0100 0001 0000 + 0x0411, // 37 = 0010 0101 -> 0000 0100 0001 0001 + 0x0414, // 38 = 0010 0110 -> 0000 0100 0001 0100 + 0x0415, // 39 = 0010 0111 -> 0000 0100 0001 0101 + 0x0440, // 40 = 0010 1000 -> 0000 0100 0100 0000 + 0x0441, // 41 = 0010 1001 -> 0000 0100 0100 0001 + 0x0444, // 42 = 0010 1010 -> 0000 0100 0100 0100 + 0x0445, // 43 = 0010 1011 -> 0000 0100 0100 0101 + 0x0450, // 44 = 0010 1100 -> 0000 0100 0101 0000 + 0x0451, // 45 = 0010 1101 -> 0000 0100 0101 0001 + 0x0454, // 46 = 0010 1110 -> 0000 0100 0101 0100 + 0x0455, // 47 = 0010 1111 -> 0000 0100 0101 0101 + + 0x0500, // 48 = 0011 0000 -> 0000 0101 0000 0000 + 0x0501, // 49 = 0011 0001 -> 0000 0101 0000 0001 + 0x0504, // 50 = 0011 0010 -> 0000 0101 0000 0100 + 0x0505, // 51 = 0011 0011 -> 0000 0101 0000 0101 + 0x0510, // 52 = 0011 0100 -> 0000 0101 0001 0000 + 0x0511, // 53 = 0011 0101 -> 0000 0101 0001 0001 + 0x0514, // 54 = 0011 0110 -> 0000 0101 0001 0100 + 0x0515, // 55 = 0011 0111 -> 0000 0101 0001 0101 + 0x0540, // 56 = 0011 1000 -> 0000 0101 0100 0000 + 0x0541, // 57 = 0011 1001 -> 0000 0101 0100 0001 + 0x0544, // 58 = 0011 1010 -> 0000 0101 0100 0100 + 0x0545, // 59 = 0011 1011 -> 0000 0101 0100 0101 + 0x0550, // 60 = 0011 1100 -> 0000 0101 0101 0000 + 0x0551, // 61 = 0011 1101 -> 0000 0101 0101 0001 + 0x0554, // 62 = 0011 1110 -> 0000 0101 0101 0100 + 0x0555, // 63 = 0011 1111 -> 0000 0101 0101 0101 + + 0x1000, // 64 = 0100 0000 -> 0001 0000 0000 0000 + 0x1001, // 65 = 0100 0001 -> 0001 0000 0000 0001 + 0x1004, // 66 = 0100 0010 -> 0001 0000 0000 0100 + 0x1005, // 67 = 0100 0011 -> 0001 0000 0000 0101 + 0x1010, // 68 = 0100 0100 -> 0001 0000 0001 0000 + 0x1011, // 69 = 0100 0101 -> 0001 0000 0001 0001 + 0x1014, // 70 = 0100 0110 -> 0001 0000 0001 0100 + 0x1015, // 71 = 0100 0111 -> 0001 0000 0001 0101 + 0x1040, // 72 = 0100 1000 -> 0001 0000 0100 0000 + 0x1041, // 73 = 0100 1001 -> 0001 0000 0100 0001 + 0x1044, // 74 = 0100 1010 -> 0001 0000 0100 0100 + 0x1045, // 75 = 0100 1011 -> 0001 0000 0100 0101 + 0x1050, // 76 = 0100 1100 -> 0001 0000 0101 0000 + 0x1051, // 77 = 0100 1101 -> 0001 0000 0101 0001 + 0x1054, // 78 = 0100 1110 -> 0001 0000 0101 0100 + 0x1055, // 79 = 0100 1111 -> 0001 0000 0101 0101 + + 0x1100, // 80 = 0101 0000 -> 0001 0001 0000 0000 + 0x1101, // 81 = 0101 0001 -> 0001 0001 0000 0001 + 0x1104, // 82 = 0101 0010 -> 0001 0001 0000 0100 + 0x1105, // 83 = 0101 0011 -> 0001 0001 0000 0101 + 0x1110, // 84 = 0101 0100 -> 0001 0001 0001 0000 + 0x1111, // 85 = 0101 0101 -> 0001 0001 0001 0001 + 0x1114, // 86 = 0101 0110 -> 0001 0001 0001 0100 + 0x1115, // 87 = 0101 0111 -> 0001 0001 0001 0101 + 0x1140, // 88 = 0101 1000 -> 0001 0001 0100 0000 + 0x1141, // 89 = 0101 1001 -> 0001 0001 0100 0001 + 0x1144, // 90 = 0101 1010 -> 0001 0001 0100 0100 + 0x1145, // 91 = 0101 1011 -> 0001 0001 0100 0101 + 0x1150, // 92 = 0101 1100 -> 0001 0001 0101 0000 + 0x1151, // 93 = 0101 1101 -> 0001 0001 0101 0001 + 0x1154, // 94 = 0101 1110 -> 0001 0001 0101 0100 + 0x1155, // 95 = 0101 1111 -> 0001 0001 0101 0101 + + 0x1400, // 96 = 0110 0000 -> 0001 0100 0000 0000 + 0x1401, // 97 = 0110 0001 -> 0001 0100 0000 0001 + 0x1404, // 98 = 0110 0010 -> 0001 0100 0000 0100 + 0x1405, // 99 = 0110 0011 -> 0001 0100 0000 0101 + 0x1410, // 100 = 0110 0100 -> 0001 0100 0001 0000 + 0x1411, // 101 = 0110 0101 -> 0001 0100 0001 0001 + 0x1414, // 102 = 0110 0110 -> 0001 0100 0001 0100 + 0x1415, // 103 = 0110 0111 -> 0001 0100 0001 0101 + 0x1440, // 104 = 0110 1000 -> 0001 0100 0100 0000 + 0x1441, // 105 = 0110 1001 -> 0001 0100 0100 0001 + 0x1444, // 106 = 0110 1010 -> 0001 0100 0100 0100 + 0x1445, // 107 = 0110 1011 -> 0001 0100 0100 0101 + 0x1450, // 108 = 0110 1100 -> 0001 0100 0101 0000 + 0x1451, // 109 = 0110 1101 -> 0001 0100 0101 0001 + 0x1454, // 110 = 0110 1110 -> 0001 0100 0101 0100 + 0x1455, // 111 = 0110 1111 -> 0001 0100 0101 0101 + + 0x1500, // 112 = 0111 0000 -> 0001 0101 0000 0000 + 0x1501, // 113 = 0111 0001 -> 0001 0101 0000 0001 + 0x1504, // 114 = 0111 0010 -> 0001 0101 0000 0100 + 0x1505, // 115 = 0111 0011 -> 0001 0101 0000 0101 + 0x1510, // 116 = 0111 0100 -> 0001 0101 0001 0000 + 0x1511, // 117 = 0111 0101 -> 0001 0101 0001 0001 + 0x1514, // 118 = 0111 0110 -> 0001 0101 0001 0100 + 0x1515, // 119 = 0111 0111 -> 0001 0101 0001 0101 + 0x1540, // 120 = 0111 1000 -> 0001 0101 0100 0000 + 0x1541, // 121 = 0111 1001 -> 0001 0101 0100 0001 + 0x1544, // 122 = 0111 1010 -> 0001 0101 0100 0100 + 0x1545, // 123 = 0111 1011 -> 0001 0101 0100 0101 + 0x1550, // 124 = 0111 1100 -> 0001 0101 0101 0000 + 0x1551, // 125 = 0111 1101 -> 0001 0101 0101 0001 + 0x1554, // 126 = 0111 1110 -> 0001 0101 0101 0100 + 0x1555, // 127 = 0111 1111 -> 0001 0101 0101 0101 + + 0x4000, // 128 = 1000 0000 -> 0100 0000 0000 0000 + 0x4001, // 129 = 1000 0001 -> 0100 0000 0000 0001 + 0x4004, // 130 = 1000 0010 -> 0100 0000 0000 0100 + 0x4005, // 131 = 1000 0011 -> 0100 0000 0000 0101 + 0x4010, // 132 = 1000 0100 -> 0100 0000 0001 0000 + 0x4011, // 133 = 1000 0101 -> 0100 0000 0001 0001 + 0x4014, // 134 = 1000 0110 -> 0100 0000 0001 0100 + 0x4015, // 135 = 1000 0111 -> 0100 0000 0001 0101 + 0x4040, // 136 = 1000 1000 -> 0100 0000 0100 0000 + 0x4041, // 137 = 1000 1001 -> 0100 0000 0100 0001 + 0x4044, // 138 = 1000 1010 -> 0100 0000 0100 0100 + 0x4045, // 139 = 1000 1011 -> 0100 0000 0100 0101 + 0x4050, // 140 = 1000 1100 -> 0100 0000 0101 0000 + 0x4051, // 141 = 1000 1101 -> 0100 0000 0101 0001 + 0x4054, // 142 = 1000 1110 -> 0100 0000 0101 0100 + 0x4055, // 143 = 1000 1111 -> 0100 0000 0101 0101 + + 0x4100, // 144 = 1001 0000 -> 0100 0001 0000 0000 + 0x4101, // 145 = 1001 0001 -> 0100 0001 0000 0001 + 0x4104, // 146 = 1001 0010 -> 0100 0001 0000 0100 + 0x4105, // 147 = 1001 0011 -> 0100 0001 0000 0101 + 0x4110, // 148 = 1001 0100 -> 0100 0001 0001 0000 + 0x4111, // 149 = 1001 0101 -> 0100 0001 0001 0001 + 0x4114, // 150 = 1001 0110 -> 0100 0001 0001 0100 + 0x4115, // 151 = 1001 0111 -> 0100 0001 0001 0101 + 0x4140, // 152 = 1001 1000 -> 0100 0001 0100 0000 + 0x4141, // 153 = 1001 1001 -> 0100 0001 0100 0001 + 0x4144, // 154 = 1001 1010 -> 0100 0001 0100 0100 + 0x4145, // 155 = 1001 1011 -> 0100 0001 0100 0101 + 0x4150, // 156 = 1001 1100 -> 0100 0001 0101 0000 + 0x4151, // 157 = 1001 1101 -> 0100 0001 0101 0001 + 0x4154, // 158 = 1001 1110 -> 0100 0001 0101 0100 + 0x4155, // 159 = 1001 1111 -> 0100 0001 0101 0101 + + 0x4400, // 160 = 1010 0000 -> 0100 0100 0000 0000 + 0x4401, // 161 = 1010 0001 -> 0100 0100 0000 0001 + 0x4404, // 162 = 1010 0010 -> 0100 0100 0000 0100 + 0x4405, // 163 = 1010 0011 -> 0100 0100 0000 0101 + 0x4410, // 164 = 1010 0100 -> 0100 0100 0001 0000 + 0x4411, // 165 = 1010 0101 -> 0100 0100 0001 0001 + 0x4414, // 166 = 1010 0110 -> 0100 0100 0001 0100 + 0x4415, // 167 = 1010 0111 -> 0100 0100 0001 0101 + 0x4440, // 168 = 1010 1000 -> 0100 0100 0100 0000 + 0x4441, // 169 = 1010 1001 -> 0100 0100 0100 0001 + 0x4444, // 170 = 1010 1010 -> 0100 0100 0100 0100 + 0x4445, // 171 = 1010 1011 -> 0100 0100 0100 0101 + 0x4450, // 172 = 1010 1100 -> 0100 0100 0101 0000 + 0x4451, // 173 = 1010 1101 -> 0100 0100 0101 0001 + 0x4454, // 174 = 1010 1110 -> 0100 0100 0101 0100 + 0x4455, // 175 = 1010 1111 -> 0100 0100 0101 0101 + + 0x4500, // 176 = 1011 0000 -> 0100 0101 0000 0000 + 0x4501, // 177 = 1011 0001 -> 0100 0101 0000 0001 + 0x4504, // 178 = 1011 0010 -> 0100 0101 0000 0100 + 0x4505, // 179 = 1011 0011 -> 0100 0101 0000 0101 + 0x4510, // 180 = 1011 0100 -> 0100 0101 0001 0000 + 0x4511, // 181 = 1011 0101 -> 0100 0101 0001 0001 + 0x4514, // 182 = 1011 0110 -> 0100 0101 0001 0100 + 0x4515, // 183 = 1011 0111 -> 0100 0101 0001 0101 + 0x4540, // 184 = 1011 1000 -> 0100 0101 0100 0000 + 0x4541, // 185 = 1011 1001 -> 0100 0101 0100 0001 + 0x4544, // 186 = 1011 1010 -> 0100 0101 0100 0100 + 0x4545, // 187 = 1011 1011 -> 0100 0101 0100 0101 + 0x4550, // 188 = 1011 1100 -> 0100 0101 0101 0000 + 0x4551, // 189 = 1011 1101 -> 0100 0101 0101 0001 + 0x4554, // 190 = 1011 1110 -> 0100 0101 0101 0100 + 0x4555, // 191 = 1011 1111 -> 0100 0101 0101 0101 + + 0x5000, // 192 = 1100 0000 -> 0101 0000 0000 0000 + 0x5001, // 193 = 1100 0001 -> 0101 0000 0000 0001 + 0x5004, // 194 = 1100 0010 -> 0101 0000 0000 0100 + 0x5005, // 195 = 1100 0011 -> 0101 0000 0000 0101 + 0x5010, // 196 = 1100 0100 -> 0101 0000 0001 0000 + 0x5011, // 197 = 1100 0101 -> 0101 0000 0001 0001 + 0x5014, // 198 = 1100 0110 -> 0101 0000 0001 0100 + 0x5015, // 199 = 1100 0111 -> 0101 0000 0001 0101 + 0x5040, // 200 = 1100 1000 -> 0101 0000 0100 0000 + 0x5041, // 201 = 1100 1001 -> 0101 0000 0100 0001 + 0x5044, // 202 = 1100 1010 -> 0101 0000 0100 0100 + 0x5045, // 203 = 1100 1011 -> 0101 0000 0100 0101 + 0x5050, // 204 = 1100 1100 -> 0101 0000 0101 0000 + 0x5051, // 205 = 1100 1101 -> 0101 0000 0101 0001 + 0x5054, // 206 = 1100 1110 -> 0101 0000 0101 0100 + 0x5055, // 207 = 1100 1111 -> 0101 0000 0101 0101 + + 0x5100, // 208 = 1101 0000 -> 0101 0001 0000 0000 + 0x5101, // 209 = 1101 0001 -> 0101 0001 0000 0001 + 0x5104, // 210 = 1101 0010 -> 0101 0001 0000 0100 + 0x5105, // 211 = 1101 0011 -> 0101 0001 0000 0101 + 0x5110, // 212 = 1101 0100 -> 0101 0001 0001 0000 + 0x5111, // 213 = 1101 0101 -> 0101 0001 0001 0001 + 0x5114, // 214 = 1101 0110 -> 0101 0001 0001 0100 + 0x5115, // 215 = 1101 0111 -> 0101 0001 0001 0101 + 0x5140, // 216 = 1101 1000 -> 0101 0001 0100 0000 + 0x5141, // 217 = 1101 1001 -> 0101 0001 0100 0001 + 0x5144, // 218 = 1101 1010 -> 0101 0001 0100 0100 + 0x5145, // 219 = 1101 1011 -> 0101 0001 0100 0101 + 0x5150, // 220 = 1101 1100 -> 0101 0001 0101 0000 + 0x5151, // 221 = 1101 1101 -> 0101 0001 0101 0001 + 0x5154, // 222 = 1101 1110 -> 0101 0001 0101 0100 + 0x5155, // 223 = 1101 1111 -> 0101 0001 0101 0101 + + 0x5400, // 224 = 1110 0000 -> 0101 0100 0000 0000 + 0x5401, // 225 = 1110 0001 -> 0101 0100 0000 0001 + 0x5404, // 226 = 1110 0010 -> 0101 0100 0000 0100 + 0x5405, // 227 = 1110 0011 -> 0101 0100 0000 0101 + 0x5410, // 228 = 1110 0100 -> 0101 0100 0001 0000 + 0x5411, // 229 = 1110 0101 -> 0101 0100 0001 0001 + 0x5414, // 230 = 1110 0110 -> 0101 0100 0001 0100 + 0x5415, // 231 = 1110 0111 -> 0101 0100 0001 0101 + 0x5440, // 232 = 1110 1000 -> 0101 0100 0100 0000 + 0x5441, // 233 = 1110 1001 -> 0101 0100 0100 0001 + 0x5444, // 234 = 1110 1010 -> 0101 0100 0100 0100 + 0x5445, // 235 = 1110 1011 -> 0101 0100 0100 0101 + 0x5450, // 236 = 1110 1100 -> 0101 0100 0101 0000 + 0x5451, // 237 = 1110 1101 -> 0101 0100 0101 0001 + 0x5454, // 238 = 1110 1110 -> 0101 0100 0101 0100 + 0x5455, // 239 = 1110 1111 -> 0101 0100 0101 0101 + + 0x5500, // 240 = 1111 0000 -> 0101 0101 0000 0000 + 0x5501, // 241 = 1111 0001 -> 0101 0101 0000 0001 + 0x5504, // 242 = 1111 0010 -> 0101 0101 0000 0100 + 0x5505, // 243 = 1111 0011 -> 0101 0101 0000 0101 + 0x5510, // 244 = 1111 0100 -> 0101 0101 0001 0000 + 0x5511, // 245 = 1111 0101 -> 0101 0101 0001 0001 + 0x5514, // 246 = 1111 0110 -> 0101 0101 0001 0100 + 0x5515, // 247 = 1111 0111 -> 0101 0101 0001 0101 + 0x5540, // 248 = 1111 1000 -> 0101 0101 0100 0000 + 0x5541, // 249 = 1111 1001 -> 0101 0101 0100 0001 + 0x5544, // 250 = 1111 1010 -> 0101 0101 0100 0100 + 0x5545, // 251 = 1111 1011 -> 0101 0101 0100 0101 + 0x5550, // 252 = 1111 1100 -> 0101 0101 0101 0000 + 0x5551, // 253 = 1111 1101 -> 0101 0101 0101 0001 + 0x5554, // 254 = 1111 1110 -> 0101 0101 0101 0100 + 0x5555 // 255 = 1111 1111 -> 0101 0101 0101 0101 + +] diff --git a/frontend/gamma/js/ClipperzCryptoLibrary/ECC/BinaryField/Point.js b/frontend/gamma/js/ClipperzCryptoLibrary/ECC/BinaryField/Point.js new file mode 100644 index 0000000..fef3220 --- a/dev/null +++ b/frontend/gamma/js/ClipperzCryptoLibrary/ECC/BinaryField/Point.js @@ -0,0 +1,62 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +//try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { +// throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; +//} +if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } +if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; } + +Clipperz.Crypto.ECC.BinaryField.Point = function(args) { + args = args || {}; + this._x = args.x; + this._y = args.y; + + return this; +} + +Clipperz.Crypto.ECC.BinaryField.Point.prototype = MochiKit.Base.update(null, { + + 'asString': function() { + return "Clipperz.Crypto.ECC.BinaryField.Point (" + this.x() + ", " + this.y() + ")"; + }, + + //----------------------------------------------------------------------------- + + 'x': function() { + return this._x; + }, + + 'y': function() { + return this._y; + }, + + //----------------------------------------------------------------------------- + + 'isZero': function() { + return (this.x().isZero() && this.y().isZero()) + }, + + //----------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" +}); diff --git a/frontend/gamma/js/ClipperzCryptoLibrary/ECC/BinaryField/Value.js b/frontend/gamma/js/ClipperzCryptoLibrary/ECC/BinaryField/Value.js new file mode 100644 index 0000000..b046039 --- a/dev/null +++ b/frontend/gamma/js/ClipperzCryptoLibrary/ECC/BinaryField/Value.js @@ -0,0 +1,381 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +//try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { +// throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; +//} +if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } +if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } +if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } +if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; } + +Clipperz.Crypto.ECC.BinaryField.Value = function(aValue, aBase, aBitSize) { + if (aValue.constructor == String) { + var value; + var stringLength; + var numberOfWords; + var i,c; + + if (aBase != 16) { + throw Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedBase; + } + + value = aValue.replace(/ /g, ''); + stringLength = value.length; + numberOfWords = Math.ceil(stringLength / 8); + this._value = new Array(numberOfWords); + + c = numberOfWords; + for (i=0; i<c; i++) { + var word; + + if (i < (c-1)) { + word = parseInt(value.substr(stringLength-((i+1)*8), 8), 16); + } else { + word = parseInt(value.substr(0, stringLength-(i*8)), 16); + } + + this._value[i] = word; + } + } else if (aValue.constructor == Array) { + var itemsToCopy; + + itemsToCopy = aValue.length; + while (aValue[itemsToCopy - 1] == 0) { + itemsToCopy --; + } + + this._value = aValue.slice(0, itemsToCopy); + } else if (aValue.constructor == Number) { + this._value = [aValue]; + } else { +// throw Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedConstructorValueType; + } + + this._bitSize == aBitSize || null; + + return this; +} + +Clipperz.Crypto.ECC.BinaryField.Value.prototype = MochiKit.Base.update(null, { + + 'value': function() { + return this._value; + }, + + //----------------------------------------------------------------------------- + + 'wordSize': function() { + return this._value.length + }, + + //----------------------------------------------------------------------------- + + 'clone': function() { + return new Clipperz.Crypto.ECC.BinaryField.Value(this._value.slice(0), null, this._bitSize); + }, + + //----------------------------------------------------------------------------- + + 'isZero': function() { + return (this.compare(Clipperz.Crypto.ECC.BinaryField.Value.O) == 0); + }, + + //----------------------------------------------------------------------------- + + 'asString': function(aBase) { + var result; + var i,c; + + if (aBase != 16) { + throw Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedBase; + } + + result = ""; + c = this.wordSize(); + for (i=0; i<c; i++) { + var wordAsString; + +// wordAsString = ("00000000" + this.value()[i].toString(16)); + wordAsString = ("00000000" + this._value[i].toString(16)); + wordAsString = wordAsString.substring(wordAsString.length - 8); + result = wordAsString + result; + } + + result = result.replace(/^(00)*/, ""); + + if (result == "") { + result = "0"; + } + + return result; + }, + + //----------------------------------------------------------------------------- + + 'shiftLeft': function(aNumberOfBitsToShift) { + // this method seems like it is never called. :-( + return new Clipperz.Crypto.ECC.BinaryField.Value(Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(this._value, aNumberOfBitsToShift)); + }, + + //----------------------------------------------------------------------------- + + 'bitSize': function() { + if (this._bitSize == null) { + this._bitSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(this._value); + } + + return this._bitSize; + }, + + //----------------------------------------------------------------------------- + + 'isBitSet': function(aBitPosition) { + return Clipperz.Crypto.ECC.BinaryField.Value._isBitSet(this._value, aBitPosition); + }, + + //----------------------------------------------------------------------------- + + 'xor': function(aValue) { + return new Clipperz.Crypto.ECC.BinaryField.Value(Clipperz.Crypto.ECC.BinaryField.Value._xor(this._value, aValue._value)); + }, + + //----------------------------------------------------------------------------- + + 'compare': function(aValue) { + return Clipperz.Crypto.ECC.BinaryField.Value._compare(this._value, aValue._value); + }, + + //----------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" +}); + +Clipperz.Crypto.ECC.BinaryField.Value.O = new Clipperz.Crypto.ECC.BinaryField.Value('0', 16); +Clipperz.Crypto.ECC.BinaryField.Value.I = new Clipperz.Crypto.ECC.BinaryField.Value('1', 16); + +Clipperz.Crypto.ECC.BinaryField.Value._xor = function(a, b, aFirstItemOffset) { + var result; + var resultSize; + var i,c; + var firstItemOffset; + + firstItemOffset = aFirstItemOffset || 0; + resultSize = Math.max((a.length - firstItemOffset), b.length) + firstItemOffset; + + result = new Array(resultSize); + + c = firstItemOffset; + for (i=0; i<c; i++) { + result[i] = a[i]; + } + + c = resultSize; + for (i=firstItemOffset; i<c; i++) { + result[i] = (((a[i] || 0) ^ (b[i - firstItemOffset] || 0)) >>> 0); + } + + return result; +}; + +Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor = function(a, b, aFirstItemOffset) { + var i,c; + var firstItemOffset; + + firstItemOffset = aFirstItemOffset || 0; + + c = Math.max((a.length - firstItemOffset), b.length) + firstItemOffset; + for (i=firstItemOffset; i<c; i++) { + a[i] = (((a[i] || 0) ^ (b[i - firstItemOffset] || 0)) >>> 0); + } +}; + +Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft = function(aWordArray, aNumberOfBitsToShift) { + var numberOfWordsToShift; + var numberOfBitsToShift; + var result; + var overflowValue; + var nextOverflowValue; + var i,c; + + numberOfWordsToShift = Math.floor(aNumberOfBitsToShift / 32); + numberOfBitsToShift = aNumberOfBitsToShift % 32; + + result = new Array(aWordArray.length + numberOfWordsToShift); + + c = numberOfWordsToShift; + for (i=0; i<c; i++) { + result[i] = 0; + } + + overflowValue = 0; + nextOverflowValue = 0; + + c = aWordArray.length; + for (i=0; i<c; i++) { + var value; + var resultWord; + +// value = this.value()[i]; + value = aWordArray[i]; + + if (numberOfBitsToShift > 0) { + nextOverflowValue = (value >>> (32 - numberOfBitsToShift)); + value = value & (0xffffffff >>> numberOfBitsToShift); + resultWord = (((value << numberOfBitsToShift) | overflowValue) >>> 0); + } else { + resultWord = value; + } + + result[i+numberOfWordsToShift] = resultWord; + overflowValue = nextOverflowValue; + } + + if (overflowValue != 0) { + result[aWordArray.length + numberOfWordsToShift] = overflowValue; + } + + return result; +}; + +Clipperz.Crypto.ECC.BinaryField.Value._overwriteShiftLeft = function(aWordArray, aNumberOfBitsToShift) { + var numberOfWordsToShift; + var numberOfBitsToShift; + var result; + var overflowValue; + var i,c; + + numberOfWordsToShift = Math.floor(aNumberOfBitsToShift / 32); + numberOfBitsToShift = aNumberOfBitsToShift % 32; + + result = new Array(aWordArray.length + numberOfWordsToShift); + + c = numberOfWordsToShift; + for (i=0; i<c; i++) { + result[i] = 0; + } + + overflowValue = 0; + nextOverflowValue = 0; + + c = aWordArray.length; + for (i=0; i<c; i++) { + var value; + var resultWord; + +// value = this.value()[i]; + value = aWordArray[i]; + + if (numberOfBitsToShift > 0) { + var nextOverflowValue; + + nextOverflowValue = (value >>> (32 - numberOfBitsToShift)); + value = value & (0xffffffff >>> numberOfBitsToShift); + resultWord = (((value << numberOfBitsToShift) | overflowValue) >>> 0); + } else { + resultWord = value; + } + + result[i+numberOfWordsToShift] = resultWord; + overflowValue = nextOverflowValue; + } + + if (overflowValue != 0) { + result[aWordArray.length + numberOfWordsToShift] = overflowValue; + } + + return result; +}; + +Clipperz.Crypto.ECC.BinaryField.Value._bitSize = function(aWordArray) { + var result; + var notNullElements; + var mostValuableWord; + var matchingBitsInMostImportantWord; + var mask; + var i,c; + + notNullElements = aWordArray.length; + + if ((aWordArray.length == 1) && (aWordArray[0] == 0)) { + result = 0; + } else { + notNullElements --; + while((notNullElements > 0) && (aWordArray[notNullElements] == 0)) { + notNullElements --; + } + + result = notNullElements * 32; + mostValuableWord = aWordArray[notNullElements]; + + matchingBits = 32; + mask = 0x80000000; + + while ((matchingBits > 0) && ((mostValuableWord & mask) == 0)) { + matchingBits --; + mask >>>= 1; + } + + result += matchingBits; + } + + return result; +}; + +Clipperz.Crypto.ECC.BinaryField.Value._isBitSet = function(aWordArray, aBitPosition) { + var result; + var byteIndex; + var bitIndexInSelectedByte; + + byteIndex = Math.floor(aBitPosition / 32); + bitIndexInSelectedByte = aBitPosition % 32; + + if (byteIndex <= aWordArray.length) { + result = ((aWordArray[byteIndex] & (1 << bitIndexInSelectedByte)) != 0); + } else { + result = false; + } + + return result; +}; + +Clipperz.Crypto.ECC.BinaryField.Value._compare = function(a,b) { + var result; + var i,c; + + result = MochiKit.Base.compare(a.length, b.length); + + c = a.length; + for (i=0; (i<c) && (result==0); i++) { +//console.log("compare[" + c + " - " + i + " - 1] " + this.value()[c-i-1] + ", " + aValue.value()[c-i-1]); +// result = MochiKit.Base.compare(this.value()[c-i-1], aValue.value()[c-i-1]); + result = MochiKit.Base.compare(a[c-i-1], b[c-i-1]); + } + + return result; +}; + + +Clipperz.Crypto.ECC.BinaryField.Value['exception']= { + 'UnsupportedBase': new MochiKit.Base.NamedError("Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedBase"), + 'UnsupportedConstructorValueType': new MochiKit.Base.NamedError("Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedConstructorValueType") +}; diff --git a/frontend/gamma/js/ClipperzCryptoLibrary/ECC/StandardCurves.js b/frontend/gamma/js/ClipperzCryptoLibrary/ECC/StandardCurves.js new file mode 100644 index 0000000..ed971ae --- a/dev/null +++ b/frontend/gamma/js/ClipperzCryptoLibrary/ECC/StandardCurves.js @@ -0,0 +1,234 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +//try { if (typeof(Clipperz.Crypto.ECC.BinaryField.Curve) == 'undefined') { throw ""; }} catch (e) { +// throw "Clipperz.Crypto.ECC depends on Clipperz.Crypto.ECC.BinaryField.Curve!"; +//} +//try { if (typeof(Clipperz.Crypto.ECC.Koblitz.Curve) == 'undefined') { throw ""; }} catch (e) { +// throw "Clipperz.Crypto.ECC depends on Clipperz.Crypto.ECC.Koblitz.Curve!"; +//} + +Clipperz.Crypto.ECC.StandardCurves = {}; + +MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, { + + //============================================================================== + + '_K571': null, + 'K571': function() { // f(z) = z^571 + z^10 + z^5 + z^2 + 1 + if ((Clipperz.Crypto.ECC.StandardCurves._K571 == null) && (typeof(Clipperz.Crypto.ECC.Koblitz.Curve) != 'undefined')) { + Clipperz.Crypto.ECC.StandardCurves._K571 = new Clipperz.Crypto.ECC.Koblitz.Curve({ + modulus: new Clipperz.Crypto.ECC.Koblitz.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000425', 16), + a: new Clipperz.Crypto.ECC.Koblitz.Value('0', 16), + b: new Clipperz.Crypto.ECC.Koblitz.Value('1', 16), + G: new Clipperz.Crypto.ECC.Koblitz.Point({ + x: new Clipperz.Crypto.ECC.Koblitz.Value('026eb7a8 59923fbc 82189631 f8103fe4 ac9ca297 0012d5d4 60248048 01841ca4 43709584 93b205e6 47da304d b4ceb08c bbd1ba39 494776fb 988b4717 4dca88c7 e2945283 a01c8972', 16), + y: new Clipperz.Crypto.ECC.Koblitz.Value('0349dc80 7f4fbf37 4f4aeade 3bca9531 4dd58cec 9f307a54 ffc61efc 006d8a2c 9d4979c0 ac44aea7 4fbebbb9 f772aedc b620b01a 7ba7af1b 320430c8 591984f6 01cd4c14 3ef1c7a3', 16) + }), + r: new Clipperz.Crypto.ECC.Koblitz.Value('02000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 131850e1 f19a63e4 b391a8db 917f4138 b630d84b e5d63938 1e91deb4 5cfe778f 637c1001', 16), + h: new Clipperz.Crypto.ECC.Koblitz.Value('4', 16), + primeFactor: new Clipperz.Crypto.ECC.Koblitz.Value('02000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 131850e1 f19a63e4 b391a8db 917f4138 b630d84b e5d63938 1e91deb4 5cfe778f 637c1001', 16) + }); + } + + return Clipperz.Crypto.ECC.StandardCurves._K571; + }, + + //----------------------------------------------------------------------------- + + '_K283': null, + 'K283': function() { // f(z) = z^283 + z^12 + z^7 + z^5 + 1 + if ((Clipperz.Crypto.ECC.StandardCurves._K283 == null) && (typeof(Clipperz.Crypto.ECC.Koblitz.Curve) != 'undefined')) { + Clipperz.Crypto.ECC.StandardCurves._K283 = new Clipperz.Crypto.ECC.Koblitz.Curve({ + modulus: new Clipperz.Crypto.ECC.Koblitz.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000010a1', 16), + a: new Clipperz.Crypto.ECC.Koblitz.Value('0', 16), + b: new Clipperz.Crypto.ECC.Koblitz.Value('1', 16), + G: new Clipperz.Crypto.ECC.Koblitz.Point({ + x: new Clipperz.Crypto.ECC.Koblitz.Value('0503213f 78ca4488 3f1a3b81 62f188e5 53cd265f 23c1567a 16876913 b0c2ac24 58492836', 16), + y: new Clipperz.Crypto.ECC.Koblitz.Value('01ccda38 0f1c9e31 8d90f95d 07e5426f e87e45c0 e8184698 e4596236 4e341161 77dd2259', 16) + }), + r: new Clipperz.Crypto.ECC.Koblitz.Value('01ffffff ffffffff ffffffff ffffffff ffffe9ae 2ed07577 265dff7f 94451e06 1e163c61', 16), + h: new Clipperz.Crypto.ECC.Koblitz.Value('4', 16), + primeFactor: new Clipperz.Crypto.ECC.Koblitz.Value('01ffffff ffffffff ffffffff ffffffff ffffe9ae 2ed07577 265dff7f 94451e06 1e163c61', 16) + }); + } + + return Clipperz.Crypto.ECC.StandardCurves._K283; + }, + + //============================================================================== + + '_B571': null, + 'B571': function() { // f(z) = z^571 + z^10 + z^5 + z^2 + 1 + if ((Clipperz.Crypto.ECC.StandardCurves._B571 == null) && (typeof(Clipperz.Crypto.ECC.BinaryField.Curve) != 'undefined')) { + Clipperz.Crypto.ECC.StandardCurves._B571 = new Clipperz.Crypto.ECC.BinaryField.Curve({ + modulus: new Clipperz.Crypto.ECC.BinaryField.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000425', 16), + a: new Clipperz.Crypto.ECC.BinaryField.Value('1', 16), + b: new Clipperz.Crypto.ECC.BinaryField.Value('02f40e7e 2221f295 de297117 b7f3d62f 5c6a97ff cb8ceff1 cd6ba8ce 4a9a18ad 84ffabbd 8efa5933 2be7ad67 56a66e29 4afd185a 78ff12aa 520e4de7 39baca0c 7ffeff7f 2955727a', 16), + G: new Clipperz.Crypto.ECC.BinaryField.Point({ + x: new Clipperz.Crypto.ECC.BinaryField.Value('0303001d 34b85629 6c16c0d4 0d3cd775 0a93d1d2 955fa80a a5f40fc8 db7b2abd bde53950 f4c0d293 cdd711a3 5b67fb14 99ae6003 8614f139 4abfa3b4 c850d927 e1e7769c 8eec2d19', 16), + y: new Clipperz.Crypto.ECC.BinaryField.Value('037bf273 42da639b 6dccfffe b73d69d7 8c6c27a6 009cbbca 1980f853 3921e8a6 84423e43 bab08a57 6291af8f 461bb2a8 b3531d2f 0485c19b 16e2f151 6e23dd3c 1a4827af 1b8ac15b', 16) + }), + r: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff e661ce18 ff559873 08059b18 6823851e c7dd9ca1 161de93d 5174d66e 8382e9bb 2fe84e47', 16), + h: new Clipperz.Crypto.ECC.BinaryField.Value('2', 16) + +// S: new Clipperz.Crypto.ECC.BinaryField.Value('2aa058f73a0e33ab486b0f610410c53a7f132310', 10), +// n: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe661ce18ff55987308059b186823851ec7dd9ca1161de93d5174d66e8382e9bb2fe84e47', 16) + }); + + //----------------------------------------------------------------------------- + // + // Guide to Elliptic Curve Cryptography + // Darrel Hankerson, Alfred Menezes, Scott Vanstone + // - Pag: 56, Alorithm 2.45 (with a typo!!!) + // + //----------------------------------------------------------------------------- + // + // http://www.milw0rm.com/papers/136 + // + // ------------------------------------------------------------------------- + // Polynomial Reduction Algorithm Modulo f571 + // ------------------------------------------------------------------------- + // + // Input: Polynomial p(x) of degree 1140 or less, stored as + // an array of 2T machinewords. + // Output: p(x) mod f571(x) + // + // FOR i = T-1, ..., 0 DO + // SET X := P[i+T] + // P[i] := P[i] ^ (X<<5) ^ (X<<7) ^ (X<<10) ^ (X<<15) + // P[i+1] := P[i+1] ^ (X>>17) ^ (X>>22) ^ (X>>25) ^ (X>>27) + // + // SET X := P[T-1] >> 27 + // P[0] := P[0] ^ X ^ (X<<2) ^ (X<<5) ^ (X<<10) + // P[T-1] := P[T-1] & 0x07ffffff + // + // RETURN P[T-1],...,P[0] + // + // ------------------------------------------------------------------------- + // + Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().slowModule = Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().module; + Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().module = function(aValue) { + var result; + + if (aValue.bitSize() > 1140) { + MochiKit.Logging.logWarning("ECC.StandarCurves.B571.finiteField().module: falling back to default implementation"); + result = Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().slowModule(aValue); + } else { + var C, T; + var i; + +//console.log(">>> binaryField.finiteField.(improved)module"); +// C = aValue.value().slice(0); + C = aValue._value.slice(0); + for (i=35; i>=18; i--) { + T = C[i]; + C[i-18] = (((C[i-18] ^ (T<<5) ^ (T<<7) ^ (T<<10) ^ (T<<15)) & 0xffffffff) >>> 0); + C[i-17] = ((C[i-17] ^ (T>>>27) ^ (T>>>25) ^ (T>>>22) ^ (T>>>17)) >>> 0); + } + T = (C[17] >>> 27); + C[0] = ((C[0] ^ T ^ ((T<<2) ^ (T<<5) ^ (T<<10)) & 0xffffffff) >>> 0); + C[17] = (C[17] & 0x07ffffff); + + for(i=18; i<=35; i++) { + C[i] = 0; + } + + result = new Clipperz.Crypto.ECC.BinaryField.Value(C); +//console.log("<<< binaryField.finiteField.(improved)module"); + } + + return result; + }; + } + + return Clipperz.Crypto.ECC.StandardCurves._B571; + }, + + //----------------------------------------------------------------------------- + + '_B283': null, + 'B283': function() { // f(z) = z^283 + z^12 + z^7 + z^5 + 1 + if ((Clipperz.Crypto.ECC.StandardCurves._B283 == null) && (typeof(Clipperz.Crypto.ECC.BinaryField.Curve) != 'undefined')) { + Clipperz.Crypto.ECC.StandardCurves._B283 = new Clipperz.Crypto.ECC.BinaryField.Curve({ + modulus: new Clipperz.Crypto.ECC.BinaryField.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000010a1', 16), + a: new Clipperz.Crypto.ECC.BinaryField.Value('1', 16), + b: new Clipperz.Crypto.ECC.BinaryField.Value('027b680a c8b8596d a5a4af8a 19a0303f ca97fd76 45309fa2 a581485a f6263e31 3b79a2f5', 16), + G: new Clipperz.Crypto.ECC.BinaryField.Point({ + x: new Clipperz.Crypto.ECC.BinaryField.Value('05f93925 8db7dd90 e1934f8c 70b0dfec 2eed25b8 557eac9c 80e2e198 f8cdbecd 86b12053', 16), + y: new Clipperz.Crypto.ECC.BinaryField.Value('03676854 fe24141c b98fe6d4 b20d02b4 516ff702 350eddb0 826779c8 13f0df45 be8112f4', 16) + }), + r: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffff ffffffff ffffffff ffffffff ffffef90 399660fc 938a9016 5b042a7c efadb307', 16), + h: new Clipperz.Crypto.ECC.BinaryField.Value('2', 16) + }); + + //----------------------------------------------------------------------------- + // + // Guide to Elliptic Curve Cryptography + // Darrel Hankerson, Alfred Menezes, Scott Vanstone + // - Pag: 56, Alorithm 2.43 + // + //----------------------------------------------------------------------------- + Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().slowModule = Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().module; + Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().module = function(aValue) { + var result; + + if (aValue.bitSize() > 564) { + MochiKit.Logging.logWarning("ECC.StandarCurves.B283.finiteField().module: falling back to default implementation"); + result = Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().slowModule(aValue); + } else { + var C, T; + var i; + +//console.log(">>> binaryField.finiteField.(improved)module"); + C = aValue._value.slice(0); + for (i=17; i>=9; i--) { + T = C[i]; + C[i-9] = (((C[i-9] ^ (T<<5) ^ (T<<10) ^ (T<<12) ^ (T<<17)) & 0xffffffff) >>> 0); + C[i-8] = ((C[i-8] ^ (T>>>27) ^ (T>>>22) ^ (T>>>20) ^ (T>>>15)) >>> 0); + } + T = (C[8] >>> 27); + C[0] = ((C[0] ^ T ^ ((T<<5) ^ (T<<7) ^ (T<<12)) & 0xffffffff) >>> 0); + C[8] = (C[8] & 0x07ffffff); + + for(i=9; i<=17; i++) { + C[i] = 0; + } + + result = new Clipperz.Crypto.ECC.BinaryField.Value(C); +//console.log("<<< binaryField.finiteField.(improved)module"); + } + + return result; + }; + } + + return Clipperz.Crypto.ECC.StandardCurves._B283; + }, + + //============================================================================== + __syntaxFix__: "syntax fix" +}); + + + diff --git a/frontend/gamma/js/ClipperzCryptoLibrary/PRNG.js b/frontend/gamma/js/ClipperzCryptoLibrary/PRNG.js new file mode 100644 index 0000000..18cc260 --- a/dev/null +++ b/frontend/gamma/js/ClipperzCryptoLibrary/PRNG.js @@ -0,0 +1,850 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { + throw "Clipperz.Crypto.PRNG depends on Clipperz.ByteArray!"; +} + +try { if (typeof(Clipperz.Crypto.SHA) == 'undefined') { throw ""; }} catch (e) { + throw "Clipperz.Crypto.PRNG depends on Clipperz.Crypto.SHA!"; +} + +try { if (typeof(Clipperz.Crypto.AES) == 'undefined') { throw ""; }} catch (e) { + throw "Clipperz.Crypto.PRNG depends on Clipperz.Crypto.AES!"; +} + +if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { Clipperz.Crypto.PRNG = {}; } + +//############################################################################# + +Clipperz.Crypto.PRNG.EntropyAccumulator = function(args) { + args = args || {}; +// MochiKit.Base.bindMethods(this); + + this._stack = new Clipperz.ByteArray(); + this._maxStackLengthBeforeHashing = args.maxStackLengthBeforeHashing || 256; + return this; +} + +Clipperz.Crypto.PRNG.EntropyAccumulator.prototype = MochiKit.Base.update(null, { + + 'toString': function() { + return "Clipperz.Crypto.PRNG.EntropyAccumulator"; + }, + + //------------------------------------------------------------------------- + + 'stack': function() { + return this._stack; + }, + + 'setStack': function(aValue) { + this._stack = aValue; + }, + + 'resetStack': function() { + this.stack().reset(); + }, + + 'maxStackLengthBeforeHashing': function() { + return this._maxStackLengthBeforeHashing; + }, + + //------------------------------------------------------------------------- + + 'addRandomByte': function(aValue) { + this.stack().appendByte(aValue); + + if (this.stack().length() > this.maxStackLengthBeforeHashing()) { + this.setStack(Clipperz.Crypto.SHA.sha_d256(this.stack())); + } + }, + + //------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" +}); + +//############################################################################# + +Clipperz.Crypto.PRNG.RandomnessSource = function(args) { + args = args || {}; + MochiKit.Base.bindMethods(this); + + this._generator = args.generator || null; + this._sourceId = args.sourceId || null; + this._boostMode = args.boostMode || false; + + this._nextPoolIndex = 0; + + return this; +} + +Clipperz.Crypto.PRNG.RandomnessSource.prototype = MochiKit.Base.update(null, { + + 'generator': function() { + return this._generator; + }, + + 'setGenerator': function(aValue) { + this._generator = aValue; + }, + + //------------------------------------------------------------------------- + + 'boostMode': function() { + return this._boostMode; + }, + + 'setBoostMode': function(aValue) { + this._boostMode = aValue; + }, + + //------------------------------------------------------------------------- + + 'sourceId': function() { + return this._sourceId; + }, + + 'setSourceId': function(aValue) { + this._sourceId = aValue; + }, + + //------------------------------------------------------------------------- + + 'nextPoolIndex': function() { + return this._nextPoolIndex; + }, + + 'incrementNextPoolIndex': function() { + this._nextPoolIndex = ((this._nextPoolIndex + 1) % this.generator().numberOfEntropyAccumulators()); + }, + + //------------------------------------------------------------------------- + + 'updateGeneratorWithValue': function(aRandomValue) { + if (this.generator() != null) { + this.generator().addRandomByte(this.sourceId(), this.nextPoolIndex(), aRandomValue); + this.incrementNextPoolIndex(); + } + }, + + //------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" +}); + +//############################################################################# + +Clipperz.Crypto.PRNG.TimeRandomnessSource = function(args) { + args = args || {}; +// MochiKit.Base.bindMethods(this); + + this._intervalTime = args.intervalTime || 1000; + + Clipperz.Crypto.PRNG.RandomnessSource.call(this, args); + + this.collectEntropy(); + return this; +} + +Clipperz.Crypto.PRNG.TimeRandomnessSource.prototype = MochiKit.Base.update(new Clipperz.Crypto.PRNG.RandomnessSource, { + + 'intervalTime': function() { + return this._intervalTime; + }, + + //------------------------------------------------------------------------- + + 'collectEntropy': function() { + var now; + var entropyByte; + var intervalTime; + now = new Date(); + entropyByte = (now.getTime() & 0xff); + + intervalTime = this.intervalTime(); + if (this.boostMode() == true) { + intervalTime = intervalTime / 9; + } + + this.updateGeneratorWithValue(entropyByte); + setTimeout(this.collectEntropy, intervalTime); + }, + + //------------------------------------------------------------------------- + + 'numberOfRandomBits': function() { + return 5; + }, + + //------------------------------------------------------------------------- + + 'pollingFrequency': function() { + return 10; + }, + + //------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" +}); + +//***************************************************************************** + +Clipperz.Crypto.PRNG.MouseRandomnessSource = function(args) { + args = args || {}; + + Clipperz.Crypto.PRNG.RandomnessSource.call(this, args); + + this._numberOfBitsToCollectAtEachEvent = 4; + this._randomBitsCollector = 0; + this._numberOfRandomBitsCollected = 0; + + MochiKit.Signal.connect(document, 'onmousemove', this, 'collectEntropy'); + + return this; +} + +Clipperz.Crypto.PRNG.MouseRandomnessSource.prototype = MochiKit.Base.update(new Clipperz.Crypto.PRNG.RandomnessSource, { + + //------------------------------------------------------------------------- + + 'numberOfBitsToCollectAtEachEvent': function() { + return this._numberOfBitsToCollectAtEachEvent; + }, + + //------------------------------------------------------------------------- + + 'randomBitsCollector': function() { + return this._randomBitsCollector; + }, + + 'setRandomBitsCollector': function(aValue) { + this._randomBitsCollector = aValue; + }, + + 'appendRandomBitsToRandomBitsCollector': function(aValue) { + var collectedBits; + var numberOfRandomBitsCollected; + + numberOfRandomBitsCollected = this.numberOfRandomBitsCollected(); + collectetBits = this.randomBitsCollector() | (aValue << numberOfRandomBitsCollected); + this.setRandomBitsCollector(collectetBits); + numberOfRandomBitsCollected += this.numberOfBitsToCollectAtEachEvent(); + + if (numberOfRandomBitsCollected == 8) { + this.updateGeneratorWithValue(collectetBits); + numberOfRandomBitsCollected = 0; + this.setRandomBitsCollector(0); + } + + this.setNumberOfRandomBitsCollected(numberOfRandomBitsCollected) + }, + + //------------------------------------------------------------------------- + + 'numberOfRandomBitsCollected': function() { + return this._numberOfRandomBitsCollected; + }, + + 'setNumberOfRandomBitsCollected': function(aValue) { + this._numberOfRandomBitsCollected = aValue; + }, + + //------------------------------------------------------------------------- + + 'collectEntropy': function(anEvent) { + var mouseLocation; + var randomBit; + var mask; + + mask = 0xffffffff >>> (32 - this.numberOfBitsToCollectAtEachEvent()); + + mouseLocation = anEvent.mouse().client; + randomBit = ((mouseLocation.x ^ mouseLocation.y) & mask); + this.appendRandomBitsToRandomBitsCollector(randomBit) + }, + + //------------------------------------------------------------------------- + + 'numberOfRandomBits': function() { + return 1; + }, + + //------------------------------------------------------------------------- + + 'pollingFrequency': function() { + return 10; + }, + + //------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" +}); + +//***************************************************************************** + +Clipperz.Crypto.PRNG.KeyboardRandomnessSource = function(args) { + args = args || {}; + Clipperz.Crypto.PRNG.RandomnessSource.call(this, args); + + this._randomBitsCollector = 0; + this._numberOfRandomBitsCollected = 0; + + MochiKit.Signal.connect(document, 'onkeypress', this, 'collectEntropy'); + + return this; +} + +Clipperz.Crypto.PRNG.KeyboardRandomnessSource.prototype = MochiKit.Base.update(new Clipperz.Crypto.PRNG.RandomnessSource, { + + //------------------------------------------------------------------------- + + 'randomBitsCollector': function() { + return this._randomBitsCollector; + }, + + 'setRandomBitsCollector': function(aValue) { + this._randomBitsCollector = aValue; + }, + + 'appendRandomBitToRandomBitsCollector': function(aValue) { + var collectedBits; + var numberOfRandomBitsCollected; + + numberOfRandomBitsCollected = this.numberOfRandomBitsCollected(); + collectetBits = this.randomBitsCollector() | (aValue << numberOfRandomBitsCollected); + this.setRandomBitsCollector(collectetBits); + numberOfRandomBitsCollected ++; + + if (numberOfRandomBitsCollected == 8) { + this.updateGeneratorWithValue(collectetBits); + numberOfRandomBitsCollected = 0; + this.setRandomBitsCollector(0); + } + + this.setNumberOfRandomBitsCollected(numberOfRandomBitsCollected) + }, + + //------------------------------------------------------------------------- + + 'numberOfRandomBitsCollected': function() { + return this._numberOfRandomBitsCollected; + }, + + 'setNumberOfRandomBitsCollected': function(aValue) { + this._numberOfRandomBitsCollected = aValue; + }, + + //------------------------------------------------------------------------- + + 'collectEntropy': function(anEvent) { +/* + var mouseLocation; + var randomBit; + + mouseLocation = anEvent.mouse().client; + + randomBit = ((mouseLocation.x ^ mouseLocation.y) & 0x1); + this.appendRandomBitToRandomBitsCollector(randomBit); +*/ + }, + + //------------------------------------------------------------------------- + + 'numberOfRandomBits': function() { + return 1; + }, + + //------------------------------------------------------------------------- + + 'pollingFrequency': function() { + return 10; + }, + + //------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" +}); + +//############################################################################# + +Clipperz.Crypto.PRNG.Fortuna = function(args) { + var i,c; + + args = args || {}; + + this._key = args.seed || null; + if (this._key == null) { + this._counter = 0; + this._key = new Clipperz.ByteArray(); + } else { + this._counter = 1; + } + + this._aesKey = null; + + this._firstPoolReseedLevel = args.firstPoolReseedLevel || 32 || 64; + this._numberOfEntropyAccumulators = args.numberOfEntropyAccumulators || 32; + + this._accumulators = []; + c = this.numberOfEntropyAccumulators(); + for (i=0; i<c; i++) { + this._accumulators.push(new Clipperz.Crypto.PRNG.EntropyAccumulator()); + } + + this._randomnessSources = []; + this._reseedCounter = 0; + + return this; +} + +Clipperz.Crypto.PRNG.Fortuna.prototype = MochiKit.Base.update(null, { + + 'toString': function() { + return "Clipperz.Crypto.PRNG.Fortuna"; + }, + + //------------------------------------------------------------------------- + + 'key': function() { + return this._key; + }, + + 'setKey': function(aValue) { + this._key = aValue; + this._aesKey = null; + }, + + 'aesKey': function() { + if (this._aesKey == null) { + this._aesKey = new Clipperz.Crypto.AES.Key({key:this.key()}); + } + + return this._aesKey; + }, + + 'accumulators': function() { + return this._accumulators; + }, + + 'firstPoolReseedLevel': function() { + return this._firstPoolReseedLevel; + }, + + //------------------------------------------------------------------------- + + 'reseedCounter': function() { + return this._reseedCounter; + }, + + 'incrementReseedCounter': function() { + this._reseedCounter = this._reseedCounter +1; + }, + + //------------------------------------------------------------------------- + + 'reseed': function() { + var newKeySeed; + var reseedCounter; + var reseedCounterMask; + var i, c; + + newKeySeed = this.key(); + this.incrementReseedCounter(); + reseedCounter = this.reseedCounter(); + + c = this.numberOfEntropyAccumulators(); + reseedCounterMask = 0xffffffff >>> (32 - c); + for (i=0; i<c; i++) { + if ((i == 0) || ((reseedCounter & (reseedCounterMask >>> (c - i))) == 0)) { + newKeySeed.appendBlock(this.accumulators()[i].stack()); + this.accumulators()[i].resetStack(); + } + } + + if (reseedCounter == 1) { + c = this.randomnessSources().length; + for (i=0; i<c; i++) { + this.randomnessSources()[i].setBoostMode(false); + } + } + + this.setKey(Clipperz.Crypto.SHA.sha_d256(newKeySeed)); + if (reseedCounter == 1) { +//MochiKit.Logging.logDebug("### PRNG.readyToGenerateRandomBytes"); +Clipperz.log("### PRNG.readyToGenerateRandomBytes"); + MochiKit.Signal.signal(this, 'readyToGenerateRandomBytes'); + } + MochiKit.Signal.signal(this, 'reseeded'); + }, + + //------------------------------------------------------------------------- + + 'isReadyToGenerateRandomValues': function() { + return this.reseedCounter() != 0; + }, + + //------------------------------------------------------------------------- + + 'entropyLevel': function() { + return this.accumulators()[0].stack().length() + (this.reseedCounter() * this.firstPoolReseedLevel()); + }, + + //------------------------------------------------------------------------- + + 'counter': function() { + return this._counter; + }, + + 'incrementCounter': function() { + this._counter += 1; + }, + + 'counterBlock': function() { + var result; + + result = new Clipperz.ByteArray().appendWords(this.counter(), 0, 0, 0); + + return result; + }, + + //------------------------------------------------------------------------- + + 'getRandomBlock': function() { + var result; + + result = new Clipperz.ByteArray(Clipperz.Crypto.AES.encryptBlock(this.aesKey(), this.counterBlock().arrayValues())); + this.incrementCounter(); + + return result; + }, + + //------------------------------------------------------------------------- + + 'getRandomBytes': function(aSize) { + var result; + + if (this.isReadyToGenerateRandomValues()) { + var i,c; + var newKey; + + result = new Clipperz.ByteArray(); + + c = Math.ceil(aSize / (128 / 8)); + for (i=0; i<c; i++) { + result.appendBlock(this.getRandomBlock()); + } + + if (result.length() != aSize) { + result = result.split(0, aSize); + } + + newKey = this.getRandomBlock().appendBlock(this.getRandomBlock()); + this.setKey(newKey); + } else { +MochiKit.Logging.logWarning("Fortuna generator has not enough entropy, yet!"); + throw Clipperz.Crypto.PRNG.exception.NotEnoughEntropy; + } + + return result; + }, + + //------------------------------------------------------------------------- + + 'addRandomByte': function(aSourceId, aPoolId, aRandomValue) { + var selectedAccumulator; + + selectedAccumulator = this.accumulators()[aPoolId]; + selectedAccumulator.addRandomByte(aRandomValue); + + if (aPoolId == 0) { + MochiKit.Signal.signal(this, 'addedRandomByte') + if (selectedAccumulator.stack().length() > this.firstPoolReseedLevel()) { + this.reseed(); + } + } + }, + + //------------------------------------------------------------------------- + + 'numberOfEntropyAccumulators': function() { + return this._numberOfEntropyAccumulators; + }, + + //------------------------------------------------------------------------- + + 'randomnessSources': function() { + return this._randomnessSources; + }, + + 'addRandomnessSource': function(aRandomnessSource) { + aRandomnessSource.setGenerator(this); + aRandomnessSource.setSourceId(this.randomnessSources().length); + this.randomnessSources().push(aRandomnessSource); + + if (this.isReadyToGenerateRandomValues() == false) { + aRandomnessSource.setBoostMode(true); + } + }, + + //------------------------------------------------------------------------- + + 'deferredEntropyCollection': function(aValue) { + var result; + +//MochiKit.Logging.logDebug(">>> PRNG.deferredEntropyCollection"); + + if (this.isReadyToGenerateRandomValues()) { +//MochiKit.Logging.logDebug("--- PRNG.deferredEntropyCollection - 1"); + result = aValue; + } else { +//MochiKit.Logging.logDebug("--- PRNG.deferredEntropyCollection - 2"); + var deferredResult; + +// Clipperz.NotificationCenter.notify(this, 'updatedProgressState', 'collectingEntropy', true); + + deferredResult = new Clipperz.Async.Deferred("PRNG.deferredEntropyCollection"); +// deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.1 - PRNG.deferredEntropyCollection - 1: " + res); return res;}); + deferredResult.addCallback(MochiKit.Base.partial(MochiKit.Async.succeed, aValue)); +// deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.2 - PRNG.deferredEntropyCollection - 2: " + res); return res;}); + MochiKit.Signal.connect(this, + 'readyToGenerateRandomBytes', + deferredResult, + 'callback'); + + result = deferredResult; + } +//MochiKit.Logging.logDebug("<<< PRNG.deferredEntropyCollection - result: " + result); + + return result; + }, + + //------------------------------------------------------------------------- + + 'fastEntropyAccumulationForTestingPurpose': function() { + while (! this.isReadyToGenerateRandomValues()) { + this.addRandomByte(Math.floor(Math.random() * 32), Math.floor(Math.random() * 32), Math.floor(Math.random() * 256)); + } + }, + + //------------------------------------------------------------------------- + + 'dump': function(appendToDoc) { + var tbl; + var i,c; + + tbl = document.createElement("table"); + tbl.border = 0; + with (tbl.style) { + border = "1px solid lightgrey"; + fontFamily = 'Helvetica, Arial, sans-serif'; + fontSize = '8pt'; + //borderCollapse = "collapse"; + } + var hdr = tbl.createTHead(); + var hdrtr = hdr.insertRow(0); + // document.createElement("tr"); + { + var ntd; + + ntd = hdrtr.insertCell(0); + ntd.style.borderBottom = "1px solid lightgrey"; + ntd.style.borderRight = "1px solid lightgrey"; + ntd.appendChild(document.createTextNode("#")); + + ntd = hdrtr.insertCell(1); + ntd.style.borderBottom = "1px solid lightgrey"; + ntd.style.borderRight = "1px solid lightgrey"; + ntd.appendChild(document.createTextNode("s")); + + ntd = hdrtr.insertCell(2); + ntd.colSpan = this.firstPoolReseedLevel(); + ntd.style.borderBottom = "1px solid lightgrey"; + ntd.style.borderRight = "1px solid lightgrey"; + ntd.appendChild(document.createTextNode("base values")); + + ntd = hdrtr.insertCell(3); + ntd.colSpan = 20; + ntd.style.borderBottom = "1px solid lightgrey"; + ntd.appendChild(document.createTextNode("extra values")); + + } + + c = this.accumulators().length; + for (i=0; i<c ; i++) { + var currentAccumulator; + var bdytr; + var bdytd; + var ii, cc; + + currentAccumulator = this.accumulators()[i] + + bdytr = tbl.insertRow(true); + + bdytd = bdytr.insertCell(0); + bdytd.style.borderRight = "1px solid lightgrey"; + bdytd.style.color = "lightgrey"; + bdytd.appendChild(document.createTextNode("" + i)); + + bdytd = bdytr.insertCell(1); + bdytd.style.borderRight = "1px solid lightgrey"; + bdytd.style.color = "gray"; + bdytd.appendChild(document.createTextNode("" + currentAccumulator.stack().length())); + + + cc = Math.max(currentAccumulator.stack().length(), this.firstPoolReseedLevel()); + for (ii=0; ii<cc; ii++) { + var cellText; + + bdytd = bdytr.insertCell(ii + 2); + + if (ii < currentAccumulator.stack().length()) { + cellText = Clipperz.ByteArray.byteToHex(currentAccumulator.stack().byteAtIndex(ii)); + } else { + cellText = "_"; + } + + if (ii == (this.firstPoolReseedLevel() - 1)) { + bdytd.style.borderRight = "1px solid lightgrey"; + } + + bdytd.appendChild(document.createTextNode(cellText)); + } + + } + + + if (appendToDoc) { + var ne = document.createElement("div"); + ne.id = "entropyGeneratorStatus"; + with (ne.style) { + fontFamily = "Courier New, monospace"; + fontSize = "12px"; + lineHeight = "16px"; + borderTop = "1px solid black"; + padding = "10px"; + } + if (document.getElementById(ne.id)) { + MochiKit.DOM.swapDOM(ne.id, ne); + } else { + document.body.appendChild(ne); + } + ne.appendChild(tbl); + } + + return tbl; + }, + + //----------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" +}); + +//############################################################################# + +Clipperz.Crypto.PRNG.Random = function(args) { + args = args || {}; +// MochiKit.Base.bindMethods(this); + + return this; +} + +Clipperz.Crypto.PRNG.Random.prototype = MochiKit.Base.update(null, { + + 'toString': function() { + return "Clipperz.Crypto.PRNG.Random"; + }, + + //------------------------------------------------------------------------- + + 'getRandomBytes': function(aSize) { +//Clipperz.Profile.start("Clipperz.Crypto.PRNG.Random.getRandomBytes"); + var result; + var i,c; + + result = new Clipperz.ByteArray() + c = aSize || 1; + for (i=0; i<c; i++) { + result.appendByte((Math.random()*255) & 0xff); + } + +//Clipperz.Profile.stop("Clipperz.Crypto.PRNG.Random.getRandomBytes"); + return result; + }, + + //------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" +}); + +//############################################################################# + +_clipperz_crypt_prng_defaultPRNG = null; + +Clipperz.Crypto.PRNG.defaultRandomGenerator = function() { + if (_clipperz_crypt_prng_defaultPRNG == null) { + _clipperz_crypt_prng_defaultPRNG = new Clipperz.Crypto.PRNG.Fortuna(); + + //............................................................. + // + // TimeRandomnessSource + // + //............................................................. + { + var newRandomnessSource; + + newRandomnessSource = new Clipperz.Crypto.PRNG.TimeRandomnessSource({intervalTime:111}); + _clipperz_crypt_prng_defaultPRNG.addRandomnessSource(newRandomnessSource); + } + + //............................................................. + // + // MouseRandomnessSource + // + //............................................................. + { + var newRandomnessSource; + + newRandomnessSource = new Clipperz.Crypto.PRNG.MouseRandomnessSource(); + _clipperz_crypt_prng_defaultPRNG.addRandomnessSource(newRandomnessSource); + } + + //............................................................. + // + // KeyboardRandomnessSource + // + //............................................................. + { + var newRandomnessSource; + + newRandomnessSource = new Clipperz.Crypto.PRNG.KeyboardRandomnessSource(); + _clipperz_crypt_prng_defaultPRNG.addRandomnessSource(newRandomnessSource); + } + + } + + return _clipperz_crypt_prng_defaultPRNG; +}; + +//############################################################################# + +Clipperz.Crypto.PRNG.exception = { + NotEnoughEntropy: new MochiKit.Base.NamedError("Clipperz.Crypto.PRNG.exception.NotEnoughEntropy") +}; + + +MochiKit.DOM.addLoadEvent(Clipperz.Crypto.PRNG.defaultRandomGenerator); diff --git a/frontend/gamma/js/ClipperzCryptoLibrary/RSA.js b/frontend/gamma/js/ClipperzCryptoLibrary/RSA.js new file mode 100644 index 0000000..5a480f1 --- a/dev/null +++ b/frontend/gamma/js/ClipperzCryptoLibrary/RSA.js @@ -0,0 +1,146 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +try { if (typeof(Clipperz.Crypto.BigInt) == 'undefined') { throw ""; }} catch (e) { + throw "Clipperz.Crypto.RSA depends on Clipperz.Crypto.BigInt!"; +} + +if (typeof(Clipperz.Crypto.RSA) == 'undefined') { Clipperz.Crypto.RSA = {}; } + +Clipperz.Crypto.RSA.VERSION = "0.1"; +Clipperz.Crypto.RSA.NAME = "Clipperz.RSA"; + +//############################################################################# + +MochiKit.Base.update(Clipperz.Crypto.RSA, { + + //------------------------------------------------------------------------- + + 'publicKeyWithValues': function (e, d, n) { + var result; + + result = {}; + + if (e.isBigInt) { + result.e = e; + } else { + result.e = new Clipperz.Crypto.BigInt(e, 16); + } + + if (d.isBigInt) { + result.d = d; + } else { + result.d = new Clipperz.Crypto.BigInt(d, 16); + } + + if (n.isBigInt) { + result.n = n; + } else { + result.n = new Clipperz.Crypto.BigInt(n, 16); + } + + return result; + }, + + 'privateKeyWithValues': function(e, d, n) { + return Clipperz.Crypto.RSA.publicKeyWithValues(e, d, n); + }, + + //----------------------------------------------------------------------------- + + 'encryptUsingPublicKey': function (aKey, aMessage) { + var messageValue; + var result; + + messageValue = new Clipperz.Crypto.BigInt(aMessage, 16); + result = messageValue.powerModule(aKey.e, aKey.n); + + return result.asString(16); + }, + + //............................................................................. + + 'decryptUsingPublicKey': function (aKey, aMessage) { + return Clipperz.Crypto.RSA.encryptUsingPublicKey(aKey, aMessage); + }, + + //----------------------------------------------------------------------------- + + 'encryptUsingPrivateKey': function (aKey, aMessage) { + var messageValue; + var result; + + messageValue = new Clipperz.Crypto.BigInt(aMessage, 16); + result = messageValue.powerModule(aKey.d, aKey.n); + + return result.asString(16); + }, + + //............................................................................. + + 'decryptUsingPrivateKey': function (aKey, aMessage) { + return Clipperz.Crypto.RSA.encryptUsingPrivateKey(aKey, aMessage); + }, + + //----------------------------------------------------------------------------- + + 'generatePublicKey': function(aNumberOfBits) { + var result; + var e; + var d; + var n; + + e = new Clipperz.Crypto.BigInt("10001", 16); + + { + var p, q; + var phi; + + do { + p = Clipperz.Crypto.BigInt.randomPrime(aNumberOfBits); + } while (p.module(e).equals(1)); + + do { + q = Clipperz.Crypto.BigInt.randomPrime(aNumberOfBits); + } while ((q.equals(p)) || (q.module(e).equals(1))); + + n = p.multiply(q); + phi = (p.subtract(1).multiply(q.subtract(1))); + d = e.powerModule(-1, phi); + } + + result = Clipperz.Crypto.RSA.publicKeyWithValues(e, d, n); + + return result; + }, + + //------------------------------------------------------------------------- + + __syntaxFix__: "syntax fix" + + //------------------------------------------------------------------------- + +}); + +//############################################################################# + diff --git a/frontend/gamma/js/ClipperzCryptoLibrary/SHA.js b/frontend/gamma/js/ClipperzCryptoLibrary/SHA.js new file mode 100644 index 0000000..f8bfe6e --- a/dev/null +++ b/frontend/gamma/js/ClipperzCryptoLibrary/SHA.js @@ -0,0 +1,296 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { + throw "Clipperz.Crypto.PRNG depends on Clipperz.ByteArray!"; +} + +if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } +if (typeof(Clipperz.Crypto.SHA) == 'undefined') { Clipperz.Crypto.SHA = {}; } + +Clipperz.Crypto.SHA.VERSION = "0.3"; +Clipperz.Crypto.SHA.NAME = "Clipperz.Crypto.SHA"; + +MochiKit.Base.update(Clipperz.Crypto.SHA, { + + '__repr__': function () { + return "[" + this.NAME + " " + this.VERSION + "]"; + }, + + 'toString': function () { + return this.__repr__(); + }, + + //----------------------------------------------------------------------------- + + 'rotateRight': function(aValue, aNumberOfBits) { +//Clipperz.Profile.start("Clipperz.Crypto.SHA.rotateRight"); + var result; + + result = (aValue >>> aNumberOfBits) | (aValue << (32 - aNumberOfBits)); + +//Clipperz.Profile.stop("Clipperz.Crypto.SHA.rotateRight"); + return result; + }, + + 'shiftRight': function(aValue, aNumberOfBits) { +//Clipperz.Profile.start("Clipperz.Crypto.SHA.shiftRight"); + var result; + + result = aValue >>> aNumberOfBits; + +//Clipperz.Profile.stop("Clipperz.Crypto.SHA.shiftRight"); + return result; + }, + + //----------------------------------------------------------------------------- + + 'safeAdd': function() { +//Clipperz.Profile.start("Clipperz.Crypto.SHA.safeAdd"); + var result; + var i, c; + + result = arguments[0]; + c = arguments.length; + for (i=1; i<c; i++) { + var lowerBytesSum; + + lowerBytesSum = (result & 0xffff) + (arguments[i] & 0xffff); + result = (((result >> 16) + (arguments[i] >> 16) + (lowerBytesSum >> 16)) << 16) | (lowerBytesSum & 0xffff); + } + +//Clipperz.Profile.stop("Clipperz.Crypto.SHA.safeAdd"); + return result; + }, + + //----------------------------------------------------------------------------- + + 'sha256_array': function(aValue) { +//Clipperz.Profile.start("Clipperz.Crypto.SHA.sha256_array"); + var result; + var message; + var h0, h1, h2, h3, h4, h5, h6, h7; + var k; + var messageLength; + var messageLengthInBits; + var _i, _c; + var charBits; + var rotateRight; + var shiftRight; + var safeAdd; + var bytesPerBlock; + var currentMessageIndex; + + bytesPerBlock = 512/8; + rotateRight = Clipperz.Crypto.SHA.rotateRight; + shiftRight = Clipperz.Crypto.SHA.shiftRight; + safeAdd = Clipperz.Crypto.SHA.safeAdd; + + charBits = 8; + + h0 = 0x6a09e667; + h1 = 0xbb67ae85; + h2 = 0x3c6ef372; + h3 = 0xa54ff53a; + h4 = 0x510e527f; + h5 = 0x9b05688c; + h6 = 0x1f83d9ab; + h7 = 0x5be0cd19; + + k = [ 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2]; + + message = aValue; + messageLength = message.length; + + //Pre-processing: + message.push(0x80); // append a single "1" bit to message + + _c = (512 - (((messageLength + 1) * charBits) % 512) - 64) / charBits; + if (_c < 0) { + _c = _c + (512 / charBits); + } + + for (_i=0; _i<_c; _i++) { + message.push(0x00); // append "0" bits until message length ≡ 448 ≡ -64 (mod 512) + } + + messageLengthInBits = messageLength * charBits; + message.push(0x00); // the 4 most high byte are alway 0 as message length is represented with a 32bit value; + message.push(0x00); + message.push(0x00); + message.push(0x00); + message.push((messageLengthInBits >> 24) & 0xff); + message.push((messageLengthInBits >> 16) & 0xff); + message.push((messageLengthInBits >> 8) & 0xff); + message.push( messageLengthInBits & 0xff); + + currentMessageIndex = 0; + while(currentMessageIndex < message.length) { + var w; + var a, b, c, d, e, f, g, h; + + w = Array(64); + + _c = 16; + for (_i=0; _i<_c; _i++) { + var _j; + + _j = currentMessageIndex + _i*4; + w[_i] = (message[_j] << 24) | (message[_j + 1] << 16) | (message[_j + 2] << 8) | (message[_j + 3] << 0); + } + + _c = 64; + for (_i=16; _i<_c; _i++) { + var s0, s1; + + s0 = (rotateRight(w[_i-15], 7)) ^ (rotateRight(w[_i-15], 18)) ^ (shiftRight(w[_i-15], 3)); + s1 = (rotateRight(w[_i-2], 17)) ^ (rotateRight(w[_i-2], 19)) ^ (shiftRight(w[_i-2], 10)); + w[_i] = safeAdd(w[_i-16], s0, w[_i-7], s1); + } + + a=h0; b=h1; c=h2; d=h3; e=h4; f=h5; g=h6; h=h7; + + _c = 64; + for (_i=0; _i<_c; _i++) { + var s0, s1, ch, maj, t1, t2; + + s0 = (rotateRight(a, 2)) ^ (rotateRight(a, 13)) ^ (rotateRight(a, 22)); + maj = (a & b) ^ (a & c) ^ (b & c); + t2 = safeAdd(s0, maj); + s1 = (rotateRight(e, 6)) ^ (rotateRight(e, 11)) ^ (rotateRight(e, 25)); + ch = (e & f) ^ ((~e) & g); + t1 = safeAdd(h, s1, ch, k[_i], w[_i]); + + h = g; + g = f; + f = e; + e = safeAdd(d, t1); + d = c; + c = b; + b = a; + a = safeAdd(t1, t2); + } + + h0 = safeAdd(h0, a); + h1 = safeAdd(h1, b); + h2 = safeAdd(h2, c); + h3 = safeAdd(h3, d); + h4 = safeAdd(h4, e); + h5 = safeAdd(h5, f); + h6 = safeAdd(h6, g); + h7 = safeAdd(h7, h); + + currentMessageIndex += bytesPerBlock; + } + + result = new Array(256/8); + result[0] = (h0 >> 24) & 0xff; + result[1] = (h0 >> 16) & 0xff; + result[2] = (h0 >> 8) & 0xff; + result[3] = h0 & 0xff; + + result[4] = (h1 >> 24) & 0xff; + result[5] = (h1 >> 16) & 0xff; + result[6] = (h1 >> 8) & 0xff; + result[7] = h1 & 0xff; + + result[8] = (h2 >> 24) & 0xff; + result[9] = (h2 >> 16) & 0xff; + result[10] = (h2 >> 8) & 0xff; + result[11] = h2 & 0xff; + + result[12] = (h3 >> 24) & 0xff; + result[13] = (h3 >> 16) & 0xff; + result[14] = (h3 >> 8) & 0xff; + result[15] = h3 & 0xff; + + result[16] = (h4 >> 24) & 0xff; + result[17] = (h4 >> 16) & 0xff; + result[18] = (h4 >> 8) & 0xff; + result[19] = h4 & 0xff; + + result[20] = (h5 >> 24) & 0xff; + result[21] = (h5 >> 16) & 0xff; + result[22] = (h5 >> 8) & 0xff; + result[23] = h5 & 0xff; + + result[24] = (h6 >> 24) & 0xff; + result[25] = (h6 >> 16) & 0xff; + result[26] = (h6 >> 8) & 0xff; + result[27] = h6 & 0xff; + + result[28] = (h7 >> 24) & 0xff; + result[29] = (h7 >> 16) & 0xff; + result[30] = (h7 >> 8) & 0xff; + result[31] = h7 & 0xff; + +//Clipperz.Profile.stop("Clipperz.Crypto.SHA.sha256_array"); + return result; + }, + + //----------------------------------------------------------------------------- + + 'sha256': function(aValue) { +//Clipperz.Profile.start("Clipperz.Crypto.SHA.sha256"); + var result; + var resultArray; + var valueArray; + + valueArray = aValue.arrayValues(); + resultArray = Clipperz.Crypto.SHA.sha256_array(valueArray); + + result = new Clipperz.ByteArray(resultArray); + +//Clipperz.Profile.stop("Clipperz.Crypto.SHA.sha256"); + return result; + }, + + //----------------------------------------------------------------------------- + + 'sha_d256': function(aValue) { +//Clipperz.Profile.start("Clipperz.Crypto.SHA.sha_d256"); + var result; + var resultArray; + var valueArray; + + valueArray = aValue.arrayValues(); + resultArray = Clipperz.Crypto.SHA.sha256_array(valueArray); + resultArray = Clipperz.Crypto.SHA.sha256_array(resultArray); + + result = new Clipperz.ByteArray(resultArray); + +//Clipperz.Profile.stop("Clipperz.Crypto.SHA.sha256"); + return result; + }, + + //----------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" + +}); diff --git a/frontend/gamma/js/ClipperzCryptoLibrary/SRP.js b/frontend/gamma/js/ClipperzCryptoLibrary/SRP.js new file mode 100644 index 0000000..8cc80ba --- a/dev/null +++ b/frontend/gamma/js/ClipperzCryptoLibrary/SRP.js @@ -0,0 +1,326 @@ +/* + +Copyright 2008-2013 Clipperz Srl + +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 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 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. If not, see http://www.gnu.org/licenses/. + +*/ + +try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { + throw "Clipperz.Crypto.PRNG depends on Clipperz.ByteArray!"; +} + +try { if (typeof(Clipperz.Crypto.BigInt) == 'undefined') { throw ""; }} catch (e) { + throw "Clipperz.Crypto.SRP depends on Clipperz.Crypto.BigInt!"; +} + +try { if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { throw ""; }} catch (e) { + throw "Clipperz.Crypto.SRP depends on Clipperz.Crypto.PRNG!"; +} + +if (typeof(Clipperz.Crypto.SRP) == 'undefined') { Clipperz.Crypto.SRP = {}; } + +Clipperz.Crypto.SRP.VERSION = "0.1"; +Clipperz.Crypto.SRP.NAME = "Clipperz.Crypto.SRP"; + +//############################################################################# + +MochiKit.Base.update(Clipperz.Crypto.SRP, { + + '_n': null, + '_g': null, + //------------------------------------------------------------------------- + + 'n': function() { + if (Clipperz.Crypto.SRP._n == null) { + Clipperz.Crypto.SRP._n = new Clipperz.Crypto.BigInt("115b8b692e0e045692cf280b436735c77a5a9e8a9e7ed56c965f87db5b2a2ece3", 16); + } + + return Clipperz.Crypto.SRP._n; + }, + + //------------------------------------------------------------------------- + + 'g': function() { + if (Clipperz.Crypto.SRP._g == null) { + Clipperz.Crypto.SRP._g = new Clipperz.Crypto.BigInt(2); // eventually 5 (as suggested on the Diffi-Helmann documentation) + } + + return Clipperz.Crypto.SRP._g; + }, + + //----------------------------------------------------------------------------- + + 'exception': { + 'InvalidValue': new MochiKit.Base.NamedError("Clipperz.Crypto.SRP.exception.InvalidValue") + }, + + //------------------------------------------------------------------------- + __syntaxFix__: "syntax fix" + +}); + +//############################################################################# +// +// S R P C o n n e c t i o n version 1.0 +// +//============================================================================= +Clipperz.Crypto.SRP.Connection = function (args) { + args = args || {}; + + this._C = args.C; + this._P = args.P; + this.hash = args.hash; + + this._a = null; + this._A = null; + + this._s = null; + this._B = null; + + this._x = null; + + this._u = null; + this._K = null; + this._M1 = null; + this._M2 = null; + + this._sessionKey = null; + + return this; +} + +Clipperz.Crypto.SRP.Connection.prototype = MochiKit.Base.update(null, { + + 'toString': function () { + return "Clipperz.Crypto.SRP.Connection (username: " + this.username() + "). Status: " + this.statusDescription(); + }, + + //------------------------------------------------------------------------- + + 'C': function () { + return this._C; + }, + + //------------------------------------------------------------------------- + + 'P': function () { + return this._P; + }, + + //------------------------------------------------------------------------- + + 'a': function () { + if (this._a == null) { + this._a = new Clipperz.Crypto.BigInt(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2), 16); +// this._a = new Clipperz.Crypto.BigInt("37532428169486597638072888476611365392249575518156687476805936694442691012367", 10); +//MochiKit.Logging.logDebug("SRP a: " + this._a); + } + + return this._a; + }, + + //------------------------------------------------------------------------- + + 'A': function () { + if (this._A == null) { + // Warning: this value should be strictly greater than zero: how should we perform this check? + this._A = Clipperz.Crypto.SRP.g().powerModule(this.a(), Clipperz.Crypto.SRP.n()); + + if (this._A.equals(0)) { +MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'A' to 0."); + throw Clipperz.Crypto.SRP.exception.InvalidValue; + } +//MochiKit.Logging.logDebug("SRP A: " + this._A); + } + + return this._A; + }, + + //------------------------------------------------------------------------- + + 's': function () { + return this._s; +//MochiKit.Logging.logDebug("SRP s: " + this._S); + }, + + 'set_s': function(aValue) { + this._s = aValue; + }, + + //------------------------------------------------------------------------- + + 'B': function () { + return this._B; + }, + + 'set_B': function(aValue) { + // Warning: this value should be strictly greater than zero: how should we perform this check? + if (! aValue.equals(0)) { + this._B = aValue; +//MochiKit.Logging.logDebug("SRP B: " + this._B); + } else { +MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'B' to 0."); + throw Clipperz.Crypto.SRP.exception.InvalidValue; + } + }, + + //------------------------------------------------------------------------- + + 'x': function () { + if (this._x == null) { + this._x = new Clipperz.Crypto.BigInt(this.stringHash(this.s().asString(16, 64) + this.P()), 16); +//MochiKit.Logging.logDebug("SRP x: " + this._x); + } + + return this._x; + }, + + //------------------------------------------------------------------------- + + 'u': function () { + if (this._u == null) { + this._u = new Clipperz.Crypto.BigInt(this.stringHash(this.B().asString()), 16); +//MochiKit.Logging.logDebug("SRP u: " + this._u); + } + + return this._u; + }, + + //------------------------------------------------------------------------- + + 'S': function () { + if (this._S == null) { + var bigint; + var srp; + + bigint = Clipperz.Crypto.BigInt; + srp = Clipperz.Crypto.SRP; + + this._S = bigint.powerModule( + bigint.subtract(this.B(), bigint.powerModule(srp.g(), this.x(), srp.n())), + bigint.add(this.a(), bigint.multiply(this.u(), this.x())), + srp.n() + ) +//MochiKit.Logging.logDebug("SRP S: " + this._S); + } + + return this._S; + }, + + //------------------------------------------------------------------------- + + 'K': function () { + if (this._K == null) { + this._K = this.stringHash(this.S().asString()); +//MochiKit.Logging.logDebug("SRP K: " + this._K); + } + + return this._K; + }, + + //------------------------------------------------------------------------- + + 'M1': function () { + if (this._M1 == null) { + this._M1 = this.stringHash(this.A().asString(10) + this.B().asString(10) + this.K()); +//MochiKit.Logging.logDebug("SRP M1: " + this._M1); + } + + return this._M1; + }, + + //------------------------------------------------------------------------- + + 'M2': function () { + if (this._M2 == null) { + this._M2 = this.stringHash(this.A().asString(10) + this.M1() + this.K()); +//MochiKit.Logging.logDebug("SRP M2: " + this._M2); + } + + return this._M2; + }, + + //========================================================================= + + 'serverSideCredentialsWithSalt': function(aSalt) { + var result; + var s, x, v; + + s = aSalt; + x = this.stringHash(s + this.P()); + v = Clipperz.Crypto.SRP.g().powerModule(new Clipperz.Crypto.BigInt(x, 16), Clipperz.Crypto.SRP.n()); + + result = {}; + result['C'] = this.C(); + result['s'] = s; + result['v'] = v.asString(16); + + return result; + }, + + 'serverSideCredentials': function() { + var result; + var s; + + s = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2); + + result = this.serverSideCredentialsWithSalt(s); + + return result; + }, + + //========================================================================= +/* + 'computeServerSide_S': function(b) { + var result; + var v; + var bigint; + var srp; + + bigint = Clipperz.Crypto.BigInt; + srp = Clipperz.Crypto.SRP; + + v = new Clipperz.Crypto.BigInt(srpConnection.serverSideCredentialsWithSalt(this.s().asString(16, 64)).v, 16); +// _S = (this.A().multiply(this.v().modPow(this.u(), this.n()))).modPow(this.b(), this.n()); + result = bigint.powerModule( + bigint.multiply( + this.A(), + bigint.powerModule(v, this.u(), srp.n()) + ), new Clipperz.Crypto.BigInt(b, 10), srp.n() + ); + + return result; + }, +*/ + //========================================================================= + + 'stringHash': function(aValue) { + var result; + + result = this.hash(new Clipperz.ByteArray(aValue)).toHexString().substring(2); + + return result; + }, + + //========================================================================= + __syntaxFix__: "syntax fix" + +}); + +//############################################################################# diff --git a/frontend/gamma/js/main.js b/frontend/gamma/js/main.js index 934b325..6816754 100644 --- a/frontend/gamma/js/main.js +++ b/frontend/gamma/js/main.js @@ -1,93 +1,91 @@ /* -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/. */ function _pm_logEvent(anEvent) { // console.log("####", anEvent); anEvent.preventDefault(); } function handleGenericDeferredError(anError) { var result; if (anError instanceof MochiKit.Async.CancelledError) { result = anError; } else { MochiKit.Logging.logError("## MainController - GENERIC ERROR" + "\n" + "==>> " + anError + " <<==\n" + anError.stack); //console.log(anError); result = new MochiKit.Async.CancelledError(anError); } return result; } Clipperz.PM.RunTime = {}; function run() { var shouldShowRegistrationForm; var useCompactDesign; var controllerParameters; controllerParameters = {}; // MochiKit.DOM.removeElement('javaScriptAlert'); Clipperz.PM.Strings.Languages.initSetup(); if (window.location.search.indexOf('registration') != -1) { shouldShowRegistrationForm = true; } else { shouldShowRegistrationForm = false; } if (window.location.search.indexOf('autocomplete') != -1) { controllerParameters['autocomplete'] = 'on' } if (window.location.search.indexOf('compact') != -1) { useCompactDesign = true; } else { useCompactDesign = false; } if (useCompactDesign == true) { Clipperz.PM.RunTime.mainController = new Clipperz.PM.UI.Compact.Controllers.MainController(controllerParameters); } else { Clipperz.PM.RunTime.mainController = new Clipperz.PM.UI.Web.Controllers.MainController(controllerParameters); } Clipperz.PM.RunTime.mainController.run(shouldShowRegistrationForm); //Clipperz.log("HASH: " + window.location.hash); // if (window.location.hash != "") { // window.location.hash = "" // } // Clipperz.log("HASH cleaned"); // #credentials=base64encoded({username:'joe', passphrase:'clipperz'}) // MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'doLogin', {username:'joe', passphrase:'clipperz'}); } MochiKit.DOM.addLoadEvent(run); diff --git a/frontend/gamma/js/main.mobile.js b/frontend/gamma/js/main.mobile.js index 60a32fa..2fdd920 100644 --- a/frontend/gamma/js/main.mobile.js +++ b/frontend/gamma/js/main.mobile.js @@ -1,64 +1,62 @@ /* -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/. */ function _pm_logEvent(anEvent) { // console.log("####", anEvent); anEvent.preventDefault(); } function handleGenericDeferredError(anError) { var result; if (anError instanceof MochiKit.Async.CancelledError) { result = anError; } else { MochiKit.Logging.logError("## MainController - GENERIC ERROR" + "\n" + "==>> " + anError + " <<==\n" + anError.stack); result = new MochiKit.Async.CancelledError(anError); } return result; } Clipperz.PM.RunTime = {}; function run() { Clipperz.PM.Strings.Languages.initSetup(); Clipperz.PM.RunTime.mainController = new Clipperz.PM.UI.Mobile.Controllers.MainController(); Clipperz.PM.RunTime.mainController.run(); } // if (navigator.standalone == false) { // window.localStorage.setItem('PIN', '1234'); // alert("Saved PIN"); // } else { // alert (window.localStorage.getItem('PIN')); // } MochiKit.DOM.addLoadEvent(run); diff --git a/frontend/gamma/properties/gamma.properties.json b/frontend/gamma/properties/gamma.properties.json index eec4194..d00e03a 100644 --- a/frontend/gamma/properties/gamma.properties.json +++ b/frontend/gamma/properties/gamma.properties.json @@ -1,114 +1,114 @@ { "copyright.values": { "mochikit.repository": "https://github.com/mochi/mochikit.git", "mochikit.version": "fe8d17bb9ac0a4e5ad4a8d5c2c94a6fac1c92d75" }, "html.template": "index_template.html", "js": [ "MochiKit/Base.js", "MochiKit/Iter.js", - "MochiKit/Logging.js", + "-- MochiKit/Logging.js", "-- MochiKit/DateTime.js", "MochiKit/Format.js", "MochiKit/Async.js", "MochiKit/DOM.js", "MochiKit/Style.js", - "MochiKit/LoggingPane.js", + "-- MochiKit/LoggingPane.js", "MochiKit/Color.js", "MochiKit/Signal.js", "MochiKit/Position.js", "MochiKit/Selector.js", "MochiKit/Visual.js", "JSON/json2.js", "Clipperz/YUI/Utils.js", "Clipperz/YUI/DomHelper.js", "Clipperz/ByteArray.js", "Clipperz/Base.js", "Clipperz/Async.js", "Clipperz/CSVProcessor.js", "Clipperz/KeePassExportProcessor.js", "Clipperz/Date.js", "Clipperz/DOM.js", "Clipperz/Logging.js", "Clipperz/Signal.js", "Clipperz/Style.js", "Clipperz/Visual.js", "Clipperz/Set.js", "-- Clipperz/Profile.js", "Clipperz/KeyValueObjectStore.js", "Clipperz/Crypto/SHA.js", "Clipperz/Crypto/AES.js", "Clipperz/Crypto/PRNG.js", "Clipperz/Crypto/BigInt.js", "Clipperz/Crypto/Base.js", "Clipperz/Crypto/SRP.js", "Clipperz/Crypto/RSA.js", "Clipperz/PM/Strings/Strings_defaults.js", "Clipperz/PM/Strings/Strings_en-US.js", "-- # Clipperz/PM/Strings/Strings_en-GB.js", "-- # Clipperz/PM/Strings/Strings_en-CA.js", "-- Clipperz/PM/Strings/Strings_it-IT.js", "-- Clipperz/PM/Strings/Strings_pt-BR.js", "-- # Clipperz/PM/Strings/Strings_pt-PT.js", "-- Clipperz/PM/Strings/Strings_ja-JP.js", "-- Clipperz/PM/Strings/Strings_zh-CN.js", "-- Clipperz/PM/Strings/Strings_es-ES.js", "-- Clipperz/PM/Strings/Strings_fr-FR.js", "-- # Clipperz/PM/Strings/Strings_de-DE.js", "-- # Clipperz/PM/Strings/Strings_el-GR.js", "-- # Clipperz/PM/Strings/Strings_ru-RU.js", "-- # Clipperz/PM/Strings/Strings_he-IL.js", "Clipperz/PM/Strings.js", "-- Clipperz/PM/Strings/MessagePanelConfigurations.js", "Clipperz/PM/Date.js", "Clipperz/PM/Toll.js", "Clipperz/PM/Proxy.js", "Clipperz/PM/Proxy/Proxy.JSON.js", "Clipperz/PM/Proxy/Proxy.Offline.js", "Clipperz/PM/Proxy/Proxy.Offline.DataStore.js", "Clipperz/PM/Connection.js", "Clipperz/PM/Crypto.js", "Clipperz/PM/BookmarkletProcessor.js", "Clipperz/PM/DataModel/EncryptedRemoteObject.js", "Clipperz/PM/DataModel/User.js", "Clipperz/PM/DataModel/User.Header.Legacy.js", "Clipperz/PM/DataModel/User.Header.RecordIndex.js", "Clipperz/PM/DataModel/User.Header.Preferences.js", "Clipperz/PM/DataModel/User.Header.OneTimePasswords.js", "Clipperz/PM/DataModel/Record.js", "Clipperz/PM/DataModel/Record.Version.js", "Clipperz/PM/DataModel/Record.Version.Field.js", "Clipperz/PM/DataModel/DirectLogin.js", "Clipperz/PM/DataModel/DirectLoginInput.js", "Clipperz/PM/DataModel/DirectLoginBinding.js", "Clipperz/PM/DataModel/DirectLoginFormValue.js", "Clipperz/PM/DataModel/OneTimePassword.js", "Clipperz/PM/UI/Canvas/Marks/exclamationMark.js", "Clipperz/PM/UI/Canvas/Marks/questionMark.js", "Clipperz/PM/UI/Canvas/Marks/info.js", "Clipperz/PM/UI/Canvas/Features/store.js", "Clipperz/PM/UI/Canvas/Features/protect.js", "Clipperz/PM/UI/Canvas/Features/directLogin.js", "Clipperz/PM/UI/Canvas/Features/share.js", "Clipperz/PM/UI/Canvas/Star/normal.js", "Clipperz/PM/UI/Canvas/CoverActions/look.js", "Clipperz/PM/UI/Canvas/CoverActions/download.js", "Clipperz/PM/UI/Canvas/Tips/open.js", "Clipperz/PM/UI/Canvas/Tips/close.js", "Clipperz/PM/UI/Canvas/RegisterButton/normal.js", diff --git a/frontend/gamma/properties/mobile.properties.json b/frontend/gamma/properties/mobile.properties.json index bdb2d07..0127ce6 100644 --- a/frontend/gamma/properties/mobile.properties.json +++ b/frontend/gamma/properties/mobile.properties.json @@ -2,141 +2,155 @@ "copyright.values": { "mochikit.repository": "https://github.com/mochi/mochikit.git", "mochikit.version": "fe8d17bb9ac0a4e5ad4a8d5c2c94a6fac1c92d75" }, "html.template": "mobile_template.html", "js": [ "MochiKit/Base.js", "MochiKit/Iter.js", "MochiKit/Logging.js", "MochiKit/DateTime.js", "MochiKit/Format.js", "MochiKit/Async.js", "MochiKit/DOM.js", "MochiKit/Style.js", "MochiKit/LoggingPane.js", "-- MochiKit/Color.js", "MochiKit/Signal.js", "-- MochiKit/Position.js", "MochiKit/Selector.js", "-- MochiKit/Visual.js", "JSON/json2.js", "Clipperz/YUI/Utils.js", "Clipperz/YUI/DomHelper.js", "Clipperz/ByteArray.js", "Clipperz/Base.js", "Clipperz/Async.js", "-- Clipperz/CSVProcessor.js", "-- Clipperz/KeePassExportProcessor.js", "Clipperz/Date.js", "Clipperz/DOM.js", "Clipperz/Logging.js", "Clipperz/Signal.js", "-- Clipperz/Style.js", "-- Clipperz/Visual.js", "Clipperz/Set.js", "Clipperz/KeyValueObjectStore.js", "Clipperz/Crypto/SHA.js", "Clipperz/Crypto/AES.js", "Clipperz/Crypto/PRNG.js", "Clipperz/Crypto/BigInt.js", "Clipperz/Crypto/Base.js", "Clipperz/Crypto/SRP.js", "Clipperz/Crypto/RSA.js", "Clipperz/PM/Strings/Strings_defaults.js", "Clipperz/PM/Strings/Strings_en-US.js", "-- # Clipperz/PM/Strings/Strings_en-GB.js", "-- # Clipperz/PM/Strings/Strings_en-CA.js", "-- Clipperz/PM/Strings/Strings_it-IT.js", "-- Clipperz/PM/Strings/Strings_pt-BR.js", "-- # Clipperz/PM/Strings/Strings_pt-PT.js", "-- Clipperz/PM/Strings/Strings_ja-JP.js", "-- Clipperz/PM/Strings/Strings_zh-CN.js", "-- Clipperz/PM/Strings/Strings_es-ES.js", "-- Clipperz/PM/Strings/Strings_fr-FR.js", "-- # Clipperz/PM/Strings/Strings_de-DE.js", "-- # Clipperz/PM/Strings/Strings_el-GR.js", "-- # Clipperz/PM/Strings/Strings_ru-RU.js", "-- # Clipperz/PM/Strings/Strings_he-IL.js", "Clipperz/PM/Strings.js", "-- Clipperz/PM/Strings/MessagePanelConfigurations.js", "Clipperz/PM/Date.js", "Clipperz/PM/Toll.js", "Clipperz/PM/Proxy.js", "Clipperz/PM/Proxy/Proxy.JSON.js", "-- Clipperz/PM/Proxy/Proxy.OfflineCache.js", "Clipperz/PM/Proxy/Proxy.Offline.js", "Clipperz/PM/Proxy/Proxy.Offline.DataStore.js", "Clipperz/PM/Connection.js", "Clipperz/PM/Crypto.js", "Clipperz/PM/PIN.js", "Clipperz/PM/DataModel/EncryptedRemoteObject.js", "Clipperz/PM/DataModel/User.js", "Clipperz/PM/DataModel/User.Header.Legacy.js", "Clipperz/PM/DataModel/User.Header.RecordIndex.js", "Clipperz/PM/DataModel/User.Header.Preferences.js", "Clipperz/PM/DataModel/User.Header.OneTimePasswords.js", "Clipperz/PM/DataModel/Record.js", "Clipperz/PM/DataModel/Record.Version.js", "Clipperz/PM/DataModel/Record.Version.Field.js", "Clipperz/PM/DataModel/DirectLogin.js", "Clipperz/PM/DataModel/DirectLoginInput.js", "Clipperz/PM/DataModel/DirectLoginBinding.js", "Clipperz/PM/DataModel/DirectLoginFormValue.js", "Clipperz/PM/DataModel/OneTimePassword.js", - "Zepto/zepto.js", - "Zepto/ajax.js", - "Zepto/assets.js", - "Zepto/data.js", - "Zepto/detect.js", - "Zepto/event.js", - "Zepto/form.js", - "Zepto/fx.js", - "Zepto/fx_methods.js", - "Zepto/gesture.js", - "Zepto/polyfill.js", - "Zepto/selector.js", - "Zepto/stack.js", - "Zepto/touch.js", - - "JQTouch/jqtouch.js", + "-- Zepto/zepto.js", + "-- Zepto/ajax.js", + "-- Zepto/assets.js", + "-- Zepto/data.js", + "-- Zepto/detect.js", + "-- Zepto/event.js", + "-- Zepto/form.js", + "-- Zepto/fx.js", + "-- Zepto/fx_methods.js", + "-- Zepto/gesture.js", + "-- Zepto/polyfill.js", + "-- Zepto/selector.js", + "-- Zepto/stack.js", + "-- Zepto/touch.js", + + "-- JQTouch/jqtouch.js", + + "-- Bootstrap/bootstrap-affix.js", + "-- Bootstrap/bootstrap-alert.js", + "-- Bootstrap/bootstrap-button.js", + "-- Bootstrap/bootstrap-carousel.js", + "-- Bootstrap/bootstrap-collapse.js", + "-- Bootstrap/bootstrap-dropdown.js", + "-- Bootstrap/bootstrap-modal.js", + "-- Bootstrap/bootstrap-popover.js", + "-- Bootstrap/bootstrap-scrollspy.js", + "-- Bootstrap/bootstrap-tab.js", + "-- Bootstrap/bootstrap-tooltip.js", + "-- Bootstrap/bootstrap-transition.js", + "-- Bootstrap/bootstrap-typeahead.js", "Clipperz/PM/UI/Common/Components/BaseComponent.js", "-- Clipperz/PM/UI/Common/Components/Button.js", "Clipperz/PM/UI/Common/Components/ComponentSlot.js", "-- Clipperz/PM/UI/Common/Components/PasswordEntropyDisplay.js", "Clipperz/PM/UI/Common/Components/ProgressBar.js", "-- Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js", "-- Clipperz/PM/UI/Common/Components/MessagePanelWithProgressBar.js", "-- Clipperz/PM/UI/Common/Components/TabPanelComponent.js", "-- Clipperz/PM/UI/Common/Components/Tooltip.js", "-- Clipperz/PM/UI/Common/Components/TranslatorWidget.js", "Clipperz/PM/UI/Common/Controllers/DirectLoginRunner.js", "Clipperz/PM/UI/Common/Controllers/ProgressBarController.js", "-- Clipperz/PM/UI/Common/Controllers/TabPanelController.js", "Clipperz/PM/UI/Mobile/Components/LoginForm.js", "Clipperz/PM/UI/Mobile/Components/CardList.js", "-- Clipperz/PM/UI/Mobile/Components/CardDetail.js", "Clipperz/PM/UI/Mobile/Controllers/MainController.js", "main.mobile.js" ], "css": [ "mobile.css" ] }
\ No newline at end of file diff --git a/frontend/gamma/tests/SimpleTest/SimpleTest.Async.js b/frontend/gamma/tests/SimpleTest/SimpleTest.Async.js index 3633182..268a04d 100644 --- a/frontend/gamma/tests/SimpleTest/SimpleTest.Async.js +++ b/frontend/gamma/tests/SimpleTest/SimpleTest.Async.js @@ -1,118 +1,116 @@ /* -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/. */ MochiKit.Base.update(Clipperz.Async.Deferred.prototype, { /* '_addTest': function(anExpectedValue, aDescription, isDeep, aResult) { if (isDeep) { SimpleTest.isDeeply(aResult, anExpectedValue, aDescription); } else { SimpleTest.is(aResult, anExpectedValue, aDescription); } return aResult; }, */ 'addTest': function (anExpectedValue, aDescription, isDeep) { // this.addMethod(this, '_addTest', anExpectedValue, aDescription, isDeep); // this.addCallback(Clipperz.Async.test, anExpectedValue, aDescription, isDeep); if (isDeep) { // SimpleTest.isDeeply(aResult, anExpectedValue, aDescription); this.addCallback(Clipperz.Async.Test.isDeeply(anExpectedValue, aDescription)); } else { // SimpleTest.is(aResult, anExpectedValue, aDescription); this.addCallback(Clipperz.Async.Test.is(anExpectedValue, aDescription)); } }, //------------------------------------------------------------------------- 'shouldSucceed': function (aDescription) { this.addCallbackPass(SimpleTest.ok, true, aDescription); this.addErrbackPass (SimpleTest.ok, false, aDescription); this.addBoth(MochiKit.Async.succeed, null); }, 'shouldFail': function (aDescription) { this.addCallbackPass(SimpleTest.ok, false, aDescription); this.addErrbackPass (SimpleTest.ok, true, aDescription); this.addBoth(MochiKit.Async.succeed, null); }, //------------------------------------------------------------------------- }); Clipperz.Async.Test = {}; MochiKit.Base.update(Clipperz.Async.Test, { 'is': function (anExpectedResult, aDescription) { return MochiKit.Base.partial(function (anExpectedResult, aDescription, aResult) { SimpleTest.is(aResult, anExpectedResult, aDescription); return aResult; }, anExpectedResult, aDescription); }, //------------------------------------------------------------------------- 'ok': function (aDescription) { return MochiKit.Base.partial(function (aDescription, aResult) { SimpleTest.ok(aResult, aDescription); return aResult; }, aDescription); }, //------------------------------------------------------------------------- 'fail': function(aDescription) { return MochiKit.Base.partial(function (aDescription, aResult) { SimpleTest.ok(!aResult, aDescription); return aResult; }, aDescription); }, //------------------------------------------------------------------------- 'isDeeply': function (anExpectedResult, aDescription) { return MochiKit.Base.partial(function (anExpectedResult, aDescription, aResult) { SimpleTest.isDeeply(aResult, anExpectedResult, aDescription); return aResult; }, anExpectedResult, aDescription); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); SimpleTest.runDeferredTests = function (aName, aTestSet, aTestArguments) { try { var deferredTests; diff --git a/frontend/gamma/tests/index.html b/frontend/gamma/tests/index.html index ef89088..99fad81 100755 --- a/frontend/gamma/tests/index.html +++ b/frontend/gamma/tests/index.html @@ -1,53 +1,51 @@ <!-- -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/. --> <html> <head> <script type="text/javascript" src="../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="./SimpleTest/TestRunner.js"></script> </head> <body> <script type="text/javascript"> TestRunner.runTests( /* // 'tests/Clipperz/Base.html', // 'tests/Clipperz/Set.html', 'tests/Clipperz/index.html', // 'tests/Clipperz/Crypto/Base.html', // 'tests/Clipperz/Crypto/BigInt.html', // 'tests/Clipperz/Crypto/SRP.html' 'tests/Clipperz/Crypto/index.html', 'tests/Clipperz/PM/index.html', 'tests/Clipperz/PM/DataModel/index.html' */ 'tests/index.html' ); </script> </body> </html>
\ No newline at end of file diff --git a/frontend/gamma/tests/tests/Bookmarklet/Bookmarklet.css b/frontend/gamma/tests/tests/Bookmarklet/Bookmarklet.css index fd79d8a..8a6bae6 100644 --- a/frontend/gamma/tests/tests/Bookmarklet/Bookmarklet.css +++ b/frontend/gamma/tests/tests/Bookmarklet/Bookmarklet.css @@ -1,118 +1,116 @@ /* -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/. */ /* @override http://localhost:8000/tests/js/tests/Bookmarklet/Bookmarklet.css http://www.clipperz.com/files/clipperz.com/bookmarklet/0.3.0/Bookmarklet.css */ div#clipperzBookmarklet { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; position: absolute; top: 80px; left: 100px; width: 202px; height: 202px; background: url(./background.png) no-repeat; } div#clipperzBookmarklet div#clipperzBookmarkletClose { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; position: absolute; left: 168px; top: 5px; width: 25px; height: 25px; background: url(./close.png) no-repeat; } div#clipperzBookmarklet div#clipperzBookmarkletClose:hover { background: url(./close_selected.png) no-repeat; cursor: pointer; } div#clipperzBookmarklet div#clipperzBookmarkletResult { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; position: absolute; width: 145px; top: 61px; left: 27px; height: 63px; overflow: hidden; } div#clipperzBookmarklet div#clipperzBookmarkletResultIcon { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; width: 28px; height: 35px; position: absolute; } div#clipperzBookmarklet div#clipperzBookmarkletResultIcon.ok { background: transparent url(./info.png); } div#clipperzBookmarklet div#clipperzBookmarkletResultIcon.fail { background: transparent url(./error.png); } div#clipperzBookmarklet div#clipperzBookmarkletResult p { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; font-family: Helvetica, Arial, Geneva, sans-serif; color: #898e7d; diff --git a/frontend/gamma/tests/tests/Bookmarklet/Fail.html b/frontend/gamma/tests/tests/Bookmarklet/Fail.html index d3d1ec9..dfca010 100644 --- a/frontend/gamma/tests/tests/Bookmarklet/Fail.html +++ b/frontend/gamma/tests/tests/Bookmarklet/Fail.html @@ -1,110 +1,108 @@ <!-- -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/. --> <html> <head> <title>Bookmarlet TEST - fail</title> <script type="text/javascript" src="../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../SimpleTest/test.css"> <!-- link rel="stylesheet" type="text/css" href="./Bookmarklet.css" --> <script type='text/javascript' src='../../../js/Bookmarklet.js'></script> <script type='text/javascript' src='../../../../_build/_scratch/bookmarklet_test.js'></script> </head> <body> <!-- TWITTER Login Form --> <!-- form id="signin" action="https://twitter.com/sessions" method="post"> <input id="authenticity_token" type="hidden" value="a3a9abfa089122e4b437736313e54f2a25911101" name="authenticity_token"/> <fieldset class="common-form standard-form"> <legend>Please sign in</legend> <p> <label class="inside" for="username" tabindex="1">user name or email address:</label> <input id="username" type="text" title="username" value="" name="session[username_or_email]"/> </p> <p> <label class="inside" for="password" tabindex="2">password:</label> <input id="password" type="password" title="password" value="" name="session[password]"/> </p> <p class="remember"></p> <p class="submit"></p> <p class="forgot"></p> <p class="complete"></p> </fieldset> </form --> <!-- ###################################################################### --> <!-- <div id="clipperzBookmarklet" style=""> <div id="clipperzBookmarkletResult" style=""><p>The direct login configuration has been collected.</p></div> <div id="clipperzBookmarletButton" style=""></div> <div id="clipperzBookmarletAfterCopyHint" style=""><p>Now you can return to the Clipperz main interface and create a new card</p></div> </div> --> <!-- <div id="clipperzBookmarklet"> <div id="clipperzBookmarkletResult"><div id="clipperzBookmarkletResultIcon"></div><p id="clipperzBookmarkletResultText"></p></div> <div id="clipperzBookmarletButton"></div> <div id="clipperzBookmarletAfterCopyHint"><p id="clipperzBookmarkletHintText"></p></div> </div> --> <!-- ###################################################################### --> <pre id="test"> <script type="text/javascript"> try { runBookmarklet(); // var parameters; // runBookmarklet(); // parameters = getLoginFormConfiguration(); // SimpleTest.ok(parameters != null, "The bookmarklet returns something useful"); // SimpleTest.ok(bookmarkletClip != null, "The clipboard bridge has been created"); // SimpleTest.ok(bookmarkletClip.ready, "The clipboard bridge has been created AND is ready"); SimpleTest.ok(true, "no exception raised"); } catch (err) { var s = "test suite failure!\n"; var o = {}; var k = null; for (k in err) { // ensure unique keys?! if (!o[k]) { s += k + ": " + err[k] + "\n"; o[k] = err[k]; } } ok ( false, s ); } </script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Bookmarklet/Twitter.html b/frontend/gamma/tests/tests/Bookmarklet/Twitter.html index 27dc6a1..025197e 100644 --- a/frontend/gamma/tests/tests/Bookmarklet/Twitter.html +++ b/frontend/gamma/tests/tests/Bookmarklet/Twitter.html @@ -1,110 +1,108 @@ <!-- -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/. --> <html> <head> <title>Bookmarlet TEST - ok</title> <script type="text/javascript" src="../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../SimpleTest/test.css"> <!-- link rel="stylesheet" type="text/css" href="./Bookmarklet.css" --> <script type='text/javascript' src='../../../js/Bookmarklet.js'></script> <script type='text/javascript' src='../../../../_build/_scratch/bookmarklet_test.js'></script> </head> <body> <!-- TWITTER Login Form --> <form id="signin" action="https://twitter.com/sessions" method="post"> <input id="authenticity_token" type="hidden" value="a3a9abfa089122e4b437736313e54f2a25911101" name="authenticity_token"/> <fieldset class="common-form standard-form"> <legend>Please sign in</legend> <p> <label class="inside" for="username" tabindex="1">user name or email address:</label> <input id="username" type="text" title="username" value="" name="session[username_or_email]"/> </p> <p> <label class="inside" for="password" tabindex="2">password:</label> <input id="password" type="password" title="password" value="" name="session[password]"/> </p> <p class="remember"></p> <p class="submit"></p> <p class="forgot"></p> <p class="complete"></p> </fieldset> </form> <!-- ###################################################################### --> <!-- <div id="clipperzBookmarklet" style=""> <div id="clipperzBookmarkletResult" style=""><p>The direct login configuration has been collected.</p></div> <div id="clipperzBookmarletButton" style=""></div> <div id="clipperzBookmarletAfterCopyHint" style=""><p>Now you can return to the Clipperz main interface and create a new card</p></div> </div> --> <!-- <div id="clipperzBookmarklet"> <div id="clipperzBookmarkletResult"><div id="clipperzBookmarkletResultIcon"></div><p id="clipperzBookmarkletResultText"></p></div> <div id="clipperzBookmarletButton"></div> <div id="clipperzBookmarletAfterCopyHint"><p id="clipperzBookmarkletHintText"></p></div> </div> --> <!-- ###################################################################### --> <pre id="test"> <script type="text/javascript"> try { runBookmarklet(); // var parameters; // runBookmarklet(); // parameters = getLoginFormConfiguration(); // SimpleTest.ok(parameters != null, "The bookmarklet returns something useful"); // SimpleTest.ok(bookmarkletClip != null, "The clipboard bridge has been created"); // SimpleTest.ok(bookmarkletClip.ready, "The clipboard bridge has been created AND is ready"); SimpleTest.ok(true, "no exception raised"); } catch (err) { var s = "test suite failure!\n"; var o = {}; var k = null; for (k in err) { // ensure unique keys?! if (!o[k]) { s += k + ": " + err[k] + "\n"; o[k] = err[k]; } } ok ( false, s ); } </script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Bookmarklet/index.html b/frontend/gamma/tests/tests/Bookmarklet/index.html index 9ee3dec..759ecc3 100644 --- a/frontend/gamma/tests/tests/Bookmarklet/index.html +++ b/frontend/gamma/tests/tests/Bookmarklet/index.html @@ -1,39 +1,37 @@ <!-- -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/. --> <html> <head> <title>Complete TEST suite</title> <script type="text/javascript" src="../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../SimpleTest/TestRunner.js"></script> </head> <body> <script> TestRunner.runTests( 'Twitter.html' ); </script> </body> </html>
\ No newline at end of file diff --git a/frontend/gamma/tests/tests/Clipperz/Async.html b/frontend/gamma/tests/tests/Clipperz/Async.html index 6d28fdb..2c752bb 100644 --- a/frontend/gamma/tests/tests/Clipperz/Async.html +++ b/frontend/gamma/tests/tests/Clipperz/Async.html @@ -1,50 +1,48 @@ <!-- -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/. --> <html> <head> <title>Clipperz.Async - test</title> <script type="text/javascript" src="../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../SimpleTest/test.css"> <script type='text/javascript' src='../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Async.js'></script> <script type="text/javascript" src="../../SimpleTest/SimpleTest.Async.js"></script> </head> <body> <pre id="test"> <!--<script type="text/javascript" src="User.data.js"></script>//--> <script type="text/javascript" src="Async.test.js"></script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/Async.test.js b/frontend/gamma/tests/tests/Clipperz/Async.test.js index 443130e..83cea85 100644 --- a/frontend/gamma/tests/tests/Clipperz/Async.test.js +++ b/frontend/gamma/tests/tests/Clipperz/Async.test.js @@ -1,118 +1,116 @@ /* -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/. */ testObject = function (aLabel) { this._label = aLabel; this._sibling = null; } testObject.prototype = { 'label': function () { return MochiKit.Async.succeed(this._label); }, 'shouldHit': function () { var filterRegExp; filterRegExp = new RegExp("hit", "i"); return Clipperz.Async.callbacks("testObject.shouldHit", [ MochiKit.Base.method(this, 'label'), MochiKit.Base.method(filterRegExp, 'test') ]); }, 'sibling': function () { return this._sibling; }, 'setSibling': function (aSibling) { this._sibling = aSibling; } } var tests = { //------------------------------------------------------------------------- 'succeedingForkedDeferrer_test': function (someTestArgs) { var deferredResult; deferredResult = new Clipperz.Async.Deferred('Async.test succeedingForkedDeferred', someTestArgs); deferredResult.addCallback(Clipperz.Async.forkAndJoin("Async.test succeedingForkedDeferred", [ MochiKit.Base.partial(MochiKit.Async.succeed, 3), MochiKit.Base.partial(MochiKit.Async.succeed, 2) ], someTestArgs )); deferredResult.addCallback(function (anAsyncResult) { var sum; sum = MochiKit.Iter.reduce(MochiKit.Base.operator.add, anAsyncResult); SimpleTest.is(sum, 5, "the sum of all the returned results should be 5"); }); deferredResult.addErrback(function() { SimpleTest.ok(false, "forkAndJoin should succeed and execution path should NOT go through here (1)") }) deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'succeedingForkedAndWaitDeferrer_test': function (someTestArgs) { var deferredResult; deferredResult = new Clipperz.Async.Deferred('succeedingForkedAndWaitDeferrer_test', someTestArgs); deferredResult.addCallback(Clipperz.Async.forkAndJoin("Async.test succeedingForkedAndWaitDeferrer", [ MochiKit.Base.partial(MochiKit.Async.callLater, 2, MochiKit.Async.succeed, 3), MochiKit.Base.partial(MochiKit.Async.callLater, 1, MochiKit.Async.succeed, 2), MochiKit.Base.partial(MochiKit.Async.callLater, 3, MochiKit.Async.succeed, 7) ], someTestArgs )); deferredResult.addCallback(function (anAsyncResult) { var sum; sum = MochiKit.Iter.reduce(MochiKit.Base.operator.add, anAsyncResult); SimpleTest.is(sum, 12, "the sum of all the returned results should be 12"); }); deferredResult.addErrback(function() { SimpleTest.ok(false, "forkAndJoin should succeed and execution path should NOT go through here (2)") }) deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'failingForkedDeferrer_test': function (someTestArgs) { var deferredResult; deferredResult = new Clipperz.Async.Deferred('Async.test failingForkedDeferred', someTestArgs); deferredResult.addCallback(Clipperz.Async.forkAndJoin("Async.test failingForkedDeferred", diff --git a/frontend/gamma/tests/tests/Clipperz/Base.html b/frontend/gamma/tests/tests/Clipperz/Base.html index a1b1df8..d3bd96e 100644 --- a/frontend/gamma/tests/tests/Clipperz/Base.html +++ b/frontend/gamma/tests/tests/Clipperz/Base.html @@ -1,52 +1,50 @@ <!-- -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/. --> <html> <head> <title>Clipperz.Base - TEST</title> <script type="text/javascript" src="../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../SimpleTest/test.css"> <script type='text/javascript' src='../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type="text/javascript" src="../../SimpleTest/SimpleTest.Async.js"></script> </head> <body> <pre id="test"> <script type="text/javascript" src="Base.test.js"></script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/Base.test.js b/frontend/gamma/tests/tests/Clipperz/Base.test.js index fc827f7..7ae611d 100644 --- a/frontend/gamma/tests/tests/Clipperz/Base.test.js +++ b/frontend/gamma/tests/tests/Clipperz/Base.test.js @@ -1,118 +1,116 @@ /* -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/. */ //============================================================================= testEvalJSON = function(aString, shouldFail, aDescription) { var result; if (shouldFail == true) { try { result = Clipperz.Base.evalJSON(aString); is(true, false, aDescription + ": vulnerability not caught"); //console.log(result); } catch(exception) { is(true, true, aDescription + ": vulnerability correctly caught"); } } else { try { result = Clipperz.Base.evalJSON(aString); is(true, true, aDescription + ": configuration correctly checked"); } catch(exception) { is(true, false, aDescription + ": configuration wrongly caught as malicious"); // console.log(exception); } } return result; } //============================================================================= var tests = { '001_test': function () { var stringToSplit; var splittedString; stringToSplit = "stringToSplit"; splittedString = Clipperz.Base.splitStringAtFixedTokenSize(stringToSplit, 2); is(splittedString.length, 7); is(splittedString[0], 'st'); is(splittedString[1], 'ri'); is(splittedString[2], 'ng'); is(splittedString[3], 'To'); is(splittedString[4], 'Sp'); is(splittedString[5], 'li'); is(splittedString[6], 't', "test that should pass"); stringToSplit = "stringToSplit"; splittedString = Clipperz.Base.splitStringAtFixedTokenSize(stringToSplit, 20); is(splittedString.length, 1); is(splittedString[0], 'stringToSplit'); stringToSplit = null; splittedString = Clipperz.Base.splitStringAtFixedTokenSize(stringToSplit, 20); is(splittedString.length, 0); }, //------------------------------------------------------------------------- '002_test': function () { var anObject; anObject = "String"; is(Clipperz.Base.objectType(anObject), 'string', "test on strings (1)"); anObject = new String("String"); is(Clipperz.Base.objectType(anObject), 'string', "test on strings (2)"); anObject = 120; is(Clipperz.Base.objectType(anObject), 'number', "test on numbers (1)"); anObject = new Number(120); is(Clipperz.Base.objectType(anObject), 'number', "test on numbers (2)"); anObject = true; is(Clipperz.Base.objectType(anObject), 'boolean', "test on booleans (1)"); anObject = new Boolean(true); is(Clipperz.Base.objectType(anObject), 'boolean', "test on booleans (2)"); anObject = new Date; is(Clipperz.Base.objectType(anObject), 'date', "test on dates"); anObject = new Error("test"); is(Clipperz.Base.objectType(anObject), 'error', "test on errors"); anObject = function() {}; is(Clipperz.Base.objectType(anObject), 'function', "test on functions"); anObject = new Object(); is(Clipperz.Base.objectType(anObject), 'object', "test on objects"); anObject = [1, 2, 3]; is(Clipperz.Base.objectType(anObject), 'array', "test on arrays"); }, diff --git a/frontend/gamma/tests/tests/Clipperz/ByteArray.html b/frontend/gamma/tests/tests/Clipperz/ByteArray.html index 6dc7116..5c496c9 100644 --- a/frontend/gamma/tests/tests/Clipperz/ByteArray.html +++ b/frontend/gamma/tests/tests/Clipperz/ByteArray.html @@ -1,68 +1,66 @@ <!-- -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/. --> <html> <head> <title>Clipperz.ByteArray - tests</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <script type="text/javascript" src="../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../SimpleTest/test.css"> <script type='text/javascript' src='../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Crypto/PRNG.js'></script> <!-- script type='text/javascript' src='../../../js/Clipperz/Crypto/BigInt.js'></script --> <script type="text/javascript" src="../../SimpleTest/SimpleTest.Async.js"></script> </head> <body> <pre id="test"> <script> Clipperz_IEisBroken = false; </script> <script type="text/javascript"> var longAsciiText = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam ac ipsum. Morbi mauris. Aenean ac elit id metus lobortis elementum. Proin at quam ac ipsum pellentesque adipiscing. Aenean vestibulum, nisl eu suscipit iaculis, quam pede congue mi, sit amet dapibus metus neque eget dui. Suspendisse posuere diam ac sapien. Nulla lobortis dapibus leo. Quisque ornare tortor quis turpis. Aliquam erat volutpat. Ut faucibus lacinia magna. Nunc metus leo, volutpat quis, mollis ac, sagittis ut, turpis. Quisque purus. Mauris ante enim, vehicula eu, suscipit vitae, laoreet vel, nulla. Pellentesque pede leo, aliquam quis, vehicula eget, rhoncus nec, metus. Vestibulum tellus. Suspendisse blandit. Pellentesque vel tellus. Maecenas arcu. Duis eget purus. Curabitur non pede nec odio cursus luctus. In non elit. Nullam eget nunc in nisl elementum commodo. Vivamus sollicitudin pede quis dui. Morbi commodo. Praesent a risus id urna hendrerit fermentum. Nunc ultricies tristique odio. Phasellus imperdiet, sapien eget viverra blandit, tortor risus blandit nisi, et sodales libero dolor quis nisl. Morbi vel enim. Nunc in quam. Vestibulum a magna. Fusce auctor elit in augue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris tincidunt consectetuer leo. Etiam non turpis. Vestibulum eros. Praesent venenatis adipiscing augue. Pellentesque dapibus odio ac arcu rhoncus sagittis. Nullam vitae augue. Ut magna nulla, congue eu, porta in, egestas quis, ligula. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Curabitur malesuada neque non nulla. Nulla facilisi. Fusce viverra magna ut tellus. Sed rutrum pretium sapien. Vivamus dui. Cras fringilla. Nullam lorem. Vestibulum varius, purus at imperdiet fermentum, metus diam ultricies lacus, vitae aliquam ipsum libero sit amet felis. Sed eget eros ac velit commodo sollicitudin. Morbi in metus in mi viverra lacinia. Sed ut urna. Suspendisse imperdiet tellus ac velit. Duis malesuada velit sit amet sapien. Vestibulum a sapien id libero accumsan luctus. Fusce iaculis. Donec pulvinar orci ut pede. Nam placerat sem ut sem. Ut pretium bibendum nisl. Suspendisse potenti. Phasellus mollis neque in neque. Suspendisse augue magna, eleifend et, malesuada at, viverra in, nisl. Donec vel lectus in justo ultrices tristique. Aliquam erat volutpat. Morbi suscipit, risus ac volutpat mollis, risus metus hendrerit sapien, ac scelerisque est orci eu est. Quisque sit amet velit. Sed libero diam, semper id, eleifend ac, iaculis non, nulla. Donec varius tincidunt arcu. Sed quis metus eu erat adipiscing viverra. Donec odio. Aenean sagittis nisl sed purus. Fusce vel nibh quis felis accumsan bibendum. Etiam et risus ac tortor cursus pharetra. Maecenas tellus. Pellentesque nec felis id eros vehicula commodo. Aliquam interdum sagittis odio. Maecenas at lorem eget mi aliquet sagittis. Mauris quis nibh in odio sodales lacinia. Proin augue mauris, placerat a, blandit vel, tincidunt eget, ante. Quisque turpis purus, placerat eget, tempor consectetuer, aliquet ac, enim. Etiam eleifend vestibulum mi. Vivamus gravida. Morbi dolor. In hac habitasse platea dictumst. Nulla commodo lectus faucibus lorem. Phasellus aliquet pede id metus hendrerit tempus. Fusce convallis pede ac neque tempor dignissim. Sed vitae lorem sit amet justo dapibus porta. Ut quam orci, pretium non, sagittis nec, condimentum id, dolor. Sed tempor. Nunc porta rutrum leo. Nunc id sem. Sed nibh tortor, dapibus eget, feugiat a, pretium pretium, purus. Suspendisse suscipit lobortis sem. Praesent pharetra orci. Quisque molestie tristique quam. Maecenas nunc lorem, rhoncus non, venenatis sed, sodales at, felis. Quisque semper. Quisque malesuada est quis lacus. Nullam a justo. Aliquam pellentesque, ante ut congue molestie, nisl sapien posuere nisl, eu cursus nulla ligula vel nisl. Fusce commodo lacinia magna. Aenean rutrum vestibulum lorem. Pellentesque fermentum tristique ipsum. Nulla facilisi. Donec id mi eget ipsum commodo egestas. Mauris iaculis. Nulla vulputate mi at nisl. In condimentum sodales tellus. Donec metus orci, mollis vel, accumsan ac, ornare ac, lacus. Pellentesque accumsan est et tellus. Nam mollis. Aenean accumsan eros sit amet tellus. Praesent eu libero. Sed tempus urna nec dolor. Nulla facilisi. Duis eleifend rhoncus neque. Curabitur consectetuer quam eu justo. Sed metus. Vivamus risus. Aliquam erat volutpat. Aliquam erat volutpat. Nunc semper urna. Praesent molestie libero a lacus. Nullam suscipit lobortis velit. Praesent rhoncus, felis ut interdum dapibus, ipsum lectus vestibulum nulla, in interdum risus dolor eget orci. Nullam venenatis. Suspendisse laoreet, arcu a luctus consectetuer, libero ligula condimentum quam, eget elementum mauris tortor sed enim. Pellentesque leo. Nam interdum malesuada ante. Praesent fermentum nunc et dolor. Donec auctor volutpat odio. Pellentesque volutpat egestas ipsum. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras ac ligula eu justo dignissim accumsan. Nullam nisi. Fusce id sem. Fusce et urna. Pellentesque commodo pharetra lorem. Donec erat. Vestibulum elit arcu, commodo et, consequat eget, posuere eget, sem. Morbi sed nulla sed neque commodo commodo. Aliquam erat volutpat. Ut id turpis a enim malesuada vestibulum. In arcu dui, dignissim vitae, blandit eu, egestas ac, arcu. In ultricies sapien vitae nisi. Proin rhoncus magna eget tortor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In dictum. Sed volutpat pharetra quam. Mauris eget eros. Fusce malesuada dolor id pede. Praesent nec justo sed nisi vehicula varius. In scelerisque convallis nulla. Pellentesque sodales massa vulputate urna. Duis metus urna, imperdiet ac, sodales vel, ullamcorper sed, pede. Vestibulum aliquam mollis metus. Praesent tempus tristique elit. Maecenas tellus tortor, pretium id, mollis id, molestie non, turpis. Vivamus nibh magna, bibendum vitae, a."; var longIsoLatin1Text = "¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùù"; var longUtf8Text = "客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之"; </script> <script type="text/javascript" src="ByteArray.test.js"></script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/ByteArray.test.js b/frontend/gamma/tests/tests/Clipperz/ByteArray.test.js index 43d74a0..643bbf8 100644 --- a/frontend/gamma/tests/tests/Clipperz/ByteArray.test.js +++ b/frontend/gamma/tests/tests/Clipperz/ByteArray.test.js @@ -1,118 +1,116 @@ /* -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.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); var tests = { //------------------------------------------------------------------------- 'core_tests': function (someTestArgs) { // var deferredResult; // deferredResult = new Clipperz.Async.Deferred("core_tests", someTestArgs); // deferredResult.addCallback(function() { var byteArray; byteArray = new Clipperz.ByteArray(); try { byteArray.checkByteValue(512); is(false, true, "a value greater that a byte (0x200) should have raised an exception - NO Exception"); } catch(e) { // is( e.name, // "Clipperz.ByteArray.exception.InvalidValue", // "appending a value greater that a byte (0x200) should have raised an exception - EXCEPTION HANDLER") ok( /Clipperz\.ByteArray\.exception\.InvalidValue.*/.test(e.name), "appending a value greater that a byte (0x200) should have raised an exception - EXCEPTION HANDLER") }; // }); // deferredResult.callback(); // return deferredResult; }, //------------------------------------------------------------------------- 'basic_tests': function (someTestArgs) { var deferredResult; deferredResult = new Clipperz.Async.Deferred("simple_tests", someTestArgs); deferredResult.addCallback(function() { var byteArray; var byteArray2; var byteArrayIterator; var nextBlock; byteArray = new Clipperz.ByteArray(); is(byteArray.length(), 0, "before adding any element the length is 0"); byteArray.appendByte(10); is(byteArray.length(), 1, "adding a single byte the length == 1"); is(byteArray.byteAtIndex(0), 10, "the first element is correct"); byteArrayIterator = new Clipperz.ByteArrayIterator({byteArray:byteArray, blockSize:(8/8), finalPadding:true}); nextBlock = byteArrayIterator.nextBlock(); is(nextBlock.constructor, Array, "ByteArrayIterator.nextBlock returns an array of byte values"); is(nextBlock.length, 1, "as the block size is 8bit, the returned array has only one element"); is(nextBlock[0], 10, "the element of the returned block is correct"); nextBlock = byteArrayIterator.nextBlock(); is(nextBlock, null, "after the last element, the nextBlock returns null"); byteArray = new Clipperz.ByteArray(); byteArray.appendBytes(10, 20, 45, 38); is(byteArray.length(), 4, "Appending more bytes, returns the right length"); is(byteArray.byteAtIndex(0), 10, "and all the elements are right [0]"); is(byteArray.byteAtIndex(1), 20, "and all the elements are right [1]"); is(byteArray.byteAtIndex(2), 45, "and all the elements are right [2]"); is(byteArray.byteAtIndex(3), 38, "and all the elements are right [3]"); byteArray2 = new Clipperz.ByteArray(); byteArray2.appendBytes([10, 20, 45, 38]); is(byteArray.equals(byteArray2), true, "equals method tested with a byteArray created with the same values"); byteArray2 = new Clipperz.ByteArray(); byteArray2.appendBytes([20, 11, 3, 22]); is(byteArray.equals(byteArray2), false, "equals method tested with a byteArray created with different values"); byteArrayIterator = new Clipperz.ByteArrayIterator({byteArray:byteArray, blockSize:(8/8), finalPadding:true}); nextBlock = byteArrayIterator.nextBlock(); is(nextBlock.length, 1, "the size of the block returned by the byteArrayIterator match with the configured blockedSize"); is(nextBlock[0], 10, "the values returned by nextBlock are right [1]"); nextBlock = byteArrayIterator.nextBlock(); is(nextBlock[0], 20, "the values returned by nextBlock are right [2]"); nextBlock = byteArrayIterator.nextBlock(); is(nextBlock[0], 45, "the values returned by nextBlock are right [3]"); nextBlock = byteArrayIterator.nextBlock(); is(nextBlock[0], 38, "the values returned by nextBlock are right [4]"); nextBlock = byteArrayIterator.nextBlock(); is(nextBlock, null, "after the last block the nextBlock method returns null"); byteArrayIterator = new Clipperz.ByteArrayIterator({byteArray:byteArray, blockSize:(16/8), finalPadding:true}); nextBlock = byteArrayIterator.nextBlock(); is(nextBlock.length, 2, "on the same data, using a different block size, returns the right length"); is(nextBlock[0], 10, "and also the data are fine [1][0]"); is(nextBlock[1], 20, "and also the data are fine [1][1]"); diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/AES.html b/frontend/gamma/tests/tests/Clipperz/Crypto/AES.html index 16f64d0..27a81a4 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/AES.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/AES.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <title>Clipperz.Crypto.AES_v3 - TEST</title> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> </head> <body> <pre id="test"> <script type="text/javascript"> try { var block; var keyValue; var key; var encryptedBlock; var startTime, endTime; startTime = new Date(); keyValue = new Clipperz.ByteArray("0x00010203050607080a0b0c0d0f10111214151617191a1b1c1e1f202123242526"); key = new Clipperz.Crypto.AES.Key({key:keyValue}); block = new Clipperz.ByteArray("0x834eadfccac7e1b30664b1aba44815ab"); encryptedBlock = new Clipperz.ByteArray(Clipperz.Crypto.AES.encryptBlock(key, block.arrayValues())); is(encryptedBlock.toHexString(), "0x1946dabf6a03a2a2c3d0b05080aed6fc", "Test 1"); keyValue = new Clipperz.ByteArray("0x28292a2b2d2e2f30323334353738393a3c3d3e3f41424344464748494b4c4d4e"); key = new Clipperz.Crypto.AES.Key({key:keyValue}); block = new Clipperz.ByteArray("0xd9dc4dba3021b05d67c0518f72b62bf1"); encryptedBlock = new Clipperz.ByteArray(Clipperz.Crypto.AES.encryptBlock(key, block.arrayValues())); is(encryptedBlock.toHexString(), "0x5ed301d747d3cc715445ebdec62f2fb4", "Test 2"); keyValue = new Clipperz.ByteArray("0x50515253555657585a5b5c5d5f60616264656667696a6b6c6e6f707173747576"); key = new Clipperz.Crypto.AES.Key({key:keyValue}); block = new Clipperz.ByteArray("0xa291d86301a4a739f7392173aa3c604c"); encryptedBlock = new Clipperz.ByteArray(Clipperz.Crypto.AES.encryptBlock(key, block.arrayValues())); is(encryptedBlock.toHexString(), "0x6585c8f43d13a6beab6419fc5935b9d0", "Test 3"); keyValue = new Clipperz.ByteArray("0x78797a7b7d7e7f80828384858788898a8c8d8e8f91929394969798999b9c9d9e"); key = new Clipperz.Crypto.AES.Key({key:keyValue}); block = new Clipperz.ByteArray("0x4264b2696498de4df79788a9f83e9390"); encryptedBlock = new Clipperz.ByteArray(Clipperz.Crypto.AES.encryptBlock(key, block.arrayValues())); is(encryptedBlock.toHexString(), "0x2a5b56a596680fcc0e05f5e0f151ecae", "Test 4"); keyValue = new Clipperz.ByteArray("0xa0a1a2a3a5a6a7a8aaabacadafb0b1b2b4b5b6b7b9babbbcbebfc0c1c3c4c5c6"); key = new Clipperz.Crypto.AES.Key({key:keyValue}); block = new Clipperz.ByteArray("0xee9932b3721804d5a83ef5949245b6f6"); encryptedBlock = new Clipperz.ByteArray(Clipperz.Crypto.AES.encryptBlock(key, block.arrayValues())); is(encryptedBlock.toHexString(), "0xf5d6ff414fd2c6181494d20c37f2b8c4", "Test 5"); keyValue = new Clipperz.ByteArray("0xc8c9cacbcdcecfd0d2d3d4d5d7d8d9dadcdddedfe1e2e3e4e6e7e8e9ebecedee"); key = new Clipperz.Crypto.AES.Key({key:keyValue}); block = new Clipperz.ByteArray("0xe6248f55c5fdcbca9cbbb01c88a2ea77"); encryptedBlock = new Clipperz.ByteArray(Clipperz.Crypto.AES.encryptBlock(key, block.arrayValues())); is(encryptedBlock.toHexString(), "0x85399c01f59fffb5204f19f8482f00b8", "Test 6"); keyValue = new Clipperz.ByteArray("0xf0f1f2f3f5f6f7f8fafbfcfdfe01000204050607090a0b0c0e0f101113141516"); key = new Clipperz.Crypto.AES.Key({key:keyValue}); block = new Clipperz.ByteArray("0xb8358e41b9dff65fd461d55a99266247"); encryptedBlock = new Clipperz.ByteArray(Clipperz.Crypto.AES.encryptBlock(key, block.arrayValues())); is(encryptedBlock.toHexString(), "0x92097b4c88a041ddf98144bc8d22e8e7", "Test 7"); keyValue = new Clipperz.ByteArray("0x18191a1b1d1e1f20222324252728292a2c2d2e2f31323334363738393b3c3d3e"); key = new Clipperz.Crypto.AES.Key({key:keyValue}); block = new Clipperz.ByteArray("0xf0e2d72260af58e21e015ab3a4c0d906"); encryptedBlock = new Clipperz.ByteArray(Clipperz.Crypto.AES.encryptBlock(key, block.arrayValues())); is(encryptedBlock.toHexString(), "0x89bd5b73b356ab412aef9f76cea2d65c", "Test 8"); keyValue = new Clipperz.ByteArray("0x40414243454647484a4b4c4d4f50515254555657595a5b5c5e5f606163646566"); key = new Clipperz.Crypto.AES.Key({key:keyValue}); block = new Clipperz.ByteArray("0x475b8b823ce8893db3c44a9f2a379ff7"); encryptedBlock = new Clipperz.ByteArray(Clipperz.Crypto.AES.encryptBlock(key, block.arrayValues())); is(encryptedBlock.toHexString(), "0x2536969093c55ff9454692f2fac2f530", "Test 9"); keyValue = new Clipperz.ByteArray("0x68696a6b6d6e6f70727374757778797a7c7d7e7f81828384868788898b8c8d8e"); key = new Clipperz.Crypto.AES.Key({key:keyValue}); block = new Clipperz.ByteArray("0x688f5281945812862f5f3076cf80412f"); encryptedBlock = new Clipperz.ByteArray(Clipperz.Crypto.AES.encryptBlock(key, block.arrayValues())); is(encryptedBlock.toHexString(), "0x07fc76a872843f3f6e0081ee9396d637", "Test 10"); //------------------------------------------------------------------------- diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/AES.performance.html b/frontend/gamma/tests/tests/Clipperz/Crypto/AES.performance.html index a90d815..13dade4 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/AES.performance.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/AES.performance.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <title>Clipperz.Crypto.AES_performance - TEST</title> <script> jslog_config_enabled = true; </script> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Connection.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Crypto.js'></script> </head> <body> <pre id="test"> <script type="text/javascript"> Clipperz.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); try { var password; var plainText; var encryptedText; var decryptedText; /* password = "trustno1"; plainText = "The quick brown fox jumps over the lazy dog"; //console.profile("encrypt"); encryptedText = Clipperz.PM.Crypto.encryptingFunctions.versions['0.2'].encrypt(password, plainText); //console.profileEnd(); //console.profile("decrypt"); decryptedText = Clipperz.PM.Crypto.encryptingFunctions.versions['0.2'].decrypt(password, encryptedText); //console.profileEnd(); is(decryptedText, plainText, "simple string encrypted/decrypted"); */ password = "L7bd9fQMhborMbYcHtlr"; plainText = {"records":{"f1aac97154a0e52c5e33508afa82df5a9d6dcde24883a240b8c072a3238da0b6":{"label":"imap4all [no]", "key":"f54b5033d1152456acb67974c45ee6771f8411e300c9533359dfacacf60dcbbd", "notes":""}, "c9dae2b7a60b300008306f5ec731b60050250df8f8ff34f7d9cce92762121b99":{"label":"Il manifesto", "key":"6e0ef134503110e72f444e7d102a4b1cc6ae28f2e0b1287c2b1875ff052fc16c", "notes":""}, "70d536c89a86b1aa9e077d6f9c717306a5d6c8d5549789e42dfb4f981484f116":{"label":"OmniGroup applications", "key":"7b432b7dae39ff5951db31947fa721dc012af0da4055760c6df3b02e776ef22c", "notes":"url: http://www.omnigroup.com\n\nLicence owner: Giulio Cesare Solaroli\n\nOmniWeb: EQGP-EMKH-LKWP-MUHQ-OUHL-LDF\nOmniGraffle:\nOmniOutliner:\nOmniDiskSweeper:"}, "111855cedd650dfcbbce597d764583c6b040df4b71f5fa0161fb8d10514ee48f":{"label":"R@cine", "key":"57295772c84669b0a224f435e9b75c797ae5999a2d9473ab50f9384ae54f49d6", "notes":""}, "378a790452de46e1079a99eba2e15094a096b418cccd0262b8b20244eb94d2df":{"label":"NewsGator", "key":"6ee16f6932ee02000c49dbcc685c84074b40d7956e5f4bc1100030a0f9a41f1a", "notes":""}, "30c4f575799fc6908765fc8b54f4a9a483cb32e12aa89feae545976870a9102e":{"label":"GMail - giulio.cesare", "key":"0395efd852b00700bcf78b65350ec15932430df71201d2c53a11b0269b557d1a", "notes":""}, "b2836a864ff081b6f053c3f5f13dfb29c81af33d25a316cdd82af747ea71bea0":{"label":"GMail - clipperz.com", "key":"90d6ae70d89c8211404b6f9d6c70b6b9c113fff74f474a67b34acd9c1c048d1f", "notes":""}, "6ad2cda35f97743cfddf2133cdf3142fe6419e683484531f1ef1e67431f44284":{"label":"Aruba - hosting", "key":"5c7472d24d57391c63ea99ed1fc9de179d225abd335fa65702018cfea6083d47", "notes":""}, "741ce1d21839c69db754309b04ce02fbb4104f6cb87572c056ae4af918420700":{"label":"Aruba - sql hosting", "key":"f6bd942ac3b0b7065771e5197c7499b345a10f7a4843d00c3ba3809d0ea059dc", "notes":""}, "1cef440eecea59f47554aa04b94e18c1d9fc761246b911f89a7da72d544cac48":{"label":"Amazon", "key":"1ae022b4d14b642f113703b2a98931bd892dec2da785ab5ff6fc1d0aac7537f1", "notes":""}, "d34c13773b5d8154355c2605024a1dfaf66279ba0fbe3ac19fc1cbc642278fe4":{"label":"YouTube [no]", "key":"4c6593d4f6448137939b364b84c81501fadb60f7871fe5fa63c93e97bb5c4648", "notes":""}, "5054f0b94cd97610a1bc0ed8671b6fb5b25bf7a5582677059fcaaea75fac27bc":{"label":"DynDns - gcsolaroli", "key":"f8ed9e7a3630deed046eda37ebc63ecb4d63668a2f97224d7628fdc53b242467", "notes":""}, "73fb52ed51533657d6ebb020d5026fb4deb601dadce802de58f7fff4b56e1495":{"label":"DynDns - clipperz", "key":"d8bc295177383a523e67b61b166e0ca956ab4c2ee86800559a009d2716064f6d", "notes":""}, "48d4c0546c032be26ecce4da41e020129afa7fc34cfe164ea72e1c9953d2e6bb":{"label":"Bol.it", "key":"cada5dadeebd8d12190954d21f1a944c8799d034f028be195b448935fcf970c7", "notes":""}, "d62d420db34720ccc054df06b88725ea79020ffa9389ca15e70137fb4dfd0883":{"label":"Freenigma - clipperz.com", "key":"f09cb3790c1110794b834702b8c487c1a42b2508fbe6450a8468477d93790b2e", "notes":""}, "ccd44ae294e7694ea53009c7198506cc0fe3121ad5d9fe2635d247e2afdab2ae":{"label":"Freenigma", "key":"4b05738f6faebc147eac5e425054a91d3cc59dd63844e82d1f0864c0ac8efec7", "notes":""}, "bd5a587bb977a2c728fcd0fa6093dd63a4e62138cf89721115fe45e0396ba5d2":{"label":"clipperz.com - blog", "key":"9cc24328bbce18e8713962428d8123e309a12f7e1d9537bc252e134501734003", "notes":""}, "c2b99939e40d100218baa3ed1cb2a25a5cf726485b0336a0989b104a94157b5f":{"label":"Apple", "key":"75f2651af400629c4e5dd8bcdc3a6c691150d23d6e1a4eb263ff810926d1228f", "notes":""}, "b5bd38d8eb5e23b1354884cc519e05580864fadf74d0a19d2c691cd0c7054d77":{"label":".mac", "key":"5934ae96d2e01282effb368d9086c2ba5d1d856ad91dd6f04f5bace26a1c0cbe", "notes":""}, "ff79a2282cf246add520a3c06e835cf6ffaaae95067d45e8e2e8f44da2501380":{"label":"3nity", "key":"33d84c4a91ab053cbf8115c689ede7e504b81199884de449acc257bea534f57f", "notes":""}, "7b2f2a59ebb34b5a49f20b99b546f08b9f4f62cbefdce9699f8ef7e74aeb0552":{"label":"ACM", "key":"b4976bb0892baba81d628513d191de100d89acd58efbb07c823a5bb4abe48a7a", "notes":""}, "b83a6bac0da3a27eb909d34cbad183e77088952f01d8d5321613b7b01635a020":{"label":"Adobe", "key":"d162bc404994a79ec97e0106c3a4edf2f83aca25def130242e11e95e74bd0aaa", "notes":""}, "befc571e9cda1a7dfb1d15200240ca5170386280ee7be6a12716904cb6d0ea44":{"label":"Adobe Photoshop Elements 3", "key":"18a62c3c2065399819707322f467ff4be030d7939acbe5182c8194599845c428", "notes":"Photoshop Elements 2:\n1057-4312-5223-2206-9509-6837"}, "0424f72608fedc969d64a6d5b4a16dd3ce860a230cd6d87d936439f4dd2aafc7":{"label":"Agatra", "key":"c35158a21b2af75d414232b742ab738d042314e00209f8fca94c8c704c891f23", "notes":""}, "e5e17c29fd598acb4f4c7d621dbdcb045d4d0cabf7d8a19e24420c440cdc3935":{"label":"AIM", "key":"8561ac421d845921978387b5e6b362750b57ed08feda8ec12b9378b69f67ceff", "notes":""}, "de890eb76a4b0cabd4ffd490adad1ff1b73238c7b5ee6dde1a2aeab2d03ebe93":{"label":"Anna Vespignani", "key":"79a970af0d2d30643dc2db4d16757395c1f22c311919036c2a22b7581982144a", "notes":""}, "0dc8d3989d0b35d672c012057d3eb7b111f16e79329e08a9ffb31ac7accbab21":{"label":"Bloglines", "key":"fe81f4df8c42fd81c830f9af408e9b074e77fd430e26d0ee285844fe3b092aec", "notes":""}, "85a40a322a59c80cb46519900269dcc7cf6947213d03dfc9371dd1930373a65b":{"label":"Bow.it", "key":"64a1a9fec99c9238dc8180a01484a1ccf5f50fcd6e9a95a52b8b49fb9ca00bdc", "notes":""}, "60308062a1848a301641a74712d220eef191a280ba0a8355992f0e61ed793811":{"label":"GMail - feedback", "key":"fad310cb2e6152c3faf78b7183c99f3044f5d31ee364068b80580c271a7784ef", "notes":""}, "257ac2da79ee1cd46dfa214d91f5ece213b6bbade28d1ee71495c81a3d7e033a":{"label":"Fineco", "key":"8f99de2635b5dad7987180bc0bff49947eb37cc75d6a5d1ee1f13ed7567465a3", "notes":""}, "78261622810232b6da5efcd52b1c9b0bd87c62517bf4df25323ca6a0b49d84ec":{"label":"mon.itor.us", "key":"d2aa7164007c5deac8bb73580a6ab0d051f747e801ecd30284eff725d0ffaba2", "notes":""}, "4b78dc0376d07e57d77b4c7318d2f222956adb6ff7360b73e60b8bb8b85f3d11":{"label":"Lamba Probe - forum", "key":"f73906817fddba4d8f816334cb2fd0cd5ae91bc29bce6a69fdd5cf98fc96911f", "notes":""}, "78ca2c85908275d788c2f7dd0306ca5e03b83637bb3812272b697e12e9dbf941":{"label":"MeasureMap", "key":"2385ce9536ebb7863b6a4c8b1f5c428587e4d6420a4bbcd31b935cb00bbd768e", "notes":""}, "4c2c7f0d733b647e6f388c9a4590a2a864cd2de259b66aba9b3cf92bdc3cf9bc":{"label":"NGI - Squillo", "key":"96f20c212be02fb38c8b2dfc83d8e864dd84dcb95297a7fecf9280e1e4dcffe3", "notes":""}, "eaeadf6d36f8ee6916c33b9e5bf480b663dc90c0c7f370ff5a1f2fd998cf1143":{"label":"NGI - F5", "key":"00347769244b208647c24e6a64f8fa4213e97eb2135ecfcb277b341c28616a59", "notes":""}, "19654392222206d60547073209672dde1c743ea371ddc20a2bd8254e561a4ec0":{"label":"CVSdude", "key":"ed0ab5080a29eb1b20927142d21ab8f67b61c2c7b19623bb610af030dfd42c02", "notes":""}, "6b10514d50e745f1dab5a40e8629ecf1a8c78a5d6e3895f3637fb67d2d3f9993":{"label":"Yahoo", "key":"6380a7655cd790d1f1e6f482e92ae04201568ff0cab887e65102e9396df1b86e", "notes":"note"}}, "directLogins":{"eac496e0b1ec75ea403f821fedc7f51f98dac639713ebe577f969f607a8943f5":{"record":"111855cedd650dfcbbce597d764583c6b040df4b71f5fa0161fb8d10514ee48f", "label":"R@cine - WebMail", "favicon":"http://www.racine.ra.it/favicon.ico"}, "ef564a022630d4395a9ecac854f3b127b3518cec362323ccc605079c0749c152":{"record":"1cef440eecea59f47554aa04b94e18c1d9fc761246b911f89a7da72d544cac48", "label":"Amazon sign in", "favicon":"http://www.amazon.com/favicon.ico"}, "4f14b88a4055ff23a00d625382650888ce9284fe869304775e43e3e33ee5bbb6":{"record":"6ad2cda35f97743cfddf2133cdf3142fe6419e683484531f1ef1e67431f44284", "label":"Aruba - hosting", "favicon":"http://hosting.aruba.it/favicon.ico"}, "e94c0d12d1db0badc31a8bbbbc4b08d2065a39f458462bbff9756f7b5eb7fedf":{"record":"741ce1d21839c69db754309b04ce02fbb4104f6cb87572c056ae4af918420700", "label":"Aruba - sql hosting", "favicon":"http://mysql.aruba.it/favicon.ico"}, "7299249153ef93a44e2f248ca3a73badde56e71d70919bb5637093c2abbe2c9a":{"record":"bd5a587bb977a2c728fcd0fa6093dd63a4e62138cf89721115fe45e0396ba5d2", "label":"clipperz.com - blog", "favicon":"http://www.clipperz.com/favicon.ico"}, "66876dbae68778d4c104bc12f01adcb21d47d9eace8db30ef95f74f461afcb59":{"record":"73fb52ed51533657d6ebb020d5026fb4deb601dadce802de58f7fff4b56e1495", "label":"DynDns - clipperz", "favicon":"http://www.dyndns.com/favicon.ico"}, "a60c65030a1797abde3e2089c3e5de9648f66bf71cebf0b58c26e729ad8d6a45":{"record":"5054f0b94cd97610a1bc0ed8671b6fb5b25bf7a5582677059fcaaea75fac27bc", "label":"DynDns - gcsolaroli", "favicon":"http://www.dyndns.com/favicon.ico"}, "08d6c5dff9fed4a2f237c32dd0a93ac46b2c45370d07f56fa76064be3b8fecbf":{"record":"30c4f575799fc6908765fc8b54f4a9a483cb32e12aa89feae545976870a9102e", "label":"GMail - giulio.cesare", "favicon":"http://www.google.com/favicon.ico"}, "9e75e12f0f52f248cc7ae517869dd7b02303037d32d9fb4fa0ab0e013923c304":{"record":"c9dae2b7a60b300008306f5ec731b60050250df8f8ff34f7d9cce92762121b99", "label":"Il manifesto", "favicon":"http://abbonati.ilmanifesto.it/favicon.ico"}, "935bf9553fbcb85b8bd5b98c6901d7cccb2566b395f192cbea71e7822979aaf2":{"record":"f1aac97154a0e52c5e33508afa82df5a9d6dcde24883a240b8c072a3238da0b6", "label":"Imap4All.com - account", "favicon":"http://www.imap4all.com/favicon.ico"}, "9504205ec29b89e6ccd0f3afc7a447d8891da0c71a0222f1860f98a8f8bc6677":{"record":"f1aac97154a0e52c5e33508afa82df5a9d6dcde24883a240b8c072a3238da0b6", "label":"Imap4all.com - WebMail", "favicon":"http://webmail.imap4all.com/favicon.ico"}, "3d8dd32d2290ca98789c914580ac2436ece97234217a07d752726d2ac48a4ebf":{"record":"d34c13773b5d8154355c2605024a1dfaf66279ba0fbe3ac19fc1cbc642278fe4", "label":"YouTube [no]", "favicon":"http://www.youtube.com/favicon.ico"}, "7c4b6b5a16984c43ed6d99b04ddfa7e00b624de729ec8aaa3d0f539fb67587e2":{"record":"c2b99939e40d100218baa3ed1cb2a25a5cf726485b0336a0989b104a94157b5f", "label":"Apple Store - Italia", "favicon":"http://store.apple.com/favicon.ico"}, "0b9a98262b50f0ebae5af077467bc627619738873690238fd61093ce9922c9f9":{"record":"ff79a2282cf246add520a3c06e835cf6ffaaae95067d45e8e2e8f44da2501380", "label":"3nity", "favicon":"http://www.3nity.de/favicon.ico"}, "aadeb3388629cfc3b15954f26cf284f52e084191dcdf75752dc4c53d2006c5be":{"record":"7b2f2a59ebb34b5a49f20b99b546f08b9f4f62cbefdce9699f8ef7e74aeb0552", "label":"ACM Web Account", "favicon":"http://portal.acm.org/favicon.ico"}, "3d21c71f2e284ec76f1ae0bb990b683979918f758635bb7d008150f4d7b1447d":{"record":"b83a6bac0da3a27eb909d34cbad183e77088952f01d8d5321613b7b01635a020", "label":"Adobe - Sign In", "favicon":"http://www.adobe.com/favicon.ico"}, "e61a331c998804d46044d4c2acaf96c2fce806f6549e1e16c7d2334872a70953":{"record":"0424f72608fedc969d64a6d5b4a16dd3ce860a230cd6d87d936439f4dd2aafc7", "label":"Agatra [no]", "favicon":"http://www.agatra.com/favicon.ico"}, "9bcd99564fda778061246439fa098dcc79de75b16c542f61e6de7d36dbaf97dc":{"record":"e5e17c29fd598acb4f4c7d621dbdcb045d4d0cabf7d8a19e24420c440cdc3935", "label":"AIM [no]", "favicon":"http://my.screenname.aol.com/favicon.ico"}, "c7093f4663c6e0eba941c557cb86da83fc68cbea36c922e168d0867e6cabe9fe":{"record":"0dc8d3989d0b35d672c012057d3eb7b111f16e79329e08a9ffb31ac7accbab21", "label":"Bloglines", "favicon":"http://www.bloglines.com/favicon.ico"}, "915f2e9460f6e54c6137f3876f9179fc8d2162c59f26e12899c2db6b0e70a68f":{"record":"85a40a322a59c80cb46519900269dcc7cf6947213d03dfc9371dd1930373a65b", "label":"Bow.it", "favicon":"http://www.bow.it/favicon.ico"}, "779701af1beb2a91735ba1a2e471b948f0d985bb0df256f5e089291ce3405bd2":{"record":"b2836a864ff081b6f053c3f5f13dfb29c81af33d25a316cdd82af747ea71bea0", "label":"GMail - Clipperz", "favicon":"http://www.google.com/favicon.ico"}, "1c300539a98c874d52134b6b5a591172acc00c0947692f3da284447f7d511eaf":{"record":"60308062a1848a301641a74712d220eef191a280ba0a8355992f0e61ed793811", "label":"GMail - feedback", "favicon":"http://www.google.com/favicon.ico"}, "f9dccdf7a98735fd7a6b5d04c09177005c0de14f8f92b04007f06a281ecdf31e":{"record":"30c4f575799fc6908765fc8b54f4a9a483cb32e12aa89feae545976870a9102e", "label":"Blogger", "favicon":"http://www.google.com/favicon.ico"}, "48497a89f3bfd567758977e1c32b4497d28c843880667ee52fa4cfcb53c5f9e4":{"record":"378a790452de46e1079a99eba2e15094a096b418cccd0262b8b20244eb94d2df", "label":"NewsGator", "favicon":"http://www.newsgator.com/favicon.ico"}, "134cd28f150df4f2a089f4807bb7a35fb7ece22ec41244f72e63f8b43637a4cd":{"record":"4b78dc0376d07e57d77b4c7318d2f222956adb6ff7360b73e60b8bb8b85f3d11", "label":"Lambda Probe - forum", "favicon":"http://www.lambdaprobe.org/favicon.ico"}, "2ab6106a81513b70f1ba0d7c5c3ef54fa6f4bcadf01d2eeaa2b31b9299551398":{"record":"78ca2c85908275d788c2f7dd0306ca5e03b83637bb3812272b697e12e9dbf941", "label":"Measure Map", "favicon":"http://alpha.measuremap.com/favicon.ico"}, "53ccdc41b43da9b018847f9faa8effb35e7a6c6e78a54e9ee7816fc02f0ea63b":{"record":"4c2c7f0d733b647e6f388c9a4590a2a864cd2de259b66aba9b3cf92bdc3cf9bc", "label":"NGI - Squillo", "favicon":"http://www.ngi.it/favicon.ico"}, "ca520e7081fba1df3ef79c3d00266cffc8e4567def29d67ae812b7ed6283fb12":{"record":"eaeadf6d36f8ee6916c33b9e5bf480b663dc90c0c7f370ff5a1f2fd998cf1143", "label":"NGI - F5", "favicon":"http://www.ngi.it/favicon.ico"}, "80e63e135d7abd2b2990f42af4f8d1f8e8b1146aed44dc36975061fbf360a983":{"record":"6b10514d50e745f1dab5a40e8629ecf1a8c78a5d6e3895f3637fb67d2d3f9993", "label":"Yahoo! Mail", "favicon":"http://login.yahoo.com/favicon.ico"}}, "preferences":{"preferredLanguage":"en-US"}}; /* */ plainText = { "records": { "1": { "label":"imap4all [no]", "key":"f54b5033d1152456acb67974c45ee6771f8411e300c9533359dfacacf60dcbbd", "notes":"" }, "2": { "label":"Il manifesto", "key":"6e0ef134503110e72f444e7d102a4b1cc6ae28f2e0b1287c2b1875ff052fc16c", "notes":"" }, "3": { "label": "OmniGroup applications", "key": "7b432b7dae39ff5951db31947fa721dc012af0da4055760c6df3b02e776ef22c", "notes": "url: http://www.omnigroup.com\n\nLicence owner: Giulio Cesare Solaroli\n\nOmniWeb: EQGP-EMKH-LKWP-MUHQ-OUHL-LDF\nOmniGraffle:\nOmniOutliner:\nOmniDiskSweeper:" }, "4": { "label": "R@cine", "key": "57295772c84669b0a224f435e9b75c797ae5999a2d9473ab50f9384ae54f49d6", "notes": "" }, "5": { "label": "NewsGator", "key": "6ee16f6932ee02000c49dbcc685c84074b40d7956e5f4bc1100030a0f9a41f1a", "notes": "" }, "6": { "label": "GMail - giulio.cesare", "key": "0395efd852b00700bcf78b65350ec15932430df71201d2c53a11b0269b557d1a", "notes": "" }, "7": { "label": "GMail - clipperz.com", "key": "90d6ae70d89c8211404b6f9d6c70b6b9c113fff74f474a67b34acd9c1c048d1f", "notes": "" }, diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/Base.html b/frontend/gamma/tests/tests/Clipperz/Crypto/Base.html index 83f0766..0e42790 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/Base.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/Base.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Functions.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> </head> <body> <pre id="test"> <script type="text/javascript"> try { var secretKey; var publicKey; var plainString; var encryptedString; secretKey = "s3cr37k39"; plainString = "The Quick Brown Fox Jumps Over The Lazy Dog"; encryptedString = Clipperz.Crypto.Base.encryptUsingSecretKey(secretKey, plainString); //------------------------------------------------------------------------- // // Secret key encryption / decryption // is (isUndefinedOrNull(encryptedString), false, "An encrypted string should not be empty"); is (plainString, Clipperz.Crypto.Base.decryptUsingSecretKey(secretKey, encryptedString), "I should be able to encrypt and then decrypt safely"); try { var decryptedText; decryptedText = Clipperz.Crypto.Base.decryptUsingSecretKey("anotherKey", encryptedString); ok( false, "It should not be possible to decrypt a text with a different passphrase (decrypted text: " + decryptedText + ")" ); } catch (e) { ok( e instanceof Error, "Trying to decrypt a message with the wrong passphrase raised an error" ); } is (encryptedString == Clipperz.Crypto.Base.encryptUsingSecretKey(secretKey, plainString), false, "Two consecutive encryption of the same text should return different values"); secretKey = "trustno1"; plainString = "59fed719f8959a468de367f77a33a7536d53b8e4d25ed49ccc89a94cd6899da90415623fb73386e9635034fb65ad5f248445a1c66703f760d64a8271ad342b1"; encryptedString = Clipperz.Crypto.Base.encryptUsingSecretKey(secretKey, plainString); is (plainString, Clipperz.Crypto.Base.decryptUsingSecretKey(secretKey, encryptedString), "I should be able to encrypt and then decrypt safely"); secretKey = "trustno1"; plainString = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed pede. Curabitur a mi id nisi euismod rutrum. Phasellus gravida. Ut luctus. Praesent quis leo sit amet orci imperdiet malesuada. Aenean molestie mauris euismod odio. Suspendisse ullamcorper facilisis nisl. Fusce vestibulum consectetuer risus. Curabitur ut turpis eget arcu facilisis ultricies. Morbi elementum, erat vitae dictum imperdiet, nisi purus rutrum odio, eget ornare ipsum nisl in tortor. Duis vestibulum, nulla et bibendum volutpat, mauris metus facilisis elit, vel gravida tortor leo at enim. Vivamus pulvinar lorem vitae tortor. Morbi rhoncus suscipit urna. Praesent placerat tempus augue. Fusce varius dui a nisi consequat ultricies. Curabitur at nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas."; encryptedString = Clipperz.Crypto.Base.encryptUsingSecretKey(secretKey, plainString); is (plainString, Clipperz.Crypto.Base.decryptUsingSecretKey(secretKey, encryptedString), "I should be able to encrypt and then decrypt safely"); secretKey = "trustno1"; plainString = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed pede. Curabitur a mi id nisi euismod rutrum. Phasellus gravida. Ut luctus. Praesent quis leo sit amet orci imperdiet malesuada. Aenean molestie mauris euismod odio. Suspendisse ullamcorper facilisis nisl. Fusce vestibulum consectetuer risus. Curabitur ut turpis eget arcu facilisis ultricies. Morbi elementum, erat vitae dictum imperdiet, nisi purus rutrum odio, eget ornare ipsum nisl in tortor. Duis vestibulum, nulla et bibendum volutpat, mauris metus facilisis elit, vel gravida tortor leo at enim. Vivamus pulvinar lorem vitae tortor. Morbi rhoncus suscipit urna. Praesent placerat tempus augue. Fusce varius dui a nisi consequat ultricies. Curabitur at nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas./n/n/nMorbi vel leo non justo condimentum convallis. Vestibulum posuere aliquam nunc. Donec magna magna, euismod nec, pharetra fringilla, tristique mattis, turpis. Duis condimentum lacus eu felis. Sed ultricies. Nullam lacinia ante id diam. Ut quis enim. Fusce at felis quis neque vehicula tempor. Sed feugiat sodales sem. Duis cursus massa in ligula. Vestibulum volutpat, risus in ornare porta, tortor orci vestibulum felis, et eleifend risus odio nec eros. Integer lorem turpis, imperdiet eu, tempor eu, ultricies nec, est. Ut congue. Morbi lacinia vehicula pede. Cras neque sapien, feugiat ac, eleifend eget, mattis et, nisl. Morbi at augue vitae massa laoreet gravida./n/n/nSuspendisse vehicula convallis sem. Sed vel urna. Proin dolor diam, malesuada in, aliquet a, sagittis et, magna. Cras at dui eu mi porta fermentum. Donec pharetra purus sed velit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque euismod ornare neque. In odio nisi, bibendum non, vulputate ut, tincidunt a, ante. Sed risus arcu, tempus laoreet, euismod id, laoreet mollis, arcu. Ut tempor orci in nibh. Suspendisse potenti. Maecenas accumsan augue at nisl. Donec elementum diam nec metus. Sed vitae lacus sed libero varius semper. Aenean hendrerit tristique arcu. Praesent adipiscing ornare purus. Vestibulum quis eros nec risus accumsan laoreet. Duis consequat ante ut turpis. Curabitur aliquam suscipit ligula. Vivamus adipiscing./n/n/nCurabitur facilisis neque sit amet erat. Aliquam odio augue, vulputate lobortis, rutrum ut, tristique id, leo. Vivamus eu magna. Maecenas et libero. Integer porta, lorem at mollis ullamcorper, purus metus vestibulum erat, ut fringilla dui ante id mi. Morbi vitae ligula. Praesent ornare sapien sed massa. Mauris rhoncus fermentum dolor. Mauris gravida, justo et mollis malesuada, dolor erat fermentum nulla, vel suscipit leo ligula vel augue. Praesent magna enim, dignissim sed, aliquet quis, fermentum viverra, nisi. Vivamus condimentum, nisi quis posuere viverra, enim nunc faucibus lectus, mollis aliquam ipsum enim vel lacus. Suspendisse eget ligula. Aliquam ut metus et justo consectetuer ornare. Donec dapibus tristique pede. Vestibulum interdum ultricies tortor./n/n/nNunc nonummy dictum tortor. Quisque at elit a arcu nonummy elementum. Quisque auctor, risus et sodales euismod, turpis tellus consectetuer ante, quis egestas justo enim quis mi. Nunc fermentum sodales felis. Vivamus odio mi, dignissim vitae, auctor nec, tempus eget, lacus. Ut sapien massa, hendrerit eget, sagittis at, eleifend condimentum, arcu. Curabitur purus orci, facilisis vel, dapibus id, varius rutrum, tortor. Fusce accumsan viverra sem. Quisque tincidunt venenatis risus. Sed tortor justo, volutpat malesuada, sodales ut, vehicula id, magna. Nunc placerat, nibh et imperdiet ultricies, urna nulla luctus sapien, et porta mi odio ac neque. Morbi dignissim. Sed risus pede, adipiscing gravida, pharetra sit amet, convallis non, orci. Morbi adipiscing mauris id massa. Nullam fermentum. Suspendisse eget est"; encryptedString = Clipperz.Crypto.Base.encryptUsingSecretKey(secretKey, plainString); is (plainString, Clipperz.Crypto.Base.decryptUsingSecretKey(secretKey, encryptedString), "I should be able to encrypt and then decrypt safely"); // secretKey = "trustno1"; // plainString = "{}"; // plainString = "{'tags': {'personal': ['ref_1', 'ref_3'], 'business': ['ref_2', 'ref_3']}, 'records': {'ref_1': {'label': 'record_1', 'key': 'key_1'}, 'ref_2': {'label': 'record_2', 'key': 'key_2'}, 'ref_3': {'label': 'record_3', 'key': 'key_3'}}} "; // plainString = "{'tags': {}, 'records': {'07a5a92fcb334f757998ba14f3251f126d038318b3ac5e584bd712804c548084': {'label': 'Un bel record', 'key': '2a3f261c20a6a98dcc82b13fba013130b759f20602b4b13c5760879e087482a4'}}}"; // encryptedString = Clipperz.Crypto.Base.encryptUsingSecretKey(secretKey, plainString); // is(encryptedString, "{}", "encrypted value"); // secretKey = "trustno1"; // encryptedString = "0d43a4544424ffa519f2e43b7a46f703884fd94ff9879479563f6f252a573b253d3e77bc4f5f30f17bd11d2907718921ab8c9e1faccbe4314793fa323eb85eaf1bfbce5f7deea601e15b781782181cbff3c649dafef39abb70e8573e4f9be220f2286b01c3bd51d5c4a79b9d44a27be3b0994667302e301ca3dc074fb1bc7abc03d12b9e58ba0249435a120858c96e8ae99570718541499ab958a8fb92b63390be070ff61fc6ef107061693ab14c1915118cc6671ab7cf99b9cca553d6b5a7c314bffcd933e0a59f056d842a47cfe8571110b4764c5225443210d99b43b80a23c20fe953de3e1329d72cfb20139fe1ca"; // plainString = Clipperz.Crypto.Base.decryptUsingSecretKey(secretKey, encryptedString); // is(plainString, "{}", "decrypted value"); //------------------------------------------------------------------------- // // Java secret key encryption / JavaScript decryption // secretKey = "s3cr37k39"; plainString = "The Quick Brown Fox Jumps Over The Lazy Dog"; encryptedString = "9be538c3dde4dfab9384c0ef71dc624299fbbe71be8d1fe8991fd6cae88a883cf459d7cd56913a2b69815782cf74d7ce5c2c08034661f7f8aa59cf420e913086896840ebb45102d44d733d32de2a7dc8"; is (plainString, Clipperz.Crypto.Base.decryptUsingSecretKey(secretKey, encryptedString), "I should be able to encrypt and then decrypt safely"); //------------------------------------------------------------------------- // // Public key encryption -> Private key decryption // { var cleanKey; var t1, t2; /* diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/BigInt.html b/frontend/gamma/tests/tests/Clipperz/Crypto/BigInt.html index f4db3b7..f94618c 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/BigInt.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/BigInt.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Functions.js'></script> </head> <body> <pre id="test"> <script type="text/javascript"> try { var bigInt_1; var bigInt_2; var result; var expectedResult; // // Constructur and equality test // bigInt_1 = new Clipperz.Crypto.BigInt("110"); is (bigInt_1.equals(bigInt_1), true, ""); bigInt_1 = new Clipperz.Crypto.BigInt("110"); bigInt_2 = new Clipperz.Crypto.BigInt("110", 10); is (bigInt_1.equals(bigInt_2), true, ""); bigInt_1 = new Clipperz.Crypto.BigInt("110"); bigInt_2 = new Clipperz.Crypto.BigInt(110); is (bigInt_1.equals(bigInt_2), true, ""); bigInt_1 = new Clipperz.Crypto.BigInt(6); bigInt_2 = new Clipperz.Crypto.BigInt("110", 2); is (bigInt_1.equals(bigInt_2), true, ""); bigInt_1 = new Clipperz.Crypto.BigInt(6); bigInt_2 = new Clipperz.Crypto.BigInt("110", 3); is (bigInt_1.equals(bigInt_2), false, ""); // // Addition test // bigInt_1 = new Clipperz.Crypto.BigInt(6); bigInt_2 = new Clipperz.Crypto.BigInt(110); result = bigInt_1.add(bigInt_2); expectedResult = new Clipperz.Crypto.BigInt(116); is (result.equals(expectedResult), true, ""); is (result.equals(Clipperz.Crypto.BigInt.add(bigInt_1, bigInt_2)), true, "instance method === static function"); bigInt_1 = new Clipperz.Crypto.BigInt(6); result = bigInt_1.add(6); expectedResult = new Clipperz.Crypto.BigInt(12); is (result.equals(expectedResult), true, ""); bigInt_1 = new Clipperz.Crypto.BigInt("16161616161616161616161616161616161616161616161616161"); bigInt_2 = new Clipperz.Crypto.BigInt("42424242424242424242424242424242424242424242424242424"); result = bigInt_1.add(bigInt_2); expectedResult = new Clipperz.Crypto.BigInt("58585858585858585858585858585858585858585858585858585"); is (result.equals(expectedResult), true, ""); bigInt_1 = new Clipperz.Crypto.BigInt("16161616161616161616161616161616161616161616161616161"); bigInt_2 = new Clipperz.Crypto.BigInt("42424242424242424242424242424242424242424242424242424"); result = bigInt_1.add(bigInt_2); expectedResult = new Clipperz.Crypto.BigInt("58585858585858585858585851585858585858585858585858585"); is (result.equals(expectedResult), false, ""); bigInt_1 = new Clipperz.Crypto.BigInt("86161616161616161616161616161616161616161616161616161"); bigInt_2 = new Clipperz.Crypto.BigInt("42424242424242424242424242424242424242424242424242424"); result = bigInt_1.add(bigInt_2); expectedResult = new Clipperz.Crypto.BigInt("128585858585858585858585858585858585858585858585858585"); is (result.equals(expectedResult), true, ""); bigInt_1 = new Clipperz.Crypto.BigInt( "6541652165410321654063516540621063540654" + "0654065106540654165416521654103216540635" + "1654062106354065406540651065406541"); bigInt_2 = new Clipperz.Crypto.BigInt( "3046540351035403510354035103510351351351" + "0351350435103213540634132135401351035403" + "5403540354103540"); result = bigInt_1.add(bigInt_2); expectedResult = new Clipperz.Crypto.BigInt( "6541652165410321657110056891656467051008" + "1005100210054167675767872089206430081269" + "2975416119864419441944191419510081"); is (result.equals(expectedResult), true, ""); diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.B283.deferred.html b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.B283.deferred.html index 9ef9146..6e3f871 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.B283.deferred.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.B283.deferred.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <!-- - -> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <!- - --> <!-- --> <script type="text/javascript" src="../../../../js/MochiKit/Base.js"></script> <script type="text/javascript" src="../../../../js/MochiKit/Async.js"></script> <script type="text/javascript" src="../../../../js/MochiKit/DOM.js"></script> <script type="text/javascript" src="../../../../js/MochiKit/Logging.js"></script> <script type="text/javascript" src="../../../../js/MochiKit/Iter.js"></script> <!-- --> <!-- - -> <script type="text/javascript" src="../../../../js/MochiKit/Style.js"></script> <script type="text/javascript" src="../../../../js/MochiKit/Signal.js"></script> <script type="text/javascript" src="../../../../js/MochiKit/Color.js"></script> <script type="text/javascript" src="../../../../js/MochiKit/Position.js"></script> <script type="text/javascript" src="../../../../js/MochiKit/Visual.js"></script> <!- - --> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <!--<script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script>--> <!--<script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script>--> <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script>--> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Value.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Point.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Curve.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/StandardCurves.js'></script> </head> <body> <pre id="test"> <script type="text/javascript"> try { var deferredResult; deferredResult = new MochiKit.Async.Deferred(); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("** 1: " + res); return res;}); // // ECC.Curve.multiplication // var curve; var f2m; var f2m_improved; var value; var moduledValue; var result; var result_improved; var expectedResul; f2m = new Clipperz.Crypto.ECC.BinaryField.FiniteField({modulus:new Clipperz.Crypto.ECC.BinaryField.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000010a1', 16)}) f2m_improved = Clipperz.Crypto.ECC.StandardCurves.B283().finiteField(); curve = Clipperz.Crypto.ECC.StandardCurves.B283(); /** / value = new Clipperz.Crypto.ECC.BinaryField.Value("7b", 16); result = curve.multiply(value, curve.G()); expectedResult = new Clipperz.Crypto.ECC.BinaryField.Point({ x: new Clipperz.Crypto.ECC.BinaryField.Value('29705d23a9cda75e43984bdb9a8fd33304682da0f506a69bdbd5f36657e11b41e35fcdd', 16), y: new Clipperz.Crypto.ECC.BinaryField.Value('59157d2ace16563a905361c5206cc0775c3330f4978bddf8aa9916c451cf9951313623b', 16) }); is(result.x().asString(16), expectedResult.x().asString(16), "ECC.Curve.multiplication: result.x does match"); is(result.y().asString(16), expectedResult.y().asString(16), "ECC.Curve.multiplication: result.y does match"); / **/ value = new Clipperz.Crypto.ECC.BinaryField.Value("ba35032a24eb81238251d85824998bebae3b3e09f4d3845256c87585cf62416ee43191", 16); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("** 6: " + res); return res;}); // deferredResult.addCallback(console.time, 'B283.deferred.multiply - moduled value'); //deferredResult.addBoth(function(res) {MochiKit.Base.logDebug("2 - " + res); return res;}); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("** 7: " + res); return res;}); deferredResult.addMethod(curve, 'deferredMultiply', value, curve.G()); //deferredResult.addBoth(function(res) {MochiKit.Base.logDebug("3 - " + res); return res;}); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("** 8: " + res); return res;}); // deferredResult.addBoth(function(res) {console.timeEnd('B283.deferred.multiply - moduled value'); return res;}); //deferredResult.addBoth(function(res) {MochiKit.Base.logDebug("4 - " + res); return res;}); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("** 9: " + res); return res;}); deferredResult.addCallback(function(res) { var expectedResult; expectedResult = new Clipperz.Crypto.ECC.BinaryField.Point({ x: new Clipperz.Crypto.ECC.BinaryField.Value('7cf07c0880d1ae59f567a2ce420e78d1fdfc1249df694a60e5d40d23c6dc631e1501b77', 16), diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.B283.html b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.B283.html index 93d8695..f87bdbe 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.B283.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.B283.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC.js'></script>--> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Value.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Point.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Curve.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Functions.js'></script> </head> <body> <pre id="test"> <script type="text/javascript"> try { // // ECC.BinaryFiniteField // var f2m; var f2m_improved; var a, a1, b; var result; var result_improved; var expectedResul; f2m = new Clipperz.Crypto.ECC.BinaryField.FiniteField({modulus:new Clipperz.Crypto.ECC.BinaryField.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000010a1', 16)}) f2m_improved = Clipperz.Crypto.ECC.StandardCurves.B283().finiteField(); a = new Clipperz.Crypto.ECC.BinaryField.Value("05c91e41 d9ca17ef 9d8a33c1 a44eba6d 368fde02 1c492077 1a46eb01 a481e5f7 f430749d", 16); b = new Clipperz.Crypto.ECC.BinaryField.Value("07377071 2de7d57b a803f65f 45786c06 876b8066 db75ec47 81c053b0 a0f78e2c a6ab5187", 16); // // addition // result = f2m.add(a, b); expectedResult = new Clipperz.Crypto.ECC.BinaryField.Value("2fe6e30f42dc2943589c59ee136d66bb1e45e64c73ccc309b86b8b104766bdb529b251a", 16); is(result.asString(16), expectedResult.asString(16), "ECC.BinaryFinetField.add"); // // negation // result = f2m.negate(a); expectedResult = new Clipperz.Crypto.ECC.BinaryField.Value("5c91e41d9ca17ef9d8a33c1a44eba6d368fde021c4920771a46eb01a481e5f7f430749d", 16); is(result.asString(16), expectedResult.asString(16), "ECC.BinaryFinetField.negate"); // // multiplication // result = f2m.multiply(a, b); expectedResult = new Clipperz.Crypto.ECC.BinaryField.Value("2bacb89668741f6d1f7fd7d3df2f045814086adba11d8bb5f12f3f9851e3b66fbe283cb", 16); is(result.asString(16), expectedResult.asString(16), "ECC.BinaryFinetField.multiply"); // // fast multiplication // result = f2m.fastMultiply(a, b); expectedResult = f2m.multiply(a, b); is(result.asString(16), expectedResult.asString(16), "ECC.BinaryFinetField.fastMultiply"); a = new Clipperz.Crypto.ECC.BinaryField.Value("2fe6e30f42dc2943589c59ee136d66bb1e45e64c73ccc309b86b8b104766bdb529b251a", 16); b = new Clipperz.Crypto.ECC.BinaryField.Value("5c91e41d9ca17ef9d8a33c1a44eba6d368fde021c4920771a46eb01a481e5f7f430749d", 16); result = f2m.fastMultiply(a, b); expectedResult = f2m.multiply(a, b); is(result.asString(16), expectedResult.asString(16), "ECC.BinaryFinetField.B283.fastMultiply"); // // square // a = new Clipperz.Crypto.ECC.BinaryField.Value("1111", 16); result = f2m.square(a); expectedResult = f2m.multiply(a, a); is(result.asString(16), expectedResult.asString(16), "ECC.BinaryFinetField.square"); a = new Clipperz.Crypto.ECC.BinaryField.Value("11111111", 16); result = f2m.square(a); expectedResult = f2m.multiply(a, a); is(result.asString(16), expectedResult.asString(16), "ECC.BinaryFinetField.square"); a = new Clipperz.Crypto.ECC.BinaryField.Value("5c91e41d9ca17ef9d8a33c1a44eba6d368fde021c4920771a46eb01a481e5f7f430749d", 16); result = f2m.square(a); expectedResult = f2m.multiply(a, a); is(result.asString(16), expectedResult.asString(16), "ECC.BinaryFinetField.square"); diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.html b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.html index 658c402..5feb7df 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC.js'></script>--> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Value.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Point.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Curve.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Functions.js'></script> </head> <body> <pre id="test"> <script type="text/javascript"> try { // // ECC.BinaryFiniteField // var f2m; var f2m_improved; var a, b; var result; var result_improved; var expectedResul; f2m = new Clipperz.Crypto.ECC.BinaryField.FiniteField({modulus:new Clipperz.Crypto.ECC.BinaryField.Value('80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425', 16)}) f2m_improved = Clipperz.Crypto.ECC.StandardCurves.B571().finiteField(); a = new Clipperz.Crypto.ECC.BinaryField.Value("01401ca8 7b8f1446 84a2c58a e9308c23 7789e4bf 1f36dd11 7c150b7d 6076dd1d a6197fe4 c5225a06 4db0e422 2589d5ca 50eb6bb6 b7147a03 f6152843 8a8767c6 a6c4a688 3fd6f067", 16); b = new Clipperz.Crypto.ECC.BinaryField.Value("0112f5c9 7e74737b 38925faf e22cea3e 12b868d4 ddea5b33 41db8fc2 e788cab7 4f0a7a3c c27087a8 93659453 69938650 a99217d5 66e13f80 dc87f082 73f7411b 6b01ef1d 399c772a", 16); // // addition // result = f2m.add(a, b); expectedResult = new Clipperz.Crypto.ECC.BinaryField.Value("52e96105fb673dbc309a250b1c661d65318c6bc2dc86223dce84bf87fe17aae91305d80752ddaeded570714c1a539af9797c63d1f545832a92d8c1f97026ddcdc54995064a874d", 16); is(result.asString(16), expectedResult.asString(16), "ECC.BinaryFinetField.add"); // // negation // result = f2m.negate(a); expectedResult = new Clipperz.Crypto.ECC.BinaryField.Value("1401ca87b8f144684a2c58ae9308c237789e4bf1f36dd117c150b7d6076dd1da6197fe4c5225a064db0e4222589d5ca50eb6bb6b7147a03f61528438a8767c6a6c4a6883fd6f067", 16); is(result.asString(16), expectedResult.asString(16), "ECC.BinaryFinetField.negate"); // // multiplication // result = f2m.multiply(a, b); expectedResult = new Clipperz.Crypto.ECC.BinaryField.Value("4f8e4c0ae7664b284d3b4cb1b3f9568a1ce6e6e96b5381e184fe0822cb3d5c3a3f01ffd0206355d9e5c4853472bb33cf6b2d861d6b48c39d33a360e9a63ad2f7102f92e68a12312", 16); is(result.asString(16), expectedResult.asString(16), "ECC.BinaryFinetField.multiply"); // // fast multiplication // result = f2m.fastMultiply(a, b); expectedResult = f2m.multiply(a, b); is(result.asString(16), expectedResult.asString(16), "ECC.BinaryFinetField.fastMultiply"); a = new Clipperz.Crypto.ECC.BinaryField.Value("52e96105fb673dbc309a250b1c661d65318c6bc2dc86223dce84bf87fe17aae91305d80752ddaeded570714c1a539af9797c63d1f545832a92d8c1f97026ddcdc54995064a874d", 16); b = new Clipperz.Crypto.ECC.BinaryField.Value("1401ca87b8f144684a2c58ae9308c237789e4bf1f36dd117c150b7d6076dd1da6197fe4c5225a064db0e4222589d5ca50eb6bb6b7147a03f61528438a8767c6a6c4a6883fd6f067", 16); result = f2m.fastMultiply(a, b); expectedResult = f2m.multiply(a, b); is(result.asString(16), expectedResult.asString(16), "ECC.BinaryFinetField.fastMultiply"); // // square // a = new Clipperz.Crypto.ECC.BinaryField.Value("1111", 16); result = f2m.square(a); expectedResult = f2m.multiply(a, a); is(result.asString(16), expectedResult.asString(16), "ECC.BinaryFinetField.square"); a = new Clipperz.Crypto.ECC.BinaryField.Value("11111111", 16); result = f2m.square(a); expectedResult = f2m.multiply(a, a); is(result.asString(16), expectedResult.asString(16), "ECC.BinaryFinetField.square"); a = new Clipperz.Crypto.ECC.BinaryField.Value("1401ca87b8f144684a2c58ae9308c237789e4bf1f36dd117c150b7d6076dd1da6197fe4c5225a064db0e4222589d5ca50eb6bb6b7147a03f61528438a8767c6a6c4a6883fd6f067", 16); result = f2m.square(a); expectedResult = f2m.multiply(a, a); is(result.asString(16), expectedResult.asString(16), "ECC.BinaryFinetField.square"); diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.Value.html b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.Value.html index 0d0903d..8da2b6d 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.Value.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.Value.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC.js'></script>--> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Value.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Point.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Curve.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Functions.js'></script> </head> <body> <pre id="test"> <script type="text/javascript"> try { var value_1; var value_2; value_1 = new Clipperz.Crypto.ECC.BinaryField.Value("a", 16); is(value_1.asString(16), "0a"); value_1 = new Clipperz.Crypto.ECC.BinaryField.Value("ffff", 16); is(value_1.asString(16), "ffff"); value_1 = new Clipperz.Crypto.ECC.BinaryField.Value("7fff", 16); is(value_1.asString(16), "7fff"); is(parseInt("ffff", 16), 65535); is(parseInt("ffffff", 16), 16777215); is(parseInt("ffffffff", 16), 4294967295); is(parseInt("ffffffffff", 16), 1099511627775); is(parseInt("ffffffffffff", 16), 281474976710655); is(parseInt("ffffffffffffff", 16), 72057594037927940); is(parseInt("ffffffffffffffff", 16), 18446744073709552000); is(parseInt("10000000000000000", 16), 18446744073709552001); is(parseInt("10000000000000001", 16), 18446744073709552002); is(parseInt("10000000000000009", 16), 18446744073709552010); value_1 = new Clipperz.Crypto.ECC.BinaryField.Value("000108cbbacda1f03ea9360301045434ec7d82ba150936df08a229cbb4832ce1", 16); is(value_1.wordSize(), 8, "check the number of words of a 64 char hex string using the 'wordSize' method"); // 000108cb bacda1f0 3ea93603 01045434 ec7d82ba 150936df 08a229cb b4832ce1 is(value_1.value()[0], parseInt("b4832ce1", 16), "word[0]"); is(value_1.value()[1], parseInt("08a229cb", 16), "word[1]"); is(value_1.value()[2], parseInt("150936df", 16), "word[2]"); is(value_1.value()[3], parseInt("ec7d82ba", 16), "word[3]"); is(value_1.value()[4], parseInt("01045434", 16), "word[4]"); is(value_1.value()[5], parseInt("3ea93603", 16), "word[5]"); is(value_1.value()[6], parseInt("bacda1f0", 16), "word[6]"); is(value_1.value()[7], parseInt("000108cb", 16), "word[7]"); is(value_1.asString(16), "0108cbbacda1f03ea9360301045434ec7d82ba150936df08a229cbb4832ce1", "asString(16)"); value_1 = new Clipperz.Crypto.ECC.BinaryField.Value('10 00000000 00000000', 16); is(value_1.wordSize(), 3, "check the number of words of a value with only a bit set on the first slot of byte at position 17"); is(value_1.value()[0], parseInt("00000000", 16), "word[0]"); is(value_1.value()[1], parseInt("00000000", 16), "word[1]"); is(value_1.value()[2], parseInt("10", 16), "word[2]"); is(value_1.asString(16), "100000000000000000", "2^17 asString(16)"); // // XOR // value_1 = new Clipperz.Crypto.ECC.BinaryField.Value('e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 16); value_2 = new Clipperz.Crypto.ECC.BinaryField.Value('e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 16); result = value_1.xor(value_2); expectedResult = new Clipperz.Crypto.ECC.BinaryField.Value('0', 16); is(result.asString(16), expectedResult.asString(16), "a xor a = 0"); // value_1 = new Clipperz.Crypto.ECC.BinaryField.Value('e3b0c442 98fc1c14 9afbf4c8 996fb924 27ae41e4 649b934c a495991b 7852b855', 16); value_2 = new Clipperz.Crypto.ECC.BinaryField.Value('e3b0c442 98fc1c14 9afbf4c8 996fb924 27ae41e4 649b935c a495991b 7852b855', 16); result = value_1.xor(value_2); expectedResult = new Clipperz.Crypto.ECC.BinaryField.Value('10 00000000 00000000', 16); is(result.asString(16), expectedResult.asString(16), "single bit difference"); // value_1 = new Clipperz.Crypto.ECC.BinaryField.Value("01", 16); value_2 = new Clipperz.Crypto.ECC.BinaryField.Value('e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b935ca495991b7852b855', 16); result = value_1.xor(value_2); expectedResult = new Clipperz.Crypto.ECC.BinaryField.Value('e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b935ca495991b7852b854', 16); is(result.asString(16), expectedResult.asString(16), "01 xor value"); // value_1 = new Clipperz.Crypto.ECC.BinaryField.Value('e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 16); value_2 = new Clipperz.Crypto.ECC.BinaryField.Value('f3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 16); diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.K283.deferred.html b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.K283.deferred.html index b784f66..ab0fc5c 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.K283.deferred.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.K283.deferred.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <!-- - -> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <!- - --> <!-- --> <script type="text/javascript" src="../../../../js/MochiKit/Base.js"></script> <script type="text/javascript" src="../../../../js/MochiKit/Async.js"></script> <script type="text/javascript" src="../../../../js/MochiKit/DOM.js"></script> <script type="text/javascript" src="../../../../js/MochiKit/Logging.js"></script> <script type="text/javascript" src="../../../../js/MochiKit/Iter.js"></script> <!-- --> <!-- - -> <script type="text/javascript" src="../../../../js/MochiKit/Style.js"></script> <script type="text/javascript" src="../../../../js/MochiKit/Signal.js"></script> <script type="text/javascript" src="../../../../js/MochiKit/Color.js"></script> <script type="text/javascript" src="../../../../js/MochiKit/Position.js"></script> <script type="text/javascript" src="../../../../js/MochiKit/Visual.js"></script> <!- - --> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <!--<script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script>--> <!--<script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script>--> <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script>--> <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Value.js'></script>--> <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Point.js'></script>--> <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js'></script>--> <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Curve.js'></script>--> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/Koblitz/Value.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/Koblitz/Point.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/Koblitz/FiniteField.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/Koblitz/Curve.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/StandardCurves.js'></script> </head> <body> <pre id="test"> <script type="text/javascript"> try { var deferredResult; deferredResult = new MochiKit.Async.Deferred(); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("** 1: " + res); return res;}); // // ECC.Curve.multiplication // var curve; var f2m; var f2m_improved; var value; var moduledValue; var result; var result_improved; var expectedResul; f2m = new Clipperz.Crypto.ECC.Koblitz.FiniteField({modulus:new Clipperz.Crypto.ECC.Koblitz.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000010a1', 16)}) f2m_improved = Clipperz.Crypto.ECC.StandardCurves.K283().finiteField(); curve = Clipperz.Crypto.ECC.StandardCurves.K283(); /** / value = new Clipperz.Crypto.ECC.Koblitz.Value("7b", 16); result = curve.multiply(value, curve.G()); expectedResult = new Clipperz.Crypto.ECC.Koblitz.Point({ x: new Clipperz.Crypto.ECC.Koblitz.Value('29705d23a9cda75e43984bdb9a8fd33304682da0f506a69bdbd5f36657e11b41e35fcdd', 16), y: new Clipperz.Crypto.ECC.Koblitz.Value('59157d2ace16563a905361c5206cc0775c3330f4978bddf8aa9916c451cf9951313623b', 16) }); is(result.x().asString(16), expectedResult.x().asString(16), "ECC.Curve.multiplication: result.x does match"); is(result.y().asString(16), expectedResult.y().asString(16), "ECC.Curve.multiplication: result.y does match"); / **/ value = new Clipperz.Crypto.ECC.Koblitz.Value("ba35032a24eb81238251d85824998bebae3b3e09f4d3845256c87585cf62416ee43191", 16); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("** 6: " + res); return res;}); // deferredResult.addCallback(console.time, 'K283.deferred.multiply - moduled value'); //deferredResult.addBoth(function(res) {MochiKit.Base.logDebug("2 - " + res); return res;}); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("** 7: " + res); return res;}); deferredResult.addMethod(curve, 'deferredMultiply', value, curve.G()); //deferredResult.addBoth(function(res) {MochiKit.Base.logDebug("3 - " + res); return res;}); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("** 8: " + res); return res;}); // deferredResult.addBoth(function(res) {console.timeEnd('K283.deferred.multiply - moduled value'); return res;}); //deferredResult.addBoth(function(res) {MochiKit.Base.logDebug("4 - " + res); return res;}); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("** 9: " + res); return res;}); diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/JSCrypto_vs_Clipperz.html b/frontend/gamma/tests/tests/Clipperz/Crypto/JSCrypto_vs_Clipperz.html index 2968894..95f21a3 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/JSCrypto_vs_Clipperz.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/JSCrypto_vs_Clipperz.html @@ -1,67 +1,65 @@ <!-- -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/. --> <html> <head> <title>Clipperz.Crypto.JSCrypto_vs_Clipperz - tests</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Crypto.js'></script> <script type='text/javascript' src='./jscrypto.js'></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.Async.js"></script> </head> <body> <pre id="test"> <script type="text/javascript"> var longAsciiText = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam ac ipsum. Morbi mauris. Aenean ac elit id metus lobortis elementum. Proin at quam ac ipsum pellentesque adipiscing. Aenean vestibulum, nisl eu suscipit iaculis, quam pede congue mi, sit amet dapibus metus neque eget dui. Suspendisse posuere diam ac sapien. Nulla lobortis dapibus leo. Quisque ornare tortor quis turpis. Aliquam erat volutpat. Ut faucibus lacinia magna. Nunc metus leo, volutpat quis, mollis ac, sagittis ut, turpis. Quisque purus. Mauris ante enim, vehicula eu, suscipit vitae, laoreet vel, nulla. Pellentesque pede leo, aliquam quis, vehicula eget, rhoncus nec, metus. Vestibulum tellus. Suspendisse blandit. Pellentesque vel tellus. Maecenas arcu. Duis eget purus. Curabitur non pede nec odio cursus luctus. In non elit. Nullam eget nunc in nisl elementum commodo. Vivamus sollicitudin pede quis dui. Morbi commodo. Praesent a risus id urna hendrerit fermentum. Nunc ultricies tristique odio. Phasellus imperdiet, sapien eget viverra blandit, tortor risus blandit nisi, et sodales libero dolor quis nisl. Morbi vel enim. Nunc in quam. Vestibulum a magna. Fusce auctor elit in augue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris tincidunt consectetuer leo. Etiam non turpis. Vestibulum eros. Praesent venenatis adipiscing augue. Pellentesque dapibus odio ac arcu rhoncus sagittis. Nullam vitae augue. Ut magna nulla, congue eu, porta in, egestas quis, ligula. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Curabitur malesuada neque non nulla. Nulla facilisi. Fusce viverra magna ut tellus. Sed rutrum pretium sapien. Vivamus dui. Cras fringilla. Nullam lorem. Vestibulum varius, purus at imperdiet fermentum, metus diam ultricies lacus, vitae aliquam ipsum libero sit amet felis. Sed eget eros ac velit commodo sollicitudin. Morbi in metus in mi viverra lacinia. Sed ut urna. Suspendisse imperdiet tellus ac velit. Duis malesuada velit sit amet sapien. Vestibulum a sapien id libero accumsan luctus. Fusce iaculis. Donec pulvinar orci ut pede. Nam placerat sem ut sem. Ut pretium bibendum nisl. Suspendisse potenti. Phasellus mollis neque in neque. Suspendisse augue magna, eleifend et, malesuada at, viverra in, nisl. Donec vel lectus in justo ultrices tristique. Aliquam erat volutpat. Morbi suscipit, risus ac volutpat mollis, risus metus hendrerit sapien, ac scelerisque est orci eu est. Quisque sit amet velit. Sed libero diam, semper id, eleifend ac, iaculis non, nulla. Donec varius tincidunt arcu. Sed quis metus eu erat adipiscing viverra. Donec odio. Aenean sagittis nisl sed purus. Fusce vel nibh quis felis accumsan bibendum. Etiam et risus ac tortor cursus pharetra. Maecenas tellus. Pellentesque nec felis id eros vehicula commodo. Aliquam interdum sagittis odio. Maecenas at lorem eget mi aliquet sagittis. Mauris quis nibh in odio sodales lacinia. Proin augue mauris, placerat a, blandit vel, tincidunt eget, ante. Quisque turpis purus, placerat eget, tempor consectetuer, aliquet ac, enim. Etiam eleifend vestibulum mi. Vivamus gravida. Morbi dolor. In hac habitasse platea dictumst. Nulla commodo lectus faucibus lorem. Phasellus aliquet pede id metus hendrerit tempus. Fusce convallis pede ac neque tempor dignissim. Sed vitae lorem sit amet justo dapibus porta. Ut quam orci, pretium non, sagittis nec, condimentum id, dolor. Sed tempor. Nunc porta rutrum leo. Nunc id sem. Sed nibh tortor, dapibus eget, feugiat a, pretium pretium, purus. Suspendisse suscipit lobortis sem. Praesent pharetra orci. Quisque molestie tristique quam. Maecenas nunc lorem, rhoncus non, venenatis sed, sodales at, felis. Quisque semper. Quisque malesuada est quis lacus. Nullam a justo. Aliquam pellentesque, ante ut congue molestie, nisl sapien posuere nisl, eu cursus nulla ligula vel nisl. Fusce commodo lacinia magna. Aenean rutrum vestibulum lorem. Pellentesque fermentum tristique ipsum. Nulla facilisi. Donec id mi eget ipsum commodo egestas. Mauris iaculis. Nulla vulputate mi at nisl. In condimentum sodales tellus. Donec metus orci, mollis vel, accumsan ac, ornare ac, lacus. Pellentesque accumsan est et tellus. Nam mollis. Aenean accumsan eros sit amet tellus. Praesent eu libero. Sed tempus urna nec dolor. Nulla facilisi. Duis eleifend rhoncus neque. Curabitur consectetuer quam eu justo. Sed metus. Vivamus risus. Aliquam erat volutpat. Aliquam erat volutpat. Nunc semper urna. Praesent molestie libero a lacus. Nullam suscipit lobortis velit. Praesent rhoncus, felis ut interdum dapibus, ipsum lectus vestibulum nulla, in interdum risus dolor eget orci. Nullam venenatis. Suspendisse laoreet, arcu a luctus consectetuer, libero ligula condimentum quam, eget elementum mauris tortor sed enim. Pellentesque leo. Nam interdum malesuada ante. Praesent fermentum nunc et dolor. Donec auctor volutpat odio. Pellentesque volutpat egestas ipsum. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras ac ligula eu justo dignissim accumsan. Nullam nisi. Fusce id sem. Fusce et urna. Pellentesque commodo pharetra lorem. Donec erat. Vestibulum elit arcu, commodo et, consequat eget, posuere eget, sem. Morbi sed nulla sed neque commodo commodo. Aliquam erat volutpat. Ut id turpis a enim malesuada vestibulum. In arcu dui, dignissim vitae, blandit eu, egestas ac, arcu. In ultricies sapien vitae nisi. Proin rhoncus magna eget tortor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In dictum. Sed volutpat pharetra quam. Mauris eget eros. Fusce malesuada dolor id pede. Praesent nec justo sed nisi vehicula varius. In scelerisque convallis nulla. Pellentesque sodales massa vulputate urna. Duis metus urna, imperdiet ac, sodales vel, ullamcorper sed, pede. Vestibulum aliquam mollis metus. Praesent tempus tristique elit. Maecenas tellus tortor, pretium id, mollis id, molestie non, turpis. Vivamus nibh magna, bibendum vitae, a."; var longIsoLatin1Text = "¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùù"; var longUtf8Text = "客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之"; </script> <script type="text/javascript" src="JSCrypto_vs_Clipperz.test.js"></script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/JSCrypto_vs_Clipperz.test.js b/frontend/gamma/tests/tests/Clipperz/Crypto/JSCrypto_vs_Clipperz.test.js index 1580e6c..b3675f1 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/JSCrypto_vs_Clipperz.test.js +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/JSCrypto_vs_Clipperz.test.js @@ -1,118 +1,116 @@ /* -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/. */ //function logElapsedTime(aDescription, aStartTime, anEndTime) { // MochiKit.Logging.logDebug(aDescription + " - took " + (anEndTime - aStartTime) + "ms"); // SimpleTest.ok(true, aDescription + " - took " + (anEndTime - aStartTime) + "ms"); //} var asciiTestString = longAsciiText; //asciiTestString = asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString; //asciiTestString = asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString; //asciiTestString = asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString; //asciiTestString = asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString; //asciiTestString = asciiTestString + asciiTestString; //asciiTestString = asciiTestString + asciiTestString; var isoLatin1TestString = longIsoLatin1Text; //isoLatin1TestString = isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString; //isoLatin1TestString = isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString; //isoLatin1TestString = isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString; //isoLatin1TestString = isoLatin1TestString + isoLatin1TestString; //isoLatin1TestString = isoLatin1TestString + isoLatin1TestString; var utf8TestString = longUtf8Text; //utf8TestString = utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString; //utf8TestString = utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString; //utf8TestString = utf8TestString + utf8TestString; //utf8TestString = utf8TestString + utf8TestString; var times = { 'Clipperz': {}, 'JSCrypto': {} }; function appendResults (aDescription, aTimer) { MochiKit.DOM.appendChildNodes(MochiKit.DOM.getElement('timerTBODY'), MochiKit.DOM.TR(null, MochiKit.DOM.TH({align:'left'}, aDescription), MochiKit.DOM.TH(null, aTimer['ascii']['encrypt'] + ' - ' + aTimer['ascii']['decrypt'])//, // MochiKit.DOM.TH(null, aTimer['isoLatin1']['encrypt'] + ' - ' + aTimer['isoLatin1']['decrypt']), // MochiKit.DOM.TH(null, aTimer['utf8']['encrypt'] + ' - ' + aTimer['utf8']['decrypt']) ) ); } //============================================================================= function timeRegularFunction (aDescription, aString, anEncryptFunction, aDecryptFunction, aTimer, aKey) { var start; var end; var encryptTime; var decryptTime; var ciphertext; var plaintext; start = new Date(); ciphertext = anEncryptFunction('trustno1', aString); end = new Date(); encryptTime = end - start; start = new Date(); plaintext = aDecryptFunction('trustno1', ciphertext); end = new Date(); decryptTime = end - start; aTimer[aKey] = { 'encrypt': encryptTime, 'decrypt': decryptTime }; SimpleTest.is(aString, plaintext, aDescription); } /* function timeRegularFunction (anEncryptFunction, aDecryptFunction, aTimer) { var start; var end; var encryptTime; var decryptTime; var ciphertext; var plaintext; start = new Date(); ciphertext = anEncryptFunction('trustno1', asciiTestString); end = new Date(); encryptTime = end - start; start = new Date(); plaintext = aDecryptFunction('trustno1', ciphertext); end = new Date(); decryptTime = end - start; aTimer['ascii'] = { 'encrypt': encryptTime, 'decrypt': decryptTime }; SimpleTest.is(asciiTestString, plaintext, "Encrypt/decrypt the ASCII text"); start = new Date(); ciphertext = anEncryptFunction('trustno1', isoLatin1TestString); end = new Date(); encryptTime = end - start; diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/PRNG.html b/frontend/gamma/tests/tests/Clipperz/Crypto/PRNG.html index 61aa1c2..1ba19c6 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/PRNG.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/PRNG.html @@ -1,113 +1,111 @@ <!-- -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/. --> <html> <head> <script> jslog_config_enabled = true; </script> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/DOM.js'></script> <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/Statistics.js'></script>--> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> </head> <body> <pre id="test"> <script type="text/javascript"> test_PRNG = function() { var rand1, rand2; var i,c; c = 10; for (i=0; i<c; i++) { // jslog.debug(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString()); } rand1 = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(1); is(rand1.byteAtIndex(0) <= 255, true, "getRandomByte returns always a single byte"); rand2 = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(1); is(rand1.equals(rand2), false, "getRandomByte should almost always return two different values when called into sequence"); rand1 = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32); rand2 = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32); is(rand1.equals(rand2), false, "getRandomByte should almost always return two different values when called into sequence"); is(rand1.split(0,1).equals(rand2.split(0,1)), false, "getRandomByte should almost always return two different values when called into sequence"); // is(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(10000).toHexString(), "rand 1", "Value for random test"); // is(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(10000).toHexString(), "rand 2", "Value for random test"); // is(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(10000).toHexString(), "rand 3", "Value for random test"); // is(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(10000).toHexString(), "rand 4", "Value for random test"); // is(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(10000).toHexString(), "rand 5", "Value for random test"); // is(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(10000).toHexString(), "rand 6", "Value for random test"); // is(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(10000).toHexString(), "rand 7", "Value for random test"); // is(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(10000).toHexString(), "rand 8", "Value for random test"); // is(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(10000).toHexString(), "rand 9", "Value for random test"); // is(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(10000).toHexString(), "rand 10", "Value for random test"); // is(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(10000).toHexString(), "rand 11", "Value for random test"); // is(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(10000).toHexString(), "rand 12", "Value for random test"); // is(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(10000).toHexString(), "rand 13", "Value for random test"); // is(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(10000).toHexString(), "rand 14", "Value for random test"); //jslog.debug(rand1.toHexString()); //jslog.debug(rand2.toHexString()); SimpleTest.finish(); } try { MochiKit.Signal.connect(Clipperz.Crypto.PRNG.defaultRandomGenerator(), 'readyToGenerateRandomBytes', test_PRNG); Clipperz.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); SimpleTest.waitForExplicitFinish(); } catch (err) { var s = "test suite failure!\n"; var o = {}; var k = null; for (k in err) { // ensure unique keys?! if (!o[k]) { s += k + ": " + err[k] + "\n"; o[k] = err[k]; } } ok ( false, s ); } </script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/RSA.html b/frontend/gamma/tests/tests/Clipperz/Crypto/RSA.html index 4c7fd86..043ab40 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/RSA.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/RSA.html @@ -1,86 +1,84 @@ <!-- -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/. --> <html> <head> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/DOM.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/RSA.js'></script> </head> <body> <pre id="test"> <script type="text/javascript"> try { var rsaPublicKey; var randomValue; var publicEncryptedValue; var privateEncryptedValue; var startTime; var endTime; startTime=new Date(); rsaPublicKey = Clipperz.Crypto.RSA.generatePublicKey(512); endTime=new Date(); is(true, true, 'Time to generate the RSA public key (size 512 bit): '+(endTime.getTime()-startTime.getTime())/1000.0); randomValue = Clipperz.Crypto.Base.generateRandomSeed(); publicEncryptedValue = Clipperz.Crypto.RSA.encryptUsingPublicKey(rsaPublicKey, randomValue); privateEncryptedValue = Clipperz.Crypto.RSA.encryptUsingPrivateKey(rsaPublicKey, randomValue); is(publicEncryptedValue == privateEncryptedValue, false); is(Clipperz.Crypto.RSA.decryptUsingPrivateKey(rsaPublicKey, publicEncryptedValue), randomValue); is(Clipperz.Crypto.RSA.decryptUsingPublicKey(rsaPublicKey, privateEncryptedValue), randomValue); //------------------------------------------------------------------------- } catch (err) { var s = "test suite failure!\n"; var o = {}; var k = null; for (k in err) { // ensure unique keys?! if (!o[k]) { s += k + ": " + err[k] + "\n"; o[k] = err[k]; } } ok ( false, s ); } </script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/SHA.html b/frontend/gamma/tests/tests/Clipperz/Crypto/SHA.html index a2f6c04..de2021a 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/SHA.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/SHA.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <title>Clipperz.Crypto.SHA - TEST</title> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.Async.js"></script> </head> <body> <pre id="test"> <script type="text/javascript" src="SHA.test.js"></script> </pre> </body> </html> <!-- html> <head> <script> jslog_config_enabled = true; clipperz_profiling_enabled = true; </script> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> </head> <body> <pre id="test"> <script type="text/javascript"> try { var byteArray; var hash; var longText; var startTime, endTime; longText = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec nunc sapien, condimentum vitae, varius vel, pharetra in, augue. Mauris quam magna, pretium sit amet, accumsan id, volutpat lobortis, nibh. Fusce sagittis. Aenean justo. Curabitur euismod pede. Morbi at ante. Proin nisl leo, ultrices sed, facilisis et, nonummy sit amet, lorem. Praesent mauris tellus, pulvinar sed, nonummy vitae, rhoncus non, nunc. Proin placerat malesuada nisl. Nunc id enim. Maecenas commodo enim ac nibh. Sed condimentum, urna sit amet euismod gravida, mi urna varius odio, luctus pretium lectus justo nec felis. Ut in augue et est malesuada rhoncus. Sed vel orci. Mauris suscipit. Praesent cursus velit non turpis. Donec tristique dolor ac est. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla est sapien, vulputate eget, bibendum id, pharetra nec, mauris. Aliquam faucibus tincidunt dui. Proin iaculis. Maecenas sagittis. Integer et augue. Donec vitae urna in orci aliquet commodo. Vestibulum lorem sem, suscipit ac, placerat nec, mollis in, felis. Donec laoreet odio a mauris. Integer rutrum, sapien id varius molestie, mauris odio egestas orci, non bibendum sem felis in metus. Phasellus consectetuer lectus adipiscing mauris. Ut magna tellus, euismod ac, suscipit tincidunt, ullamcorper adipiscing, massa. Etiam orci. Phasellus a urna. Cras neque quam, laoreet at, tempus eget, euismod nec, nibh. Etiam hendrerit. Aenean vel lorem. Ut ligula lacus, congue eu, lobortis sit amet, venenatis in, magna. Nullam cursus felis quis est. Sed sem est, condimentum eu, vestibulum a, mattis vel, diam. Curabitur tincidunt pede quis pede. Sed neque diam, convallis vel, luctus at, porta id, nisl. Suspendisse potenti. Sed volutpat lobortis orci. Praesent mi. In interdum. Suspendisse suscipit ipsum eget dolor. Curabitur et tellus sed velit hendrerit varius. Cras sit amet est. Donec arcu nulla, vehicula et, pretium in, placerat id, felis. Integer mollis auctor lectus. Integer ultrices elementum sapien. Nam et erat. Nam pulvinar porta tortor. Nam at risus. Quisque nulla. Integer vestibulum, lacus id bibendum laoreet, ligula mi pharetra lorem, sit amet pharetra felis mauris quis justo. Aliquam ultricies. Duis a pede eget lorem dapibus rhoncus. Aenean eu elit non libero consectetuer viverra. Maecenas velit mi, eleifend vel, malesuada vel, condimentum quis, odio. Mauris tempus augue sed turpis. Pellentesque condimentum, lacus vitae pellentesque ultricies, risus tellus posuere nisi, et dictum turpis pede nec elit. Sed eu lectus eu justo sagittis euismod. Vestibulum lobortis, urna id mollis rhoncus, orci quam euismod ligula, at malesuada lacus magna vitae massa. Phasellus mattis fermentum velit. Nulla vulputate consequat enim. Maecenas quis neque. Curabitur sagittis facilisis neque. In elementum, eros non porttitor rhoncus, libero turpis sodales odio, vitae porta tellus purus et ante. Nullam molestie sollicitudin metus. Donec a elit. Morbi ut lacus. Donec at arcu. Quisque velit diam, interdum a, lacinia at, varius et, odio. Cras neque magna, ornare id, sollicitudin id, consequat a, est. Phasellus vestibulum est at leo. Nam facilisis, nulla dapibus condimentum pellentesque, est magna viverra ligula, at sollicitudin urna augue ut sapien. Fusce justo."; //------------------------------------------------------------------------- // // Test of SHA-256 algorithm // //------------------------------------------------------------------------- byteArray = new Clipperz.ByteArray(); hash = Clipperz.Crypto.SHA.sha256(byteArray); is(hash.toHexString(), "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "sha256('')"); byteArray = new Clipperz.ByteArray("0xbd"); hash = Clipperz.Crypto.SHA.sha256(byteArray); is(hash.toHexString(), "0x68325720aabd7c82f30f554b313d0570c95accbb7dc4b5aae11204c08ffe732b", "sha256('0xbd')"); byteArray = new Clipperz.ByteArray("0x5fd4"); hash = Clipperz.Crypto.SHA.sha256(byteArray); is(hash.toHexString(), "0x7c4fbf484498d21b487b9d61de8914b2eadaf2698712936d47c3ada2558f6788", "sha256('0x5fd4')"); byteArray = new Clipperz.ByteArray("0xc98c8e55"); hash = Clipperz.Crypto.SHA.sha256(byteArray); is(hash.toHexString(), "0x7abc22c0ae5af26ce93dbb94433a0e0b2e119d014f8e7f65bd56c61ccccd9504", "sha256('0xc98c8e55')"); byteArray = new Clipperz.ByteArray("0x0df1cd526b5a4edd"); hash = Clipperz.Crypto.SHA.sha256(byteArray); is(hash.toHexString(), "0x47f527210d6e8f940b5082fec01b7305908fa2b49ea3ae597c19a3986097153c", "sha256('0x0df1cd526b5a4edd')"); byteArray = new Clipperz.ByteArray("0xfdf4700984ee11b70af1880d0e0fefd4"); hash = Clipperz.Crypto.SHA.sha256(byteArray); is( hash.toHexString(), "0xb01ae16eed3b4a770f127b98469ba26fe3d8e9f59d8a2983214afe6cff0e6b6c", "sha256('0xfdf4700984ee11b70af1880d0e0fefd4')"); diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/SHA.test.js b/frontend/gamma/tests/tests/Clipperz/Crypto/SHA.test.js index 2864aaf..6530844 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/SHA.test.js +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/SHA.test.js @@ -1,81 +1,79 @@ /* -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/. */ var testSHA = function (aValue, anExpectedResult) { var byteArrayValue; byteArrayValue = new Clipperz.ByteArray(aValue); hash = Clipperz.Crypto.SHA.sha256(byteArrayValue); is(hash.toHexString(), anExpectedResult, "sha256(' " + byteArrayValue.toHexString() + "')"); } var tests = { 'basic_tests': function (someTestArgs) { testSHA('', '0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'); testSHA('0xbd', '0x68325720aabd7c82f30f554b313d0570c95accbb7dc4b5aae11204c08ffe732b'); testSHA('0x5fd4', '0x7c4fbf484498d21b487b9d61de8914b2eadaf2698712936d47c3ada2558f6788'); testSHA('0xc98c8e55', '0x7abc22c0ae5af26ce93dbb94433a0e0b2e119d014f8e7f65bd56c61ccccd9504'); testSHA('0x0df1cd526b5a4edd', '0x47f527210d6e8f940b5082fec01b7305908fa2b49ea3ae597c19a3986097153c'); testSHA('0xfdf4700984ee11b70af1880d0e0fefd4', '0xb01ae16eed3b4a770f127b98469ba26fe3d8e9f59d8a2983214afe6cff0e6b6c'); testSHA('0x8cf53d90077df9a043bf8d10b470b144784411c93a4d504556834dae3ea4a5bb', '0x56059e8cb3c2978b198208bf5ca1e1ea5659b737a506324b7cec75b5ebaf057d'); testSHA('0xeebcf5cd6b12c90db64ff71a0e08ccd956e170a50dad769480d6b1fb3eff4934cde90f9e9b930ee637a66285c10f4e8a', '0xc117b9dce689c399ec99008788cd5d24d8396fab7d96315c4f3fe6d56da63bb3'); testSHA('0x3592ecfd1eac618fd390e7a9c24b656532509367c21a0eac1212ac83c0b20cd896eb72b801c4d212c5452bbbf09317b50c5c9fb1997553d2bbc29bb42f5748ad', '0x105a60865830ac3a371d3843324d4bb5fa8ec0e02ddaa389ad8da4f10215c454'); }, //------------------------------------------------------------------------- 'aldo_cortesi_tests': function (someTestArgs) { testSHA('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', '0xa3f01b6939256127582ac8ae9fb47a382a244680806a3f613a118851c1ca1d47'); testSHA('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', '0xb35439a4ac6f0948b6d6f9e3c6af0f5f590ce20f1bde7090ef7970686ec6738a'); testSHA('0x79', '0xa1fce4363854ff888cff4b8e7875d600c2682390412a8cf79b37d0b11148b0fa'); testSHA('0x80', '0x76be8b528d0075f7aae98d6fa57a6d3c83ae480a8469e668d7b0af968995ac71'); }, //------------------------------------------------------------------------- 'longTextPerformance_test': function (someTestArgs) { var longText; var startTime; var endTime; longText = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec nunc sapien, condimentum vitae, varius vel, pharetra in, augue. Mauris quam magna, pretium sit amet, accumsan id, volutpat lobortis, nibh. Fusce sagittis. Aenean justo. Curabitur euismod pede. Morbi at ante. Proin nisl leo, ultrices sed, facilisis et, nonummy sit amet, lorem. Praesent mauris tellus, pulvinar sed, nonummy vitae, rhoncus non, nunc. Proin placerat malesuada nisl. Nunc id enim. Maecenas commodo enim ac nibh. Sed condimentum, urna sit amet euismod gravida, mi urna varius odio, luctus pretium lectus justo nec felis. Ut in augue et est malesuada rhoncus. Sed vel orci. Mauris suscipit. Praesent cursus velit non turpis. Donec tristique dolor ac est. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla est sapien, vulputate eget, bibendum id, pharetra nec, mauris. Aliquam faucibus tincidunt dui. Proin iaculis. Maecenas sagittis. Integer et augue. Donec vitae urna in orci aliquet commodo. Vestibulum lorem sem, suscipit ac, placerat nec, mollis in, felis. Donec laoreet odio a mauris. Integer rutrum, sapien id varius molestie, mauris odio egestas orci, non bibendum sem felis in metus. Phasellus consectetuer lectus adipiscing mauris. Ut magna tellus, euismod ac, suscipit tincidunt, ullamcorper adipiscing, massa. Etiam orci. Phasellus a urna. Cras neque quam, laoreet at, tempus eget, euismod nec, nibh. Etiam hendrerit. Aenean vel lorem. Ut ligula lacus, congue eu, lobortis sit amet, venenatis in, magna. Nullam cursus felis quis est. Sed sem est, condimentum eu, vestibulum a, mattis vel, diam. Curabitur tincidunt pede quis pede. Sed neque diam, convallis vel, luctus at, porta id, nisl. Suspendisse potenti. Sed volutpat lobortis orci. Praesent mi. In interdum. Suspendisse suscipit ipsum eget dolor. Curabitur et tellus sed velit hendrerit varius. Cras sit amet est. Donec arcu nulla, vehicula et, pretium in, placerat id, felis. Integer mollis auctor lectus. Integer ultrices elementum sapien. Nam et erat. Nam pulvinar porta tortor. Nam at risus. Quisque nulla. Integer vestibulum, lacus id bibendum laoreet, ligula mi pharetra lorem, sit amet pharetra felis mauris quis justo. Aliquam ultricies. Duis a pede eget lorem dapibus rhoncus. Aenean eu elit non libero consectetuer viverra. Maecenas velit mi, eleifend vel, malesuada vel, condimentum quis, odio. Mauris tempus augue sed turpis. Pellentesque condimentum, lacus vitae pellentesque ultricies, risus tellus posuere nisi, et dictum turpis pede nec elit. Sed eu lectus eu justo sagittis euismod. Vestibulum lobortis, urna id mollis rhoncus, orci quam euismod ligula, at malesuada lacus magna vitae massa. Phasellus mattis fermentum velit. Nulla vulputate consequat enim. Maecenas quis neque. Curabitur sagittis facilisis neque. In elementum, eros non porttitor rhoncus, libero turpis sodales odio, vitae porta tellus purus et ante. Nullam molestie sollicitudin metus. Donec a elit. Morbi ut lacus. Donec at arcu. Quisque velit diam, interdum a, lacinia at, varius et, odio. Cras neque magna, ornare id, sollicitudin id, consequat a, est. Phasellus vestibulum est at leo. Nam facilisis, nulla dapibus condimentum pellentesque, est magna viverra ligula, at sollicitudin urna augue ut sapien. Fusce justo."; startTime = new Date(); testSHA(longText, '0xf6fac13c06784e0fbc61a3d25c41c9984840a8b617a2beb57cf6fa3e5e4a8949'); endTime = new Date(); is((endTime - startTime) < 100, true, "Long text hash performance (" + (endTime - startTime) + ")"); }, //------------------------------------------------------------------------- 'syntaxFix': MochiKit.Base.noop } //============================================================================= SimpleTest.runDeferredTests("Clipperz.Crypto.SHA", tests, {trace:false}); diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/SRP.html b/frontend/gamma/tests/tests/Clipperz/Crypto/SRP.html index ba842a9..5da2327 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/SRP.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/SRP.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SRP.js'></script> </head> <body> <pre id="test"> <script type="text/javascript"> hashString = function(aValue) { return Clipperz.Crypto.SHA.sha256(new Clipperz.ByteArray(aValue)).toHexString().substring(2) } try { var username; var passphrase; var C; var P; var encryptedText_1; var encryptedText_2; var salt; var x; var v; var v1; username = "giulio.cesare"; passphrase = "trustno1"; C = hashString(username); is (C, "bde3c7b5fdcd9d6ce72782ca1ae912fc4397d668fcb3a73a04e5d47852670c4a", "C"); P = hashString(passphrase + username); is (P, "d79f5c5a04e91e1c85fb64cb6ee9481cb52c181047f69da02cd6c3ce6d058a76", "P"); salt = "cf1fa93393ade60318b8276f1f39420098419445005a7dc9117975fe1f8d9988"; x = hashString(salt + P); is(x, "21fe88a158e420aade86e00b5eb12a4c19bf15482fa34c542c90b1afdbd5b5fd", "x"); v = Clipperz.Crypto.SRP.g().powerModule(new Clipperz.Crypto.BigInt(x, 16), Clipperz.Crypto.SRP.n()); is(v.asString(10), "33816467430011076413789931449607305355248467973000153409872503376381719918118", "v"); is(v.asString(16), "4ac37139dbf32ebabd2c43f91dd085066d3c457d059efd5902d32ed247fcb626", "v (base 16)"); // encryptedText_1 = Clipperz.Crypto.Base.encryptUsingSecretKey(passphrase, username); // encryptedText_2 = Clipperz.Crypto.Base.encryptUsingSecretKey(passphrase, username); // is (encryptedText_1 != encryptedText_2, true, "Two round of encryption (with random padding bits) should NOT produce the same result"); //------------------------------------------------------------------------- username = "giulio.cesare.debug"; passphrase = "trustno1"; C = hashString(username); is (C, "fa1af609123b97a10d676158ed538d4657a89ac33a102b22bd9a66712039e208", "C"); P = hashString(passphrase + username); is (P, "e1bfba03dd626b12f29458a6ad63fb2c01b4765548504e1e2f6b1503c82e4253", "P"); salt = "cf1fa93393ade60318b8276f1f39420098419445005a7dc9117975fe1f8d9988"; x = hashString(salt + P); is(x, "93d4af3cdcd2447a745d309826dff3161feed4b15f32db8e909ff032a2bc8fb8", "x"); v = Clipperz.Crypto.SRP.g().powerModule(new Clipperz.Crypto.BigInt(x, 16), Clipperz.Crypto.SRP.n()); is(v.asString(10), "115049747015252903452664067168789229427785288458366249918596663144588656606556", "v"); // encryptedText_1 = Clipperz.Crypto.Base.encryptUsingSecretKey(passphrase, username); // encryptedText_2 = Clipperz.Crypto.Base.encryptUsingSecretKey(passphrase, username); // is (encryptedText_1 != encryptedText_2, true, "Two round of encryption (with random padding bits) should NOT produce the same result"); //------------------------------------------------------------------------- var srpConnection; var C, P, salt; C = "da8602c2f847306f4eb9acdaad925277d1fad1408f173f128a078aea15e60b1e"; P = "77643559beca49dd21c1c31db10bb0a9009662cb504413dc3fa3b7303c7e02ba"; salt = "000108cbbacda1f03ea9360301045434ec7d82ba150936df08a229cbb4832ce1"; srpConnection = new Clipperz.Crypto.SRP.Connection({C:C, P:P, hash:Clipperz.Crypto.SHA.sha_d256}); srpConnection._a = new Clipperz.Crypto.BigInt("37532428169486597638072888476611365392249575518156687476805936694442691012367", 10); diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/Usage.html b/frontend/gamma/tests/tests/Clipperz/Crypto/Usage.html index 4e7ad3d..f253553 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/Usage.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/Usage.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <title>Clipperz.Crypto.Usage - TEST</title> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> </head> <body> <pre id="test"> <script type="text/javascript"> Clipperz.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); MochiKit.Base.update(Clipperz, { 'PM': { 'Crypto': { 'passwordEntropy': function(aValue) { var result; var bitPerChar; bitPerChar = 4; if (/[a-z]/.test(aValue)) { bitPerChar ++; } if (/[A-Z]/.test(aValue)) { bitPerChar ++; } if (/[^a-zA-Z0-9]/.test(aValue)) { bitPerChar ++; } //MochiKit.Logging.logDebug("--- bitPerChar: " + bitPerChar); result = aValue.length * bitPerChar; return result; } } } }) try { var keyValue; var keyEntropy; var key; var plainText; var cypherText; var randomBytes; var hashedValue; key = Clipperz.Crypto.SHA.sha256(new Clipperz.ByteArray("This is my long and complex passphrase")); keyEntropy = Clipperz.PM.Crypto.passwordEntropy(key); cypherText = Clipperz.Crypto.AES.encrypt(key, new Clipperz.ByteArray("some text to encrypt")); plainText = Clipperz.Crypto.AES.decrypt(key, cypherText).asString(); is(plainText, "some text to encrypt"); randomBytes = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(256/8); hashedValue = Clipperz.Crypto.SHA.sha256(new Clipperz.ByteArray("text to hash")); //############################################################################# } catch (err) { var s = "test suite failure!\n"; var o = {}; var k = null; for (k in err) { // ensure unique keys?! if (!o[k]) { s += k + ": " + err[k] + "\n"; o[k] = err[k]; } } ok ( false, s ); } </script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/index.html b/frontend/gamma/tests/tests/Clipperz/Crypto/index.html index dd63ceb..5ee8b8c 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/index.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/index.html @@ -1,55 +1,53 @@ <!-- -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/. --> <html> <head> <title>Clipperz.Crypto.* - tests</title> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/TestRunner.js"></script> </head> <body> <script> TestRunner.runTests( 'AES.html', 'AES.performance.html', 'Base.html', 'BigInt.html', // 'ECC.B283.deferred.html', // 'ECC.BinaryField.FiniteField.html', // 'ECC.BinaryField.FiniteField.B283.html', // 'ECC.BinaryField.Value.html', //# 'ECC.K283.deferred.html', 'PRNG.html', // 'RSA.html', 'SHA.html', 'SRP.html', 'Usage.html' ); </script> </body> </html>
\ No newline at end of file diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/jscrypto.js b/frontend/gamma/tests/tests/Clipperz/Crypto/jscrypto.js index 9a0d5fa..7781380 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/jscrypto.js +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/jscrypto.js @@ -1,118 +1,116 @@ /* -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/. */ /* jsCrypto Core AES Emily Stark (estark@stanford.edu) Mike Hamburg (mhamburg@stanford.edu) Dan Boneh (dabo@cs.stanford.edu) Symmetric AES in Javascript using precomputed lookup tables for round transformations rather for speed improvements and code size reduction. Provides authenticated encryption in OCB and CCM modes. Parts of this code are based on the OpenSSL implementation of AES: http://www.openssl.org Public domain, 2009. */ // CCM mode is the default var CCM = 1, OCB = 2; /* aes object constructor. Takes as arguments: - 16-byte key, or an array of 4 32-bit words - Optionally specify a mode (aes.OCB or aes.CCM). Defaults to CCM - Optionally specify a MAC tag length for integrity. Defaults to 16 bytes */ function aes(key, mode, Tlen) { // initialize objects for CCM and OCB modes this._CCM = new cipherCCM(this); this._OCB = new cipherOCB(this); this._decryptScheduled = false; if (mode) this._mode = mode; else this._mode = OCB; // AES round constants this._RCON = [ [0x00, 0x00, 0x00, 0x00], [0x01, 0x00, 0x00, 0x00], [0x02, 0x00, 0x00, 0x00], [0x04, 0x00, 0x00, 0x00], [0x08, 0x00, 0x00, 0x00], [0x10, 0x00, 0x00, 0x00], [0x20, 0x00, 0x00, 0x00], [0x40, 0x00, 0x00, 0x00], [0x80, 0x00, 0x00, 0x00], [0x1b, 0x00, 0x00, 0x00], [0x36, 0x00, 0x00, 0x00] ]; this._key_len = 16; if (key.length == 4) { this._key = []; aes.wordsToBytes(key, this._key); } else this._key = key; if (Tlen) this._Tlen = Tlen; else this._Tlen = 16; // tag length in bytes this._nr = 10; // initialize tables that will be precomputed this._SBOX = []; this._INV_SBOX = []; this._T = new Array(4); this._Tin = new Array(4); for (var i=0; i < 4; i++) { this._T[i] = []; this._Tin[i] = []; } this._precompute(); this.scheduleEncrypt(); // initialize encryption and decryption buffers this._ctBuffer = []; this._ptBuffer = []; } ////////////////// // KEY SCHEDULING ////////////////// aes.prototype.scheduleEncrypt = function () { this._decryptScheduled = false; this._w = new Array(this._nr+1); this._w[0] = new Array(4); for (var i=0; i < 4; i++) this._w[0][i] = this._key[i]; var temp = new Array(4); diff --git a/frontend/gamma/tests/tests/Clipperz/DOM.html b/frontend/gamma/tests/tests/Clipperz/DOM.html index 782b1fe..c5c6ffe 100644 --- a/frontend/gamma/tests/tests/Clipperz/DOM.html +++ b/frontend/gamma/tests/tests/Clipperz/DOM.html @@ -1,55 +1,53 @@ <!-- -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/. --> <html> <head> <script type="text/javascript" src="../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../SimpleTest/test.css"> <script type='text/javascript' src='../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../js/Clipperz/DOM.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Crypto/Base.js'></script> </head> <body> <pre id="test"> <script> Clipperz_IEisBroken = false; </script> <!--[if IE]><script> Clipperz_IEisBroken = true; </script><![endif]--> <script type="text/javascript" src="DOM.test.js"></script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/DOM.test.js b/frontend/gamma/tests/tests/Clipperz/DOM.test.js index e8c6225..38c24e6 100644 --- a/frontend/gamma/tests/tests/Clipperz/DOM.test.js +++ b/frontend/gamma/tests/tests/Clipperz/DOM.test.js @@ -1,79 +1,77 @@ /* -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/. */ try { var template; var templateArgs; var element; var rowElement; var tdElement; template = Clipperz.DOM.Helper.createTemplate( [ {tag:'td', children:[{tag:'img', cls:'favicon', src:'{faviconUrl}'}]}, {tag:'td', children:[{tag:'a', href:'#', cls:'title', html:'{cardTitle}'}]}, {tag:'td', children:[{tag:'span', cls:'directLogins', id:'{directLoginsID}'}]}, {tag:'td', children:[{tag:'span', cls:'latestUpdate', html:'{latestUpdate}'}]}, {tag:'td'} ] ); templateArgs = { cardTitle: "Amazon.com", directLoginsID: "Clipperz_PM_Components_directLogins_58", faviconUrl: "http://www.amazon.com/favicon.ico", latestUpdate: "", reference: "13a5e52976337ab210903cd04872588e1b21fb72bc183e91aa25c494b8138551" } element = Clipperz.DOM.Helper.append(document.body, {tag:'table', children:[ {tag:'theader'}, {tag:'tbody', children:[ {tag:'tr', id:'testRow'} ]}, {tag:'tfooter'} ]}); ok(element != null, "created the TABLE"); rowElement = Clipperz.DOM.get('testRow'); ok(testRow != null, "created the ROW"); template.append(rowElement, templateArgs); tdElement = Clipperz.DOM.get(templateArgs['directLoginsID']); ok(tdElement != null, "created the TD"); } catch (err) { var s = "test suite failure!\n"; var o = {}; var k = null; for (k in err) { // ensure unique keys?! if (!o[k]) { s += k + ": " + err[k] + "\n"; o[k] = err[k]; } } ok ( false, s ); } diff --git a/frontend/gamma/tests/tests/Clipperz/Date.html b/frontend/gamma/tests/tests/Clipperz/Date.html index 1f425c8..5d6a12e 100644 --- a/frontend/gamma/tests/tests/Clipperz/Date.html +++ b/frontend/gamma/tests/tests/Clipperz/Date.html @@ -1,51 +1,49 @@ <!-- -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/. --> <html> <head> <title>Clipperz.Date - TEST</title> <script type="text/javascript" src="../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../SimpleTest/test.css"> <script type='text/javascript' src='../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Date.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Async.js'></script> <script type="text/javascript" src="../../SimpleTest/SimpleTest.Async.js"></script> </head> <body> <pre id="test"> <script type="text/javascript" src="Date.test.js"></script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/Date.test.js b/frontend/gamma/tests/tests/Clipperz/Date.test.js index f184fd6..7deda3f 100644 --- a/frontend/gamma/tests/tests/Clipperz/Date.test.js +++ b/frontend/gamma/tests/tests/Clipperz/Date.test.js @@ -1,63 +1,61 @@ /* -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/. */ var tests = { '001_test': function () { var date; var locale; // date = new Date(0); // date.setMilliseconds(Date.parse("Fri, 21 Sep 2007 10:04:24 UTC")); date = new Date(Date.parse("Fri, 21 Sep 2007 10:04:24 UTC")); locale = { 'amDesignation': "am", 'pmDesignation': "pm", // 'shortDateFormat': "d/m/y", // 'longDateFormat': "", 'months': ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], 'shortMonths': ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], 'days': ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], 'shortDays': ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ] } is(Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale(date, "d/m/y", locale), '21/09/07', "formatDate - 1"); is(Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale(date, "D M Y", locale), 'Fri Sep 2007', "formatDate - 2"); is(Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale(date, "D, d M Y", locale), 'Fri, 21 Sep 2007', "formatDate - 3"); is(Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale(date, "D, d M Y H:i:s", locale), 'Fri, 21 Sep 2007 12:04:24', "formatDate - 4"); // is(Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale(date, "D, d M Y H:i:s (T)", locale), 'Fri, 21 Sep 2007 11:04:24 (CEST)', "formatDate - 5"); }, //------------------------------------------------------------------------- 'syntaxFix': MochiKit.Base.noop } //============================================================================= SimpleTest.runDeferredTests("Clipperz.Date", tests, {trace:false}); diff --git a/frontend/gamma/tests/tests/Clipperz/KeePassExportProcessor.data.js b/frontend/gamma/tests/tests/Clipperz/KeePassExportProcessor.data.js index 3c407f7..ed9fc09 100644 --- a/frontend/gamma/tests/tests/Clipperz/KeePassExportProcessor.data.js +++ b/frontend/gamma/tests/tests/Clipperz/KeePassExportProcessor.data.js @@ -1,118 +1,116 @@ /* -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/. */ var testData = {} testData['Barb_Newman_data'] = ""; testData['Barb_Newman_data'] = testData['Barb_Newman_data'] + "[Domain Administration Account]" + "\n" + "Group: Windows" + "\n" + "User Name: _ABC" + "\n" + "URL: " + "\n" + "Password: 123456" + "\n" + "Notes: " + "\n" + "" + "\n" + "[Enquiro Domain]" + "\n" + "Group: Windows" + "\n" + "User Name: ABC" + "\n" + "URL: " + "\n" + "Password: 123456" + "\n" + "Notes: This is an Exchange Mailbox checked by IT/Programming" + "\n" + "" + "\n" + "[Enquiro Domain Administrator Account]" + "\n" + "Group: Windows" + "\n" + "User Name: ENQUIRO\ABC" + "\n" + "URL: " + "\n" + "Password: 123456" + "\n" + "Notes: Obsolete" + "\n" + "" + "\n" + "[Enquiro Domain Administrator Account]" + "\n" + "Group: Windows" + "\n" + "User Name: ENQUIRO\ABC" + "\n" + "URL: " + "\n" + "Password: 123456" + "\n" + "Notes: Changed on 07 Sep 2007 by Randy Kissick" + "\n" + "" + "\n" + "[Enquiro Domain Previous Administrator Account]" + "\n" + "Group: Windows" + "\n" + "User Name: ENQUIRO\ABC" + "\n" + "URL: " + "\n" + "Password: 123456" + "\n" + "Notes: ENSQL1" + "\n" + "" + "\n" + "[Local Administrator Account for most Machines]" + "\n" + "Group: Windows" + "\n" + "User Name: ABC" + "\n" + "URL: " + "\n" + "Password: 123456" + "\n" + "Notes: " + "\n" + "" + "\n" + "[Local Administrator Account for some Machines]" + "\n" + "Group: Windows" + "\n" + "User Name: ABC" + "\n" + "URL: " + "\n" + "Password: 123456" + "\n" + "Notes: " + "\n" + "" + "\n" + "[Bugzilla]" + "\n" + "Group: Hardware" + "\n" + "User Name: ABC" + "\n" + "URL: " + "\n" + "Password: 123456" + "\n" + "Notes: BUGZILLA" + "\n" + "" + "\n" + "[Client Services Linux Box]" + "\n" + "Group: Hardware" + "\n" + "User Name: ABC" + "\n" + "URL: " + "\n" + "Password: 123456" + "\n" + "Notes: 192.168.1.141" + "\n" + "" + "\n" + "[ENSQL2 BIOS]" + "\n" + "Group: Hardware" + "\n" + "User Name: " + "\n" + "URL: " + "\n" + "Password: 123456" + "\n" + "Notes: " + "\n" + "" + "\n" + "[Eye Tracking PC]" + "\n" + "Group: Hardware" + "\n" + "User Name: ABC" + "\n" + "URL: " + "\n" + "Password: 123456" + "\n" + "Notes: " + "\n" + "" + "\n" + "[IT Linux Box (Brainiac)]" + "\n" + "Group: Hardware" + "\n" + "User Name: ABC" + "\n" + "URL: " + "\n" + "Password: 123456" + "\n" + "Notes: " + "\n" + "" + "\n" + "[Maizal - Contract Developer Machine]" + "\n" + "Group: Hardware" + "\n" + "User Name: ABC" + "\n" + "URL: 199.185.139.69:3399" + "\n" + "Password: 123456" + "\n" + diff --git a/frontend/gamma/tests/tests/Clipperz/KeePassExportProcessor.html b/frontend/gamma/tests/tests/Clipperz/KeePassExportProcessor.html index 969b517..f2dc9ad 100644 --- a/frontend/gamma/tests/tests/Clipperz/KeePassExportProcessor.html +++ b/frontend/gamma/tests/tests/Clipperz/KeePassExportProcessor.html @@ -1,56 +1,54 @@ <!-- -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/. --> <html> <head> <title>Clipperz.KeePassExportProcessor - test</title> <script type="text/javascript" src="../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../SimpleTest/test.css"> <script type='text/javascript' src='../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../js/Clipperz/KeePassExportProcessor.js'></script> <script type="text/javascript" src="../../SimpleTest/SimpleTest.Async.js"></script> <!-- script type="text/javascript" src="./KeePassExportProcessor.data.js"></script> <script type="text/javascript" src="./KeePassExportProcessor.test.js"></script --> </head> <body> <pre id="test"> <script type="text/javascript" src="./KeePassExportProcessor.data.js"></script> <script type="text/javascript" src="./KeePassExportProcessor.test.js"></script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/KeePassExportProcessor.test.js b/frontend/gamma/tests/tests/Clipperz/KeePassExportProcessor.test.js index 4d1aa12..4099aee 100644 --- a/frontend/gamma/tests/tests/Clipperz/KeePassExportProcessor.test.js +++ b/frontend/gamma/tests/tests/Clipperz/KeePassExportProcessor.test.js @@ -1,118 +1,116 @@ /* -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/. */ var tests = { //------------------------------------------------------------------------- 'test1_test': function (someTestArgs) { var deferredResult; var keePassProcessor; keePassProcessor = new Clipperz.KeePassExportProcessor(); deferredResult = new Clipperz.Async.Deferred("test1_test", someTestArgs); deferredResult.addCallback(function(aResult) { return "[Gmail]\nGroup: General\nUserName: joe.clipperz\nURL: http://www.gmail.com\nPassword: NHy08ZCMYsqUeLQCawR7\n\n[del.icio.us]\nGroup: General\nUserName: joe69\nURL: http://del.icio.us\nPassword: tS1cIEeqp5y0wkU\n\n[Amazon]\nGroup: General\nUserName: jclipperz\nURL: http://www.amazon.com\nPassword: wvpkqNPIsqlI5g6XE9Tz\n\n[Paypal]\nGroup: General\nUserName: joeclipperz\nURL: http://www.paypal.com\nPassword: 24T4wIcvHnM28T3L\n\n[Technorati]\nGroup: General\nUserName: jclipperz\nURL: http://www.technorati.com\nPassword: UcVeNqF\n\n[American Airlines]\nGroup: General\nUserName: joe.clipperz\nURL: http://www.aa.com\nPassword: AtrYbmi7lmSjR\n" }); deferredResult.addMethod(keePassProcessor, 'deferredParse'); deferredResult.addCallback(function(aResult) { is(MochiKit.Base.serializeJSON(aResult), "[{\"Title\":\"Gmail\", \"Group\":\"General\", \"UserName\":\"joe.clipperz\", \"URL\":\"http://www.gmail.com\", \"Password\":\"NHy08ZCMYsqUeLQCawR7\"}, {\"Title\":\"del.icio.us\", \"Group\":\"General\", \"UserName\":\"joe69\", \"URL\":\"http://del.icio.us\", \"Password\":\"tS1cIEeqp5y0wkU\"}, {\"Title\":\"Amazon\", \"Group\":\"General\", \"UserName\":\"jclipperz\", \"URL\":\"http://www.amazon.com\", \"Password\":\"wvpkqNPIsqlI5g6XE9Tz\"}, {\"Title\":\"Paypal\", \"Group\":\"General\", \"UserName\":\"joeclipperz\", \"URL\":\"http://www.paypal.com\", \"Password\":\"24T4wIcvHnM28T3L\"}, {\"Title\":\"Technorati\", \"Group\":\"General\", \"UserName\":\"jclipperz\", \"URL\":\"http://www.technorati.com\", \"Password\":\"UcVeNqF\"}, {\"Title\":\"American Airlines\", \"Group\":\"General\", \"UserName\":\"joe.clipperz\", \"URL\":\"http://www.aa.com\", \"Password\":\"AtrYbmi7lmSjR\"}]", "first test"); }); deferredResult.addErrback(function(anError) { is("ERROR", anError) }); deferredResult.callback(); return deferredResult; }, 'test2_test': function (someTestArgs) { var deferredResult; var keePassProcessor; keePassProcessor = new Clipperz.KeePassExportProcessor(); deferredResult = new Clipperz.Async.Deferred("test2_test", someTestArgs); deferredResult.addCallback(function(aResult) { return "[Gmail]\nGroup: General\nUserName: joe.clipperz\nURL: http://www.gmail.com\nPassword: NHy08ZCMYsqUeLQCawR7\nNotes: Personal account\n\n[del.icio.us]\nGroup: General\nUserName: joe69\nURL: http://del.icio.us\nPassword: tS1cIEeqp5y0wkU\nNotes: social bookmarking site\n\n[Amazon]\nGroup: General\nUserName: jclipperz\nURL: http://www.amazon.com\nPassword: wvpkqNPIsqlI5g6XE9Tz\nNotes: The US online store\n\n[Paypal]\nGroup: General\nUserName: joeclipperz\nURL: http://www.paypal.com\nPassword: 24T4wIcvHnM28T3L\nNotes: Linked to my savings account\n\n[Technorati]\nGroup: General\nUserName: jclipperz\nURL: http://www.technorati.com\nPassword: UcVeNqF\nNotes: Blog ranking and searching\n\n[American Airlines]\nGroup: General\nUserName: joe.clipperz\nURL: http://www.aa.com\nPassword: AtrYbmi7lmSjR\nNotes: Adavantages card n. 795495\n" }); deferredResult.addMethod(keePassProcessor, 'deferredParse'); deferredResult.addCallback(function(aResult) { is(MochiKit.Base.serializeJSON(aResult), "[{\"Title\":\"Gmail\", \"Group\":\"General\", \"UserName\":\"joe.clipperz\", \"URL\":\"http://www.gmail.com\", \"Password\":\"NHy08ZCMYsqUeLQCawR7\", \"Notes\":\"Personal account\"}, {\"Title\":\"del.icio.us\", \"Group\":\"General\", \"UserName\":\"joe69\", \"URL\":\"http://del.icio.us\", \"Password\":\"tS1cIEeqp5y0wkU\", \"Notes\":\"social bookmarking site\"}, {\"Title\":\"Amazon\", \"Group\":\"General\", \"UserName\":\"jclipperz\", \"URL\":\"http://www.amazon.com\", \"Password\":\"wvpkqNPIsqlI5g6XE9Tz\", \"Notes\":\"The US online store\"}, {\"Title\":\"Paypal\", \"Group\":\"General\", \"UserName\":\"joeclipperz\", \"URL\":\"http://www.paypal.com\", \"Password\":\"24T4wIcvHnM28T3L\", \"Notes\":\"Linked to my savings account\"}, {\"Title\":\"Technorati\", \"Group\":\"General\", \"UserName\":\"jclipperz\", \"URL\":\"http://www.technorati.com\", \"Password\":\"UcVeNqF\", \"Notes\":\"Blog ranking and searching\"}, {\"Title\":\"American Airlines\", \"Group\":\"General\", \"UserName\":\"joe.clipperz\", \"URL\":\"http://www.aa.com\", \"Password\":\"AtrYbmi7lmSjR\", \"Notes\":\"Adavantages card n. 795495\"}]", "second test"); }); deferredResult.addErrback(function(anError) { is("ERROR", anError) }); deferredResult.callback(); return deferredResult; }, 'test3_test': function (someTestArgs) { var deferredResult; var keePassProcessor; keePassProcessor = new Clipperz.KeePassExportProcessor(); deferredResult = new Clipperz.Async.Deferred("test3_test", someTestArgs); deferredResult.addCallback(function(aResult) { return "[Gmail]\nGroup: General\nUserName: joe.clipperz\nURL: http://www.gmail.com\nPassword: NHy08ZCMYsqUeLQCawR7\nNotes: Personal account\nwith some notes stored\non multiple lines\n\n[del.icio.us]\nGroup: General\nUserName: joe69\nURL: http://del.icio.us\nPassword: tS1cIEeqp5y0wkU\nNotes: social bookmarking site\n\n[Amazon]\nGroup: General\nUserName: jclipperz\nURL: http://www.amazon.com\nPassword: wvpkqNPIsqlI5g6XE9Tz\nNotes: The US online store\n\n[Paypal]\nGroup: General\nUserName: joeclipperz\nURL: http://www.paypal.com\nPassword: 24T4wIcvHnM28T3L\nNotes: Linked to my savings account\n\n[Technorati]\nGroup: General\nUserName: jclipperz\nURL: http://www.technorati.com\nPassword: UcVeNqF\nNotes: Blog ranking and searching\n\n[American Airlines]\nGroup: General\nUserName: joe.clipperz\nURL: http://www.aa.com\nPassword: AtrYbmi7lmSjR\nNotes: Adavantages card n. 795495\n" }); deferredResult.addMethod(keePassProcessor, 'deferredParse'); deferredResult.addCallback(function(aResult) { is(MochiKit.Base.serializeJSON(aResult), "[{\"Title\":\"Gmail\", \"Group\":\"General\", \"UserName\":\"joe.clipperz\", \"URL\":\"http://www.gmail.com\", \"Password\":\"NHy08ZCMYsqUeLQCawR7\", \"Notes\":\"Personal account\\nwith some notes stored\\non multiple lines\\n\"}, {\"Title\":\"del.icio.us\", \"Group\":\"General\", \"UserName\":\"joe69\", \"URL\":\"http://del.icio.us\", \"Password\":\"tS1cIEeqp5y0wkU\", \"Notes\":\"social bookmarking site\"}, {\"Title\":\"Amazon\", \"Group\":\"General\", \"UserName\":\"jclipperz\", \"URL\":\"http://www.amazon.com\", \"Password\":\"wvpkqNPIsqlI5g6XE9Tz\", \"Notes\":\"The US online store\"}, {\"Title\":\"Paypal\", \"Group\":\"General\", \"UserName\":\"joeclipperz\", \"URL\":\"http://www.paypal.com\", \"Password\":\"24T4wIcvHnM28T3L\", \"Notes\":\"Linked to my savings account\"}, {\"Title\":\"Technorati\", \"Group\":\"General\", \"UserName\":\"jclipperz\", \"URL\":\"http://www.technorati.com\", \"Password\":\"UcVeNqF\", \"Notes\":\"Blog ranking and searching\"}, {\"Title\":\"American Airlines\", \"Group\":\"General\", \"UserName\":\"joe.clipperz\", \"URL\":\"http://www.aa.com\", \"Password\":\"AtrYbmi7lmSjR\", \"Notes\":\"Adavantages card n. 795495\"}]", "third test"); }); deferredResult.addErrback(function(anError) { is("ERROR", anError) }); deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'Barb_Newman_test': function (someTestArgs) { var deferredResult; var keePassProcessor; keePassProcessor = new Clipperz.KeePassExportProcessor(); deferredResult = new Clipperz.Async.Deferred("Barb_Newman_test", someTestArgs); // deferredResult.addCallback(function () { return testData['Barb_Newman_data']; }); deferredResult.addMethod(keePassProcessor, 'deferredParse'); deferredResult.addBoth(function(aResult) { SimpleTest.is(aResult.length, 121, "Barb's data contains 121 records"); return aResult; }); deferredResult.addBoth(function(aResult) { SimpleTest.is(MochiKit.Base.serializeJSON(aResult[0]), "{\"Title\":\"Domain Administration Account\", \"Group\":\"Windows\", \"User Name\":\"_ABC\", \"URL\":\"\", \"Password\":\"123456\", \"Notes\":\"\"}", "Barb's first record data matches"); return aResult; }); // deferredResult.callback(); deferredResult.callback(testData['Barb_Newman_data']); return deferredResult; }, //------------------------------------------------------------------------- /* 'Jordan_Curzon_test': function (someTestArgs) { var deferredResult; var keePassProcessor; keePassProcessor = new Clipperz.KeePassExportProcessor(); deferredResult = new Clipperz.Async.Deferred("Jordan_Curzon_test", someTestArgs); deferredResult.addCallback(function () { return testData['Jordan_Curzon_data']; }); deferredResult.addMethod(keePassProcessor, 'deferredParse'); deferredResult.addBoth(function(aResult) { SimpleTest.is(aResult.length, 2, "Jordarn's data contains 2 records"); diff --git a/frontend/gamma/tests/tests/Clipperz/KeyValueObjectStore.html b/frontend/gamma/tests/tests/Clipperz/KeyValueObjectStore.html index ece8a9c..19dbd8b 100644 --- a/frontend/gamma/tests/tests/Clipperz/KeyValueObjectStore.html +++ b/frontend/gamma/tests/tests/Clipperz/KeyValueObjectStore.html @@ -1,49 +1,47 @@ <!-- -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/. --> <html> <head> <script type="text/javascript" src="../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../SimpleTest/test.css"> <script type='text/javascript' src='../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type="text/javascript" src="../../SimpleTest/SimpleTest.Async.js"></script> </head> <body> <pre id="test"> <script type="text/javascript" src="KeyValueObjectStore.test.js"></script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/KeyValueObjectStore.test.js b/frontend/gamma/tests/tests/Clipperz/KeyValueObjectStore.test.js index ac56386..3fbbe7e 100644 --- a/frontend/gamma/tests/tests/Clipperz/KeyValueObjectStore.test.js +++ b/frontend/gamma/tests/tests/Clipperz/KeyValueObjectStore.test.js @@ -1,118 +1,116 @@ /* -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/. */ var tests = { //------------------------------------------------------------------------- 'simple_tests': function() { var deferredResult; deferredResult = new Clipperz.Async.Deferred("simple_tests", {trace:false}); deferredResult.addCallback(function() { var objectStore; objectStore = new Clipperz.KeyValueObjectStore(); ok(objectStore != null, "created an object store"); objectStore.setValue('key', "value"); is(objectStore.getValue('key'), "value", "can store and read a value to a simple key"); objectStore.setValue('key', "overwritten value"); is(objectStore.getValue('key'), "overwritten value", "using the same key overwrites the previous value"); objectStore.setValue('record.keys', [1, 2, 3]); is( MochiKit.Base.compare(objectStore.getValue('record'), {'keys': [1,2,3]}), 0, "getting a partial key returns the whole content associate with that key" ); is( MochiKit.Base.compare(objectStore.getValue('record.keys'), [1,2,3]), 0, "accessing data using a key.path return the matching content" ); is( MochiKit.Base.compare(objectStore.getValue('record.keys.1'), 2), 0, "accessing data using a key.path return the matching content, even inside an array" ); is( objectStore.setValue('key', "value"), "value", "setting a value return the value itself, as a convenience to chain deferred methods" ); is( objectStore.getValue('not_set_key'), null, "accessing a previously undefined key will return null" ); is( objectStore.getValue('record.not_set_key'), null, "accessing a previously undefined key will return null, even if part of the path is defined" ); is( objectStore.getValue('not_set_path.not_set_key'), null, "accessing a previously undefined key will return null, even if using a completely undefined path" ); objectStore.removeAllData(); is( objectStore.getValue('key'), null, "getting a value after a 'removeAllData' return no value" ); }); deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'simple_deferredGetOrSet_test': function () { var deferredResult; var objectStore; var testValue; objectStore = new Clipperz.KeyValueObjectStore(); testValue = "nifty test value"; deferredResult = new Clipperz.Async.Deferred("simple_deferredGetOrSet_test", {trace:false}); deferredResult.addMethod(objectStore, 'setValue', 'key', testValue); deferredResult.addMethod(objectStore, 'deferredGetOrSet', 'key', function() {return testValue}); deferredResult.addCallback(function(aResult) { SimpleTest.is(aResult, testValue, "deferredGetOrSet works when accessing data already present on the object store"); }) deferredResult.callback(); }, diff --git a/frontend/gamma/tests/tests/Clipperz/PM/BookmarkletProcessor.html b/frontend/gamma/tests/tests/Clipperz/PM/BookmarkletProcessor.html index b61057c..1a127a0 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/BookmarkletProcessor.html +++ b/frontend/gamma/tests/tests/Clipperz/PM/BookmarkletProcessor.html @@ -1,56 +1,54 @@ <!-- -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/. --> <html> <head> <title>Clipperz.PM.BookmarkletProcessor - test</title> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings/Strings_en-US.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/BookmarkletProcessor.js'></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.Async.js"></script> </head> <body> <pre id="test"> <script type="text/javascript" src="BookmarkletProcessor.test.js"></script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/PM/BookmarkletProcessor.test.js b/frontend/gamma/tests/tests/Clipperz/PM/BookmarkletProcessor.test.js index 45bf76b..bcb77ea 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/BookmarkletProcessor.test.js +++ b/frontend/gamma/tests/tests/Clipperz/PM/BookmarkletProcessor.test.js @@ -1,118 +1,116 @@ /* -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/. */ function testBookmarkletConfigurationString (aConfiguration, shouldFail, aMessage) { // var configuration; //try { // configuration = Clipperz.Base.evalJSON(aConfiguration); //} catch (exception) { // console.log("EXCEPTION", exception); // throw exception; //} //console.log("configuration", configuration); if (shouldFail == true) { try { Clipperz.PM.BookmarkletProcessor.checkBookmarkletConfiguration(aConfiguration); SimpleTest.ok(false, "vulnerability not caught - " + aMessage); } catch(exception) { SimpleTest.ok(true, "vulnerability correctly caught - " + aMessage); } } else { try { Clipperz.PM.BookmarkletProcessor.checkBookmarkletConfiguration(aConfiguration); SimpleTest.ok(true, "configuration correctly checked - " + aMessage); } catch(exception) { SimpleTest.ok(false, "configuration wrongly caught as malicious - " + aMessage); // console.log(exception); } } } //############################################################################# var tests = { //------------------------------------------------------------------------- 'simpleAmazonConfiguration_test': function () { var bookmarkletConfigurationString; bookmarkletConfigurationString = "{"+ "\"page\": {\"title\": \"Sign In\"},\n" + "\"form\": {" + "\"attributes\": {" + "\"action\": \"https://www.amazon.com/gp/flex/sign-in/select.html\",\n" + "\"method\": \"post\"" + "},\n" + "\"inputs\": [" + "{\"type\": \"hidden\",\n\"name\": \"path\",\n\"value\": \"/gp/yourstore\"},\n" + "{\"type\": \"hidden\",\n\"name\": \"useRedirectOnSuccess\",\n\"value\": \"1\"},\n" + "{\"type\": \"hidden\",\n\"name\": \"query\",\n\"value\": \"signIn=1&action=sign-out&useRedirectOnSuccess=1&path=/gp/yourstore&ref_=pd_irl_gw_r\"},\n" + "{\"type\": \"hidden\",\n\"name\": \"mode\",\n\"value\": \"\"},\n" + "{\"type\": \"hidden\",\n\"name\": \"redirectProtocol\",\n\"value\": \"\"},\n" + "{\"type\": \"hidden\",\n\"name\": \"pageAction\",\n\"value\": \"/gp/yourstore\"},\n" + "{\"type\": \"hidden\",\n\"name\": \"disableCorpSignUp\",\n\"value\": \"\"},\n" + "{\"type\": \"hidden\",\n\"name\": \"protocol\",\n\"value\": \"https\"},\n" + "{\"type\": \"hidden\",\n\"name\": \"sessionId\",\n\"value\": \"105-1479357-7902864\"},\n" + "{\"type\": \"hidden\",\n\"name\": \"referer\",\n\"value\": \"flex\"},\n" + "{\"type\": \"text\",\n\"name\": \"email\",\n\"value\": \"\"},\n" + "{\"type\": \"password\",\n\"name\": \"password\",\n\"value\": \"\"},\n" + "{\"type\": \"hidden\",\n\"name\": \"metadata1\",\n\"value\": \"Firefox 3.0.3 Mac\"},\n" + "{\"type\": \"hidden\",\n\"name\": \"metadataf1\",\n\"value\": \"\"},\n" + "{\"type\": \"hidden\",\n\"name\": \"metadata2\",\n\"value\": \"Default Plug-in Java Embedding Plugin 0.9.6.4 Shockwave Flash 90124RealPlayer Plugin QuickTime Plug-in 7.5.5 Flip4Mac Windows Media Plugin 2.2 4||1440-900-878-24-*-*-*\"},\n" + "{\"type\": \"hidden\",\n\"name\": \"metadata3\",\n\"value\": \"timezone: -1 execution time: 3\"},\n" + "{\"name\": \"action\",\n\"type\": \"radio\",\n\"options\": [" + "{\"value\": \"new-user\",\n\"checked\": false},\n" + "{\"value\": \"sign-in\",\n\"checked\": true}" + "]}" + "]" + "},\n" + "\"version\": \"0.2.3\"" + "}"; testBookmarkletConfigurationString(bookmarkletConfigurationString, false, "regular Amazon.com configuration"); }, //------------------------------------------------------------------------- 'hackedConfigurationWithXSSAttackVectorReadyToBeTriggeredWhenActivatingTheDirectLogin_test': function () { var bookmarkletConfigurationString; bookmarkletConfigurationString = "{" + "\"page\": {\"title\": \"Example Attack\"}," + "\"form\": { " + "\"attributes\": { " + "\"action\": \"javascript:opener.document.body.innerHTML = 'hacked!';close();\", " + "\"style\": \"-moz-binding:url('http://ha.ckers.org/xssmoz.xml#xss')\", " + "\"method\": null " + "}, " + "\"inputs\": [" + "{\"type\": \"text\", \"name\": \"username\", \"value\": \"\"}, " + "{\"type\": \"password\", \"name\": \"password\", \"value\": \"\"}" + "]" + "}," + "\"version\": \"0.2.3\" " + diff --git a/frontend/gamma/tests/tests/Clipperz/PM/Connection.data.js b/frontend/gamma/tests/tests/Clipperz/PM/Connection.data.js index 3e01411..7a4f01d 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/Connection.data.js +++ b/frontend/gamma/tests/tests/Clipperz/PM/Connection.data.js @@ -1,118 +1,116 @@ /* -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/. */ testData = { //------------------------------------------------------------------------- 'joe_clipperz_offline_copy_data': { users:{ 'catchAllUser': { __masterkey_test_value__: 'masterkey', s: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00', v: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00' }, 'f527cdd90d0d47f8524b4e165398ad1455eba515d04abd101d1e93b3c6ae0674': { s: '186f0c40bf73f2af236eaa6c429df225efa933050c9aae65240e93b7b362e3ee', v: 'ac61a6e325ecf329926a86084f591d8852d0ad3e4a6080f2adc901b82395ecaf', version: '0.2', maxNumberOfRecords: '100', userDetails: '{"records":{"index":{"eeda70e0392261967bda71c3764da78989c45bbd2bb7be6b941b90f81d9b81b5":"0","13a5e52976337ab210903cd04872588e1b21fb72bc183e91aa25c494b8138551":"1","062af892bcfba49ffcff05c56d99b7af2d508358e39c058c2e1fc83531436f80":"2","ca01bcb7691f70818feed46c9a2a91883ac543997a395535aedbb49de166690c":"3","507f38b06d587d8889698ae1ebbba7ef8f0539b82550dd25779fd9ee88fc0c7a":"4","d5f700b9c3367c39551ea49e00a9ab20dae09dd79d46047b983fc7c4bfaa050d":"5","de13c0d036234c44214062bc0a89e5f127470c464333493a485729f43cdc26e4":"6","d620764a656bfd4e1d3758500d5db72e460a0cf729d56ed1a7755b5725c50045":"7","f215d89bf4583c12f5ed4f4330f488dad3fffa448f4dc784f15ef135dda2c732":"8","36ec1a41118813ced3553534fa2607d781cba687768db305beed368a8e06e113":"9","fe21497ef7435d31f9746c132e4b5ecf5aac5f13b5961ddb55d2bdc3409f28f6":"10","6d45c2fec275b7482d41c76b20507100cfb6ab49922b876f9dd3040d361f4a18":"11","9dcd2a8a0fcb7e57d234dc4fea347f020a6a01793e40cf56a0d22379e590e291":"12","6c25be8e145efb26a1abd59590522f73fb2e3dbc139af2217074d9e2ba92c16a":"13","6026370f3db3860d2c46a08e389a7e906dc14f98c8444b21be9a7e9f405a2728":"14","8b18e8593b5bc2f7ea39a5fab222047034ef2f380fee05be0fa6e1c0972fea39":"15","084e23120544603f0297368fd3891a3818e0fe13488e2f2c6079913c8d1bed8d":"16","7bb69b6366a8012f181c01e368ba18d4f7a82bcabb4959189736ad124c4bbfbb":"17","5cdac63b317f3942da38f3a3de3b7f0e5d6678200951c6216230295550f63fb4":"18","c0ce9130ca365bb02418d4305ea1d29e49c3f0e96d44b9d3cb6b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/jCSeCrMh8dtu9ZGLEZ3QL06tqmXp03fCsvKOG0it/KuNG5EJpfb6bV+5DsZvI6k4VLXjcKvZhhh+VZSf2mr+mzFEGKBSeleZvii2g8dVyaEBms37SBFCdIwkMxFRmzo/n+1m8axx9o57NPwISU4q8eAjUK2bWrBECZaI4FwLqmlGK9hMPGB/lbrcuHtlqmv5qzo2TJb5/xoX0LyJB/FZVk5Wsm8vC+O8b7o6JDxaPkOgy07+p8Sg9wuKVy6hHrFRnZ+MEZO3Bbk74omg4+6y4HVuRCgxztzRyUiYTssFphqKBsC/e6fQN0QtSwhLSld/B5qoPMn/9CMs8UxmRbA2Ekwi+7Ss51YsWNmd8dKUqxMKWFZOQYe2dbvcYbRwKwjrARxR7d5aaQr8b96hKsWs0YkLQDn71C3AQfEUvClvDXJdJ97B9WkDHz/DQ9EaIp9+4ZSl3SIrew09vUkvUSVGU7egHzv1Oe2gf4jI/3zToRq307AzCT1tF4k0VbInDFKb8YSG35UaJAtfTENvkAQ+8KmR3gQyHRupLi6D8TNvy/03n8naG8BV8+EArzmUAgxmfv3PTipnn3bdsaIFK1+uldQXVUoHm7PgZidzOHpNXvNzgrL3c3gv7Et/s="},"directLogins":{"index":{"61e87fdc4f1d9112e3b30c1f6812d095dcdb24f014c83319091eb6c9899ec348":"0","989593d4c48929f0c8f1581aa96969c622807e99619ed4732026e967530a68ad":"1","9f7979368fa29f66c44bd97ecaf6c545abc800b1c7bb21b7655a68e1514c3906":"2","dba0db679802f0e6aa6d0b7a6aaf42350aabc5f057409edd99a268a92ebb6496":"3","aa18149164302d5dbe7e2d3724565b9550e00887b49978559783b2e38c625584":"4","1f9bfd677b531a03168d3f8bd8afabb5357244a7bc355dff50bd6c0a072114a6":"5","a48e38845713462ecc9f827149eeaae87da882031f98ef8ebbf9ee9537b63468":"6","6f7bbc4e42ea462b5246e6f51c3f86056bec50601ce2de6067c8c1d26f21c07f":"7","2df54059e78f5771f23bd285cce19595b38331b73d67020424d9a1b2257db09c":"8","065cd0c270e5e8ce50e4ea8e3828dccdae18c01ab030813d756a87d03fe68784":"9","ddbc8d01300a4f10631cbde09e1246332eade3a877a2205209f9eb9e5bc9da0b":"10","9b7a30e667afc9f76ba77600658b2c13bff52432d444261d39bf3d069a160afe":"11","9fd2929cde3d32d9cbc5f1d787f2f64729a5e12a14410556b31c0c099762c46a":"12","f695fc36ac56bead80c0d20a88e01e382819c18dc268f1679551b7c83db7cb14":"13","f22dc41ffabef4b3bc8f7af804fec975bd50718098322a673cbe4aaff9464ae1":"14","03251dc1cbc5398789e4c4b45c52cfac3fcd8c1a4f19a81fa68fc6feae31d55c":"15","a7b32e72502804bf2946a2a8856139cbbb759c5777e6b3e673db1fdf7e3bd06e":"16","cb9ae0bba1957075ccdbfd3b3481704d62087687a2ac7c411a4f07d444bde0f7":"17","7e1d069b7fa57c03bd7bf48807520feb953157834503aaff8c9d493f37dea69d":"18","24404059cabc63b2dbff0f42ba57183108b8189ef53ab62fa25141a1caea824b":"19","33cf9758477460a8056deef0295a1ebe65b39b392c361ceb920a83edacfe5d78":"20","e9a16316f330e3d150f6ffd194f6fd8acd1426757b097de4b88ca0db875202e4":"21"},"data":"xuiWbu5GjkueQhyH6sKg5Cn9/CSsPIjYgbhaHmjgwnnB+GL8UO5u0uURxTY6tkG2HbaFRpYZwLnqUUulEkVY6iNqJajFI0qDtrKams11cF2y9LaAalbqyv6U7EUt76d666DkXW8tf88nJ4HYfyAhhPCJ0cw5053K9BAVPbQM7fMA4MYY29k45U3HcIKNZcNqMftCc+fZB+fmZl1g7mSbrXaZyagRkwWwTdJ6/ecVOSSVOkWpckAaQWzGhwbO6zVWLtR9XQReIQZV52TwDMnV5IYJHnlw0Uvv2ZCVSu/oMN2TneW5fcIwQ0x/SRe+n4Mklzucpvasza+ZhRaRUFS53kvmbfPFI5tXqB3Z1+9S7LRLr9Ws97suTQ6G5eW6jKT2vf65ehnQJtA/gW6uwH+3IAT7ukFxO1knaRf7dRJDLuIc4Xnh+bRDnZUqfA+B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fTYk2EwMlTVAXrawZZEYu2JZ4kIjazo1LgyuuWTieEuONnye8Hr9p70RjwWUdlErlPSCKKn6JRdsM2no13F3151cfgx8I02J9vDuiNa3vfJfmRnBOly5jq6Wlnm2rJN6YYQHwbikoq3lJvkX5ZANDRKFlMWKK42+fXLBuofAZShFt6xvlY384aYsv3EcR42GOLrgYPQy0a7lr/FS4mM2ErNwNYnCz/xTuPBjgXXplbAnyA3jpKdPN1EfUM1oA4kZjECmkXZOuyEQxrndS9eOGbPM6S131zpdWEw9dWSZdkSI34+OkLfAKf6W6z4G4Z+cMRrkYLHs+BavJOum4XTjyyXHIKhQiqz9mgEf+ulodXi+LNsbq1eCcGPWrGg+GNwN1SjJHZm78gidyrlEF6xuPCaZRvGQtk59nuJULOZWkC3Ns/EcFiAql8cu37Lp842fsHHeCVOq0e8ZII4TPg9HKPwDD4HLSg4frBzyeZwK0nN30C5ATCxWdL4Q60cKtZyIEM7Kn1a/vifsAbe019Ui3ovTOCYiTCAdOLaAL/NdpgWA/fDNOsTlPvnEYkq+4+bV3Wyye9ddxICD4TnC2yvXvjw4C/WnYYceJy5R4KamIJueEGIHGp22/0DSF3H4ji3QoUDiFB/H+CA8A2q9LO9q0NYcf2P5q2MfdJGu4bd49g68mltj35pRnGQaafflXY9VmMfrlAbBYfUnsKOb3DOUpq8asveE41/6WkGcXFIuSABcbBf0cHIfBn41wRWQhoCm/JL8pfqEZC/paBdFBRW4FjKkxhbg4BPvBL0aQyGGkU8eH8tr8nm4YN1HMFF/s3s8+9FPoBxPuXLoGSg7Rvdz+g=="},"version":"0.1"}', statistics: 'SfGy/4mpXQdDOv+Bcfie4Yt/', userDetailsVersion: '0.3', records: { '062af892bcfba49ffcff05c56d99b7af2d508358e39c058c2e1fc83531436f80': { data: '7sgxSQlqR+wh3g06M2+sWp7raQxjjQ9jLIz2OcEB7SckuQcXNrhMlDCbL6ncSljtzgqhioWrOB409kIG8lc7h6ekghOE/Mhi7rVwAiRfNGB7r3mYxpEXRe96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A/DEQz0mnpdZYEsoz1/qAmAeDt89vx', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 CET 2007', updateDate: 'Wed Mar 14 15:46:44 CET 2007', accessDate: 'Mon Jan 19 16:10:04 CET 2009', currentVersion: '4a70ca20167875a936d4540f19980e972c20f329a65d85e9b0ce709f1fc7c7e3', versions: { '4a70ca20167875a936d4540f19980e972c20f329a65d85e9b0ce709f1fc7c7e3': { header: '####', data: 'GCNNIhDQjMJQZGVSf+95fPtU6eOnFWVhuGm86r8WZGVR2Gf2EjbG1OJ0ZIGpZ/AXgirCMpo5AFxJe0Bay8IYg+xmBqMFhwFxzAgJBYCIts+raSaNRipuY8dTEqDxAqD1cChcG8EhSoiFgQ0fG0I7nNEUDJi0pIt4/ygBcwvAhuAenEp9ZW+oQA0+YysPQRqkz3IieFaOoSEbe5/SqpUilV4q1gTVyzNXvrxzxx+rlvEyGFgFN+vgtUZ1NrwlPk4gVksTpylvv6CFaMGEWKhgMG6efo0rJckKosaJTu1pldJdnmMK4EKNMLOd+jZ6pEhEhYyadrA4+zYU5TlmZA6ASzTaps8piSwZodoi9qY0ch2StK4mAbzeEGe2HdfHuAU9Tyq3Ppk3+VfNdKgpQfYrQOiSlXbKzK636tzXTN/gyrfOTHjBrRl117ywibgSX63ayAYNfcLpKotC', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 CET 2007', updateDate: 'Wed Mar 14 15:46:44 CET 2007', accessDate: 'Mon Jan 19 16:10:04 CET 2009' } } }, '084e23120544603f0297368fd3891a3818e0fe13488e2f2c6079913c8d1bed8d': { data: 'fGzBu1On7e/6rAoSB1a4fq/CkS8Be/T8UP5cQ93asBTWndSYu2lW4DQ4SXQXSindIi3OnNx/f6SNv/extb7OrMLREF92wXI045ipPwy+DIICb+cQNMJ82Sh4cXaIcAWcyrm+MYri3qq9LBKbpwkILcebZidJ86lmKYHJozUezmfbMcwNCljHs/gYkHVzVcuw9L52Ugc6wC7sjsshh+UH6i4/2Frlrophtx+b1vervNd8eoYiKnedHVXVfW7UJcQoF27eHFgzwYnGvRW0KNXFFhqmPb61TSkIvNdCCvBKDP4SXrWvGgzU89wipvWdUPpQ+fCT6Mp3hPRrbJxwMunmjujZOzBld/HkjnXoiNfBb5akA280WvdyzWYATrjV1ZFx8yQY8G0+lRt/MxjKDc38w4y+Rf5WeRbXboJMvFatwooHUggk6qSRmZVvgOmFmNuDRnRYIFzqK3JclhJeVasnqhR6RiGSowc1Ffr1HhcZCMnXpQABGBkZcHD/zw6YjHRyh9Plw7XAm0xb16HMDtiwt7WLJpxLH/HP99j/A2hvMGWiUiFCaYv7AzyEPTmYbN32D1IsAEE/GC3FG0HypGTBolP8wpAfTRdlvWpJz8oRRdwuLV3Pgpu+kXh5sQyeZI6tnuMPQFmRDcMN1oo3E5V5V585nVMnKTFcXhBzD4UnoV+DQNkG/+iSPybQzz/EZmucEqGEYyjI3kl4MAX8UMEUxE4JO0fF8MzyBI13nxknowAceEammx1dGVaJCoIOdhadaPVPyOzXM1Vp1erVm5k4TsxSx1pll+GOm6hVoNHIuQLDueaMEpRxMhfwc8cDyXURqRGPTgTc0bint5xVjo10fnpX1gcdc/AWL6y3tXM80NW+uFJ4GI7VzyzfcMRzTiRaGi19z8MIx8PbIVGh2sw4FhgGujNsPrpuESvUVT+17M0+v8oEoABNlcizTMFs/sA1uqlPumFASltzmViAzClOsDuCh069hFLjdk/Ex5jy4vPYlwOT8Uq9DJC9ZWuZgiI1DrhWN/8QGAEGxxbvnSZPNCQ9kpD5p+iabinLLWOAirVNgKwIRJRyAu/uR9xKd7J9Wxq8q/ii+y5lGilbo2g24wbDwrkXYVhqp/4J0g+p8Wv1NBjCTSCqV39WEizUCRHo3ee9HnQnBJQDOyTBRuz2odTJtJ5tLYjWXZRdFzFSJrEq+Z1z3oq7LnhZy3YWaFXPeKmBCemMthtNt0nL', version: '0.3', creationDate: 'Fri Oct 17 16:49:20 CEST 2008', updateDate: 'Mon Oct 27 08:58:49 CET 2008', accessDate: 'Mon Jan 19 16:09:39 CET 2009', currentVersion: '6fd60c5709a4808444f43f7bbd872363d76703957f613076538ba2f9161206ac', versions: { '0ae362285f103722abbd046eee2b7d10aeae6a1d05cbaf2081392ce9df882bcf': { header: '####', data: 'sG6TUmPSEPFpiJ5YdtghWHmHbvUK63tZCZ+Q5iz2ALas//jN+lZCBhZcjEwPEJskBkK2R0MyAh14wWGh2bBHMjsokgTe+L+x+0c/Zi0epE/IC9gtOBhsTe/hZ2e2xOGF/SbzET3DAAYXvxduZ36f7SvvFnrkkKvpj8wGSdTFcBmzqMb9DL2bRyRCLGLMzE3F1a0q5CufCIRz2TgHm+Uw+kfvvwC7ig/F/5iLW90Ypz3vmEtMEFYFHZ9a8Oh0rsXGfevbMhFqALoywzihQEe/NiB8dwn7GEdYKSQ35rhvZh29ULWOZinqmg0ONe0HYaxx7DbKsVoue57S0CIUlgHLajzHfLfqQg2sFI0OT8TnHsGg0YZ6mM2EdKmEjJiER0cP', version: '0.3', creationDate: 'Fri Oct 17 17:00:31 CEST 2008', updateDate: 'Fri Oct 17 17:00:31 CEST 2008', accessDate: 'Fri Oct 17 17:00:31 CEST 2008' }, '10f45664bbd979a92f37886f1ecc6e52e49798b16dc997aecd37259ad9b2090e': { header: '####', data: 'RdKVaV/WWWchrCse3KtcXd47Bfm6IAwjqVUpaxoed3HeunI42AAm7xYYSjeK8edHpbNRJbhobBAX5OZtWIp/HmgkobKM8CIiWxrWz89FqyrbnPD7+fXdtgF2yTax/0sC1l0ibncdOuJKX6U829oPlXCpXIOjlomc4wEEAD/5V6FbORvdZ9IE/ME3LsG2y02cT2tIpx6+R6wC/PKXhZA2UDsTE6R2Op2BtIzpVORZLXsdyAp/4wvWQxq90i9cEpbsVQsMB10JVyNHNsRTFhIlHi9MVCaMxQvcrwRElMj/Y9x3RbsFzSGKqFLqdg7Fn/U+KYkpYtsgHv9hraPIb9lV5FH16+iItU/HBM6FGezIj1ZkoQ+dgjPfSjTZzgzDYwyb', version: '0.3', creationDate: 'Fri Oct 17 16:49:20 CEST 2008', updateDate: 'Fri Oct 17 16:49:20 CEST 2008', accessDate: 'Fri Oct 17 16:54:23 CEST 2008' }, '2fa7b67e569d5e268d2b70b3d4d3a960d7e437e1937bcb324b67d0b9441db8ba': { header: '####', data: 'dpnI2qKjk0+bfyKktw4ZCWf+rWZ12hO5bda39CwD29JH7KtdpLCLe2LoLd+KKF2wOdpDsoI2iTiwRgFpt77e7DoWJABxq/0aaRCVN9XpqZo08iHiYhJyNlIszO8CdEhX+M3AeZqzTnd6fs91VfIEWggvku2Z+jwr0CbclY6FnOcNnS+1fj+W79Z9XC383GOm2ujjfo3SX/fyNQSw8aX+7AgJIRGR9uHK7M1cVfsNNTbmDb/HDgLlYZ1Pqm/9poHpmS7G4HUoRM2/WjI0R6F48dy5s8vZRi11SCnlnj5oRykScJj6wh2DltbCyesiaTpAjP6MQjTXsZzKpaosaQcQClZw+w6hDD2cA54IaBIv2j5KAHyhxDh2ERdwbdnCsDKPz4+zP+fmKfW295d4OY0l1NCSdcY+75HWTmBWRAooZeDTo7AE8m5sRwxewE0Y8J2MLUYsrs7Rl4kbZCiRRHU7cs+us3fq2DVn2OLGEbkRrK3kA9swT9W8ABqINoA79+DmDaIr6TGxe5AlHkCAl5sYAN4g42UX1NKhl4fWI1Scj9O1Ixds/1UUvqzavld0mE2cR9yt6LntjE5sQSAaexvymAJbU5IIM5NTk7NlY7G3PEvAPjcUsL9SGw==', version: '0.3', creationDate: 'Fri Oct 17 17:00:13 CEST 2008', updateDate: 'Fri Oct 17 17:00:13 CEST 2008', accessDate: 'Fri Oct 17 17:00:13 CEST 2008' }, '5a17723c34226d8cd663f91b11bfa14979e694e461818113ec8abf7194b46b6b': { header: '####', data: 'yRTvhkoY9zDRBwFYf0G5U8zhfS1XWIUfwes6ADNnFyOrHOr7JZvZZHSgkOPnsmN/f5ngcvFaIV9X3TNTmmPLzD/ewgGVMR+ofMLyOIMGhxUDzosSd1+HKqwDZWneZ6xNsci87W8UCfJgoEGrkAtAwktqyS04pcAas74XiRGBWNcv5mHZONwGPckYUnnaVG02Zf+qif6Pp7ugdvXrgncO5oi2AMSoR8GQxMP+tX53YzLwOpabA32PDT6o+aDPwMstJNQjWCXjeYLDIlb0GjL2zgjglX5CfdGw8vNT5hwGEK2D1FkvHkw79m++9sOWd5w9WdGgtS4mrTZP3JHWC1sPqvsIpq6PsrzRrbfCFH7C4X/ya5ciOIZTCNl4dEGAif94zgN74ueY5BF31PNFtaRaQ1waKkbsrU63MrbQbBar9b0hDZoser3BdgDGb1Ecc2GbJM1HbDITttmFDrzy/Ugh2kistHx7Dci8IGgfT7K94TntRFc5R6suEqYRrmOn57YJTZYrwSgbeTqAt/KOE+gL9LawiLJ0IdSC2RQnO3yu/aOEThHxpdLIKiVJoiEQXYVnq2UpnO79GNtplNnUe1hETQ/JT0o5X1bbENyInUsFjPuitAfChXofkAysIhDOHAdifc0Y+pxOHbQLkL65ZOsEDXWSlwMcduMNdQm4LVx26GLIV6yVsaDN+hGta2CxUuSvEIMM6T5xhaPfJ4K57LVw9MbOjRXpmFQz3QgEr8ZZdUxgE+Kj6CtmsjvzXtCQ3Bv/SccTLJSR/LQ8XRdIcPoOlDDy5jSQDF/8lxkgV1V7M3+SI1iWESPT8My5C+RH32F2MNZzthYq5hIFUB3wsM/AaQ==', version: '0.3', creationDate: 'Fri Oct 17 16:59:31 CEST 2008', updateDate: 'Fri Oct 17 16:59:31 CEST 2008', accessDate: 'Fri Oct 17 16:59:31 CEST 2008' }, '6fd60c5709a4808444f43f7bbd872363d76703957f613076538ba2f9161206ac': { header: '####', data: 'RgIWPbNN3sPkIPBE6lfvf9/EoDFLemTZe0Qh/1wZLrKxLRNzFpUk9+NmeGUp5f1hM3XjXw4cXRvP6GrWq69mz9zGja+1TA6RoW3dFMpSQkbONcrSD1mIjxV2zIvzA/Pangz0ZixbEeHCfwXLvgnevbTXXFjkti3kLHQlk2pJpM3zMl+rMJtcsefszuJ/0tE/bO7sBcFqcYgKAht2OyDQORBAGiW1kI9USKM5OOfJJIZDQ0gDhRgl2U92l3kIOO8hdnj32oRedwfKFmdSRkuMY7ykU0bMuVEVkLi/FWmhHxi66C2ovAztVtMd1IiyoNcHc4UH942GC4pT1A8YQpIHxBAJbrQVhpl9LfFkmJ7xUc6Xs5j0Nv8+z2JGCnJI/D4nDJqYW+iCYtRWu6vUmbg0vGfaYWQFGRZRk8zWfHzHXBvHU8p0QsIjYgCLKiUaU2SRRD2P7JCjeTUrm3I1OI593iPsEH9J2PHCM9OMQ8/Fsdgd7lWgH6P9jLdGUwtb1hGaq8mg3JGrHFXcrVkUEBfeR7xljeSHD7j4YahYrua9EeR8nvq6CNaOr406AWyHse9SXhaOxt8qXRLoELpyQPsaLgafUpsdLjJqHz7J76Rp77NSOtXGplKjAtU1xj+d/agaAKYCjvUJC8/APJI2890Pn7VSXr/TPc5biPEIopyVYEHFqaT4e5nZW1Ku1HXC9gwUwUI9rITG4GzIH1WMEm7oFLNUaSMrdK/UTdTJZ66ENE3B9v9cTUpR0NTkbI+iGKDnc8GHPRlr2ZJwN4KFTxi+o/kkEOBjvRHR55nRh2+dke75LS/fzHQZw5wlyqBv5ZeUZfRA7QHfkj9acR0fJSqqNX25AUzZQnRL3oVpOxFWCMU7QVf5VpnRm9OIOd/5F5EoY7Be4doM/UV9U40F3E6XPZQ8S0GKQzrDjc7jKyGPLNPLUWTmGB39mTNDHZQHh5Xv5Q==', version: '0.3', creationDate: 'Mon Oct 27 08:58:49 CET 2008', updateDate: 'Mon Oct 27 08:58:49 CET 2008', accessDate: 'Mon Jan 19 16:09:39 CET 2009' }, 'b57a2d2ffafa8029123362071c09709bb9192f06a17140440f0e41d22143148f': { header: '####', data: 'PQ53T2Vo2D8PoLI1qNX//jLaVZFTDTYk6geT9+4RoThTxvlJ+beDPnQzgYhd9iASaF9GQEEL8JxsBnNpEPa6JPOY4ndFLmDLyFDKXMprxq1UIbzFV6kFoYAk3uCCCa3UCDzdr1KXB2CiiF9HrilaA+xkm8krAvH8I5kZD+j23gByz5cAFvXg7A77KEURpjujURL65DW5M+ceIjo6OXaPW9VO03xhqGt/M47ayObpoEGJZn+X9C8s0SE5wOXHbn38YZlRI480OMvtDAxbEYUeQKMmzu6lO4Nw5hhOUjoPSLr/i3tmDx3nPcDwnSafx6jyA4y31eW6yazqTEOP5I5ArC5mUrF7mAAiFvbHIsMoF8PLj6MONlRIOZgbf9HzCpFdt8xBrX/TXp3LaSAj2XTWgSTFI2cgmU3qqPyibvIfUsB5cVHQCXi692JpC+B85axJ0FLyMl5w3vq0txlPkf6q+dadPYDaLHGZEmDjkWScA1GM5xPJHWFwqGE7ejgXKG0sMYsMKWYk+F2LEUmMHtEvSlpgJBntvcQ1ZjYQxeu4hg5txu1ykkif6fXgkXF6wn6qu+5caeJeNhWtAB4q7WVD47111woYMdkmX7AnDTXSAQ==', version: '0.3', creationDate: 'Fri Oct 17 16:57:17 CEST 2008', updateDate: 'Fri Oct 17 16:57:17 CEST 2008', accessDate: 'Fri Oct 17 16:57:17 CEST 2008' diff --git a/frontend/gamma/tests/tests/Clipperz/PM/Connection.html b/frontend/gamma/tests/tests/Clipperz/PM/Connection.html index e2a3394..1f3a472 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/Connection.html +++ b/frontend/gamma/tests/tests/Clipperz/PM/Connection.html @@ -1,68 +1,66 @@ <!-- -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/. --> <html> <head> <title>Clipperz.PM.Connection - test</title> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Signal.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Toll.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Offline.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Test.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Connection.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Crypto.js'></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.Async.js"></script> </head> <body> <pre id="test"> <script type="text/javascript" src="Connection.data.js"></script> <script type="text/javascript" src="Connection.test.js"></script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/PM/Connection.test.js b/frontend/gamma/tests/tests/Clipperz/PM/Connection.test.js index 9d0036a..df409c0 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/Connection.test.js +++ b/frontend/gamma/tests/tests/Clipperz/PM/Connection.test.js @@ -1,118 +1,116 @@ /* -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.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); var tests = { //------------------------------------------------------------------------- 'simple_tests': function () { var deferredResult; deferredResult = new Clipperz.Async.Deferred("simple_tests", {trace:false}); deferredResult.addCallback(function() { var connection; SimpleTest.is(Clipperz.PM.Connection.communicationProtocol.versions['current'], Clipperz.PM.Connection.SRP['1.1'], "the current connection is 1.1"); connection = new Clipperz.PM.Connection.communicationProtocol.versions['current'](); SimpleTest.ok(connection != null, "can create a connection with the 'current' communication protocol"); SimpleTest.is(connection.proxy(), Clipperz.PM.Proxy.defaultProxy, "the connection uses the defaultProxy if no proxy is specified on the constructor"); }); deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'simpleProxy_tests': function () { var deferredResult; deferredResult = new Clipperz.Async.Deferred("simple_tests", {trace:false}); deferredResult.addCallback(function() { var connection; var proxy; proxy = new Clipperz.PM.Proxy(); connection = new Clipperz.PM.Connection.communicationProtocol.versions['current']({proxy:proxy}); SimpleTest.is(connection.proxy(), proxy, "the connection uses the specified proxy, when present"); }); deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'login_test': function () { var deferredResult; var connection; var proxy; proxy = new Clipperz.PM.Proxy.Test({shouldPayTolls:false, shouldCheckExpectedRequests:true}); connection = new Clipperz.PM.Connection.communicationProtocol.versions['current']({ proxy: proxy, getCredentialsFunction: function() { return {username:'joe', password:'clipperz'}; } }); deferredResult = new Clipperz.Async.Deferred("login_tests", {trace:false}); deferredResult.addMethod(proxy.dataStore(), 'setupWithEncryptedData', testData['joe_clipperz_offline_copy_data']); deferredResult.addCallback(function() { proxy.expectedRequests().unshift({ name: "First handshake step", functionName: 'handshake', parameters: { parameters: { message: MochiKit.Base.partial(MochiKit.Base.operator.eq, "connect"), version: MochiKit.Base.partial(MochiKit.Base.operator.eq, "0.2"), parameters: { C: MochiKit.Base.partial(MochiKit.Base.operator.eq, "f527cdd90d0d47f8524b4e165398ad1455eba515d04abd101d1e93b3c6ae0674"), A: MochiKit.Base.operator.truth } } } }); }); deferredResult.addCallback(function() { proxy.expectedRequests().unshift({ name: "Second handshake step", functionName: 'handshake', parameters: { parameters: { message: MochiKit.Base.partial(MochiKit.Base.operator.eq, "credentialCheck"), version: MochiKit.Base.partial(MochiKit.Base.operator.eq, "0.2"), parameters: { M1: MochiKit.Base.operator.truth } } } }); }); deferredResult.addMethod(connection, 'login'/*, 'joe', 'clipperz'*/); diff --git a/frontend/gamma/tests/tests/Clipperz/PM/Crypto.html b/frontend/gamma/tests/tests/Clipperz/PM/Crypto.html index 044658e..67627f8 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/Crypto.html +++ b/frontend/gamma/tests/tests/Clipperz/PM/Crypto.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <title>Clipperz.PM.Crypto - TEST</title> <script> jslog_config_enabled = true; clipperz_profiling_enabled = true; </script> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/DOM.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Profile.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Connection.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Crypto.js'></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.Async.js"></script> <!-- <script> MochiKit.DOM.addLoadEvent(MochiKit.Base.partial(MochiKit.LoggingPane.createLoggingPane, true)); MochiKit.Logging.logger.useNativeConsole = true; </script> --> </head> <body> <pre id="test"> <script type="text/javascript"> Clipperz_PM_Crypt_test = function() { var key; var plainData; var encryptedData; var decryptedData; var result; var expectedResult; var plainText; var longPlainText; key = 'trustno1'; plainText = "Lorem ipsum dolor sit amet"; longPlainText = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec nunc sapien, condimentum vitae, varius vel, pharetra in, augue. Mauris quam magna, pretium sit amet, accumsan id, volutpat lobortis, nibh. Fusce sagittis. Aenean justo. Curabitur euismod pede. Morbi at ante. Proin nisl leo, ultrices sed, facilisis et, nonummy sit amet, lorem. Praesent mauris tellus, pulvinar sed, nonummy vitae, rhoncus non, nunc. Proin placerat malesuada nisl. Nunc id enim. Maecenas commodo enim ac nibh. Sed condimentum, urna sit amet euismod gravida, mi urna varius odio, luctus pretium lectus justo nec felis. Ut in augue et est malesuada rhoncus. Sed vel orci. Mauris suscipit. Praesent cursus velit non turpis. Donec tristique dolor ac est. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla est sapien, vulputate eget, bibendum id, pharetra nec, mauris. Aliquam faucibus tincidunt dui. Proin iaculis. Maecenas sagittis. Integer et augue. Donec vitae urna in orci aliquet commodo. Vestibulum lorem sem, suscipit ac, placerat nec, mollis in, felis. Donec laoreet odio a mauris. Integer rutrum, sapien id varius molestie, mauris odio egestas orci, non bibendum sem felis in metus. Phasellus consectetuer lectus adipiscing mauris. Ut magna tellus, euismod ac, suscipit tincidunt, ullamcorper adipiscing, massa. Etiam orci. Phasellus a urna. Cras neque quam, laoreet at, tempus eget, euismod nec, nibh. Etiam hendrerit. Aenean vel lorem. Ut ligula lacus, congue eu, lobortis sit amet, venenatis in, magna. Nullam cursus felis quis est. Sed sem est, condimentum eu, vestibulum a, mattis vel, diam. Curabitur tincidunt pede quis pede. Sed neque diam, convallis vel, luctus at, porta id, nisl. Suspendisse potenti. Sed volutpat lobortis orci. Praesent mi. In interdum. Suspendisse suscipit ipsum eget dolor. Curabitur et tellus sed velit hendrerit varius. Cras sit amet est. Donec arcu nulla, vehicula et, pretium in, placerat id, felis. Integer mollis auctor lectus. Integer ultrices elementum sapien. Nam et erat. Nam pulvinar porta tortor. Nam at risus. Quisque nulla. Integer vestibulum, lacus id bibendum laoreet, ligula mi pharetra lorem, sit amet pharetra felis mauris quis justo. Aliquam ultricies. Duis a pede eget lorem dapibus rhoncus. Aenean eu elit non libero consectetuer viverra. Maecenas velit mi, eleifend vel, malesuada vel, condimentum quis, odio. Mauris tempus augue sed turpis. Pellentesque condimentum, lacus vitae pellentesque ultricies, risus tellus posuere nisi, et dictum turpis pede nec elit. Sed eu lectus eu justo sagittis euismod. Vestibulum lobortis, urna id mollis rhoncus, orci quam euismod ligula, at malesuada lacus magna vitae massa. Phasellus mattis fermentum velit. Nulla vulputate consequat enim. Maecenas quis neque. Curabitur sagittis facilisis neque. In elementum, eros non porttitor rhoncus, libero turpis sodales odio, vitae porta tellus purus et ante. Nullam molestie sollicitudin metus. Donec a elit. Morbi ut lacus. Donec at arcu. Quisque velit diam, interdum a, lacinia at, varius et, odio. Cras neque magna, ornare id, sollicitudin id, consequat a, est. Phasellus vestibulum est at leo. Nam facilisis, nulla dapibus condimentum pellentesque, est magna viverra ligula, at sollicitudin urna augue ut sapien. Fusce justo."; // // hashing // plainData = new Clipperz.ByteArray(plainText); result = Clipperz.PM.Crypto.encryptingFunctions.versions['0.1'].hash(plainData); is(result.length(), (256/8), "encryptingFunctions.versions[0.1].hash generate a 256 bit signature with a short text"); result = Clipperz.PM.Crypto.encryptingFunctions.versions['0.2'].hash(plainData); is(result.length(), (256/8), "encryptingFunctions.versions[0.2].hash generate a 256 bit signature with a short text"); plainData = new Clipperz.ByteArray(longPlainText); result = Clipperz.PM.Crypto.encryptingFunctions.versions['0.1'].hash(plainData); is(result.length(), (256/8), "encryptingFunctions.versions[0.1].hash generate a 256 bit signature with a long text"); result = Clipperz.PM.Crypto.encryptingFunctions.versions['0.2'].hash(plainData); is(result.length(), (256/8), "encryptingFunctions.versions[0.2].hash generate a 256 bit signature with a long text"); // // encrypting / decripting // plainData = plainText; diff --git a/frontend/gamma/tests/tests/Clipperz/PM/Crypto_performanceEvaluation.html b/frontend/gamma/tests/tests/Clipperz/PM/Crypto_performanceEvaluation.html index e8ce0bc..5529121 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/Crypto_performanceEvaluation.html +++ b/frontend/gamma/tests/tests/Clipperz/PM/Crypto_performanceEvaluation.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <title>Clipperz.PM.Crypt - Performance evaluation - TEST</title> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Connection.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Crypto.js'></script> <!--< script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES_other_implementation.js'>< /script> --> </head> <body> <pre id="test"> <script type="text/javascript"> try { var key; var shortText; var longText; var veryLongText; var byteArray; var plainText; var encryptedText; var decryptedText; var startTime, endTime; var startTime1, endTime1; var ClipperzCryptoVersion; var i,c; ClipperzCryptoVersion = '0.3'; Clipperz.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); key = 'trustno1'; shortText = "Lorem ipsum dolor sit amet"; longText = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec nunc sapien, condimentum vitae, varius vel, pharetra in, augue. Mauris quam magna, pretium sit amet, accumsan id, volutpat lobortis, nibh. Fusce sagittis. Aenean justo. Curabitur euismod pede. Morbi at ante. Proin nisl leo, ultrices sed, facilisis et, nonummy sit amet, lorem. Praesent mauris tellus, pulvinar sed, nonummy vitae, rhoncus non, nunc. Proin placerat malesuada nisl. Nunc id enim. Maecenas commodo enim ac nibh. Sed condimentum, urna sit amet euismod gravida, mi urna varius odio, luctus pretium lectus justo nec felis. Ut in augue et est malesuada rhoncus. Sed vel orci. Mauris suscipit. Praesent cursus velit non turpis. Donec tristique dolor ac est. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla est sapien, vulputate eget, bibendum id, pharetra nec, mauris. Aliquam faucibus tincidunt dui. Proin iaculis. Maecenas sagittis. Integer et augue. Donec vitae urna in orci aliquet commodo. Vestibulum lorem sem, suscipit ac, placerat nec, mollis in, felis. Donec laoreet odio a mauris. Integer rutrum, sapien id varius molestie, mauris odio egestas orci, non bibendum sem felis in metus. Phasellus consectetuer lectus adipiscing mauris. Ut magna tellus, euismod ac, suscipit tincidunt, ullamcorper adipiscing, massa. Etiam orci. Phasellus a urna. Cras neque quam, laoreet at, tempus eget, euismod nec, nibh. Etiam hendrerit. Aenean vel lorem. Ut ligula lacus, congue eu, lobortis sit amet, venenatis in, magna. Nullam cursus felis quis est. Sed sem est, condimentum eu, vestibulum a, mattis vel, diam. Curabitur tincidunt pede quis pede. Sed neque diam, convallis vel, luctus at, porta id, nisl. Suspendisse potenti. Sed volutpat lobortis orci. Praesent mi. In interdum. Suspendisse suscipit ipsum eget dolor. Curabitur et tellus sed velit hendrerit varius. Cras sit amet est. Donec arcu nulla, vehicula et, pretium in, placerat id, felis. Integer mollis auctor lectus. Integer ultrices elementum sapien. Nam et erat. Nam pulvinar porta tortor. Nam at risus. Quisque nulla. Integer vestibulum, lacus id bibendum laoreet, ligula mi pharetra lorem, sit amet pharetra felis mauris quis justo. Aliquam ultricies. Duis a pede eget lorem dapibus rhoncus. Aenean eu elit non libero consectetuer viverra. Maecenas velit mi, eleifend vel, malesuada vel, condimentum quis, odio. Mauris tempus augue sed turpis. Pellentesque condimentum, lacus vitae pellentesque ultricies, risus tellus posuere nisi, et dictum turpis pede nec elit. Sed eu lectus eu justo sagittis euismod. Vestibulum lobortis, urna id mollis rhoncus, orci quam euismod ligula, at malesuada lacus magna vitae massa. Phasellus mattis fermentum velit. Nulla vulputate consequat enim. Maecenas quis neque. Curabitur sagittis facilisis neque. In elementum, eros non porttitor rhoncus, libero turpis sodales odio, vitae porta tellus purus et ante. Nullam molestie sollicitudin metus. Donec a elit. Morbi ut lacus. Donec at arcu. Quisque velit diam, interdum a, lacinia at, varius et, odio. Cras neque magna, ornare id, sollicitudin id, consequat a, est. Phasellus vestibulum est at leo. Nam facilisis, nulla dapibus condimentum pellentesque, est magna viverra ligula, at sollicitudin urna augue ut sapien. Fusce justo."; veryLongText = ""; c = 100; for (i=0; i<100; i++) { veryLongText += longText; } nonce = new Clipperz.ByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); //-------------------------------------------------------------- // // longText encryption performance // //-------------------------------------------------------------- plainText = longText; startTime = new Date(); encryptedText = Clipperz.PM.Crypto.encryptingFunctions.versions[ClipperzCryptoVersion].encrypt(key, plainText, nonce); endTime = new Date(); //console.log("[1] encryption time: " + (endTime - startTime)); is((endTime - startTime < 350), true, "[1] Need to improve some more (" + (endTime - startTime) + ")"); is(encryptedText, "AAAAAAAAAAAAAAAAAAAAAOpomXumvlZ1SxHJuJxGPrSK4R7cmkF1cGVGaq0m9nlp6CvZMiV2OKXa714uyy1uvU/2fkYs1weBw76FIdfSLn3i7FtRP1HGH3TCK2BetLMJ3oS+vmYm7XVxpoT6zlOsHDqm8nZL8ubGafCC0Q+EV/YYbABu9kwxP6q3QPywBNJxtEBs5B7jtNdLUNWdFRDv6ciaUHWAtfIw4LUQFN0hZucRFbTu61KewtzMXyEek0VPg7nZZRrxI1YNODkwvysBVVbj/VQmTfnBvhBUF3896ZDRqDKh0iCJwA4AlSgbBtBofl4jMu4Yepw9vqHdPYyLJBTFUEYBjPQjE36wQfqYItGLUMfVko9SLjVEUYIW9opUFSSP0LBnH0DnMzOZDwPcSgrLqiqFATBeDsd0EJZTSPdTGLmJbMTdbx3tVC0tndcmbeZJIs7LoCNm9GXtOJqbxwTZ5cOBqOqbk+3AT1/2yiFqqSQxXMzoYNrJCA7UNlwn4VdOu3N5/jx280MT/sQ8uTt8XeffDpfCuFvDYduU6iUk8wl8thv98zCx3WQd2XDPjx9XTxTB3G3aQW9S1YzRXFlOfYmKfCYm90u+OFa2GRC3Bflyn2nbrFa1bJ8v1Zl2xZO4gzcbR+p/2ZkLg0lXWkP7wNhtBy2TW4Xre/WPYgIOA1jDYTrqmNKNHjDiYmV54T41AAxn7zvL1E34d2EGa6ybo98MiMkEt6mSkqBXkhQ3GzCqO979ua2TbetYvOd9upa/jF8E/cvtvRgrqvrMC2oMR0quWOyCE75ToG689RUnpNsflvowxUpurhZEtUuMFguC7LLvN0GYOO+BojA+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DL2+JQpKPSvXNtPHOWCemAA167H6IPEup2CFAl8Z4biHswM5u8SeulNGh+qTw5OE7/jOgvFfLrPktgzw6sBROvvRl8UHkVt+v+A9tOE6PJXj1Eh22tHfYOxQGB0NnKXtN2kRGjAJbMaGCOiF+6JjdjWWQXFk4tCGZjCanuV1rmFOJoiy/mJydg5xQTQoQrN87k7gqh6TCPzFLqleyblMVzMH9JYIjrfnx3ORdrk/FICvrLUmp4GBE9dxL0EAZsff6WEFVrPqvxFbRkcRnuj19z/zlRI0nHTmLdqwY2D9NbGETHCdAQgqh4FIK6vaYP4icqM=", "encrypted text"); decryptedText = Clipperz.PM.Crypto.encryptingFunctions.versions[ClipperzCryptoVersion].decrypt(key, encryptedText); is(decryptedText, plainText, "encrypt <-> decrypt works (specifying the nonce)"); startTime = new Date(); encryptedText = Clipperz.PM.Crypto.encryptingFunctions.versions[ClipperzCryptoVersion].encrypt(key, plainText); endTime = new Date(); //console.log("[2] encryption time: " + (endTime - startTime)); is((endTime - startTime < 350), true, "[2] Need to improve some more (" + (endTime - startTime) + ")"); decryptedText = Clipperz.PM.Crypto.encryptingFunctions.versions[ClipperzCryptoVersion].decrypt(key, encryptedText); is(decryptedText, plainText, "encrypt <-> decrypt works"); //-------------------------------------------------------------- // // veryLongText encryption performance // //-------------------------------------------------------------- /* diff --git a/frontend/gamma/tests/tests/Clipperz/PM/Crypto_test.html b/frontend/gamma/tests/tests/Clipperz/PM/Crypto_test.html index dc01dae..d4750f5 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/Crypto_test.html +++ b/frontend/gamma/tests/tests/Clipperz/PM/Crypto_test.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <title>Clipperz.PM.Crypto - TEST</title> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/DOM.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Connection.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Crypto.js'></script> <!-- ================================================================================ --> <script> //MochiKit.DOM.addLoadEvent(MochiKit.Base.partial(MochiKit.LoggingPane.createLoggingPane, true)); //MochiKit.Logging.logger.useNativeConsole = true; //----------------------------------------------------------------------------- encodePassword = function (anEvent) { var username; var password; var encodedPassword; var srpConnection; anEvent.stop(); srpConnection = new Clipperz.PM.Connection.SRP['1.1'](); username = MochiKit.DOM.getElement('username').value; passphrase = MochiKit.DOM.getElement('passphrase').value; encodedPassword = srpConnection.normalizedCredentials({'username':username , 'password':passphrase })['password']; MochiKit.DOM.getElement('encodedPassword').value = encodedPassword; } //----------------------------------------------------------------------------- decryptData = function (anEvent) { var deferredResult; var key; var version; var value; key = MochiKit.DOM.getElement('key').value; version = MochiKit.DOM.getElement('version').value; value = MochiKit.DOM.getElement('encryptedText').value; anEvent.stop(); deferredResult = new Clipperz.Async.Deferred("Decrypted data", {trace:false}); deferredResult.addCallback(Clipperz.PM.Crypto.deferredDecrypt, {key:key, version:version, value:value}); deferredResult.addCallback(Clipperz.Base.serializeJSON); deferredResult.addCallback(function (aValue) { MochiKit.DOM.getElement('decryptedText').value = aValue; }); deferredResult.addErrback(alert); deferredResult.callback(); } //----------------------------------------------------------------------------- encryptData = function (anEvent) { var deferredResult; var key; var version; var value; key = MochiKit.DOM.getElement('key').value; version = MochiKit.DOM.getElement('version').value; value = Clipperz.Base.evalJSON(MochiKit.DOM.getElement('decryptedText').value); anEvent.stop(); deferredResult = new Clipperz.Async.Deferred("Encrypted data", {trace:false}); deferredResult.addCallback(Clipperz.PM.Crypto.deferredEncrypt, {key:key, version:version, value:value}); deferredResult.addCallback(function (aValue) { diff --git a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/DirectLogin.html b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/DirectLogin.html index 0a5bcfb..73b8225 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/DirectLogin.html +++ b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/DirectLogin.html @@ -1,100 +1,98 @@ <!-- -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/. --> <html> <head> <title>Clipperz.PM.DataModel.DirectLogin - test</title> <script type="text/javascript" src="../../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Date.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Signal.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Toll.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Proxy.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Proxy/Proxy.Offline.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Proxy/Proxy.Test.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Connection.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Crypto.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Strings.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Strings/Strings_en-US.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Date.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/EncryptedRemoteObject.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/Record.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/Record.Version.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/Record.Version.Field.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/DirectLogin.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/DirectLoginInput.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/DirectLoginBinding.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/User.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/User.Header.Legacy.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/User.Header.RecordIndex.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/User.Header.Preferences.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/User.Header.OneTimePasswords.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/OneTimePassword.js'></script> <script type="text/javascript" src="../../../../SimpleTest/SimpleTest.Async.js"></script> <script> Clipperz_IEisBroken = false; </script> <!--[if IE]><script> Clipperz_IEisBroken = true; Clipperz_normalizedNewLine = '\x0d\x0a'; </script><![endif]--> </head> <body> <pre id="test"> <script> Clipperz.PM.Strings.Languages.setSelectedLanguage('en-us'); </script> <script type="text/javascript" src="User.data.js"></script> <script type="text/javascript" src="User.data.old.js"></script> <script type="text/javascript" src="DirectLogin.test.js"></script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/DirectLogin.test.js b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/DirectLogin.test.js index 7df0971..11009f5 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/DirectLogin.test.js +++ b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/DirectLogin.test.js @@ -1,118 +1,116 @@ /* -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.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); var tests = { /* user = new Clipperz.PM.DataModel.User({username:'test', getPassphraseFunction:function () { return 'test';}}); ... deferredResult.addMethod(proxy.dataStore(), 'setupWithEncryptedData', testData['test_test_offline_copy_data']); deferredResult.addMethod(user, 'getRecord', '8280842f41162b673335b63860637e8472e8bbff0efa2bc78b0dbc5e09712e13'); user = new Clipperz.PM.DataModel.User({username:'joe', getPassphraseFunction:function () { return 'clipperz';}}); ... deferredResult.addMethod(proxy.dataStore(), 'setupWithEncryptedData', testData['joe_clipperz_offline_copy_data']); deferredResult.addMethod(user, 'getRecord', '5cdac63b317f3942da38f3a3de3b7f0e5d6678200951c6216230295550f63fb4'); // WEB PASSWORD (0) deferredResult.addMethod(user, 'getRecord', '36ec1a41118813ced3553534fa2607d781cba687768db305beed368a8e06e113'); // DIGG (1) deferredResult.addMethod(user, 'getRecord', 'c0ce9130ca365bb02418d4305ea1d29e49c3f0e96d44b9d3cb6b4b6843d25065'); // SAP (2) deferredResult.addMethod(user, 'getRecord', 'd5f700b9c3367c39551ea49e00a9ab20dae09dd79d46047b983fc7c4bfaa050d'); // YAHOO (4) DirectLogin references - dba0db679802f0e6aa6d0b7a6aaf42350aabc5f057409edd99a268a92ebb6496 // Yahoo! Mail - aa18149164302d5dbe7e2d3724565b9550e00887b49978559783b2e38c625584 // (Yahoo! Groups) - 6f7bbc4e42ea462b5246e6f51c3f86056bec50601ce2de6067c8c1d26f21c07f // (Flickr) - a7b32e72502804bf2946a2a8856139cbbb759c5777e6b3e673db1fdf7e3bd06e // (My Yahoo!) */ //------------------------------------------------------------------------- 'editDirectLoginLabel_test': function (someTestArgs) { var deferredResult; var proxy; var user; proxy = new Clipperz.PM.Proxy.Test({shouldPayTolls:true, isDefault:true, readOnly:false}); user = new Clipperz.PM.DataModel.User({username:'joe', getPassphraseFunction:function () { return 'clipperz';}}); deferredResult = new Clipperz.Async.Deferred("editDirectLoginLabel_test", someTestArgs); deferredResult.addMethod(proxy.dataStore(), 'setupWithEncryptedData', testData['joe_clipperz_offline_copy_data']); deferredResult.addMethod(user, 'login'); deferredResult.addMethod(user, 'getRecord', 'd5f700b9c3367c39551ea49e00a9ab20dae09dd79d46047b983fc7c4bfaa050d'); // YAHOO (4) deferredResult.addMethodcaller('directLogins'); deferredResult.addCallback(MochiKit.Base.itemgetter('dba0db679802f0e6aa6d0b7a6aaf42350aabc5f057409edd99a268a92ebb6496')); deferredResult.addCallback(function (aDirectLogin) { var innerDeferredResult; var updatedLabel; updatedLabel = "updated Yahoo! Mail label"; innerDeferredResult = new Clipperz.Async.Deferred("editDirectLoginLabel_test <inner>", someTestArgs); innerDeferredResult.addMethod(aDirectLogin, 'label'); innerDeferredResult.addTest("Yahoo! Mail", "The label of the selected direct login is correct."); innerDeferredResult.addMethod(aDirectLogin, 'setLabel', updatedLabel); innerDeferredResult.addMethod(aDirectLogin, 'label'); innerDeferredResult.addTest(updatedLabel, "The DirectLogin returns the correct label even before committing data."); innerDeferredResult.addMethod(user, 'hasPendingChanges'); innerDeferredResult.addTest(true, "When changing the label of a DirectLogin, the user should report pending changes."); //innerDeferredResult.addCallback(function () { console.log("+_+_+_+_+_+_+_+_+_+_+_+ >>>")}); innerDeferredResult.addMethod(user, 'saveChanges'); //innerDeferredResult.addCallback(function () { console.log("+_+_+_+_+_+_+_+_+_+_+_+ <<<")}); innerDeferredResult.addMethod(user, 'hasPendingChanges'); innerDeferredResult.addTest(false, "After saving changes there should be no pending changes left."); innerDeferredResult.addMethod(aDirectLogin, 'label'); innerDeferredResult.addTest(updatedLabel, "The DirectLogin returns the correct label even after committing data."); innerDeferredResult.callback(); return innerDeferredResult; }) deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'editDirectLoginLabel_thanResetItToThePreviousValue_test': function (someTestArgs) { var deferredResult; var proxy; var user; proxy = new Clipperz.PM.Proxy.Test({shouldPayTolls:true, isDefault:true, readOnly:false}); user = new Clipperz.PM.DataModel.User({username:'joe', getPassphraseFunction:function () { return 'clipperz';}}); deferredResult = new Clipperz.Async.Deferred("editDirectLoginLabel_thanResetItToThePreviousValue_test", someTestArgs); deferredResult.addMethod(proxy.dataStore(), 'setupWithEncryptedData', testData['joe_clipperz_offline_copy_data']); deferredResult.addMethod(user, 'login'); deferredResult.addMethod(user, 'getRecord', 'd5f700b9c3367c39551ea49e00a9ab20dae09dd79d46047b983fc7c4bfaa050d'); // YAHOO (4) deferredResult.addMethodcaller('directLogins'); deferredResult.addCallback(MochiKit.Base.itemgetter('dba0db679802f0e6aa6d0b7a6aaf42350aabc5f057409edd99a268a92ebb6496')); deferredResult.addCallback(function (aDirectLogin) { diff --git a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/DirectLoginConfigurations.data.js b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/DirectLoginConfigurations.data.js index 1678515..eaf4035 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/DirectLoginConfigurations.data.js +++ b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/DirectLoginConfigurations.data.js @@ -1,30 +1,28 @@ /* -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/. */ directLoginConfigurations = { 'Yahoo! Mail': '{\n "page": {\n "title": "Yahoo! Mail"\n },\n "form": {\n "attributes": {\n "action": "https://login.yahoo.com/config/login?",\n "method": "post"\n },\n "inputs": [\n {\n "type": "hidden",\n "name": ".tries",\n "value": "1"\n },\n {\n "type": "hidden",\n "name": ".src",\n "value": "ym"\n },\n {\n "type": "hidden",\n "name": ".md5",\n "value": ""\n },\n {\n "type": "hidden",\n "name": ".hash",\n "value": ""\n },\n {\n "type": "hidden",\n "name": ".js",\n "value": ""\n },\n {\n "type": "hidden",\n "name": ".last",\n "value": ""\n },\n {\n "type": "hidden",\n "name": "promo",\n "value": ""\n },\n {\n "type": "hidden",\n "name": ".intl",\n "value": "us"\n },\n {\n "type": "hidden",\n "name": ".bypass",\n "value": ""\n },\n {\n "type": "hidden",\n "name": ".partner",\n "value": ""\n },\n {\n "type": "hidden",\n "name": ".u",\n "value": "5gp62cl2vg3ov"\n },\n {\n "type": "hidden",\n "name": ".v",\n "value": "0"\n },\n {\n "type": "hidden",\n "name": ".challenge",\n "value": "iBEY0IK6k3t9Uals32mrTos8s48p"\n },\n {\n "type": "hidden",\n "name": ".yplus",\n "value": ""\n },\n {\n "type": "hidden",\n "name": ".emailCode",\n "value": ""\n },\n {\n "type": "hidden",\n "name": "pkg",\n "value": ""\n },\n {\n "type": "hidden",\n "name": "stepid",\n "value": ""\n },\n {\n "type": "hidden",\n "name": ".ev",\n "value": ""\n },\n {\n "type": "hidden",\n "name": "hasMsgr",\n "value": "0"\n },\n {\n "type": "hidden",\n "name": ".chkP",\n "value": "Y"\n },\n {\n "type": "hidden",\n "name": ".done",\n "value": "http://mail.yahoo.com"\n },\n {\n "type": "hidden",\n "name": ".pd",\n "value": "ym_ver%3d0%26c="\n },\n {\n "type": "text",\n "name": "login",\n "value": ""\n },\n {\n "type": "password",\n "name": "passwd",\n "value": ""\n },\n {\n "type": "checkbox",\n "name": ".persistent",\n "value": "y"\n },\n {\n "type": "submit",\n "name": ".save",\n "value": "Sign In"\n }\n ]\n },\n "version": "0.2"\n}', 'Parallels': '{"page": {"title": "Parallels Account"},\n"form": {"attributes": {"action": "https://www.parallels.com/account/",\n"method": "post"},\n"inputs": [{"type": "text",\n"name": "Email",\n"value": ""},\n{"type": "password",\n"name": "Password",\n"value": ""}]},\n"version": "0.2.3"}', __syntaxFix__: "syntax fix" };
\ No newline at end of file diff --git a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/EncryptedRemoteObject.html b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/EncryptedRemoteObject.html index 3297ab4..a711ba9 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/EncryptedRemoteObject.html +++ b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/EncryptedRemoteObject.html @@ -1,63 +1,61 @@ <!-- -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/. --> <html> <head> <title>Clipperz.PM.DataModel.EncryptedRemoteObject - test</title> <script type="text/javascript" src="../../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Signal.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Proxy.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Connection.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Crypto.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/EncryptedRemoteObject.js'></script> <script type="text/javascript" src="../../../../SimpleTest/SimpleTest.Async.js"></script> </head> <body> <pre id="test"> <script type="text/javascript" src="EncryptedRemoteObject.test.js"></script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/EncryptedRemoteObject.test.js b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/EncryptedRemoteObject.test.js index 9c50c43..c5f0e00 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/EncryptedRemoteObject.test.js +++ b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/EncryptedRemoteObject.test.js @@ -1,118 +1,116 @@ /* -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.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); var tests = { //------------------------------------------------------------------------- 'simple_tests': function(someTestArgs) { var deferredResult; var encryptedRemoteObject; var key; var version; var rawData; key = "just a random key"; version = Clipperz.PM.Crypto.encryptingFunctions.currentVersion; rawData = "just a random text to encrypt"; encryptedRemoteObject = new Clipperz.PM.DataModel.EncryptedRemoteObject({ 'retrieveKeyFunction': MochiKit.Base.noop, 'retrieveRemoteDataFunction': function () { return "--"}, 'encryptedDataKeypath': '--', 'encryptedVersionKeypath': '--' }); SimpleTest.ok(encryptedRemoteObject != null, "create an encryptedRemoteObject"); deferredResult = Clipperz.Async.callbacks("EncryptedRemoteObject.test - simple_tests", [ MochiKit.Base.method(encryptedRemoteObject, 'getRemoteData'), function(aResult) { SimpleTest.is(aResult, "--", "setting and getting serverData works"); } ], someTestArgs); return deferredResult; }, //------------------------------------------------------------------------- 'decrypt_test': function (someTestArgs) { var deferredResult; var encryptedRemoteObject; var key; var version; var rawData; key = "just a random key"; version = Clipperz.PM.Crypto.encryptingFunctions.currentVersion; rawData = "just a random text to encrypt"; encryptedRemoteObject = new Clipperz.PM.DataModel.EncryptedRemoteObject({ 'retrieveKeyFunction': MochiKit.Base.partial(MochiKit.Async.succeed, key), 'retrieveRemoteDataFunction': MochiKit.Base.partial(Clipperz.Async.callbacks, "EncryptedRemoteObject.test - decrypt_test <encrypt data>", [ MochiKit.Base.partial(Clipperz.PM.Crypto.deferredEncrypt, {key:key, value:rawData, version:version}), function (someEncryptedData) { return { 'data': someEncryptedData, 'version': version } } ], someTestArgs)//, // 'encryptedDataKeypath': 'data', // 'encryptedVersionKeypath': 'version' }); deferredResult = new Clipperz.Async.Deferred("decrypt_test", someTestArgs); deferredResult.addMethod(encryptedRemoteObject, 'getDecryptedData'); deferredResult.addCallback(function (aResult) { SimpleTest.is(aResult, rawData, "encrypt and decrypt works"); }) deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'getValue_test': function (someTestArgs) { var deferredResult; var encryptedRemoteObject; var key; var version; var rawData; key = "just a random key"; version = Clipperz.PM.Crypto.encryptingFunctions.currentVersion; rawData = { key1: 'value1', key2: 'value2' }; encryptedRemoteObject = new Clipperz.PM.DataModel.EncryptedRemoteObject({ 'reference': "testReference", 'retrieveKeyFunction': MochiKit.Base.partial(MochiKit.Async.succeed, key), diff --git a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/OneTimePassword.html b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/OneTimePassword.html index 7861b80..949154b 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/OneTimePassword.html +++ b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/OneTimePassword.html @@ -1,102 +1,100 @@ <!-- -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/. --> <html> <head> <title>Clipperz.PM.DataModel.User - test</title> <script type="text/javascript" src="../../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Date.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Signal.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Toll.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Proxy.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Proxy/Proxy.Offline.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Proxy/Proxy.Test.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Connection.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Crypto.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/UI/Common/Controllers/DirectLoginRunner.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Strings.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Strings/Strings_en-US.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Date.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/EncryptedRemoteObject.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/Record.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/Record.Version.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/Record.Version.Field.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/DirectLogin.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/DirectLoginInput.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/DirectLoginBinding.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/DirectLoginFormValue.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/User.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/User.Header.Legacy.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/User.Header.RecordIndex.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/User.Header.Preferences.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/User.Header.OneTimePasswords.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/OneTimePassword.js'></script> <script type="text/javascript" src="../../../../SimpleTest/SimpleTest.Async.js"></script> <script> Clipperz_IEisBroken = false; </script> <!--[if IE]><script> Clipperz_IEisBroken = true; Clipperz_normalizedNewLine = '\x0d\x0a'; </script><![endif]--> </head> <body> <pre id="test"> <script> Clipperz.PM.Strings.Languages.setSelectedLanguage('en-us'); </script> <script type="text/javascript" src="User.data.js"></script> <script type="text/javascript" src="OneTimePassword.test.js"></script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/OneTimePassword.test.js b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/OneTimePassword.test.js index 85aae4e..835be38 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/OneTimePassword.test.js +++ b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/OneTimePassword.test.js @@ -1,118 +1,116 @@ /* -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.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); var tests = { //------------------------------------------------------------------------- 'isValidOneTimePasswordValue_test': function (someTestArgs) { var otp; var notOTP; otp = 'yaxx k7ww - f8y6 tqz5 - 58b6 th44 - 9cwv q0fg'; SimpleTest.is(Clipperz.PM.DataModel.OneTimePassword.isValidOneTimePasswordValue(otp), true, "isValidOneTimePasswordValue [expect true] - test 1"); notOTP = 'trustno1'; SimpleTest.is(Clipperz.PM.DataModel.OneTimePassword.isValidOneTimePasswordValue(notOTP), false, "isValidOneTimePasswordValue [expect false] - test 1"); return MochiKit.Async.succeed('done'); }, //------------------------------------------------------------------------- 'loginUsingOtp_test': function (someTestArgs) { var deferredResult; var proxy; var user, user2; var username; var passphrase; username = "test"; passphrase = "yaxx k7ww - f8y6 tqz5 - 58b6 th44 - 9cwv q0fg"; // OTP proxy = new Clipperz.PM.Proxy.Test({shouldPayTolls:true, isDefault:true, readOnly:false}); user = new Clipperz.PM.DataModel.User({username:username, getPassphraseFunction:function () { return passphrase;}}); user2 = new Clipperz.PM.DataModel.User({username:username, getPassphraseFunction:function () { return passphrase;}}); deferredResult = new Clipperz.Async.Deferred("loginUsingOtp_test", someTestArgs); deferredResult.addMethod(proxy.dataStore(), 'setupWithEncryptedData', testData['test_test_with_otps']); deferredResult.addMethod(user, 'login'); deferredResult.addMethod(user, 'getRecords'); deferredResult.addCallback(MochiKit.Base.itemgetter('length')); deferredResult.addTest(1, "This account has one single card"); deferredResult.addMethod(user, 'getOneTimePasswords'); deferredResult.addCallback(MochiKit.Base.itemgetter('length')); deferredResult.addTest(1, "This account has one OTP"); deferredResult.addMethod(user, 'getOneTimePasswords'); deferredResult.addCallback(MochiKit.Base.itemgetter(0)); deferredResult.addCallback(MochiKit.Base.methodcaller('status')); deferredResult.addTest('USED', "The available OTP has been unsed to login, and should be marked accordingly"); deferredResult.addMethod(user2, 'login'); deferredResult.shouldFail("trying to login using the same OTP twice"); deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'changePassphraseAndLoginUsingOtp_test': function (someTestArgs) { var deferredResult; var proxy; var user; var user2; var user3; var otp; otp = "yaxx k7ww - f8y6 tqz5 - 58b6 th44 - 9cwv q0fg"; // OTP newPassphrase = 'tset'; proxy = new Clipperz.PM.Proxy.Test({shouldPayTolls:true, isDefault:true, readOnly:false}); user = new Clipperz.PM.DataModel.User({username:'test', getPassphraseFunction:function () { return 'test';}}); user2 = new Clipperz.PM.DataModel.User({username:'test', getPassphraseFunction:function () { return otp;}}); deferredResult = new Clipperz.Async.Deferred("changePassphraseAndLoginUsingOtp_test", someTestArgs); deferredResult.addMethod(proxy.dataStore(), 'setupWithEncryptedData', testData['test_test_with_otps']); deferredResult.addMethod(user, 'login'); deferredResult.addMethod(user, 'getRecords'); deferredResult.addCallback(MochiKit.Base.itemgetter('length')); deferredResult.addTest(1, "This account has only a single card"); deferredResult.addMethod(user, 'changePassphrase', newPassphrase); deferredResult.addMethod(user, 'logout'); deferredResult.addMethod(user2, 'login'); deferredResult.addMethod(user2, 'getRecords'); deferredResult.addCallback(MochiKit.Base.itemgetter('length')); deferredResult.addTest(1, "This account has oly a single card"); diff --git a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/Record.html b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/Record.html index 3685a7a..0332008 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/Record.html +++ b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/Record.html @@ -1,95 +1,93 @@ <!-- -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/. --> <html> <head> <title>Clipperz.PM.DataModel.Record - test</title> <script type="text/javascript" src="../../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Date.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Signal.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Toll.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Strings.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Strings/Strings_en-US.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Date.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Proxy.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Proxy/Proxy.Offline.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Proxy/Proxy.Test.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Connection.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Crypto.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Strings.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Strings/Strings_en-US.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Date.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/EncryptedRemoteObject.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/Record.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/Record.Version.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/Record.Version.Field.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/DirectLogin.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/DirectLoginInput.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/DirectLoginBinding.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/DirectLoginFormValue.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/User.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/User.Header.Legacy.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/User.Header.RecordIndex.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/User.Header.Preferences.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/User.Header.OneTimePasswords.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/OneTimePassword.js'></script> <script type="text/javascript" src="../../../../SimpleTest/SimpleTest.Async.js"></script> </head> <body> <pre id="test"> <script> Clipperz.PM.Strings.Languages.setSelectedLanguage('en-us'); </script> <script type="text/javascript" src="DirectLoginConfigurations.data.js"></script> <script type="text/javascript" src="User.data.js"></script> <script type="text/javascript" src="Record.test.js"></script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/Record.test.js b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/Record.test.js index 667e2ae..3478743 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/Record.test.js +++ b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/Record.test.js @@ -1,118 +1,116 @@ /* -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.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); var tests = { //------------------------------------------------------------------------- 'recordUseOf_retrieveIndexDataFunction_and_getRemoteDataFunction_test': function (someTestArgs) { var deferredResult; var record; //console.log("#### new Clipperz.PM.DataModel.Record [5]"); record = new Clipperz.PM.DataModel.Record({ 'reference': '<<< record reference >>>', 'retrieveKeyFunction': MochiKit.Base.noop, 'retrieveRemoteDataFunction': function (aRecordReference) { SimpleTest.is(aRecordReference, '<<< record reference >>>', "Record correctly passes its record reference when asking for encrypted data"); return MochiKit.Async.succeed({ // fake server payload 'data': "#### fake encrypted data ####", 'version': "0.x", 'currentVersion': { 'reference': "<<< fake record version reference >>>", 'data': "#### fake encrypted data ####", 'version': "0.x" } }); }, 'updateDate': "Thu, 10 May 2007 13:01:21 UTC", // 'encryptedDataKeypath': 'data', // 'encryptedVersionKeypath': 'version', 'retrieveIndexDataFunction': function (aRecordReference) { SimpleTest.is(aRecordReference, '<<< record reference >>>', "Record correctly passes its record reference when asking for index data"); return MochiKit.Async.succeed({ key: '<< key >>', label: '<< label >>', notes: '<< notes >>' }); }, 'updateIndexDataFunction': MochiKit.Base.noop }); deferredResult = new Clipperz.Async.Deferred("recordUseOf_retrieveIndexDataFunction_and_getEncryptedDataFunction_test", someTestArgs); deferredResult.addMethod(record, 'label'); deferredResult.addTest('<< label >>', "Record returns the right value for label"); deferredResult.addMethod(record, 'notes'); deferredResult.addTest('<< notes >>', "Record returns the right value for notes - even the legacy one, stored on the header"); deferredResult.addMethod(record, 'getRemoteData'); deferredResult.addCallback(Clipperz.Async.Test.isDeeply({ 'data': "#### fake encrypted data ####", 'version': "0.x", 'currentVersion': { 'reference': "<<< fake record version reference >>>", 'data': "#### fake encrypted data ####", 'version': "0.x" } }, "Record returns the expected encrypted data")); deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'createRecordWithoutAllRequiredParameters_test': function (someTestArgs) { var record; try { //console.log("#### new Clipperz.PM.DataModel.Record [6]"); record = new Clipperz.PM.DataModel.Record({reference:'--'}); SimpleTest.ok(false, "creating a record without all parameters should raise an exception"); } catch(exception) { // SimpleTest.is(exception.name, "Clipperz.Base.exception.MandatoryParameter", "creating a record without all parameters raises an exception"); SimpleTest.ok(/Clipperz\.Base\.exception\.MandatoryParameter.*/.test(exception.name), "creating a record without all parameters raises an exception"); } }, //------------------------------------------------------------------------- 'recordFromOldData_version_0.1_test': function (someTestArgs) { var deferredResult; var proxy; var user; var recordID; //console.log("#### new Clipperz.PM.DataModel.Record [7]"); /* record = new Clipperz.PM.DataModel.Record({ 'reference': '05aad20ee399b11ddc923e601fcd1d096233634f2ad4c55db4f6435e5f9cc17a', 'retrieveKeyFunction': MochiKit.Base.partial(MochiKit.Async.succeed, 'e038652297f981d5ca917d88fa2c4c3251a12c0fa41bf7313a4d24a9738fe6c6'), 'retrieveRemoteDataFunction': MochiKit.Base.partial(MochiKit.Async.succeed, { 'data': '4ec19a7093534e7dcf7c796b889283c6cec224b1895720ba3ff43ce091dc72c61fd5ea56def418ba3f15239f73228c6c8558585311f5e6673efe57482a1f9c9fe71e921576989eace671ec543685e3ad8f976bbfa4c2dbc629fab936c227d4fd4da3a1561ea79e553bae7b758ff91762572c1448a2d18bec797e12721238ef5ba18ddf1fba8ae773a8debe1040b3b158220aec6be9c7190687139f589a30d9c8887792fd7040e3c7cf3f9999fb9dde1f9f334d17c996996d538a7e374ac93135acafdaf5fce738a1702182897b63d2cb8e308b94156473cba63dcc557d17dcbdb55fcff63d9ba5edf68c42855052e34207d6fabe94fe024c3db616b45f494da42c62224d3897e320080072cc442d4212e7b1e8d5b3d9e3c25d48f4e7c37112ef4c6b2c0c8aff0bd3ce05694370e4378701463dde26c7c0322f8a9eb5a724106039b16b35050a9a9b5717b2eec803efa962b88b9655742f5e7b180ea567449671fb5a2ce563d8b47bc25705821938192eae420391c208182a788dd06fb6448b9858a4104a14efd7717671c65cd08fd979a4da7c01712bc5d4e949a10ef1ea65caf1f07cee34b063bab01bfb7a59047fef30c3059ea652f1c92b9e72aac515ac8851756703772e1fa05384ee7f0d5c7a3c', 'version': '0.1', 'currentVersion': { 'reference': '05aad20ee399b11ddc923e601fcd1d096233634f2ad4c55db4f6435e5f9cc17a', 'data': '4ec19a7093534e7dcf7c796b889283c6cec224b1895720ba3ff43ce091dc72c61fd5ea56def418ba3f15239f73228c6c8558585311f5e6673efe57482a1f9c9fe71e921576989eace671ec543685e3ad8f976bbfa4c2dbc629fab936c227d4fd4da3a1561ea79e553bae7b758ff91762572c1448a2d18bec797e12721238ef5ba18ddf1fba8ae773a8debe1040b3b158220aec6be9c7190687139f589a30d9c8887792fd7040e3c7cf3f9999fb9dde1f9f334d17c996996d538a7e374ac93135acafdaf5fce738a1702182897b63d2cb8e308b94156473cba63dcc557d17dcbdb55fcff63d9ba5edf68c42855052e34207d6fabe94fe024c3db616b45f494da42c62224d3897e320080072cc442d4212e7b1e8d5b3d9e3c25d48f4e7c37112ef4c6b2c0c8aff0bd3ce05694370e4378701463dde26c7c0322f8a9eb5a724106039b16b35050a9a9b5717b2eec803efa962b88b9655742f5e7b180ea567449671fb5a2ce563d8b47bc25705821938192eae420391c208182a788dd06fb6448b9858a4104a14efd7717671c65cd08fd979a4da7c01712bc5d4e949a10ef1ea65caf1f07cee34b063bab01bfb7a59047fef30c3059ea652f1c92b9e72aac515ac8851756703772e1fa05384ee7f0d5c7a3c', 'version': '0.1' } }), diff --git a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/User.data.js b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/User.data.js index 96c6962..1dc932a 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/User.data.js +++ b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/User.data.js @@ -1,118 +1,116 @@ /* -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/. */ testData = { //----------------------------------------------------------------------------- 'simpleLogin_001': function () { return { 'users': [ { 'username': "joe", 'passphrase': "eoj", 'version': "0.2", 'connectionVersion': "0.2", 'records': { 'record 1': { 'notes': "Some notes here", 'fields': [ { 'name': "username", 'value': "joe", 'type': "text" }, { 'name': "password", 'value': "1234", 'type': "password" } ], 'directLogins': { "record 1 direct login": { 'configuration': "", 'bindings': [ ], 'favicon': "http://www.example.com/favicon.ico" } } } }, 'otp': [ "12345678 90abcdef 12345678 90abcdef", "fedcba09 87654321 fedcba09 87654321" ] } ] };}(), //----------------------------------------------------------------------------- 'joe_clipperz_offline_copy_data': function () { return { users:{ 'catchAllUser': { __masterkey_test_value__: 'masterkey', s: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00', v: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00' }, 'f527cdd90d0d47f8524b4e165398ad1455eba515d04abd101d1e93b3c6ae0674': { s: '186f0c40bf73f2af236eaa6c429df225efa933050c9aae65240e93b7b362e3ee', v: 'ac61a6e325ecf329926a86084f591d8852d0ad3e4a6080f2adc901b82395ecaf', version: '0.2', maxNumberOfRecords: '100', userDetails: '{"records":{"index":{"eeda70e0392261967bda71c3764da78989c45bbd2bb7be6b941b90f81d9b81b5":"0","13a5e52976337ab210903cd04872588e1b21fb72bc183e91aa25c494b8138551":"1","062af892bcfba49ffcff05c56d99b7af2d508358e39c058c2e1fc83531436f80":"2","ca01bcb7691f70818feed46c9a2a91883ac543997a395535aedbb49de166690c":"3","507f38b06d587d8889698ae1ebbba7ef8f0539b82550dd25779fd9ee88fc0c7a":"4","d5f700b9c3367c39551ea49e00a9ab20dae09dd79d46047b983fc7c4bfaa050d":"5","de13c0d036234c44214062bc0a89e5f127470c464333493a485729f43cdc26e4":"6","d620764a656bfd4e1d3758500d5db72e460a0cf729d56ed1a7755b5725c50045":"7","f215d89bf4583c12f5ed4f4330f488dad3fffa448f4dc784f15ef135dda2c732":"8","36ec1a41118813ced3553534fa2607d781cba687768db305beed368a8e06e113":"9","fe21497ef7435d31f9746c132e4b5ecf5aac5f13b5961ddb55d2bdc3409f28f6":"10","6d45c2fec275b7482d41c76b20507100cfb6ab49922b876f9dd3040d361f4a18":"11","9dcd2a8a0fcb7e57d234dc4fea347f020a6a01793e40cf56a0d22379e590e291":"12","6c25be8e145efb26a1abd59590522f73fb2e3dbc139af2217074d9e2ba92c16a":"13","6026370f3db3860d2c46a08e389a7e906dc14f98c8444b21be9a7e9f405a2728":"14","8b18e8593b5bc2f7ea39a5fab222047034ef2f380fee05be0fa6e1c0972fea39":"15","084e23120544603f0297368fd3891a3818e0fe13488e2f2c6079913c8d1bed8d":"16","7bb69b6366a8012f181c01e368ba18d4f7a82bcabb4959189736ad124c4bbfbb":"17","5cdac63b317f3942da38f3a3de3b7f0e5d6678200951c6216230295550f63fb4":"18","c0ce9130ca365bb02418d4305ea1d29e49c3f0e96d44b9d3cb6b4b6843d25065":"19"},"data":"6tqzHY7/lB/JVfDi3iJ7BIJTiX1Fih//aTUF7IDoLdlnafC9hoIQ/5lGk+/Ezilw59n11ocPN31aOA9ddFGc9oa2vQ1BdymV8F91sWGLGyWft+PRCWOqxy7U1XxvbgyRbCs0mbtSLp/qlC6gewnAXJpH6KT9oURIjKkyaR8jJ7ng6IlfGUIL2KUFnAv6KNoWO5cdXDU0nrrdSYehcApmXYlTyreHDbrFlLJ2YuR9JLvw9bDxXi/xBY1wZgwiUsGVlG3j0e4f63mJVrpmPI1jhaXD3BQD8cbl96l1ImhYe1Boz53gLq94KSk+3bkjG4GRhvlDPtvk8vdSZPsYPsbC0Cu0M4TMS70nPX7qNj5LDvzrd+S+zDj1/CW0yctRThXstrxDyG/L75k/xdZcVbMzXQHQR4OwWWFiqGOnLpyiZIHGfV5+xZ1a1uxT9TPDoDdwPuE5P1Uwh3PeGc9jatk3waQN6fo3g8PQrCOtPn7C7b6y4MEjpAG4e53HFb0B/hEfK6ApycT6QAglsA3qF/tZyZbwNCwert4pG52rIG/PODZ1XxVZHFX8V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nn3bdsaIFK1+uldQXVUoHm7PgZidzOHpNXvNzgrL3c3gv7Et/s="},"directLogins":{"index":{"61e87fdc4f1d9112e3b30c1f6812d095dcdb24f014c83319091eb6c9899ec348":"0","989593d4c48929f0c8f1581aa96969c622807e99619ed4732026e967530a68ad":"1","9f7979368fa29f66c44bd97ecaf6c545abc800b1c7bb21b7655a68e1514c3906":"2","dba0db679802f0e6aa6d0b7a6aaf42350aabc5f057409edd99a268a92ebb6496":"3","aa18149164302d5dbe7e2d3724565b9550e00887b49978559783b2e38c625584":"4","1f9bfd677b531a03168d3f8bd8afabb5357244a7bc355dff50bd6c0a072114a6":"5","a48e38845713462ecc9f827149eeaae87da882031f98ef8ebbf9ee9537b63468":"6","6f7bbc4e42ea462b5246e6f51c3f86056bec50601ce2de6067c8c1d26f21c07f":"7","2df54059e78f5771f23bd285cce19595b38331b73d67020424d9a1b2257db09c":"8","065cd0c270e5e8ce50e4ea8e3828dccdae18c01ab030813d756a87d03fe68784":"9","ddbc8d01300a4f10631cbde09e1246332eade3a877a2205209f9eb9e5bc9da0b":"10","9b7a30e667afc9f76ba77600658b2c13bff52432d444261d39bf3d069a160afe":"11","9fd2929cde3d32d9cbc5f1d787f2f64729a5e12a14410556b31c0c099762c46a":"12","f695fc36ac56bead80c0d20a88e01e382819c18dc268f1679551b7c83db7cb14":"13","f22dc41ffabef4b3bc8f7af804fec975bd50718098322a673cbe4aaff9464ae1":"14","03251dc1cbc5398789e4c4b45c52cfac3fcd8c1a4f19a81fa68fc6feae31d55c":"15","a7b32e72502804bf2946a2a8856139cbbb759c5777e6b3e673db1fdf7e3bd06e":"16","cb9ae0bba1957075ccdbfd3b3481704d62087687a2ac7c411a4f07d444bde0f7":"17","7e1d069b7fa57c03bd7bf48807520feb953157834503aaff8c9d493f37dea69d":"18","24404059cabc63b2dbff0f42ba57183108b8189ef53ab62fa25141a1caea824b":"19","33cf9758477460a8056deef0295a1ebe65b39b392c361ceb920a83edacfe5d78":"20","e9a16316f330e3d150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vXvjw4C/WnYYceJy5R4KamIJueEGIHGp22/0DSF3H4ji3QoUDiFB/H+CA8A2q9LO9q0NYcf2P5q2MfdJGu4bd49g68mltj35pRnGQaafflXY9VmMfrlAbBYfUnsKOb3DOUpq8asveE41/6WkGcXFIuSABcbBf0cHIfBn41wRWQhoCm/JL8pfqEZC/paBdFBRW4FjKkxhbg4BPvBL0aQyGGkU8eH8tr8nm4YN1HMFF/s3s8+9FPoBxPuXLoGSg7Rvdz+g=="},"version":"0.1"}', statistics: 'SfGy/4mpXQdDOv+Bcfie4Yt/', userDetailsVersion: '0.3', records: { '062af892bcfba49ffcff05c56d99b7af2d508358e39c058c2e1fc83531436f80': { data: '7sgxSQlqR+wh3g06M2+sWp7raQxjjQ9jLIz2OcEB7SckuQcXNrhMlDCbL6ncSljtzgqhioWrOB409kIG8lc7h6ekghOE/Mhi7rVwAiRfNGB7r3mYxpEXRe96O2RG7E+NcSp8ezl+5gJ9D0o1abXPeFQYGcr95hUioCfyY+xrxY8TJVwdb9nHkYvBdKV7rCl1dTxgsKWK3nlo1T7e5uyiz5YUAE6BrCtTFAqtprLI/xOpRti9C+llohS7D6s8hkCBPZfp3chKFDrgpsCBFLhXN8jrBKSjHi1PJdRQzpJsgrxyeBj0dZx3gTsYOXqrYgdIzFUo7K1Tqb30yNprBiDMr7j0YYXiSvEb7OuOIP+HTXGN+yt09bk9LggyY6Fh0e+tenjQQ3soySN/XznOBpEjXbzXoz6fR1MXVnE9GgaX99LVNqwWfq2rIBdSE/FfspRiWP3BY5jIrEkNeRclS05U1zw3K3wxOL+cB9r2IynSXnK8QcrDNNRZ0W3PhsSFfByUXuviLSEOPuJa1mYP29L9Lj/WyHL1Gyl8xLbt2H41S6+wvIleKMuc7teH6wPXbnYphvbwBowoI6HZTEFkz3dQKhhY6VF/81iCXsuaz6BjyrzFX6SkQ4S3lN1tv4opQMJFvnmHb6EkXqVWfeIXzJIJO+owL4vDOf4okpAD+HPjjlVXhq6fvyM5UBIK9+tzJW78X/zifrQOfWRIhwjVsfUdZWmZ/S35vnHWNuXkM8GBYrDysqxanDtah3U8XLAiIhFtBOzpzr6qGaNDOKKgG3K8QXT4bYHOq1rQVUwzQuKhlCyStrRMQrC5Ry251xmLy6dKfppRarVeGDtzB/30BbtFNdZmzMNG2g+Jj5tFCrEtCMvMiQEWZHMU3tGMFxDef/KKdv1fFTJC16jmaUiCHUZmNjB3EO9R6xPVcMlAVKf57n3efrpRk/GTmm9JhAFkuF/wsveH4JjPpDUdkHYFu5tHbb30sbga3ufBAXbQL4ck10S24akU/cKraFGLvuKGaR2U0i6ih911TBSf3pAfZ3RFbBhVIl+6rSknC5+IXoBR7MRstBPW/xC9pQVjN5Qyn0g3aUjUSI+q4jcTuvMl32NtTJbWRMGhfkrpVzypZTyPnIh6XJkyBghlUARXw23MlbjiZxmY4ScDmcWZRZJWIknHlqjDKFDKNnwrfnEI9qWyMDno+jA/DEQz0mnpdZYEsoz1/qAmAeDt89vx', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 CET 2007', updateDate: 'Wed Mar 14 15:46:44 CET 2007', accessDate: 'Mon Jan 19 16:10:04 CET 2009', currentVersion: '4a70ca20167875a936d4540f19980e972c20f329a65d85e9b0ce709f1fc7c7e3', versions: { '4a70ca20167875a936d4540f19980e972c20f329a65d85e9b0ce709f1fc7c7e3': { header: '####', data: 'GCNNIhDQjMJQZGVSf+95fPtU6eOnFWVhuGm86r8WZGVR2Gf2EjbG1OJ0ZIGpZ/AXgirCMpo5AFxJe0Bay8IYg+xmBqMFhwFxzAgJBYCIts+raSaNRipuY8dTEqDxAqD1cChcG8EhSoiFgQ0fG0I7nNEUDJi0pIt4/ygBcwvAhuAenEp9ZW+oQA0+YysPQRqkz3IieFaOoSEbe5/SqpUilV4q1gTVyzNXvrxzxx+rlvEyGFgFN+vgtUZ1NrwlPk4gVksTpylvv6CFaMGEWKhgMG6efo0rJckKosaJTu1pldJdnmMK4EKNMLOd+jZ6pEhEhYyadrA4+zYU5TlmZA6ASzTaps8piSwZodoi9qY0ch2StK4mAbzeEGe2HdfHuAU9Tyq3Ppk3+VfNdKgpQfYrQOiSlXbKzK636tzXTN/gyrfOTHjBrRl117ywibgSX63ayAYNfcLpKotC', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 CET 2007', updateDate: 'Wed Mar 14 15:46:44 CET 2007', accessDate: 'Mon Jan 19 16:10:04 CET 2009' } } }, '084e23120544603f0297368fd3891a3818e0fe13488e2f2c6079913c8d1bed8d': { data: 'fGzBu1On7e/6rAoSB1a4fq/CkS8Be/T8UP5cQ93asBTWndSYu2lW4DQ4SXQXSindIi3OnNx/f6SNv/extb7OrMLREF92wXI045ipPwy+DIICb+cQNMJ82Sh4cXaIcAWcyrm+MYri3qq9LBKbpwkILcebZidJ86lmKYHJozUezmfbMcwNCljHs/gYkHVzVcuw9L52Ugc6wC7sjsshh+UH6i4/2Frlrophtx+b1vervNd8eoYiKnedHVXVfW7UJcQoF27eHFgzwYnGvRW0KNXFFhqmPb61TSkIvNdCCvBKDP4SXrWvGgzU89wipvWdUPpQ+fCT6Mp3hPRrbJxwMunmjujZOzBld/HkjnXoiNfBb5akA280WvdyzWYATrjV1ZFx8yQY8G0+lRt/MxjKDc38w4y+Rf5WeRbXboJMvFatwooHUggk6qSRmZVvgOmFmNuDRnRYIFzqK3JclhJeVasnqhR6RiGSowc1Ffr1HhcZCMnXpQABGBkZcHD/zw6YjHRyh9Plw7XAm0xb16HMDtiwt7WLJpxLH/HP99j/A2hvMGWiUiFCaYv7AzyEPTmYbN32D1IsAEE/GC3FG0HypGTBolP8wpAfTRdlvWpJz8oRRdwuLV3Pgpu+kXh5sQyeZI6tnuMPQFmRDcMN1oo3E5V5V585nVMnKTFcXhBzD4UnoV+DQNkG/+iSPybQzz/EZmucEqGEYyjI3kl4MAX8UMEUxE4JO0fF8MzyBI13nxknowAceEammx1dGVaJCoIOdhadaPVPyOzXM1Vp1erVm5k4TsxSx1pll+GOm6hVoNHIuQLDueaMEpRxMhfwc8cDyXURqRGPTgTc0bint5xVjo10fnpX1gcdc/AWL6y3tXM80NW+uFJ4GI7VzyzfcMRzTiRaGi19z8MIx8PbIVGh2sw4FhgGujNsPrpuESvUVT+17M0+v8oEoABNlcizTMFs/sA1uqlPumFASltzmViAzClOsDuCh069hFLjdk/Ex5jy4vPYlwOT8Uq9DJC9ZWuZgiI1DrhWN/8QGAEGxxbvnSZPNCQ9kpD5p+iabinLLWOAirVNgKwIRJRyAu/uR9xKd7J9Wxq8q/ii+y5lGilbo2g24wbDwrkXYVhqp/4J0g+p8Wv1NBjCTSCqV39WEizUCRHo3ee9HnQnBJQDOyTBRuz2odTJtJ5tLYjWXZRdFzFSJrEq+Z1z3oq7LnhZy3YWaFXPeKmBCemMthtNt0nL', version: '0.3', creationDate: 'Fri Oct 17 16:49:20 CEST 2008', updateDate: 'Mon Oct 27 08:58:49 CET 2008', accessDate: 'Mon Jan 19 16:09:39 CET 2009', currentVersion: '6fd60c5709a4808444f43f7bbd872363d76703957f613076538ba2f9161206ac', versions: { '0ae362285f103722abbd046eee2b7d10aeae6a1d05cbaf2081392ce9df882bcf': { header: '####', data: 'sG6TUmPSEPFpiJ5YdtghWHmHbvUK63tZCZ+Q5iz2ALas//jN+lZCBhZcjEwPEJskBkK2R0MyAh14wWGh2bBHMjsokgTe+L+x+0c/Zi0epE/IC9gtOBhsTe/hZ2e2xOGF/SbzET3DAAYXvxduZ36f7SvvFnrkkKvpj8wGSdTFcBmzqMb9DL2bRyRCLGLMzE3F1a0q5CufCIRz2TgHm+Uw+kfvvwC7ig/F/5iLW90Ypz3vmEtMEFYFHZ9a8Oh0rsXGfevbMhFqALoywzihQEe/NiB8dwn7GEdYKSQ35rhvZh29ULWOZinqmg0ONe0HYaxx7DbKsVoue57S0CIUlgHLajzHfLfqQg2sFI0OT8TnHsGg0YZ6mM2EdKmEjJiER0cP', version: '0.3', creationDate: 'Fri Oct 17 17:00:31 CEST 2008', updateDate: 'Fri Oct 17 17:00:31 CEST 2008', accessDate: 'Fri Oct 17 17:00:31 CEST 2008' }, '10f45664bbd979a92f37886f1ecc6e52e49798b16dc997aecd37259ad9b2090e': { header: '####', data: 'RdKVaV/WWWchrCse3KtcXd47Bfm6IAwjqVUpaxoed3HeunI42AAm7xYYSjeK8edHpbNRJbhobBAX5OZtWIp/HmgkobKM8CIiWxrWz89FqyrbnPD7+fXdtgF2yTax/0sC1l0ibncdOuJKX6U829oPlXCpXIOjlomc4wEEAD/5V6FbORvdZ9IE/ME3LsG2y02cT2tIpx6+R6wC/PKXhZA2UDsTE6R2Op2BtIzpVORZLXsdyAp/4wvWQxq90i9cEpbsVQsMB10JVyNHNsRTFhIlHi9MVCaMxQvcrwRElMj/Y9x3RbsFzSGKqFLqdg7Fn/U+KYkpYtsgHv9hraPIb9lV5FH16+iItU/HBM6FGezIj1ZkoQ+dgjPfSjTZzgzDYwyb', version: '0.3', creationDate: 'Fri Oct 17 16:49:20 CEST 2008', diff --git a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/User.data.old.js b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/User.data.old.js index ed3a6a4..fae7ff0 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/User.data.old.js +++ b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/User.data.old.js @@ -1,118 +1,116 @@ /* -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/. */ MochiKit.Base.update(testData, { //------------------------------------------------------------------------- 'OLD_joe_clipperz_offline_copy_data': { users:{ 'catchAllUser': { __masterkey_test_value__: 'masterkey', s: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00', v: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00' }, 'f527cdd90d0d47f8524b4e165398ad1455eba515d04abd101d1e93b3c6ae0674': { s: '097ca38b1792023d6c1ffca50606b6040c6b27a7667e355ba9e54e6d47d8bf23', v: '34b9f3ab193bb12dc93c791637b8d80364564b9a39ed7130cd168d52876914e4', version: '0.2', maxNumberOfRecords: '100', userDetails: 'AYppVPOTOWH06flUb/Ox61UZNSeDrqzI4x2c9pcBqgobvqnrqd31hxINSnItWiRAh2GPdh0vBElhwAzUQ0nN4wrEdV2hbkHdr+1W/nPt0phMHo0Jd+lHEXl51r+mJguMbMig3/pux9s+h6neWZOefyyTxGVVvVfIVBXYiL3DMVmaZFLOmTCK36LwyX2FltwI9vFSTSaoo14gytjukXM8kwRyUBxxa8agP1VJRtju5hbJVhBKEtXvviVGY8Xm2eMD7Jv5gpmKZcE/QeX1fnPbPPQIPVfbOGo5oKCQ8foDxXk4pnSY4uLZ/aB8CTK+d4cgfiOvPO0fyISA6kCFuNTaaFCBmvwX6h8ac6OWfaAn/3Fnl9C176KDpjdxYs5CCG4MpAVX8u4Gof8JmT/tI2PipbdjfeL37pSQoGM44icZCIE2Pa1Fybhl6WGyrqh3MT1dfxZpMyrzMBjb412KIUkykb8bTeDePK8+nZfwnxdxUQlV6q7RgzNlHZu8oU72PczTooLhsCJPQC/1BWMG5A1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s5kPHRrUClYShuuBCQflGC9hEvu3MCHmBhnXB+Sq34R9jr0gURJZkn7+W66YUK5TAq0465nCd+RaaXCeUhuYaJUuGZTqQEAO9ezDFGe+HgiIqXQkethZHvEy9zbi/wUBBND1a4NdWgPf7Q7UtCB2oGHB0xaKXXCJP1NYk6LKoV+rRyTrY/iHS9k6IbMd51sylgKvsIjurHRPfO7fIM3zdVp+R2/tglVAqJHfj0j95RAIdM7aMFYbCkCvNACCUZ4Uz0buJxT+3qM0geff1I0BoulqD88YzHHA9eAD/rsgXfR4SOtMtapwlpwIteTc+bfsnvtK+Ts0sG2XTx7f7rReZ1I09nRe2RzomIdr4dKC+pEmqjwNofdyY6D3SNvfYijI+nV52fmg+knOFaYsxg5juM+J50jInZXU3A9lDhWYW1TMunxXl5jpbD8m132RDNs0Qa16vhNp08kMu0ubS6GSUyJxo64gmRlfCbzgiZ4cirWry2rSBrB0zQqbwQY5Rw1L1NzOJy4Rh09pVDytLkvy/VfdUkQbjQ6RyBPaw1JUKJl1z1zYIgUQ1hwQa3O2Q1IvbN8V+TY/9jmGRJA98/ymbVki3JiNOhBfg', statistics: 'iFI3fKfuUd5Tqj/iRCJnIk7isZ2FOYPr/yNfICm2U35oUeTJ/RA+l+kbWiYrecpIEgk=', userDetailsVersion: '0.2', records: { /* 01 */ '062af892bcfba49ffcff05c56d99b7af2d508358e39c058c2e1fc83531436f80': { data: '7sgxSQlqR+wh3g06M2+sWp7raQxjjQ9jLIz2OcEB7SckuQcXNrhMlDCbL6ncSljtzgqhioWrOB409kIG8lc7h6ekghOE/Mhi7rVwAiRfNGB7r3mYxpEXRe96O2RG7E+NcSp8ezl+5gJ9D0o1abXPeFQYGcr95hUioCfyY+xrxY8TJVwdb9nHkYvBdKV7rCl1dTxgsKWK3nlo1T7e5uyiz5YUAE6BrCtTFAqtprLI/xOpRti9C+llohS7D6s8hkCBPZfp3chKFDrgpsCBFLhXN8jrBKSjHi1PJdRQzpJsgrxyeBj0dZx3gTsYOXqrYgdIzFUo7K1Tqb30yNprBiDMr7j0YYXiSvEb7OuOIP+HTXGN+yt09bk9LggyY6Fh0e+tenjQQ3soySN/XznOBpEjXbzXoz6fR1MXVnE9GgaX99LVNqwWfq2rIBdSE/FfspRiWP3BY5jIrEkNeRclS05U1zw3K3wxOL+cB9r2IynSXnK8QcrDNNRZ0W3PhsSFfByUXuviLSEOPuJa1mYP29L9Lj/WyHL1Gyl8xLbt2H41S6+wvIleKMuc7teH6wPXbnYphvbwBowoI6HZTEFkz3dQKhhY6VF/81iCXsuaz6BjyrzFX6SkQ4S3lN1tv4opQMJFvnmHb6EkXqVWfeIXzJIJO+owL4vDOf4okpAD+HPjjlVXhq6fvyM5UBIK9+tzJW78X/zifrQOfWRIhwjVsfUdZWmZ/S35vnHWNuXkM8GBYrDysqxanDtah3U8XLAiIhFtBOzpzr6qGaNDOKKgG3K8QXT4bYHOq1rQVUwzQuKhlCyStrRMQrC5Ry251xmLy6dKfppRarVeGDtzB/30BbtFNdZmzMNG2g+Jj5tFCrEtCMvMiQEWZHMU3tGMFxDef/KKdv1fFTJC16jmaUiCHUZmNjB3EO9R6xPVcMlAVKf57n3efrpRk/GTmm9JhAFkuF/wsveH4JjPpDUdkHYFu5tHbb30sbga3ufBAXbQL4ck10S24akU/cKraFGLvuKGaR2U0i6ih911TBSf3pAfZ3RFbBhVIl+6rSknC5+IXoBR7MRstBPW/xC9pQVjN5Qyn0g3aUjUSI+q4jcTuvMl32NtTJbWRMGhfkrpVzypZTyPnIh6XJkyBghlUARXw23MlbjiZxmY4ScDmcWZRZJWIknHlqjDKFDKNnwrfnEI9qWyMDno+jA/DEQz0mnpdZYEsoz1/qAmAeDt89vx', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 CET 2007', updateDate: 'Wed Mar 14 15:46:44 CET 2007', accessDate: 'Mon Jan 19 16:10:04 CET 2009', currentVersion: '4a70ca20167875a936d4540f19980e972c20f329a65d85e9b0ce709f1fc7c7e3', versions: { '4a70ca20167875a936d4540f19980e972c20f329a65d85e9b0ce709f1fc7c7e3': { header: '####', data: '.....', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 CET 2007', updateDate: 'Wed Mar 14 15:46:44 CET 2007', accessDate: 'Mon Jan 19 16:10:04 CET 2009' } } }, /* 02 */ '13a5e52976337ab210903cd04872588e1b21fb72bc183e91aa25c494b8138551': { data: '0/BjzyY6jeh71hwgASQphLMgnLz6WJJPg7sDskLKo5gCumpebgHBPqN0OPyHqTq4Lyt7Um++ckx2VA4yoX4cojXC7FBnscHtN18RlVNRvkfhhFPWBZhFwuVZxlFNb/IueDSjKR3dJahbTqao2AU3HXp0xOdsO5Mb2CfMz1/C4rtDuv5ee7GJNEv2hb2tBTzxbB8PZ/TKYZhlfgV3rJ2Hc509OeX/PuD8oYB7sUnB9UhDZP7pVY0Vz3LP/dFUf1cPGFh7bnxxYNphpJ2SxhIUdgxpmP6UCFxdLbCBXv13+7OlhCaO2eGfsO4Qch996otkSrVxfTvOTLuwiwSqU7hLlvOSzm9in69Rf35ZC7bKcZIdZkTNPeV0a+dR6j3LY7dBvIzd08OtBSqOdQqo/6isG8vaQPLVcWkFFZ//iHGgjTIduSoyzMb/y9cr8J1Qj1uTayUVAHQywCYdKgT4UccLoyt96vKHRcPCw6iepEfSrc3aZOtTg/aS3j2CGTih0i0gfrA4EbeQtIfobthsbTF6Oq5xjrIAMv2LRiJ+8JPj6xw8ODvM8SUN/3UxlYKsqDpWOW4tOztQAMSijoGtBswIl+mLr2p50Cul4n8ENfrilyAX4AcxUFSbH6tVd19ErQLsj+T2H5qhIF0Ifo5NxL9bj+Gx/5ul6dGH6Et9dvaHv+CZ3FKc7wrvItd6GXexc0SC16VfEOUps8yBahEHvNYAo/r5UG+wDCMhstHzEjiSV7TJ5ozjf+C2N+5A81TpJS+zfXhuiyupburyjYX8KQfXSvc28FG9CsgD9u9NcUuqC8L0K6MTB7k8RPSrG9xcBowqFDaH3/afLBsKWHEx87TiaZ7GbxKKmiINJk833pNZMYt36dr0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Ay3HLWfByXxRTHv7CP0keJl0f43LCHx/XPglb+QCs7mkgBIlp55xWugdKiBgMxzBkpjYWIXaaRkJcFrd8VmAwrXuRBvxVFzXh9/jHxuUMYv4WPaNX0SIhiNzaJsQCj5GRc4ftGD6Ot5rOaYjOxVM4yiFRzJMCgjCJPkL8EkU4l3M0GP3udgCfVqoHVFAAKmgdHB4o+hR4F8JA8U9+OCAMdZ+U0TL0oCcZPvQqVKi0b+5dePa8xTLYzOAuO7KF2TvKIujYqkumvg3zauUxxq7Ncklv+ddruQd3KAJ+H7rB9+g/6mTUpdyhNs91BD+QO0q3AYqmtTjSb6eJ2cmz7h6hA4xdg1Pel/sn+B3dePy7BVXLe/G2p5W34L0ZItuAJlIUo8JqE7IJ+BDJ2HPHMT4t/QIde6A76LDvKzalpZ5k5DXwnwGIj4DUdMXgYB8GdtTAhusOraNCNXTCyqU+EchYrO6o9UOURzd8wWj49jce/XROvWtKBuVbAXDNZzcIR8ALmpNTJKv0fz2Y/9/yxxvKN1dpBkLj+MpAw2++NEyylGhMC5C5f5m8pBApYziN84s4O3JQ3khW/1UttQl4=', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 CET 2007', updateDate: 'Wed Mar 14 15:46:44 CET 2007', accessDate: 'Mon Jan 19 16:10:04 CET 2009' }, /* 03 */ '36ec1a41118813ced3553534fa2607d781cba687768db305beed368a8e06e113': { data: 'B7RNc32W4K53PWYWQ4aUkqSLV2O4bwExYXVPFT+50MHxrhYt4/yh2idYXAooF1ImaIlvyUsIbI4EnIoBQ33ed2wxuSA9HVC4+wTrE05EfjYOw66yJO6R6TbIazOs0Fob5PJCFEW6evmb6WWf5KsHwifOo+ACMHK799yZ1dxfaIEjRBmLCtnc8sTNvo8i6McAf7WCffA1vXbyVPEhxJjmrfIDqvkWsNR7jDV5xIA021WicOS0FxOnzU3FecU7EF/UPcYjTKfe8IKw4nDXSKIIgXqCdzNYsyZkw2OnMDVJoSwNdfiog3H4zFy2m9KZqPjwnHHj5BE8rdx0JuZoSnTFLR05p4KdWfOU4BrjehAWXZdudYqsovtDm9uMLgUfx4DV/JKVmGAZ49GWM1Tx7pY5PBbJRTO3674FGWYHTPEMiIpDk+zt1sYIR2YBbJTq4fFOIPsgmOfvYdTkSvdHLk0fbxoK12w+atgmXAiNgE6T7DlYT0IMZlEesw0Spchxoo7lTBUPXC93bl/JugyhoRLUof4dxFvsIvd18Gnop+h7aCVW1S3lqZ36TG/N+hlM4U54FkpHjJi2fN8M8EKF0N8n399m58RNfsX2FriUVHozdb5gpgUXnQnVaAUrtv177lz0sRO+9KqbhJ16dCDzMFLcarBvXGqWkj+ZfkpNIaoyl8KTeHTQTbSS2IwLTvs69fbMW6Mub3VD81CXyY3MXyF4hT0U3CFVD4jQg+xODNnqqrkl/LebWy/XP/HOoNTxjygEu1JcS7zCptRagNoucXVkWinyKGjR9fSEltsrXG2pm4w2qsovRB3vfYp7kx2m5I9qc11K+JKhgPUmpm0S4BnPdfpRMXq0w8kxu08Mwm1Debhrzrgjw1/s1ZtcpoFgJv4EWLboWbo+CKWYdq0AGl+b5UHREPnGOM9o9bOg3uvaOEKZyMq8wxECBjdas4wjRbMY83PcBfzCbOU+POrcbalmtwn4/ILkHPsUcaOHYcnKwkxSYIDRxQc69mHw1+vilSHUQ5dZYSWIRvV3yPe9eqZPWJsWrOyhPLCf18BoNdfbgHFL7b2KN9xLMz0tdHxVozH2TnwAavcNqAE0hVIgtyEDoT4rI7FVMSu5mCIN2KOxgXB8XREZokT1BQ8+rz6JraS3JYQNz+7Bd6iB6OaTStsFoaBkj50MszNdwhRViOCCUk4bUr45XRtyh4ZEXj/I4pyJUkhR5H8/qKKD', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 CET 2007', updateDate: 'Wed Mar 14 15:46:44 CET 2007', accessDate: 'Mon Jan 19 16:10:04 CET 2009' }, /* 04 */ '507f38b06d587d8889698ae1ebbba7ef8f0539b82550dd25779fd9ee88fc0c7a': { data: 'ncSFmp/+n1pYUKi2fwhMCev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/IzQhcUJ6n7enkrqiJFTP8N1aFAuYv8ilu0V2ymIuCLUtc4cbo7KyA+gnHhZA+DjjrhG/izOyWtQY/WtDsqvo/6ILwFk37JDjHfkchPEVcdl9qT7goG/4zTGX+lx8UTKKZJjJhLjA', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 CET 2007', updateDate: 'Wed Mar 14 15:46:44 CET 2007', accessDate: 'Mon Jan 19 16:10:04 CET 2009' }, /* 05 */ '6026370f3db3860d2c46a08e389a7e906dc14f98c8444b21be9a7e9f405a2728': { data: '3oUg1TD+Lu4ou06j/MddOTXDqRM+qSKD+6Iuzia1Hop1w7v/BXidqeoKJZQI2VY9oO9B70Nr3B3wDROF+ycy6Rq+FM/xqUGHKXn1lAaSc6Wgj6TLQ6eRF6YZKSPqTj7TDWyw/2pEWk4HjcT8drTrCaC02tzAXMhYWlYPQPW4fUdq4hawoHIdopUN3vafQuFjY47OhqXKav3bNao=', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 CET 2007', updateDate: 'Wed Mar 14 15:46:44 CET 2007', accessDate: 'Mon Jan 19 16:10:04 CET 2009' }, /* 06 */ '6c25be8e145efb26a1abd59590522f73fb2e3dbc139af2217074d9e2ba92c16a': { data: 'b2mcYUi59l434kGl7ij6dBu3063UL1dToMIu3Zsa9RV9RzeLKnezJhLKunqoAm7KwiJeqDo/REexHI1cshGYtHasVXXuyJfMx1grH7yhoWnkSRF4Sax6w5E5wnGkEpGJHOxXJ9rOjWHZ7yqCUUCB/dqLw4FwPOtRb/ynkBEYztEJA6EKGJuz0vrrTOsT8HMXtj/w6MEZ7qI3fPs=', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 CET 2007', updateDate: 'Wed Mar 14 15:46:44 CET 2007', accessDate: 'Mon Jan 19 16:10:04 CET 2009' }, /* 07 */ '6d45c2fec275b7482d41c76b20507100cfb6ab49922b876f9dd3040d361f4a18': { data: 'jzjPgxRHApIJA/6hiY4XCtb5+eKzHlOeoiGwfVDvip95zU7Th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jjj1kWpnCUBTM46LbERmjz+s4x7fSf2FhhguBT36elz69ivXoiXI+7p0E8f8HsSwm8sgN/AA5m1svsXsdWeZFUiWtAwLg0tI8YNHlazbvFCXfIC6Uhq9eDv04iqdZ3rn2c1rwSx336A7ySTBFdxOCJ46F7ShIhNKm2N+5Qf0K5B2L882fbwqiLsa64+X9aKvufKTsd11vyf19Zivg/Ze0FWoGC8D63Nh91k6Hu32RT+uAtJIjQIZxu9yXJM9lMaRA8ieER+ghrLHaGQqF9J3WmueER3UzU1midvTynOV6g==', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 CET 2007', updateDate: 'Wed Mar 14 15:46:44 CET 2007', accessDate: 'Mon Jan 19 16:10:04 CET 2009' }, /* 08 */ '9dcd2a8a0fcb7e57d234dc4fea347f020a6a01793e40cf56a0d22379e590e291': { data: 'xXZUJjgxn62OqnzAvScHJNo4WjYEFp1vQ4ueBe1sk8dH4pXZUKV6m9c1d2cLUgBj4rUNP5cC66GiFHV7G5BDZGLrfrxUlYU6BWvzAz4eG463pRDhHXQgPrhlIGDlK6ovaIsjwaifvHaEfLREoXvLFluqu406KG58guhtWdIFK0rLypyRo8uyltGbTz8wZdu8atY/JYQnb8NaAf4=', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 CET 2007', updateDate: 'Wed Mar 14 15:46:44 CET 2007', accessDate: 'Mon Jan 19 16:10:04 CET 2009' }, /* 09 */ 'ca01bcb7691f70818feed46c9a2a91883ac543997a395535aedbb49de166690c': { data: 'YXBq1ZlFhoosb2Krnk0Tk8+LKyecTeZ3UdJujrryEgvMnhGJvSVVtN3uph9gts10Kw+tF5wvdAtBFdMUpvcP3mOlbnX7+HCz+JsJcLLVvuGBU9ciwok5kRKQuvWffmP7qFLuqO2VJUj2ozjcpVssStZOrfDXWrJwYfkd9IMnOJVmCwjFeXpPlkOeHNyhjPlfZhWWlTga6xLdEXaVeZyjDegzhlhh9U3e1CLupLTwdxXtNCPRXp8gU7e/I9HP/qdnj5BzgDxaKx29v/AUcgOt3jq5oWwePXZL9nVOp6rh/UqduM88tyxEbnBQxcGj9KxTVsIh6ywzQZgnPtfrPaqX4Fvb1P9cGN80/F+/JXVgL3fvrcxJDGxZj6VYFTA+cHM6sV+F4/7wMLUVlCcn78BB6/k3DC4mYUv+8LSxfZf22bWCcSyubPTRhmCm2/sgdOloDUKT4AjfZivlpJjkYNDtNmZn/rUpMr3uLiHeWDDNB+eGqk3lAFhihBPXqDJ3o+8c9jrznedMxQPkgYD0V9ryDauY2RYjQIhmXqQlnGxpGOO2lFDGYtkwsBplPy6LDkudzJVAqp5trBR8Ty87k65hbhinGCra/DgPqIxjaN5pvZbXkOLoaIoLnE9RRGdAwfUTMIg/maNRoDKaHO0hJ3ksCflu71H9tzPjGM7BBjWjQgUvwDJOgnEPyZv+noOiHfNIq3u8CfI8e867gnEbdtd3oPYex1aBYIQ1ELAxI8szUtSeMDHOouXrZKwy04xVdC90KHnVWl49scE2QfgqV4hqzFjtuQgZOqQ50bI+duWDm7YYTwKVlo5QKy40faW6dPIfDPRsxY6M3gcL2OPBm+WMopUC/o/AFSpxPaut1DOr3mXBip0Ejam9xmJhMOUwIJDoE2U+8S2s+UJjRunLb680vqbddF24aWxpLL1Fg+hlRZ/Jz1ZajonH9ktQhoQaTl+w/4uHhMZjKH7/FaRqge2WMMwVjOd7VXNByBPia6W7VbmDk8LFCeCsC1DchcDaMj/JmoGXucqzDO/sOIby2YCBsV72ReqTNtu6SLZe4G61DWA7j+6NiOSmAutYox6VsoRsKaJYkyBgmq5hWDZmWOJ/cC1pQa9EMoXzcaEPicmXx5YE4xF15VWpI8cKTM/StLtLcqTs78Z0fQAicz8YhhNdVCGp/zcjJRPyL6XCDhpvMxcIOnU7', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 CET 2007', updateDate: 'Wed Mar 14 15:46:44 CET 2007', accessDate: 'Mon Jan 19 16:10:04 CET 2009' diff --git a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/User.html b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/User.html index a651830..793f763 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/User.html +++ b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/User.html @@ -1,103 +1,101 @@ <!-- -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/. --> <html> <head> <title>Clipperz.PM.DataModel.User - test</title> <script type="text/javascript" src="../../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Date.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Signal.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Toll.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Proxy.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Proxy/Proxy.Offline.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Proxy/Proxy.Test.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Connection.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Crypto.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/UI/Common/Controllers/DirectLoginRunner.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Strings.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Strings/Strings_en-US.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/Date.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/EncryptedRemoteObject.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/Record.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/Record.Version.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/Record.Version.Field.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/DirectLogin.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/DirectLoginInput.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/DirectLoginBinding.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/DirectLoginFormValue.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/User.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/User.Header.Legacy.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/User.Header.RecordIndex.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/User.Header.Preferences.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/User.Header.OneTimePasswords.js'></script> <script type='text/javascript' src='../../../../../js/Clipperz/PM/DataModel/OneTimePassword.js'></script> <script type="text/javascript" src="../../../../SimpleTest/SimpleTest.Async.js"></script> <script> Clipperz_IEisBroken = false; </script> <!--[if IE]><script> Clipperz_IEisBroken = true; Clipperz_normalizedNewLine = '\x0d\x0a'; </script><![endif]--> </head> <body> <pre id="test"> <script> Clipperz.PM.Strings.Languages.setSelectedLanguage('en-us'); </script> <script type="text/javascript" src="User.data.js"></script> <script type="text/javascript" src="User.data.old.js"></script> <script type="text/javascript" src="User.test.js"></script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/User.test.js b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/User.test.js index c9ca3d6..45f3297 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/User.test.js +++ b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/User.test.js @@ -1,118 +1,116 @@ /* -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.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); var tests = { //------------------------------------------------------------------------- 'invertIndex_test': function (someTestArgs) { var testIndex; var invertedIndex; testIndex = { 'key1': 'value1', 'key2': 'value2', 'key3': 'value3', 'key4': 'value4', 'key5': 'value5' }; invertedIndex = Clipperz.PM.DataModel.User.Header.RecordIndex.invertIndex(testIndex); SimpleTest.is(MochiKit.Base.keys(invertedIndex).length, MochiKit.Base.keys(testIndex).length, "the inverted index has the same number of elements as the original index"); SimpleTest.is(invertedIndex['value1'], 'key1', "the first element has been correctly inverted"); SimpleTest.is(invertedIndex['value2'], 'key2', "the second element has been correctly inverted"); SimpleTest.is(invertedIndex['value3'], 'key3', "the third element has been correctly inverted"); SimpleTest.is(invertedIndex['value4'], 'key4', "the forth element has been correctly inverted"); SimpleTest.is(invertedIndex['value5'], 'key5', "the fifth element has been correctly inverted"); return MochiKit.Async.succeed('done'); }, //------------------------------------------------------------------------- 'joe_clipperz_offline_copy_test': function(someTestArgs) { var deferredResult; var proxy; var user; proxy = new Clipperz.PM.Proxy.Test({shouldPayTolls:true, isDefault:true}); user = new Clipperz.PM.DataModel.User({username:'joe', getPassphraseFunction:function () { return 'clipperz';}}); deferredResult = new Clipperz.Async.Deferred("joe_clipperz_offline_copy_test", someTestArgs); deferredResult.addMethod(proxy.dataStore(), 'setupWithEncryptedData', testData['joe_clipperz_offline_copy_data']); deferredResult.addMethod(user, 'login'); deferredResult.addMethod(user, 'getRecords'); deferredResult.addCallback(function (someRecords) { is(someRecords.length, 20, "joe_clipperz_offline_copy_test - joe has 20 records"); }); deferredResult.addMethod(user, 'getRecords'); deferredResult.addCallback(MochiKit.Base.map, MochiKit.Base.methodcaller('label')); deferredResult.addCallback(Clipperz.Async.collectAll); deferredResult.addCallback(MochiKit.Base.methodcaller('sort')); deferredResult.addCallback(function (someSortedLabels) { SimpleTest.is(someSortedLabels.length, 20, "We got all the labels"); SimpleTest.is(someSortedLabels[0], "Amazon.com", "The first label is correct"); SimpleTest.is(someSortedLabels[1], "American Airlines", "The second label is correct"); SimpleTest.is(someSortedLabels[2], "Bloglines", "The third label is correct"); SimpleTest.is(someSortedLabels[3], "Digg", "The fourth label is correct"); SimpleTest.is(someSortedLabels[4], "Example Attack", "The fifth label is correct"); SimpleTest.is(someSortedLabels[5], "Expedia.com", "The sixth label is correct"); SimpleTest.is(someSortedLabels[6], "Google Account", "The seventh label is correct"); SimpleTest.is(someSortedLabels[7], "Home burglar alarm", "The eighth label is correct"); SimpleTest.is(someSortedLabels[8], "Jaiku", "The ninth label is correct"); SimpleTest.is(someSortedLabels[9], "LinkedIn", "The 10th label is correct"); SimpleTest.is(someSortedLabels[10], "Lufthansa", "The 11th label is correct"); SimpleTest.is(someSortedLabels[11], "Microsoft Office CD Key", "The 12th label is correct"); SimpleTest.is(someSortedLabels[12], "MyBlogLog", "The 13th label is correct"); SimpleTest.is(someSortedLabels[13], "MySpace", "The 14th label is correct"); SimpleTest.is(someSortedLabels[14], "SAP - Login", "The 15th label is correct"); SimpleTest.is(someSortedLabels[15], "The New York Times", "The 16th label is correct"); SimpleTest.is(someSortedLabels[16], "Web password", "The 17th label is correct"); SimpleTest.is(someSortedLabels[17], "Web password", "The 18th label is correct"); SimpleTest.is(someSortedLabels[18], "Yahoo! Account", "The 19th label is correct"); SimpleTest.is(someSortedLabels[19], "del.icio.us", "The 20th label is correct"); }); deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'joe_clipperz_offline_copy_getDirectLogins_test': function(someTestArgs) { var deferredResult; var proxy; var user; proxy = new Clipperz.PM.Proxy.Test({shouldPayTolls:true, isDefault:true}); user = new Clipperz.PM.DataModel.User({username:'joe', getPassphraseFunction:function () { return 'clipperz';}}); deferredResult = new Clipperz.Async.Deferred("joe_clipperz_offline_copy_getDirectLogins_test", someTestArgs); deferredResult.addMethod(proxy.dataStore(), 'setupWithEncryptedData', testData['joe_clipperz_offline_copy_data']); deferredResult.addMethod(user, 'login'); deferredResult.addMethod(user, 'getDirectLogins'); diff --git a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/index.html b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/index.html index 237c0ea..8aacac5 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/DataModel/index.html +++ b/frontend/gamma/tests/tests/Clipperz/PM/DataModel/index.html @@ -1,44 +1,42 @@ <!-- -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/. --> <html> <head> <title>Clipperz.PM.DataModel.* - tests</title> <script type="text/javascript" src="../../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../../SimpleTest/TestRunner.js"></script> </head> <body> <script> TestRunner.runTests( 'EncryptedRemoteObject.html', 'Record.html', 'DirectLogin.html', 'User.html', 'OneTimePassword.html' ); </script> </body> </html>
\ No newline at end of file diff --git a/frontend/gamma/tests/tests/Clipperz/PM/Date.html b/frontend/gamma/tests/tests/Clipperz/PM/Date.html index 7b87185..4a2760a 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/Date.html +++ b/frontend/gamma/tests/tests/Clipperz/PM/Date.html @@ -1,55 +1,53 @@ <!-- -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/. --> <html> <head> <title>Clipperz.PM.Date - test</title> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Date.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Date.js'></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.Async.js"></script> </head> <body> <pre id="test"> <script type="text/javascript" src="Date.test.js"></script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/PM/Date.test.js b/frontend/gamma/tests/tests/Clipperz/PM/Date.test.js index e4b4db6..ff4745f 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/Date.test.js +++ b/frontend/gamma/tests/tests/Clipperz/PM/Date.test.js @@ -1,87 +1,85 @@ /* -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/. */ var tests = { //------------------------------------------------------------------------- 'offlineDataParsing_test': function () { var value; var parsedValue; var expectedValue; value = 'Tue Mar 27 06:41:37 PDT 2007'; parsedValue = Clipperz.PM.Date.parse(value); expectedValue = new Date(); expectedValue.setUTCFullYear(2007, 03 - 1, 27); expectedValue.setUTCHours(13, 41, 37); // SimpleTest.is(parsedValue.toString(), 'Tue Mar 27 2007 15:41:37 GMT+0200 (CEST)', "the data in the format stored in the offline copy is processed correctly [1]"); SimpleTest.is(parsedValue.toString(), expectedValue.toString(), "the data in the format stored in the offline copy is processed correctly [1]"); value = 'Thu May 10 15:01:21 PDT 2007'; parsedValue = Clipperz.PM.Date.parse(value); expectedValue = new Date(); expectedValue.setUTCFullYear(2007, 05 - 1, 10); expectedValue.setUTCHours(22, 01, 21); // SimpleTest.is(parsedValue.toString(), 'Fri May 11 2007 00:01:21 GMT+0200 (CEST)', "the data in the format stored in the offline copy is processed correctly [3]"); SimpleTest.is(parsedValue.toString(), expectedValue.toString(), "the data in the format stored in the offline copy is processed correctly [3]"); value = 'Thu May 10 15:01:21 PST 2007'; parsedValue = Clipperz.PM.Date.parse(value); expectedValue = new Date(); expectedValue.setUTCFullYear(2007, 05 - 1, 10); expectedValue.setUTCHours(23, 01, 21); // SimpleTest.is(parsedValue.toString(), 'Fri May 11 2007 01:01:21 GMT+0200 (CEST)', "the data in the format stored in the offline copy is processed correctly [3]"); SimpleTest.is(parsedValue.toString(), expectedValue.toString(), "the data in the format stored in the offline copy is processed correctly [3]"); }, //------------------------------------------------------------------------- 'onlineDataParsing_test': function () { var value; var parsedValue; var expectedValue; value = 'Tue, 27 March 2007 06:41:37 PDT'; parsedValue = Clipperz.PM.Date.parse(value); expectedValue = new Date(); expectedValue.setUTCFullYear(2007, 03 - 1, 27); expectedValue.setUTCHours(13, 41, 37); // SimpleTest.is(parsedValue.toString(), 'Tue Mar 27 2007 15:41:37 GMT+0200 (CEST)', "the data in the format returned by the server is processed correctly"); SimpleTest.is(parsedValue.toString(), expectedValue.toString(), "the data in the format returned by the server is processed correctly"); }, //------------------------------------------------------------------------- 'syntaxFix': MochiKit.Base.noop }; //############################################################################# Clipperz.PM.Strings.Languages.initSetup(); SimpleTest.runDeferredTests("Clipperz.PM.Date", tests, {trace:false}); diff --git a/frontend/gamma/tests/tests/Clipperz/PM/PIN.html b/frontend/gamma/tests/tests/Clipperz/PM/PIN.html index a08b286..9282bb9 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/PIN.html +++ b/frontend/gamma/tests/tests/Clipperz/PM/PIN.html @@ -1,66 +1,64 @@ <!-- -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/. --> <html> <head> <title>Clipperz.PM.Proxy - TEST</title> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Connection.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Crypto.js'></script> <!-- <script type='text/javascript' src='../../../../js/Clipperz/PM/Toll.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy.js'></script> --> <script type='text/javascript' src='../../../../js/Clipperz/PM/PIN.js'></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.Async.js"></script> </head> <body> <pre id="test"> <script type="text/javascript" src="PIN.test.js"></script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/PM/PIN.test.js b/frontend/gamma/tests/tests/Clipperz/PM/PIN.test.js index ed795dd..abd489e 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/PIN.test.js +++ b/frontend/gamma/tests/tests/Clipperz/PM/PIN.test.js @@ -1,97 +1,95 @@ /* -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.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); Clipperz.PM.PIN['CREDENTIALS'] = 'TEST.CLIPPERZ.CREDENTIALS'; Clipperz.PM.PIN['FAILURE_COUNT'] = 'TEST.CLIPPERZ.FAILED_LOGIN_COUNT'; var tests = { //------------------------------------------------------------------------- 'clearCredentials': function () { localStorage.removeItem(Clipperz.PM.PIN['CREDENTIALS']); localStorage.removeItem(Clipperz.PM.PIN['FAILURE_COUNT']); }, //------------------------------------------------------------------------- 'isSet': function () { tests.clearCredentials(); is(false, Clipperz.PM.PIN.isSet(), "after cleaning all values, credentials should not be set"); Clipperz.PM.PIN.setCredentialsWithPIN("1234", {'username':'joe', 'passphrase':'eoj'}); is(true, Clipperz.PM.PIN.isSet(), "once saved, they should be found"); }, 'recordFailedAttempt': function () { tests.clearCredentials(); Clipperz.PM.PIN.setCredentialsWithPIN("1234", {'username':'joe', 'passphrase':'eoj'}); is(true, Clipperz.PM.PIN.isSet(), "once saved, they should be found"); Clipperz.PM.PIN.recordFailedAttempt(); is(true, Clipperz.PM.PIN.isSet(), "1st wrong PIN -> keep credentials"); Clipperz.PM.PIN.recordFailedAttempt(); is(true, Clipperz.PM.PIN.isSet(), "2nd wrong PIN -> keep credentials"); Clipperz.PM.PIN.recordFailedAttempt(); is(false, Clipperz.PM.PIN.isSet(), "3rd wrong PIN -> REMOVE credentials"); Clipperz.PM.PIN.setCredentialsWithPIN("1234", {'username':'joe', 'passphrase':'eoj'}); is(true, Clipperz.PM.PIN.isSet(), "once saved, they should be found"); Clipperz.PM.PIN.recordFailedAttempt(); is(true, Clipperz.PM.PIN.isSet(), "1st wrong PIN -> keep credentials"); Clipperz.PM.PIN.recordFailedAttempt(); is(true, Clipperz.PM.PIN.isSet(), "2nd wrong PIN -> keep credentials"); Clipperz.PM.PIN.resetFailedAttemptCount(); Clipperz.PM.PIN.recordFailedAttempt(); is(true, Clipperz.PM.PIN.isSet(), "3rd wrong PIN, but with a successful use in between -> keep credentials"); }, 'credentialsWithPIN': function () { var credentials; var pin; var decryptedCredentials; tests.clearCredentials(); credentials = {'username': 'joe', 'passphrase':'foobar'}; pin = '1234'; Clipperz.PM.PIN.setCredentialsWithPIN(pin, credentials); decryptedCredentials = Clipperz.PM.PIN.credentialsWithPIN(pin); is(decryptedCredentials['username'], credentials['username']); is(decryptedCredentials['passphrase'], credentials['passphrase']); }, //------------------------------------------------------------------------- 'syntaxFix': MochiKit.Base.noop }; //############################################################################# SimpleTest.runDeferredTests("Clipperz.PM.PIN", tests, {trace:false}); diff --git a/frontend/gamma/tests/tests/Clipperz/PM/Proxy.html b/frontend/gamma/tests/tests/Clipperz/PM/Proxy.html index 8177285..704d232 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/Proxy.html +++ b/frontend/gamma/tests/tests/Clipperz/PM/Proxy.html @@ -1,61 +1,59 @@ <!-- -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/. --> <html> <head> <title>Clipperz.PM.Proxy - TEST</title> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Connection.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Crypto.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Toll.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy.js'></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.Async.js"></script> </head> <body> <pre id="test"> <script type="text/javascript" src="Proxy.test.js"></script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/PM/Proxy.test.js b/frontend/gamma/tests/tests/Clipperz/PM/Proxy.test.js index 8225823..1bec17d 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/Proxy.test.js +++ b/frontend/gamma/tests/tests/Clipperz/PM/Proxy.test.js @@ -1,114 +1,112 @@ /* -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.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); var tests = { //------------------------------------------------------------------------- 'simple_tests': function() { var deferredResult; deferredResult = new Clipperz.Async.Deferred("simple_tests", {trace:false}); deferredResult.addCallback(function() { var proxy; proxy = new Clipperz.PM.Proxy(); ok(proxy != null, "can create instances of the Proxy class"); is(proxy.shouldPayTolls(), false, "proxy is set to NOT pay tolls by default"); }); deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'simpleTestsWithTolls_tests': function() { var deferredResult; deferredResult = new Clipperz.Async.Deferred("simple_tests", {trace:false}); deferredResult.addCallback(function() { var proxy; proxy = new Clipperz.PM.Proxy({shouldPayTolls:true}); is(proxy.shouldPayTolls(), true, "I can set Proxy to pays tolls"); }); deferredResult.callback(); return deferredResult; }, //------------------------------------------------------------------------- 'syntaxFix': MochiKit.Base.noop }; //############################################################################# runTests = function(aClassName) { try { var deferredTests; var aTestName; deferredTests = new Clipperz.Async.Deferred(aClassName + ".test", {trace:false}); aTestName = window.location.href.match(/#.*/); if (aTestName && (aTestName != '#')) { aTestName = aTestName[0].slice(1); if (aTestName in tests) { //Clipperz.log("single test execution, via fragment identifier", aTestName); deferredTests.addCallback(tests[aTestName]); deferredTests.addErrback(SimpleTest.ok, false, aTestName); } else { deferredTests.addBoth(is, aTestName, null, "Wrong test name selected to run"); } } else { for (aTestName in tests) { deferredTests.addCallback(tests[aTestName]); deferredTests.addErrback(SimpleTest.ok, false, aTestName); } deferredTests.addBoth(is, true, true, "FINISH: completed the full stack of tests"); } deferredTests.addBoth(SimpleTest.finish); deferredTests.callback(); SimpleTest.waitForExplicitFinish(); } catch (err) { var s = "test suite failure!\n"; var o = {}; var k = null; for (k in err) { // ensure unique keys?! if (!o[k]) { s += k + ": " + err[k] + "\n"; o[k] = err[k]; } } ok ( false, s ); } }("Clipperz.PM.Proxy"); diff --git a/frontend/gamma/tests/tests/Clipperz/PM/Toll.html b/frontend/gamma/tests/tests/Clipperz/PM/Toll.html index 6c2e000..b5a35f6 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/Toll.html +++ b/frontend/gamma/tests/tests/Clipperz/PM/Toll.html @@ -1,58 +1,56 @@ <!-- -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/. --> <html> <head> <title>Clipperz.PM.Toll - test</title> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Toll.js'></script> <script type="text/javascript" src="../../../SimpleTest/SimpleTest.Async.js"></script> </head> <body> <pre id="test"> <script type="text/javascript" src="Toll.test.js"></script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/PM/Toll.test.js b/frontend/gamma/tests/tests/Clipperz/PM/Toll.test.js index 6de67c3..bab0713 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/Toll.test.js +++ b/frontend/gamma/tests/tests/Clipperz/PM/Toll.test.js @@ -1,118 +1,116 @@ /* -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.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); var tests = { //------------------------------------------------------------------------- /* 'simple_test': function() { var deferredResult; deferredResult = new Clipperz.Async.Deferred("simple_tests", {trace:false}); deferredResult.addCallback(function() { var tollTargetValue; var toll; var price; tollTargetValue = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32); tollTargetValue = Clipperz.Crypto.SHA.sha256(tollTargetValue); price = 1; tollTargetValue = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32); toll = new Clipperz.PM.Toll({targetValue:tollTargetValue.toHexString(), cost:price}); toll.pay(); price = 5; tollTargetValue = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32); toll = new Clipperz.PM.Toll({targetValue:tollTargetValue.toHexString(), cost:price}); toll.pay(); price = 6; tollTargetValue = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32); toll = new Clipperz.PM.Toll({targetValue:tollTargetValue.toHexString(), cost:price}); toll.pay(); price = 7; tollTargetValue = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32); toll = new Clipperz.PM.Toll({targetValue:tollTargetValue.toHexString(), cost:price}); toll.pay(); price = 7; tollTargetValue = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32); toll = new Clipperz.PM.Toll({targetValue:tollTargetValue.toHexString(), cost:price}); toll.pay(); }); deferredResult.callback(); return deferredResult; }, */ //------------------------------------------------------------------------- 'deferredPay_test': function() { var deferredResult; var tollTargetValue; var toll_1, toll_5, toll_6, toll_7, toll_10, toll_16; // tollTargetValue = Clipperz.Crypto.SHA.sha256(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32)); deferredResult = new Clipperz.Async.Deferred("deferredPay_tests", {trace:false}); tollTargetValue = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2); toll_1 = new Clipperz.PM.Toll({targetValue:tollTargetValue, cost:1}); deferredResult.addMethod(toll_1, 'deferredPay'); deferredResult.addCallback(function (aResult) { SimpleTest.ok(Clipperz.PM.Toll.validate(aResult.targetValue, aResult.toll, 1), "Payed a toll of cost 1"); }); deferredResult.addCallback(MochiKit.Async.wait, 1); tollTargetValue = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2); toll_5 = new Clipperz.PM.Toll({targetValue:tollTargetValue, cost:5}); deferredResult.addMethod(toll_5, 'deferredPay'); deferredResult.addCallback(function (aResult) { SimpleTest.ok(Clipperz.PM.Toll.validate(aResult.targetValue, aResult.toll, 5), "Payed a toll of cost 5"); }); deferredResult.addCallback(MochiKit.Async.wait, 1); tollTargetValue = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2); toll_6 = new Clipperz.PM.Toll({targetValue:tollTargetValue, cost:6}); deferredResult.addMethod(toll_6, 'deferredPay'); deferredResult.addCallback(function (aResult) { SimpleTest.ok(Clipperz.PM.Toll.validate(aResult.targetValue, aResult.toll, 6), "Payed a toll of cost 6"); }); deferredResult.addCallback(MochiKit.Async.wait, 1); tollTargetValue = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2); toll_7 = new Clipperz.PM.Toll({targetValue:tollTargetValue, cost:7}); diff --git a/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/MainController.html b/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/MainController.html index 1eea01b..6a2d3a0 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/MainController.html +++ b/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/MainController.html @@ -1,60 +1,58 @@ <!-- -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/. --> <html> <head> <title>Clipperz.PM.UI.Web.MainController - test</title> <script type="text/javascript" src="../../../../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../../../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../../../../../SimpleTest/test.css"> <script type='text/javascript' src='../../../../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='../../../../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../../../../js/Clipperz/Signal.js'></script> <script type='text/javascript' src='../../../../../../../js/Clipperz/PM/UI/Web/Controllers/MainController.js'></script> <script type="text/javascript" src="../../../../../../SimpleTest/SimpleTest.Async.js"></script> </head> <body> <pre id="test"> <script type="text/javascript" src="MainController.test.js"></script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/MainController.test.js b/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/MainController.test.js index 919215e..512104b 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/MainController.test.js +++ b/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/MainController.test.js @@ -1,87 +1,85 @@ /* -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.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); var tests = { 'isPassphraseDelegateLockSetAfterInit': function (someTestArgs) { return Clipperz.Async.callbacks('isPassphraseDelegateLockSetAfterInit', [ function () { var mainController; mainController = new Clipperz.PM.UI.Web.Controllers.MainController(); SimpleTest.is(true, mainController._passphraseDelegateLock.locked, 'passphraseDelegate lock is locked after MainController initialization') }]); }, //------------------------------------------------------------------------- 'getPassphraseWithUnsetDelegate_test': function (someTestArgs) { var deferredResult; var mainController; var delegateFunction; mainController = new Clipperz.PM.UI.Web.Controllers.MainController(); delegateFunction = function () { return "clipperz";}; MochiKit.Async.callLater(1, MochiKit.Base.method(mainController, 'setPassphraseDelegate', delegateFunction)); return Clipperz.Async.callbacks("MainController.getPassphraseWithUnsetDelegate",[ MochiKit.Base.method(mainController, 'getPassphrase'), function (aResult) { SimpleTest.is(aResult, 'clipperz', "the password provided by the delegate is correct"); } ], {trace:false}); }, //------------------------------------------------------------------------- 'getPassphraseWithSetDelegate_test': function (someTestArgs) { var deferredResult; var mainController; var delegateFunction; mainController = new Clipperz.PM.UI.Web.Controllers.MainController(); delegateFunction = function () {return "clipperz";}; return Clipperz.Async.callbacks("MainController.getPassphraseWithSetDelegate_test",[ MochiKit.Base.method(mainController, 'setPassphraseDelegate', delegateFunction), MochiKit.Base.method(mainController, 'getPassphrase'), function (aResult) { SimpleTest.is(aResult, 'clipperz', "the password provided by the delegate is correct"); } ], {trace:false}); }, //------------------------------------------------------------------------- 'syntaxFix': MochiKit.Base.noop }; //############################################################################# SimpleTest.runDeferredTests("Clipperz.PM.UI.Web.Controllers.MainController", tests, {trace:false}); diff --git a/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/index.html b/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/index.html index 3f04d4f..a49fcd6 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/index.html +++ b/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/index.html @@ -1,43 +1,41 @@ <!-- -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/. --> <html> <head> <title>Clipperz.PM.UI.Web.Controllers.* - tests</title> <script type="text/javascript" src="../../../../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../../../../SimpleTest/TestRunner.js"></script> </head> <body> <script> TestRunner.runTests( // // This is still a complete mess. // 'MainController.html' ); </script> </body> </html>
\ No newline at end of file diff --git a/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/index.html b/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/index.html index 250a70d..cdec066 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/index.html +++ b/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/index.html @@ -1,42 +1,40 @@ <!-- -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/. --> <html> <head> <title>Clipperz.PM.UI.Web* - tests</title> <script type="text/javascript" src="../../../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../../../SimpleTest/TestRunner.js"></script> </head> <body> <script> TestRunner.runTests( // // This is still a complete mess. // ); </script> </body> </html>
\ No newline at end of file diff --git a/frontend/gamma/tests/tests/Clipperz/PM/UI/index.html b/frontend/gamma/tests/tests/Clipperz/PM/UI/index.html index d46ced1..89deab8 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/UI/index.html +++ b/frontend/gamma/tests/tests/Clipperz/PM/UI/index.html @@ -1,42 +1,40 @@ <!-- -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/. --> <html> <head> <title>Clipperz.PM.UI.* - tests</title> <script type="text/javascript" src="../../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../../SimpleTest/TestRunner.js"></script> </head> <body> <script> TestRunner.runTests( // // This is still a complete mess. // ); </script> </body> </html>
\ No newline at end of file diff --git a/frontend/gamma/tests/tests/Clipperz/PM/index.html b/frontend/gamma/tests/tests/Clipperz/PM/index.html index c3df56a..eeda692 100644 --- a/frontend/gamma/tests/tests/Clipperz/PM/index.html +++ b/frontend/gamma/tests/tests/Clipperz/PM/index.html @@ -1,54 +1,52 @@ <!-- -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/. --> <html> <head> <title>Clipperz.PM.* - tests</title> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../../SimpleTest/TestRunner.js"></script> </head> <body> <script> TestRunner.runTests( // // This is still a complete mess. // // 'BookmarkletProcessor.html', 'Connection.html', 'Crypto.html', // 'Crypto_other_implementation_comparison.html', 'Crypto_performanceEvaluation.html', // 'CryptoPerformance_ByteArrayArray.html', // 'CryptoPerformance_ByteArrayHex.html', // 'CryptoPerformance_ByteArrayString.html', 'Date.html', 'PIN.html', 'Proxy.html', 'Toll.html' ); </script> </body> </html>
\ No newline at end of file diff --git a/frontend/gamma/tests/tests/Clipperz/RoboFormExportProcessor.html b/frontend/gamma/tests/tests/Clipperz/RoboFormExportProcessor.html index b4500e3..3065b32 100644 --- a/frontend/gamma/tests/tests/Clipperz/RoboFormExportProcessor.html +++ b/frontend/gamma/tests/tests/Clipperz/RoboFormExportProcessor.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <script type="text/javascript" src="../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../SimpleTest/test.css"> <script type='text/javascript' src='../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../js/Clipperz/KeePassExportProcessor.js'></script> <script type="text/javascript" src="../../SimpleTest/SimpleTest.Async.js"></script> </head> <body> <pre id="test"> <script type="text/javascript"> try { var deferredResult; var keePassProcessor; keePassProcessor = new Clipperz.KeePassExportProcessor(); deferredResult = new MochiKit.Async.Deferred(); deferredResult.addCallback(function(aResult) { return "[Gmail]\nGroup: General\nUserName: joe.clipperz\nURL: http://www.gmail.com\nPassword: NHy08ZCMYsqUeLQCawR7\n\n[del.icio.us]\nGroup: General\nUserName: joe69\nURL: http://del.icio.us\nPassword: tS1cIEeqp5y0wkU\n\n[Amazon]\nGroup: General\nUserName: jclipperz\nURL: http://www.amazon.com\nPassword: wvpkqNPIsqlI5g6XE9Tz\n\n[Paypal]\nGroup: General\nUserName: joeclipperz\nURL: http://www.paypal.com\nPassword: 24T4wIcvHnM28T3L\n\n[Technorati]\nGroup: General\nUserName: jclipperz\nURL: http://www.technorati.com\nPassword: UcVeNqF\n\n[American Airlines]\nGroup: General\nUserName: joe.clipperz\nURL: http://www.aa.com\nPassword: AtrYbmi7lmSjR\n" }); deferredResult.addCallback(MochiKit.Base.method(keePassProcessor, 'deferredParse')); deferredResult.addCallback(function(aResult) { is(MochiKit.Base.serializeJSON(aResult), "[{\"Title\":\"Gmail\", \"Group\":\"General\", \"UserName\":\"joe.clipperz\", \"URL\":\"http://www.gmail.com\", \"Password\":\"NHy08ZCMYsqUeLQCawR7\"}, {\"Title\":\"del.icio.us\", \"Group\":\"General\", \"UserName\":\"joe69\", \"URL\":\"http://del.icio.us\", \"Password\":\"tS1cIEeqp5y0wkU\"}, {\"Title\":\"Amazon\", \"Group\":\"General\", \"UserName\":\"jclipperz\", \"URL\":\"http://www.amazon.com\", \"Password\":\"wvpkqNPIsqlI5g6XE9Tz\"}, {\"Title\":\"Paypal\", \"Group\":\"General\", \"UserName\":\"joeclipperz\", \"URL\":\"http://www.paypal.com\", \"Password\":\"24T4wIcvHnM28T3L\"}, {\"Title\":\"Technorati\", \"Group\":\"General\", \"UserName\":\"jclipperz\", \"URL\":\"http://www.technorati.com\", \"Password\":\"UcVeNqF\"}, {\"Title\":\"American Airlines\", \"Group\":\"General\", \"UserName\":\"joe.clipperz\", \"URL\":\"http://www.aa.com\", \"Password\":\"AtrYbmi7lmSjR\"}]", "first test"); }); deferredResult.addErrback(function(anError) { is("ERROR", anError) }); deferredResult.addCallback(function(aResult) { return "[Gmail]\nGroup: General\nUserName: joe.clipperz\nURL: http://www.gmail.com\nPassword: NHy08ZCMYsqUeLQCawR7\nNotes: Personal account\n\n[del.icio.us]\nGroup: General\nUserName: joe69\nURL: http://del.icio.us\nPassword: tS1cIEeqp5y0wkU\nNotes: social bookmarking site\n\n[Amazon]\nGroup: General\nUserName: jclipperz\nURL: http://www.amazon.com\nPassword: wvpkqNPIsqlI5g6XE9Tz\nNotes: The US online store\n\n[Paypal]\nGroup: General\nUserName: joeclipperz\nURL: http://www.paypal.com\nPassword: 24T4wIcvHnM28T3L\nNotes: Linked to my savings account\n\n[Technorati]\nGroup: General\nUserName: jclipperz\nURL: http://www.technorati.com\nPassword: UcVeNqF\nNotes: Blog ranking and searching\n\n[American Airlines]\nGroup: General\nUserName: joe.clipperz\nURL: http://www.aa.com\nPassword: AtrYbmi7lmSjR\nNotes: Adavantages card n. 795495\n" }); deferredResult.addCallback(MochiKit.Base.method(keePassProcessor, 'deferredParse')); deferredResult.addCallback(function(aResult) { is(MochiKit.Base.serializeJSON(aResult), "[{\"Title\":\"Gmail\", \"Group\":\"General\", \"UserName\":\"joe.clipperz\", \"URL\":\"http://www.gmail.com\", \"Password\":\"NHy08ZCMYsqUeLQCawR7\", \"Notes\":\"Personal account\"}, {\"Title\":\"del.icio.us\", \"Group\":\"General\", \"UserName\":\"joe69\", \"URL\":\"http://del.icio.us\", \"Password\":\"tS1cIEeqp5y0wkU\", \"Notes\":\"social bookmarking site\"}, {\"Title\":\"Amazon\", \"Group\":\"General\", \"UserName\":\"jclipperz\", \"URL\":\"http://www.amazon.com\", \"Password\":\"wvpkqNPIsqlI5g6XE9Tz\", \"Notes\":\"The US online store\"}, {\"Title\":\"Paypal\", \"Group\":\"General\", \"UserName\":\"joeclipperz\", \"URL\":\"http://www.paypal.com\", \"Password\":\"24T4wIcvHnM28T3L\", \"Notes\":\"Linked to my savings account\"}, {\"Title\":\"Technorati\", \"Group\":\"General\", \"UserName\":\"jclipperz\", \"URL\":\"http://www.technorati.com\", \"Password\":\"UcVeNqF\", \"Notes\":\"Blog ranking and searching\"}, {\"Title\":\"American Airlines\", \"Group\":\"General\", \"UserName\":\"joe.clipperz\", \"URL\":\"http://www.aa.com\", \"Password\":\"AtrYbmi7lmSjR\", \"Notes\":\"Adavantages card n. 795495\"}]", "second test"); }); deferredResult.addErrback(function(anError) { is("ERROR", anError) }); deferredResult.addCallback(function(aResult) { return "[Gmail]\nGroup: General\nUserName: joe.clipperz\nURL: http://www.gmail.com\nPassword: NHy08ZCMYsqUeLQCawR7\nNotes: Personal account\nwith some notes stored\non multiple lines\n\n[del.icio.us]\nGroup: General\nUserName: joe69\nURL: http://del.icio.us\nPassword: tS1cIEeqp5y0wkU\nNotes: social bookmarking site\n\n[Amazon]\nGroup: General\nUserName: jclipperz\nURL: http://www.amazon.com\nPassword: wvpkqNPIsqlI5g6XE9Tz\nNotes: The US online store\n\n[Paypal]\nGroup: General\nUserName: joeclipperz\nURL: http://www.paypal.com\nPassword: 24T4wIcvHnM28T3L\nNotes: Linked to my savings account\n\n[Technorati]\nGroup: General\nUserName: jclipperz\nURL: http://www.technorati.com\nPassword: UcVeNqF\nNotes: Blog ranking and searching\n\n[American Airlines]\nGroup: General\nUserName: joe.clipperz\nURL: http://www.aa.com\nPassword: AtrYbmi7lmSjR\nNotes: Adavantages card n. 795495\n" }); deferredResult.addCallback(MochiKit.Base.method(keePassProcessor, 'deferredParse')); deferredResult.addCallback(function(aResult) { is(MochiKit.Base.serializeJSON(aResult), "[{\"Title\":\"Gmail\", \"Group\":\"General\", \"UserName\":\"joe.clipperz\", \"URL\":\"http://www.gmail.com\", \"Password\":\"NHy08ZCMYsqUeLQCawR7\", \"Notes\":\"Personal account\\nwith some notes stored\\non multiple lines\\n\"}, {\"Title\":\"del.icio.us\", \"Group\":\"General\", \"UserName\":\"joe69\", \"URL\":\"http://del.icio.us\", \"Password\":\"tS1cIEeqp5y0wkU\", \"Notes\":\"social bookmarking site\"}, {\"Title\":\"Amazon\", \"Group\":\"General\", \"UserName\":\"jclipperz\", \"URL\":\"http://www.amazon.com\", \"Password\":\"wvpkqNPIsqlI5g6XE9Tz\", \"Notes\":\"The US online store\"}, {\"Title\":\"Paypal\", \"Group\":\"General\", \"UserName\":\"joeclipperz\", \"URL\":\"http://www.paypal.com\", \"Password\":\"24T4wIcvHnM28T3L\", \"Notes\":\"Linked to my savings account\"}, {\"Title\":\"Technorati\", \"Group\":\"General\", \"UserName\":\"jclipperz\", \"URL\":\"http://www.technorati.com\", \"Password\":\"UcVeNqF\", \"Notes\":\"Blog ranking and searching\"}, {\"Title\":\"American Airlines\", \"Group\":\"General\", \"UserName\":\"joe.clipperz\", \"URL\":\"http://www.aa.com\", \"Password\":\"AtrYbmi7lmSjR\", \"Notes\":\"Adavantages card n. 795495\"}]", "third test"); }); deferredResult.addErrback(function(anError) { is("ERROR", anError) }); deferredResult.addBoth(SimpleTest.finish); deferredResult.callback(); /* var set; var object1; var object2; var object3; set = new Clipperz.Set(); object1 = new Object(); object2 = new Object(); object3 = new Object(); object1.label = "object 1"; object2.label = "object 2"; object3.label = "object 3"; is(set.size(), 0, "A new set should be empty"); set.add(object1); is(set.size(), 1); is(set.contains(object1), true); is(set.contains(object2), false); set.add(object1); is(set.size(), 1, "Adding the same object twice does not change the set content"); is(set.contains(object1), true); is(set.contains(object2), false); set.add(object2); is(set.size(), 2); is(set.contains(object1), true); is(set.contains(object2), true); is(set.contains(object3), false); set.remove(object1); is(set.size(), 1, "Size check after removing an object"); is(set.contains(object1), false); is(set.contains(object2), true); is(set.contains(object3), false); set.remove(object1); is(set.size(), 1, "Removing twice the same object does not change the set content"); is(set.contains(object1), false); is(set.contains(object2), true); is(set.contains(object3), false); set.empty(); is(set.size(), 0); diff --git a/frontend/gamma/tests/tests/Clipperz/Set.html b/frontend/gamma/tests/tests/Clipperz/Set.html index 82bb249..401d89c 100644 --- a/frontend/gamma/tests/tests/Clipperz/Set.html +++ b/frontend/gamma/tests/tests/Clipperz/Set.html @@ -1,51 +1,49 @@ <!-- -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/. --> <html> <head> <title>Clipperz.Set - test</title> <script type="text/javascript" src="../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="../../SimpleTest/test.css"> <script type='text/javascript' src='../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Set.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../js/Clipperz/Async.js'></script> <script type="text/javascript" src="../../SimpleTest/SimpleTest.Async.js"></script> </head> <body> <pre id="test"> <script type="text/javascript" src="Set.test.js"></script> </pre> </body> </html> diff --git a/frontend/gamma/tests/tests/Clipperz/Set.test.js b/frontend/gamma/tests/tests/Clipperz/Set.test.js index f908816..f5574ee 100644 --- a/frontend/gamma/tests/tests/Clipperz/Set.test.js +++ b/frontend/gamma/tests/tests/Clipperz/Set.test.js @@ -1,118 +1,116 @@ /* -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/. */ var tests = { //------------------------------------------------------------------------- 'set_test': function (someTestArgs) { var deferredResult; deferredResult = new Clipperz.Async.Deferred("set_test", someTestArgs); deferredResult.addCallback(function () { var set; var object1; var object2; var object3; set = new Clipperz.Set(); object1 = new Object(); object2 = new Object(); object3 = new Object(); object1.label = "object 1"; object2.label = "object 2"; object3.label = "object 3"; is(set.size(), 0, "A new set should be empty"); set.add(object1); is(set.size(), 1); is(set.contains(object1), true); is(set.contains(object2), false); set.add(object1); is(set.size(), 1, "Adding the same object twice does not change the set content"); is(set.contains(object1), true); is(set.contains(object2), false); set.add(object2); is(set.size(), 2); is(set.contains(object1), true); is(set.contains(object2), true); is(set.contains(object3), false); set.remove(object1); is(set.size(), 1, "Size check after removing an object"); is(set.contains(object1), false); is(set.contains(object2), true); is(set.contains(object3), false); set.remove(object1); is(set.size(), 1, "Removing twice the same object does not change the set content"); is(set.contains(object1), false); is(set.contains(object2), true); is(set.contains(object3), false); set.empty(); is(set.size(), 0); { var items; var populatedSet; items = ["item1", "item2", "item3"]; populatedSet = new Clipperz.Set({'items': items}); is(populatedSet.size(), 3); is(populatedSet.contains("item1"), true); is(populatedSet.contains("item4"), false); items.splice(0, items.length); is(populatedSet.size(), 3); } { var items; var deletedItems; items = ["item1", "item2", "item3"]; set = new Clipperz.Set({'items': items}); deletedItems = ["item1"]; set.remove(deletedItems); is(set.size(), 2, "here I am"); is(set.contains("item1"), false); is(set.contains("item2"), true); set = new Clipperz.Set({'items': items}); deletedItems = ["item1", "item2"]; set.remove(deletedItems); is(set.size(), 1); is(set.contains("item1"), false); is(set.contains("item2"), false); set = new Clipperz.Set({'items': items}); diff --git a/frontend/gamma/tests/tests/Clipperz/index.html b/frontend/gamma/tests/tests/Clipperz/index.html index d4556eb..c86cbe0 100644 --- a/frontend/gamma/tests/tests/Clipperz/index.html +++ b/frontend/gamma/tests/tests/Clipperz/index.html @@ -1,46 +1,44 @@ <!-- -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/. --> <html> <head> <title>Clipperz.* - tests</title> <script type="text/javascript" src="../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../SimpleTest/TestRunner.js"></script> </head> <body> <script> TestRunner.runTests( 'Async.html', 'Base.html', 'ByteArray.html', 'Date.html', 'DOM.html', 'KeePassExportProcessor.html', 'RoboFormExportProcessor.html', 'Set.html' ); </script> </body> </html>
\ No newline at end of file diff --git a/frontend/gamma/tests/tests/Clipperz/index_googleCode.html b/frontend/gamma/tests/tests/Clipperz/index_googleCode.html index 3878809..cf07043 100644 --- a/frontend/gamma/tests/tests/Clipperz/index_googleCode.html +++ b/frontend/gamma/tests/tests/Clipperz/index_googleCode.html @@ -1,47 +1,45 @@ <!-- -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/. --> <html> <head> <script type="text/javascript" src="../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../SimpleTest/TestRunner.js"></script> </head> <body> <script> TestRunner.runTests( 'Base.html', 'ByteArray.html', 'NotificationCenter.html', 'Set.html', 'Crypto/AES.html', 'Crypto/BigInt.html', 'Crypto/PRNG.html', 'Crypto/SHA.html', 'Crypto/ECC.html', 'Crypto/SRP.html' ); </script> </body> </html>
\ No newline at end of file diff --git a/frontend/gamma/tests/tests/Clipperz/index_testECC.html b/frontend/gamma/tests/tests/Clipperz/index_testECC.html index bac17d1..34039fd 100644 --- a/frontend/gamma/tests/tests/Clipperz/index_testECC.html +++ b/frontend/gamma/tests/tests/Clipperz/index_testECC.html @@ -1,47 +1,45 @@ <!-- -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/. --> <html> <head> <script type="text/javascript" src="../../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../../SimpleTest/TestRunner.js"></script> </head> <body> <script> TestRunner.runTests( // 'Base.html', 'ByteArray.html', // 'Crypto/AES.html', 'Crypto/BigInt.html', // 'Crypto/PRNG.html', // 'Crypto/SHA.html', // 'Crypto/SRP.html', // 'Crypto/ECC.html', 'Crypto/ECC.BinaryField.FiniteField.html', 'Crypto/ECC.BinaryField.Value.html' ); </script> </body> </html>
\ No newline at end of file diff --git a/frontend/gamma/tests/tests/Components/CardDialogEditing/CardDialogEditing_test.js b/frontend/gamma/tests/tests/Components/CardDialogEditing/CardDialogEditing_test.js index d2136af..b052384 100644 --- a/frontend/gamma/tests/tests/Components/CardDialogEditing/CardDialogEditing_test.js +++ b/frontend/gamma/tests/tests/Components/CardDialogEditing/CardDialogEditing_test.js @@ -1,118 +1,116 @@ /* -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.Tests.CardDialogEditing'); Clipperz.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); Clipperz.PM.Strings.Languages.initSetup(); Clipperz.Tests.CardDialogEditing.Tester = function(args) { args = args || {}; Clipperz.Tests.CardDialogEditing.Tester.superclass.constructor.call(this, args); //# this._user = new Clipperz.PM.DataModel.User({username:'test', getPassphraseFunction:function () { return 'test';}}); this._user = new Clipperz.PM.DataModel.User({username:'joe', getPassphraseFunction:function () { return 'clipperz';}}); return this; }; Clipperz.Base.extend(Clipperz.Tests.CardDialogEditing.Tester, Object, { 'toString': function() { return "Clipperz.Tests.CardDialogEditing.Tester"; }, //------------------------------------------------------------------------- 'user': function () { return this._user; }, //------------------------------------------------------------------------- 'run': function () { var deferredResult; var proxy; var cardDialogController; var cardDialogComponent; proxy = new Clipperz.PM.Proxy.Test({shouldPayTolls:true, isDefault:true, readOnly:false}); deferredResult = new Clipperz.Async.Deferred("CardDialogEditing_test.init", {trace:false}); //# deferredResult.addMethod(proxy.dataStore(), 'setupWithEncryptedData', testData['test_test_offline_copy_data']); deferredResult.addMethod(proxy.dataStore(), 'setupWithEncryptedData', testData['joe_clipperz_offline_copy_data_newVersion']); deferredResult.addMethod(this.user(), 'login'); //# deferredResult.addMethod(this.user(), 'getRecord', '8280842f41162b673335b63860637e8472e8bbff0efa2bc78b0dbc5e09712e13'); // deferredResult.addMethod(this.user(), 'getRecord', '062af892bcfba49ffcff05c56d99b7af2d508358e39c058c2e1fc83531436f80'); // Linkedin // deferredResult.addMethod(this.user(), 'getRecord', '084e23120544603f0297368fd3891a3818e0fe13488e2f2c6079913c8d1bed8d'); // Example Attack deferredResult.addMethod(this.user(), 'getRecord', '13a5e52976337ab210903cd04872588e1b21fb72bc183e91aa25c494b8138551'); // Amazon // deferredResult.addMethod(this.user(), 'getRecord', '507f38b06d587d8889698ae1ebbba7ef8f0539b82550dd25779fd9ee88fc0c7a'); // MyBlogLog // deferredResult.addMethod(this.user(), 'getRecord', '6026370f3db3860d2c46a08e389a7e906dc14f98c8444b21be9a7e9f405a2728'); // Del.icio.us // deferredResult.addMethod(this.user(), 'getRecord', '6c25be8e145efb26a1abd59590522f73fb2e3dbc139af2217074d9e2ba92c16a'); // Microsoft Office Key // deferredResult.addMethod(this.user(), 'getRecord', '6d45c2fec275b7482d41c76b20507100cfb6ab49922b876f9dd3040d361f4a18'); // The NewYork Times // deferredResult.addMethod(this.user(), 'getRecord', '7bb69b6366a8012f181c01e368ba18d4f7a82bcabb4959189736ad124c4bbfbb'); // Web Password // deferredResult.addMethod(this.user(), 'getRecord', '8b18e8593b5bc2f7ea39a5fab222047034ef2f380fee05be0fa6e1c0972fea39'); // Jaiku // deferredResult.addMethod(this.user(), 'getRecord', '9dcd2a8a0fcb7e57d234dc4fea347f020a6a01793e40cf56a0d22379e590e291'); // Home Burglar Alarm // deferredResult.addMethod(this.user(), 'getRecord', 'ca01bcb7691f70818feed46c9a2a91883ac543997a395535aedbb49de166690c'); // MySpace // deferredResult.addMethod(this.user(), 'getRecord', 'd620764a656bfd4e1d3758500d5db72e460a0cf729d56ed1a7755b5725c50045'); // American Airlines // deferredResult.addMethod(this.user(), 'getRecord', 'de13c0d036234c44214062bc0a89e5f127470c464333493a485729f43cdc26e4'); // Luftansa // deferredResult.addMethod(this.user(), 'getRecord', 'eeda70e0392261967bda71c3764da78989c45bbd2bb7be6b941b90f81d9b81b5'); // Google Account // deferredResult.addMethod(this.user(), 'getRecord', 'f215d89bf4583c12f5ed4f4330f488dad3fffa448f4dc784f15ef135dda2c732'); // Expedia // deferredResult.addMethod(this.user(), 'getRecord', 'fe21497ef7435d31f9746c132e4b5ecf5aac5f13b5961ddb55d2bdc3409f28f6'); // Bloglines // deferredResult.addMethod(this.user(), 'getRecord', '5cdac63b317f3942da38f3a3de3b7f0e5d6678200951c6216230295550f63fb4'); // WEB PASSWORD (0) // deferredResult.addMethod(this.user(), 'getRecord', '36ec1a41118813ced3553534fa2607d781cba687768db305beed368a8e06e113'); // DIGG (1) // deferredResult.addMethod(this.user(), 'getRecord', 'c0ce9130ca365bb02418d4305ea1d29e49c3f0e96d44b9d3cb6b4b6843d25065'); // SAP (2) // deferredResult.addMethod(this.user(), 'getRecord', 'd5f700b9c3367c39551ea49e00a9ab20dae09dd79d46047b983fc7c4bfaa050d'); // YAHOO (4) // deferredResult.addMethod(this.user(), 'createNewRecord'); /* deferredResult.addCallback(function (aRecord) { return Clipperz.Async.callbacks("CardDialogEditing_test.init - setup new record", [ MochiKit.Base.method(aRecord, 'setLabel', "Clipperz staging site"), MochiKit.Base.method(aRecord, 'addField', {'label':"URL", 'value':"http://d6.clipperz.com", 'isHidden':false}), MochiKit.Base.method(aRecord, 'addField', {'label':"USERNAME", 'value':"staging", 'isHidden':false}), MochiKit.Base.method(aRecord, 'addField', {'label':"PASSWORD", 'value':"drupal", 'isHidden':true}), MochiKit.Base.method(aRecord, 'createNewDirectLogin'), function (aDirectLogin) { return Clipperz.Async.callbacks("CardDialogEditing_test.init - setup new record [directLogin]", [ MochiKit.Base.method(aDirectLogin, 'setLabel', 'Clipperz staging site'), MochiKit.Base.method(aDirectLogin, 'setFavicon', 'http://www.apple.com/favicon.ico'), MochiKit.Base.method(aDirectLogin, 'setBookmarkletConfiguration', '{ "page":{"title":"HTTP authentication"},\n "form":{"attributes": {\n "action":"",\n "type":"http_auth"\n }, "inputs": [\n {"type":"text","name":"url","value":""},\n {"type":"text","name":"username","value":""},\n {"type":"password","name":"password","value":""}\n ]}, "version":"0.2.3"}'), MochiKit.Base.method(aDirectLogin, 'bindFormFieldWithLabelToRecordFieldWithLabel', 'url', 'URL'), MochiKit.Base.method(aDirectLogin, 'bindFormFieldWithLabelToRecordFieldWithLabel', 'username', 'USERNAME'), MochiKit.Base.method(aDirectLogin, 'bindFormFieldWithLabelToRecordFieldWithLabel', 'password', 'PASSWORD') ], {trace:false}); }, MochiKit.Base.partial(MochiKit.Async.succeed, aRecord) ], {trace:false}); }); // deferredResult.addMethod(this.user(), 'createNewRecord'); deferredResult.addCallback(function (aRecord) { diff --git a/frontend/gamma/tests/tests/Components/CardDialogEditing/User.data.js b/frontend/gamma/tests/tests/Components/CardDialogEditing/User.data.js index 0e55ff5..2a8fca3 100644 --- a/frontend/gamma/tests/tests/Components/CardDialogEditing/User.data.js +++ b/frontend/gamma/tests/tests/Components/CardDialogEditing/User.data.js @@ -1,118 +1,116 @@ /* -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/. */ testData = { //------------------------------------------------------------------------- 'simpleLogin_001': { 'users': [ { 'username': "joe", 'passphrase': "eoj", 'version': "0.2", 'connectionVersion': "0.2", 'records': { 'record 1': { 'notes': "Some notes here", 'fields': [ { 'name': "username", 'value': "joe", 'type': "text" }, { 'name': "password", 'value': "1234", 'type': "password" } ], 'directLogins': { "record 1 direct login": { 'configuration': "", 'bindings': [ ], 'favicon': "http://www.example.com/favicon.ico" } } } }, 'otp': [ "12345678 90abcdef 12345678 90abcdef", "fedcba09 87654321 fedcba09 87654321" ] } ] }, //------------------------------------------------------------------------- 'joe_clipperz_offline_copy_data': { users:{ 'catchAllUser': { __masterkey_test_value__: 'masterkey', s: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00', v: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00' }, 'f527cdd90d0d47f8524b4e165398ad1455eba515d04abd101d1e93b3c6ae0674': { s: '186f0c40bf73f2af236eaa6c429df225efa933050c9aae65240e93b7b362e3ee', v: 'ac61a6e325ecf329926a86084f591d8852d0ad3e4a6080f2adc901b82395ecaf', version: '0.2', maxNumberOfRecords: '100', userDetails: '{"records":{"index":{"eeda70e0392261967bda71c3764da78989c45bbd2bb7be6b941b90f81d9b81b5":"0","13a5e52976337ab210903cd04872588e1b21fb72bc183e91aa25c494b8138551":"1","062af892bcfba49ffcff05c56d99b7af2d508358e39c058c2e1fc83531436f80":"2","ca01bcb7691f70818feed46c9a2a91883ac543997a395535aedbb49de166690c":"3","507f38b06d587d8889698ae1ebbba7ef8f0539b82550dd25779fd9ee88fc0c7a":"4","d5f700b9c3367c39551ea49e00a9ab20dae09dd79d46047b983fc7c4bfaa050d":"5","de13c0d036234c44214062bc0a89e5f127470c464333493a485729f43cdc26e4":"6","d620764a656bfd4e1d3758500d5db72e460a0cf729d56ed1a7755b5725c50045":"7","f215d89bf4583c12f5ed4f4330f488dad3fffa448f4dc784f15ef135dda2c732":"8","36ec1a41118813ced3553534fa2607d781cba687768db305beed368a8e06e113":"9","fe21497ef7435d31f9746c132e4b5ecf5aac5f13b5961ddb55d2bdc3409f28f6":"10","6d45c2fec275b7482d41c76b20507100cfb6ab49922b876f9dd3040d361f4a18":"11","9dcd2a8a0fcb7e57d234dc4fea347f020a6a01793e40cf56a0d22379e590e291":"12","6c25be8e145efb26a1abd59590522f73fb2e3dbc139af2217074d9e2ba92c16a":"13","6026370f3db3860d2c46a08e389a7e906dc14f98c8444b21be9a7e9f405a2728":"14","8b18e8593b5bc2f7ea39a5fab222047034ef2f380fee05be0fa6e1c0972fea39":"15","084e23120544603f0297368fd3891a3818e0fe13488e2f2c6079913c8d1bed8d":"16","7bb69b6366a8012f181c01e368ba18d4f7a82bcabb4959189736ad124c4bbfbb":"17","5cdac63b317f3942da38f3a3de3b7f0e5d6678200951c6216230295550f63fb4":"18","c0ce9130ca365bb02418d4305ea1d29e49c3f0e96d44b9d3cb6b4b6843d25065":"19"},"data":"6tqzHY7/lB/JVfDi3iJ7BIJTiX1Fih//aTUF7IDoLdlnafC9hoIQ/5lGk+/Ezilw59n11ocPN31aOA9ddFGc9oa2vQ1BdymV8F91sWGLGyWft+PRCWOqxy7U1XxvbgyRbCs0mbtSLp/qlC6gewnAXJpH6KT9oURIjKkyaR8jJ7ng6IlfGUIL2KUFnAv6KNoWO5cdXDU0nrrdSYehcApmXYlTyreHDbrFlLJ2YuR9JLvw9bDxXi/xBY1wZgwiUsGVl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4+6y4HVuRCgxztzRyUiYTssFphqKBsC/e6fQN0QtSwhLSld/B5qoPMn/9CMs8UxmRbA2Ekwi+7Ss51YsWNmd8dKUqxMKWFZOQYe2dbvcYbRwKwjrARxR7d5aaQr8b96hKsWs0YkLQDn71C3AQfEUvClvDXJdJ97B9WkDHz/DQ9EaIp9+4ZSl3SIrew09vUkvUSVGU7egHzv1Oe2gf4jI/3zToRq307AzCT1tF4k0VbInDFKb8YSG35UaJAtfTENvkAQ+8KmR3gQyHRupLi6D8TNvy/03n8naG8BV8+EArzmUAgxmfv3PTipnn3bdsaIFK1+uldQXVUoHm7PgZidzOHpNXvNzgrL3c3gv7Et/s="},"directLogins":{"index":{"61e87fdc4f1d9112e3b30c1f6812d095dcdb24f014c83319091eb6c9899ec348":"0","989593d4c48929f0c8f1581aa96969c622807e99619ed4732026e967530a68ad":"1","9f7979368fa29f66c44bd97ecaf6c545abc800b1c7bb21b7655a68e1514c3906":"2","dba0db679802f0e6aa6d0b7a6aaf42350aabc5f057409edd99a268a92ebb6496":"3","aa18149164302d5dbe7e2d3724565b9550e00887b49978559783b2e38c625584":"4","1f9bfd677b531a03168d3f8bd8afabb5357244a7bc355dff50bd6c0a072114a6":"5","a48e38845713462ecc9f827149eeaae87da882031f98ef8ebbf9ee9537b63468":"6","6f7bbc4e42ea462b5246e6f51c3f86056bec50601ce2de6067c8c1d26f21c07f":"7","2df54059e78f5771f23bd285cce19595b38331b73d67020424d9a1b2257db09c":"8","065cd0c270e5e8ce50e4ea8e3828dccdae18c01ab030813d756a87d03fe68784":"9","ddbc8d01300a4f10631cbde09e1246332eade3a877a2205209f9eb9e5bc9da0b":"10","9b7a30e667afc9f76ba77600658b2c13bff52432d444261d39bf3d069a160afe":"11","9fd2929cde3d32d9cbc5f1d787f2f64729a5e12a14410556b31c0c099762c46a":"12","f695fc36ac56bead80c0d20a88e01e382819c18dc268f1679551b7c83db7cb14":"13","f22dc41ffabef4b3bc8f7af804fec975bd50718098322a673cbe4aaff9464ae1":"14","03251dc1cbc5398789e4c4b45c52cfac3fcd8c1a4f19a81fa68fc6feae31d55c":"15","a7b32e72502804bf2946a2a8856139cbbb759c5777e6b3e673db1fdf7e3bd06e":"16","cb9ae0bba1957075ccdbfd3b3481704d62087687a2ac7c411a4f07d444bde0f7":"17","7e1d069b7fa57c03bd7bf48807520feb953157834503aaff8c9d493f37dea69d":"18","24404059cabc63b2dbff0f42ba57183108b8189ef53ab62fa25141a1caea824b":"19","33cf9758477460a8056deef0295a1ebe65b39b392c361ceb920a83edacfe5d78":"20","e9a16316f330e3d150f6ffd194f6fd8acd1426757b097de4b88ca0db875202e4":"21"},"data":"xuiWbu5GjkueQhyH6sKg5Cn9/CSsPIjYgbhaHmjgwnnB+GL8UO5u0uURxTY6tkG2HbaFRpYZwLnqUUulEkVY6iNqJajFI0qDtrKams11cF2y9LaAalbqyv6U7EUt76d666DkXW8tf88nJ4HYfyAhhPCJ0cw5053K9BAVPbQM7fMA4MYY29k45U3HcIKNZcNqMftCc+fZB+fmZl1g7mSbrXaZyagRkwWwTdJ6/ecVOSSVOkWpckAaQWzGhwbO6zVWLtR9XQReIQZV52TwDMnV5IYJHnlw0Uvv2ZCVSu/oMN2TneW5fcIwQ0x/SRe+n4Mklzucpvasza+ZhRaRUFS53kvmbfPFI5tXqB3Z1+9S7LRLr9Ws97suTQ6G5eW6jKT2vf65ehnQJtA/gW6uwH+3IAT7ukFxO1knaRf7dRJDLuIc4Xnh+bRDnZUqfA+B+04pp6r0OS9oysD35t/HydVFeHgoyMCbL4RzduZvmu7y16WhIznn0DEfRmrYmC68C+DNcAbxeiXU8v14PgGycIg1++0v44Qor/BXfP5JW4WnYjVLW3aXN3FgI5rPuN6PqTzMn7z+eF2V28GNss5pui1xIbR2bTECAAnaRQiaz98F1LH4z5kYG1ehmyjIOLqz1nAv3Kuo7+DZKaSez4nX1oWznbXEnwd6uguukcCGpQllZoHYso/fz07e6p/9fskXPmg7LnMMHApP7Vay6XPhXV/AG0imU7uREFLb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dWEw9dWSZdkSI34+OkLfAKf6W6z4G4Z+cMRrkYLHs+BavJOum4XTjyyXHIKhQiqz9mgEf+ulodXi+LNsbq1eCcGPWrGg+GNwN1SjJHZm78gidyrlEF6xuPCaZRvGQtk59nuJULOZWkC3Ns/EcFiAql8cu37Lp842fsHHeCVOq0e8ZII4TPg9HKPwDD4HLSg4frBzyeZwK0nN30C5ATCxWdL4Q60cKtZyIEM7Kn1a/vifsAbe019Ui3ovTOCYiTCAdOLaAL/NdpgWA/fDNOsTlPvnEYkq+4+bV3Wyye9ddxICD4TnC2yvXvjw4C/WnYYceJy5R4KamIJueEGIHGp22/0DSF3H4ji3QoUDiFB/H+CA8A2q9LO9q0NYcf2P5q2MfdJGu4bd49g68mltj35pRnGQaafflXY9VmMfrlAbBYfUnsKOb3DOUpq8asveE41/6WkGcXFIuSABcbBf0cHIfBn41wRWQhoCm/JL8pfqEZC/paBdFBRW4FjKkxhbg4BPvBL0aQyGGkU8eH8tr8nm4YN1HMFF/s3s8+9FPoBxPuXLoGSg7Rvdz+g=="},"version":"0.1"}', statistics: 'SfGy/4mpXQdDOv+Bcfie4Yt/', userDetailsVersion: '0.3', records: { '062af892bcfba49ffcff05c56d99b7af2d508358e39c058c2e1fc83531436f80': { data: '7sgxSQlqR+wh3g06M2+sWp7raQxjjQ9jLIz2OcEB7SckuQcXNrhMlDCbL6ncSljtzgqhioWrOB409kIG8lc7h6ekghOE/Mhi7rVwAiRfNGB7r3mYxpEXRe96O2RG7E+NcSp8ezl+5gJ9D0o1abXPeFQYGcr95hUioCfyY+xrxY8TJVwdb9nHkYvBdKV7rCl1dTxgsKWK3nlo1T7e5uyiz5YUAE6BrCtTFAqtprLI/xOpRti9C+llohS7D6s8hkCBPZfp3chKFDrgpsCBFLhXN8jrBKSjHi1PJdRQzpJsgrxyeBj0dZx3gTsYOXqrYgdIzFUo7K1Tqb30yNprBiDMr7j0YYXiSvEb7OuOIP+HTXGN+yt09bk9LggyY6Fh0e+tenjQQ3soySN/XznOBpEjXbzXoz6fR1MXVnE9GgaX99LVNqwWfq2rIBdSE/FfspRiWP3BY5jIrEkNeRclS05U1zw3K3wxOL+cB9r2IynSXnK8QcrDNNRZ0W3PhsSFfByUXuviLSEOPuJa1mYP29L9Lj/WyHL1Gyl8xLbt2H41S6+wvIleKMuc7teH6wPXbnYphvbwBowoI6HZTEFkz3dQKhhY6VF/81iCXsuaz6BjyrzFX6SkQ4S3lN1tv4opQMJFvnmHb6EkXqVWfeIXzJIJO+owL4vDOf4okpAD+HPjjlVXhq6fvyM5UBIK9+tzJW78X/zifrQOfWRIhwjVsfUdZWmZ/S35vnHWNuXkM8GBYrDysqxanDtah3U8XLAiIhFtBOzpzr6qGaNDOKKgG3K8QXT4bYHOq1rQVUwzQuKhlCyStrRMQrC5Ry251xmLy6dKfppRarVeGDtzB/30BbtFNdZmzMNG2g+Jj5tFCrEtCMvMiQEWZHMU3tGMFxDef/KKdv1fFTJC16jmaUiCHUZmNjB3EO9R6xPVcMlAVKf57n3efrpRk/GTmm9JhAFkuF/wsveH4JjPpDUdkHYFu5tHbb30sbga3ufBAXbQL4ck10S24akU/cKraFGLvuKGaR2U0i6ih911TBSf3pAfZ3RFbBhVIl+6rSknC5+IXoBR7MRstBPW/xC9pQVjN5Qyn0g3aUjUSI+q4jcTuvMl32NtTJbWRMGhfkrpVzypZTyPnIh6XJkyBghlUARXw23MlbjiZxmY4ScDmcWZRZJWIknHlqjDKFDKNnwrfnEI9qWyMDno+jA/DEQz0mnpdZYEsoz1/qAmAeDt89vx', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 CET 2007', updateDate: 'Wed Mar 14 15:46:44 CET 2007', accessDate: 'Mon Jan 19 16:10:04 CET 2009', currentVersion: '4a70ca20167875a936d4540f19980e972c20f329a65d85e9b0ce709f1fc7c7e3', versions: { '4a70ca20167875a936d4540f19980e972c20f329a65d85e9b0ce709f1fc7c7e3': { header: '####', data: 'GCNNIhDQjMJQZGVSf+95fPtU6eOnFWVhuGm86r8WZGVR2Gf2EjbG1OJ0ZIGpZ/AXgirCMpo5AFxJe0Bay8IYg+xmBqMFhwFxzAgJBYCIts+raSaNRipuY8dTEqDxAqD1cChcG8EhSoiFgQ0fG0I7nNEUDJi0pIt4/ygBcwvAhuAenEp9ZW+oQA0+YysPQRqkz3IieFaOoSEbe5/SqpUilV4q1gTVyzNXvrxzxx+rlvEyGFgFN+vgtUZ1NrwlPk4gVksTpylvv6CFaMGEWKhgMG6efo0rJckKosaJTu1pldJdnmMK4EKNMLOd+jZ6pEhEhYyadrA4+zYU5TlmZA6ASzTaps8piSwZodoi9qY0ch2StK4mAbzeEGe2HdfHuAU9Tyq3Ppk3+VfNdKgpQfYrQOiSlXbKzK636tzXTN/gyrfOTHjBrRl117ywibgSX63ayAYNfcLpKotC', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 CET 2007', updateDate: 'Wed Mar 14 15:46:44 CET 2007', accessDate: 'Mon Jan 19 16:10:04 CET 2009' } } }, '084e23120544603f0297368fd3891a3818e0fe13488e2f2c6079913c8d1bed8d': { data: 'fGzBu1On7e/6rAoSB1a4fq/CkS8Be/T8UP5cQ93asBTWndSYu2lW4DQ4SXQXSindIi3OnNx/f6SNv/extb7OrMLREF92wXI045ipPwy+DIICb+cQNMJ82Sh4cXaIcAWcyrm+MYri3qq9LBKbpwkILcebZidJ86lmKYHJozUezmfbMcwNCljHs/gYkHVzVcuw9L52Ugc6wC7sjsshh+UH6i4/2Frlrophtx+b1vervNd8eoYiKnedHVXVfW7UJcQoF27eHFgzwYnGvRW0KNXFFhqmPb61TSkIvNdCCvBKDP4SXrWvGgzU89wipvWdUPpQ+fCT6Mp3hPRrbJxwMunmjujZOzBld/HkjnXoiNfBb5akA280WvdyzWYATrjV1ZFx8yQY8G0+lRt/MxjKDc38w4y+Rf5WeRbXboJMvFatwooHUggk6qSRmZVvgOmFmNuDRnRYIFzqK3JclhJeVasnqhR6RiGSowc1Ffr1HhcZCMnXpQABGBkZcHD/zw6YjHRyh9Plw7XAm0xb16HMDtiwt7WLJpxLH/HP99j/A2hvMGWiUiFCaYv7AzyEPTmYbN32D1IsAEE/GC3FG0HypGTBolP8wpAfTRdlvWpJz8oRRdwuLV3Pgpu+kXh5sQyeZI6tnuMPQFmRDcMN1oo3E5V5V585nVMnKTFcXhBzD4UnoV+DQNkG/+iSPybQzz/EZmucEqGEYyjI3kl4MAX8UMEUxE4JO0fF8MzyBI13nxknowAceEammx1dGVaJCoIOdhadaPVPyOzXM1Vp1erVm5k4TsxSx1pll+GOm6hVoNHIuQLDueaMEpRxMhfwc8cDyXURqRGPTgTc0bint5xVjo10fnpX1gcdc/AWL6y3tXM80NW+uFJ4GI7VzyzfcMRzTiRaGi19z8MIx8PbIVGh2sw4FhgGujNsPrpuESvUVT+17M0+v8oEoABNlcizTMFs/sA1uqlPumFASltzmViAzClOsDuCh069hFLjdk/Ex5jy4vPYlwOT8Uq9DJC9ZWuZgiI1DrhWN/8QGAEGxxbvnSZPNCQ9kpD5p+iabinLLWOAirVNgKwIRJRyAu/uR9xKd7J9Wxq8q/ii+y5lGilbo2g24wbDwrkXYVhqp/4J0g+p8Wv1NBjCTSCqV39WEizUCRHo3ee9HnQnBJQDOyTBRuz2odTJtJ5tLYjWXZRdFzFSJrEq+Z1z3oq7LnhZy3YWaFXPeKmBCemMthtNt0nL', version: '0.3', creationDate: 'Fri Oct 17 16:49:20 CEST 2008', updateDate: 'Mon Oct 27 08:58:49 CET 2008', accessDate: 'Mon Jan 19 16:09:39 CET 2009', currentVersion: '6fd60c5709a4808444f43f7bbd872363d76703957f613076538ba2f9161206ac', versions: { '0ae362285f103722abbd046eee2b7d10aeae6a1d05cbaf2081392ce9df882bcf': { header: '####', data: 'sG6TUmPSEPFpiJ5YdtghWHmHbvUK63tZCZ+Q5iz2ALas//jN+lZCBhZcjEwPEJskBkK2R0MyAh14wWGh2bBHMjsokgTe+L+x+0c/Zi0epE/IC9gtOBhsTe/hZ2e2xOGF/SbzET3DAAYXvxduZ36f7SvvFnrkkKvpj8wGSdTFcBmzqMb9DL2bRyRCLGLMzE3F1a0q5CufCIRz2TgHm+Uw+kfvvwC7ig/F/5iLW90Ypz3vmEtMEFYFHZ9a8Oh0rsXGfevbMhFqALoywzihQEe/NiB8dwn7GEdYKSQ35rhvZh29ULWOZinqmg0ONe0HYaxx7DbKsVoue57S0CIUlgHLajzHfLfqQg2sFI0OT8TnHsGg0YZ6mM2EdKmEjJiER0cP', version: '0.3', creationDate: 'Fri Oct 17 17:00:31 CEST 2008', updateDate: 'Fri Oct 17 17:00:31 CEST 2008', accessDate: 'Fri Oct 17 17:00:31 CEST 2008' }, '10f45664bbd979a92f37886f1ecc6e52e49798b16dc997aecd37259ad9b2090e': { header: '####', data: 'RdKVaV/WWWchrCse3KtcXd47Bfm6IAwjqVUpaxoed3HeunI42AAm7xYYSjeK8edHpbNRJbhobBAX5OZtWIp/HmgkobKM8CIiWxrWz89FqyrbnPD7+fXdtgF2yTax/0sC1l0ibncdOuJKX6U829oPlXCpXIOjlomc4wEEAD/5V6FbORvdZ9IE/ME3LsG2y02cT2tIpx6+R6wC/PKXhZA2UDsTE6R2Op2BtIzpVORZLXsdyAp/4wvWQxq90i9cEpbsVQsMB10JVyNHNsRTFhIlHi9MVCaMxQvcrwRElMj/Y9x3RbsFzSGKqFLqdg7Fn/U+KYkpYtsgHv9hraPIb9lV5FH16+iItU/HBM6FGezIj1ZkoQ+dgjPfSjTZzgzDYwyb', version: '0.3', creationDate: 'Fri Oct 17 16:49:20 CEST 2008', diff --git a/frontend/gamma/tests/tests/Components/CardDialogEditing/dragAndDrop_test.js b/frontend/gamma/tests/tests/Components/CardDialogEditing/dragAndDrop_test.js index 91909fa..cfe94d4 100644 --- a/frontend/gamma/tests/tests/Components/CardDialogEditing/dragAndDrop_test.js +++ b/frontend/gamma/tests/tests/Components/CardDialogEditing/dragAndDrop_test.js @@ -1,118 +1,116 @@ /* -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.Tests.DragAndDrop'); Clipperz.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); Clipperz.PM.Strings.Languages.initSetup(); Clipperz.Tests.DragAndDrop.Tester = function(args) { args = args || {}; Clipperz.Tests.DragAndDrop.Tester.superclass.constructor.call(this, args); this._user = new Clipperz.PM.DataModel.User({username:'test', getPassphraseFunction:function () { return 'test';}}); return this; }; Clipperz.Base.extend(Clipperz.Tests.DragAndDrop.Tester, Object, { 'toString': function() { return "Clipperz.Tests.DragAndDrop.Tester"; }, //------------------------------------------------------------------------- 'user': function () { return this._user; }, //------------------------------------------------------------------------- 'run': function () { var deferredResult; var proxy; var cardDialogController; var cardDialogComponent; proxy = new Clipperz.PM.Proxy.Test({shouldPayTolls:true, isDefault:true, readOnly:false}); deferredResult = new Clipperz.Async.Deferred("DragAndDrop_test.init", {trace:false}); deferredResult.addMethod(proxy.dataStore(), 'setupWithEncryptedData', testData['test_test_offline_copy_data']); deferredResult.addMethod(this.user(), 'login'); deferredResult.addMethod(this.user(), 'getRecord', '8280842f41162b673335b63860637e8472e8bbff0efa2bc78b0dbc5e09712e13'); deferredResult.addCallback(MochiKit.Base.bind(function (aRecord) { cardDialogController = new Clipperz.PM.UI.Web.Controllers.CardDialogController({record:aRecord, delegate:this}); cardDialogController.run(); cardDialogController.showPasswordTooltip('**********', MochiKit.DOM.getElement('Clipperz_PM_Components_actionLink_63')); }, this)); deferredResult.callback(); return deferredResult; }, //========================================================================= 'saveChanges': function () { return this.user().saveChanges(); }, //------------------------------------------------------------------------- 'hasPendingChanges': function () { return this.user().hasPendingChanges(); }, //------------------------------------------------------------------------- 'revertChanges': function () { return this.user().revertChanges(); }, //========================================================================= __syntaxFix__: "syntax fix" }); init = function () { diff --git a/frontend/gamma/tests/tests/Components/CardDialogEditing/index.html b/frontend/gamma/tests/tests/Components/CardDialogEditing/index.html index e484719..70a6d87 100644 --- a/frontend/gamma/tests/tests/Components/CardDialogEditing/index.html +++ b/frontend/gamma/tests/tests/Components/CardDialogEditing/index.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <title>Card Dialog EDITING - test</title> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Date.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/DOM.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Signal.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Style.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Visual.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Set.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Toll.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Offline.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Test.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Connection.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Crypto.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings/Strings_en-US.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Date.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/BookmarkletProcessor.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/EncryptedRemoteObject.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Version.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Version.Field.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/DirectLogin.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/DirectLoginInput.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/DirectLoginBinding.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/DirectLoginFormValue.js'></script> <!-- script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Field.js'></script --> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.Legacy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.RecordIndex.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.Preferences.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.OneTimePasswords.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/OneTimePassword.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/BaseComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/ComponentSlot.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/FaviconComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/PasswordEntropyDisplay.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/ProgressBar.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/TabPanelComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/Tooltip.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/TranslatorWidget.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/RulerComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/CardDialogComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/CardDialogRecordFieldComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/CardDialogRecordDirectLoginComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/DirectLoginEditingComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/DirectLoginEditingBindingComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/DirectLoginEditingFormValueComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/BookmarkletComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/PasswordTooltip.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Controllers/ProgressBarController.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Controllers/TabPanelController.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Controllers/DirectLoginRunner.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js'></script> <script type='text/javascript' src='./User.data.js'></script> <script type='text/javascript' src='./CardDialogEditing_test.js'></script> <script> Clipperz_IEisBroken = false; </script> <!--[if IE]><script> Clipperz_IEisBroken = true; </script><![endif]--> diff --git a/frontend/gamma/tests/tests/Components/CardDialogNew/User.data.js b/frontend/gamma/tests/tests/Components/CardDialogNew/User.data.js index 49abe46..ba60878 100644 --- a/frontend/gamma/tests/tests/Components/CardDialogNew/User.data.js +++ b/frontend/gamma/tests/tests/Components/CardDialogNew/User.data.js @@ -1,118 +1,116 @@ /* -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/. */ testData = { //------------------------------------------------------------------------- 'simpleLogin_001': { 'users': [ { 'username': "joe", 'passphrase': "eoj", 'version': "0.2", 'connectionVersion': "0.2", 'records': { 'record 1': { 'notes': "Some notes here", 'fields': [ { 'name': "username", 'value': "joe", 'type': "text" }, { 'name': "password", 'value': "1234", 'type': "password" } ], 'directLogins': { "record 1 direct login": { 'configuration': "", 'bindings': [ ], 'favicon': "http://www.example.com/favicon.ico" } } } }, 'otp': [ "12345678 90abcdef 12345678 90abcdef", "fedcba09 87654321 fedcba09 87654321" ] } ] }, //------------------------------------------------------------------------- 'joe_clipperz_offline_copy_data': { users:{ 'catchAllUser': { __masterkey_test_value__: 'masterkey', s: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00', v: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00' }, 'f527cdd90d0d47f8524b4e165398ad1455eba515d04abd101d1e93b3c6ae0674': { s: '186f0c40bf73f2af236eaa6c429df225efa933050c9aae65240e93b7b362e3ee', v: 'ac61a6e325ecf329926a86084f591d8852d0ad3e4a6080f2adc901b82395ecaf', version: '0.2', maxNumberOfRecords: '100', userDetails: '{"records":{"index":{"eeda70e0392261967bda71c3764da78989c45bbd2bb7be6b941b90f81d9b81b5":"0","13a5e52976337ab210903cd04872588e1b21fb72bc183e91aa25c494b8138551":"1","062af892bcfba49ffcff05c56d99b7af2d508358e39c058c2e1fc83531436f80":"2","ca01bcb7691f70818feed46c9a2a91883ac543997a395535aedbb49de166690c":"3","507f38b06d587d8889698ae1ebbba7ef8f0539b82550dd25779fd9ee88fc0c7a":"4","d5f700b9c3367c39551ea49e00a9ab20dae09dd79d46047b983fc7c4bfaa050d":"5","de13c0d036234c44214062bc0a89e5f127470c464333493a485729f43cdc26e4":"6","d620764a656bfd4e1d3758500d5db72e460a0cf729d56ed1a7755b5725c50045":"7","f215d89bf4583c12f5ed4f4330f488dad3fffa448f4dc784f15ef135dda2c732":"8","36ec1a41118813ced3553534fa2607d781cba687768db305beed368a8e06e113":"9","fe21497ef7435d31f9746c132e4b5ecf5aac5f13b5961ddb55d2bdc3409f28f6":"10","6d45c2fec275b7482d41c76b20507100cfb6ab49922b876f9dd3040d361f4a18":"11","9dcd2a8a0fcb7e57d234dc4fea347f020a6a01793e40cf56a0d22379e590e291":"12","6c25be8e145efb26a1abd59590522f73fb2e3dbc139af2217074d9e2ba92c16a":"13","6026370f3db3860d2c46a08e389a7e906dc14f98c8444b21be9a7e9f405a2728":"14","8b18e8593b5bc2f7ea39a5fab222047034ef2f380fee05be0fa6e1c0972fea39":"15","084e23120544603f0297368fd3891a3818e0fe13488e2f2c6079913c8d1bed8d":"16","7bb69b6366a8012f181c01e368ba18d4f7a82bcabb4959189736ad124c4bbfbb":"17","5cdac63b317f3942da38f3a3de3b7f0e5d6678200951c6216230295550f63fb4":"18","c0ce9130ca365bb02418d4305ea1d29e49c3f0e96d44b9d3cb6b4b6843d25065":"19"},"data":"6tqzHY7/lB/JVfDi3iJ7BIJTiX1Fih//aTUF7IDoLdlnafC9hoIQ/5lGk+/Ezilw59n11ocPN31aOA9ddFGc9oa2vQ1BdymV8F91sWGLGyWft+PRCWOqxy7U1XxvbgyRbCs0mbtSLp/qlC6gewnAXJpH6KT9oURIjKkyaR8jJ7ng6IlfGUIL2KUFnAv6KNoWO5cdXDU0nrrdSYehcApmXYlTyreHDbrFlLJ2YuR9JLvw9bDxXi/xBY1wZgwiUsGVlG3j0e4f63mJVrpmPI1jhaXD3BQD8cbl96l1ImhYe1Boz53gLq94KSk+3bkjG4GRhvlDPtvk8vdSZPsYPsbC0Cu0M4TMS70nPX7qNj5LDvzrd+S+zDj1/CW0yctRThXstrxDyG/L75k/xdZcVbMzXQHQR4OwWWFiqGOnLpyiZIHGfV5+xZ1a1uxT9TPDoDdwPuE5P1Uwh3PeGc9jatk3waQN6fo3g8PQrCOtPn7C7b6y4MEjpAG4e53HFb0B/hEfK6ApycT6QAglsA3qF/tZyZbwNCwert4pG52rIG/PODZ1XxVZHFX8VFWeSxuk/jnPpJg/pvfpRzBMyCGVDJb/i+dlwFcnOAVvqju5xXJk4mu05XrngF10NzHnVRMfxwXmdtTDYE/lDuODy1SiE5yBZlt/Ff6a0eMS/P8HLsUS8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4c48929f0c8f1581aa96969c622807e99619ed4732026e967530a68ad":"1","9f7979368fa29f66c44bd97ecaf6c545abc800b1c7bb21b7655a68e1514c3906":"2","dba0db679802f0e6aa6d0b7a6aaf42350aabc5f057409edd99a268a92ebb6496":"3","aa18149164302d5dbe7e2d3724565b9550e00887b49978559783b2e38c625584":"4","1f9bfd677b531a03168d3f8bd8afabb5357244a7bc355dff50bd6c0a072114a6":"5","a48e38845713462ecc9f827149eeaae87da882031f98ef8ebbf9ee9537b63468":"6","6f7bbc4e42ea462b5246e6f51c3f86056bec50601ce2de6067c8c1d26f21c07f":"7","2df54059e78f5771f23bd285cce19595b38331b73d67020424d9a1b2257db09c":"8","065cd0c270e5e8ce50e4ea8e3828dccdae18c01ab030813d756a87d03fe68784":"9","ddbc8d01300a4f10631cbde09e1246332eade3a877a2205209f9eb9e5bc9da0b":"10","9b7a30e667afc9f76ba77600658b2c13bff52432d444261d39bf3d069a160afe":"11","9fd2929cde3d32d9cbc5f1d787f2f64729a5e12a14410556b31c0c099762c46a":"12","f695fc36ac56bead80c0d20a88e01e382819c18dc268f1679551b7c83db7cb14":"13","f22dc41ffabef4b3bc8f7af804fec975bd50718098322a673cbe4aaff9464ae1":"14","03251dc1cbc5398789e4c4b45c52cfac3fcd8c1a4f19a81fa68fc6feae31d55c":"15","a7b32e72502804bf2946a2a8856139cbbb759c5777e6b3e673db1fdf7e3bd06e":"16","cb9ae0bba1957075ccdbfd3b3481704d62087687a2ac7c411a4f07d444bde0f7":"17","7e1d069b7fa57c03bd7bf48807520feb953157834503aaff8c9d493f37dea69d":"18","24404059cabc63b2dbff0f42ba57183108b8189ef53ab62fa25141a1caea824b":"19","33cf9758477460a8056deef0295a1ebe65b39b392c361ceb920a83edacfe5d78":"20","e9a16316f330e3d150f6ffd194f6fd8acd1426757b097de4b88ca0db875202e4":"21"},"data":"xuiWbu5GjkueQhyH6sKg5Cn9/CSsPIjYgbhaHmjgwnnB+GL8UO5u0uURxTY6tkG2HbaFRpYZwL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sKOb3DOUpq8asveE41/6WkGcXFIuSABcbBf0cHIfBn41wRWQhoCm/JL8pfqEZC/paBdFBRW4FjKkxhbg4BPvBL0aQyGGkU8eH8tr8nm4YN1HMFF/s3s8+9FPoBxPuXLoGSg7Rvdz+g=="},"version":"0.1"}', statistics: 'SfGy/4mpXQdDOv+Bcfie4Yt/', userDetailsVersion: '0.3', records: { '062af892bcfba49ffcff05c56d99b7af2d508358e39c058c2e1fc83531436f80': { data: '7sgxSQlqR+wh3g06M2+sWp7raQxjjQ9jLIz2OcEB7SckuQcXNrhMlDCbL6ncSljtzgqhioWrOB409kIG8lc7h6ekghOE/Mhi7rVwAiRfNGB7r3mYxpEXRe96O2RG7E+NcSp8ezl+5gJ9D0o1abXPeFQYGcr95hUioCfyY+xrxY8TJVwdb9nHkYvBdKV7rCl1dTxgsKWK3nlo1T7e5uyiz5YUAE6BrCtTFAqtprLI/xOpRti9C+llohS7D6s8hkCBPZfp3chKFDrgpsCBFLhXN8jrBKSjHi1PJdRQzpJsgrxyeBj0dZx3gTsYOXqrYgdIzFUo7K1Tqb30yNprBiDMr7j0YYXiSvEb7OuOIP+HTXGN+yt09bk9LggyY6Fh0e+tenjQQ3soySN/XznOBpEjXbzXoz6fR1MXVnE9GgaX99LVNqwWfq2rIBdSE/FfspRiWP3BY5jIrEkNeRclS05U1zw3K3wxOL+cB9r2IynSXnK8QcrDNNRZ0W3PhsSFfByUXuviLSEOPuJa1mYP29L9Lj/WyHL1Gyl8xLbt2H41S6+wvIleKMuc7teH6wPXbnYphvbwBowoI6HZTEFkz3dQKhhY6VF/81iCXsuaz6BjyrzFX6SkQ4S3lN1tv4opQMJFvnmHb6EkXqVWfeIXzJIJO+owL4vDOf4okpAD+HPjjlVXhq6fvyM5UBIK9+tzJW78X/zifrQOfWRIhwjVsfUdZWmZ/S35vnHWNuXkM8GBYrDysqxanDtah3U8XLAiIhFtBOzpzr6qGaNDOKKgG3K8QXT4bYHOq1rQVUwzQuKhlCyStrRMQrC5Ry251xmLy6dKfppRarVeGDtzB/30BbtFNdZmzMNG2g+Jj5tFCrEtCMvMiQEWZHMU3tGMFxDef/KKdv1fFTJC16jmaUiCHUZmNjB3EO9R6xPVcMlAVKf57n3efrpRk/GTmm9JhAFkuF/wsveH4JjPpDUdkHYFu5tHbb30sbga3ufBAXbQL4ck10S24akU/cKraFGLvuKGaR2U0i6ih911TBSf3pAfZ3RFbBhVIl+6rSknC5+IXoBR7MRstBPW/xC9pQVjN5Qyn0g3aUjUSI+q4jcTuvMl32NtTJbWRMGhfkrpVzypZTyPnIh6XJkyBghlUARXw23MlbjiZxmY4ScDmcWZRZJWIknHlqjDKFDKNnwrfnEI9qWyMDno+jA/DEQz0mnpdZYEsoz1/qAmAeDt89vx', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 CET 2007', updateDate: 'Wed Mar 14 15:46:44 CET 2007', accessDate: 'Mon Jan 19 16:10:04 CET 2009', currentVersion: '4a70ca20167875a936d4540f19980e972c20f329a65d85e9b0ce709f1fc7c7e3', versions: { '4a70ca20167875a936d4540f19980e972c20f329a65d85e9b0ce709f1fc7c7e3': { header: '####', data: 'GCNNIhDQjMJQZGVSf+95fPtU6eOnFWVhuGm86r8WZGVR2Gf2EjbG1OJ0ZIGpZ/AXgirCMpo5AFxJe0Bay8IYg+xmBqMFhwFxzAgJBYCIts+raSaNRipuY8dTEqDxAqD1cChcG8EhSoiFgQ0fG0I7nNEUDJi0pIt4/ygBcwvAhuAenEp9ZW+oQA0+YysPQRqkz3IieFaOoSEbe5/SqpUilV4q1gTVyzNXvrxzxx+rlvEyGFgFN+vgtUZ1NrwlPk4gVksTpylvv6CFaMGEWKhgMG6efo0rJckKosaJTu1pldJdnmMK4EKNMLOd+jZ6pEhEhYyadrA4+zYU5TlmZA6ASzTaps8piSwZodoi9qY0ch2StK4mAbzeEGe2HdfHuAU9Tyq3Ppk3+VfNdKgpQfYrQOiSlXbKzK636tzXTN/gyrfOTHjBrRl117ywibgSX63ayAYNfcLpKotC', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 CET 2007', updateDate: 'Wed Mar 14 15:46:44 CET 2007', accessDate: 'Mon Jan 19 16:10:04 CET 2009' } } }, '084e23120544603f0297368fd3891a3818e0fe13488e2f2c6079913c8d1bed8d': { data: 'fGzBu1On7e/6rAoSB1a4fq/CkS8Be/T8UP5cQ93asBTWndSYu2lW4DQ4SXQXSindIi3OnNx/f6SNv/extb7OrMLREF92wXI045ipPwy+DIICb+cQNMJ82Sh4cXaIcAWcyrm+MYri3qq9LBKbpwkILcebZidJ86lmKYHJozUezmfbMcwNCljHs/gYkHVzVcuw9L52Ugc6wC7sjsshh+UH6i4/2Frlrophtx+b1vervNd8eoYiKnedHVXVfW7UJcQoF27eHFgzwYnGvRW0KNXFFhqmPb61TSkIvNdCCvBKDP4SXrWvGgzU89wipvWdUPpQ+fCT6Mp3hPRrbJxwMunmjujZOzBld/HkjnXoiNfBb5akA280WvdyzWYATrjV1ZFx8yQY8G0+lRt/MxjKDc38w4y+Rf5WeRbXboJMvFatwooHUggk6qSRmZVvgOmFmNuDRnRYIFzqK3JclhJeVasnqhR6RiGSowc1Ffr1HhcZCMnXpQABGBkZcHD/zw6YjHRyh9Plw7XAm0xb16HMDtiwt7WLJpxLH/HP99j/A2hvMGWiUiFCaYv7AzyEPTmYbN32D1IsAEE/GC3FG0HypGTBolP8wpAfTRdlvWpJz8oRRdwuLV3Pgpu+kXh5sQyeZI6tnuMPQFmRDcMN1oo3E5V5V585nVMnKTFcXhBzD4UnoV+DQNkG/+iSPybQzz/EZmucEqGEYyjI3kl4MAX8UMEUxE4JO0fF8MzyBI13nxknowAceEammx1dGVaJCoIOdhadaPVPyOzXM1Vp1erVm5k4TsxSx1pll+GOm6hVoNHIuQLDueaMEpRxMhfwc8cDyXURqRGPTgTc0bint5xVjo10fnpX1gcdc/AWL6y3tXM80NW+uFJ4GI7VzyzfcMRzTiRaGi19z8MIx8PbIVGh2sw4FhgGujNsPrpuESvUVT+17M0+v8oEoABNlcizTMFs/sA1uqlPumFASltzmViAzClOsDuCh069hFLjdk/Ex5jy4vPYlwOT8Uq9DJC9ZWuZgiI1DrhWN/8QGAEGxxbvnSZPNCQ9kpD5p+iabinLLWOAirVNgKwIRJRyAu/uR9xKd7J9Wxq8q/ii+y5lGilbo2g24wbDwrkXYVhqp/4J0g+p8Wv1NBjCTSCqV39WEizUCRHo3ee9HnQnBJQDOyTBRuz2odTJtJ5tLYjWXZRdFzFSJrEq+Z1z3oq7LnhZy3YWaFXPeKmBCemMthtNt0nL', version: '0.3', creationDate: 'Fri Oct 17 16:49:20 CEST 2008', updateDate: 'Mon Oct 27 08:58:49 CET 2008', accessDate: 'Mon Jan 19 16:09:39 CET 2009', currentVersion: '6fd60c5709a4808444f43f7bbd872363d76703957f613076538ba2f9161206ac', versions: { '0ae362285f103722abbd046eee2b7d10aeae6a1d05cbaf2081392ce9df882bcf': { header: '####', data: 'sG6TUmPSEPFpiJ5YdtghWHmHbvUK63tZCZ+Q5iz2ALas//jN+lZCBhZcjEwPEJskBkK2R0MyAh14wWGh2bBHMjsokgTe+L+x+0c/Zi0epE/IC9gtOBhsTe/hZ2e2xOGF/SbzET3DAAYXvxduZ36f7SvvFnrkkKvpj8wGSdTFcBmzqMb9DL2bRyRCLGLMzE3F1a0q5CufCIRz2TgHm+Uw+kfvvwC7ig/F/5iLW90Ypz3vmEtMEFYFHZ9a8Oh0rsXGfevbMhFqALoywzihQEe/NiB8dwn7GEdYKSQ35rhvZh29ULWOZinqmg0ONe0HYaxx7DbKsVoue57S0CIUlgHLajzHfLfqQg2sFI0OT8TnHsGg0YZ6mM2EdKmEjJiER0cP', version: '0.3', creationDate: 'Fri Oct 17 17:00:31 CEST 2008', updateDate: 'Fri Oct 17 17:00:31 CEST 2008', accessDate: 'Fri Oct 17 17:00:31 CEST 2008' }, '10f45664bbd979a92f37886f1ecc6e52e49798b16dc997aecd37259ad9b2090e': { header: '####', data: 'RdKVaV/WWWchrCse3KtcXd47Bfm6IAwjqVUpaxoed3HeunI42AAm7xYYSjeK8edHpbNRJbhobBAX5OZtWIp/HmgkobKM8CIiWxrWz89FqyrbnPD7+fXdtgF2yTax/0sC1l0ibncdOuJKX6U829oPlXCpXIOjlomc4wEEAD/5V6FbORvdZ9IE/ME3LsG2y02cT2tIpx6+R6wC/PKXhZA2UDsTE6R2Op2BtIzpVORZLXsdyAp/4wvWQxq90i9cEpbsVQsMB10JVyNHNsRTFhIlHi9MVCaMxQvcrwRElMj/Y9x3RbsFzSGKqFLqdg7Fn/U+KYkpYtsgHv9hraPIb9lV5FH16+iItU/HBM6FGezIj1ZkoQ+dgjPfSjTZzgzDYwyb', version: '0.3', creationDate: 'Fri Oct 17 16:49:20 CEST 2008', diff --git a/frontend/gamma/tests/tests/Components/CardDialogNew/cardDialogNew_test.js b/frontend/gamma/tests/tests/Components/CardDialogNew/cardDialogNew_test.js index 60a2757..9eba347 100644 --- a/frontend/gamma/tests/tests/Components/CardDialogNew/cardDialogNew_test.js +++ b/frontend/gamma/tests/tests/Components/CardDialogNew/cardDialogNew_test.js @@ -1,118 +1,116 @@ /* -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.Tests.CardDialogNew'); Clipperz.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); Clipperz.PM.Strings.Languages.initSetup(); Clipperz.Tests.CardDialogNew.Tester = function(args) { args = args || {}; Clipperz.Tests.CardDialogNew.Tester.superclass.constructor.call(this, args); this._user = new Clipperz.PM.DataModel.User({username:'test', getPassphraseFunction:function () { return 'test';}}); return this; }; Clipperz.Base.extend(Clipperz.Tests.CardDialogNew.Tester, Object, { 'toString': function() { return "Clipperz.Tests.CardDialogNew.Tester"; }, //------------------------------------------------------------------------- 'user': function () { return this._user; }, //------------------------------------------------------------------------- 'run': function () { var deferredResult; var proxy; var cardDialogController; var cardDialogComponent; proxy = new Clipperz.PM.Proxy.Test({shouldPayTolls:true, isDefault:true, readOnly:false}); deferredResult = new Clipperz.Async.Deferred("cardDialogNew_test.init", {trace:false}); deferredResult.addMethod(proxy.dataStore(), 'setupWithEncryptedData', testData['test_test_offline_copy_data']); deferredResult.addMethod(this.user(), 'login'); // deferredResult.addMethod(this.user(), 'getRecord', '8280842f41162b673335b63860637e8472e8bbff0efa2bc78b0dbc5e09712e13'); deferredResult.addMethod(this.user(), 'createNewRecord'); deferredResult.addCallback(MochiKit.Base.bind(function (aRecord) { cardDialogController = new Clipperz.PM.UI.Web.Controllers.CardDialogController({record:aRecord, delegate:this}); cardDialogController.run(); }, this)); deferredResult.callback(); return deferredResult; }, //========================================================================= 'saveChanges': function () { return this.user().saveChanges(); }, //------------------------------------------------------------------------- 'hasPendingChanges': function () { return this.user().hasPendingChanges(); }, //------------------------------------------------------------------------- 'revertChanges': function () { return this.user().revertChanges(); }, //========================================================================= __syntaxFix__: "syntax fix" }); init = function () { var tester; diff --git a/frontend/gamma/tests/tests/Components/CardDialogNew/index.html b/frontend/gamma/tests/tests/Components/CardDialogNew/index.html index 64f9e4d..ff8c77f 100644 --- a/frontend/gamma/tests/tests/Components/CardDialogNew/index.html +++ b/frontend/gamma/tests/tests/Components/CardDialogNew/index.html @@ -1,112 +1,110 @@ <!-- -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/. --> <html> <head> <title>Card Dialog NEW - test</title> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Date.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/DOM.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Signal.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Style.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Visual.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Set.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Toll.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Offline.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Test.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Connection.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Crypto.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings/Strings_en-US.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Date.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/EncryptedRemoteObject.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Version.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Version.Field.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/DirectLogin.js'></script> <!-- script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Field.js'></script --> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.Legacy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.RecordIndex.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/BaseComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/Button.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/ComponentSlot.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/PasswordEntropyDisplay.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/ProgressBar.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/TabPanelComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/Tooltip.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/TranslatorWidget.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/CardDialogComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/CardDialogRecordFieldComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Controllers/ProgressBarController.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Controllers/TabPanelController.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js'></script> <script type='text/javascript' src='./User.data.js'></script> <script type='text/javascript' src='./cardDialogNew_test.js'></script> <script> Clipperz_IEisBroken = false; </script> <!--[if IE]><script> Clipperz_IEisBroken = true; </script><![endif]--> <link rel="stylesheet" type="text/css" href="../../../../css/web.css" /> </head> <body> <div id="tableWrapper"></div> </body> </html> diff --git a/frontend/gamma/tests/tests/Components/FullApp/User.data.js b/frontend/gamma/tests/tests/Components/FullApp/User.data.js index 4dfc81c..fb099c0 100644 --- a/frontend/gamma/tests/tests/Components/FullApp/User.data.js +++ b/frontend/gamma/tests/tests/Components/FullApp/User.data.js @@ -1,118 +1,116 @@ /* -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/. */ testData = { //------------------------------------------------------------------------- 'testData': { users:{ 'catchAllUser': { __masterkey_test_value__: 'masterkey', s: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00', v: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00' }, /* tt/tt - empty, just created, account */ 'afaadd70f647886043b9196c861dc04f5605baeab3812ea23707fcba08c4a54f': { s: 'df781ec363a380a0bb171d7d4c226248259272a964f04fa2340c77ff84bbc594', v: 'eca214d990ec971a61cd9c5082e62c2d241f8e1ec805a2c26b1d31612747bfb0', version: '0.2', maxNumberOfRecords: '100', userDetails: '{"records":{"index":{},"data":"q/wNeY/xf7Sujn5CIxEYPRSF"},"directLogins":{"index":{},"data":"qcVwiiyOYeDHFZq5T06iF1Wp"},"preferences":{"data":"7ONKfKQk9GYGnlRxFgTgAd4J"},"oneTimePasswords":{"data":"GD66ZNSIqkRl1UxhwyrsSm5r"},"version":"0.1"}', statistics: 'tfQF+BrjAQUWyiXWOMkWApmq', userDetailsVersion: '0.3', records: { } }, /* tt/tt - account with "wrong" direct login */ /* 'afaadd70f647886043b9196c861dc04f5605baeab3812ea23707fcba08c4a54f': { s: 'df781ec363a380a0bb171d7d4c226248259272a964f04fa2340c77ff84bbc594', v: 'eca214d990ec971a61cd9c5082e62c2d241f8e1ec805a2c26b1d31612747bfb0', version: '0.2', maxNumberOfRecords: '100', userDetails: '{"records":{"index":{"8bcad18cc9613d794ca052c02e91198f7d5b6e1b7d595f21b21ea53a72e56aab":"1"},"data":"/+RHG+JLrFhZLYga2H9hsPyugT5bbiPwmNgY/RqE2g90FXfsCOvJ6TnfHX6ufeVfJ5+jUq/mRhWMlKdIqROSBLRL5EbL7i881EyKMNE24zpzUWm9zN6HcATPO2iNvDjsZjv2dEP9QWtAabw4Hc7UB+39WQ=="},"directLogins":{"index":{"dd9c1f84d06d67fe1ca5826b52bf46e56407e7f9d87fb7b7b927831920955338":1},"data":"ZF6BZYAVIJi3xrCPs6XWHwZDveEonG/5WJVKwIXbCGa5fr1myopvpqYbWI09tPCCktlMKP/X/SiIyBxlq7Z953VpOHWx0AYqTpRnw8PfJ+0BJDEblBFCZ8ZZfkZXcfYmNoY7"},"preferences":{"data":"IpjYNIHTXtE/pZvR8TjotEnR"},"oneTimePasswords":{"data":"1ibPl0R6S/LGBFFyH9pio1Oo"},"version":"0.1"}', statistics: 'XhiWkdDyHzuviv5bdxOY/2Q5', userDetailsVersion: '0.3', records: { '8bcad18cc9613d794ca052c02e91198f7d5b6e1b7d595f21b21ea53a72e56aab': { data: '93QXl+c+JmQo4WTl4rYLYb/oHehjntAroteeHd6HqrUiXYoi+02GYrYcKfvE5wgMWvOwvQ4kVdUv5ksa3gJaUzhrpY5GLM3EV3agEkQ6yuKwHgfmAQvES1c6tcw15lNTzGiZ7PHhBrW5I5H6Le0Mf10uW1DOyu6gFl+W5OarbBBGyQmRmASy+CW2l3/lY5pOFxUq3qlkwW/o4KrSiwKOFh3HDvxOQKwovm0v3puLu+NsuL5rz5blUIZpj+CsOmZUhtU5FC5s6iO2L1uj3w8+Yxu279p249H1bv1zxo1zSBpP507uuRH8dKOLsu7JI6PO+UC8PLqVhPU7fHhDhNleurE7AsUo6eHocG0DhxCAm3xeobm1K2iPd0iRprcuRXmwa8HWRDJHTItbQr9D+cnQTT7/DwneRdQzpMaVZHZcKqtAzz07jboy98plrigu03tV2MkXt2veIMLBofxxHqgZ0NJhcfrVta4FlJsrd1vO9RUkoHl+qPJqQZIVGZzoT0rdHS/nLd614EHJSfRYIl+drUEUchIidbRnMzvPTBo2s6bVfUPcQksVop4E85wMo15ah2BHzUe4vjkmM+Ki8ecUVH8jRR5fmZhCGpBFML5U7o+rERYABFuwwRC9FfCXMtmClHc2LypP+iu+lI/VycdHg/m8skQVeCDBv892vqehUs1CpeVAxMtYOJcFtm6roQNPxJe1EI/j4PAi3SEYPCFev1F7u1g4bw4cG5jCGJx6U3qTTYMX5A06dHf4iSSOUeCsrP5U+VJY0KLhU3E66DzOxNIrIyYN6iOJxKCbhH7ILfGdWAV3MlZZOpVoSIqiR7oZo2PwovtudF5tOy9lhz7SEFYLvuQy8r4mqFC7qMVnXJRrBPDZcQDTdXLG33YV6dWX17QpGrpyvPhX5/UDv8E7zc8PdO1YfJmzL1rpArlIXF1EOsLa6BqjQp5bkIlHKugQMjnn3tf4sYK0OhPskbKidfNm59NedQODEoUr5NGwmjSAqTCokt1D7q0K3vMK', version: '0.3', creationDate: 'Wed Jan 20 16:53:47 CET 2010', updateDate: 'Wed Jan 20 16:53:47 CET 2010', accessDate: 'Wed Jan 20 16:53:47 CET 2010', currentVersion: '79047c5ca148b2915014c44d75874cfedf3caee20cd9f97a87ba2a291ccec741', versions: { '79047c5ca148b2915014c44d75874cfedf3caee20cd9f97a87ba2a291ccec741': { header: '####', data: 'mqqGPhRw/397NUZH6B8XJW1y5rMDZD6u7WUuEU77zcNXYEHFNQq319u0G/qD5E63kbI/kHsNXZFFKmNGw5IxDiteWSfYG4RiiapsUxe3ZgsFDDBHFrD5NSrMdIzLFSoNel+1mZUps9AcmkelhkXSCqRiGPyiPIKq7wKXF+Ql6j1AsnCMOCJLlJdTZPqIUUaTYD4z/tvTOS1xRdUiaRjw7cCh2yMms1c5V//3J0xbO10kEC8xvA8nhJnQqsMh2P4h6QFzAZtXYKMehJXwQ5ap7W327EMnCdXw2N0pv9Lr5S9khN/9oTMy2tMIGtN+UZ684zTiAP+479xES6OvmVL04nGyCarIqMNu7oclR75Qv2U14CNRA3gIaMPv', version: '0.3', creationDate: 'Wed Jan 20 16:53:47 CET 2010', updateDate: 'Wed Jan 20 16:53:47 CET 2010', accessDate: 'Wed Jan 20 16:53:47 CET 2010' } } } } }, */ /* tt/tt with "fixed" direct login */ 'afaadd70f647886043b9196c861dc04f5605baeab3812ea23707fcba08c4a54f': { s: 'df781ec363a380a0bb171d7d4c226248259272a964f04fa2340c77ff84bbc594', v: 'eca214d990ec971a61cd9c5082e62c2d241f8e1ec805a2c26b1d31612747bfb0', version: '0.2', maxNumberOfRecords: '100', userDetails: '{"records":{"index":{"8bcad18cc9613d794ca052c02e91198f7d5b6e1b7d595f21b21ea53a72e56aab":"0"},"data":"K6sV3xYDTHn1PDHmbVhG3PogarwMtHCliSEGaJ5eev/RQv7MW9TCP5efsjATRT4eheX7JkXAoLo+sgMVr2fTyu7f7K0IEYp3mCi27T/TmtTM3b8FoaVfmXWEjN0FGx7N6gK6+lZxhFueRxsOha1+fTLDBg=="},"directLogins":{"index":{"dd9c1f84d06d67fe1ca5826b52bf46e56407e7f9d87fb7b7b927831920955338":"0"},"data":"9aUwb/5nIlAOPKz62xTwylK0dilpWVVEJBag5+LydmBwWxTmlfcB+OO6jGnMgDrjif3LVhWFjfKVSoZs5hSpPvhsSDPaLf5vQhF4igRaQpWI9QhBdfmv3QvZ57ei/gfcal346F4="},"preferences":{"data":"IpjYNIHTXtE/pZvR8TjotEnR"},"oneTimePasswords":{"data":"1ibPl0R6S/LGBFFyH9pio1Oo"},"version":"0.1"}', statistics: 'GHHkZjW0QLdUq6CPnVuDLh86', userDetailsVersion: '0.3', records: { '8bcad18cc9613d794ca052c02e91198f7d5b6e1b7d595f21b21ea53a72e56aab': { data: 'SOcANZTLo4dsjpsPghF2+TndV9+1uYhGjup3StEa1kiFHHzDK6kDZkKwjhP0mxFgixlQHZBnvgsW/xdHGXdmj1RHtaNdHlte7W1Wq5MHbH4XE9bJzQAvQmop8OETgGz7Khp4BbUMVLIXhxoJmP3rMx7ulQHds+WN+S5u+iB73y5nkJwfOXrXDjwwlL1vER92XHE1VJZAjkYRB/xes6SLcITaG9LYVSGSVAhtLIzkmrAvPHPIpZSOI4NQnAMEVPllwtMlWQBEeerN7PIKImyaUd9zPzP+v0S1V+kUyioizScsDdVuaNKa+yqwFKvYYy61nobv3Mg+Fo3EGqY7GOiO7AklRTreZoOkZAdogQlA1DZuIBNSbpcMvm5MoP+PsU3HFSb/Vioo+QEcgTWqVyDNuFGZpkOI2iIBuQCwLmsCwB1JaE/1cCd1fEpOWyiFep0vxwi0ZrtRZQowQd2Ua3UIoaG5u5WoYEMYoH7FFi6Djda4Rf4gxed8rPLE+cNTI/p67OKlbAfr8iz3YZknaH+CXp9pPr7V7xXBCWNxo5DnFPeeqqrxjTAbkeg/Rp2hJeN7/zi0TSWKDUTXfkuUNyewHOHb7M+MIvC1F1CtmqLuU3h8RDINYgPtZTtTk68YBmOG88xYTtClr4kKxmp1scrV3nJ7af+IGoVKZpRAwBJYT3HV33vzO9W35zl14eZ0vVuNoHMNsh9uDxjCwRyPtQzVpQuTIYnHHoO5R17XyIfe599BOSBAGimciprURN3llC2H8YhRtMilQRYvEDVsC+mVZmGAeEdQ5o/AehnpBuVKErRBzotWe6bNMkIQqWfwCLQFBb6ap1gT5hbacrJM4AlaPgOdQsyX9npd3yN/tzjVA1IqWLnoaEXq9EfWXhBuT+juMfSQ2Y8bPbpBKZmWWL06T2fVkaZJN0VFtBXGi0XRFJngPskApLunZOfBYq831jSi8/Z937QVTQKWwOz6rLE8covE3mxJ53gDVcOlvqD9s/NGXbmnt2GnlWhVKpzhTIJ812Hr050/2AI9ZmWnv+ypSqeQ3l0BFh4D+xfk5NRv+dKbxANheZnfZMhR6u8F+jX/W3hUtNCIMQc2vLSQ', version: '0.3', creationDate: 'Wed Jan 20 16:53:47 CET 2010', updateDate: 'Wed Jan 20 16:54:56 CET 2010', accessDate: 'Wed Jan 20 16:54:56 CET 2010', currentVersion: 'c0a8f723bf44e0aae1d69f6f85f8e1b747dfbe5ca0d78c5ebda16b32cf17e16d', versions: { '79047c5ca148b2915014c44d75874cfedf3caee20cd9f97a87ba2a291ccec741': { header: '####', data: 'mqqGPhRw/397NUZH6B8XJW1y5rMDZD6u7WUuEU77zcNXYEHFNQq319u0G/qD5E63kbI/kHsNXZFFKmNGw5IxDiteWSfYG4RiiapsUxe3ZgsFDDBHFrD5NSrMdIzLFSoNel+1mZUps9AcmkelhkXSCqRiGPyiPIKq7wKXF+Ql6j1AsnCMOCJLlJdTZPqIUUaTYD4z/tvTOS1xRdUiaRjw7cCh2yMms1c5V//3J0xbO10kEC8xvA8nhJnQqsMh2P4h6QFzAZtXYKMehJXwQ5ap7W327EMnCdXw2N0pv9Lr5S9khN/9oTMy2tMIGtN+UZ684zTiAP+479xES6OvmVL04nGyCarIqMNu7oclR75Qv2U14CNRA3gIaMPv', version: '0.3', creationDate: 'Wed Jan 20 16:53:47 CET 2010', updateDate: 'Wed Jan 20 16:53:47 CET 2010', accessDate: 'Wed Jan 20 16:54:26 CET 2010' }, 'c0a8f723bf44e0aae1d69f6f85f8e1b747dfbe5ca0d78c5ebda16b32cf17e16d': { header: '####', data: 'ky36e85TGmGQ+O9FXAhHRXEz5eBQogwuyAEgjpsHaSUM22TowYEw/NkWMg4oT4M2DGIYoTyXatvea859F3kMWM5hUe16PaG9J8HzQcEnaTRmi5oe0cMJAlg6pl7ypLt9kUiqDoMIM4lM/eKO8E/bRZWnU1EsxjehYjQQUoeoSyyTAOhHlLfXS99TzCXFrJjO5rAgaJ7iAjNOcQ8Bm6ECau5ao9AVd5hqgMDEmLJhRwygcGHSTek3i3I4o0jIImcqpfNko/4SbEC4p7+V5Rggr1IG5DkeYfKuyqxgulJbtdkcWxAqPReKXUOkmSGlRTje8rjTTLx1Jv7QCc0hLDYc5pLd8j/G7mOwLG1nLTMeNekljKNCTLAhQ+ccDDq35Jv1cNhmA/icmRlMkztbsR7tzqFs+drQ', version: '0.3', previousVersion: '79047c5ca148b2915014c44d75874cfedf3caee20cd9f97a87ba2a291ccec741', previousVersionKey: 'aLMGf0ucGPaKLVv+AunJaZWDg+gGncnBu2Bf7QseH3ma/jcMOZCNHNd44mNPKfZPyoXYZi6/ToxkJh6Nu8PmOL/SsHTlf8FBZxrNm1i7ZS2b3A==', creationDate: 'Wed Jan 20 16:54:56 CET 2010', updateDate: 'Wed Jan 20 16:54:56 CET 2010', accessDate: 'Wed Jan 20 16:54:56 CET 2010' } diff --git a/frontend/gamma/tests/tests/Components/FullApp/index.html b/frontend/gamma/tests/tests/Components/FullApp/index.html index fab110b..f0e6be3 100644 --- a/frontend/gamma/tests/tests/Components/FullApp/index.html +++ b/frontend/gamma/tests/tests/Components/FullApp/index.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <title>FullApp TEST - WEB</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="../../../../css/web.css" /> <link rel="shortcut icon" href="./clipperz.ico" /> <meta name="description" content="Login to your web accounts with just one click. Never type a password again! Use multiple complex passwords and forget them. A password manager that enhances your online security." /> <meta name="keywords" content="password manager,gestor de contraseñas,gerenciador de senhas,Kennwortmanager,passwords,security,privacy,cryptography" /> <script> Clipperz_IEisBroken = false; Clipperz_normalizedNewLine = '\n'; Clipperz_dumpUrl = "/dump/"; Clipperz_version = ">>> hg:28fe087a9316 <<<"; </script> <!--[if IE]><script> Clipperz_IEisBroken = true; Clipperz_normalizedNewLine = '\x0d\x0a'; </script><![endif]--> <script type='text/javascript' src='../../../../js/Bookmarklet.js'></script> <script type='text/javascript' src='../../../../js/Bookmarklet_IE.js'></script> <script type='text/javascript' src='../../../../js/MochiKit/Base.js'></script> <script type='text/javascript' src='../../../../js/MochiKit/Iter.js'></script> <script type='text/javascript' src='../../../../js/MochiKit/Logging.js'></script> <script type='text/javascript' src='../../../../js/MochiKit/Format.js'></script> <script type='text/javascript' src='../../../../js/MochiKit/Async.js'></script> <script type='text/javascript' src='../../../../js/MochiKit/DOM.js'></script> <script type='text/javascript' src='../../../../js/MochiKit/Style.js'></script> <script type='text/javascript' src='../../../../js/MochiKit/LoggingPane.js'></script> <script type='text/javascript' src='../../../../js/MochiKit/Color.js'></script> <script type='text/javascript' src='../../../../js/MochiKit/Signal.js'></script> <script type='text/javascript' src='../../../../js/MochiKit/Position.js'></script> <script type='text/javascript' src='../../../../js/MochiKit/Selector.js'></script> <script type='text/javascript' src='../../../../js/MochiKit/Visual.js'></script> <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/CSVProcessor.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/KeePassExportProcessor.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Date.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/DOM.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Signal.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Style.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Visual.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Set.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/RSA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings/Strings_defaults.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings/Strings_en-US.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Date.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Toll.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.JSON.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Offline.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Connection.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Crypto.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/BookmarkletProcessor.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/EncryptedRemoteObject.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.Legacy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.RecordIndex.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.Preferences.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.OneTimePasswords.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Version.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Version.Field.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/DirectLogin.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/DirectLoginInput.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/DirectLoginBinding.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/DirectLoginFormValue.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/OneTimePassword.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/BaseComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/Button.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/ComponentSlot.js'></script> diff --git a/frontend/gamma/tests/tests/Components/FullApp/mobile.index.html b/frontend/gamma/tests/tests/Components/FullApp/mobile.index.html index 818e3d6..53fbcf6 100644 --- a/frontend/gamma/tests/tests/Components/FullApp/mobile.index.html +++ b/frontend/gamma/tests/tests/Components/FullApp/mobile.index.html @@ -1,118 +1,116 @@ <!-- -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/. --> <!doctype html> <!-- Conditional comment for mobile ie7 blogs.msdn.com/b/iemobile/ --> <!--[if IEMobile 7 ]> <html class="no-js iem7" lang="en"> <![endif]--> <!--[if (gt IEMobile 7)|!(IEMobile)]><!--> <html class="no-js" lang="en" manifest="mobile.appcache"> <!--<![endif]--> <head> <title>FullApp TEST - MOBILE</title> <meta charset="utf-8"> <meta name="HandheldFriendly" content="True"> <meta name="MobileOptimized" content="320"> <meta name="viewport" content="width=device-width"> <!-- link rel="apple-touch-icon-precomposed" ... --> <link rel="apple-touch-icon" sizes="114x114" href="data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAHIAAAByCAIAAAAAvxIqAAAD8GlDQ1BJQ0MgUHJvZmlsZQAAKJGNVd1v21QUP4lvXKQWP6Cxjg4Vi69VU1u5GxqtxgZJk6XpQhq5zdgqpMl1bhpT1za2021Vn/YCbwz4A4CyBx6QeEIaDMT2su0BtElTQRXVJKQ9dNpAaJP2gqpwrq9Tu13GuJGvfznndz7v0TVAx1ea45hJGWDe8l01n5GPn5iWO1YhCc9BJ/RAp6Z7TrpcLgIuxoVH1sNfIcHeNwfa6/9zdVappwMknkJsVz19HvFpgJSpO64PIN5G+fAp30Hc8TziHS4miFhheJbjLMMzHB8POFPqKGKWi6TXtSriJcT9MzH5bAzzHIK1I08t6hq6zHpRdu2aYdJYuk9Q/881bzZa8Xrx6fLmJo/iu4/VXnfH1BB/rmu5ScQvI77m+BkmfxXxvcZcJY14L0DymZp7pML5yTcW61PvIN6JuGr4halQvmjNlCa4bXJ5zj6qhpxrujeKPYMXEd+q00KR5yNAlWZzrF+Ie+uNsdC/MO4tTOZafhbroyXuR3Df08bLiHsQf+ja6gTPWVimZl7l/oUrjl8OcxDWLbNU5D6JRL2gxkDu16fGuC054OMhclsyXTOOFEL+kmMGs4i5kfNuQ62EnBuam8tzP+Q+tSqhz9SuqpZlvR1EfBiOJTSgYMMM7jpYsAEyqJCHDL4dcFFTAwNMlFDUUpQYiadhDmXteeWAw3HEmA2s15k1RmnP4RHuhBybdBOF7MfnICmSQ2SYjIBM3iRvkcMki9IRcn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QBAlhZ4cp3WiqSb0a1tX/6nmyLzrrjOYnLqqWIXguMAUXHu4eN9p8vJ7TWMPBWRFaerFqoUGMwI28+ibjDVVRWMbugeMJ7qLHnsj0t49Ybyli9eevsHDp686crwed25YglUMC1yqChL0hBxnel2P72mNRMev7voGgirvWlQg2Q2aUUxl5eHz41IL+iPZr551P7e/x+cPpOHJoAOSJB05feWabJtfmi/JTCSyWVSHJwtKwmW/49l3o+cvjyf7Catvj5QUed1Gv8vGOBIfy4D2bjR3kCsR77OHDQeOdlBdTfMjmVkBAKyhpedEs1Y622vkNUWR7CadcNApWgbJgXPmlw9dS38kxKh+oRMV1zstCDodAIGk4FILuodMx3qLntwfqm/tncyh0mTrgYGhwAdnhgyOAq9TDYQiVhN6/TjXY3/yTSkUyVzbhyNSV9ixvJDYBFlWceEy+mXnnnO5zx/sDgaDGYdPjRWAqionzve3h/PmFWVJIb8vKv72H5a6yxmkd9g6+0Imh6fYEuobRFvU++vDwnsnO6Z0ljTVfQFr7Rw62mwsLSmqv8q/dHhgKueX7GKHtHhe0WW//Yn9gab2/9a/ExiMZqt11hcYaLfbBHEGzue/tP9P+zclUOrCr+J20QAAAABJRU5ErkJgggo="> <meta http-equiv="cleartype" content="on"> <meta name="apple-mobile-web-app-capable" content="yes"> <link rel="stylesheet" type="text/css" href="../../../../css/mobile.css" /> <!-- link rel="stylesheet" type="text/css" href="../../../../css/jqtouch.css" / --> <!-- link rel="apple-touch-startup-image" href="data:image/png;charset=utf-8;base64,iVBORw0K...ggo=" --> <script> Clipperz_IEisBroken = false; Clipperz_normalizedNewLine = '\n'; Clipperz_dumpUrl = "/dump/"; 'use strict'; if (typeof(MochiKit) == 'undefined') { MochiKit = {}; } MochiKit['__export__'] = false; </script> <!-- Zepto.js modules: polyfill zepto event detect fx ajax form apple-touch-icon--> <script type='text/javascript' src='../../../../js/Zepto/polyfill.js'></script> <script type='text/javascript' src='../../../../js/Zepto/zepto.js'></script> <script type='text/javascript' src='../../../../js/Zepto/event.js'></script> <script type='text/javascript' src='../../../../js/Zepto/detect.js'></script> <script type='text/javascript' src='../../../../js/Zepto/fx.js'></script> <script type='text/javascript' src='../../../../js/Zepto/ajax.js'></script> <script type='text/javascript' src='../../../../js/Zepto/form.js'></script> <script type='text/javascript' src='../../../../js/Zepto/touch.js'></script> <script type='text/javascript' src='../../../../js/Zepto/gesture.js'></script> <script type='text/javascript' src='../../../../js/JQTouch/jqtouch.js'></script> <script type='text/javascript' src='../../../../js/MochiKit/Base.js'></script> <script type='text/javascript' src='../../../../js/MochiKit/Iter.js'></script> <script type='text/javascript' src='../../../../js/MochiKit/Logging.js'></script> <script type='text/javascript' src='../../../../js/MochiKit/Format.js'></script> <script type='text/javascript' src='../../../../js/MochiKit/Async.js'></script> <script type='text/javascript' src='../../../../js/MochiKit/DOM.js'></script> <script type='text/javascript' src='../../../../js/MochiKit/Style.js'></script> <script type='text/javascript' src='../../../../js/MochiKit/LoggingPane.js'></script> <!-- script type='text/javascript' src='../../../../js/MochiKit/Color.js'></script --> <script type='text/javascript' src='../../../../js/MochiKit/Signal.js'></script> <!-- script type='text/javascript' src='../../../../js/MochiKit/Position.js'></script --> <script type='text/javascript' src='../../../../js/MochiKit/Selector.js'></script> <!-- script type='text/javascript' src='../../../../js/MochiKit/Visual.js'></script --> <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> <!-- script type='text/javascript' src='../../../../js/Clipperz/CSVProcessor.js'></script --> <!-- script type='text/javascript' src='../../../../js/Clipperz/KeePassExportProcessor.js'></script --> <script type='text/javascript' src='../../../../js/Clipperz/Date.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/DOM.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Signal.js'></script> <!-- script type='text/javascript' src='../../../../js/Clipperz/Style.js'></script --> <!-- script type='text/javascript' src='../../../../js/Clipperz/Visual.js'></script --> <script type='text/javascript' src='../../../../js/Clipperz/Set.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/RSA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings/Strings_defaults.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings/Strings_en-US.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Date.js'></script> diff --git a/frontend/gamma/tests/tests/Components/GridLayout/GridLayout_test.js b/frontend/gamma/tests/tests/Components/GridLayout/GridLayout_test.js index 15244b6..fcb8c1e 100644 --- a/frontend/gamma/tests/tests/Components/GridLayout/GridLayout_test.js +++ b/frontend/gamma/tests/tests/Components/GridLayout/GridLayout_test.js @@ -1,116 +1,114 @@ /* -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.Tests.GridLayout'); Clipperz.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); Clipperz.PM.Strings.Languages.initSetup(); Clipperz.Tests.GridLayout.Tester = function(args) { args = args || {}; Clipperz.Tests.GridLayout.Tester.superclass.constructor.call(this, args); //# this._user = new Clipperz.PM.DataModel.User({username:'test', getPassphraseFunction:function () { return 'test';}}); this._user = new Clipperz.PM.DataModel.User({username:'joe', getPassphraseFunction:function () { return 'clipperz';}}); return this; }; Clipperz.Base.extend(Clipperz.Tests.GridLayout.Tester, Object, { 'toString': function() { return "Clipperz.Tests.GridLayout.Tester"; }, //------------------------------------------------------------------------- 'user': function () { return this._user; }, //------------------------------------------------------------------------- 'run': function () { var deferredResult; var proxy; var cardDialogController; var cardDialogComponent; var component; var filterController; var cardsController; filterController = new Clipperz.PM.UI.Web.Controllers.FilterController(); cardsController = new Clipperz.PM.UI.Web.Controllers.CardsController({'filterController':filterController}); component = new Clipperz.Tests.GridLayout.TestPageComponent({element:MochiKit.DOM.getElement('component')}); proxy = new Clipperz.PM.Proxy.Test({shouldPayTolls:true, isDefault:true, readOnly:false}); deferredResult = new Clipperz.Async.Deferred("GridLayout_test.init", {trace:false}); //# deferredResult.addMethod(proxy.dataStore(), 'setupWithEncryptedData', testData['test_test_offline_copy_data']); deferredResult.addMethod(proxy.dataStore(), 'setupWithEncryptedData', testData['joe_clipperz_offline_copy_data']); deferredResult.addMethod(this.user(), 'login'); deferredResult.addMethod(cardsController, 'run', {slot:component.slotNamed('cardList'), user:this.user()}); // deferredResult.addMethod(xxxxController, 'run', {slot:component.slotNamed('cardGrid'), user:this.user()}); deferredResult.callback(); return deferredResult; }, //========================================================================= 'saveChanges': function () { return this.user().saveChanges(); }, //------------------------------------------------------------------------- 'hasPendingChanges': function () { return this.user().hasPendingChanges(); }, //------------------------------------------------------------------------- 'revertChanges': function () { return this.user().revertChanges(); }, //========================================================================= __syntaxFix__: "syntax fix" }); init = function () { var tester; tester = new Clipperz.Tests.GridLayout.Tester(); tester.run(); }; MochiKit.DOM.addLoadEvent(init); diff --git a/frontend/gamma/tests/tests/Components/GridLayout/TestPageComponent.js b/frontend/gamma/tests/tests/Components/GridLayout/TestPageComponent.js index a066001..f9bb5da 100644 --- a/frontend/gamma/tests/tests/Components/GridLayout/TestPageComponent.js +++ b/frontend/gamma/tests/tests/Components/GridLayout/TestPageComponent.js @@ -1,99 +1,97 @@ /* -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.Tests.GridLayout'); Clipperz.Tests.GridLayout.TestPageComponent = function(args) { args = args || {}; Clipperz.Tests.GridLayout.TestPageComponent.superclass.constructor.call(this, args); this._element = args.element || null; this._slots = { 'cardList' : this.getId('cardList'), 'cardGrid' : this.getId('cardGrid') }; this.render(); return this; } //============================================================================= Clipperz.Base.extend(Clipperz.Tests.GridLayout.TestPageComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { //------------------------------------------------------------------------- 'toString': function () { return "Clipperz.Tests.GridLayout.TestPageComponent component"; }, //------------------------------------------------------------------------- 'renderSelf': function(/*aContainer, aPosition*/) { this.append(this.element(), [ {tag:'ul', cls:'testTabs', style:'', children:[ {tag:'li', id:this.getId('list'), children:[{tag:'span', html:'list'}]}, {tag:'li', id:this.getId('grid'), children:[{tag:'span', html:'grid'}]} ]}, {tag:'ul', cls:'testPanels', children:[ {tag:'li', id:this.getId('listPanel'), children:[ {tag:'div', /*id:this.getId('mainPanels'),*/ cls:'mainPanels', children:[ {tag:'div', id:this.getId('cardList'), cls:'gridComponent cardGrid'} ]} ]}, {tag:'li', id:this.getId('gridPanel'), children:[ {tag:'div', /*id:this.getId('mainPanels'),*/ cls:'mainPanels', children:[ // {tag:'div', id:this.getId('cardGrid'), cls:'gridComponent cardGrid'} {tag:'h1', html:"Ciao"} ]} ]} ]} ]); // this.append(this.element(), {tag:'div', id:this.getId('mainPanels'), cls:'mainPanels'}); // this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('cardGrid'), cls:'gridComponent cardGrid'}); new Clipperz.PM.UI.Common.Controllers.TabPanelController({ component:this, configuration: { 'LIST': { tab: 'list', panel: 'listPanel' }, 'GRID': { tab: 'grid', panel: 'gridPanel' } } }); }, //------------------------------------------------------------------------- __syntaxFix__: "syntax fix" }); diff --git a/frontend/gamma/tests/tests/Components/GridLayout/User.data.js b/frontend/gamma/tests/tests/Components/GridLayout/User.data.js index 142e511..3cee32d 100644 --- a/frontend/gamma/tests/tests/Components/GridLayout/User.data.js +++ b/frontend/gamma/tests/tests/Components/GridLayout/User.data.js @@ -1,118 +1,116 @@ /* -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/. */ testData = { //------------------------------------------------------------------------- 'simpleLogin_001': { 'users': [ { 'username': "joe", 'passphrase': "eoj", 'version': "0.2", 'connectionVersion': "0.2", 'records': { 'record 1': { 'notes': "Some notes here", 'fields': [ { 'name': "username", 'value': "joe", 'type': "text" }, { 'name': "password", 'value': "1234", 'type': "password" } ], 'directLogins': { "record 1 direct login": { 'configuration': "", 'bindings': [ ], 'favicon': "http://www.example.com/favicon.ico" } } } }, 'otp': [ "12345678 90abcdef 12345678 90abcdef", "fedcba09 87654321 fedcba09 87654321" ] } ] }, //------------------------------------------------------------------------- 'joe_clipperz_offline_copy_data': { users:{ 'catchAllUser': { __masterkey_test_value__: 'masterkey', s: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00', v: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00' }, 'f527cdd90d0d47f8524b4e165398ad1455eba515d04abd101d1e93b3c6ae0674': { s: '186f0c40bf73f2af236eaa6c429df225efa933050c9aae65240e93b7b362e3ee', v: 'ac61a6e325ecf329926a86084f591d8852d0ad3e4a6080f2adc901b82395ecaf', version: '0.2', maxNumberOfRecords: '100', userDetails: '{"records":{"index":{"eeda70e0392261967bda71c3764da78989c45bbd2bb7be6b941b90f81d9b81b5":"0","13a5e52976337ab210903cd04872588e1b21fb72bc183e91aa25c494b8138551":"1","062af892bcfba49ffcff05c56d99b7af2d508358e39c058c2e1fc83531436f80":"2","ca01bcb7691f70818feed46c9a2a91883ac543997a395535aedbb49de166690c":"3","507f38b06d587d8889698ae1ebbba7ef8f0539b82550dd25779fd9ee88fc0c7a":"4","d5f700b9c3367c39551ea49e00a9ab20dae09dd79d46047b983fc7c4bfaa050d":"5","de13c0d036234c44214062bc0a89e5f127470c464333493a485729f43cdc26e4":"6","d620764a656bfd4e1d3758500d5db72e460a0cf729d56ed1a7755b5725c50045":"7","f215d89bf4583c12f5ed4f4330f488dad3fffa448f4dc784f15ef135dda2c732":"8","36ec1a41118813ced3553534fa2607d781cba687768db305beed368a8e06e113":"9","fe21497ef7435d31f9746c132e4b5ecf5aac5f13b5961ddb55d2bdc3409f28f6":"10","6d45c2fec275b7482d41c76b20507100cfb6ab49922b876f9dd3040d361f4a18":"11","9dcd2a8a0fcb7e57d234dc4fea347f020a6a01793e40cf56a0d22379e590e291":"12","6c25be8e145efb26a1abd59590522f73fb2e3dbc139af2217074d9e2ba92c16a":"13","6026370f3db3860d2c46a08e389a7e906dc14f98c8444b21be9a7e9f405a2728":"14","8b18e8593b5bc2f7ea39a5fab222047034ef2f380fee05be0fa6e1c0972fea39":"15","084e23120544603f0297368fd3891a3818e0fe13488e2f2c6079913c8d1bed8d":"16","7bb69b6366a8012f181c01e368ba18d4f7a82bcabb4959189736ad124c4bbfbb":"17","5cdac63b317f3942da38f3a3de3b7f0e5d6678200951c6216230295550f63fb4":"18","c0ce9130ca365bb02418d4305ea1d29e49c3f0e96d44b9d3cb6b4b6843d25065":"19"},"data":"6tqzHY7/lB/JVfDi3iJ7BIJTiX1Fih//aTUF7IDoLdlnafC9hoIQ/5lGk+/Ezilw59n11ocPN31aOA9ddFGc9oa2vQ1BdymV8F91sWGLGyWft+PRCWOqxy7U1XxvbgyRbCs0mbtSLp/qlC6gewnAXJpH6KT9oURIjKkyaR8jJ7ng6IlfGUIL2KUFnAv6KNoWO5cdXDU0nrrdSYehcApmXYlTyreHDbrFlLJ2YuR9JLvw9bDxXi/xBY1wZgwiUsGVlG3j0e4f63mJVrpmPI1jhaXD3BQD8cbl96l1ImhYe1Boz53gLq94KSk+3bkjG4GRhvlDPtvk8vdSZPsYPsbC0Cu0M4TMS70nPX7qNj5LDvzrd+S+zDj1/CW0yctRThXstrxDyG/L75k/xdZcVbMzXQHQR4OwWWFiqGOnLpyiZIHGfV5+xZ1a1uxT9TPDoDdwPuE5P1Uwh3PeGc9jatk3waQN6fo3g8PQrCOtPn7C7b6y4MEjpAG4e53HFb0B/hEfK6ApycT6QAglsA3qF/tZyZbwNCwert4pG52rIG/PODZ1XxVZHFX8VFWeSxuk/jnPpJg/pvfpRzBMyCGVDJb/i+dlwFcnOAVvqju5xXJk4mu05XrngF10NzHnVRMfxwXmdtTDYE/lDuODy1SiE5yBZlt/Ff6a0eMS/P8HLsUS8+dtz9yOIQ8rh+52nVS7F5tFWXFOvT7nfq1L4HaHCigY187Jk0Y3LCsZW6ziB5qhKZlbQxdCAx5UDNWNs/F59qxVWP5k2UagBgAJoh+iMTZAMWkaURqQxY84SVYIkm9vNZv6Jf+ppFJNn6s3ZZSUe8gmmgMPJP0Lmoh/VCPNypzR+sZULfVFpmPmNXfaAOQ875iDgvUuBWsDSBdyx2+8Q+fUO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1Gdg+2h+N9UWTED7zXmv/H+gfzk5gfoNOKyWWoaEFT/NL3ky6ApzuiokUj3x+xvCwOXoozLHXhdeZYtYkIu1HlYWQx1YAk2ilg47nnRhQQaYjMvIHfsdYjdb1CpGO5K1dYlRBOCMttp+j5QVz/jCSeCrMh8dtu9ZGLEZ3QL06tqmXp03fCsvKOG0it/KuNG5EJpfb6bV+5DsZvI6k4VLXjcKvZhhh+VZSf2mr+mzFEGKBSeleZvii2g8dVyaEBms37SBFCdIwkMxFRmzo/n+1m8axx9o57NPwISU4q8eAjUK2bWrBECZaI4FwLqmlGK9hMPGB/lbrcuHtlqmv5qzo2TJb5/xoX0LyJB/FZVk5Wsm8vC+O8b7o6JDxaPkOgy07+p8Sg9wuKVy6hHrFRnZ+MEZO3Bbk74omg4+6y4HVuRCgxztzRyUiYTssFphqKBsC/e6fQN0QtSwhLSld/B5qoPMn/9CMs8UxmRbA2Ekwi+7Ss51YsWNmd8dKUqxMKWFZOQYe2dbvcYbRwKwjrARxR7d5aaQr8b96hKsWs0YkLQDn71C3AQfEUvClvDXJdJ97B9WkDHz/DQ9EaIp9+4ZSl3SIrew09vUkvUSVGU7egHzv1Oe2gf4jI/3zToRq307AzCT1tF4k0VbInDFKb8YSG35UaJAtfTENvkAQ+8KmR3gQyHRupLi6D8TNvy/03n8naG8BV8+EArzmUAgxmfv3PTipnn3bdsaIFK1+uldQXVUoHm7PgZidzOHpNXvNzgrL3c3gv7Et/s="},"directLogins":{"index":{"61e87fdc4f1d9112e3b30c1f6812d095dcdb24f014c83319091eb6c9899ec348":"0","989593d4c48929f0c8f1581aa96969c622807e99619ed4732026e967530a68ad":"1","9f7979368fa29f66c44bd97ecaf6c545abc800b1c7bb21b7655a68e1514c3906":"2","dba0db679802f0e6aa6d0b7a6aaf42350aabc5f057409edd99a268a92ebb6496":"3","aa18149164302d5dbe7e2d3724565b9550e00887b49978559783b2e38c625584":"4","1f9bfd677b531a03168d3f8bd8afabb5357244a7bc355dff50bd6c0a072114a6":"5","a48e38845713462ecc9f827149eeaae87da882031f98ef8ebbf9ee9537b63468":"6","6f7bbc4e42ea462b5246e6f51c3f86056bec50601ce2de6067c8c1d26f21c07f":"7","2df54059e78f5771f23bd285cce19595b38331b73d67020424d9a1b2257db09c":"8","065cd0c270e5e8ce50e4ea8e3828dccdae18c01ab030813d756a87d03fe68784":"9","ddbc8d01300a4f10631cbde09e1246332eade3a877a2205209f9eb9e5bc9da0b":"10","9b7a30e667afc9f76ba77600658b2c13bff52432d444261d39bf3d069a160afe":"11","9fd2929cde3d32d9cbc5f1d787f2f64729a5e12a14410556b31c0c099762c46a":"12","f695fc36ac56bead80c0d20a88e01e382819c18dc268f1679551b7c83db7cb14":"13","f22dc41ffabef4b3bc8f7af804fec975bd50718098322a673cbe4aaff9464ae1":"14","03251dc1cbc5398789e4c4b45c52cfac3fcd8c1a4f19a81fa68fc6feae31d55c":"15","a7b32e72502804bf2946a2a8856139cbbb759c5777e6b3e673db1fdf7e3bd06e":"16","cb9ae0bba1957075ccdbfd3b3481704d62087687a2ac7c411a4f07d444bde0f7":"17","7e1d069b7fa57c03bd7bf48807520feb953157834503aaff8c9d493f37dea69d":"18","24404059cabc63b2dbff0f42ba57183108b8189ef53ab62fa25141a1caea824b":"19","33cf9758477460a8056deef0295a1ebe65b39b392c361ceb920a83edacfe5d78":"20","e9a16316f330e3d150f6ffd194f6fd8acd1426757b097de4b88ca0db875202e4":"21"},"data":"xuiWbu5GjkueQhyH6sKg5Cn9/CSsPIjYgbhaHmjgwnnB+GL8UO5u0uURxTY6tkG2HbaFRpYZwLnqUUulEkVY6iNqJajFI0qDtrKams11cF2y9LaAalbqyv6U7EUt76d666DkXW8tf88nJ4HYfyAhhPCJ0cw5053K9BAVPbQM7fMA4MYY29k45U3HcIKNZcNqMftCc+fZB+fmZl1g7mSbrXaZyagRkwWwTdJ6/ecVOSSVOkWpckAaQWzGhwbO6zVWLtR9XQReIQZV52TwDMnV5IYJHnlw0Uvv2ZCVSu/oMN2T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ezVXUroimRqxZ9BMaTm7J1hjubO+Dxjb2QlR/UApvQ0ty8aZpmIrMi0xjfoodIMiH6IYdw3VRZSqup7irWWpnJhef2qqtcpoxdiYZaFyf5u2XpZqEnAJpTupqOg+qJN/7aQt6ZmP7POFPwUwzwAsfTYk2EwMlTVAXrawZZEYu2JZ4kIjazo1LgyuuWTieEuONnye8Hr9p70RjwWUdlErlPSCKKn6JRdsM2no13F3151cfgx8I02J9vDuiNa3vfJfmRnBOly5jq6Wlnm2rJN6YYQHwbikoq3lJvkX5ZANDRKFlMWKK42+fXLBuofAZShFt6xvlY384aYsv3EcR42GOLrgYPQy0a7lr/FS4mM2ErNwNYnCz/xTuPBjgXXplbAnyA3jpKdPN1EfUM1oA4kZjECmkXZOuyEQxrndS9eOGbPM6S131zpdWEw9dWSZdkSI34+OkLfAKf6W6z4G4Z+cMRrkYLHs+BavJOum4XTjyyXHIKhQiqz9mgEf+ulodXi+LNsbq1eCcGPWrGg+GNwN1SjJHZm78gidyrlEF6xuPCaZRvGQtk59nuJULOZWkC3Ns/EcFiAql8cu37Lp842fsHHeCVOq0e8ZII4TPg9HKPwDD4HLSg4frBzyeZwK0nN30C5ATCxWdL4Q60cKtZyIEM7Kn1a/vifsAbe019Ui3ovTOCYiTCAdOLaAL/NdpgWA/fDNOsTlPvnEYkq+4+bV3Wyye9ddxICD4TnC2yvXvjw4C/WnYYceJy5R4KamIJueEGIHGp22/0DSF3H4ji3QoUDiFB/H+CA8A2q9LO9q0NYcf2P5q2MfdJGu4bd49g68mltj35pRnGQaafflXY9VmMfrlAbBYfUnsKOb3DOUpq8asveE41/6WkGcXFIuSABcbBf0cHIfBn41wRWQhoCm/JL8pfqEZC/paBdFBRW4FjKkxhbg4BPvBL0aQyGGkU8eH8tr8nm4YN1HMFF/s3s8+9FPoBxPuXLoGSg7Rvdz+g=="},"version":"0.1"}', statistics: 'SfGy/4mpXQdDOv+Bcfie4Yt/', userDetailsVersion: '0.3', records: { '062af892bcfba49ffcff05c56d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l+6rSknC5+IXoBR7MRstBPW/xC9pQVjN5Qyn0g3aUjUSI+q4jcTuvMl32NtTJbWRMGhfkrpVzypZTyPnIh6XJkyBghlUARXw23MlbjiZxmY4ScDmcWZRZJWIknHlqjDKFDKNnwrfnEI9qWyMDno+jA/DEQz0mnpdZYEsoz1/qAmAeDt89vx', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 PDT 2007', updateDate: 'Wed Mar 14 15:46:44 PDT 2007', accessDate: 'Mon Jan 19 16:10:04 PDT 2009', currentVersion: '4a70ca20167875a936d4540f19980e972c20f329a65d85e9b0ce709f1fc7c7e3', versions: { '4a70ca20167875a936d4540f19980e972c20f329a65d85e9b0ce709f1fc7c7e3': { header: '####', data: 'GCNNIhDQjMJQZGVSf+95fPtU6eOnFWVhuGm86r8WZGVR2Gf2EjbG1OJ0ZIGpZ/AXgirCMpo5AFxJe0Bay8IYg+xmBqMFhwFxzAgJBYCIts+raSaNRipuY8dTEqDxAqD1cChcG8EhSoiFgQ0fG0I7nNEUDJi0pIt4/ygBcwvAhuAenEp9ZW+oQA0+YysPQRqkz3IieFaOoSEbe5/SqpUilV4q1gTVyzNXvrxzxx+rlvEyGFgFN+vgtUZ1NrwlPk4gVksTpylvv6CFaMGEWKhgMG6efo0rJckKosaJTu1pldJdnmMK4EKNMLOd+jZ6pEhEhYyadrA4+zYU5TlmZA6ASzTaps8piSwZodoi9qY0ch2StK4mAbzeEGe2HdfHuAU9Tyq3Ppk3+VfNdKgpQfYrQOiSlXbKzK636tzXTN/gyrfOTHjBrRl117ywibgSX63ayAYNfcLpKotC', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 PDT 2007', updateDate: 'Wed Mar 14 15:46:44 PDT 2007', accessDate: 'Mon Jan 19 16:10:04 PDT 2009' } } }, '084e23120544603f0297368fd3891a3818e0fe13488e2f2c6079913c8d1bed8d': { data: 'fGzBu1On7e/6rAoSB1a4fq/CkS8Be/T8UP5cQ93asBTWndSYu2lW4DQ4SXQXSindIi3On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QDOyTBRuz2odTJtJ5tLYjWXZRdFzFSJrEq+Z1z3oq7LnhZy3YWaFXPeKmBCemMthtNt0nL', version: '0.3', creationDate: 'Fri Oct 17 16:49:20 PDT 2008', updateDate: 'Mon Oct 27 08:58:49 PDT 2008', accessDate: 'Mon Jan 19 16:09:39 PDT 2009', currentVersion: '6fd60c5709a4808444f43f7bbd872363d76703957f613076538ba2f9161206ac', versions: { '0ae362285f103722abbd046eee2b7d10aeae6a1d05cbaf2081392ce9df882bcf': { header: '####', data: 'sG6TUmPSEPFpiJ5YdtghWHmHbvUK63tZCZ+Q5iz2ALas//jN+lZCBhZcjEwPEJskBkK2R0MyAh14wWGh2bBHMjsokgTe+L+x+0c/Zi0epE/IC9gtOBhsTe/hZ2e2xOGF/SbzET3DAAYXvxduZ36f7SvvFnrkkKvpj8wGSdTFcBmzqMb9DL2bRyRCLGLMzE3F1a0q5CufCIRz2TgHm+Uw+kfvvwC7ig/F/5iLW90Ypz3vmEtMEFYFHZ9a8Oh0rsXGfevbMhFqALoywzihQEe/NiB8dwn7GEdYKSQ35rhvZh29ULWOZinqmg0ONe0HYaxx7DbKsVoue57S0CIUlgHLajzHfLfqQg2sFI0OT8TnHsGg0YZ6mM2EdKmEjJiER0cP', version: '0.3', creationDate: 'Fri Oct 17 17:00:31 PDT 2008', updateDate: 'Fri Oct 17 17:00:31 PDT 2008', accessDate: 'Fri Oct 17 17:00:31 PDT 2008' }, '10f45664bbd979a92f37886f1ecc6e52e49798b16dc997aecd37259ad9b2090e': { header: '####', data: 'RdKVaV/WWWchrCse3KtcXd47Bfm6IAwjqVUpaxoed3HeunI42AAm7xYYSjeK8edHpbNRJbhobBAX5OZtWIp/HmgkobKM8CIiWxrWz89FqyrbnPD7+fXdtgF2yTax/0sC1l0ibncdOuJKX6U829oPlXCpXIOjlomc4wEEAD/5V6FbORvdZ9IE/ME3LsG2y02cT2tIpx6+R6wC/PKXhZA2UDsTE6R2Op2BtIzpVORZLXsdyAp/4wvWQxq90i9cEpbsVQsMB10JVyNHNsRTFhIlHi9MVCaMxQvcrwRElMj/Y9x3RbsFzSGKqFLqdg7Fn/U+KYkpYtsgHv9hraPIb9lV5FH16+iItU/HBM6FGezIj1ZkoQ+dgjPfSjTZzgzDYwyb', version: '0.3', creationDate: 'Fri Oct 17 16:49:20 PDT 2008', diff --git a/frontend/gamma/tests/tests/Components/GridLayout/index.html b/frontend/gamma/tests/tests/Components/GridLayout/index.html index f1ed116..400f958 100644 --- a/frontend/gamma/tests/tests/Components/GridLayout/index.html +++ b/frontend/gamma/tests/tests/Components/GridLayout/index.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <title>Card Dialog EDITING - test</title> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Date.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/DOM.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Signal.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Style.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Visual.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Set.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Toll.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Offline.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Test.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Connection.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Crypto.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings/Strings_defaults.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings/Strings_en-US.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Date.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/EncryptedRemoteObject.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Version.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Version.Field.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/DirectLogin.js'></script> <!-- script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Field.js'></script --> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.Legacy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.RecordIndex.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.Preferences.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.OneTimePasswords.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/BaseComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/ComponentSlot.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/PasswordEntropyDisplay.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/ProgressBar.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/TabPanelComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/Tooltip.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/TranslatorWidget.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/CardDialogComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/CardDialogRecordFieldComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/CardDialogRecordDirectLoginComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Controllers/ProgressBarController.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Controllers/TabPanelController.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/ColumnManager.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/FaviconColumnManager.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/LinkColumnManager.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/DirectLoginsColumnManager.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/DateColumnManager.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/DeleteObjectColumnManager.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/GridComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/BookmarkletComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Controllers/FilterController.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Controllers/GridController.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Controllers/CardsController.js'></script> <script type='text/javascript' src='./User.data.js'></script> <script type='text/javascript' src='./TestPageComponent.js'></script> <script type='text/javascript' src='./GridLayout_test.js'></script> <script> Clipperz_IEisBroken = false; </script> <!--[if IE]><script> Clipperz_IEisBroken = true; </script><![endif]--> diff --git a/frontend/gamma/tests/tests/Components/GridLayout/test.css b/frontend/gamma/tests/tests/Components/GridLayout/test.css index e5983f4..b4bb372 100644 --- a/frontend/gamma/tests/tests/Components/GridLayout/test.css +++ b/frontend/gamma/tests/tests/Components/GridLayout/test.css @@ -1,40 +1,38 @@ /* -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/. */ ul.testTabs { list-style-type: none; padding: 0px; padding-bottom: 30px; } ul.testTabs li { display: inline-table; padding: 0px 10px; } ul.testPanels { list-style-type: none; padding: 0px; }
\ No newline at end of file diff --git a/frontend/gamma/tests/tests/Components/ProgressBar/index.html b/frontend/gamma/tests/tests/Components/ProgressBar/index.html index 295c2c6..13b2586 100644 --- a/frontend/gamma/tests/tests/Components/ProgressBar/index.html +++ b/frontend/gamma/tests/tests/Components/ProgressBar/index.html @@ -1,117 +1,115 @@ <!-- -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/. --> <html> <head> <title>ProgressBar - test</title> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Date.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/DOM.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Signal.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Style.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Visual.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Set.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Toll.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Offline.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Test.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Connection.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Crypto.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings/Strings_en-US.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Date.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/EncryptedRemoteObject.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Version.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Version.Field.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/DirectLogin.js'></script> <!-- script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Field.js'></script --> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.Legacy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.RecordIndex.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/BaseComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/ComponentSlot.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/PasswordEntropyDisplay.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/ProgressBar.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/TabPanelComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/Tooltip.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/TranslatorWidget.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Controllers/ProgressBarController.js'></script> <script type='text/javascript' src='./progressBar_test.js'></script> <script> Clipperz_IEisBroken = false; </script> <!--[if IE]><script> Clipperz_IEisBroken = true; </script><![endif]--> <link rel="stylesheet" type="text/css" href="../../../../css/clipperz/clipperz.css" /> <link rel="stylesheet" type="text/css" href="../../../../css/clipperz/compact.css" /> <link rel="stylesheet" type="text/css" href="../../../../css/clipperz/ytheme-clipperz.css" /> </head> <body> <table border="0" cellpadding="50"><tr><td> <div id="progressBar_5"></div><hr> <div id="progressBar_10"></div><hr> <div id="progressBar_15"></div><hr> <div id="progressBar_20"></div><hr> <div id="progressBar_50"></div><hr> </td><td> <div id="progressBar_80"></div><hr> <div id="progressBar_85"></div><hr> <div id="progressBar_90"></div><hr> <div id="progressBar_95"></div><hr> <div id="progressBar_100"></div><hr> </td></tr>></table> </body> </html> diff --git a/frontend/gamma/tests/tests/Components/ProgressBar/progressBar_test.js b/frontend/gamma/tests/tests/Components/ProgressBar/progressBar_test.js index 8e2ce51..5a2cf9d 100644 --- a/frontend/gamma/tests/tests/Components/ProgressBar/progressBar_test.js +++ b/frontend/gamma/tests/tests/Components/ProgressBar/progressBar_test.js @@ -1,118 +1,116 @@ /* -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.Tests.ProgressBar'); Clipperz.PM.Strings.Languages.initSetup(); Clipperz.Tests.ProgressBar.Tester = function(args) { args = args || {}; Clipperz.Tests.ProgressBar.Tester.superclass.constructor.call(this, args); return this; }; Clipperz.Base.extend(Clipperz.Tests.ProgressBar.Tester, Object, { 'toString': function() { return "Clipperz.Tests.ProgressBar.Tester"; }, //------------------------------------------------------------------------- 'run': function () { var progressBar; /* <div id="progressBar_5"></div><hr> <div id="progressBar_10"></div><hr> <div id="progressBar_15"></div><hr> <div id="progressBar_20"></div><hr> <div id="progressBar_50"></div><hr> <div id="progressBar_80"></div><hr> <div id="progressBar_85"></div><hr> <div id="progressBar_90"></div><hr> <div id="progressBar_95"></div><hr> <div id="progressBar_100"></div><hr> */ progressBar = new Clipperz.PM.UI.Common.Components.ProgressBar({'element':MochiKit.DOM.getElement('progressBar_5')}); progressBar.updateProgressHandler('5'); progressBar = new Clipperz.PM.UI.Common.Components.ProgressBar({'element':MochiKit.DOM.getElement('progressBar_10')}); progressBar.updateProgressHandler('10'); progressBar = new Clipperz.PM.UI.Common.Components.ProgressBar({'element':MochiKit.DOM.getElement('progressBar_15')}); progressBar.updateProgressHandler('15'); progressBar = new Clipperz.PM.UI.Common.Components.ProgressBar({'element':MochiKit.DOM.getElement('progressBar_20')}); progressBar.updateProgressHandler('20'); progressBar = new Clipperz.PM.UI.Common.Components.ProgressBar({'element':MochiKit.DOM.getElement('progressBar_50')}); progressBar.updateProgressHandler('50'); progressBar = new Clipperz.PM.UI.Common.Components.ProgressBar({'element':MochiKit.DOM.getElement('progressBar_80')}); progressBar.updateProgressHandler('80'); progressBar = new Clipperz.PM.UI.Common.Components.ProgressBar({'element':MochiKit.DOM.getElement('progressBar_85')}); progressBar.updateProgressHandler('85'); progressBar = new Clipperz.PM.UI.Common.Components.ProgressBar({'element':MochiKit.DOM.getElement('progressBar_90')}); progressBar.updateProgressHandler('90'); progressBar = new Clipperz.PM.UI.Common.Components.ProgressBar({'element':MochiKit.DOM.getElement('progressBar_95')}); progressBar.updateProgressHandler('95'); progressBar = new Clipperz.PM.UI.Common.Components.ProgressBar({'element':MochiKit.DOM.getElement('progressBar_100')}); progressBar.updateProgressHandler('100'); }, //========================================================================= __syntaxFix__: "syntax fix" }); init = function () { var tester; tester = new Clipperz.Tests.ProgressBar.Tester(); diff --git a/frontend/gamma/tests/tests/Components/SimpleMessagePanel/index.html b/frontend/gamma/tests/tests/Components/SimpleMessagePanel/index.html index f09d9f6..15a777c 100644 --- a/frontend/gamma/tests/tests/Components/SimpleMessagePanel/index.html +++ b/frontend/gamma/tests/tests/Components/SimpleMessagePanel/index.html @@ -1,112 +1,110 @@ <!-- -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/. --> <html> <head> <title>Simple Message Panel - test</title> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Date.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/DOM.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Signal.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Style.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Visual.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Set.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Toll.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Offline.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Test.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Connection.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Crypto.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings/Strings_en-US.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Date.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/EncryptedRemoteObject.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Version.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Version.Field.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/DirectLogin.js'></script> <!-- script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Field.js'></script --> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.Legacy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.RecordIndex.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/BaseComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/Button.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/ComponentSlot.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/PasswordEntropyDisplay.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/ProgressBar.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/TabPanelComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/Tooltip.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/TranslatorWidget.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/CardDialogComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/CardDialogRecordFieldComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Controllers/TabPanelController.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js'></script> <script type='text/javascript' src='./simpleMessagePanel_test.js'></script> <script> Clipperz_IEisBroken = false; </script> <!--[if IE]><script> Clipperz_IEisBroken = true; </script><![endif]--> <link rel="stylesheet" type="text/css" href="../../../../css/clipperz/clipperz.css" /> <link rel="stylesheet" type="text/css" href="../../../../css/clipperz/compact.css" /> <link rel="stylesheet" type="text/css" href="../../../../css/clipperz/ytheme-clipperz.css" /> </head> <body> <div id="tableWrapper"></div> </body> </html> diff --git a/frontend/gamma/tests/tests/Components/SimpleMessagePanel/simpleMessagePanel_test.js b/frontend/gamma/tests/tests/Components/SimpleMessagePanel/simpleMessagePanel_test.js index 8513909..2865f3a 100644 --- a/frontend/gamma/tests/tests/Components/SimpleMessagePanel/simpleMessagePanel_test.js +++ b/frontend/gamma/tests/tests/Components/SimpleMessagePanel/simpleMessagePanel_test.js @@ -1,92 +1,90 @@ /* -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.Tests.SimpleMessagePanel'); Clipperz.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); Clipperz.PM.Strings.Languages.initSetup(); Clipperz.Tests.SimpleMessagePanel.Tester = function(args) { args = args || {}; Clipperz.Tests.SimpleMessagePanel.Tester.superclass.constructor.call(this, args); // this._user = new Clipperz.PM.DataModel.User({username:'test', getPassphraseFunction:function () { return 'test';}}); return this; }; Clipperz.Base.extend(Clipperz.Tests.SimpleMessagePanel.Tester, Object, { 'toString': function() { return "Clipperz.Tests.SimpleMessagePanel.Tester"; }, //------------------------------------------------------------------------- /* 'user': function () { return this._user; }, */ //------------------------------------------------------------------------- 'run': function () { var deferredResult; var confirmationDialog; confirmationDialog = new Clipperz.PM.UI.Common.Components.SimpleMessagePanel({ title: "Alert", text: "Should lost pending changes? But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness", type: 'ALERT', buttons: [ {text:"Cancel", result:'CANCEL', isDefault:true}, {text:"Ok", result:'OK'} ] }); deferredResult = new Clipperz.Async.Deferred("CardDialogComponent.askConfirmationForLoosingPendingChanges", {trace:false}); deferredResult.addMethod(confirmationDialog, 'deferredShow', { 'openFromElement': null, 'onOkCloseToElement': null, // this.getElement('cancelButton'), 'onCancelCloseToElement': null }); deferredResult.callback(); return deferredResult; }, //========================================================================= __syntaxFix__: "syntax fix" }); init = function () { var tester; tester = new Clipperz.Tests.SimpleMessagePanel.Tester(); tester.run(); }; MochiKit.DOM.addLoadEvent(init); diff --git a/frontend/gamma/tests/tests/Components/Tooltips/index.html b/frontend/gamma/tests/tests/Components/Tooltips/index.html index 3772227..3f3327d 100644 --- a/frontend/gamma/tests/tests/Components/Tooltips/index.html +++ b/frontend/gamma/tests/tests/Components/Tooltips/index.html @@ -1,118 +1,116 @@ <!-- -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/. --> <html> <head> <title>TOOLTIPS - test</title> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Date.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/DOM.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Signal.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Style.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Visual.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Set.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Toll.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Offline.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Test.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Connection.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Crypto.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings/Strings_en-US.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Date.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/EncryptedRemoteObject.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Version.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Version.Field.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/DirectLogin.js'></script> <!-- script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Field.js'></script --> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.Legacy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.RecordIndex.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/BaseComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/ComponentSlot.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/PasswordEntropyDisplay.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/ProgressBar.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/TabPanelComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/Tooltip.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/TranslatorWidget.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/CardDialogComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/CardDialogRecordFieldComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Controllers/ProgressBarController.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Controllers/TabPanelController.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js'></script> <script type='text/javascript' src='./tooltips_test.js'></script> <script> Clipperz_IEisBroken = false; </script> <!--[if IE]><script> Clipperz_IEisBroken = true; </script><![endif]--> <link rel="stylesheet" type="text/css" href="../../../../css/web.css" /> <style> div.leftColumn { float:left; } div.rightColumn { float:left; } div.boxWrapper { padding: 70px 200px; } div.box { diff --git a/frontend/gamma/tests/tests/Components/Tooltips/tooltips_test.js b/frontend/gamma/tests/tests/Components/Tooltips/tooltips_test.js index 9ed1c05..42ae70b 100644 --- a/frontend/gamma/tests/tests/Components/Tooltips/tooltips_test.js +++ b/frontend/gamma/tests/tests/Components/Tooltips/tooltips_test.js @@ -1,114 +1,112 @@ /* -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.Tests.Tooltips'); Clipperz.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); Clipperz.PM.Strings.Languages.initSetup(); Clipperz.Tests.Tooltips.Tester = function(args) { args = args || {}; Clipperz.Tests.Tooltips.Tester.superclass.constructor.call(this, args); return this; }; Clipperz.Base.extend(Clipperz.Tests.Tooltips.Tester, Object, { 'toString': function() { return "Clipperz.Tests.Tooltips.Tester"; }, //------------------------------------------------------------------------- 'run': function () { var tooltip; //Clipperz.log("================== ABOVE =================="); tooltip = new Clipperz.PM.UI.Common.Components.Tooltip({ 'element': MochiKit.DOM.getElement('ABOVE'), 'text': "Tooltip displayed above the element", 'position': 'ABOVE' }); tooltip.show(); //Clipperz.log("================== BELOW =================="); tooltip = new Clipperz.PM.UI.Common.Components.Tooltip({ 'element': MochiKit.DOM.getElement('BELOW'), 'text': "Tooltip displayed below the element", 'position': 'BELOW' }); tooltip.show(); //Clipperz.log("================== LEFT =================="); tooltip = new Clipperz.PM.UI.Common.Components.Tooltip({ 'element': MochiKit.DOM.getElement('LEFT'), 'text': "Tooltip displayed to the left of the element", 'position': 'LEFT' }); tooltip.show(); //Clipperz.log("================== RIGHT =================="); tooltip = new Clipperz.PM.UI.Common.Components.Tooltip({ 'element': MochiKit.DOM.getElement('RIGHT'), 'text': "Tooltip displayed to the right the element", 'position': 'RIGHT' }); tooltip.show(); }, //========================================================================= __syntaxFix__: "syntax fix" }); init = function () { var tester; tester = new Clipperz.Tests.Tooltips.Tester(); tester.run(); }; MochiKit.DOM.addLoadEvent(init); diff --git a/frontend/gamma/tests/tests/Components/UnlockPassword/User.data.js b/frontend/gamma/tests/tests/Components/UnlockPassword/User.data.js index 49abe46..ba60878 100644 --- a/frontend/gamma/tests/tests/Components/UnlockPassword/User.data.js +++ b/frontend/gamma/tests/tests/Components/UnlockPassword/User.data.js @@ -1,118 +1,116 @@ /* -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/. */ testData = { //------------------------------------------------------------------------- 'simpleLogin_001': { 'users': [ { 'username': "joe", 'passphrase': "eoj", 'version': "0.2", 'connectionVersion': "0.2", 'records': { 'record 1': { 'notes': "Some notes here", 'fields': [ { 'name': "username", 'value': "joe", 'type': "text" }, { 'name': "password", 'value': "1234", 'type': "password" } ], 'directLogins': { "record 1 direct login": { 'configuration': "", 'bindings': [ ], 'favicon': "http://www.example.com/favicon.ico" } } } }, 'otp': [ "12345678 90abcdef 12345678 90abcdef", "fedcba09 87654321 fedcba09 87654321" ] } ] }, //------------------------------------------------------------------------- 'joe_clipperz_offline_copy_data': { users:{ 'catchAllUser': { __masterkey_test_value__: 'masterkey', s: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00', v: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00' }, 'f527cdd90d0d47f8524b4e165398ad1455eba515d04abd101d1e93b3c6ae0674': { s: '186f0c40bf73f2af236eaa6c429df225efa933050c9aae65240e93b7b362e3ee', v: 'ac61a6e325ecf329926a86084f591d8852d0ad3e4a6080f2adc901b82395ecaf', version: '0.2', maxNumberOfRecords: '100', userDetails: '{"records":{"index":{"eeda70e0392261967bda71c3764da78989c45bbd2bb7be6b941b90f81d9b81b5":"0","13a5e52976337ab210903cd04872588e1b21fb72bc183e91aa25c494b8138551":"1","062af892bcfba49ffcff05c56d99b7af2d508358e39c058c2e1fc83531436f80":"2","ca01bcb7691f70818feed46c9a2a91883ac543997a395535aedbb49de166690c":"3","507f38b06d587d8889698ae1ebbba7ef8f0539b82550dd25779fd9ee88fc0c7a":"4","d5f700b9c3367c39551ea49e00a9ab20dae09dd79d46047b983fc7c4bfaa050d":"5","de13c0d036234c44214062bc0a89e5f127470c464333493a485729f43cdc26e4":"6","d620764a656bfd4e1d3758500d5db72e460a0cf729d56ed1a7755b5725c50045":"7","f215d89bf4583c12f5ed4f4330f488dad3fffa448f4dc784f15ef135dda2c732":"8","36ec1a41118813ced3553534fa2607d781cba687768db305beed368a8e06e113":"9","fe21497ef7435d31f9746c132e4b5ecf5aac5f13b5961ddb55d2bdc3409f28f6":"10","6d45c2fec275b7482d41c76b20507100cfb6ab49922b876f9dd3040d361f4a18":"11","9dcd2a8a0fcb7e57d234dc4fea347f020a6a01793e40cf56a0d22379e590e291":"12","6c25be8e145efb26a1abd59590522f73fb2e3dbc139af2217074d9e2ba92c16a":"13","6026370f3db3860d2c46a08e389a7e906dc14f98c8444b21be9a7e9f405a2728":"14","8b18e8593b5bc2f7ea39a5fab222047034ef2f380fee05be0fa6e1c0972fea39":"15","084e23120544603f0297368fd3891a3818e0fe13488e2f2c6079913c8d1bed8d":"16","7bb69b6366a8012f181c01e368ba18d4f7a82bcabb4959189736ad124c4bbfbb":"17","5cdac63b317f3942da38f3a3de3b7f0e5d6678200951c6216230295550f63fb4":"18","c0ce9130ca365bb02418d4305ea1d29e49c3f0e96d44b9d3cb6b4b6843d25065":"19"},"data":"6tqzHY7/lB/JVfDi3iJ7BIJTiX1Fih//aTUF7IDoLdlnafC9hoIQ/5lGk+/Ezilw59n11ocPN31aOA9ddFGc9oa2vQ1BdymV8F91sWGLGyW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Rmzo/n+1m8axx9o57NPwISU4q8eAjUK2bWrBECZaI4FwLqmlGK9hMPGB/lbrcuHtlqmv5qzo2TJb5/xoX0LyJB/FZVk5Wsm8vC+O8b7o6JDxaPkOgy07+p8Sg9wuKVy6hHrFRnZ+MEZO3Bbk74omg4+6y4HVuRCgxztzRyUiYTssFphqKBsC/e6fQN0QtSwhLSld/B5qoPMn/9CMs8UxmRbA2Ekwi+7Ss51YsWNmd8dKUqxMKWFZOQYe2dbvcYbRwKwjrARxR7d5aaQr8b96hKsWs0YkLQDn71C3AQfEUvClvDXJdJ97B9WkDHz/DQ9EaIp9+4ZSl3SIrew09vUkvUSVGU7egHzv1Oe2gf4jI/3zToRq307AzCT1tF4k0VbInDFKb8YSG35UaJAtfTENvkAQ+8KmR3gQyHRupLi6D8TNvy/03n8naG8BV8+EArzmUAgxmfv3PTipnn3bdsaIFK1+uldQXVUoHm7PgZidzOHpNXvNzgrL3c3gv7Et/s="},"directLogins":{"index":{"61e87fdc4f1d9112e3b30c1f6812d095dcdb24f014c83319091eb6c9899ec348":"0","989593d4c48929f0c8f1581aa96969c622807e99619ed4732026e967530a68ad":"1","9f7979368fa29f66c44bd97ecaf6c545abc800b1c7bb21b7655a68e1514c3906":"2","dba0db679802f0e6aa6d0b7a6aaf42350aabc5f057409edd99a268a92ebb6496":"3","aa18149164302d5dbe7e2d3724565b9550e00887b49978559783b2e38c625584":"4","1f9bfd677b531a03168d3f8bd8afabb5357244a7bc355dff50bd6c0a072114a6":"5","a48e38845713462ecc9f827149eeaae87da882031f98ef8ebbf9ee9537b63468":"6","6f7bbc4e42ea462b5246e6f51c3f86056bec50601ce2de6067c8c1d26f21c07f":"7","2df54059e78f5771f23bd285cce19595b38331b73d67020424d9a1b2257db09c":"8","065cd0c270e5e8ce50e4ea8e3828dccdae18c01ab030813d756a87d03fe68784":"9","ddbc8d01300a4f10631cbde09e1246332eade3a877a2205209f9eb9e5bc9da0b":"10","9b7a30e667afc9f76ba77600658b2c13bff52432d444261d39bf3d069a160afe":"11","9fd2929cde3d32d9cbc5f1d787f2f64729a5e12a14410556b31c0c099762c46a":"12","f695fc36ac56bead80c0d20a88e01e382819c18dc268f1679551b7c83db7cb14":"13","f22dc41ffabef4b3bc8f7af804fec975bd50718098322a673cbe4aaff9464ae1":"14","03251dc1cbc5398789e4c4b45c52cfac3fcd8c1a4f19a81fa68fc6feae31d55c":"15","a7b32e72502804bf2946a2a8856139cbbb759c5777e6b3e673db1fdf7e3bd06e":"16","cb9ae0bba1957075ccdbfd3b3481704d62087687a2ac7c411a4f07d444bde0f7":"17","7e1d069b7fa57c03bd7bf48807520feb953157834503aaff8c9d493f37dea69d":"18","24404059cabc63b2dbff0f42ba57183108b8189ef53ab62fa25141a1caea824b":"19","33cf9758477460a8056deef0295a1ebe65b39b392c361ceb920a83edacfe5d78":"20","e9a16316f330e3d150f6ffd194f6fd8acd1426757b097de4b88ca0db875202e4":"21"},"data":"xuiWbu5GjkueQhyH6sKg5Cn9/CSsPIjYgbhaHmjgwnnB+GL8UO5u0uURxTY6tkG2HbaFRpYZwLnqUUulEkVY6iNqJajFI0qDtrKams11cF2y9LaAalbqyv6U7EUt76d666DkXW8tf88nJ4HYfyAhhPCJ0cw5053K9BAVPbQM7fMA4MYY29k45U3HcIKNZcNqMftCc+fZB+fmZl1g7mSbrXaZyagRkwWwTdJ6/ecVOSSVOkWpckAaQWzGhwbO6zVWLtR9XQReIQZV52TwDMnV5IYJHnlw0Uvv2ZCVSu/oMN2TneW5fcIwQ0x/SRe+n4Mklzucpvasza+ZhRaRUFS53kvmbfPFI5tXqB3Z1+9S7LRLr9Ws97suTQ6G5eW6jKT2vf65ehnQJtA/gW6uwH+3IAT7ukFxO1knaRf7dRJDLuIc4Xnh+bRDnZUqfA+B+04pp6r0OS9oysD35t/HydVFeHgoyMCbL4RzduZvmu7y16WhIznn0DEfRmrYmC68C+DNcAbxeiXU8v14PgGycIg1++0v44Qor/BXfP5JW4WnYjVLW3aXN3FgI5rPuN6PqTz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YQHwbikoq3lJvkX5ZANDRKFlMWKK42+fXLBuofAZShFt6xvlY384aYsv3EcR42GOLrgYPQy0a7lr/FS4mM2ErNwNYnCz/xTuPBjgXXplbAnyA3jpKdPN1EfUM1oA4kZjECmkXZOuyEQxrndS9eOGbPM6S131zpdWEw9dWSZdkSI34+OkLfAKf6W6z4G4Z+cMRrkYLHs+BavJOum4XTjyyXHIKhQiqz9mgEf+ulodXi+LNsbq1eCcGPWrGg+GNwN1SjJHZm78gidyrlEF6xuPCaZRvGQtk59nuJULOZWkC3Ns/EcFiAql8cu37Lp842fsHHeCVOq0e8ZII4TPg9HKPwDD4HLSg4frBzyeZwK0nN30C5ATCxWdL4Q60cKtZyIEM7Kn1a/vifsAbe019Ui3ovTOCYiTCAdOLaAL/NdpgWA/fDNOsTlPvnEYkq+4+bV3Wyye9ddxICD4TnC2yvXvjw4C/WnYYceJy5R4KamIJueEGIHGp22/0DSF3H4ji3QoUDiFB/H+CA8A2q9LO9q0NYcf2P5q2MfdJGu4bd49g68mltj35pRnGQaafflXY9VmMfrlAbBYfUnsKOb3DOUpq8asveE41/6WkGcXFIuSABcbBf0cHIfBn41wRWQhoCm/JL8pfqEZC/paBdFBRW4FjKkxhbg4BPvBL0aQyGGkU8eH8tr8nm4YN1HMFF/s3s8+9FPoBxPuXLoGSg7Rvdz+g=="},"version":"0.1"}', statistics: 'SfGy/4mpXQdDOv+Bcfie4Yt/', userDetailsVersion: '0.3', records: { '062af892bcfba49ffcff05c56d99b7af2d508358e39c058c2e1fc83531436f80': { data: '7sgxSQlqR+wh3g06M2+sWp7raQxjjQ9jLIz2OcEB7SckuQcXNrhMlDCbL6ncSljtzgqhioWrOB409kIG8lc7h6ekghOE/Mhi7rVwAiRfNGB7r3mYxpEXRe96O2RG7E+NcSp8ezl+5gJ9D0o1abXPeFQYGcr95hUioCfyY+xrxY8TJVwdb9nHkYvBdKV7rCl1dTxgsKWK3nlo1T7e5uyiz5YUAE6BrCtTFAqtprLI/xOpRti9C+llohS7D6s8hkCBPZfp3chKFDrgpsCBFLhXN8jrBKSjHi1PJdRQzpJsgrxyeBj0dZx3gTsYOXqrYgdIzFUo7K1Tqb30yNprBiDMr7j0YYXiSvEb7OuOIP+HTXGN+yt09bk9LggyY6Fh0e+tenjQQ3soySN/XznOBpEjXbzXoz6fR1MXVnE9GgaX99LVNqwWfq2rIBdSE/FfspRiWP3BY5jIrEkNeRclS05U1zw3K3wxOL+cB9r2IynSXnK8QcrDNNRZ0W3PhsSFfByUXuviLSEOPuJa1mYP29L9Lj/WyHL1Gyl8xLbt2H41S6+wvIleKMuc7teH6wPXbnYphvbwBowoI6HZTEFkz3dQKhhY6VF/81iCXsuaz6BjyrzFX6SkQ4S3lN1tv4opQMJFvnmHb6EkXqVWfeIXzJIJO+owL4vDOf4okpAD+HPjjlVXhq6fvyM5UBIK9+tzJW78X/zifrQOfWRIhwjVsfUdZWmZ/S35vnHWNuXkM8GBYrDysqxanDtah3U8XLAiIhFtBOzpzr6qGaNDOKKgG3K8QXT4bYHOq1rQVUwzQuKhlCyStrRMQrC5Ry251xmLy6dKfppRarVeGDtzB/30BbtFNdZmzMNG2g+Jj5tFCrEtCMvMiQEWZHMU3tGMFxDef/KKdv1fFTJC16jmaUiCHUZmNjB3EO9R6xPVcMlAVKf57n3efrpRk/GTmm9JhAFkuF/wsveH4JjPpDUdkHYFu5tHbb30sbga3ufBAXbQL4ck10S24akU/cKraFGLvuKGaR2U0i6ih911TBSf3pAfZ3RFbBhVIl+6rSknC5+IXoBR7MRstBPW/xC9pQVjN5Qyn0g3aUjUSI+q4jcTuvMl32NtTJbWRMGhfkrpVzypZTyPnIh6XJkyBghlUARXw23MlbjiZxmY4ScDmcWZRZJWIknHlqjDKFDKNnwrfnEI9qWyMDno+jA/DEQz0mnpdZYEsoz1/qAmAeDt89vx', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 CET 2007', updateDate: 'Wed Mar 14 15:46:44 CET 2007', accessDate: 'Mon Jan 19 16:10:04 CET 2009', currentVersion: '4a70ca20167875a936d4540f19980e972c20f329a65d85e9b0ce709f1fc7c7e3', versions: { '4a70ca20167875a936d4540f19980e972c20f329a65d85e9b0ce709f1fc7c7e3': { header: '####', data: 'GCNNIhDQjMJQZGVSf+95fPtU6eOnFWVhuGm86r8WZGVR2Gf2EjbG1OJ0ZIGpZ/AXgirCMpo5AFxJe0Bay8IYg+xmBqMFhwFxzAgJBYCIts+raSaNRipuY8dTEqDxAqD1cChcG8EhSoiFgQ0fG0I7nNEUDJi0pIt4/ygBcwvAhuAenEp9ZW+oQA0+YysPQRqkz3IieFaOoSEbe5/SqpUilV4q1gTVyzNXvrxzxx+rlvEyGFgFN+vgtUZ1NrwlPk4gVksTpylvv6CFaMGEWKhgMG6efo0rJckKosaJTu1pldJdnmMK4EKNMLOd+jZ6pEhEhYyadrA4+zYU5TlmZA6ASzTaps8piSwZodoi9qY0ch2StK4mAbzeEGe2HdfHuAU9Tyq3Ppk3+VfNdKgpQfYrQOiSlXbKzK636tzXTN/gyrfOTHjBrRl117ywibgSX63ayAYNfcLpKotC', version: '0.2', creationDate: 'Wed Mar 14 15:46:44 CET 2007', updateDate: 'Wed Mar 14 15:46:44 CET 2007', accessDate: 'Mon Jan 19 16:10:04 CET 2009' } } }, '084e23120544603f0297368fd3891a3818e0fe13488e2f2c6079913c8d1bed8d': { data: 'fGzBu1On7e/6rAoSB1a4fq/CkS8Be/T8UP5cQ93asBTWndSYu2lW4DQ4SXQXSindIi3OnNx/f6SNv/extb7OrMLREF92wXI045ipPwy+DIICb+cQNMJ82Sh4cXaIcAWcyrm+MYri3qq9LBKbpwkILcebZidJ86lmKYHJozUezmfbMcwNCljHs/gYkHVzVcuw9L52Ugc6wC7sjsshh+UH6i4/2Frlrophtx+b1vervNd8eoYiKnedHVXVfW7UJcQoF27eHFgzwYnGvRW0KNXFFhqmPb61TSkIvNdCCvBKDP4SXrWvGgzU89wipvWdUPpQ+fCT6Mp3hPRrbJxwMunmjujZOzBld/HkjnXoiNfBb5akA280WvdyzWYATrjV1ZFx8yQY8G0+lRt/MxjKDc38w4y+Rf5WeRbXboJMvFatwooHUggk6qSRmZVvgOmFmNuDRnRYIFzqK3JclhJeVasnqhR6RiGSowc1Ffr1HhcZCMnXpQABGBkZcHD/zw6YjHRyh9Plw7XAm0xb16HMDtiwt7WLJpxLH/HP99j/A2hvMGWiUiFCaYv7AzyEPTmYbN32D1IsAEE/GC3FG0HypGTBolP8wpAfTRdlvWpJz8oRRdwuLV3Pgpu+kXh5sQyeZI6tnuMPQFmRDcMN1oo3E5V5V585nVMnKTFcXhBzD4UnoV+DQNkG/+iSPybQzz/EZmucEqGEYyjI3kl4MAX8UMEUxE4JO0fF8MzyBI13nxknowAceEammx1dGVaJCoIOdhadaPVPyOzXM1Vp1erVm5k4TsxSx1pll+GOm6hVoNHIuQLDueaMEpRxMhfwc8cDyXURqRGPTgTc0bint5xVjo10fnpX1gcdc/AWL6y3tXM80NW+uFJ4GI7VzyzfcMRzTiRaGi19z8MIx8PbIVGh2sw4FhgGujNsPrpuESvUVT+17M0+v8oEoABNlcizTMFs/sA1uqlPumFASltzmViAzClOsDuCh069hFLjdk/Ex5jy4vPYlwOT8Uq9DJC9ZWuZgiI1DrhWN/8QGAEGxxbvnSZPNCQ9kpD5p+iabinLLWOAirVNgKwIRJRyAu/uR9xKd7J9Wxq8q/ii+y5lGilbo2g24wbDwrkXYVhqp/4J0g+p8Wv1NBjCTSCqV39WEizUCRHo3ee9HnQnBJQDOyTBRuz2odTJtJ5tLYjWXZRdFzFSJrEq+Z1z3oq7LnhZy3YWaFXPeKmBCemMthtNt0nL', version: '0.3', creationDate: 'Fri Oct 17 16:49:20 CEST 2008', updateDate: 'Mon Oct 27 08:58:49 CET 2008', accessDate: 'Mon Jan 19 16:09:39 CET 2009', currentVersion: '6fd60c5709a4808444f43f7bbd872363d76703957f613076538ba2f9161206ac', versions: { '0ae362285f103722abbd046eee2b7d10aeae6a1d05cbaf2081392ce9df882bcf': { header: '####', data: 'sG6TUmPSEPFpiJ5YdtghWHmHbvUK63tZCZ+Q5iz2ALas//jN+lZCBhZcjEwPEJskBkK2R0MyAh14wWGh2bBHMjsokgTe+L+x+0c/Zi0epE/IC9gtOBhsTe/hZ2e2xOGF/SbzET3DAAYXvxduZ36f7SvvFnrkkKvpj8wGSdTFcBmzqMb9DL2bRyRCLGLMzE3F1a0q5CufCIRz2TgHm+Uw+kfvvwC7ig/F/5iLW90Ypz3vmEtMEFYFHZ9a8Oh0rsXGfevbMhFqALoywzihQEe/NiB8dwn7GEdYKSQ35rhvZh29ULWOZinqmg0ONe0HYaxx7DbKsVoue57S0CIUlgHLajzHfLfqQg2sFI0OT8TnHsGg0YZ6mM2EdKmEjJiER0cP', version: '0.3', creationDate: 'Fri Oct 17 17:00:31 CEST 2008', updateDate: 'Fri Oct 17 17:00:31 CEST 2008', accessDate: 'Fri Oct 17 17:00:31 CEST 2008' }, '10f45664bbd979a92f37886f1ecc6e52e49798b16dc997aecd37259ad9b2090e': { header: '####', data: 'RdKVaV/WWWchrCse3KtcXd47Bfm6IAwjqVUpaxoed3HeunI42AAm7xYYSjeK8edHpbNRJbhobBAX5OZtWIp/HmgkobKM8CIiWxrWz89FqyrbnPD7+fXdtgF2yTax/0sC1l0ibncdOuJKX6U829oPlXCpXIOjlomc4wEEAD/5V6FbORvdZ9IE/ME3LsG2y02cT2tIpx6+R6wC/PKXhZA2UDsTE6R2Op2BtIzpVORZLXsdyAp/4wvWQxq90i9cEpbsVQsMB10JVyNHNsRTFhIlHi9MVCaMxQvcrwRElMj/Y9x3RbsFzSGKqFLqdg7Fn/U+KYkpYtsgHv9hraPIb9lV5FH16+iItU/HBM6FGezIj1ZkoQ+dgjPfSjTZzgzDYwyb', version: '0.3', creationDate: 'Fri Oct 17 16:49:20 CEST 2008', diff --git a/frontend/gamma/tests/tests/Components/UnlockPassword/index.html b/frontend/gamma/tests/tests/Components/UnlockPassword/index.html index 7a5e95b..a124739 100644 --- a/frontend/gamma/tests/tests/Components/UnlockPassword/index.html +++ b/frontend/gamma/tests/tests/Components/UnlockPassword/index.html @@ -1,114 +1,112 @@ <!-- -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/. --> <html> <head> <title>UnlockPassword - test</title> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Date.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/DOM.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Signal.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Style.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Visual.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Set.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SRP.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Toll.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Offline.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Test.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Connection.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Crypto.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Strings/Strings_en-US.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/Date.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/EncryptedRemoteObject.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Version.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Version.Field.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/DirectLogin.js'></script> <!-- script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/Record.Field.js'></script --> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.Legacy.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/DataModel/User.Header.RecordIndex.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/BaseComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/Button.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/ComponentSlot.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/PasswordEntropyDisplay.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/ProgressBar.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/TabPanelComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/Tooltip.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Components/TranslatorWidget.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/CardDialogComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/CardDialogRecordFieldComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Components/UnlockPasswordComponent.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Common/Controllers/TabPanelController.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js'></script> <script type='text/javascript' src='./User.data.js'></script> <script type='text/javascript' src='./unlockPassword_test.js'></script> <script> Clipperz_IEisBroken = false; </script> <!--[if IE]><script> Clipperz_IEisBroken = true; </script><![endif]--> <link rel="stylesheet" type="text/css" href="../../../../css/clipperz/clipperz.css" /> <link rel="stylesheet" type="text/css" href="../../../../css/clipperz/compact.css" /> <link rel="stylesheet" type="text/css" href="../../../../css/clipperz/ytheme-clipperz.css" /> </head> <body> <div id="tableWrapper"></div> </body> </html> diff --git a/frontend/gamma/tests/tests/Components/UnlockPassword/unlockPassword_test.js b/frontend/gamma/tests/tests/Components/UnlockPassword/unlockPassword_test.js index 80a8c30..6722b60 100644 --- a/frontend/gamma/tests/tests/Components/UnlockPassword/unlockPassword_test.js +++ b/frontend/gamma/tests/tests/Components/UnlockPassword/unlockPassword_test.js @@ -1,118 +1,116 @@ /* -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.Tests.SimpleMessagePanel'); Clipperz.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); Clipperz.PM.Strings.Languages.initSetup(); Clipperz.Tests.SimpleMessagePanel.Tester = function(args) { args = args || {}; Clipperz.Tests.SimpleMessagePanel.Tester.superclass.constructor.call(this, args); this._user = new Clipperz.PM.DataModel.User({username:'test', getPassphraseFunction:MochiKit.Base.method(this, 'getUserPassphrase')}); this._unlockPasswordComponent = new Clipperz.PM.UI.Web.Components.UnlockPasswordComponent({ 'title': "Unlock account", 'text': "Insert the passprase to unlock the account", 'type': 'INFO', 'buttons': [ {text:"Cancel", result:'CANCEL'}, {text:"Unlock", result:'OK', isDefault:true} ], 'openFromElement': null, 'onOkCloseToElement': null, // this.getElement('cancelButton'), 'onCancelCloseToElement': null }); return this; }; Clipperz.Base.extend(Clipperz.Tests.SimpleMessagePanel.Tester, Object, { 'toString': function() { return "Clipperz.Tests.SimpleMessagePanel.Tester"; }, //------------------------------------------------------------------------- 'user': function () { return this._user; }, 'unlockPasswordComponent': function () { return this._unlockPasswordComponent; }, //------------------------------------------------------------------------- 'run': function () { var deferredResult; var proxy; proxy = new Clipperz.PM.Proxy.Test({shouldPayTolls:true, isDefault:true, readOnly:false}); deferredResult = new Clipperz.Async.Deferred("unlockPassword_test.run", {trace:false}); deferredResult.addMethod(proxy.dataStore(), 'setupWithEncryptedData', testData['test_test_offline_copy_data']); deferredResult.addMethod(this.user(), 'login'); deferredResult.addMethod(this.user(), 'getRecord', '8280842f41162b673335b63860637e8472e8bbff0efa2bc78b0dbc5e09712e13'); // deferredResult.addCallback(MochiKit.Base.bind(function (aRecord) { // cardDialogController = new Clipperz.PM.UI.Web.Controllers.CardDialogController({record:aRecord, delegate:this}); // cardDialogController.run(); // }, this)); deferredResult.callback(); return deferredResult; }, //========================================================================= 'getUserPassphrase': function () { return this.unlockPasswordComponent().getPassphrase(); /* var deferredResult; var confirmationDialog; confirmationDialog = new Clipperz.PM.UI.Web.Components.UnlockPasswordComponent({ title: "Unlock account", text: "Insert the passprase to unlock the account", type: 'INFO', buttons: [ {text:"Cancel", result:'CANCEL'}, {text:"Unlock", result:'OK', isDefault:true} ] }); deferredResult = new Clipperz.Async.Deferred("CardDialogComponent.askConfirmationForLoosingPendingChanges", {trace:false}); deferredResult.addMethod(confirmationDialog, 'deferredShow', { 'openFromElement': null, 'onOkCloseToElement': null, // this.getElement('cancelButton'), 'onCancelCloseToElement': null }); deferredResult.callback(); return deferredResult; */ }, diff --git a/frontend/gamma/tests/tests/Components/crossWindowsBookmarklet/CrossWindowsBookmarklet_test.js b/frontend/gamma/tests/tests/Components/crossWindowsBookmarklet/CrossWindowsBookmarklet_test.js index 9908c6a..1585449 100644 --- a/frontend/gamma/tests/tests/Components/crossWindowsBookmarklet/CrossWindowsBookmarklet_test.js +++ b/frontend/gamma/tests/tests/Components/crossWindowsBookmarklet/CrossWindowsBookmarklet_test.js @@ -1,63 +1,61 @@ /* -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/. */ newWindow = function (anEvent) { var windowURL; var htmlString; var newWindow; anEvent.preventDefault(); // htmlString = '<html><head><title>TARGET WINDOW</title></head><body><h3>this is the target window</h3></body></html>'; // windowURL = 'data:text/html;charset=utf-8;base64,' + (new Clipperz.ByteArray(htmlString)).toBase64String(); // newWindow = window.open(windowURL, 'CrossWindowsBookmarklet_TEST'); newWindow = window.open('http://mail.google.com', 'CrossWindowsBookmarklet_TEST'); MochiKit.Signal.connect(newWindow, 'onload', targetWindowDidLoad) console.log("new window", newWindow); MochiKit.Async.callLater(2, runBookmarkletScript); }; targetWindowDidLoad = function () { //console.log(">>> targetWindowDidLoad") runBookmarkletScript(null); }; runBookmarkletScript = function (anEvent) { if (anEvent != null) { anEvent.preventDefault(); } window.open('javascript:_cble=null;ilf=function(_1){var%20_2;var%20_3;var%20i,c;_3=0;_2=_1.elements;c=_2.length;for(i=0;i%3Cc;i++){if(_2[i].type==%22password%22){_3++;}}return(_3==1);};flf=function(_6,_7){var%20_8;var%20_9;var%20i,c;_8=null;try{_9=_6.getElementsByTagName(%22form%22);c=_9.length;for(i=0;(i%3Cc)&&(_8==null);i++){if(ilf(_9[i])){_8=_9[i];}}if((_8==null)&&(_7==0)){var%20_c;_c=_6.getElementsByTagName(%22iframe%22);c=_c.length;for(i=0;(i%3Cc)&&(_8==null);i++){_8=flf(_c[i].contentDocument,(_7+1));}}}catch(e){_cble=e;}return%20_8;};iev=function(_d){var%20_e;if((_d.tagName.toLowerCase()==%22input%22)&&(_d.getAttribute(%22name%22)!=null)){_e={};_e.type=_d.getAttribute(%22type%22)||%22text%22;_e.name=_d.getAttribute(%22name%22);_e.value=_d.value;if(_d.type.toLowerCase()==%22radio%22){_e.checked=_d.checked;}}else{if((_d.tagName.toLowerCase()==%22select%22)&&(_d.getAttribute(%22name%22)!=null)){var%20_f;var%20c,i;_e={};_e.type=%22select%22;_e.name=_d.getAttribute(%22name%22);_e.options=[];_f=_d.options;c=_f.length;for(i=0;i%3Cc;i++){var%20_12;_12={};_12.selected=_f[i].selected;_12.label=_f[i].label||_f[i].innerHTML;_12.value=_f[i].value;_e.options.push(_12);}}else{_e=null;}}return%20_e;};fp=function(_13){var%20_14;var%20i,c;var%20_17;if(_13==null){_14=null;}else{var%20_18;var%20_19;_14={};_18={};_17=_13.action;if(_17.constructor!=String){_17=_13.getAttribute(%22action%22);}if(%2f^https?%5c:%5c%2f%5c%2f.*%2f.test(_17)){_17=_17;}else{if(%2f^%5c%2f.*%2f.test(_17)){_17=window.location.protocol+%22%2f%22+%22%2f%22+window.location.hostname+_17;}else{_17=window.location.href.replace(%2f%5c%2f[^%5c%2f]*$%2f,%22%2f%22+_17);}}_14.attributes={};_14.attributes.action=_17;_14.attributes.method=_13.getAttribute(%22method%22);_14.inputs=[];c=_13.elements.length;for(i=0;i%3Cc;i++){var%20_1a;var%20_1b;_1a=_13.elements[i];_1b=iev(_1a);if(_1b!=null){if(_1b.type!=%22radio%22){_14.inputs.push(_1b);}else{var%20_1c;var%20_1d;_1c=_18[_1b.name];if(_1c==null){_1c={};_1c.name=_1b.name;_1c.type=%22radio%22;_1c.options=[];_18[_1b.name]=_1c;}_1d={};_1d.value=_1b.value;_1d.checked=_1b.checked;_1c.options.push(_1d);}}}for(_19%20in%20_18){if(typeof(_18[_19])!=%22function%22){_14.inputs.push(_18[_19]);}}}return%20_14;};pp=function(){var%20_1e;_1e={};_1e[%22title%22]=document.title;return%20_1e;};rs=function(o){return(%22%5c%22%22+o.replace(%2f([%22%5c%5c])%2fg,%22%5c%5c$1%22)+%22%5c%22%22).replace(%2f[%5cf]%2fg,%22%5c%5cf%22).replace(%2f[%5cb]%2fg,%22%5c%5cb%22).replace(%2f[%5cn]%2fg,%22%5c%5cn%22).replace(%2f[%5ct]%2fg,%22%5c%5ct%22).replace(%2f[%5cr]%2fg,%22%5c%5cr%22);};sj=function(o){var%20_21=typeof(o);if(_21==%22number%22||_21==%22boolean%22){return%20o+%22%22;}else{if(o===null){return%20%22null%22;}}if(_21==%22string%22){return%20rs(o);}var%20me=arguments.callee;if(_21!=%22function%22&&typeof(o.length)==%22number%22){var%20res=[];for(var%20i=0;i%3Co.length;i++){var%20val=me(o[i]);if(typeof(val)!=%22string%22){val=%22undefined%22;}res.push(val);}return%20%22[%22+res.join(%22,%5cn%22)+%22]%22;}if(_21==%22undefined%22){throw%20new%20TypeError(%22error%22);}res=[];for(var%20k%20in%20o){if(typeof(o[k])!=%22function%22){var%20_27;if(typeof(k)==%22number%22){_27=%22%5c%22%22+k+%22%5c%22%22;}else{if(typeof(k)==%22string%22){_27=rs(k);}else{continue;}}val=me(o[k]);if(typeof(val)!=%22string%22){continue;}res.push(_27+%22:%22+%22%20%22+val);}}return%20%22{%22+res.join(%22,%5cn%22)+%22}%22;};closeBookmarklet=function(){var%20_28;_28=document.getElementById(%22clipperz_bookmarklet%22);_28.parentNode.removeChild(_28);};lfp=function(_29,_2a){var%20_2b;var%20_2c;var%20_2d;var%20_2e;var%20_2f;var%20_30;var%20_31;var%20_32;_2c=%22http%3a%2f%2fwww.clipperz.com%2f%22;_2d=_2c+%22help%2fbookmarklet%22;_2e=%22data:image%2fpng;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAAXCAYAAABOMABkAAAACXBIWXMAAAsTAAALEwEAmpwYAAANJ2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjardd5NJRv2AfwaxbGMmbGGHsY2Xcle%2fYtkWzZUpKdYSYmScqSlDVLKNoo2oQWEonqR5YkyZKtyJKlFLJkmfcPqd7feZfznvNefzzneu7nj%2ft+7nM+3%2fvcAHgNdxqNggSAwCB6sK2ZIdnJ2YWM6QQM4IAXsCDi7hFCM7C2toT%2fuhAA852AAABoV3Cn0SjwfytcsJOzCwBCHgBIPuu9PgCQDq739gBAOkKn0QEQvgBA8vB19wRARACAfLC9rREA4iYA4HzW+woAwB1c7xsAABfq4UMHQHQDMBODPP2CADBTAMy6nl4hHgA4eQDw9AzxCATApQKAVWAg1RMA9xEApD1owXQAPAsAKDg5u5DXl7w3AWAbPwCLxZ+xI5kAZXkA0rv+jIk9AuBxB8hP%2fjM2awsIAEDwtIZ4q2xd30GsIQDTAIMxKwmASQdYTWMwlvMZjNVrAKg+gFqKx+Hg0I39RrQA%2fG%2fv6%2f%2f8q1AIACQAQhxRiAxHRaAjmE4wR2FiWE6yGrPWsZ1mP4ON50jCl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Zr7YR1ycYNVvtPcM4vCfv9qb3tO+3fv2fMhwcSdX%2fnp3pT19dowmpOe2omrO4nuFyUcfewmssmXNNVNdPr9be37+g8K%2fhw6f7O9%2fpTzXTV7F+NHauqyZaE7T2sZsoC6Gomq+a4Ypvu3Y+D6XcOgK7uR0t1+3HRJt10735CA0BX+93Bsaerqsmmom4lncYOrGe9yeqKB6vqwkkLoGviUDUmnbAAfpaN3hG8ome6t1+ICQvYyHr%2fW9ZVWRIC%2fCybthoTLCDGJKc1AIzrii4Ju2tRAQPez0a9uGJ%2fSwhwsd6vGxfdFHtYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEmCRYw84BsJFN6cU4wRIo4FJ1mzF8n+9taNwJS7CAzXBJLbGHBcTYzGCZuoD1bFobNnXCGg6Wz7SvLyyc3cyHB7a47u%2f8YLB8trZQsAY1ejGDqhouD5beaX%2fz6NG3J3x4IEn3d355sHhi5cvmzbpBTfDG3STBGrReSFXVcHn53BvtOzz37AsTPDyQpvs7v7R05q26MFLdy4u2GUvCwcqxPL9w7L%2fb33js0WdqMBis%2f1PAB8pgMKjHHn1mzW2n5o8+X1XLreOKnofVPflr0D6OvvU%2fh4bD4flCvfLy0Xr4oafGfW1AkIcfeqpeefno+evD4XBw7Pj3v1udTrSOS47XJOdhtZ94qaqWTp16%2fY35hWNPt+%2f44AOP1LcOvTjm0wAJvnXoxXrwgUf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TEDZcETLbw8s0Js4ZPe0AATCmgRH35vUn5BQAdFJSqgdQAzylMqLlBWBMHztyDRgPoHTNxwX0NNAP%2fPzcyGoYycg%2fAAEGABYVzxqE3YcJAAAAAElFTkSuQmCCCg==%22;_2b=document.createElement(%22div%22);_2b.setAttribute(%22id%22,%22clipperz_bookmarklet%22);_32=%22%22;_32+=%22%3Cstyle%3Ediv#ClipperzBackgroundDIV{width:290px;height:420px;padding:20px%200px%200px%2020px;margin:0px;border:0px;background-color:transparent;background-repeat:no-repeat;position:absolute;z-index:20000;top:40px;left:40px;background-image:url(%22+_2f+%22)}%3C%2fstyle%3E%22;_32+=%22%3Cdiv%20style=%5c%22border:0px;margin:0px;padding:0px;padding-left:10px;%5c%22%3E%22+%22%3Cimg%20style=%5c%22padding-top:5px;%5c%22%20src=%5c%22%22+_2e+%22%5c%22%3E%22+%22%3Ca%20href=%5c%22javascript:closeBookmarklet();%5c%22%3E%22+%22%3Cimg%20style=%5c%22padding-left:28px;padding-bottom:10px;%5c%22%20border=0%20src=%5c%22%22+_30+%22%5c%22%3E%22+%22%3C%2fa%3E%22+%22%3C%2fdiv%3E%22;if((_29!=null)&&(_2a==null)){_32+=%22%3Cdiv%20style=%5c%22width:255px;border-top:1px%20dotted%20%23336;%5c%22%3E%22+%22%3Cdiv%20style=%5c%22line-height:10pt;margin-right:10px;margin-top:5px;padding:5px%2010px;color:%23666;text-align:left;font-family:sans-serif;%5c%22%3E%22+%22%3Cp%20style=%5c%22margin:0px;font-weight:bold;font-size:10pt;font-family:sans-serif;%5c%22%3EHow%20to%20add%20a%20new%20card%20or%20a%20direct%20login%20to%20an%20existing%20card%20for%20this%20website:%3C%2fp%3E%22+%22%3Col%20style=%5c%22padding:0px%200px%200px%2020px;font-size:9pt;font-family:sans-serif;%5c%22%3E%22+%22%3Cli%3ECopy%20the%20content%20of%20the%20text%20area%20below(Ctrl-C)%3C%2fli%3E%22+%22%3Cli%3EGo%20to%20your%20Clipperz%20account%3C%2fli%3E%22+%22%3Cli%3EClick%20%5c%22Add%20new%20card%5c%22%20or%20select%20the%20related%20card%3C%2fli%3E%22+%22%3Cli%3EPaste%20the%20direct%20login%20configuration(Ctrl-V)%3C%2fli%3E%22+%22%3Cli%3EComplete%20and%20review%20the%20details,then%20click%20%5c%22Save%5c%22%3C%2fli%3E%22+%22%3C%2fol%3E%22+%22%3C%2fdiv%3E%22+%22%3C%2fdiv%3E%22;_32+=%22%3Ctextarea%20id=%5c%22bookmarklet_textarea%5c%22%20style=%5c%22border:2px%20solid%20%23333366;font-family:sans-serif;font-size:8pt;color:%23336;width:240px;height:135px;padding:4px;background-color:white;margin:0px%2010px;%5c%22%3E%22+sj(_29)+%22%3C%2ftextarea%3E%22;}else{if((_29==null)&&(_2a==null)){_32+=%22%3Cdiv%3ENo%20login%20form%20has%20been%20found%20on%20the%20page%3C%2fdiv%3E%3Cdiv%3EGet%20some%20help%20%3Ca%20href=%5c%22%23%5c%22%3Ehere%3C%2fa%3E%3C%2fdiv%3E%22;}else{_32+=%22%3Cdiv%3EAn%20error%20happened%20while%20processing%20the%20page%3C%2fdiv%3E%3Cdiv%3EGet%20some%20help%20%3Ca%20href=%5c%22%23%5c%22%3Ehere%3C%2fa%3E%3C%2fdiv%3E%3Cdiv%3E%22+_2a.name+%22%20-%20%22+_2a.message+%22%3C%2fdiv%3E%22;}}_2b.innerHTML=%22%3Cdiv%20id=%5c%22ClipperzBackgroundDIV%5c%22%3E%22+_32+%22%3C%2fdiv%3E%22;document.body.appendChild(_2b);if((_29!=null)&&(_2a==null)){_31=document.getElementById(%22bookmarklet_textarea%22);_31.focus();_31.select();}};getLoginFormConfiguration=function(){var%20_33;try{_33={};_33.page=pp();_33.form=fp(flf(document,0));_33.version=%220.2.3%22;lfp(_33,_cble);}catch(e){lfp(_33,e);}};getLoginFormConfiguration();', 'CrossWindowsBookmarklet_TEST'); console.log("runBookmarkletScript"); }; init = function () { MochiKit.Signal.connect('newWindow', 'onclick', newWindow); MochiKit.Signal.connect('runBookmarkletScript', 'onclick', runBookmarkletScript); }; MochiKit.DOM.addLoadEvent(init); diff --git a/frontend/gamma/tests/tests/Components/crossWindowsBookmarklet/index.html b/frontend/gamma/tests/tests/Components/crossWindowsBookmarklet/index.html index 50928d2..0247fcc 100644 --- a/frontend/gamma/tests/tests/Components/crossWindowsBookmarklet/index.html +++ b/frontend/gamma/tests/tests/Components/crossWindowsBookmarklet/index.html @@ -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/. --> <html> <head> <title>Cross Window Bookmarklet execution - test</title> <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Date.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/DOM.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Signal.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Style.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Visual.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/Set.js'></script> <script type='text/javascript' src='../../../../js/Clipperz/KeyValueObjectStore.js'></script> <script type='text/javascript' src='./CrossWindowsBookmarklet_test.js'></script> <script> Clipperz_IEisBroken = false; </script> <!--[if IE]><script> Clipperz_IEisBroken = true; </script><![endif]--> <link rel="stylesheet" type="text/css" href="../../../../css/clipperz/clipperz.css" /> <link rel="stylesheet" type="text/css" href="../../../../css/clipperz/compact.css" /> <link rel="stylesheet" type="text/css" href="../../../../css/clipperz/ytheme-clipperz.css" /> </head> <body> <div id="tableWrapper"></div> <ul> <li><a href="#" id="newWindow">open window</a></li> <li><a href="#" id="runBookmarkletScript">run bookmarklet script</a></li> </ul> </body> </html> diff --git a/frontend/gamma/tests/tests/index.html b/frontend/gamma/tests/tests/index.html index 9775f93..8d89092 100644 --- a/frontend/gamma/tests/tests/index.html +++ b/frontend/gamma/tests/tests/index.html @@ -1,45 +1,43 @@ <!-- -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/. --> <html> <head> <title>Complete TEST suite</title> <script type="text/javascript" src="../../js/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="../SimpleTest/TestRunner.js"></script> </head> <body> <script> TestRunner.runTests( 'Clipperz/index.html', 'Clipperz/Crypto/index.html', 'Clipperz/PM/index.html', 'Clipperz/PM/DataModel/index.html', 'Clipperz/PM/UI/index.html', 'Clipperz/PM/UI/Web/index.html', 'Clipperz/PM/UI/Web/Controllers/index.html' ); </script> </body> </html>
\ No newline at end of file diff --git a/properties/license.txt b/properties/license.txt index 11bce99..60d64b3 100644 --- a/properties/license.txt +++ b/properties/license.txt @@ -1,22 +1,22 @@ GNU AFFERO GENERAL PUBLIC LICENSE -Copyright 2008-2011 Clipperz Srl +Copyright 2008-2013 Clipperz Srl This file is part of Clipperz's Password Manager web application. <TODO: add description> For further information about its features and functionalities please refer to http://www.clipperz.com * Clipperz's Password Manager 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's Password Manager 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 <http://www.gnu.org/licenses/>.
\ No newline at end of file |