Subversion Repositories bacoAlunos

Rev

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

Rev 1772 Rev 1773
Line 475... Line 475...
475
                                                                "urlUnidadeCurricular": "",
475
                                                                "urlUnidadeCurricular": "",
476
                                                                "type": "unidade"
476
                                                                "type": "unidade"
477
                                                            }
477
                                                            }
478
                                                    );
478
                                                    );
479
                                                }
479
                                                }
-
 
480
                                                $scope.findSiges = function(u,s){
-
 
481
                                                    var code = u.siges;
-
 
482
                                                    $.getJSON("<%=request.getContextPath()%>/user/courses/courseApiJson.jsp",
-
 
483
                                                            { service:"findCourseUnit",
-
 
484
                                                                siges: code,
-
 
485
                                                                courseSigesCode: "${course.code}"
-
 
486
                                                            },
-
 
487
                                                            function(data)
-
 
488
                                                            {
-
 
489
                                                                if(data.response == "ok")
-
 
490
                                                                {
-
 
491
                                                                    u.nome = data.courseUnitName;
-
 
492
                                                                    $("#sigesResponse" + s.id + "_" + u.siges).html("");
-
 
493
                                                                }
-
 
494
                                                                else
-
 
495
                                                                {
-
 
496
                                                                    $("#sigesResponse" + s.id + "_" + u.siges).html("Não encontrado");
-
 
497
                                                                }
-
 
498
                                                                $scope.$apply();
-
 
499
                                                            }
-
 
500
                                                    );
-
 
501
                                                }
480
                                            });
502
                                            });
481
 
503
 
482
 
504
 
483
                                        </script>
505
                                        </script>
484
                                        <div class="panel panel-info">
506
                                        <div class="panel panel-info">
Line 747... Line 769...
747
                                                <button type="button" class="btn btn-danger" ng-click="removeUnidade(parent,$index)">
769
                                                <button type="button" class="btn btn-danger" ng-click="removeUnidade(parent,$index)">
748
                                                    <span class="glyphicon glyphicon-remove"> </span>
770
                                                    <span class="glyphicon glyphicon-remove"> </span>
749
                                                </button>
771
                                                </button>
750
                                            </td>
772
                                            </td>
751
                                            <td ng-show="confView.SIGES">
773
                                            <td ng-show="confView.SIGES">
752
                                                <%--
-
 
753
 
774
 
754
                                                FOCUS FIND UNIT
-
 
755
                                                <script>
-
 
756
 
775
 
757
                                                    $(document).ready(
-
 
758
                                                            function()
-
 
759
                                                            {
-
 
760
                                                                $("#siges${dummyIndexIdUnidades}").focusout(
-
 
761
                                                                        function(){
-
 
762
                                                                            var code = $("#siges${dummyIndexIdUnidades}").val();
-
 
763
                                                                            $.getJSON("<%=request.getContextPath()%>/user/courses/courseApiJson.jsp",
-
 
764
                                                                                    { service:"findCourseUnit",
-
 
765
                                                                                        siges: code,
-
 
766
                                                                                        courseSigesCode: "${course.code}"
-
 
767
                                                                                    },
-
 
768
                                                                                    function(data)
-
 
769
                                                                                    {
-
 
770
                                                                                        if(data.response == "ok")
-
 
771
                                                                                        {
-
 
772
                                                                                            $("#nome${dummyIndexIdUnidades}").val(data.courseUnitName);
-
 
773
                                                                                            $("#sigesResponse${dummyIndexIdUnidades}").html("");
-
 
774
                                                                                        }
-
 
775
                                                                                        else
-
 
776
                                                                                        {
-
 
777
                                                                                            $("#sigesResponse${dummyIndexIdUnidades}").html("Não encontrado");
-
 
778
                                                                                        }
-
 
779
                                                                                    }
-
 
780
                                                                            );
-
 
781
                                                                        }
-
 
782
                                                                );
-
 
783
                                                            }
-
 
784
                                                    );
-
 
785
                                                </script>--%>
-
 
786
 
776
 
-
 
777
 
787
                                                <input type="text" ng-model="u.siges" style="width: 60px"/>
778
                                                <input ng-blur="findSiges(u,s)" type="text" ng-model="u.siges" style="width: 60px"/>
788
                                                <%--<div id="sigesResponse${dummyIndexIdUnidades}"></div>--%>
779
                                                <div id="sigesResponse{{s.id}}_{{u.siges}}"></div>
789
                                            </td>
780
                                            </td>
790
                                            <td ng-show="confView.Nome">
781
                                            <td ng-show="confView.Nome">
791
                                                <div>
782
                                                <div>
792
                                                    <div class="col-sm-11"><input type="text"  style="width:200px" ng-model="u.nome"/></div>
783
                                                    <div class="col-sm-11"><input type="text"  style="width:200px" ng-model="u.nome"/></div>
793
 
784