123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- <html>
- <title>UPR-RP Oferta Académica</title>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
- <link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
-
- <style>
- .table-hover tbody tr:hover td, .table-hover tbody tr:hover th {
- background-color: #feb5b5;
- table {
- border: none !important;
- }
- table, th, td {
- border: none !important;
- }
- }
- </style>
-
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
- <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
- <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
- </head>
-
- <body>
- <div class="container">
- <div class="row">
- <h1>Oferta Académica</h1>
- </div>
-
- <div ng-app="ccc" ng-controller="cccCtrl">
-
- <form name="myform">
- <div class="container">
- Powered by: <a href="http://ccom.uprrp.edu"><img style="height: 150px;" src="http://i.imgur.com/xAsIoLE.png"></a>
- </div>
- <!-- <div class="container">
- Powered by: <a href="http://ccom.uprrp.edu"><img height="150px" src="http://i.imgur.com/xAsIoLE.png"></a>
- </div> -->
-
- <div class="container-fluid">
- <div class="row">
- <div class="col-sm-4">
- <label class="control-label col-sm-2">Keyword:</label>
- </div>
- <div class="col-sm-8">
- <input type="text" data-toggle="tooltip" title="The filter is applied to all the table fields. Example of keyworkds: ccom, 3033, Ortiz" class="form-control" ng-model="keywords" ng-change="updateTable()">
- </div>
- </div>
- </div>
-
-
- <div class="container-fluid">
- <div class="row">
- <div class="col-sm-12">
- <p>
- <h3>Lista de Cursos</h3>
- ** Esta tabla se actualiza con los datos que publíca el registrador. Puede que la información no esté sincronizada con el sistema real.
- </p>
- <table class="table table-hover table-striped" >
- <tr ng-repeat="col in fcourses">
-
- <td>
- {{col.code}}
- </td>
- <td>
- <p class="text-center"><b>{{col.name}}</b><br>
- Prof. {{col.prof}}</p>
- </td>
- <td>
- <span><b>Tipo:</b> {{col.type}}</span><br>
- <span><b>Cupo:</b> {{col.cupo}}</span><br>
- <span><b>Creditos:</b> {{col.creds}}</span><br>
- </td>
- <td>
- <ul>
- <li ng-repeat="sc in col.schedule">{{sc.days}} {{sc.times}} {{sc.room}}</li>
- </ul>
-
- </td>
-
- </tr>
- </table>
- <br>
- </div>
- </div>
- </div>
- </body>
-
- <script src="courses.js"></script>
-
- <script>
- $(document).ready(function() {
- $('[data-toggle="tooltip"]').tooltip();
- });
-
- var app = angular.module('ccc', []);
- app.controller('cccCtrl', function($scope, $http) {
- $scope.courses = data;
- $scope.fcourse = [] ;
-
- $scope.fcourses = $scope.courses;
-
-
- // Code for the Keyword search box
-
- $scope.updateTable = function() {
- $scope.fcourses = [];
-
- searchableKeys = ["code", "name", "prof"] ;
- if($scope.keywords){
- for (col in $scope.courses) {
- found = false;
- for (keyIdx in searchableKeys) { // $scope.reu[col]) {
- key = searchableKeys[keyIdx];
- //console.log(key) ;
- if ($scope.courses[col][key]!==null && $scope.courses[col][key].toLowerCase().search($scope.keywords.toLowerCase()) >= 0) {
- found = true;
- break;
- }
- }
- if (found)
- $scope.fcourses.push($scope.courses[col]) ;
- }
- }
- else{
- $scope.fcourses=$scope.courses ;
- }
- }
-
- });
- </script>
-
-
- </html>
|