<commit_before>(function() {
	'use strict';

	angular
		.module('greyjays.evaluations')
		.directive("crudPosition", crudPosition);

	/**
	@name		crudPosition
	@desc 		<crud-position items="" le-service=""></crud-position>
	@params		rootScope pour appeler la fonction refresh du scope root
	@returns	GUI de gestion CRUD des positions
	*/

	/** @ngInject */
	function crudPosition($rootScope) {
		var directive = {
			restrict: 'E',
			scope: {
				items: '=',
				leService: '='
			},
			templateUrl: 'app/components/crudPosition/crudPosition.tpl.html',
			link: linkF
		};
		return directive;
		
		function linkF(scope) {

			scope.affichage={};
			scope.affichage.add=false;
			scope.affichage.upd=false;
			scope.affichage.liste=true;
			scope.items = scope.items || [];
			scope.itemAdd = {};
			
			/**
			@name	afficherAjout
			@desc 	affichage de la GUI d'ajout avec init du param
			*/
			scope.afficherAjout = function() {
				scope.itemAdd = {};
				scope.affichage.add=true;
				scope.affichage.upd=false;
			};

			/**
			@name		afficherModification
			@desc 		affichage de la GUI de modif
			@params 	it : item de position
			*/
			scope.afficherModification = function(it) {
				scope.itemAdd.id = it.id;
				scope.itemAdd.libelle = it.libelle;
				scope.itemAdd.description = it.description;
				scope.affichage.add=false;
				scope.affichage.upd=true;
			};

			/**
			@name		enregistrer
			@desc 		appel du service save + refresh via la root
			*/
			scope.enregistrer = function() {
				var itemAjout = {};
				itemAjout.libelle = scope.itemAdd.libelle;
				itemAjout.description = scope.itemAdd.description;
				if (typeof scope.itemAdd.id !== 'undefined') {
					itemAjout.id=scope.itemAdd.id;
				}
				scope.leService.save(itemAjout).then(function() {
					$rootScope.$broadcast('refresh');
				});
				scope.affichage.add=false;<commit_msg>modif comm params en param<commit_after>(function() {
	'use strict';

	angular
		.module('greyjays.evaluations')
		.directive("crudPosition", crudPosition);

	/**
	@name		crudPosition
	@desc 		<crud-position items="" le-service=""></crud-position>
	@param		rootScope pour appeler la fonction refresh du scope root
	@returns	GUI de gestion CRUD des positions
	*/

	/** @ngInject */
	function crudPosition($rootScope) {
		var directive = {
			restrict: 'E',
			scope: {
				items: '=',
				leService: '='
			},
			templateUrl: 'app/components/crudPosition/crudPosition.tpl.html',
			link: linkF
		};
		return directive;
		
		function linkF(scope) {

			scope.affichage={};
			scope.affichage.add=false;
			scope.affichage.upd=false;
			scope.affichage.liste=true;
			scope.items = scope.items || [];
			scope.itemAdd = {};
			
			/**
			@name	afficherAjout
			@desc 	affichage de la GUI d'ajout avec init du param
			*/
			scope.afficherAjout = function() {
				scope.itemAdd = {};
				scope.affichage.add=true;
				scope.affichage.upd=false;
			};

			/**
			@name		afficherModification
			@desc 		affichage de la GUI de modif
			@param	 	it : item de position
			*/
			scope.afficherModification = function(it) {
				scope.itemAdd.id = it.id;
				scope.itemAdd.libelle = it.libelle;
				scope.itemAdd.description = it.description;
				scope.affichage.add=false;
				scope.affichage.upd=true;
			};

			/**
			@name		enregistrer
			@desc 		appel du service save + refresh via la root
			*/
			scope.enregistrer = function() {
				var itemAjout = {};
				itemAjout.libelle = scope.itemAdd.libelle;
				itemAjout.description = scope.itemAdd.description;
				if (typeof scope.itemAdd.id !== 'undefined') {
					itemAjout.id=scope.itemAdd.id;
				}
				scope.leService.save(itemAjout).then(function() {
					$rootScope.$broadcast('refresh');
				});
				scope.affichage.add=false;
{'fraction_non_alphanumeric': 0.13643659711075443, 'fraction_numerical': 0.0, 'mean_word_length': 3.0641304347826086, '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': '977811', 'n_tokens_mistral': 1613, 'n_tokens_neox': 1331, 'n_words': 249}