Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web/Components/PasswordTooltip.js') (more/less context) (show whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/UI/Web/Components/PasswordTooltip.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PasswordTooltip.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PasswordTooltip.js index 79c8d4f..987e51e 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PasswordTooltip.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PasswordTooltip.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.PasswordTooltip = function(args) { | 28 | Clipperz.PM.UI.Web.Components.PasswordTooltip = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.PasswordTooltip.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.PasswordTooltip.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | this._referenceElement = args.referenceElement|| Clipperz.Base.exception.raise('MandatoryParameter'); | 33 | this._referenceElement = args.referenceElement|| Clipperz.Base.exception.raise('MandatoryParameter'); |
37 | this._text = args.text || Clipperz.Base.exception.raise('MandatoryParameter'); | 34 | this._text = args.text || Clipperz.Base.exception.raise('MandatoryParameter'); |
38 | 35 | ||
39 | this._boxDimensions = null; | 36 | this._boxDimensions = null; |
40 | this._isVisible = false; | 37 | this._isVisible = false; |
41 | 38 | ||
42 | this.renderSelf(); | 39 | this.renderSelf(); |
43 | 40 | ||
44 | return this; | 41 | return this; |
45 | } | 42 | } |
46 | 43 | ||
47 | //============================================================================= | 44 | //============================================================================= |
48 | 45 | ||
49 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.PasswordTooltip, Clipperz.PM.UI.Common.Components.BaseComponent, { | 46 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.PasswordTooltip, Clipperz.PM.UI.Common.Components.BaseComponent, { |
50 | 47 | ||
51 | //------------------------------------------------------------------------- | 48 | //------------------------------------------------------------------------- |
52 | 49 | ||
53 | 'toString': function () { | 50 | 'toString': function () { |
54 | return "Clipperz.PM.UI.Web.Components.PasswordTooltip component"; | 51 | return "Clipperz.PM.UI.Web.Components.PasswordTooltip component"; |
55 | }, | 52 | }, |
56 | 53 | ||
57 | //------------------------------------------------------------------------- | 54 | //------------------------------------------------------------------------- |
58 | 55 | ||
59 | 'referenceElement': function () { | 56 | 'referenceElement': function () { |
60 | return this._referenceElement; | 57 | return this._referenceElement; |
61 | }, | 58 | }, |
62 | 59 | ||
63 | //------------------------------------------------------------------------- | 60 | //------------------------------------------------------------------------- |
64 | 61 | ||
65 | 'text': function () { | 62 | 'text': function () { |
66 | return this._text; | 63 | return this._text; |
67 | }, | 64 | }, |
68 | 65 | ||
69 | 'setText': function (aValue) { | 66 | 'setText': function (aValue) { |
70 | this._text = aValue; | 67 | this._text = aValue; |
71 | }, | 68 | }, |
72 | 69 | ||
73 | //------------------------------------------------------------------------- | 70 | //------------------------------------------------------------------------- |
74 | 71 | ||
75 | 'isVisible': function () { | 72 | 'isVisible': function () { |
76 | return this._isVisible; | 73 | return this._isVisible; |
77 | }, | 74 | }, |
78 | 75 | ||
79 | 'setIsVisible': function (aValue) { | 76 | 'setIsVisible': function (aValue) { |
80 | this._isVisible = aValue; | 77 | this._isVisible = aValue; |
81 | }, | 78 | }, |
82 | 79 | ||
83 | //------------------------------------------------------------------------- | 80 | //------------------------------------------------------------------------- |
84 | 81 | ||
85 | 'renderSelf': function() { | 82 | 'renderSelf': function() { |
86 | this.append(MochiKit.DOM.getElement('Clipperz_PM_UI_Common_Components_Tooltip_wrapperNode'), {tag:'div', id:this.getId('tooltip'), cls:'passwordTooltip', children:[ | 83 | this.append(MochiKit.DOM.getElement('Clipperz_PM_UI_Common_Components_Tooltip_wrapperNode'), {tag:'div', id:this.getId('tooltip'), cls:'passwordTooltip', children:[ |
87 | {tag:'div', id:this.getId('body'), cls:'passwordTooltip_body', children:[ | 84 | {tag:'div', id:this.getId('body'), cls:'passwordTooltip_body', children:[ |
88 | {tag:'div', cls:'passwordTooltip_text', children:[ | 85 | {tag:'div', cls:'passwordTooltip_text', children:[ |
89 | {tag:'span', html:this.text()} | 86 | {tag:'span', html:this.text()} |
90 | ]}, | 87 | ]}, |
91 | {tag:'div', id:this.getId('footer'), cls:'passwordTooltip_footer'} | 88 | {tag:'div', id:this.getId('footer'), cls:'passwordTooltip_footer'} |
92 | ]}, | 89 | ]}, |
93 | {tag:'div', id:this.getId('arrow'), cls:'passwordTooltip_arrow'} | 90 | {tag:'div', id:this.getId('arrow'), cls:'passwordTooltip_arrow'} |
94 | ]}); | 91 | ]}); |
95 | 92 | ||
96 | this._boxDimensions = MochiKit.Style.getElementDimensions(this.getId('body')); | 93 | this._boxDimensions = MochiKit.Style.getElementDimensions(this.getId('body')); |
97 | // this._boxDimensions.h += MochiKit.Style.getElementDimensions(this.getId('footer')).h; | 94 | // this._boxDimensions.h += MochiKit.Style.getElementDimensions(this.getId('footer')).h; |
98 | 95 | ||
99 | MochiKit.Style.hideElement(this.displayElement()); | 96 | MochiKit.Style.hideElement(this.displayElement()); |
100 | MochiKit.Signal.connect(this.element(), 'onmouseenter', this, 'show'); | 97 | MochiKit.Signal.connect(this.element(), 'onmouseenter', this, 'show'); |
101 | MochiKit.Signal.connect(this.element(), 'onmouseleave', this, 'hide'); | 98 | MochiKit.Signal.connect(this.element(), 'onmouseleave', this, 'hide'); |
102 | }, | 99 | }, |
103 | 100 | ||
104 | //----------------------------------------------------- | 101 | //----------------------------------------------------- |
105 | 102 | ||
106 | 'displayElement': function() { | 103 | 'displayElement': function() { |
107 | return this.getElement('tooltip'); | 104 | return this.getElement('tooltip'); |
108 | }, | 105 | }, |
109 | 106 | ||
110 | //------------------------------------------------------------------------- | 107 | //------------------------------------------------------------------------- |
111 | 108 | ||
112 | 'boxDimensions': function () { | 109 | 'boxDimensions': function () { |
113 | return this._boxDimensions; | 110 | return this._boxDimensions; |
114 | }, | 111 | }, |
115 | 112 | ||
116 | //------------------------------------------------------------------------- | 113 | //------------------------------------------------------------------------- |
117 | 114 | ||
118 | 'show': function () { | 115 | 'show': function () { |
119 | var elementSizeAndPosition; | 116 | var elementSizeAndPosition; |
120 | var arrowPosition; | 117 | var arrowPosition; |