angular.module('rcmAdmin').controller(
    'rcmManageSites',
    function ($scope, $log, $http) {
        var self = this;
        $scope.sites = [];
//        $scope.loading = false;
        $scope.disableSite = function (site) {
            $().confirm(
                'Disable this site?<br><br>' +
                '<ul>' +
                '<li>Site Id: ' + site.siteId + '</li>' +
                '<li>Domain: ' + site.domain + '</li>' +
                '</ul>',
                function () {
//                    $scope.loading = true;
                    //Refresh site list
                    //self.getSites();
                    //console.log(site.active);
                    if (site.active == 'A') {
                        site.active = 'D';
                    } else {
                        site.active = 'A';
                    }
                    console.log(RcmAdminService.RcmPageModel.getData());
                    $http({
                        method: 'PUT',
                        url: '/api/admin/sites/' + site.siteId + '/' + site.active
                    }).
                        success(function (data) {
                            //alert(data);
                            $scope.sites = data;
                            self.getSites();
                        });

                }
            )

        };
        self.getSites = function () {
//            $scope.loading = true;
            $http({
                method: 'GET',
                url: '/api/admin/sites'
            }).
                success(function (data) {
                    $scope.sites = data;
//                    $scope.loading = false;
                });//).
//                error(function () ee{
//                    $scope.loading = false;
//                });
        };
        self.getSites();
    }
);
@@ -147,42 +147,8 @@
 %5B%5D;%0A
-//        $scope.loading = false;%0A
     
@@ -461,180 +461,8 @@
 ) %7B%0A
-//                    $scope.loading = true;%0A                    //Refresh site list%0A                    //self.getSites();%0A                    //console.log(site.active);%0A
     
@@ -644,81 +644,8 @@
   %7D%0A
-                    console.log(RcmAdminService.RcmPageModel.getData());%0A
     
@@ -1116,45 +1116,8 @@
 ) %7B%0A
-//            $scope.loading = true;%0A
     
@@ -1306,166 +1306,8 @@
 ta;%0A
-//                    $scope.loading = false;%0A                %7D);//).%0A//                error(function () ee%7B%0A//                    $scope.loading = false;%0A//
     

Disable sites Enable sites