{"size": 1125, "ext": "js", "max_stars_repo_path": "app/js/controller/DonationController.js", "max_stars_repo_name": "SpruceHillio/ZOBAngels", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/js/controller/DonationController.js", "max_issues_repo_name": "SpruceHillio/ZOBAngels", "max_issues_repo_issues_event_min_datetime": "2015-12-26T07:52:41.000Z", "max_issues_repo_issues_event_max_datetime": "2016-01-10T10:24:53.000Z", "max_forks_repo_path": "app/js/controller/DonationController.js", "max_forks_repo_name": "SpruceHillio/ZOBAngels", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 28.8461538462, "max_line_length": 127, "alphanum_fraction": 0.5146666667}
/**
 * @license ZOB Angels
 * (c) 2015 SpruceHill.io GmbH
 * License: MIT
 */
(function() {
    'use strict';

    angular.module('ZOBAngels.controller.DonationController',[
        'ZOBAngels.service'
    ]).controller('ZOBAngels.controller.DonationController',[
        '$scope',
        '$sce',
        'ZOBAngels.service.NavigationService',
        '$log',
        function($scope,$sce,NavigationService,$log) {

            NavigationService.page(NavigationService.PAGE.DONATION);

            $scope.NavigationService = NavigationService;

            $scope.post = {
                show: false
            };

            Parse.Cloud.run('facebookPinnedPost',{},{
               success: function(post) {
                   $scope.post.show = true;
                   $scope.post.message = $sce.trustAsHtml(post.message.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1<br />$2'));
               },
                error: function(error) {
                    $log.debug('error: ',error);
                }
            });

            $log.debug('ZOBAngels.controller.DonationController loaded');
        }
    ]);
})();