<commit_before>'use strict';

//***************************************

// Main Application

//***************************************

angular.module('mapAppParent', [
  'mapApp',
  'angular-inview',
  'angular-lazycompile'
])

.run(
  [          '$rootScope', '$window', '$location', 
    function ($rootScope,   $window,   $location) {
      $rootScope.mapboxAccessToken = '<KEY>';
      $rootScope.mapboxMap = 'albatrossdigital.lpkdpcjb';

      $rootScope.proudcityApi='http://my.getproudcity.com/api/proudcity/';
      $rootScope.proxyUrl = $rootScope.proudcityApi + 'proxy';
      $rootScope.paymentUrl = $rootScope.proudcityApi + 'invoice-example';
		}
	]
)

.controller('MapControl', ['$scope', '$rootScope', '$filter', '$http',
                   function($scope,   $rootScope,   $filter,   $http){

    Proud = Proud || {}; 

    var $state = {
      params: {
        city: _.get(Proud, 'settings.global.location.city') || 'seattle',
        state: _.get(Proud, 'settings.global.location.state') || 'washington'
      }
    }

    var ucWords = function(str) {
      return (str + '')
        .replace('\-', ' ')
        .replace(/^([a-z\u00E0-\u00FC])|\s+([a-z\u00E0-\u00FC])/g, function($1) {
          return $1.toUpperCase();
        });
    }

    $scope.location = {
      state: ucWords($state.params.state),
      city: ucWords($state.params.city),
      key: {
        state: $state.params.state,
        city: $state.params.city
      }
    }


    $scope.settings = {
      color: {
        main: '#000',
        secondary: '#000',
        highlight: '#2196F3'
      },
      header: {
        backgroundType: 'image',
        backgroundImage: '',
        backgroundColor: '',
        searchColor: '#FFFFFF',
        searchAlign: 'left'
      }
    }

    //$http.get($rootScope.proudcityApi +'?state='+ $state.params.state +'&city='+ $state.params.city).success(function(data){
      // Proud options
      var data = {};
      data.lat = _.get(Proud, 'settings.global.location.lat') || data.lat;
      data.lng = _.get(Proud, 'settings.global.location.lng') || data.lng;

      $scope.location = {
        city: _.get(Proud, 'settings.global.location.city') || data.lat,
        state: _.get(Proud, 'settings.global.location.state') || data.state
      };

      $scope.settings = _.merge(data, $scope.settings);
    //});

  }
])

// Isotope social wall
.directive('mapParent', function factory() {
  return {
    restrict: 'A',
    controller: "MapControl",
    template: '<div foursquare-map="settings" />'
  }
})<commit_msg>Adding js settings to index.html<commit_after>'use strict';

//***************************************

// Main Application

//***************************************

angular.module('mapAppParent', [
  'mapApp',
  'angular-inview',
  'angular-lazycompile'
])

.run(
  [          '$rootScope', '$window', '$location', 
    function ($rootScope,   $window,   $location) {
      $rootScope.mapboxAccessToken = '<KEY>';
      $rootScope.mapboxMap = 'albatrossdigital.lpkdpcjb';

      $rootScope.proudcityApi='http://my.getproudcity.com/api/proudcity/';
      $rootScope.proxyUrl = $rootScope.proudcityApi + 'proxy';
      $rootScope.paymentUrl = $rootScope.proudcityApi + 'invoice-example';
		}
	]
)

.controller('MapControl', ['$scope', '$rootScope', '$filter', '$http',
                   function($scope,   $rootScope,   $filter,   $http){

    Proud = Proud || {}; 

    var $state = {
      params: {
        city: _.get(Proud, 'settings.global.location.city') || 'seattle',
        state: _.get(Proud, 'settings.global.location.state') || 'washington'
      }
    }

    var ucWords = function(str) {
      return (str + '')
        .replace('\-', ' ')
        .replace(/^([a-z\u00E0-\u00FC])|\s+([a-z\u00E0-\u00FC])/g, function($1) {
          return $1.toUpperCase();
        });
    }

    $scope.location = {
      state: ucWords($state.params.state),
      city: ucWords($state.params.city),
      key: {
        state: $state.params.state,
        city: $state.params.city
      }
    }


    $scope.settings = {
      color: {
        main: '#000',
        secondary: '#000',
        highlight: '#2196F3'
      },
      header: {
        backgroundType: 'image',
        backgroundImage: '',
        backgroundColor: '',
        searchColor: '#FFFFFF',
        searchAlign: 'left'
      }
    }

    //$http.get($rootScope.proudcityApi +'?state='+ $state.params.state +'&city='+ $state.params.city).success(function(data){
      // Proud options
      var data = {};
      data.lat = _.get(Proud, 'settings.global.location.lat') || data.lat;
      data.lng = _.get(Proud, 'settings.global.location.lng') || data.lng;

      $scope.location = {
        city: _.get(Proud, 'settings.global.location.city') || data.lat,
        state: _.get(Proud, 'settings.global.location.state') || data.state
      };

      $scope.settings = _.merge(data, $scope.settings);
    //});

  }
])

// Isotope social wall
.directive('mapParent', function factory() {
  return {
    restrict: 'A',
    controller: "MapControl",
    template: '<div proud-map="settings" />'
  }
})
{'fraction_non_alphanumeric': 0.2110503709488481, 'fraction_numerical': 0.008980866848887154, 'mean_word_length': 2.528236914600551, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1773550', 'n_tokens_mistral': 1740, 'n_tokens_neox': 1667, 'n_words': 262}