aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorEvan Winslow <evan@elgg.org>2012-03-04 20:43:05 -0800
committerEvan Winslow <evan@elgg.org>2012-03-04 20:43:05 -0800
commite5e7238d0f83789217950441aefb4c70e47eac1c (patch)
tree4a7c20363b5e2fab3273b062d2cbfaf17a43760f /js
parentdb0bb2d9c0d2835b95caf887a6ef3bfb818df047 (diff)
downloadelgg-e5e7238d0f83789217950441aefb4c70e47eac1c.tar.gz
elgg-e5e7238d0f83789217950441aefb4c70e47eac1c.tar.bz2
Pulls river js out into external file
Diffstat (limited to 'js')
-rw-r--r--js/lib/ui.river.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/js/lib/ui.river.js b/js/lib/ui.river.js
new file mode 100644
index 000000000..a56a664a4
--- /dev/null
+++ b/js/lib/ui.river.js
@@ -0,0 +1,14 @@
+elgg.provide('elgg.ui.river');
+
+elgg.ui.river.init = function() {
+ $('#elgg-river-selector').change(function() {
+ var url = window.location.href;
+ if (window.location.search.length) {
+ url = url.substring(0, url.indexOf('?'));
+ }
+ url += '?' + $(this).val();
+ elgg.forward(url);
+ });
+};
+
+elgg.register_hook_handler('init', 'system', elgg.ui.river.init); \ No newline at end of file