From 36adf7106c6b9db033c6130c52d654acdb80d219 Mon Sep 17 00:00:00 2001 From: Denis Ryabov Date: Tue, 8 Apr 2014 12:02:23 +0400 Subject: [PATCH 1/2] affect profile modal only and use local variable --- js/interface_common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/interface_common.js b/js/interface_common.js index a243eb4..d9e0add 100644 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -121,7 +121,7 @@ function openProfileModal(e) }; //fix .modal-content height - $mc = $('.modal-content'); + var $mc = $("." +profileModalClass + " .modal-content"); $mc.off('profileloaded'); $mc.on('profileloaded', function() { var viewHeader = $mc.find(".postboard > h2"); From 078a949e3dc56ab36e504bcba2afad5960845f4d Mon Sep 17 00:00:00 2001 From: Denis Ryabov Date: Tue, 8 Apr 2014 12:05:12 +0400 Subject: [PATCH 2/2] support "Update" and "x" links in "Who to follow" --- js/interface_home.js | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/js/interface_home.js b/js/interface_home.js index 5aa9368..784a18a 100644 --- a/js/interface_home.js +++ b/js/interface_home.js @@ -66,15 +66,27 @@ var InterfaceFunctions = function() } }); - setTimeout("getRandomFollowSuggestion(processSuggestion)", 1000); - setTimeout("getRandomFollowSuggestion(processSuggestion)", 1000); - setTimeout("getRandomFollowSuggestion(processSuggestion)", 1000); - + setTimeout(updateFollowSuggestion, 1000); updateTrendingHashtags(); if( args.cbFunc ) args.cbFunc(args.cbArg); }, {cbFunc:cbFunc, cbArg:cbArg}); + + $('.refresh-users').on('click', function () { + updateFollowSuggestion(); + }); + $('.follow-suggestions').on('click', 'a.twister-user-remove', function () { + $(this).closest('li').remove(); + }); + } + + function updateFollowSuggestion() + { + $('.follow-suggestions').empty(); + getRandomFollowSuggestion(processSuggestion); + getRandomFollowSuggestion(processSuggestion); + getRandomFollowSuggestion(processSuggestion); } function updateTrendingHashtags()