aboutsummaryrefslogtreecommitdiff
path: root/engine/js/lib/elgglib.js
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-02 04:23:04 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-02 04:23:04 +0000
commitf7ae28ea45656d2821262998e9a71c351dcced8c (patch)
treec0bed93d6a879ca0ee3c2c35a58c8290c10afbe0 /engine/js/lib/elgglib.js
parentaf335c48fc3f4a741e7b5650db46aac48183c244 (diff)
downloadelgg-f7ae28ea45656d2821262998e9a71c351dcced8c.tar.gz
elgg-f7ae28ea45656d2821262998e9a71c351dcced8c.tar.bz2
Refs #2538: Added Elggy event system. Javascript boot sequence mimics PHP.
git-svn-id: http://code.elgg.org/elgg/trunk@7186 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/js/lib/elgglib.js')
-rw-r--r--engine/js/lib/elgglib.js19
1 files changed, 5 insertions, 14 deletions
diff --git a/engine/js/lib/elgglib.js b/engine/js/lib/elgglib.js
index 5c32deaaf..f7c30bdc2 100644
--- a/engine/js/lib/elgglib.js
+++ b/engine/js/lib/elgglib.js
@@ -9,11 +9,10 @@
*/
var elgg = elgg || {};
-elgg.init = function() {
- //if the user clicks a system message, make it disappear
- $('.elgg_system_message').live('click', function() {
- $(this).stop().fadeOut('fast');
- });
+elgg.assertTypeOf = function(type, param) {
+ if (typeof param !== type) {
+ throw new TypeError("Expecting param to be a " + type + ". Was a " + typeof param + ".");
+ }
};
/**
@@ -176,12 +175,4 @@ elgg.register_error = function(errors, delay) {
*/
elgg.forward = function(url) {
location.href = elgg.extendUrl(url);
-};
-
-/**
- * Initialise Elgg
- * @todo How should plugins, etc. initialize themselves?
- */
-$(function() {
- elgg.init();
-});
+}; \ No newline at end of file