Subversion Repositories bacoAlunos

Rev

Rev 1773 | Rev 1797 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1773 Rev 1789
Line 385... Line 385...
385
                                                    "O" : true ,
385
                                                    "O" : true ,
386
                                                    "URL_UNIDADE" : true ,
386
                                                    "URL_UNIDADE" : true ,
387
                                                    "FICHA_URL" : true
387
                                                    "FICHA_URL" : true
388
                                                }
388
                                                }
389
 
389
 
-
 
390
                                                $scope.isInteger = function(n) { return Number(n) === n && n % 1 === 0; }
-
 
391
                                                $scope.isFloat = function(n) {  return Number(n) === n && n % 1 !== 0; }
-
 
392
 
-
 
393
 
-
 
394
                                                $scope.getTotalHorasContacto = function(totalHoras)
-
 
395
                                                {
-
 
396
                                                    var total = 0;
-
 
397
 
-
 
398
                                                    for (var key in totalHoras )
-
 
399
                                                    {
-
 
400
                                                        if(key != "tc" && key != "ot" && key != "pd"
-
 
401
                                                                && key != "pd"
-
 
402
                                                                && key != "pl"
-
 
403
                                                                && key != "tp")
-
 
404
                                                        {
-
 
405
                                                            var valor = totalHoras[key];
-
 
406
                                                            if(!isNaN(Number(valor)))
-
 
407
                                                            {
-
 
408
                                                                total+= Number(valor);
-
 
409
                                                            }
-
 
410
                                                        }
-
 
411
                                                    }
-
 
412
                                                    return total;
-
 
413
                                                }
-
 
414
 
390
                                                $scope.submeterForm = function()
415
                                                $scope.submeterForm = function()
391
                                                {
416
                                                {
392
                                                    $("#planoEstudosJsonInterface").val(
417
                                                    $("#planoEstudosJsonInterface").val(
393
                                                            JSON.stringify($scope.json)
418
                                                            JSON.stringify($scope.json)
394
                                                    );
419
                                                    );
Line 510... Line 535...
510
                                                    <thead>
535
                                                    <thead>
511
                                                        <tr>
536
                                                        <tr>
512
                                                            <th>SIGES</th>
537
                                                            <th>SIGES</th>
513
                                                            <th>Nome</th>
538
                                                            <th>Nome</th>
514
                                                            <th>ECTS</th>
539
                                                            <th>ECTS</th>
515
                                                            <th>Total</th>
540
                                                            <th>Total Horas de Trabalho</th>
516
                                                            <th>T</th>
541
                                                            <th>T</th>
517
                                                            <th>TP</th>
542
                                                            <th>TP</th>
518
                                                            <th>P</th>
543
                                                            <th>P</th>
519
                                                            <th>PL</th>
544
                                                            <th>PL</th>
520
                                                            <th>PD</th>
545
                                                            <th>PD</th>
Line 673... Line 698...
673
                                                            <td></td>
698
                                                            <td></td>
674
                                                            <td></td>
699
                                                            <td></td>
675
                                                            <th ng-show="confView.SIGES">SIGES</th>
700
                                                            <th ng-show="confView.SIGES">SIGES</th>
676
                                                            <th ng-show="confView.Nome">Nome</th>
701
                                                            <th ng-show="confView.Nome">Nome</th>
677
                                                            <th ng-show="confView.ECTS">ECTS</th>
702
                                                            <th ng-show="confView.ECTS">ECTS</th>
678
                                                            <th ng-show="confView.Total">Total</th>
703
                                                            <th ng-show="confView.Total">Total Horas Trabalho</th>
-
 
704
                                                            <th>Total Contacto</th>
679
                                                            <th ng-show="confView.T">T</th>
705
                                                            <th ng-show="confView.T">T</th>
680
                                                            <th ng-show="confView.TP">TP</th>
706
                                                            <th ng-show="confView.TP">TP</th>
681
                                                            <th ng-show="confView.P">P</th>
707
                                                            <th ng-show="confView.P">P</th>
682
                                                            <th ng-show="confView.PL">PL</th>
708
                                                            <th ng-show="confView.PL">PL</th>
683
                                                            <th ng-show="confView.PD">PD</th>
709
                                                            <th ng-show="confView.PD">PD</th>
Line 733... Line 759...
733
                                                        <td></td>
759
                                                        <td></td>
734
                                                        <td></td>
760
                                                        <td></td>
735
                                                        <th ng-show="confView.SIGES">SIGES</th>
761
                                                        <th ng-show="confView.SIGES">SIGES</th>
736
                                                        <th ng-show="confView.Nome">Nome</th>
762
                                                        <th ng-show="confView.Nome">Nome</th>
737
                                                        <th ng-show="confView.ECTS">ECTS</th>
763
                                                        <th ng-show="confView.ECTS">ECTS</th>
738
                                                        <th ng-show="confView.Total">Total</th>
764
                                                        <th ng-show="confView.Total">Total Horas de Trabalho</th>
-
 
765
                                                        <th>Total Contacto</th>
739
                                                        <th ng-show="confView.T">T</th>
766
                                                        <th ng-show="confView.T">T</th>
740
                                                        <th ng-show="confView.TP">TP</th>
767
                                                        <th ng-show="confView.TP">TP</th>
741
                                                        <th ng-show="confView.P">P</th>
768
                                                        <th ng-show="confView.P">P</th>
742
                                                        <th ng-show="confView.PL">PL</th>
769
                                                        <th ng-show="confView.PL">PL</th>
743
                                                        <th ng-show="confView.PD">PD</th>
770
                                                        <th ng-show="confView.PD">PD</th>
Line 793... Line 820...
793
                                                </div>
820
                                                </div>
794
 
821
 
795
                                            </td>
822
                                            </td>
796
                                            <td ng-show="confView.ECTS"><input type="text" style="width: 40px" ng-model="u.eCTS"/></td>
823
                                            <td ng-show="confView.ECTS"><input type="text" style="width: 40px" ng-model="u.eCTS"/></td>
797
                                            <td ng-show="confView.Total"><input type="text" style="width: 40px" ng-model="u.totalHoras"></td>
824
                                            <td ng-show="confView.Total"><input type="text" style="width: 40px" ng-model="u.totalHoras"></td>
798
 
-
 
-
 
825
                                            <td>{{getTotalHorasContacto(u.horasContacto)}}</td>
799
                                            <td ng-show="confView.T"><input type="text" style="width: 40px" ng-model="u.horasContacto.t"/></td>
826
                                            <td ng-show="confView.T"><input type="text" style="width: 40px" ng-model="u.horasContacto.t"/></td>
800
                                            <td ng-show="confView.TP"><input type="text" style="width: 40px" ng-model="u.horasContacto.tP"/></td>
827
                                            <td ng-show="confView.TP"><input type="text" style="width: 40px" ng-model="u.horasContacto.tP"/></td>
801
                                            <td ng-show="confView.P"><input type="text" style="width: 40px" ng-model="u.horasContacto.p"/></td>
828
                                            <td ng-show="confView.P"><input type="text" style="width: 40px" ng-model="u.horasContacto.p"/></td>
802
                                            <td ng-show="confView.PL"><input type="text" style="width: 40px" ng-model="u.horasContacto.pL"/></td>
829
                                            <td ng-show="confView.PL"><input type="text" style="width: 40px" ng-model="u.horasContacto.pL"/></td>
803
                                            <td ng-show="confView.PD"><input type="text" style="width: 40px" ng-model="u.horasContacto.pD"/></td>
830
                                            <td ng-show="confView.PD"><input type="text" style="width: 40px" ng-model="u.horasContacto.pD"/></td>