fixed dropdown arrow in popup

This commit is contained in:
sghsri
2018-08-31 19:48:25 -05:00
parent 996e18ca6b
commit 1c0b7c9bf7
5 changed files with 31 additions and 8 deletions

View File

@@ -34,7 +34,7 @@ $(function () {
defaultView: "agendaWeek", // Only show week view defaultView: "agendaWeek", // Only show week view
header: false, // Hide buttons/titles header: false, // Hide buttons/titles
minTime: "08:00:00", // Start time minTime: "08:00:00", // Start time
maxTime: "21:00:00", // End time maxTime: "21:00:01", // End time
columnHeaderFormat: "ddd", // Only show day of the week names columnHeaderFormat: "ddd", // Only show day of the week names
displayEventTime: true, // Display event time displayEventTime: true, // Display event time
allDaySlot: false, allDaySlot: false,
@@ -72,7 +72,7 @@ $(function () {
$("#register").text("Join Waitlist").css("background-color", "#FF9800"); $("#register").text("Join Waitlist").css("background-color", "#FF9800");
} }
else { else {
$("#register").text("register").css("background-color", "#4CAF50"); $("#register").text("Register").css("background-color", "#4CAF50");
} }
} }
}); });

13
js/import.js Normal file
View File

@@ -0,0 +1,13 @@
$(function () {
//template https://utdirect.utexas.edu/apps/registrar/course_schedule/20189/51475/
var sem = $('[name="s_ccyys"]').val();
$(".tbg").after("<button class='matbut' id='import' style='margin:10px 0px 20px 0px;'><span style='font-size:small'>Import into </span><b>UT Reg Plus<b></h2>");
$("#import").click(function(){
$(".tbg").find(".tbon>td:first-child").each(function(){
console.log($(this).text().replace(/\s/g, ''));
});
alert(sem);
});
});

View File

@@ -41,7 +41,7 @@ chrome.storage.sync.get('savedCourses', function (data) {
if (profname == "") { if (profname == "") {
profname = "Undecided Professor"; profname = "Undecided Professor";
} }
var listhtml = "<li id='" + i + "'style='padding: 0px 5px 5px 5px; overflow-y: auto;max-height:400px;'><div class='card'><div class='container' style='background:" + color + "''><h4 class='truncate' style='color:white;margin:5px; display:inline-block;font-size:large;'><b>" + department + " " + course_nbr + "<span style='font-size:medium'>" + " with </span><span style='font-size:medium'>" + profname + " (" + courses[i].unique + ")" + "</span></b></h4><p style='float:right;font-size:small;display:inline-block;margin-top:10px;color:white;'>&#9660;</p></div></div><div id='moreInfo' style='display: none;'><p style='font-weight:bold;padding:10px;margin:0px 5px 0px 15px;font-size:small;background-color:#FFCDD2;'>" + makeLine(i) + "</p><div id='infoButtons' style='border-radius:0px;'><button class='matbut' id='listRemove'style='float:right;background:#F44336; margin:5px;'>Remove</button><button class='matbut' id='register' style='float:right;background:#4CAF50; margin:5px;'>Register</button><button class='matbut' id='listMoreInfo' style='float:right;background:#2196F3; margin:5px;'>More Info</button></div></div></li>"; var listhtml = "<li id='" + i + "'style='padding: 0px 5px 5px 5px; overflow-y: auto;max-height:400px;'><div class='card'><div class='container' style='background:" + color + "''><h4 class='truncate' style='color:white;margin:5px; display:inline-block;font-size:large;'><b>" + department + " " + course_nbr + "<span style='font-size:medium'>" + " with </span><span style='font-size:medium'>" + profname + " (" + courses[i].unique + ")" + "</span></b></h4><p id='arrow' style='float:right;font-size:small;display:inline-block;margin-top:10px;color:white;'>&#9658;</p></div></div><div id='moreInfo' style='display: none;'><p style='font-weight:bold;padding:10px;margin:0px 5px 0px 15px;font-size:small;background-color:#FFCDD2;'>" + makeLine(i) + "</p><div id='infoButtons' style='border-radius:0px;'><button class='matbut' id='listRemove'style='float:right;background:#F44336; margin:5px;'>Remove</button><button class='matbut' id='register' style='float:right;background:#4CAF50; margin:5px;'>Register</button><button class='matbut' id='listMoreInfo' style='float:right;background:#2196F3; margin:5px;'>More Info</button></div></div></li>";
$("#courseList").append(listhtml); $("#courseList").append(listhtml);
} }
}); });
@@ -135,8 +135,12 @@ $(document).ready(function () {
/* Show the times popout and more info options*/ /* Show the times popout and more info options*/
if ($(this).find("#moreInfo").is(":hidden")) { if ($(this).find("#moreInfo").is(":hidden")) {
$(this).find("#moreInfo").fadeIn(200); $(this).find("#moreInfo").fadeIn(200);
$(this).find('#arrow').css('transform','rotate(90deg)');
} else { } else {
$(this).find("#moreInfo").fadeOut(200); $(this).find("#moreInfo").fadeOut(200);
$(this).find('#arrow').css('transform','');
} }
}); });
$("#clear").click(function () { $("#clear").click(function () {
@@ -189,7 +193,7 @@ function makeLine(index) {
if (building == "") { if (building == "") {
building = "Undecided Location"; building = "Undecided Location";
} }
output += `<span style='font-size:large;display:inline-block;width: 20%;'>${dayarr[i]}:</span><span style='margin-left:10px;display:inline-block;width: 45%;'>${timearr[i].split(",")[0]} to ${timearr[i].split(",")[1]}</span><span style='float:right;display:inline-block;text-align:right;width: 30%;margin-top:5px;'><a target='_blank' style='color:#3c87a3;text-decoration:none;'href='https://maps.utexas.edu/buildings/UTM/${building}'>${place}</a></span><br>`; output += `<span style='display:inline-block;width: 20%;'>${dayarr[i]}:</span><span style='margin-left:10px;display:inline-block;width: 50%;text-align:center;'>${timearr[i].split(",")[0]} to ${timearr[i].split(",")[1]}</span><span style='float:right;display:inline-block;text-align:right;width: 25%;'><a target='_blank' style='color:#3c87a3;text-decoration:none;'href='https://maps.utexas.edu/buildings/UTM/${building}'>${place}</a></span><br>`;
} }
} }
return output; return output;

View File

@@ -15,7 +15,13 @@
"css": ["css/styles.css"], "css": ["css/styles.css"],
"js": ["js/moment.min.js","js/sql-memory-growth.js","js/highcharts.js","js/jquery-3.3.1.min.js","js/content.js"], "js": ["js/moment.min.js","js/sql-memory-growth.js","js/highcharts.js","js/jquery-3.3.1.min.js","js/content.js"],
"matches": ["https://utdirect.utexas.edu/apps/registrar/course_schedule/*"] "matches": ["https://utdirect.utexas.edu/apps/registrar/course_schedule/*"]
}], },{
"css": ["css/styles.css"],
"js": ["js/moment.min.js","js/sql-memory-growth.js","js/highcharts.js","js/jquery-3.3.1.min.js","js/import.js"],
"matches": ["https://utdirect.utexas.edu/registrar/waitlist/wl_see_my_waitlists.WBX"]
}
],
"web_accessible_resources": [ "web_accessible_resources": [
"grades.db","images/disticon.png"], "grades.db","images/disticon.png"],
"background": { "background": {

6
todo
View File

@@ -2,10 +2,9 @@ TODO as of 8/28/18
FEATURES: FEATURES:
- something to fill the space to the rght of the main popup window
- Location in popup extra info
- import into UT registration plus
- import calendar - import calendar
- import into UT registration plus
BUGS TO FIX: BUGS TO FIX:
@@ -16,3 +15,4 @@ DONE/FIXED:
- Textbook button (amber) - Textbook button (amber)
- Calendar popup - Calendar popup
- online classes no times in popup link - online classes no times in popup link
- Location in popup extra info