AIA.controller("CurrBuildController", ["$scope", "$rootScope", "pages", "$log", "Modules", "$http", "$compile", "$location", function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location) { // $rootScope.currentActiveModuleTitle = pages[6].name; $scope.showTabButton = false; $scope.listCurriculumBuilder = null; $scope.dataPopup = null; $scope.countLeftlist; $scope.countRightlist; $scope.IsVisible = function () { $scope.scroll(); } $scope.scroll = function () { // $window.scrollTo(0, 0); $("html,body").scrollTop(0); //alert("scroll"); } //load json data $scope.loadCurriculumBuiderData = function () { //get current path var currentURL = $location.path(); var selectedModuleName = ''; //set module title angular.forEach($rootScope.userModules, function (value, key) { if (value.slug === currentURL.replace('/', '')) { selectedModuleName = value.name; } $rootScope.currentActiveModuleTitle = selectedModuleName; }) //get current path var currentURL = $location.path(); $http({ method: 'GET', url: 'content/data/json/cb/cb_list_content.json' }).success(function (data) { $scope.listCurriculumBuilder = data; //load default body view list $scope.getCBViewList(); }) .error(function (data, status, headers, config) { console.log(data); }); } //get CB body view list $scope.getCBViewList = function ($event) { $('#leftBodyViewList').empty(); $scope.countLeftlist = Object.keys($scope.listCurriculumBuilder.slideshows.slideshow).length / 2; $scope.loadleftBodyViewList = new jinqJs() .from($scope.listCurriculumBuilder.slideshows.slideshow) .select(); for (var i = 0; i < $scope.countLeftlist; i++) { console.log($scope.listCurriculumBuilder.slideshows.slideshow[i]._label); //alert($scope.listCurriculumBuilder.slideshows.slideshow[i]._label); var $el = $('