summaryrefslogtreecommitdiff
path: root/frontend/delta/js/Clipperz/Signal.js
Unidiff
Diffstat (limited to 'frontend/delta/js/Clipperz/Signal.js') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/delta/js/Clipperz/Signal.js66
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
3Copyright 2008-2013 Clipperz Srl
4
5This file is part of Clipperz, the online password manager.
6For further information about its features and functionalities please
7refer 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
24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
25if (typeof(Clipperz.Signal) == 'undefined') { Clipperz.Signal = {}; }
26
27Clipperz.Signal.VERSION = "0.1";
28Clipperz.Signal.NAME = "Clipperz.Signal";
29
30MochiKit.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
65Clipperz.Signal.NotificationCenter = {};
66