Diffstat (limited to 'frontend/beta/js/Clipperz/NotificationCenter.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/beta/js/Clipperz/NotificationCenter.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/beta/js/Clipperz/NotificationCenter.js b/frontend/beta/js/Clipperz/NotificationCenter.js index 815d4fd..e346b1c 100644 --- a/frontend/beta/js/Clipperz/NotificationCenter.js +++ b/frontend/beta/js/Clipperz/NotificationCenter.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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.NotificationCenter) == 'undefined') { Clipperz.NotificationCenter = {}; } | 27 | if (typeof(Clipperz.NotificationCenter) == 'undefined') { Clipperz.NotificationCenter = {}; } |
31 | 28 | ||
32 | 29 | ||
33 | //############################################################################# | 30 | //############################################################################# |
34 | 31 | ||
35 | Clipperz.NotificationCenterEvent = function(args) { | 32 | Clipperz.NotificationCenterEvent = function(args) { |
36 | args = args || {}; | 33 | args = args || {}; |
37 | //MochiKit.Base.bindMethods(this); | 34 | //MochiKit.Base.bindMethods(this); |
38 | 35 | ||
39 | this._source = args.source || null; | 36 | this._source = args.source || null; |
40 | this._event = args.event || null; | 37 | this._event = args.event || null; |
41 | this._parameters = args.parameters || null; | 38 | this._parameters = args.parameters || null; |
42 | this._isSynchronous = args.isSynchronous || false; | 39 | this._isSynchronous = args.isSynchronous || false; |
43 | 40 | ||
44 | return this; | 41 | return this; |
45 | } | 42 | } |
46 | 43 | ||
47 | //============================================================================= | 44 | //============================================================================= |
48 | 45 | ||
49 | Clipperz.NotificationCenterEvent.prototype = MochiKit.Base.update(null, { | 46 | Clipperz.NotificationCenterEvent.prototype = MochiKit.Base.update(null, { |
50 | 47 | ||
51 | //------------------------------------------------------------------------- | 48 | //------------------------------------------------------------------------- |
52 | 49 | ||
53 | 'toString': function() { | 50 | 'toString': function() { |
54 | return "Clipperz.NotificationCenterEvent"; | 51 | return "Clipperz.NotificationCenterEvent"; |
55 | //return "Clipperz.NotificationCenterEvent {source: " + this.source() + ", event: " + this.event() + ", parameters: " + this.parameters() + "}"; | 52 | //return "Clipperz.NotificationCenterEvent {source: " + this.source() + ", event: " + this.event() + ", parameters: " + this.parameters() + "}"; |
56 | }, | 53 | }, |
57 | 54 | ||
58 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
59 | 56 | ||
60 | 'source': function() { | 57 | 'source': function() { |
61 | return this._source; | 58 | return this._source; |
62 | }, | 59 | }, |
63 | 60 | ||
64 | 'setSource': function(aValue) { | 61 | 'setSource': function(aValue) { |
65 | this._source = aValue; | 62 | this._source = aValue; |
66 | }, | 63 | }, |
67 | 64 | ||
68 | //------------------------------------------------------------------------- | 65 | //------------------------------------------------------------------------- |
69 | 66 | ||
70 | 'event': function() { | 67 | 'event': function() { |
71 | return this._event; | 68 | return this._event; |
72 | }, | 69 | }, |
73 | 70 | ||
74 | 'setEvent': function(aValue) { | 71 | 'setEvent': function(aValue) { |
75 | this._event = aValue; | 72 | this._event = aValue; |
76 | }, | 73 | }, |
77 | 74 | ||
78 | //------------------------------------------------------------------------- | 75 | //------------------------------------------------------------------------- |
79 | 76 | ||
80 | 'parameters': function() { | 77 | 'parameters': function() { |
81 | return this._parameters; | 78 | return this._parameters; |
82 | }, | 79 | }, |
83 | 80 | ||
84 | 'setParameters': function(aValue) { | 81 | 'setParameters': function(aValue) { |
85 | this._parameters = aValue; | 82 | this._parameters = aValue; |
86 | }, | 83 | }, |
87 | 84 | ||
88 | //------------------------------------------------------------------------- | 85 | //------------------------------------------------------------------------- |
89 | 86 | ||
90 | 'isSynchronous': function() { | 87 | 'isSynchronous': function() { |
91 | return this._isSynchronous; | 88 | return this._isSynchronous; |
92 | }, | 89 | }, |
93 | 90 | ||
94 | //------------------------------------------------------------------------- | 91 | //------------------------------------------------------------------------- |
95 | __syntaxFix__: "syntax fix" | 92 | __syntaxFix__: "syntax fix" |
96 | }); | 93 | }); |
97 | 94 | ||
98 | 95 | ||
99 | //############################################################################# | 96 | //############################################################################# |
100 | //############################################################################# | 97 | //############################################################################# |
101 | 98 | ||
102 | Clipperz.NotificationCenter = function(args) { | 99 | Clipperz.NotificationCenter = function(args) { |
103 | args = args || {}; | 100 | args = args || {}; |
104 | //MochiKit.Base.bindMethods(this); | 101 | //MochiKit.Base.bindMethods(this); |
105 | 102 | ||
106 | this._listeners = {}; | 103 | this._listeners = {}; |
107 | this._useSynchronousListenerInvocation = args.useSynchronousListenerInvocation || false; | 104 | this._useSynchronousListenerInvocation = args.useSynchronousListenerInvocation || false; |
108 | this._timeoutDelay = args.timeoutDelay || 0.1; | 105 | this._timeoutDelay = args.timeoutDelay || 0.1; |
109 | 106 | ||
110 | return this; | 107 | return this; |
111 | } | 108 | } |
112 | 109 | ||
113 | //============================================================================= | 110 | //============================================================================= |
114 | 111 | ||
115 | Clipperz.NotificationCenter.prototype = MochiKit.Base.update(null, { | 112 | Clipperz.NotificationCenter.prototype = MochiKit.Base.update(null, { |
116 | 113 | ||
117 | //------------------------------------------------------------------------- | 114 | //------------------------------------------------------------------------- |
118 | 115 | ||
119 | 'toString': function() { | 116 | 'toString': function() { |
120 | return "Clipperz.NotificationCenter"; | 117 | return "Clipperz.NotificationCenter"; |