<commit_before>// MainHeaderService service
NGApp.factory( 'MainNavigationService', function( $http, $location, $rootScope, $route, AccountModalService, RestaurantsService, OrderViewService){ 
	
	// This variable will store the animation type.
	$rootScope.animationClass = '';

	var service = {
		page : '',
		buttons : {
			location: false,
			menu: true,
			back: false
		},
		navStack: []
	};
	
	service.menu = App.toggleMenu;
	service.modal = AccountModalService;

	service.getFood = function( cartItems ){
		if( service.page == 'restaurant' &&
				cartItems &&
				service.restaurant && service.restaurant && service.restaurant._open &&
				!App.rootScope.notificationBarStatus ){
			angular.element( '.button-bottom-wrapper' ).addClass( 'button-bottom-show' );	
		} else {
			angular.element( '.button-bottom-wrapper' ).removeClass( 'button-bottom-show' );
		}
	}

	service.home = function() {
		if (App.isPhoneGap && cordova) {
			$('html, body, .snap-content-inner').animate({scrollTop: 0}, 200, $.easing.easeInOutQuart ? 'easeInOutQuart' : null);
		} else if (App.isMobile()) {
			service.menu();
		} else {
			service.link();
		}
	}

	service.goToRestaurants = function(){
		return service.link( RestaurantsService.permalink );
	}

	/* the transitions type could be push, fade, pop or none */
	service.link = function( path, transition ){
		if( App.isNarrowScreen() || App.transitionForDesktop ){
			App.rootScope.animationClass = transition ? 'animation-' + transition : '';
		}
		$location.path( path || '/' );
		App.snap.close();
	}

	service.signin = function(){
		service.modal.signinOpen();
	}

	service.control = function() {
		if (service.page == 'location' || service.page == 'restaurants' || service.navStack.length < 2) {
			service.buttons.back = false;
			service.buttons.menu = true;
		} else {
			service.buttons.back = true;
			service.buttons.menu = false;
		}
	}

	return service;

});<commit_msg>Make location button show up on all pages except for 'location' page<commit_after>// MainHeaderService service
NGApp.factory( 'MainNavigationService', function( $http, $location, $rootScope, $route, AccountModalService, RestaurantsService, OrderViewService){ 
	
	// This variable will store the animation type.
	$rootScope.animationClass = '';

	var service = {
		page : '',
		buttons : {
			location: false,
			menu: true,
			back: false
		},
		navStack: []
	};
	
	service.menu = App.toggleMenu;
	service.modal = AccountModalService;

	service.getFood = function( cartItems ){
		if( service.page == 'restaurant' &&
				cartItems &&
				service.restaurant && service.restaurant && service.restaurant._open &&
				!App.rootScope.notificationBarStatus ){
			angular.element( '.button-bottom-wrapper' ).addClass( 'button-bottom-show' );	
		} else {
			angular.element( '.button-bottom-wrapper' ).removeClass( 'button-bottom-show' );
		}
	}

	service.home = function() {
		if (App.isPhoneGap && cordova) {
			$('html, body, .snap-content-inner').animate({scrollTop: 0}, 200, $.easing.easeInOutQuart ? 'easeInOutQuart' : null);
		} else if (App.isMobile()) {
			service.menu();
		} else {
			service.link();
		}
	}

	service.goToRestaurants = function(){
		return service.link( RestaurantsService.permalink );
	}

	/* the transitions type could be push, fade, pop or none */
	service.link = function( path, transition ){
		if( App.isNarrowScreen() || App.transitionForDesktop ){
			App.rootScope.animationClass = transition ? 'animation-' + transition : '';
		}
		$location.path( path || '/' );
		App.snap.close();
	}

	service.signin = function(){
		service.modal.signinOpen();
	}

	service.control = function() {
		service.buttons.location = service.page != 'location';
		if (service.page == 'location' || service.page == 'restaurants' || service.navStack.length < 2) {
			service.buttons.back = false;
			service.buttons.menu = true;
		} else {
			service.buttons.back = true;
			service.buttons.menu = false;
		}
	}

	return service;

});
{'fraction_non_alphanumeric': 0.1552246340232206, 'fraction_numerical': 0.002523977788995457, 'mean_word_length': 3.7632211538461537, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '393662', 'n_tokens_mistral': 1404, 'n_tokens_neox': 1250, 'n_words': 268}