From bb586e9f7db01f80b1b8a29ad7c0adf2e4d96c4b Mon Sep 17 00:00:00 2001 From: Fabrizio Chiarello <fabrizio.chiarello@pd.infn.it> Date: Thu, 29 Jun 2017 17:24:15 +0200 Subject: [PATCH] =?UTF-8?q?Add=20combo=20for=20"Nome=20Attivit=C3=A0=20d'i?= =?UTF-8?q?nizio"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabrizio Chiarello <fabrizio.chiarello@pd.infn.it> --- app/scripts/controllers/sequences/SequenceDetailCtrl.js | 5 +++++ app/views/sequences/sequence-detail.html | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/scripts/controllers/sequences/SequenceDetailCtrl.js b/app/scripts/controllers/sequences/SequenceDetailCtrl.js index e3364e7..452d5fc 100644 --- a/app/scripts/controllers/sequences/SequenceDetailCtrl.js +++ b/app/scripts/controllers/sequences/SequenceDetailCtrl.js @@ -42,6 +42,11 @@ angular.module('monitoringConfigurationApp') return ($scope.sequenza.sequenza[index].codAttivita && selected.length) ? selected[0] : 'Not set'; }; + $scope.showCodAttivitaInizioList = function (index) { + var selected = $filter('filter')($scope.codAttivitaList, $scope.sequenza.codAttivitaInizio); + return ($scope.sequenza.codAttivitaInizio && selected.length) ? selected[0] : 'Not set'; + }; + $scope.$watch('sequenceForm.$visible', function () { if ($scope.sequenceForm.$dirty) $scope.sequenceForm.$show(); diff --git a/app/views/sequences/sequence-detail.html b/app/views/sequences/sequence-detail.html index 68ba1f1..9bbed9d 100644 --- a/app/views/sequences/sequence-detail.html +++ b/app/views/sequences/sequence-detail.html @@ -23,7 +23,9 @@ <h1> </div> <div> <span class="title">Nome Attività d'inizio: </span> - <span id="beginningActivity" editable-text="sequenza.codAttivitaInizio" e-name="name" e-required>{{ sequenza.codAttivitaInizio || 'empty' }}</span> + <span editable-select="sequenza.codAttivitaInizio" e-ng-options="a as a for a in codAttivitaList" e-name="codAttivitaInizio" e-required> + {{ showCodAttivitaInizioList() }} + </span> </div> <div> <span class="title">Cod Processo: </span> -- GitLab