Diffstat (limited to 'frontend/delta/js/Clipperz/Signal.js') (more/less context) (show whitespace changes)
-rw-r--r-- | frontend/delta/js/Clipperz/Signal.js | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/frontend/delta/js/Clipperz/Signal.js b/frontend/delta/js/Clipperz/Signal.js new file mode 100644 index 0000000..f9b74c9 --- a/dev/null +++ b/frontend/delta/js/Clipperz/Signal.js | |||
@@ -0,0 +1,66 @@ | |||
1 | /* | ||
2 | |||
3 | Copyright 2008-2013 Clipperz Srl | ||
4 | |||
5 | This file is part of Clipperz, the online password manager. | ||
6 | For further information about its features and functionalities please | ||
7 | refer to http://www.clipperz.com. | ||
8 | |||
9 | * Clipperz is free software: you can redistribute it and/or modify it | ||
10 | under the terms of the GNU Affero General Public License as published | ||
11 | by the Free Software Foundation, either version 3 of the License, or | ||
12 | (at your option) any later version. | ||
13 | |||
14 | * Clipperz is distributed in the hope that it will be useful, but | ||
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
17 | See the GNU Affero General Public License for more details. | ||
18 | |||
19 | * You should have received a copy of the GNU Affero General Public | ||
20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. | ||
21 | |||
22 | */ | ||
23 | |||
24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | ||
25 | if (typeof(Clipperz.Signal) == 'undefined') { Clipperz.Signal = {}; } | ||
26 | |||
27 | Clipperz.Signal.VERSION = "0.1"; | ||
28 | Clipperz.Signal.NAME = "Clipperz.Signal"; | ||
29 | |||
30 | MochiKit.Base.update(Clipperz.Signal, { | ||
31 | |||
32 | //------------------------------------------------------------------------- | ||
33 | |||
34 | '__repr__': function () { | ||
35 | return "[" + this.NAME + " " + this.VERSION + "]"; | ||
36 | }, | ||
37 | |||
38 | //------------------------------------------------------------------------- | ||
39 | |||
40 | 'toString': function () { | ||
41 | return this.__repr__(); | ||
42 | }, | ||
43 | |||
44 | //------------------------------------------------------------------------- | ||
45 | |||
46 | 'fireNativeEvent': function(element, eventName) { | ||
47 | if (element.fireEvent) { | ||
48 | // MSIE | ||
49 | element.fireEvent(eventName); | ||
50 | } else { | ||
51 | // W3C | ||
52 | var event; | ||
53 | |||
54 | event = document.createEvent("HTMLEvents"); | ||
55 | event.initEvent(eventName.replace(/^on/, ""), true, true); | ||
56 | element.dispatchEvent(event); | ||
57 | } | ||
58 | }, | ||
59 | |||
60 | //------------------------------------------------------------------------- | ||
61 | __syntaxFix__: "syntax fix" | ||
62 | |||
63 | }); | ||
64 | |||
65 | Clipperz.Signal.NotificationCenter = {}; | ||
66 | |||