diff --git a/frontend/gamma/css/mobile.css b/frontend/gamma/css/mobile.css
new file mode 100644
index 0000000..8c4c1bf
--- /dev/null
+++ b/frontend/gamma/css/mobile.css
@@ -0,0 +1,2571 @@
+/*
+
+Copyright 2008-2011 Clipperz Srl
+
+This file is part of Clipperz Community Edition.
+Clipperz Community Edition is an online password manager.
+For further information about its features and functionalities please
+refer to http://www.clipperz.com.
+
+* Clipperz Community Edition is free software: you can redistribute
+ it and/or modify it under the terms of the GNU Affero General Public
+ License as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+
+* Clipperz Community Edition is distributed in the hope that it will
+ be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU Affero General Public License for more details.
+
+* You should have received a copy of the GNU Affero General Public
+ License along with Clipperz Community Edition. If not, see
+ .
+
+*/
+
+/*
+
+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;
+}
+.ellipsis {
+ text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
+}
+/**
+ * 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
+ *
If you can read this message, the chances are that your browser does not properly support JavaScript? or you have disabled this functionality yourself.
-
Javascript is required to access Clipperz.
-
Please enable scripting or upgrade your browser.
-
+
+
+
clipperz
+
keep it to yourself!
+
-
+
+@js_EMBEDDED@
+
-
+
+
+
diff --git a/frontend/gamma/images/old/alert/alert.png b/frontend/gamma/images/old/alert/alert.png
new file mode 100644
index 0000000..ade6040
Binary files /dev/null and b/frontend/gamma/images/old/alert/alert.png differ
diff --git a/frontend/gamma/images/old/alert/body.png b/frontend/gamma/images/old/alert/body.png
new file mode 100644
index 0000000..3f0ab21
Binary files /dev/null and b/frontend/gamma/images/old/alert/body.png differ
diff --git a/frontend/gamma/images/old/alert/footer.png b/frontend/gamma/images/old/alert/footer.png
new file mode 100644
index 0000000..a9587c8
Binary files /dev/null and b/frontend/gamma/images/old/alert/footer.png differ
diff --git a/frontend/gamma/images/old/alert/header.png b/frontend/gamma/images/old/alert/header.png
new file mode 100644
index 0000000..079dd13
Binary files /dev/null and b/frontend/gamma/images/old/alert/header.png differ
diff --git a/frontend/gamma/images/old/bookmarklet/placeholder.png b/frontend/gamma/images/old/bookmarklet/placeholder.png
new file mode 100644
index 0000000..792dbf5
Binary files /dev/null and b/frontend/gamma/images/old/bookmarklet/placeholder.png differ
diff --git a/frontend/gamma/images/old/bookmarklet/placeholder_icon.png b/frontend/gamma/images/old/bookmarklet/placeholder_icon.png
new file mode 100644
index 0000000..dc06721
Binary files /dev/null and b/frontend/gamma/images/old/bookmarklet/placeholder_icon.png differ
diff --git a/frontend/gamma/images/old/bookmarklet/placeholder_selected.png b/frontend/gamma/images/old/bookmarklet/placeholder_selected.png
new file mode 100644
index 0000000..d01ac89
Binary files /dev/null and b/frontend/gamma/images/old/bookmarklet/placeholder_selected.png differ
diff --git a/frontend/gamma/images/old/bookmarklet/placeholder_selected_icon.png b/frontend/gamma/images/old/bookmarklet/placeholder_selected_icon.png
new file mode 100644
index 0000000..c8c2a86
Binary files /dev/null and b/frontend/gamma/images/old/bookmarklet/placeholder_selected_icon.png differ
diff --git a/frontend/gamma/images/old/button/clicked_left.png b/frontend/gamma/images/old/button/clicked_left.png
new file mode 100644
index 0000000..332260d
Binary files /dev/null and b/frontend/gamma/images/old/button/clicked_left.png differ
diff --git a/frontend/gamma/images/old/button/clicked_main.png b/frontend/gamma/images/old/button/clicked_main.png
new file mode 100644
index 0000000..d0fe732
Binary files /dev/null and b/frontend/gamma/images/old/button/clicked_main.png differ
diff --git a/frontend/gamma/images/old/button/default_left.png b/frontend/gamma/images/old/button/default_left.png
new file mode 100644
index 0000000..94178fc
Binary files /dev/null and b/frontend/gamma/images/old/button/default_left.png differ
diff --git a/frontend/gamma/images/old/button/default_main.png b/frontend/gamma/images/old/button/default_main.png
new file mode 100644
index 0000000..8b97bea
Binary files /dev/null and b/frontend/gamma/images/old/button/default_main.png differ
diff --git a/frontend/gamma/images/old/button/hover_left.png b/frontend/gamma/images/old/button/hover_left.png
new file mode 100644
index 0000000..de09c1a
Binary files /dev/null and b/frontend/gamma/images/old/button/hover_left.png differ
diff --git a/frontend/gamma/images/old/button/hover_main.png b/frontend/gamma/images/old/button/hover_main.png
new file mode 100644
index 0000000..6c07f57
Binary files /dev/null and b/frontend/gamma/images/old/button/hover_main.png differ
diff --git a/frontend/gamma/images/old/cardDialog/addDirectLogin_background.png b/frontend/gamma/images/old/cardDialog/addDirectLogin_background.png
new file mode 100644
index 0000000..130d060
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/addDirectLogin_background.png differ
diff --git a/frontend/gamma/images/old/cardDialog/addDirectLogin_disabled_background.png b/frontend/gamma/images/old/cardDialog/addDirectLogin_disabled_background.png
new file mode 100644
index 0000000..e67f5c4
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/addDirectLogin_disabled_background.png differ
diff --git a/frontend/gamma/images/old/cardDialog/back.png b/frontend/gamma/images/old/cardDialog/back.png
new file mode 100644
index 0000000..97ef21e
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/back.png differ
diff --git a/frontend/gamma/images/old/cardDialog/back_selected.png b/frontend/gamma/images/old/cardDialog/back_selected.png
new file mode 100644
index 0000000..18d4f0a
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/back_selected.png differ
diff --git a/frontend/gamma/images/old/cardDialog/background_body.png b/frontend/gamma/images/old/cardDialog/background_body.png
new file mode 100644
index 0000000..9640d23
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/background_body.png differ
diff --git a/frontend/gamma/images/old/cardDialog/background_footer.png b/frontend/gamma/images/old/cardDialog/background_footer.png
new file mode 100644
index 0000000..4d70eb3
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/background_footer.png differ
diff --git a/frontend/gamma/images/old/cardDialog/background_header.png b/frontend/gamma/images/old/cardDialog/background_header.png
new file mode 100644
index 0000000..3223a1e
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/background_header.png differ
diff --git a/frontend/gamma/images/old/cardDialog/dottedLine_background.png b/frontend/gamma/images/old/cardDialog/dottedLine_background.png
new file mode 100644
index 0000000..c447f02
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/dottedLine_background.png differ
diff --git a/frontend/gamma/images/old/cardDialog/fieldTypes/email.png b/frontend/gamma/images/old/cardDialog/fieldTypes/email.png
new file mode 100644
index 0000000..afe4e8a
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/fieldTypes/email.png differ
diff --git a/frontend/gamma/images/old/cardDialog/fieldTypes/email_selected.png b/frontend/gamma/images/old/cardDialog/fieldTypes/email_selected.png
new file mode 100644
index 0000000..017904c
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/fieldTypes/email_selected.png differ
diff --git a/frontend/gamma/images/old/cardDialog/fieldTypes/password.png b/frontend/gamma/images/old/cardDialog/fieldTypes/password.png
new file mode 100644
index 0000000..fff876d
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/fieldTypes/password.png differ
diff --git a/frontend/gamma/images/old/cardDialog/fieldTypes/passwordTooltip.png b/frontend/gamma/images/old/cardDialog/fieldTypes/passwordTooltip.png
new file mode 100644
index 0000000..3eb4d4f
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/fieldTypes/passwordTooltip.png differ
diff --git a/frontend/gamma/images/old/cardDialog/fieldTypes/password_selected.png b/frontend/gamma/images/old/cardDialog/fieldTypes/password_selected.png
new file mode 100644
index 0000000..b9dc839
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/fieldTypes/password_selected.png differ
diff --git a/frontend/gamma/images/old/cardDialog/fieldTypes/url.png b/frontend/gamma/images/old/cardDialog/fieldTypes/url.png
new file mode 100644
index 0000000..3ac1266
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/fieldTypes/url.png differ
diff --git a/frontend/gamma/images/old/cardDialog/fieldTypes/url_selected.png b/frontend/gamma/images/old/cardDialog/fieldTypes/url_selected.png
new file mode 100644
index 0000000..77b1143
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/fieldTypes/url_selected.png differ
diff --git a/frontend/gamma/images/old/cardDialog/loading.gif b/frontend/gamma/images/old/cardDialog/loading.gif
new file mode 100644
index 0000000..a846634
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/loading.gif differ
diff --git a/frontend/gamma/images/old/cardDialog/lock_closed.png b/frontend/gamma/images/old/cardDialog/lock_closed.png
new file mode 100644
index 0000000..5ea9b9e
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/lock_closed.png differ
diff --git a/frontend/gamma/images/old/cardDialog/lock_open.png b/frontend/gamma/images/old/cardDialog/lock_open.png
new file mode 100644
index 0000000..cb94955
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/lock_open.png differ
diff --git a/frontend/gamma/images/old/cardDialog/openDirectLogin.png b/frontend/gamma/images/old/cardDialog/openDirectLogin.png
new file mode 100644
index 0000000..e0b6a25
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/openDirectLogin.png differ
diff --git a/frontend/gamma/images/old/cardDialog/openDirectLogin_selected.png b/frontend/gamma/images/old/cardDialog/openDirectLogin_selected.png
new file mode 100644
index 0000000..a2a6f47
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/openDirectLogin_selected.png differ
diff --git a/frontend/gamma/images/old/cardDialog/password_background.png b/frontend/gamma/images/old/cardDialog/password_background.png
new file mode 100644
index 0000000..9432573
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/password_background.png differ
diff --git a/frontend/gamma/images/old/cardDialog/tabs_background.png b/frontend/gamma/images/old/cardDialog/tabs_background.png
new file mode 100644
index 0000000..ebaad24
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/tabs_background.png differ
diff --git a/frontend/gamma/images/old/cardDialog/tabs_shadow.png b/frontend/gamma/images/old/cardDialog/tabs_shadow.png
new file mode 100644
index 0000000..04b51e6
Binary files /dev/null and b/frontend/gamma/images/old/cardDialog/tabs_shadow.png differ
diff --git a/frontend/gamma/images/old/creatingUser.gif b/frontend/gamma/images/old/creatingUser.gif
new file mode 100644
index 0000000..69448f8
Binary files /dev/null and b/frontend/gamma/images/old/creatingUser.gif differ
diff --git a/frontend/gamma/images/old/delete_background.png b/frontend/gamma/images/old/delete_background.png
new file mode 100644
index 0000000..b9bc088
Binary files /dev/null and b/frontend/gamma/images/old/delete_background.png differ
diff --git a/frontend/gamma/images/old/delete_background_left.png b/frontend/gamma/images/old/delete_background_left.png
new file mode 100644
index 0000000..af3beac
Binary files /dev/null and b/frontend/gamma/images/old/delete_background_left.png differ
diff --git a/frontend/gamma/images/old/directLink_background.png b/frontend/gamma/images/old/directLink_background.png
new file mode 100644
index 0000000..b36757a
Binary files /dev/null and b/frontend/gamma/images/old/directLink_background.png differ
diff --git a/frontend/gamma/images/old/directLink_background_left.png b/frontend/gamma/images/old/directLink_background_left.png
new file mode 100644
index 0000000..11f282d
Binary files /dev/null and b/frontend/gamma/images/old/directLink_background_left.png differ
diff --git a/frontend/gamma/images/old/directLink_no_background.png b/frontend/gamma/images/old/directLink_no_background.png
new file mode 100644
index 0000000..21a18e2
Binary files /dev/null and b/frontend/gamma/images/old/directLink_no_background.png differ
diff --git a/frontend/gamma/images/old/directLogins_background.png b/frontend/gamma/images/old/directLogins_background.png
new file mode 100644
index 0000000..959ecaf
Binary files /dev/null and b/frontend/gamma/images/old/directLogins_background.png differ
diff --git a/frontend/gamma/images/old/directLogins_background_bottom.png b/frontend/gamma/images/old/directLogins_background_bottom.png
new file mode 100644
index 0000000..c3c40d0
Binary files /dev/null and b/frontend/gamma/images/old/directLogins_background_bottom.png differ
diff --git a/frontend/gamma/images/old/filter/clearFilter_notSelected.png b/frontend/gamma/images/old/filter/clearFilter_notSelected.png
new file mode 100644
index 0000000..ec2e2fe
Binary files /dev/null and b/frontend/gamma/images/old/filter/clearFilter_notSelected.png differ
diff --git a/frontend/gamma/images/old/filter/clearFilter_selected.png b/frontend/gamma/images/old/filter/clearFilter_selected.png
new file mode 100644
index 0000000..6bfb463
Binary files /dev/null and b/frontend/gamma/images/old/filter/clearFilter_selected.png differ
diff --git a/frontend/gamma/images/old/flags/br.png b/frontend/gamma/images/old/flags/br.png
new file mode 100644
index 0000000..51ac06e
Binary files /dev/null and b/frontend/gamma/images/old/flags/br.png differ
diff --git a/frontend/gamma/images/old/flags/cn.png b/frontend/gamma/images/old/flags/cn.png
new file mode 100644
index 0000000..4be2967
Binary files /dev/null and b/frontend/gamma/images/old/flags/cn.png differ
diff --git a/frontend/gamma/images/old/flags/de.png b/frontend/gamma/images/old/flags/de.png
new file mode 100644
index 0000000..a66d634
Binary files /dev/null and b/frontend/gamma/images/old/flags/de.png differ
diff --git a/frontend/gamma/images/old/flags/en.png b/frontend/gamma/images/old/flags/en.png
new file mode 100644
index 0000000..6d193aa
Binary files /dev/null and b/frontend/gamma/images/old/flags/en.png differ
diff --git a/frontend/gamma/images/old/flags/es.png b/frontend/gamma/images/old/flags/es.png
new file mode 100644
index 0000000..503ffca
Binary files /dev/null and b/frontend/gamma/images/old/flags/es.png differ
diff --git a/frontend/gamma/images/old/flags/it.png b/frontend/gamma/images/old/flags/it.png
new file mode 100644
index 0000000..a271baf
Binary files /dev/null and b/frontend/gamma/images/old/flags/it.png differ
diff --git a/frontend/gamma/images/old/flags/jp.png b/frontend/gamma/images/old/flags/jp.png
new file mode 100644
index 0000000..19e81e3
Binary files /dev/null and b/frontend/gamma/images/old/flags/jp.png differ
diff --git a/frontend/gamma/images/old/flags/ru.png b/frontend/gamma/images/old/flags/ru.png
new file mode 100644
index 0000000..7391499
Binary files /dev/null and b/frontend/gamma/images/old/flags/ru.png differ
diff --git a/frontend/gamma/images/old/footer/star.png b/frontend/gamma/images/old/footer/star.png
new file mode 100644
index 0000000..7c6e53c
Binary files /dev/null and b/frontend/gamma/images/old/footer/star.png differ
diff --git a/frontend/gamma/images/old/home/box/box_body.png b/frontend/gamma/images/old/home/box/box_body.png
new file mode 100644
index 0000000..168c776
Binary files /dev/null and b/frontend/gamma/images/old/home/box/box_body.png differ
diff --git a/frontend/gamma/images/old/home/box/box_bottom.png b/frontend/gamma/images/old/home/box/box_bottom.png
new file mode 100644
index 0000000..f8e72be
Binary files /dev/null and b/frontend/gamma/images/old/home/box/box_bottom.png differ
diff --git a/frontend/gamma/images/old/home/box/box_top.png b/frontend/gamma/images/old/home/box/box_top.png
new file mode 100644
index 0000000..ff7b607
Binary files /dev/null and b/frontend/gamma/images/old/home/box/box_top.png differ
diff --git a/frontend/gamma/images/old/home/download.png b/frontend/gamma/images/old/home/download.png
new file mode 100644
index 0000000..deffc1b
Binary files /dev/null and b/frontend/gamma/images/old/home/download.png differ
diff --git a/frontend/gamma/images/old/home/features/bullet.png b/frontend/gamma/images/old/home/features/bullet.png
new file mode 100644
index 0000000..1f51609
Binary files /dev/null and b/frontend/gamma/images/old/home/features/bullet.png differ
diff --git a/frontend/gamma/images/old/home/look.png b/frontend/gamma/images/old/home/look.png
new file mode 100644
index 0000000..a2a49eb
Binary files /dev/null and b/frontend/gamma/images/old/home/look.png differ
diff --git a/frontend/gamma/images/old/home/register.png b/frontend/gamma/images/old/home/register.png
new file mode 100644
index 0000000..be7c151
Binary files /dev/null and b/frontend/gamma/images/old/home/register.png differ
diff --git a/frontend/gamma/images/old/home/register_selected.png b/frontend/gamma/images/old/home/register_selected.png
new file mode 100644
index 0000000..f29aaae
Binary files /dev/null and b/frontend/gamma/images/old/home/register_selected.png differ
diff --git a/frontend/gamma/images/old/iPhone/backButton.png b/frontend/gamma/images/old/iPhone/backButton.png
new file mode 100644
index 0000000..e27ea8c
Binary files /dev/null and b/frontend/gamma/images/old/iPhone/backButton.png differ
diff --git a/frontend/gamma/images/old/iPhone/icon.png b/frontend/gamma/images/old/iPhone/icon.png
new file mode 100644
index 0000000..1c97389
Binary files /dev/null and b/frontend/gamma/images/old/iPhone/icon.png differ
diff --git a/frontend/gamma/images/old/iPhone/listArrow.png b/frontend/gamma/images/old/iPhone/listArrow.png
new file mode 100644
index 0000000..6421a16
Binary files /dev/null and b/frontend/gamma/images/old/iPhone/listArrow.png differ
diff --git a/frontend/gamma/images/old/iPhone/locked.png b/frontend/gamma/images/old/iPhone/locked.png
new file mode 100644
index 0000000..e00d5f6
Binary files /dev/null and b/frontend/gamma/images/old/iPhone/locked.png differ
diff --git a/frontend/gamma/images/old/iPhone/logo_and_header.png b/frontend/gamma/images/old/iPhone/logo_and_header.png
new file mode 100644
index 0000000..0fe26a3
Binary files /dev/null and b/frontend/gamma/images/old/iPhone/logo_and_header.png differ
diff --git a/frontend/gamma/images/old/iPhone/password_background.png b/frontend/gamma/images/old/iPhone/password_background.png
new file mode 100644
index 0000000..9432573
Binary files /dev/null and b/frontend/gamma/images/old/iPhone/password_background.png differ
diff --git a/frontend/gamma/images/old/iPhone/pinstripes.png b/frontend/gamma/images/old/iPhone/pinstripes.png
new file mode 100644
index 0000000..c997775
Binary files /dev/null and b/frontend/gamma/images/old/iPhone/pinstripes.png differ
diff --git a/frontend/gamma/images/old/iPhone/thumb.png b/frontend/gamma/images/old/iPhone/thumb.png
new file mode 100644
index 0000000..cefa8fc
Binary files /dev/null and b/frontend/gamma/images/old/iPhone/thumb.png differ
diff --git a/frontend/gamma/images/old/iPhone/toggle.png b/frontend/gamma/images/old/iPhone/toggle.png
new file mode 100644
index 0000000..3b62ebf
Binary files /dev/null and b/frontend/gamma/images/old/iPhone/toggle.png differ
diff --git a/frontend/gamma/images/old/iPhone/toggleOn.png b/frontend/gamma/images/old/iPhone/toggleOn.png
new file mode 100644
index 0000000..b016814
Binary files /dev/null and b/frontend/gamma/images/old/iPhone/toggleOn.png differ
diff --git a/frontend/gamma/images/old/iPhone/toolbar.png b/frontend/gamma/images/old/iPhone/toolbar.png
new file mode 100644
index 0000000..3dde94c
Binary files /dev/null and b/frontend/gamma/images/old/iPhone/toolbar.png differ
diff --git a/frontend/gamma/images/old/iPhone/whiteButton.png b/frontend/gamma/images/old/iPhone/whiteButton.png
new file mode 100644
index 0000000..5514b27
Binary files /dev/null and b/frontend/gamma/images/old/iPhone/whiteButton.png differ
diff --git a/frontend/gamma/images/old/loading/loadingBar.gif b/frontend/gamma/images/old/loading/loadingBar.gif
new file mode 100644
index 0000000..b111948
Binary files /dev/null and b/frontend/gamma/images/old/loading/loadingBar.gif differ
diff --git a/frontend/gamma/images/old/loading/loadingBarProgress.png b/frontend/gamma/images/old/loading/loadingBarProgress.png
new file mode 100644
index 0000000..68436ed
Binary files /dev/null and b/frontend/gamma/images/old/loading/loadingBarProgress.png differ
diff --git a/frontend/gamma/images/old/loading/news.gif b/frontend/gamma/images/old/loading/news.gif
new file mode 100644
index 0000000..33d70b5
Binary files /dev/null and b/frontend/gamma/images/old/loading/news.gif differ
diff --git a/frontend/gamma/images/old/lock/background_star.png b/frontend/gamma/images/old/lock/background_star.png
new file mode 100644
index 0000000..4dff077
Binary files /dev/null and b/frontend/gamma/images/old/lock/background_star.png differ
diff --git a/frontend/gamma/images/old/lock/locked.png b/frontend/gamma/images/old/lock/locked.png
new file mode 100644
index 0000000..e00d5f6
Binary files /dev/null and b/frontend/gamma/images/old/lock/locked.png differ
diff --git a/frontend/gamma/images/old/lock/locked_hover.png b/frontend/gamma/images/old/lock/locked_hover.png
new file mode 100644
index 0000000..62ad133
Binary files /dev/null and b/frontend/gamma/images/old/lock/locked_hover.png differ
diff --git a/frontend/gamma/images/old/lock/unlocked.png b/frontend/gamma/images/old/lock/unlocked.png
new file mode 100644
index 0000000..13eadfe
Binary files /dev/null and b/frontend/gamma/images/old/lock/unlocked.png differ
diff --git a/frontend/gamma/images/old/lock/unlocked_hover.png b/frontend/gamma/images/old/lock/unlocked_hover.png
new file mode 100644
index 0000000..1a45c2f
Binary files /dev/null and b/frontend/gamma/images/old/lock/unlocked_hover.png differ
diff --git a/frontend/gamma/images/old/logo.png b/frontend/gamma/images/old/logo.png
new file mode 100644
index 0000000..62b58d9
Binary files /dev/null and b/frontend/gamma/images/old/logo.png differ
diff --git a/frontend/gamma/images/old/logo_blue.png b/frontend/gamma/images/old/logo_blue.png
new file mode 100644
index 0000000..fff4a51
Binary files /dev/null and b/frontend/gamma/images/old/logo_blue.png differ
diff --git a/frontend/gamma/images/old/main/blocks/cardGridBackground.png b/frontend/gamma/images/old/main/blocks/cardGridBackground.png
new file mode 100644
index 0000000..66dabf8
Binary files /dev/null and b/frontend/gamma/images/old/main/blocks/cardGridBackground.png differ
diff --git a/frontend/gamma/images/old/main/blocks/cardGridStripes.png b/frontend/gamma/images/old/main/blocks/cardGridStripes.png
new file mode 100644
index 0000000..fdda774
Binary files /dev/null and b/frontend/gamma/images/old/main/blocks/cardGridStripes.png differ
diff --git a/frontend/gamma/images/old/main/blocks/directLoginGridBackground.png b/frontend/gamma/images/old/main/blocks/directLoginGridBackground.png
new file mode 100644
index 0000000..92dd1b8
Binary files /dev/null and b/frontend/gamma/images/old/main/blocks/directLoginGridBackground.png differ
diff --git a/frontend/gamma/images/old/main/blocks/directLoginGridStripes.png b/frontend/gamma/images/old/main/blocks/directLoginGridStripes.png
new file mode 100644
index 0000000..a6fc345
Binary files /dev/null and b/frontend/gamma/images/old/main/blocks/directLoginGridStripes.png differ
diff --git a/frontend/gamma/images/old/main/blocks/otherPanelBackground.png b/frontend/gamma/images/old/main/blocks/otherPanelBackground.png
new file mode 100644
index 0000000..d9f5ec5
Binary files /dev/null and b/frontend/gamma/images/old/main/blocks/otherPanelBackground.png differ
diff --git a/frontend/gamma/images/old/main/blocks/otherPanelBackground_selected.png b/frontend/gamma/images/old/main/blocks/otherPanelBackground_selected.png
new file mode 100644
index 0000000..0ce1d0c
Binary files /dev/null and b/frontend/gamma/images/old/main/blocks/otherPanelBackground_selected.png differ
diff --git a/frontend/gamma/images/old/main/grid/ascending.png b/frontend/gamma/images/old/main/grid/ascending.png
new file mode 100644
index 0000000..9a05f48
Binary files /dev/null and b/frontend/gamma/images/old/main/grid/ascending.png differ
diff --git a/frontend/gamma/images/old/main/grid/createNewCardSplash.png b/frontend/gamma/images/old/main/grid/createNewCardSplash.png
new file mode 100644
index 0000000..f7289a5
Binary files /dev/null and b/frontend/gamma/images/old/main/grid/createNewCardSplash.png differ
diff --git a/frontend/gamma/images/old/main/grid/createNewCardSplash_selected.png b/frontend/gamma/images/old/main/grid/createNewCardSplash_selected.png
new file mode 100644
index 0000000..13d536f
Binary files /dev/null and b/frontend/gamma/images/old/main/grid/createNewCardSplash_selected.png differ
diff --git a/frontend/gamma/images/old/main/grid/descending.png b/frontend/gamma/images/old/main/grid/descending.png
new file mode 100644
index 0000000..868857b
Binary files /dev/null and b/frontend/gamma/images/old/main/grid/descending.png differ
diff --git a/frontend/gamma/images/old/main/grid/directLogins/ascending.png b/frontend/gamma/images/old/main/grid/directLogins/ascending.png
new file mode 100644
index 0000000..e1ace30
Binary files /dev/null and b/frontend/gamma/images/old/main/grid/directLogins/ascending.png differ
diff --git a/frontend/gamma/images/old/main/grid/directLogins/descending.png b/frontend/gamma/images/old/main/grid/directLogins/descending.png
new file mode 100644
index 0000000..47b0685
Binary files /dev/null and b/frontend/gamma/images/old/main/grid/directLogins/descending.png differ
diff --git a/frontend/gamma/images/old/main/grid/directLogins/unsorted.png b/frontend/gamma/images/old/main/grid/directLogins/unsorted.png
new file mode 100644
index 0000000..ecf674e
Binary files /dev/null and b/frontend/gamma/images/old/main/grid/directLogins/unsorted.png differ
diff --git a/frontend/gamma/images/old/main/grid/favicon.png b/frontend/gamma/images/old/main/grid/favicon.png
new file mode 100644
index 0000000..00d208d
Binary files /dev/null and b/frontend/gamma/images/old/main/grid/favicon.png differ
diff --git a/frontend/gamma/images/old/main/grid/running_search.gif b/frontend/gamma/images/old/main/grid/running_search.gif
new file mode 100644
index 0000000..d02d3b7
Binary files /dev/null and b/frontend/gamma/images/old/main/grid/running_search.gif differ
diff --git a/frontend/gamma/images/old/main/grid/search.png b/frontend/gamma/images/old/main/grid/search.png
new file mode 100644
index 0000000..5bc8d62
Binary files /dev/null and b/frontend/gamma/images/old/main/grid/search.png differ
diff --git a/frontend/gamma/images/old/main/grid/unsorted.png b/frontend/gamma/images/old/main/grid/unsorted.png
new file mode 100644
index 0000000..4bbcee3
Binary files /dev/null and b/frontend/gamma/images/old/main/grid/unsorted.png differ
diff --git a/frontend/gamma/images/old/main/messageBoxBackground.png b/frontend/gamma/images/old/main/messageBoxBackground.png
new file mode 100644
index 0000000..de598b2
Binary files /dev/null and b/frontend/gamma/images/old/main/messageBoxBackground.png differ
diff --git a/frontend/gamma/images/old/main/messageBoxCloseButton.png b/frontend/gamma/images/old/main/messageBoxCloseButton.png
new file mode 100644
index 0000000..061a7bb
Binary files /dev/null and b/frontend/gamma/images/old/main/messageBoxCloseButton.png differ
diff --git a/frontend/gamma/images/old/main/messageBoxCloseButtonActive.png b/frontend/gamma/images/old/main/messageBoxCloseButtonActive.png
new file mode 100644
index 0000000..dbc6871
Binary files /dev/null and b/frontend/gamma/images/old/main/messageBoxCloseButtonActive.png differ
diff --git a/frontend/gamma/images/old/main/tabs/cardsBackground.png b/frontend/gamma/images/old/main/tabs/cardsBackground.png
new file mode 100644
index 0000000..dd3643e
Binary files /dev/null and b/frontend/gamma/images/old/main/tabs/cardsBackground.png differ
diff --git a/frontend/gamma/images/old/main/tabs/directLoginBackground.png b/frontend/gamma/images/old/main/tabs/directLoginBackground.png
new file mode 100644
index 0000000..23a9b22
Binary files /dev/null and b/frontend/gamma/images/old/main/tabs/directLoginBackground.png differ
diff --git a/frontend/gamma/images/old/main/tabs/groupsBackground.png b/frontend/gamma/images/old/main/tabs/groupsBackground.png
new file mode 100644
index 0000000..9cbc9ba
Binary files /dev/null and b/frontend/gamma/images/old/main/tabs/groupsBackground.png differ
diff --git a/frontend/gamma/images/old/main/tabs/itemsBackground.png b/frontend/gamma/images/old/main/tabs/itemsBackground.png
new file mode 100644
index 0000000..1a276a5
Binary files /dev/null and b/frontend/gamma/images/old/main/tabs/itemsBackground.png differ
diff --git a/frontend/gamma/images/old/main/tabs/selectionHighligher.png b/frontend/gamma/images/old/main/tabs/selectionHighligher.png
new file mode 100644
index 0000000..f93fb02
Binary files /dev/null and b/frontend/gamma/images/old/main/tabs/selectionHighligher.png differ
diff --git a/frontend/gamma/images/old/main/tabs/selectionHighligherGray copy.png b/frontend/gamma/images/old/main/tabs/selectionHighligherGray copy.png
new file mode 100644
index 0000000..7741a7a
Binary files /dev/null and b/frontend/gamma/images/old/main/tabs/selectionHighligherGray copy.png differ
diff --git a/frontend/gamma/images/old/main/tabs/selectionHighligherGray.png b/frontend/gamma/images/old/main/tabs/selectionHighligherGray.png
new file mode 100644
index 0000000..8f6a690
Binary files /dev/null and b/frontend/gamma/images/old/main/tabs/selectionHighligherGray.png differ
diff --git a/frontend/gamma/images/old/main/tabs/tagsBackground.png b/frontend/gamma/images/old/main/tabs/tagsBackground.png
new file mode 100644
index 0000000..4a8091d
Binary files /dev/null and b/frontend/gamma/images/old/main/tabs/tagsBackground.png differ
diff --git a/frontend/gamma/images/old/main/userInfoBackground.png b/frontend/gamma/images/old/main/userInfoBackground.png
new file mode 100644
index 0000000..6756c83
Binary files /dev/null and b/frontend/gamma/images/old/main/userInfoBackground.png differ
diff --git a/frontend/gamma/images/old/main/userInfoBullet.png b/frontend/gamma/images/old/main/userInfoBullet.png
new file mode 100644
index 0000000..3817764
Binary files /dev/null and b/frontend/gamma/images/old/main/userInfoBullet.png differ
diff --git a/frontend/gamma/images/old/new_background.png b/frontend/gamma/images/old/new_background.png
new file mode 100644
index 0000000..f946a47
Binary files /dev/null and b/frontend/gamma/images/old/new_background.png differ
diff --git a/frontend/gamma/images/old/new_background_left.png b/frontend/gamma/images/old/new_background_left.png
new file mode 100644
index 0000000..e9bd958
Binary files /dev/null and b/frontend/gamma/images/old/new_background_left.png differ
diff --git a/frontend/gamma/images/old/note.png b/frontend/gamma/images/old/note.png
new file mode 100644
index 0000000..4e43691
Binary files /dev/null and b/frontend/gamma/images/old/note.png differ
diff --git a/frontend/gamma/images/old/passwordField/background copy.png b/frontend/gamma/images/old/passwordField/background copy.png
new file mode 100644
index 0000000..05050bb
Binary files /dev/null and b/frontend/gamma/images/old/passwordField/background copy.png differ
diff --git a/frontend/gamma/images/old/passwordField/background.png b/frontend/gamma/images/old/passwordField/background.png
new file mode 100644
index 0000000..3835a86
Binary files /dev/null and b/frontend/gamma/images/old/passwordField/background.png differ
diff --git a/frontend/gamma/images/old/ruler/exit.png b/frontend/gamma/images/old/ruler/exit.png
new file mode 100644
index 0000000..30ab430
Binary files /dev/null and b/frontend/gamma/images/old/ruler/exit.png differ
diff --git a/frontend/gamma/images/old/ruler/exit_selected.png b/frontend/gamma/images/old/ruler/exit_selected.png
new file mode 100644
index 0000000..07dfca6
Binary files /dev/null and b/frontend/gamma/images/old/ruler/exit_selected.png differ
diff --git a/frontend/gamma/images/old/ruler/marker.png b/frontend/gamma/images/old/ruler/marker.png
new file mode 100644
index 0000000..8d12a88
Binary files /dev/null and b/frontend/gamma/images/old/ruler/marker.png differ
diff --git a/frontend/gamma/images/old/ruler/next.png b/frontend/gamma/images/old/ruler/next.png
new file mode 100644
index 0000000..9d9662c
Binary files /dev/null and b/frontend/gamma/images/old/ruler/next.png differ
diff --git a/frontend/gamma/images/old/ruler/previous.png b/frontend/gamma/images/old/ruler/previous.png
new file mode 100644
index 0000000..39f5da3
Binary files /dev/null and b/frontend/gamma/images/old/ruler/previous.png differ
diff --git a/frontend/gamma/images/old/ruler/ruler.png b/frontend/gamma/images/old/ruler/ruler.png
new file mode 100644
index 0000000..546fa7b
Binary files /dev/null and b/frontend/gamma/images/old/ruler/ruler.png differ
diff --git a/frontend/gamma/images/old/ruler/small_next.png b/frontend/gamma/images/old/ruler/small_next.png
new file mode 100644
index 0000000..a35c66b
Binary files /dev/null and b/frontend/gamma/images/old/ruler/small_next.png differ
diff --git a/frontend/gamma/images/old/ruler/small_next_disabled.png b/frontend/gamma/images/old/ruler/small_next_disabled.png
new file mode 100644
index 0000000..69e7f31
Binary files /dev/null and b/frontend/gamma/images/old/ruler/small_next_disabled.png differ
diff --git a/frontend/gamma/images/old/ruler/small_next_selected.png b/frontend/gamma/images/old/ruler/small_next_selected.png
new file mode 100644
index 0000000..b8aa0c8
Binary files /dev/null and b/frontend/gamma/images/old/ruler/small_next_selected.png differ
diff --git a/frontend/gamma/images/old/ruler/small_previous.png b/frontend/gamma/images/old/ruler/small_previous.png
new file mode 100644
index 0000000..03f90f7
Binary files /dev/null and b/frontend/gamma/images/old/ruler/small_previous.png differ
diff --git a/frontend/gamma/images/old/ruler/small_previous_disabled.png b/frontend/gamma/images/old/ruler/small_previous_disabled.png
new file mode 100644
index 0000000..86a7565
Binary files /dev/null and b/frontend/gamma/images/old/ruler/small_previous_disabled.png differ
diff --git a/frontend/gamma/images/old/ruler/small_previous_selected.png b/frontend/gamma/images/old/ruler/small_previous_selected.png
new file mode 100644
index 0000000..5c61b45
Binary files /dev/null and b/frontend/gamma/images/old/ruler/small_previous_selected.png differ
diff --git a/frontend/gamma/images/old/tabPanels/background.png b/frontend/gamma/images/old/tabPanels/background.png
new file mode 100644
index 0000000..17350c9
Binary files /dev/null and b/frontend/gamma/images/old/tabPanels/background.png differ
diff --git a/frontend/gamma/images/old/tips/Tips_background.png b/frontend/gamma/images/old/tips/Tips_background.png
new file mode 100644
index 0000000..34170b9
Binary files /dev/null and b/frontend/gamma/images/old/tips/Tips_background.png differ
diff --git a/frontend/gamma/images/old/tips/close.png b/frontend/gamma/images/old/tips/close.png
new file mode 100644
index 0000000..554fc8e
Binary files /dev/null and b/frontend/gamma/images/old/tips/close.png differ
diff --git a/frontend/gamma/images/old/tips/open.png b/frontend/gamma/images/old/tips/open.png
new file mode 100644
index 0000000..66861d8
Binary files /dev/null and b/frontend/gamma/images/old/tips/open.png differ
diff --git a/frontend/gamma/images/old/tooltips/body.png b/frontend/gamma/images/old/tooltips/body.png
new file mode 100644
index 0000000..ae5b5a3
Binary files /dev/null and b/frontend/gamma/images/old/tooltips/body.png differ
diff --git a/frontend/gamma/images/old/tooltips/body_bottom.png b/frontend/gamma/images/old/tooltips/body_bottom.png
new file mode 100644
index 0000000..4567b5f
Binary files /dev/null and b/frontend/gamma/images/old/tooltips/body_bottom.png differ
diff --git a/frontend/gamma/images/old/tooltips/bottom_arrow.png b/frontend/gamma/images/old/tooltips/bottom_arrow.png
new file mode 100644
index 0000000..5884c94
Binary files /dev/null and b/frontend/gamma/images/old/tooltips/bottom_arrow.png differ
diff --git a/frontend/gamma/images/old/tooltips/left_arrow.png b/frontend/gamma/images/old/tooltips/left_arrow.png
new file mode 100644
index 0000000..290d062
Binary files /dev/null and b/frontend/gamma/images/old/tooltips/left_arrow.png differ
diff --git a/frontend/gamma/images/old/tooltips/right_arrow.png b/frontend/gamma/images/old/tooltips/right_arrow.png
new file mode 100644
index 0000000..d0bb64f
Binary files /dev/null and b/frontend/gamma/images/old/tooltips/right_arrow.png differ
diff --git a/frontend/gamma/images/old/tooltips/top_arrow.png b/frontend/gamma/images/old/tooltips/top_arrow.png
new file mode 100644
index 0000000..a5e8845
Binary files /dev/null and b/frontend/gamma/images/old/tooltips/top_arrow.png differ
diff --git a/frontend/gamma/js/Clipperz/Async.js b/frontend/gamma/js/Clipperz/Async.js
index 97d8ecf..f7a9517 100644
--- a/frontend/gamma/js/Clipperz/Async.js
+++ b/frontend/gamma/js/Clipperz/Async.js
@@ -513,9 +513,9 @@ MochiKit.Base.update(Clipperz.Async, {
return MochiKit.Base.map(function (aResult) {
if (aResult[0]) {
return aResult[1];
- } else {
+ } else {
throw aResult[1];
- }
+ }
}, aResultList);
});
diff --git a/frontend/gamma/js/Clipperz/Base.js b/frontend/gamma/js/Clipperz/Base.js
index 76b2c3f..9d399d9 100644
--- a/frontend/gamma/js/Clipperz/Base.js
+++ b/frontend/gamma/js/Clipperz/Base.js
@@ -77,6 +77,11 @@ MochiKit.Base.update(Clipperz.Base, {
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) {
diff --git a/frontend/gamma/js/Clipperz/PM/Connection.js b/frontend/gamma/js/Clipperz/PM/Connection.js
index b4e8aaa..a05a310 100644
--- a/frontend/gamma/js/Clipperz/PM/Connection.js
+++ b/frontend/gamma/js/Clipperz/PM/Connection.js
@@ -41,6 +41,7 @@ Clipperz.PM.Connection = function (args) {
this._clipperz_pm_crypto_version = null;
this._connectionId = null;
this._sharedSecret = null;
+ this._serverLockValue = null;
return this;
}
@@ -146,6 +147,16 @@ MochiKit.Logging.logError("### Connection.defaultErrorHandler: " + anErrorString
this._connectionId = aValue;
},
+ //-------------------------------------------------------------------------
+
+ 'serverLockValue': function () {
+ return this._serverLockValue;
+ },
+
+ 'setServerLockValue': function (aValue) {
+ this._serverLockValue = aValue;
+ },
+
//=========================================================================
/*
// TODO: ?????
@@ -320,13 +331,12 @@ Clipperz.PM.Connection.SRP['1.0'].prototype = MochiKit.Base.update(new Clipperz.
], {trace:false})
},
- 'login': function(/*anUsername, aPassphrase*/) {
+ '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');
@@ -399,6 +409,13 @@ Clipperz.PM.Connection.SRP['1.0'].prototype = MochiKit.Base.update(new Clipperz.
// 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');
@@ -429,12 +446,19 @@ Clipperz.PM.Connection.SRP['1.0'].prototype = MochiKit.Base.update(new Clipperz.
'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: (someParameters || {})
+ parameters: parameters
}
return this.sendMessage(args);
@@ -449,8 +473,7 @@ Clipperz.PM.Connection.SRP['1.0'].prototype = MochiKit.Base.update(new Clipperz.
deferredResult.addMethod(this.proxy(), 'message', someArguments);
deferredResult.addCallback(MochiKit.Base.bind(function(res) {
if (typeof(res['lock']) != 'undefined') {
-// TODO: ?????
-// ?? this.user().setLock(res['lock']);
+ this.setServerLockValue(res['lock']);
}
return res;
}, this));
@@ -587,6 +610,7 @@ Clipperz.PM.Connection.SRP['1.1'].prototype = MochiKit.Base.update(new Clipperz.
Clipperz.PM.Connection.exception = {
WrongChecksum: new MochiKit.Base.NamedError("Clipperz.ByteArray.exception.InvalidValue"),
+ StaleData: new MochiKit.Base.NamedError("Stale data"),
UnexpectedRequest: new MochiKit.Base.NamedError("Clipperz.ByteArray.exception.UnexpectedRequest")
};
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/User.js b/frontend/gamma/js/Clipperz/PM/DataModel/User.js
index 72d4006..646ce21 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/User.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/User.js
@@ -44,7 +44,7 @@ Clipperz.PM.DataModel.User = function (args) {
this._connectionVersion = 'current';
this._serverData = null;
- this._serverLockValue = null;
+// this._serverLockValue = null;
this._transientState = null;
this._deferredLocks = {
@@ -93,7 +93,7 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
},
//-------------------------------------------------------------------------
-
+/*
'serverLockValue': function () {
return this._serverLockValue;
},
@@ -101,7 +101,7 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
'setServerLockValue': function (aValue) {
this._serverLockValue = aValue;
},
-
+*/
//-------------------------------------------------------------------------
'transientState': function () {
@@ -220,8 +220,8 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
deferredResult.addMethod(this, 'prepareRemoteDataWithKey');
deferredResult.addCallbackPass(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'advanceProgress');
deferredResult.addMethod(this.connection(), 'register');
- deferredResult.addCallback(MochiKit.Base.itemgetter('lock'));
- deferredResult.addMethod(this, 'setServerLockValue');
+// deferredResult.addCallback(MochiKit.Base.itemgetter('lock'));
+// deferredResult.addMethod(this, 'setServerLockValue');
deferredResult.addCallbackPass(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'userSuccessfullyRegistered');
// deferredResult.addErrback (MochiKit.Base.method(this, 'handleRegistrationFailure'));
@@ -247,7 +247,7 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
MochiKit.Base.method(this.data(), 'setValue', 'passphrase')
], []));
deferredResult.addErrback(MochiKit.Base.method(this, 'getPassphrase'));
- deferredResult.addMethod(this.connection(), 'login');
+ deferredResult.addMethod(this.connection(), 'login', false);
deferredResult.addCallbackPass(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'userSuccessfullyLoggedIn');
deferredResult.addErrback (MochiKit.Base.method(this, 'handleConnectionFallback'));
@@ -329,7 +329,7 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
var oneTimePasswords;
//console.log(">>> ***************** user.unpackServerData", someServerData);
- this.setServerLockValue(someServerData['lock']);
+// this.setServerLockValue(someServerData['lock']);
headerVersion = this.headerFormatVersion(someServerData['header']);
@@ -662,8 +662,8 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
MochiKit.Base.method(this, 'invokeMethodNamedOnRecords', 'commitTransientState'),
MochiKit.Base.method(this, 'transientState'),
- MochiKit.Base.itemgetter('lock'),
- MochiKit.Base.method(this, 'setServerLockValue'),
+// MochiKit.Base.itemgetter('lock'),
+// MochiKit.Base.method(this, 'setServerLockValue'),
MochiKit.Base.method(this, 'resetTransientState', true)
], {trace:false});
},
@@ -740,7 +740,7 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
return aResult;
}, this), result);
deferredResult.addCallback(Clipperz.Async.setItem, result, 'version', Clipperz.PM.Crypto.encryptingFunctions.currentVersion);
- deferredResult.addCallback(Clipperz.Async.setItem, result, 'lock', this.serverLockValue());
+// deferredResult.addCallback(Clipperz.Async.setItem, result, 'lock', this.serverLockValue());
deferredResult.callback();
return deferredResult;
diff --git a/frontend/gamma/js/Clipperz/PM/PIN.js b/frontend/gamma/js/Clipperz/PM/PIN.js
new file mode 100644
index 0000000..bc932b2
--- /dev/null
+++ b/frontend/gamma/js/Clipperz/PM/PIN.js
@@ -0,0 +1,134 @@
+/*
+
+Copyright 2008-2011 Clipperz Srl
+
+This file is part of Clipperz Community Edition.
+Clipperz Community Edition is an online password manager.
+For further information about its features and functionalities please
+refer to http://www.clipperz.com.
+
+* Clipperz Community Edition is free software: you can redistribute
+ it and/or modify it under the terms of the GNU Affero General Public
+ License as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+
+* Clipperz Community Edition is distributed in the hope that it will
+ be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU Affero General Public License for more details.
+
+* You should have received a copy of the GNU Affero General Public
+ License along with Clipperz Community Edition. If not, see
+ .
+
+*/
+
+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);
+ byteArrayValue = new Clipperz.ByteArray(encodedValue);
+ encryptedValue = Clipperz.Crypto.AES.encrypt(this.deriveKeyFromPin(aPIN), byteArrayValue).toBase64String();
+
+ localStorage[this.CREDENTIALS] = encryptedValue;
+ },
+
+ 'removeLocalCredentials': function () {
+ localStorage.removeItem(this.CREDENTIALS);
+ localStorage.removeItem(this.FAILURE_COUNT);
+ },
+
+ //-------------------------------------------------------------------------
+ __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
new file mode 100644
index 0000000..803c590
--- /dev/null
+++ b/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.OfflineCache.js
@@ -0,0 +1,65 @@
+/*
+
+Copyright 2008-2011 Clipperz Srl
+
+This file is part of Clipperz Community Edition.
+Clipperz Community Edition is an online password manager.
+For further information about its features and functionalities please
+refer to http://www.clipperz.com.
+
+* Clipperz Community Edition is free software: you can redistribute
+ it and/or modify it under the terms of the GNU Affero General Public
+ License as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+
+* Clipperz Community Edition is distributed in the hope that it will
+ be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU Affero General Public License for more details.
+
+* You should have received a copy of the GNU Affero General Public
+ License along with Clipperz Community Edition. If not, see
+ .
+
+*/
+
+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/UI/Common/Components/BaseComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js
index 2a03fdf..b9d7adf 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js
@@ -406,6 +406,10 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.BaseComponent, /*Ext.Compo
return result;
},
+ 'getAnchor': function (aValue) {
+ return '#' + this.getId(aValue);
+ },
+
//-------------------------------------------------------------------------
'getElement': function(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 716d851..1010c9d 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Button.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Button.js
@@ -62,7 +62,8 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.Button, Clipperz.PM.UI.Com
//-------------------------------------------------------------------------
'renderSelf': function () {
- this.append(this.element(), {tag:'div', id:this.getId('wrapper'), cls:'button_wrapper', children:[
+/*
+ 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()}
@@ -70,36 +71,43 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.Button, Clipperz.PM.UI.Com
{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('wrapper'), 'default');
+ MochiKit.DOM.addElementClass(this.getId('button'), 'default');
}
- MochiKit.Signal.connect(this.getId('wrapper'), 'onmouseenter', this, 'handleOnMouseEnter');
- MochiKit.Signal.connect(this.getId('wrapper'), 'onmouseleave', this, 'handleOnMouseLeave');
- MochiKit.Signal.connect(this.getId('wrapper'), 'onmousedown', this, 'handleOnMouseDown');
- MochiKit.Signal.connect(this.getId('wrapper'), 'onclick', this, 'handleOnClick');
+// 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('wrapper'), 'hover');
+ MochiKit.DOM.addElementClass(this.getId('button'), 'hover');
},
'handleOnMouseLeave': function (anEvent) {
- MochiKit.DOM.removeElementClass(this.getId('wrapper'), 'hover');
- MochiKit.DOM.removeElementClass(this.getId('wrapper'), 'clicked');
+ MochiKit.DOM.removeElementClass(this.getId('button'), 'hover');
+ MochiKit.DOM.removeElementClass(this.getId('button'), 'clicked');
},
'handleOnMouseDown': function (anEvent) {
- MochiKit.DOM.addElementClass(this.getId('wrapper'), 'clicked');
+ 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/SimpleMessagePanel.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js
index 1992154..1d816a9 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js
@@ -98,14 +98,29 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.SimpleMessagePanel, Clippe
},
'setType': function (aValue) {
- if (this.getElement('icon') != null) {
- MochiKit.DOM.removeElementClass(this.getId('icon'), this._type);
- MochiKit.DOM.addElementClass(this.getId('icon'), 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 = '!';
+ }
+
+ return result;
+ },
+
//-------------------------------------------------------------------------
'buttons': function () {
@@ -132,17 +147,20 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.SimpleMessagePanel, Clippe
'renderSelf': function() {
this.append(this.element(), {tag:'div', cls:'SimpleMessagePanel', id:this.getId('panel'), children: [
- {tag:'div', cls:'header', 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:'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:[]}
+ ]}
+// {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();
diff --git a/frontend/gamma/js/Clipperz/PM/UI/iPhone/Components/CardDetail.js b/frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/CardDetail.js
similarity index 51%
rename from frontend/gamma/js/Clipperz/PM/UI/iPhone/Components/CardDetail.js
rename to frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/CardDetail.js
index 5380aa1..32dfa63 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/iPhone/Components/CardDetail.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/CardDetail.js
@@ -23,30 +23,30 @@ refer to http://www.clipperz.com.
*/
-Clipperz.Base.module('Clipperz.PM.UI.iPhone.Components');
+Clipperz.Base.module('Clipperz.PM.UI.Mobile.Components');
-Clipperz.PM.UI.iPhone.Components.CardDetail = function(args) {
+Clipperz.PM.UI.Mobile.Components.CardDetail = function(args) {
args = args || {};
- Clipperz.PM.UI.iPhone.Components.CardDetail.superclass.constructor.apply(this, arguments);
+ Clipperz.PM.UI.Mobile.Components.CardDetail.superclass.constructor.apply(this, arguments);
- this._cardReference = null;
+// this._cardReference = null;
return this;
}
//=============================================================================
-Clipperz.Base.extend(Clipperz.PM.UI.iPhone.Components.CardDetail, Clipperz.PM.UI.Common.Components.BaseComponent, {
+Clipperz.Base.extend(Clipperz.PM.UI.Mobile.Components.CardDetail, Clipperz.PM.UI.Common.Components.BaseComponent, {
//-------------------------------------------------------------------------
'toString': function () {
- return "Clipperz.PM.UI.iPhone.Components.CardDetail component";
+ return "Clipperz.PM.UI.Mobile.Components.CardDetail component";
},
//-------------------------------------------------------------------------
-
+/*
'cardReference': function () {
return this._cardReference;
},
@@ -54,20 +54,156 @@ Clipperz.Base.extend(Clipperz.PM.UI.iPhone.Components.CardDetail, Clipperz.PM.UI
'setCardReference': function (aValue) {
this._cardReference = aValue;
},
-
+*/
//-------------------------------------------------------------------------
- 'renderSelf': function(/*aContainer, aPosition*/) {
+ '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')} //,
-// {tag:'h1', cls:'loading', html:"loading"}
]}
]);
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});
+
+ },
//=========================================================================
@@ -143,9 +279,9 @@ Clipperz.Base.extend(Clipperz.PM.UI.iPhone.Components.CardDetail, Clipperz.PM.UI
MochiKit.DOM.setNodeAttribute(anEvent.src(), 'toggled', nextState);
},
-*/
+* /
//=========================================================================
-
+/*
'directLoginClickHandler': function (anEvent) {
anEvent.preventDefault();
@@ -156,7 +292,7 @@ Clipperz.Base.extend(Clipperz.PM.UI.iPhone.Components.CardDetail, Clipperz.PM.UI
MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'selectedDirectLogin', {cardReference:this.cardReference(), directLoginReference:directLoginReference});
}
},
-
+*/
//=========================================================================
__syntaxFix__: "syntax fix"
diff --git a/frontend/gamma/js/Clipperz/PM/UI/iPhone/Components/CardList.js b/frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/CardList.js
similarity index 68%
rename from frontend/gamma/js/Clipperz/PM/UI/iPhone/Components/CardList.js
rename to frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/CardList.js
index c3f2701..a4aa212 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/iPhone/Components/CardList.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/CardList.js
@@ -23,12 +23,12 @@ refer to http://www.clipperz.com.
*/
-Clipperz.Base.module('Clipperz.PM.UI.iPhone.Components');
+Clipperz.Base.module('Clipperz.PM.UI.Mobile.Components');
-Clipperz.PM.UI.iPhone.Components.CardList = function(args) {
+Clipperz.PM.UI.Mobile.Components.CardList = function(args) {
args = args || {};
- Clipperz.PM.UI.iPhone.Components.CardList.superclass.constructor.apply(this, arguments);
+ Clipperz.PM.UI.Mobile.Components.CardList.superclass.constructor.apply(this, arguments);
this._cardDetail = null;
@@ -37,44 +37,97 @@ Clipperz.PM.UI.iPhone.Components.CardList = function(args) {
//=============================================================================
-Clipperz.Base.extend(Clipperz.PM.UI.iPhone.Components.CardList, Clipperz.PM.UI.Common.Components.BaseComponent, {
+Clipperz.Base.extend(Clipperz.PM.UI.Mobile.Components.CardList, Clipperz.PM.UI.Common.Components.BaseComponent, {
//-------------------------------------------------------------------------
'toString': function () {
- return "Clipperz.PM.UI.iPhone.Components.CardList component";
+ return "Clipperz.PM.UI.Mobile.Components.CardList component";
},
//-------------------------------------------------------------------------
- 'renderSelf': function(/*aContainer, aPosition*/) {
- this.append(this.element(), [
- {tag:'div', cls:'toolbar', id:'toolbar', children:[
- {tag:'h1', id:'pageTitle', html:"cards"},
- {tag:'a', id:'backButton', cls:'button', href:'#', html:"cards"}
+ '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:'cardList', id:this.getId('cardList'), children:[
- {tag:'form', title:'search', cls:'panel cardListSearchForm', id:this.getId('cardListSearchForm'), children:[
- {tag:'input', type:'search', name:'search', value:"", placeholder:"search", id:this.getId('searchField')}
- ]},
- {tag:'ul', cls:'panel cardListPanel', id:this.getId('cardListPanel'), children:[]}
- ]},
- {tag:'div', cls:'panel cardDetailPanel', id:this.getId('cardDetail')}
- ]);
+ {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('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('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.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'));
+// 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();
@@ -127,7 +180,7 @@ Clipperz.Base.extend(Clipperz.PM.UI.iPhone.Components.CardList, Clipperz.PM.UI.C
'cardDetail': function (someData) {
if (this._cardDetail == null) {
- this._cardDetail = new Clipperz.PM.UI.iPhone.Components.CardDetail({element:this.getElement('cardDetail')});
+ this._cardDetail = new Clipperz.PM.UI.Mobile.Components.CardDetail({element:this.getElement('cardDetail')});
}
return this._cardDetail;
@@ -195,7 +248,7 @@ Clipperz.Base.extend(Clipperz.PM.UI.iPhone.Components.CardList, Clipperz.PM.UI.C
], {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
new file mode 100644
index 0000000..eafcdbc
--- /dev/null
+++ b/frontend/gamma/js/Clipperz/PM/UI/Mobile/Components/LoginForm.js
@@ -0,0 +1,356 @@
+/*
+
+Copyright 2008-2011 Clipperz Srl
+
+This file is part of Clipperz Community Edition.
+Clipperz Community Edition is an online password manager.
+For further information about its features and functionalities please
+refer to http://www.clipperz.com.
+
+* Clipperz Community Edition is free software: you can redistribute
+ it and/or modify it under the terms of the GNU Affero General Public
+ License as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+
+* Clipperz Community Edition is distributed in the hope that it will
+ be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU Affero General Public License for more details.
+
+* You should have received a copy of the GNU Affero General Public
+ License along with Clipperz Community Edition. If not, see
+ .
+
+*/
+
+Clipperz.Base.module('Clipperz.PM.UI.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
new file mode 100644
index 0000000..12a61f7
--- /dev/null
+++ b/frontend/gamma/js/Clipperz/PM/UI/Mobile/Controllers/MainController.js
@@ -0,0 +1,393 @@
+/*
+
+Copyright 2008-2011 Clipperz Srl
+
+This file is part of Clipperz Community Edition.
+Clipperz Community Edition is an online password manager.
+For further information about its features and functionalities please
+refer to http://www.clipperz.com.
+
+* Clipperz Community Edition is free software: you can redistribute
+ it and/or modify it under the terms of the GNU Affero General Public
+ License as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+
+* Clipperz Community Edition is distributed in the hope that it will
+ be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU Affero General Public License for more details.
+
+* You should have received a copy of the GNU Affero General Public
+ License along with Clipperz Community Edition. If not, see
+ .
+
+*/
+
+Clipperz.Base.module('Clipperz.PM.UI.Mobile.Controllers');
+
+Clipperz.PM.UI.Mobile.Controllers.MainController = function() {
+ 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.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+tSqhz9SuqpZlvR1EfBiOJTSgYMMM7jpYsAEyqJC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0brhBl8mEUtnWEs9uISLEXScYHEdEigYCp1V277+ZPy1nW+P07+FG7+JmPRe55nfH8W8m9ZPr07YeiJlskiKSRyne5ltk6O2fuMJ58LFykx7KcPJsxfrpy++qSHSnzCFYLEEjp5ljoDCyF8/7YWLi/7m3w+eO3duPE7tYXynDff3x17YdU5qWr1kTg1Lnzcs9CWY7SDg9/3f/a0v7By/WdHU0RlbvWJJI85GkoimGAP5ZG7XLf2nndU//tVu0xjHya24CpPcXcfae+D48cSU5cuWVotuy7RUiR1NXvfQ4+ccp8Izn4phW8a7vcqWldOYfoERgqGqTrnta4/3vrn3ICqUdL8MrsZKFwBnz51/9VBm+oL1cxuMjKt+8zfifE/Fxr6GQl8kmvHNXD9HSP7a57pv/NvtHd3dw82N/SGBy75P/cmW//rA6qv1xAwwSf2fn77z3ttXXBP/FGiccTXW2L1/p5vABCYwgQlMYAL/2fH/AdkCEQl+/Ar/AAAAAElFTkSuQmCCCg==',
+// icon4: 'jqtouch4.png',
+// startupScreen: null, // Pass a string path to a 320px x 460px startup screen for full screen apps.
+ statusBar: 'black-translucent', // Styles the status bar when running as a fullscreen app. Other options are `default`, `black`, and `black-translucent`.
+// addGlossToIcon: true, // Set to 'false' to prevent automatic glossy button effect on icon.
+ preloadImages: false, // Pass an array of image paths to load them before page loads. Ex: `['images/link_over.png', 'images/link_select.png']`
+ fixedViewport: true, // Removes the user's ability to scale the page. Ensures the site behaves more like an application.
+// fullScreen: true, // The website will become a fullscreen application when saved to a user's home screen. Set to `false` to disable.
+// fullScreenClass: 'fullscreen' // Adds a class to the `` 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.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.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.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');
+ },
+
+ //-------------------------------------------------------------------------
+
+ '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.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 ee6d7a3..d6b0574 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AccountPanel.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AccountPanel.js
@@ -41,6 +41,10 @@ Clipperz.PM.UI.Web.Components.AccountPanel = function(args) {
tab: 'passphraseTab',
panel: 'passphrasePanel'
},
+ 'OTP': {
+ tab: 'OTPTab',
+ panel: 'OTPPanel'
+ },
'PREFERENCES': {
tab: 'preferencesTab',
panel: 'preferencesPanel'
@@ -74,6 +78,7 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.AccountPanel, Clipperz.PM.UI.
{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'}]}
]}
@@ -117,16 +122,16 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.AccountPanel, Clipperz.PM.UI.
{tag:'div', cls:'clear'},
{tag:'div', cls:'confirmButton', id:this.getId('confirmationButton'), children:[
{tag:'span', html:"change passphrase"}
- ]},
-
- {tag:'h3', cls:'manageOTP', html:"Manage One-Time Passphrases"},
- {}
+ ]}
+ ]},
+ {tag:'li', id:this.getId('OTPPanel'), children:[
+// {tag:'h3', html:"Manage One-Time Passphrases"}
]},
{tag:'li', id:this.getId('preferencesPanel'), children:[
- {tag:'h3', html:"-- Preferences --"}
+// {tag:'h3', html:"-- Preferences --"}
]},
{tag:'li', id:this.getId('loginHistoryPanel'), children:[
- {tag:'h3', html:"-- Login History --"}
+// {tag:'h3', html:"-- Login History --"}
]}
]}
]}
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 d2f1045..462d864 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js
@@ -82,16 +82,18 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DataPanel, Clipperz.PM.UI.Com
{tag:'div', cls:'subPanelContent', children:[
{tag:'ul', children:[
{tag:'li', id:this.getId('offlineCopyPanel'), children:[
- {tag:'h3', html:"Offline copy"}
+// {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:'h3', html:"Sharing"}
]},
{tag:'li', id:this.getId('importPanel'), children:[
- {tag:'h3', html:"Import"}
+// {tag:'h3', html:"Import"}
]},
{tag:'li', id:this.getId('exportPanel'), children:[
- {tag:'h3', html:"Export"}
+// {tag:'h3', html:"Export"}
]}
]}
]}
@@ -101,8 +103,14 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DataPanel, Clipperz.PM.UI.Com
]);
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/LoginProgress.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js
index 5d082b5..26506e7 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js
@@ -82,9 +82,10 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginProgress, Clipperz.PM.UI
]},
{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:'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"}
]}
]}
]});
@@ -95,7 +96,8 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginProgress, Clipperz.PM.UI
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('buttonLink'), 'onclick', this, 'cancelEventHandler');
+ MochiKit.Signal.connect(this.getId('button'), 'onclick', this, 'cancelEventHandler');
},
//-------------------------------------------------------------------------
@@ -121,7 +123,9 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginProgress, Clipperz.PM.UI
//-------------------------------------------------------------------------
'showErrorMessage': function() {
- this.getElement('buttonLink').innerHTML = "close";
+// this.getElement('buttonLink').innerHTML = "close";
+ this.getElement('button').innerHTML = "close";
+ MochiKit.DOM.addElementClass(this.getElement('button'), 'default');
MochiKit.Style.hideElement(this.getElement('progressBar'));
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 3ee6189..0fa369f 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ToolsPanel.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ToolsPanel.js
@@ -82,16 +82,16 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.ToolsPanel, Clipperz.PM.UI.Co
{tag:'div', cls:'subPanelContent', children:[
{tag:'ul', children:[
{tag:'li', id:this.getId('passwordGeneratorPanel'), children:[
- {tag:'h3', html:"Password generator"}
+// {tag:'h3', html:"Password generator"}
]},
{tag:'li', id:this.getId('bookmarkletPanel'), children:[
- {tag:'h3', html:"Bookmarklet"}
+// {tag:'h3', html:"Bookmarklet"}
]},
{tag:'li', id:this.getId('compactEditionPanel'), children:[
- {tag:'h3', html:"Compact edition"}
+// {tag:'h3', html:"Compact edition"}
]},
{tag:'li', id:this.getId('httpAuthPanel'), children:[
- {tag:'h3', html:"HTTP Auth"}
+// {tag:'h3', html:"HTTP Auth"}
]}
]}
]}
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 9a0e744..1ab2e69 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js
@@ -231,9 +231,11 @@ 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(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});
@@ -321,6 +323,29 @@ MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.AppController.prototype, {
], {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/iPhone/Components/LoginForm.js b/frontend/gamma/js/Clipperz/PM/UI/iPhone/Components/LoginForm.js
deleted file mode 100644
index 5341878..0000000
--- a/frontend/gamma/js/Clipperz/PM/UI/iPhone/Components/LoginForm.js
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
-
-Copyright 2008-2011 Clipperz Srl
-
-This file is part of Clipperz Community Edition.
-Clipperz Community Edition is an online password manager.
-For further information about its features and functionalities please
-refer to http://www.clipperz.com.
-
-* Clipperz Community Edition is free software: you can redistribute
- it and/or modify it under the terms of the GNU Affero General Public
- License as published by the Free Software Foundation, either version
- 3 of the License, or (at your option) any later version.
-
-* Clipperz Community Edition is distributed in the hope that it will
- be useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU Affero General Public License for more details.
-
-* You should have received a copy of the GNU Affero General Public
- License along with Clipperz Community Edition. If not, see
- .
-
-*/
-
-Clipperz.Base.module('Clipperz.PM.UI.iPhone.Components');
-
-Clipperz.PM.UI.iPhone.Components.LoginForm = function(args) {
- args = args || {};
-
- Clipperz.PM.UI.iPhone.Components.LoginForm.superclass.constructor.apply(this, arguments);
-
- return this;
-}
-
-//=============================================================================
-
-Clipperz.Base.extend(Clipperz.PM.UI.iPhone.Components.LoginForm, Clipperz.PM.UI.Common.Components.BaseComponent, {
-
- //-------------------------------------------------------------------------
-
- 'toString': function () {
- return "Clipperz.PM.UI.iPhone.Components.LoginForm component";
- },
-
- //-------------------------------------------------------------------------
-
- 'focusOnUsername': function () {
- this.getElement('username').focus();
- },
-
- //-------------------------------------------------------------------------
-
- 'username': function () {
- return this.getElement('username').value;
- },
-
- 'passphrase': function () {
- return this.getElement('passphrase').value;
- },
-
- //-------------------------------------------------------------------------
-
- 'renderSelf': function(/*aContainer, aPosition*/) {
- this.append(this.element(), [
- {tag:'div', cls:'toolbar iPhoneClipperzToolbar', children:[
- {tag:'h1', id:'pageTitle', html:'Clipperz'},
- {tag:'a', id:'backButton', cls:'button', href:'#', html:"back"}
- ]},
- {tag:'form', title:'Theaters', cls:'panel toolbarlessPanel loginForm', id:this.getId('loginFormPanel'), children:[
- {tag:'fieldset', id:this.getId('fieldset'), children:[
- {tag:'div', cls:'row', children:[
- {tag:'label', html:"username"},
- {tag:'input', type:'text', name:'username', value:"", autocorrect:'off', autocapitalize:'off', id:this.getId('username')}
- ]},
- {tag:'div', cls:'row', children:[
- {tag:'label', html:"passphrase"},
- {tag:'input', type:'password', name:'passphrase', value:"", id:this.getId('passphrase')}
- ]}
- ]},
- {tag:'a', cls:'whiteButton', type:'submit', href:'#', html:"Login", id:this.getId('submit')}
- ]},
- {tag:'div', cls:'panel toolbarlessPanel loginProgressPanel', id:this.getId('loginProgressPanel'), children:[
- {tag:'div', id:this.getId('progressBar')} //,
-// {tag:'a', cls:'whiteButton', type:'submit', href:'#', html:"Cancel", id:this.getId('cancel')}
- ]},
- {tag:'div', cls:'panel loginErrorPanel', id:this.getId('loginErrorPanel'), children:[
- {tag:'div', cls:'errorMessage', id:this.getId('errorMessageBox'), children:[
- {tag:'h2', id:this.getId('errorMessage'), html:"Login failed"}
- ]}
- ]}
- ]);
-
- MochiKit.Signal.connect(this.getElement('submit'), 'onclick', this, 'submitHandler');
- MochiKit.Signal.connect(this.getElement('loginFormPanel'), 'onsubmit', this, 'submitHandler');
-
-// MochiKit.Signal.connect(this.getElement('cancel'), 'onclick', this, 'cancelHandler');
- MochiKit.Signal.connect('backButton', 'onclick', this, 'backHandler');
-
- this.addComponent(new Clipperz.PM.UI.Common.Components.ProgressBar({'element':this.getElement('progressBar')}));
-
-// MochiKit.Style.hideElement(this.getElement('errorMessage'));
-
- this.showLoginForm();
-// MochiKit.Async.callLater(0.2, MochiKit.Base.method(this, 'focusOnUsername'));
- },
-
- //-------------------------------------------------------------------------
-
- 'showLoginForm': function () {
- MochiKit.Style.showElement(this.getElement('loginFormPanel'));
- MochiKit.Style.hideElement(this.getElement('loginProgressPanel'));
- MochiKit.Style.hideElement(this.getElement('loginErrorPanel'));
- MochiKit.Style.hideElement('backButton');
- },
-
- 'slideInLoginForm': function () {
- var offset;
-
- offset = ((MochiKit.DOM.getNodeAttribute(MochiKit.DOM.currentDocument().body, 'orientation') == 'portrait') ? 320 : 480);
-
- MochiKit.Style.showElement(this.getElement('loginFormPanel'));
- MochiKit.Style.setElementPosition(this.getElement('loginFormPanel'), {x:-offset, y:0});
-
- new MochiKit.Visual.Sequence([
- new MochiKit.Visual.Parallel([
- new MochiKit.Visual.Move(this.getElement('loginErrorPanel'), {x:offset, y:0, mode:'relative', transition:MochiKit.Visual.Transitions.linear, sync:true}),
- new MochiKit.Visual.Move(this.getElement('loginFormPanel'), {x:0, y:0, mode:'absolute', transition:MochiKit.Visual.Transitions.linear, sync:true}),
- MochiKit.Visual.fade ('backButton', { transition:MochiKit.Visual.Transitions.linear, sync:true})
- ], {duration:0.5, sync:true}),
- MochiKit.Visual.fade(this.getElement('loginErrorPanel'), {duration:0, sync:true})
- ], {})
- },
-
- 'showLoginProgress': function () {
- MochiKit.Style.hideElement(this.getElement('loginFormPanel'));
- MochiKit.Style.showElement(this.getElement('loginProgressPanel'));
- },
-
- 'showLoginError': function (anError) {
- this.getElement('errorMessage').innerHTML = "Login error";
-
- MochiKit.Style.showElement('backButton');
- MochiKit.Style.hideElement(this.getElement('loginProgressPanel'));
- MochiKit.Style.showElement(this.getElement('loginErrorPanel'));
- MochiKit.Style.setElementPosition(this.getElement('loginErrorPanel'), {x:0, y:45});
- },
-
- //-------------------------------------------------------------------------
-/*
- 'disableCancelButton': function () {
- MochiKit.DOM.hideElement(this.getElement('cancel'));
- },
-*/
- //-------------------------------------------------------------------------
-
- 'submitHandler': function (anEvent) {
- anEvent.preventDefault();
-
- MochiKit.Signal.signal(this, 'doLogin', {'username':this.username(), 'passphrase':this.passphrase()});
- },
-
- 'cancelHandler': function (anEvent) {
- anEvent.preventDefault();
-
-//console.log("CANCEL");
- },
-
- 'backHandler': function (anEvent) {
- anEvent.preventDefault();
-
- this.slideInLoginForm();
- },
-
- //-------------------------------------------------------------------------
-
- __syntaxFix__: "syntax fix"
-});
diff --git a/frontend/gamma/js/Clipperz/PM/UI/iPhone/Controllers/MainController.js b/frontend/gamma/js/Clipperz/PM/UI/iPhone/Controllers/MainController.js
deleted file mode 100644
index 3fcaae1..0000000
--- a/frontend/gamma/js/Clipperz/PM/UI/iPhone/Controllers/MainController.js
+++ /dev/null
@@ -1,369 +0,0 @@
-/*
-
-Copyright 2008-2011 Clipperz Srl
-
-This file is part of Clipperz Community Edition.
-Clipperz Community Edition is an online password manager.
-For further information about its features and functionalities please
-refer to http://www.clipperz.com.
-
-* Clipperz Community Edition is free software: you can redistribute
- it and/or modify it under the terms of the GNU Affero General Public
- License as published by the Free Software Foundation, either version
- 3 of the License, or (at your option) any later version.
-
-* Clipperz Community Edition is distributed in the hope that it will
- be useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU Affero General Public License for more details.
-
-* You should have received a copy of the GNU Affero General Public
- License along with Clipperz Community Edition. If not, see
- .
-
-*/
-
-Clipperz.Base.module('Clipperz.PM.UI.iPhone.Controllers');
-
-// Some parts of this controller have been derived from the iUI library.
-
-Clipperz.PM.UI.iPhone.Controllers.MainController = function() {
- this._loginForm = null;
- this._cardList = null;
- this._cachedValues = null;
- this._user = null;
-
- if (typeof window.onorientationchange == 'object') {
- MochiKit.Signal.connect(window, 'onorientationchange', this, 'orientationChangeHandler');
- MochiKit.Async.callLater(0, MochiKit.Base.method(this, 'orientationChangeHandler'));
- } else {
- this.setOrientation('portrait');
-// this.setOrientation('landscape');
- }
-
- this.addMetaTag('viewport', 'width=devicewidth; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;');
- this.addMetaTag('apple-mobile-web-app-capable', 'yes');
- this.addMetaTag('apple-mobile-web-app-status-bar-style', 'black');
-
- this.addLinkTag('apple-touch-icon', 'data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAF8AAABfCAYAAACOTBv1AAAACXBIWXMAAAsTAAALEwEAmpwYAAAQC0lEQVR4nO2ce3wU1b3AvzOzz2TzBpKQhIS3CnLxgYoPqAgiQS8igiAqiFprtT571YpKUa9tvVgrVvhc7IXS4lUUvGgR5CWIoiAIYoQgJGDI+0k2yW42szNz7h8pGBHIPmazqeb7+UD4DHt+vzPfPTnnzJkzIwGCLqKCHO0K/JTpkh9FuuRHkS75UaRLfh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6VU44jawpF3ILXM3BL0VT9M08sqtjD03luraerq7wB7gBbAQcLAS8opB80s4087hrbLBPPXKO6ZvJzFV/nHyDx7m3c+rmXDDJOT6/dSrFtwtFpLtLSjt/K6pOnxZJZBsCcxeBUUlVSHVoayyhoxBo+glDlHnEWQmgtzOl+9TYddhiZJaCYSM45wJ3Pu3YjZ8/EVIdWiPiC0vVFZWcvVd8/nUPxqrqzt1PoMdlQ5qfWdOub9Gwq9J7NNHsG1XcN3NyTy/8B18fabS2Az729k8XemGj/KhpkFCtrqoyJrO+CfX8E3Bt2HV4Ux0yL6dEZdewO9vTaO5cC1CCHrFCfom/bAlljbA/moJS/pljH1qhymbmJKTk1j50CCaDm/jwt6CtJMWQA0D8kuhsEJCGODKOpcl+d14/d0Pw87dHhHpdk6mqLicFZ9Ucc3E27A35lPv1anxQrKTE5ftPj98WS6BEscz66wcKTZne3lzs48q0rm0ZwsV1V4yUr7L6W2B7QehvFYCAc5zJ3H3kkNs3bHXlNzt0WG3Ed1uNzfcv4j368fh6H4Obi98+i2UN7QOcnnlEqoKB61XsvXz/abmXrt5B/tixtCiSuwuaM1XVgeb86DeI6M4Ezjaazrjn1zFkaKOe8omKtsFzx00kFd/eR6evOUgQYJdUN8sYc+8hHHPfnH69/CEgaIorHl+Es1fvU2yS3DMIyOEIC7nfBbujmXF2tDemRMOUdur6XA4WPDUbWRVr0D11CNbY5i3pzebPjNn7f9U9M7O5LWpyTSV5CFJYB08hbvmf0RpWUXEcp6JDunzT4Wmabz74ReIjBEMH9iNQwzhleWRbX317gbktCGcn6ZzICGX2597i4aGxojmbA8R7T/ZvTKF3W7rsHwDB/SL+jkDIqpbxH/qdMrX+f5U6JIfRbrkR5Eu+VGkS34U6ZIfRbrkR5Eu+VGkS34U6ZIfRbrkR5H/Bx8z6HmTXnicAAAAAElFTkSuQmCCCg==');
-// this.addLinkTag('apple-touch-startup-image', 'default.png');
-
-// if (!window.navigator.standalone) // not running as an installed app
-
- MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'selectedDirectLogin', this, 'selectedDirectLoginHandler');
-
- MochiKit.DOM.addElementClass(document.body, 'iPhone');
- return this;
-}
-
-MochiKit.Base.update(Clipperz.PM.UI.iPhone.Controllers.MainController.prototype, {
-
- 'toString': function () {
- return "Clipperz.PM.UI.iPhone.Controllers.MainController";
- },
-
- //=========================================================================
-
- 'user': function () {
- return this._user;
- },
-
- 'setUser': function (aValue) {
- this._user = aValue;
- },
-
- //=========================================================================
-
- 'loginForm': function() {
- if (this._loginForm == null) {
- MochiKit.DOM.removeElement('mainDiv');
- this._loginForm = new Clipperz.PM.UI.iPhone.Components.LoginForm({element:MochiKit.DOM.currentDocument().body});
- MochiKit.Signal.connect(this._loginForm, 'doLogin', this, 'doLoginHandler')
- }
-
- 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.iPhone.Components.CardList({element:MochiKit.DOM.currentDocument().body});
- MochiKit.Signal.connect(this._cardList, 'searchEvent', this, 'searchEventHandler')
- MochiKit.Signal.connect(this._cardList, 'selectedCard', this, 'selecetedCardHandler')
- }
-
- return this._cardList;
- },
-
- //=========================================================================
-
- 'currentWidth': function () {
- return this._currentWidth;
- },
-
- 'setCurrentWidth': function (aValue) {
- this._currentWidth = aValue;
- },
-
- //=========================================================================
-
- 'orientationChangeHandler': function () {
- switch(window.orientation) {
- case 0:
- this.setOrientation('portrait');
- break;
- case 90:
- case -90:
- this.setOrientation('landscape');
- break;
- }
- },
-
- //-------------------------------------------------------------------------
-
- 'setOrientation': function (anOrientation) {
- document.body.setAttribute('orientation', anOrientation);
- setTimeout(scrollTo, 100, 0, 1);
- },
-
- //-------------------------------------------------------------------------
-
- 'slidePages': function (fromPage, toPage, backwards) {
- var axis;
- var slideDone;
-
- slideDone = function () {
- // console.log("slideDone");
- if (!hasClass(toPage, "dialog")) {
- fromPage.removeAttribute("selected");
- }
- checkTimer = setInterval(checkOrientAndLocation, 300);
- setTimeout(updatePage, 0, toPage, fromPage);
- fromPage.removeEventListener('webkitTransitionEnd', slideDone, false);
- }
-
- axis = (backwards ? fromPage : toPage).getAttribute("axis");
-
- clearInterval(checkTimer);
-
- if (canDoSlideAnim() && axis != 'y') {
- slide2(fromPage, toPage, backwards, slideDone);
- } else {
- slide1(fromPage, toPage, backwards, axis, slideDone);
- }
- },
-
- //-------------------------------------------------------------------------
-
- 'getCachedValues': function () {
- var deferredResult;
-
- if (this._cachedObjects != null) {
- deferredResult = MochiKit.Async.succeed(this._cachedObjects);
- } else {
- deferredResult = new Clipperz.Async.Deferred("MainController.getCachedValues", {trace:false});
- deferredResult.addMethod(this.user(), 'getRecords');
- deferredResult.addCallback(MochiKit.Base.map, Clipperz.Async.collectResults("MainController.getCachedValues - collectResults", {
- '_rowObject': MochiKit.Async.succeed,
- '_reference': MochiKit.Base.methodcaller('reference'),
- 'label': MochiKit.Base.methodcaller('label'),
- 'favicon': MochiKit.Base.methodcaller('favicon'),
- '_searchableContent': MochiKit.Base.methodcaller('searchableContent')
- }, {trace:false}));
- deferredResult.addCallback(Clipperz.Async.collectAll);
- deferredResult.addCallback(MochiKit.Base.bind(function (someRows) {
- this._cachedObjects = someRows;
- return this._cachedObjects;
- }, this));
- deferredResult.callback();
- }
-
- return deferredResult;
- },
- //=========================================================================
-
- 'run': function(shouldShowRegistrationForm) {
- this.loginForm().render();
- MochiKit.Async.callLater(1, MochiKit.Base.method(this.loginForm(), 'focusOnUsername'));
- },
-
- //=========================================================================
-
- 'doLoginHandler': function (someArgs) {
- var deferredResult;
- var parameters;
- var shouldUseOTP;
-// var loginProgress;
- var user;
- var getPassphraseDelegate;
-
- parameters = someArgs;
- shouldUseOTP = (typeof(parameters.passphrase) == 'undefined');
-
- getPassphraseDelegate = MochiKit.Base.partial(MochiKit.Async.succeed, parameters.passphrase);
- user = new Clipperz.PM.DataModel.User({'username':parameters.username, 'getPassphraseFunction':getPassphraseDelegate});
-
- deferredResult = new Clipperz.Async.Deferred("MainController.doLogin", {trace:false});
- deferredResult.addCallbackPass(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'initProgress', {'steps':4});
- deferredResult.addMethod(this.loginForm(), 'showLoginProgress');
- deferredResult.addCallback(MochiKit.Async.wait, 0.1);
- deferredResult.addMethod(Clipperz.Crypto.PRNG.defaultRandomGenerator(), 'deferredEntropyCollection');
- deferredResult.addMethod(user, 'login');
- deferredResult.addMethod(this, 'setUser', user);
- deferredResult.addMethod(user, 'getRecords');
- deferredResult.addMethod(this, 'removeLoginForm');
- deferredResult.addMethod(this.cardList(), 'render');
- deferredResult.addMethod(this, 'displaySelectedRecords', '');
- deferredResult.addErrback(MochiKit.Base.method(this.loginForm(), 'showLoginError'));
- deferredResult.callback();
-
- return deferredResult;
- },
-
- //=========================================================================
-
- 'searchEventHandler': function (aValue) {
-//console.log("searching for ... " + aValue);
- return this.displaySelectedRecords(aValue);
- },
-
- //=========================================================================
-
- '_displaySelectedRows': function (aFilter, someRows) {
- var result;
-
- result = someRows;
-
- if (aFilter != null) {
- var filter;
- var filterRegExp;
-
- filter = aFilter.replace(/[^A-Za-z0-9]/g, "\\$&");
- filterRegExp = new RegExp(filter, "i");
- result = MochiKit.Base.filter(function (aCachedResult) { return filterRegExp.test(aCachedResult['_searchableContent'])}, result);
- }
-
-
- result.sort(MochiKit.Base.partial(function (aKey, aComparator, aObject, bObject) {
- return aComparator(aObject[aKey], bObject[aKey]);
- }, 'label', Clipperz.Base.caseInsensitiveCompare));
-
- this.cardList().update(result);
- },
-
- //-------------------------------------------------------------------------
-
- 'displaySelectedRecords': function (aFilter) {
- return Clipperz.Async.callbacks("MainController.displaySelectedrows", [
- MochiKit.Base.method(this, 'getCachedValues'),
- MochiKit.Base.method(this, '_displaySelectedRows', aFilter)
- ], {trace:false});
- },
-
- //=========================================================================
-
- 'selecetedCardHandler': function (aRecordReference) {
- var deferredResult;
- var recordData;
-
- recordData = {};
-//console.log("Showing detail for card with reference", aRecordReference);
- deferredResult = new Clipperz.Async.Deferred("MainController.selectedCardHandler", {trace:false});
- deferredResult.addMethod(this.user(), 'getRecord', aRecordReference);
- deferredResult.collectResults({
- '_reference': MochiKit.Base.methodcaller('reference'),
- 'title': MochiKit.Base.methodcaller('label'),
- 'favicon': MochiKit.Base.methodcaller('favicon')
- });
- deferredResult.addCallback(function (someData) {
- MochiKit.Base.update(recordData, someData);
- })
- deferredResult.addMethod(this.cardList(), 'showCard', recordData);
-
- deferredResult.addMethod(this.user(), 'getRecord', aRecordReference);
- deferredResult.addMethodcaller('notes');
- deferredResult.addCallback(function (someNotes) {
- recordData['notes'] = someNotes;
- })
-
- deferredResult.addMethod(this.user(), 'getRecord', aRecordReference);
- deferredResult.addMethodcaller('getCurrentRecordVersion');
- deferredResult.addMethodcaller('fields');
- deferredResult.addCallback(MochiKit.Base.values);
- deferredResult.addCallback(MochiKit.Base.map, Clipperz.Async.collectResults("MainController.selectedCardHandler - fields", {
- 'label': MochiKit.Base.methodcaller('label'),
- 'value': MochiKit.Base.methodcaller('value'),
- 'isHidden': MochiKit.Base.methodcaller('isHidden')
- }, {trace:false}));
- deferredResult.addCallback(Clipperz.Async.collectAll);
- deferredResult.addCallback(function (someData) {
- recordData['fields'] = someData;
- });
-
- deferredResult.addMethod(this.user(), 'getRecord', aRecordReference);
- deferredResult.addMethodcaller('directLogins');
- deferredResult.addCallback(MochiKit.Base.values);
- deferredResult.addCallback(MochiKit.Base.map, Clipperz.Async.collectResults("MainController.selectedCardHandler - directLogins", {
- 'label': MochiKit.Base.methodcaller('label'),
- 'favicon': MochiKit.Base.methodcaller('favicon'),
- '_reference': MochiKit.Base.methodcaller('reference')
- }, {trace:false}));
- deferredResult.addCallback(Clipperz.Async.collectAll);
- deferredResult.addCallback(function (someData) {
- recordData['directLogins'] = someData;
- });
-
- deferredResult.addMethod(this.cardList(), 'showCardDetails', recordData);
- deferredResult.callback();
-
- return deferredResult;
- },
-
- //=========================================================================
-
- 'selectedDirectLoginHandler': function (someData) {
- var deferredResult;
-
-//console.log("<<< signal - directLogin");
- deferredResult = new Clipperz.Async.Deferred("MainController.selectedDirectLoginHandler", {trace:false});
- deferredResult.addMethod(this.user(), 'getRecord', someData['cardReference']);
- deferredResult.addMethodcaller('directLogins');
- deferredResult.addCallback(MochiKit.Base.itemgetter(someData['directLoginReference']));
-// deferredResult.addMethodcaller('runDirectLogin');
- deferredResult.addCallback(Clipperz.PM.UI.Common.Controllers.DirectLoginRunner.openDirectLogin);
- deferredResult.callback();
-
- return deferredResult;
- },
-
- //=========================================================================
-
- 'addMetaTag': function (aName, aContent) {
- var metaTag;
-
- metaTag = document.createElement('meta');
- metaTag.name = aName;
- metaTag.content = aContent;
- document.getElementsByTagName('head')[0].appendChild(metaTag);
- },
-
- 'addLinkTag': function (aRel, anHref) {
- var linkTag;
-
- linkTag = document.createElement('link');
- linkTag.rel = aRel;
- linkTag.href = anHref;
- document.getElementsByTagName('head')[0].appendChild(linkTag);
- },
-
- //=========================================================================
- __syntaxFix__: "syntax fix"
-});
\ No newline at end of file
diff --git a/frontend/gamma/js/main_iPhone.js b/frontend/gamma/js/main.mobile.js
similarity index 84%
rename from frontend/gamma/js/main_iPhone.js
rename to frontend/gamma/js/main.mobile.js
index 0644f68..60a32fa 100644
--- a/frontend/gamma/js/main_iPhone.js
+++ b/frontend/gamma/js/main.mobile.js
@@ -47,11 +47,18 @@ Clipperz.PM.RunTime = {};
function run() {
- MochiKit.DOM.removeElement('javaScriptAlert');
Clipperz.PM.Strings.Languages.initSetup();
- Clipperz.PM.RunTime.mainController = new Clipperz.PM.UI.iPhone.Controllers.MainController();
- Clipperz.PM.RunTime.mainController.run(false);
+ 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/creditsAndCopyrights.txt b/frontend/gamma/properties/creditsAndCopyrights.txt
index 598440d..59f0f0a 100644
--- a/frontend/gamma/properties/creditsAndCopyrights.txt
+++ b/frontend/gamma/properties/creditsAndCopyrights.txt
@@ -7,159 +7,200 @@
# MochiKit (http://www.mochikit.com)
- repository: @mochikit.repository@ (revision: @mochikit.version@)
- * Software licence: http://svn.mochikit.com/mochikit/trunk/licence.txt
+ * Software licence: https://github.com/mochi/mochikit/blob/master/LICENSE.txt
| MochiKit is dual-licensed software. It is available under the terms of the
| MIT License, or the Academic Free License version 2.1. The full text of
| each license is included below.
- |
+ |
+ | The MochiKit.Style.getElementPosition function is adapted from
+ | YAHOO.util.Dom.getXY v0.9.0. which is copyrighted by Yahoo! Inc. and
+ | licensed under the BSD license also reproduced in full below.
+ |
| MIT License
| ===========
- |
+ |
| Copyright (c) 2005 Bob Ippolito. All rights reserved.
- |
- | Permission is hereby granted, free of charge, to any person obtaining a copy of this
- | software and associated documentation files (the "Software"), to deal in the Software
- | without restriction, including without limitation the rights to use, copy, modify,
- | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
- | permit persons to whom the Software is furnished to do so, subject to the following
- | conditions:
- |
- | The above copyright notice and this permission notice shall be included in all copies
- | or substantial portions of the Software.
- |
- | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
- | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
- | FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- | DEALINGS IN THE SOFTWARE.
- |
- |
+ |
+ | Permission is hereby granted, free of charge, to any person obtaining a copy
+ | of this software and associated documentation files (the "Software"), to deal
+ | in the Software without restriction, including without limitation the rights
+ | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ | copies of the Software, and to permit persons to whom the Software is furnished
+ | to do so, subject to the following conditions:
+ |
+ | The above copyright notice and this permission notice shall be included in all
+ | copies or substantial portions of the Software.
+ |
+ | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ |
+ |
| Academic Free License v. 2.1
| ============================
- |
+ |
| Copyright (c) 2005 Bob Ippolito. All rights reserved.
- |
- | This Academic Free License (the "License") applies to any original work of authorship (the
- | "Original Work") whose owner (the "Licensor") has placed the following notice immediately
- | following the copyright notice for the Original Work:
- |
+ |
+ | This Academic Free License (the "License") applies to any original work of
+ | authorship (the "Original Work") whose owner (the "Licensor") has placed the
+ | following notice immediately following the copyright notice for the Original Work:
+ |
| Licensed under the Academic Free License version 2.1
- |
- | 1) Grant of Copyright License. Licensor hereby grants You a world-wide, royalty-free,
- | non-exclusive, perpetual, sublicenseable license to do the following:
+ |
+ | 1) Grant of Copyright License. Licensor hereby grants You a world-wide, royalty-free,
+ | non-exclusive, perpetual, sublicenseable license to do the following:
|
| a) to reproduce the Original Work in copies;
| b) to prepare derivative works ("Derivative Works") based upon the Original Work;
| c) to distribute copies of the Original Work and Derivative Works to the public;
| d) to perform the Original Work publicly; and
| e) to display the Original Work publicly.
- |
- | 2) Grant of Patent License. Licensor hereby grants You a world-wide, royalty-free,
- | non-exclusive, perpetual, sublicenseable license, under patent claims owned or controlled
- | by the Licensor that are embodied in the Original Work as furnished by the Licensor, to
- | make, use, sell and offer for sale the Original Work and Derivative Works.
- |
- | 3) Grant of Source Code License. The term "Source Code" means the preferred form of the
- | Original Work for making modifications to it and all available documentation describing
- | how to modify the Original Work. Licensor hereby agrees to provide a machine-readable copy
- | of the Source Code of the Original Work along with each copy of the Original Work that
- | Licensor distributes. Licensor reserves the right to satisfy this obligation by placing
- | a machine-readable copy of the Source Code in an information repository reasonably
- | calculated to permit inexpensive and convenient access by You for as long as Licensor
- | continues to distribute the Original Work, and by publishing the address of that information
- | repository in a notice immediately following the copyright notice that applies to the Original
- | Work.
- |
- | 4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any
- | contributors to the Original Work, nor any of their trademarks or service marks, may be used
- | to endorse or promote products derived from this Original Work without express prior written
- | permission of the Licensor. Nothing in this License shall be deemed to grant any rights to
- | trademarks, copyrights, patents, trade secrets or any other intellectual property of Licensor
- | except as expressly stated herein. No patent license is granted to make, use, sell or offer
- | to sell embodiments of any patent claims other than the licensed claims defined in Section 2.
- | No right is granted to the trademarks of Licensor even if such marks are included in the Original
- | Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under
- | different terms from this License any Original Work that Licensor otherwise would have a right
- | to license.
- |
- | 5) This section intentionally omitted.
- |
- | 6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You
- | create, all copyright, patent or trademark notices from the Source Code of the Original Work,
- | as well as any notices of licensing and any descriptive text identified therein as an "Attribution
- | Notice." You must cause the Source Code for any Derivative Works that You create to carry a
- | prominent Attribution Notice reasonably calculated to inform recipients that You have modified the
- | Original Work.
- |
- | 7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and
- | to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or
- | are sublicensed to You under the terms of this License with the permission of the contributor(s)
- | of those copyrights and patent rights. Except as expressly stated in the immediately proceeding
- | sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY,
- | either express or implied, including, without limitation, the warranties of NON-INFRINGEMENT,
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL
- | WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license
- | to Original Work is granted hereunder except under this disclaimer.
- |
- | 8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including
- | negligence), contract, or otherwise, shall the Licensor be liable to any person for any direct, indirect,
- | special, incidental, or consequential damages of any character arising as a result of this License or the
- | use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage,
- | computer failure or malfunction, or any and all other commercial damages or losses. This limitation of
- | liability shall not apply to liability for death or personal injury resulting from Licensor's negligence
- | to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or
- | limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You.
- |
- | 9) Acceptance and Termination. If You distribute copies of the Original Work or a Derivative Work, You must
- | make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of
- | this License. Nothing else but this License (or another written agreement between Licensor and You) grants
- | You permission to create Derivative Works based upon the Original Work or to exercise any of the rights
- | granted in Section 1 herein, and any attempt to do so except under the terms of this License (or another
- | written agreement between Licensor and You) is expressly prohibited by U.S. copyright law, the equivalent
- | laws of other countries, and by international treaty. Therefore, by exercising any of the rights granted
- | to You in Section 1 herein, You indicate Your acceptance of this License and all of its terms and conditions.
- |
- | 10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise
- | any of the rights granted to You by this License as of the date You commence an action, including a cross-claim
- | or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This
- | termination provision shall not apply for an action alleging patent infringement by combinations of the Original
- | Work with other software or hardware.
- |
- | 11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in
- | the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business,
- | and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United
- | Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the
- | Original Work outside the scope of this License or after its termination shall be subject to the requirements
- | and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et seq., the equivalent laws of other countries,
- | and international treaty. This section shall survive the termination of this License.
- |
- | 12) Attorneys Fees. In any action to enforce the terms of this License or seeking damages
- | relating thereto, the prevailing party shall be entitled to recover its costs and expenses,
- | including, without limitation, reasonable attorneys' fees and costs incurred in connection
- | with such action, including any appeal of such action. This section shall survive the
- | termination of this License.
- |
- | 13) Miscellaneous. This License represents the complete agreement concerning the subject
- | matter hereof. If any provision of this License is held to be unenforceable, such provision
- | shall be reformed only to the extent necessary to make it enforceable.
- |
- | 14) Definition of "You" in This License. "You" throughout this License, whether in upper
- | or lower case, means an individual or a legal entity exercising rights under, and complying
- | with all of the terms of, this License. For legal entities, "You" includes any entity that
- | controls, is controlled by, or is under common control with you. For purposes of this
- | definition, "control" means (i) the power, direct or indirect, to cause the direction or
- | management of such entity, whether by contract or otherwise, or (ii) ownership of fifty
- | percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
- |
- | 15) Right to Use. You may use the Original Work in all ways not otherwise restricted or
- | conditioned by this License or by law, and Licensor promises not to interfere with or be
- | responsible for such uses by You.
- |
- | This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved. Permission
- | is hereby granted to copy and distribute this license without modification. This license
- | may not be modified without the express written permission of its copyright owner.
+ |
+ | 2) Grant of Patent License. Licensor hereby grants You a world-wide, royalty-free,
+ | non-exclusive, perpetual, sublicenseable license, under patent claims owned or
+ | controlled by the Licensor that are embodied in the Original Work as furnished by
+ | the Licensor, to make, use, sell and offer for sale the Original Work and Derivative
+ | Works.
+ |
+ | 3) Grant of Source Code License. The term "Source Code" means the preferred form of
+ | the Original Work for making modifications to it and all available documentation
+ | describing how to modify the Original Work. Licensor hereby agrees to provide a
+ | machine-readable copy of the Source Code of the Original Work along with each copy
+ | of the Original Work that Licensor distributes. Licensor reserves the right to satisfy
+ | this obligation by placing a machine-readable copy of the Source Code in an information
+ | repository reasonably calculated to permit inexpensive and convenient access by You for
+ | as long as Licensor continues to distribute the Original Work, and by publishing the
+ | address of that information repository in a notice immediately following the copyright
+ | notice that applies to the Original Work.
+ |
+ | 4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any
+ | contributors to the Original Work, nor any of their trademarks or service marks, may
+ | be used to endorse or promote products derived from this Original Work without express
+ | prior written permission of the Licensor. Nothing in this License shall be deemed to
+ | grant any rights to trademarks, copyrights, patents, trade secrets or any other
+ | intellectual property of Licensor except as expressly stated herein. No patent license
+ | is granted to make, use, sell or offer to sell embodiments of any patent claims other
+ | than the licensed claims defined in Section 2. No right is granted to the trademarks
+ | of Licensor even if such marks are included in the Original Work. Nothing in this
+ | License shall be interpreted to prohibit Licensor from licensing under different terms
+ | from this License any Original Work that Licensor otherwise would have a right to license.
+ |
+ | 5) This section intentionally omitted.
+ |
+ | 6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You
+ | create, all copyright, patent or trademark notices from the Source Code of the Original
+ | Work, as well as any notices of licensing and any descriptive text identified therein as
+ | an "Attribution Notice." You must cause the Source Code for any Derivative Works that You
+ | create to carry a prominent Attribution Notice reasonably calculated to inform recipients
+ | that You have modified the Original Work.
+ |
+ | 7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright
+ | in and to the Original Work and the patent rights granted herein by Licensor are owned
+ | by the Licensor or are sublicensed to You under the terms of this License with the
+ | permission of the contributor(s) of those copyrights and patent rights. Except as expressly
+ | stated in the immediately proceeding sentence, the Original Work is provided under this
+ | License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including,
+ | without limitation, the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A
+ | PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU.
+ | This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to
+ | Original Work is granted hereunder except under this disclaimer.
+ |
+ | 8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort
+ | (including negligence), contract, or otherwise, shall the Licensor be liable to any person
+ | for any direct, indirect, special, incidental, or consequential damages of any character
+ | arising as a result of this License or the use of the Original Work including, without
+ | limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction,
+ | or any and all other commercial damages or losses. This limitation of liability shall not
+ | apply to liability for death or personal injury resulting from Licensor's negligence to
+ | the extent applicable law prohibits such limitation. Some jurisdictions do not allow the
+ | exclusion or limitation of incidental or consequential damages, so this exclusion and
+ | limitation may not apply to You.
+ |
+ | 9) Acceptance and Termination. If You distribute copies of the Original Work or a Derivative
+ | Work, You must make a reasonable effort under the circumstances to obtain the express
+ | assent of recipients to the terms of this License. Nothing else but this License (or
+ | another written agreement between Licensor and You) grants You permission to create
+ | Derivative Works based upon the Original Work or to exercise any of the rights granted in
+ | Section 1 herein, and any attempt to do so except under the terms of this License (or
+ | another written agreement between Licensor and You) is expressly prohibited by U.S. copyright
+ | law, the equivalent laws of other countries, and by international treaty. Therefore, by
+ | exercising any of the rights granted to You in Section 1 herein, You indicate Your
+ | acceptance of this License and all of its terms and conditions.
+ |
+ | 10) Termination for Patent Action. This License shall terminate automatically and You may no
+ | longer exercise any of the rights granted to You by this License as of the date You
+ | commence an action, including a cross-claim or counterclaim, against Licensor or any
+ | licensee alleging that the Original Work infringes a patent. This termination provision
+ | shall not apply for an action alleging patent infringement by combinations of the Original
+ | Work with other software or hardware.
+ |
+ | 11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be
+ | brought only in the courts of a jurisdiction wherein the Licensor resides or in which
+ | Licensor conducts its primary business, and under the laws of that jurisdiction excluding
+ | its conflict-of-law provisions. The application of the United Nations Convention on Contracts
+ | for the International Sale of Goods is expressly excluded. Any use of the Original Work
+ | outside the scope of this License or after its termination shall be subject to the
+ | requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et seq., the equivalent
+ | laws of other countries, and international treaty. This section shall survive the termination
+ | of this License.
+ |
+ | 12) Attorneys Fees. In any action to enforce the terms of this License or seeking damages
+ | relating thereto, the prevailing party shall be entitled to recover its costs and expenses,
+ | including, without limitation, reasonable attorneys' fees and costs incurred in connection
+ | with such action, including any appeal of such action. This section shall survive the
+ | termination of this License.
+ |
+ | 13) Miscellaneous. This License represents the complete agreement concerning the subject matter
+ | hereof. If any provision of this License is held to be unenforceable, such provision shall
+ | be reformed only to the extent necessary to make it enforceable.
+ |
+ | 14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower
+ | case, means an individual or a legal entity exercising rights under, and complying with all
+ | of the terms of, this License. For legal entities, "You" includes any entity that controls,
+ | is controlled by, or is under common control with you. For purposes of this definition,
+ | "control" means (i) the power, direct or indirect, to cause the direction or management of
+ | such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or
+ | more of the outstanding shares, or (iii) beneficial ownership of such entity.
+ |
+ | 15) Right to Use. You may use the Original Work in all ways not otherwise restricted or
+ | conditioned by this License or by law, and Licensor promises not to interfere with or be
+ | responsible for such uses by You.
+ |
+ | This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved. Permission is
+ | hereby granted to copy and distribute this license without modification. This license may not
+ | be modified without the express written permission of its copyright owner.
+ |
+ |
+ | BSD License
+ | ===========
+ |
+ | Copyright (c) 2006, Yahoo! Inc.
+ | All rights reserved.
+ |
+ | Redistribution and use of this software in source and binary forms, with or without modification,
+ | are permitted provided that the following conditions are met:
+ |
+ | * Redistributions of source code must retain the above copyright notice, this list of
+ | conditions and the following disclaimer.
+ | * Redistributions in binary form must reproduce the above copyright notice, this list of
+ | conditions and the following disclaimer in the documentation and/or other materials provided
+ | with the distribution.
+ | * Neither the name of Yahoo! Inc. nor the names of its contributors may be used to endorse or
+ | promote products derived from this software without specific prior written permission of
+ | Yahoo! Inc.
+ |
+ | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+ | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ | TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Yahoo! UI Library (http://developer.yahoo.com/yui/)
@@ -236,39 +277,6 @@
-# iUI: iPhone User Interface Framework (http://code.google.com/p/iui/)
- - package version: 282
-
- Copyright (c) 2007-2009, iUI Project Members
-
- | All rights reserved.
- |
- | Redistribution and use in source and binary forms, with or without modification,
- | are permitted provided that the following conditions are met:
- |
- | * Redistributions of source code must retain the above copyright notice, this
- | list of conditions and the following disclaimer.
- | * Redistributions in binary form must reproduce the above copyright notice,
- | this list of conditions and the following disclaimer in the documentation
- | and/or other materials provided with the distribution.
- | * Neither the name of the iUI Project nor the names of its contributors may
- | be used to endorse or promote products derived from this software without
- | specific prior written permission.
- |
- | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-
# Big Integer Library v. 5.0
- code downloaded on March 5, 2007 from http://www.leemon.com/crypto/BigInt.js
diff --git a/frontend/gamma/properties/gamma.properties.json b/frontend/gamma/properties/gamma.properties.json
index c847812..eec4194 100644
--- a/frontend/gamma/properties/gamma.properties.json
+++ b/frontend/gamma/properties/gamma.properties.json
@@ -1,7 +1,7 @@
{
"copyright.values": {
- "mochikit.repository": "https://github.com/mochi/mochikit.git",
- "mochikit.version": "fe8d17bb9ac0a4e5ad4a8d5c2c94a6fac1c92d75"
+ "mochikit.repository": "https://github.com/mochi/mochikit.git",
+ "mochikit.version": "fe8d17bb9ac0a4e5ad4a8d5c2c94a6fac1c92d75"
},
"html.template": "index_template.html",
diff --git a/frontend/gamma/properties/mobile.properties.json b/frontend/gamma/properties/mobile.properties.json
index e26b95f..bdb2d07 100644
--- a/frontend/gamma/properties/mobile.properties.json
+++ b/frontend/gamma/properties/mobile.properties.json
@@ -1,23 +1,26 @@
{
"copyright.values": {
- "mochikit.repository": "http://svn.mochikit.com/mochikit/trunk/",
- "mochikit.version": "1506"
+ "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/DateTime.js",
"MochiKit/Format.js",
"MochiKit/Async.js",
"MochiKit/DOM.js",
"MochiKit/Style.js",
"MochiKit/LoggingPane.js",
- "MochiKit/Color.js",
+ "-- MochiKit/Color.js",
"MochiKit/Signal.js",
- "MochiKit/Position.js",
+ "-- MochiKit/Position.js",
"MochiKit/Selector.js",
- "MochiKit/Visual.js",
+ "-- MochiKit/Visual.js",
"JSON/json2.js",
@@ -33,8 +36,8 @@
"Clipperz/DOM.js",
"Clipperz/Logging.js",
"Clipperz/Signal.js",
- "Clipperz/Style.js",
- "Clipperz/Visual.js",
+ "-- Clipperz/Style.js",
+ "-- Clipperz/Visual.js",
"Clipperz/Set.js",
"Clipperz/KeyValueObjectStore.js",
@@ -69,10 +72,13 @@
"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/BookmarkletProcessor.js",
+ "Clipperz/PM/PIN.js",
"Clipperz/PM/DataModel/EncryptedRemoteObject.js",
"Clipperz/PM/DataModel/User.js",
@@ -89,6 +95,23 @@
"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",
+
"Clipperz/PM/UI/Common/Components/BaseComponent.js",
"-- Clipperz/PM/UI/Common/Components/Button.js",
"Clipperz/PM/UI/Common/Components/ComponentSlot.js",
@@ -104,16 +127,16 @@
"Clipperz/PM/UI/Common/Controllers/ProgressBarController.js",
"-- Clipperz/PM/UI/Common/Controllers/TabPanelController.js",
- "Clipperz/PM/UI/iPhone/Components/LoginForm.js",
- "Clipperz/PM/UI/iPhone/Components/CardList.js",
- "Clipperz/PM/UI/iPhone/Components/CardDetail.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/iPhone/Controllers/MainController.js",
+ "Clipperz/PM/UI/Mobile/Controllers/MainController.js",
- "main_iPhone.js"
+ "main.mobile.js"
],
"css": [
- "clipperz/iPhone.css"
+ "mobile.css"
]
}
\ No newline at end of file
diff --git a/frontend/gamma/tests/tests/Clipperz/PM/PIN.html b/frontend/gamma/tests/tests/Clipperz/PM/PIN.html
new file mode 100644
index 0000000..a08b286
--- /dev/null
+++ b/frontend/gamma/tests/tests/Clipperz/PM/PIN.html
@@ -0,0 +1,66 @@
+
+
+
+
+ Clipperz.PM.Proxy - TEST
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/gamma/tests/tests/Clipperz/PM/PIN.test.js b/frontend/gamma/tests/tests/Clipperz/PM/PIN.test.js
new file mode 100644
index 0000000..ed795dd
--- /dev/null
+++ b/frontend/gamma/tests/tests/Clipperz/PM/PIN.test.js
@@ -0,0 +1,97 @@
+/*
+
+Copyright 2008-2011 Clipperz Srl
+
+This file is part of Clipperz Community Edition.
+Clipperz Community Edition is an online password manager.
+For further information about its features and functionalities please
+refer to http://www.clipperz.com.
+
+* Clipperz Community Edition is free software: you can redistribute
+ it and/or modify it under the terms of the GNU Affero General Public
+ License as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+
+* Clipperz Community Edition is distributed in the hope that it will
+ be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU Affero General Public License for more details.
+
+* You should have received a copy of the GNU Affero General Public
+ License along with Clipperz Community Edition. If not, see
+ .
+
+*/
+
+Clipperz.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/index.html b/frontend/gamma/tests/tests/Clipperz/PM/index.html
index b9bede1..c3df56a 100644
--- a/frontend/gamma/tests/tests/Clipperz/PM/index.html
+++ b/frontend/gamma/tests/tests/Clipperz/PM/index.html
@@ -45,6 +45,7 @@ TestRunner.runTests(
// 'CryptoPerformance_ByteArrayHex.html',
// 'CryptoPerformance_ByteArrayString.html',
'Date.html',
+ 'PIN.html',
'Proxy.html',
'Toll.html'
);
diff --git a/frontend/gamma/tests/tests/Components/FullApp/User.data.js b/frontend/gamma/tests/tests/Components/FullApp/User.data.js
index 7194f6a..4dfc81c 100644
--- a/frontend/gamma/tests/tests/Components/FullApp/User.data.js
+++ b/frontend/gamma/tests/tests/Components/FullApp/User.data.js
@@ -81,7 +81,7 @@ testData = {
},
*/
/* tt/tt with "fixed" direct login */
-/* 'afaadd70f647886043b9196c861dc04f5605baeab3812ea23707fcba08c4a54f': {
+ 'afaadd70f647886043b9196c861dc04f5605baeab3812ea23707fcba08c4a54f': {
s: 'df781ec363a380a0bb171d7d4c226248259272a964f04fa2340c77ff84bbc594',
v: 'eca214d990ec971a61cd9c5082e62c2d241f8e1ec805a2c26b1d31612747bfb0',
version: '0.2',
@@ -120,7 +120,7 @@ testData = {
}
}
},
-*/
+
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
diff --git a/frontend/gamma/tests/tests/Components/FullApp/index.html b/frontend/gamma/tests/tests/Components/FullApp/index.html
index bc00fa7..966a16c 100644
--- a/frontend/gamma/tests/tests/Components/FullApp/index.html
+++ b/frontend/gamma/tests/tests/Components/FullApp/index.html
@@ -25,19 +25,16 @@ refer to http://www.clipperz.com.
- Clipperz - online password manager - debug
+ FullApp TEST - WEB
-
-
-
+
-
-
-
+
+
@@ -196,45 +193,41 @@ Clipperz_normalizedNewLine = '\x0d\x0a';
-
+
-
-
-
-
keep it to yourself!
-
loading ...
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Attention!
-
If you can read this message, the chances are that your browser does not properly support JavaScript? or you have disabled this functionality yourself.
-
Javascript is required to access Clipperz.
-
Please enable scripting or upgrade your browser.
-
+
+
+
clipperz
+
keep it to yourself!
+
-
+
+@js_EMBEDDED@
+
-
+
+
+
diff --git a/frontend/gamma/tests/tests/Components/FullApp/main_test.js b/frontend/gamma/tests/tests/Components/FullApp/main_test.js
deleted file mode 100644
index b13972a..0000000
--- a/frontend/gamma/tests/tests/Components/FullApp/main_test.js
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
-
-Copyright 2008-2011 Clipperz Srl
-
-This file is part of Clipperz Community Edition.
-Clipperz Community Edition is an online password manager.
-For further information about its features and functionalities please
-refer to http://www.clipperz.com.
-
-* Clipperz Community Edition is free software: you can redistribute
- it and/or modify it under the terms of the GNU Affero General Public
- License as published by the Free Software Foundation, either version
- 3 of the License, or (at your option) any later version.
-
-* Clipperz Community Edition is distributed in the hope that it will
- be useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU Affero General Public License for more details.
-
-* You should have received a copy of the GNU Affero General Public
- License along with Clipperz Community Edition. If not, see
- .
-
-*/
-
-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;
-// var iPhoneDesign;
-
-// MochiKit.Signal.connect(document.body, 'onkeydown', _pm_logEvent);
-// MochiKit.Signal.connect(document.body, 'onkeypress', _pm_logEvent);
-// MochiKit.Signal.connect(document.body, 'onclick', _pm_logEvent);
-
- 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('iPhone') != -1) || (navigator.userAgent.match('iPhone'))) {
-// iPhoneDesign = true;
-// } else {
-// iPhoneDesign = false;
-// }
-
- 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 if (iPhoneDesign == true) {
-// Clipperz.PM.RunTime.mainController = new Clipperz.PM.UI.iPhone.Controllers.MainController();
- } 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'});
-}
-
-Clipperz.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose();
-
-var proxy = new Clipperz.PM.Proxy.Test({shouldPayTolls:true, isDefault:true, readOnly:false});
-proxy.dataStore().setupWithEncryptedData(testData['testData']);
-
-MochiKit.DOM.addLoadEvent(run);
diff --git a/frontend/gamma/tests/tests/Components/FullApp/mobile.index.html b/frontend/gamma/tests/tests/Components/FullApp/mobile.index.html
new file mode 100644
index 0000000..818e3d6
--- /dev/null
+++ b/frontend/gamma/tests/tests/Components/FullApp/mobile.index.html
@@ -0,0 +1,204 @@
+
+
+
+
+
+
+
+ FullApp TEST - MOBILE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+