diff options
author | Cash Costello <cash.costello@gmail.com> | 2012-06-02 08:41:27 -0700 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2012-06-02 08:41:27 -0700 |
commit | 28f57861f86f3832150d57e583facc8552ce57eb (patch) | |
tree | 9ea0f467d72c2a5a802fabf7c969dcfb346429fd /js/lib | |
parent | d06b10d5f084aceecdd302036697212a8d8d08e5 (diff) | |
parent | e5e7238d0f83789217950441aefb4c70e47eac1c (diff) | |
download | elgg-28f57861f86f3832150d57e583facc8552ce57eb.tar.gz elgg-28f57861f86f3832150d57e583facc8552ce57eb.tar.bz2 |
Merge pull request #172 from ewinslow/river-externalize-js
Externalizes river JS
Diffstat (limited to 'js/lib')
-rw-r--r-- | js/lib/ui.river.js | 14 |
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 |