From bc98a17786f6e268a7beb3d68fad5f8ad9a4adfe Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Mon, 23 Mar 2015 22:32:04 -0400 Subject: [PATCH] VRFS-2701 wired up action buttons on samples page --- .../javascripts/accounts_profile_experience.js | 1 - .../javascripts/accounts_profile_samples.js | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/web/app/assets/javascripts/accounts_profile_experience.js b/web/app/assets/javascripts/accounts_profile_experience.js index 53a9a2c78..4e13c3d79 100644 --- a/web/app/assets/javascripts/accounts_profile_experience.js +++ b/web/app/assets/javascripts/accounts_profile_experience.js @@ -114,7 +114,6 @@ function events() { $btnCancel.click(function(evt) { - console.log("HERE"); evt.stopPropagation(); navigateTo('/client#/profile/' + context.JK.currentUserId); return false; diff --git a/web/app/assets/javascripts/accounts_profile_samples.js b/web/app/assets/javascripts/accounts_profile_samples.js index 694039d5d..59d7e3e05 100644 --- a/web/app/assets/javascripts/accounts_profile_samples.js +++ b/web/app/assets/javascripts/accounts_profile_samples.js @@ -196,6 +196,18 @@ } }); + $btnCancel.click(function(evt) { + evt.stopPropagation(); + navigateTo('/client#/profile/' + context.JK.currentUserId); + return false; + }); + + $btnBack.click(function(evt) { + evt.stopPropagation(); + navigateTo('/client#/account/profile/interests'); + return false; + }); + $btnSubmit.click(function(evt) { $document.triggerHandler(EVENTS.USER_UPDATED, response); @@ -204,6 +216,10 @@ }); } + function navigateTo(targetLocation) { + context.location = targetLocation; + } + function addOnlinePresence(presenceArray, username, type) { if ($.trim($soundCloudUsername.val()).length > 0) { presenceArray.push({