From 6893502beabdb7af40d153c7366b4a0087e258de Mon Sep 17 00:00:00 2001 From: Mukul Date: Mon, 10 Apr 2017 16:45:13 +0530 Subject: [PATCH] this is for mcustomscroll --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js | 13 +++++++++++-- 400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 7b965f1..8014c0e 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -463,9 +463,18 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic //jspanel functionality.. - $rootScope.getSelectedModuleId = function (selectedModuleId) { + $rootScope.getScrollModule = function () { + $('.mCSB_container ul li').click(function () { + + $rootScope.scrollTopPosition = $(this).position().top; + + }); setTimeout(function () { - $(".sidebar").mCustomScrollbar("scrollTo", $("#" + selectedModuleId)); + + $(".sidebar").mCustomScrollbar("scrollTo", $rootScope.scrollTopPosition + "px"); + + + }, 300); } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html b/400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html index 2896720..67afaee 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html @@ -26,7 +26,7 @@ -- libgit2 0.21.4