summaryrefslogtreecommitdiff
path: root/static/website/js/main.js
diff options
context:
space:
mode:
authorJayaram R Pai2014-09-20 19:42:34 +0530
committerJayaram R Pai2014-09-20 19:42:34 +0530
commita254d1aa4d10d0704c9f8981400257b17c52022b (patch)
tree262b8ab89a0549f3f4de0201d164678d27e13faa /static/website/js/main.js
parentbf059d176357efa0a61d1939a5f29e598505b77f (diff)
downloadscipy2014-a254d1aa4d10d0704c9f8981400257b17c52022b.tar.gz
scipy2014-a254d1aa4d10d0704c9f8981400257b17c52022b.tar.bz2
scipy2014-a254d1aa4d10d0704c9f8981400257b17c52022b.zip
completed CFP - basic testing done
Diffstat (limited to 'static/website/js/main.js')
-rw-r--r--static/website/js/main.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/static/website/js/main.js b/static/website/js/main.js
new file mode 100644
index 0000000..34f2026
--- /dev/null
+++ b/static/website/js/main.js
@@ -0,0 +1,27 @@
+$(document).ready(function() {
+ $(document).on("click", "#login-submit", function(e) {
+ Dajaxice.website.user_login(Dajax.process, {form: $("#login-form").serialize(true)});
+ e.preventDefault();
+ });
+
+ $(document).on("click", "#register-submit", function(e) {
+ Dajaxice.website.user_register(Dajax.process, {form: $("#register-form").serialize(true)});
+ e.preventDefault();
+ });
+
+ $(document).on("click", "#logout", function(e) {
+ Dajaxice.website.user_logout(Dajax.process);
+ e.preventDefault();
+ });
+});
+
+$('#sidebar .nav-group').affix({
+ offset: {
+ top: 200
+ }
+});
+
+$("body").scrollspy({
+ target: '#sidebar',
+ offset: 30
+});