×Computer Fluency (C S 302)
with Bruce Porter
×Computer Fluency (C S 302)
with Bruce Porter
'
$("#container").prepend(modhtml);
//console.log(grades);
@@ -29,7 +28,6 @@ $(document).ready( function() {
let lastname = profname.split(',')[0];
rating = "Hello";
}
- $(this).find('td').eq(4).after('
'+rating+' | ');
$(this).append('
| ');
}
});
@@ -52,7 +50,8 @@ function getCourseInfo(row){
}
if($(this).is(row)){
profurl = $(this).find('td a').prop('href');
- profname = $(this).find('td').eq(4).text().split(',')[0];
+ profname = $(this).find('td').eq(4).text().split(', ')[0];
+ profinit = $(this).find('td').eq(4).text().split(',')[1];
return false;
}
});
@@ -74,7 +73,14 @@ function getDistribution(){
}
function openDialog(dep,cls,sem,professor,res){
- var data = res.values[0];
+ var data;
+ if(typeof res == 'undefined'){
+ data = new Array();
+ }
+ else{
+ //TODO: Have placeholder chart for when database doesn't have
+ data = res.values[0];
+ }
var modal = document.getElementById('myModal');
var span = document.getElementsByClassName("close")[0];
modal.style.display = "block";
@@ -86,7 +92,7 @@ function openDialog(dep,cls,sem,professor,res){
console.log(res.values);
}
else{
- name = profname.substring(0,1)+profname.substring(1).toLowerCase();
+ name = profinit+". "+profname.substring(0,1)+profname.substring(1).toLowerCase();
}
$(".profname").text("with "+ name);
@@ -94,9 +100,7 @@ function openDialog(dep,cls,sem,professor,res){
span.onclick = function() {
modal.style.display = "none";
}
- if(typeof data == 'undefined'){
- }
chart = Highcharts.chart('chart', {
chart: {
type: 'column',
diff --git a/styles.css b/styles.css
index cf49039c..592c669f 100644
--- a/styles.css
+++ b/styles.css
@@ -20,6 +20,7 @@
width: 50%;
}
+
/* The Close Button */
.close {
color: #aaaaaa;
@@ -47,6 +48,7 @@
margin-left: 5px;
padding-bottom: 5px;
font-size: medium;
+ margin-top: 10px;
font-weight: bold;
}
@@ -81,4 +83,61 @@
color: #000;
text-decoration: none;
cursor: pointer;
+}
+
+.topbuttons .matbut {
+ display:inline-block;
+}
+
+/* Material style */
+.matbut {
+ border: none;
+ cursor: pointer;
+ color: white;
+ margin: 10px 10px 10px 0px;
+ padding: 10px 10px;
+ border-radius: 2px;
+ font-size: medium;
+ font-style: bold;
+ box-shadow: 2px 2px 4px rgba(0, 0, 0, .4);
+ background: #FF9800;
+}
+
+/* Ripple magic */
+.matbut{
+ position: relative;
+ overflow: hidden;
+}
+
+.matbut:after {
+ content: '';
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 5px;
+ height: 5px;
+ background: rgba(255, 255, 255, .5);
+ opacity: 0;
+ border-radius: 100%;
+ transform: scale(1, 1) translate(-50%);
+ transform-origin: 50% 50%;
+}
+
+@keyframes ripple {
+ 0% {
+ transform: scale(0, 0);
+ opacity: 1;
+ }
+ 20% {
+ transform: scale(25, 25);
+ opacity: 1;
+ }
+ 100% {
+ opacity: 0;
+ transform: scale(40, 40);
+ }
+}
+
+.matbut:focus:not(:active)::after {
+ animation: ripple 1s ease-out;
}
\ No newline at end of file