PageSourceSearch

https://eccbeefclub.com/js/App/Abp/controllers/parent/problematique/LoisirParentController.js

js eccbeefclub.com collected 2026-10-08 20:29:53 UTC 4,049 bytes, 117 lines download raw bytes

1'use strict';
2
3angular.module('myApp.AppControllers')
4
5/**
6 *
7 */
8.controller('LoisirParentController',['$rootScope', '$scope', '$filter', '$log', 'usSpinnerService', 'growl', 'PartenaireService', 'ProblematiqueParentsService',
9    function ($rootScope, $scope, $filter, $log, usSpinnerService, growl, PartenaireService, ProblematiqueParentsService)
10    {
11        $scope.partenaires = PartenaireService.list;
12
13        $scope.etats = ProblematiqueParentsService.etats_general;
14
15        // Pb Loisir
16        $scope.pb_loisir = {
17            Date : new Date(),
18            Type:'',
19            Proposition:'',
20            Niveau:'',
21            Commentaire:'',
22            partenaires:[]
23        };
24
25        $scope.save_loisir = function()
26        {
27            $log.log('save_loisir');
28            ProblematiqueParentsService.save_problematique('loisir', $scope.parent.Id, $scope.pb_loisir)
29                .then( function(answer)
30                {
31                    // $log.log(answer.data);
32                    growl.success("PROBLEMATIQUE CRÉE");
33                    
34                    // Reset form
35                    $scope.reset_pb_loisir();
36                    $scope.NewPbLoisir.$setPristine(true);
37                })
38                .catch(function(answer)
39                {
40                    growl.error("PROBLEMATIQUE NON CRÉE : " + answer.data);
41                });
42        };
43
44        $scope.delete_loisir = function(id)
45        {
46            $log.log('delete_loisir', id);
47            if(confirm('Êtes vous sûr de vouloir supprimer cette problématique ?'))
48            {
49                ProblematiqueParentsService.delete_problematique('loisir', $scope.parent.Id, id)
50                    .then( function(answer)
51                    {
52                        // $log.log(answer.data);
53                        growl.success("PROBLEMATIQUE SUPPRIMÉE");
54                        
55                        // Reset form
56                        $scope.reset_pb_loisir();
57                        $scope.NewPbLoisir.$setPristine(true);
58                    })
59                    .catch(function(answer)
60                    {
61                        growl.error("PROBLEMATIQUE NON SUPPRIMÉE : " + answer.data);
62                    });
63            }
64        };
65
66        $scope.reset_pb_loisir = function()
67        {
68            $scope.pb_loisir = {
69                Date : new Date(),
70                Type:'',
71                Proposition:'',
72                Niveau:'',
73                Commentaire:'',
74                partenaires:[]
75            };
76            
77            $scope.vm_pb_loi = {};
78            
79            $scope.vm_pb_loi.leftValue = angular.copy($scope.partenaires);
80            $scope.vm_pb_loi.rightValue = $scope.pb_loisir.partenaires;
81            
82            $scope.vm_pb_loi.addValue = [];
83            $scope.vm_pb_loi.removeValue = [];
84        };
85
86        // Pb Loisir Dual Box
87        $scope.vm_pb_loi = {};
88        
89        $scope.vm_pb_loi.leftValue = angular.copy($scope.partenaires);
90        $scope.vm_pb_loi.rightValue = $scope.pb_loisir.partenaires;
91        
92        $scope.vm_pb_loi.addValue = [];
93        $scope.vm_pb_loi.removeValue = [];
94
95        $scope.vm_pb_loi.options = {
96            leftContainerScrollEnd: function () {},
97            rightContainerScrollEnd: function () {},
98            leftContainerSearch: function (text) {
99                $scope.vm_pb_loi.leftValue = $filter('filter')(leftValue, {
100                    'Partenairenom': text
101                })
102            },
103            rightContainerSearch: function (text) {
104                $scope.vm_pb_loi.rightValue = $filter('filter')(rightV
104alue, {
105                    'Partenairenom': text
106                })
107            },
108            leftContainerLabel: '',
109            rightContainerLabel: '',
110            onMoveRight: function () {},
111            onMoveLeft: function () {}
112        };
113        
114        var leftValue = angular.copy($scope.vm_pb_loi.leftValue);
115        var rightValue = angular.copy($scope.vm_pb_loi.rightValue);
116	}
117])

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.