<commit_before>/**
 * Created by hlogeon on 8/10/16.
 */
import Venue from '../models/venue.js';

const Q = new WeakMap();
const SERVICE = new WeakMap();


class VenueForm {
    
    constructor (UserService, GotLocationEvent, VenuesService, VenueCategoriesService, Notification, $q, $state, $stateParams, $rootScope) {
        let context = this;
        Q.set(this, $q);
        this.params = $stateParams;
        SERVICE.set(this, VenuesService);

        this.categoriesService = VenueCategoriesService;
        this.notificationService = Notification;
        this.GotLocationEvent = GotLocationEvent;
        this.UserService = UserService;
        this.rootScope = $rootScope;
        this.userService = UserService;
        this.acceptTerms = false;
        this.state = $state;
        

        this.restrict = 'EA';
        this.replace = true;
        this.templateUrl = 'templates/venues/directives/form.html';
        this.scope = {
            model: '='
        };
        this.service = VenuesService;
    }

    link (scope, element) {
        scope.toggleBusinessDay = this.toggleBusinessDay;
        scope.deleteExistingImage = this.deleteExistingImage;
        scope.selectImage = this.selectImage;
        scope.deleteImage = this.deleteImage;
        scope.addImage = this.addImage;
        scope.submit = this.submit;
        scope.userService = this.UserService;
        scope.service = SERVICE.get(this);
        scope.notificationService = this.notificationService;
        scope.notifyNeedsLogin = this.notifyNeedsLogin;
        scope.notifySuccessDraft = this.notifySuccessDraft;
        scope.notifySuccessCreate = this.notifySuccessCreate;
        scope.state = this.state;
        
        let context = this;
        context.scope = scope;
        scope.acceptTerms = false;
        this.UserService.gettingLocation();
        this.initModel(this.GotLocationEvent);
        scope.model = scope.venue;
        this.categoriesService.gettingCategories().then((categories) => {
            scope.categories = categories;
            context.initAddressAutocomplete();
        });
    }<commit_msg>Fixed existing images scope<commit_after>/**
 * Created by hlogeon on 8/10/16.
 */
import Venue from '../models/venue.js';

const Q = new WeakMap();
const SERVICE = new WeakMap();


class VenueForm {
    
    constructor (UserService, GotLocationEvent, VenuesService, VenueCategoriesService, Notification, $q, $state, $stateParams, $rootScope) {
        let context = this;
        Q.set(this, $q);
        this.params = $stateParams;
        SERVICE.set(this, VenuesService);

        this.categoriesService = VenueCategoriesService;
        this.notificationService = Notification;
        this.GotLocationEvent = GotLocationEvent;
        this.UserService = UserService;
        this.rootScope = $rootScope;
        this.userService = UserService;
        this.acceptTerms = false;
        this.state = $state;
        

        this.restrict = 'EA';
        this.replace = true;
        this.templateUrl = 'templates/venues/directives/form.html';
        this.scope = {
            model: '='
        };
        this.service = VenuesService;
    }

    link (scope, element) {
        scope.toggleBusinessDay = this.toggleBusinessDay;
        scope.deleteExistingImage = this.deleteExistingImage;
        scope.selectImage = this.selectImage;
        scope.deleteImage = this.deleteImage;
        scope.addImage = this.addImage;
        scope.submit = this.submit;
        scope.userService = this.UserService;
        scope.service = SERVICE.get(this);
        scope.notificationService = this.notificationService;
        scope.notifyNeedsLogin = this.notifyNeedsLogin;
        scope.notifySuccessDraft = this.notifySuccessDraft;
        scope.notifySuccessCreate = this.notifySuccessCreate;
        scope.state = this.state;
        scope.acceptTerms = this.acceptTerms;
        
        let context = this;
        context.scope = scope;
        scope.acceptTerms = false;
        this.UserService.gettingLocation();
        this.initModel(this.GotLocationEvent);
        scope.model = scope.venue;
        this.categoriesService.gettingCategories().then((categories) => {
            scope.categories = categories;
            context.initAddressAutocomplete();
        });
    }
{'fraction_non_alphanumeric': 0.10240963855421686, 'fraction_numerical': 0.0023169601482854493, 'mean_word_length': 2.4343675417661097, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3736498', 'n_tokens_mistral': 1204, 'n_tokens_neox': 1158, 'n_words': 223}