|
@@ -0,0 +1,136 @@
|
|
1
|
+<html>
|
|
2
|
+<title>UPR-RP Oferta Académica</title>
|
|
3
|
+<head>
|
|
4
|
+<meta charset="utf-8">
|
|
5
|
+<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
|
|
7
|
+<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
|
|
8
|
+
|
|
9
|
+ <style>
|
|
10
|
+ .table-hover tbody tr:hover td, .table-hover tbody tr:hover th {
|
|
11
|
+ background-color: #feb5b5;
|
|
12
|
+ table {
|
|
13
|
+ border: none !important;
|
|
14
|
+ }
|
|
15
|
+ table, th, td {
|
|
16
|
+ border: none !important;
|
|
17
|
+}
|
|
18
|
+ }
|
|
19
|
+ </style>
|
|
20
|
+
|
|
21
|
+<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
|
|
22
|
+<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
|
|
23
|
+<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
|
|
24
|
+</head>
|
|
25
|
+
|
|
26
|
+<body>
|
|
27
|
+<div class="container">
|
|
28
|
+ <div class="row">
|
|
29
|
+ <h1>Oferta Académica</h1>
|
|
30
|
+ </div>
|
|
31
|
+
|
|
32
|
+ <div ng-app="ccc" ng-controller="cccCtrl">
|
|
33
|
+
|
|
34
|
+ <form name="myform">
|
|
35
|
+ <div class="container">
|
|
36
|
+ Powered by: <a href="http://ccom.uprrp.edu"><img style="height: 150px;" src="http://i.imgur.com/xAsIoLE.png"></a>
|
|
37
|
+ </div>
|
|
38
|
+ <!-- <div class="container">
|
|
39
|
+ Powered by: <a href="http://ccom.uprrp.edu"><img height="150px" src="http://i.imgur.com/xAsIoLE.png"></a>
|
|
40
|
+ </div> -->
|
|
41
|
+
|
|
42
|
+ <div class="container-fluid">
|
|
43
|
+ <div class="row">
|
|
44
|
+ <div class="col-sm-4">
|
|
45
|
+ <label class="control-label col-sm-2">Keyword:</label>
|
|
46
|
+ </div>
|
|
47
|
+ <div class="col-sm-8">
|
|
48
|
+ <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()">
|
|
49
|
+ </div>
|
|
50
|
+ </div>
|
|
51
|
+ </div>
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+ <div class="container-fluid">
|
|
55
|
+ <div class="row">
|
|
56
|
+ <div class="col-sm-12">
|
|
57
|
+ <p>
|
|
58
|
+ <h3>Lista de Cursos</h3>
|
|
59
|
+ ** Esta tabla se actualiza con los datos que publíca el registrador. Puede que la información no esté sincronizada con el sistema real.
|
|
60
|
+ </p>
|
|
61
|
+ <table class="table table-hover table-striped" >
|
|
62
|
+ <tr ng-repeat="col in fcourses">
|
|
63
|
+
|
|
64
|
+ <td>
|
|
65
|
+ {{col.code}}
|
|
66
|
+ </td>
|
|
67
|
+ <td>
|
|
68
|
+ <p class="text-center"><b>{{col.name}}</b><br>
|
|
69
|
+ Prof. {{col.prof}}</p>
|
|
70
|
+ </td>
|
|
71
|
+ <td>
|
|
72
|
+ <span><b>Tipo:</b> {{col.type}}</span><br>
|
|
73
|
+ <span><b>Cupo:</b> {{col.cupo}}</span><br>
|
|
74
|
+ <span><b>Creditos:</b> {{col.creds}}</span><br>
|
|
75
|
+ </td>
|
|
76
|
+ <td>
|
|
77
|
+ <ul>
|
|
78
|
+ <li ng-repeat="sc in col.schedule">{{sc.days}} {{sc.times}} {{sc.room}}</li>
|
|
79
|
+ </ul>
|
|
80
|
+
|
|
81
|
+ </td>
|
|
82
|
+
|
|
83
|
+ </tr>
|
|
84
|
+ </table>
|
|
85
|
+ <br>
|
|
86
|
+ </div>
|
|
87
|
+ </div>
|
|
88
|
+</div>
|
|
89
|
+</body>
|
|
90
|
+
|
|
91
|
+ <script src="courses.js"></script>
|
|
92
|
+
|
|
93
|
+<script>
|
|
94
|
+ $(document).ready(function() {
|
|
95
|
+ $('[data-toggle="tooltip"]').tooltip();
|
|
96
|
+ });
|
|
97
|
+
|
|
98
|
+ var app = angular.module('ccc', []);
|
|
99
|
+ app.controller('cccCtrl', function($scope, $http) {
|
|
100
|
+ $scope.courses = data;
|
|
101
|
+ $scope.fcourse = [] ;
|
|
102
|
+
|
|
103
|
+ $scope.fcourses = $scope.courses;
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+ // Code for the Keyword search box
|
|
107
|
+
|
|
108
|
+ $scope.updateTable = function() {
|
|
109
|
+ $scope.fcourses = [];
|
|
110
|
+
|
|
111
|
+ searchableKeys = ["code", "name", "prof"] ;
|
|
112
|
+ if($scope.keywords){
|
|
113
|
+ for (col in $scope.courses) {
|
|
114
|
+ found = false;
|
|
115
|
+ for (keyIdx in searchableKeys) { // $scope.reu[col]) {
|
|
116
|
+ key = searchableKeys[keyIdx];
|
|
117
|
+ //console.log(key) ;
|
|
118
|
+ if ($scope.courses[col][key]!==null && $scope.courses[col][key].toLowerCase().search($scope.keywords.toLowerCase()) >= 0) {
|
|
119
|
+ found = true;
|
|
120
|
+ break;
|
|
121
|
+ }
|
|
122
|
+ }
|
|
123
|
+ if (found)
|
|
124
|
+ $scope.fcourses.push($scope.courses[col]) ;
|
|
125
|
+ }
|
|
126
|
+ }
|
|
127
|
+ else{
|
|
128
|
+ $scope.fcourses=$scope.courses ;
|
|
129
|
+ }
|
|
130
|
+ }
|
|
131
|
+
|
|
132
|
+ });
|
|
133
|
+</script>
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+</html>
|