changes to unique import and styling

This commit is contained in:
Sriram Hariharan
2019-01-10 13:38:29 -06:00
parent c9e0c08a50
commit 2bb4617f87
3 changed files with 62 additions and 24 deletions

View File

@@ -26,18 +26,37 @@ body {
} }
.settingsbut { .settingsbut {
margin-right: 0px; margin-right: 2px;
border: 0px border: 0px;
border-radius: 50%;
transition: 0.3s;
} }
.settingsbut:focus { .settingsbut:focus {
outline: 0; outline: 0;
} }
.settingsbut:hover {
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.16), 0 4px 15px 0 rgba(0, 0, 0, 0.12);
}
.selected {
box-shadow: 0 0 0 1pt #FF9800;
}
.settingsbut:focus:after:hover {
outline: 0;
transition: 0.3s;
}
ul { ul {
margin-bottom: 20px; margin-bottom: 20px;
} }
i {
padding: 4px 0px;
}
.settings { .settings {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
@@ -52,9 +71,10 @@ ul {
border-radius: 7px; border-radius: 7px;
} }
.settings:hover {
/* .settings:hover {
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2), 0 4px 20px 0 rgba(0, 0, 0, 0.19); box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2), 0 4px 20px 0 rgba(0, 0, 0, 0.19);
} } */
.matbut { .matbut {
border: none; border: none;
@@ -165,6 +185,7 @@ ul {
animation: ripple 1s ease-out; animation: ripple 1s ease-out;
} }
.card:focus:not(:active)::after { .card:focus:not(:active)::after {
animation: ripple 1s ease-out; animation: ripple 1s ease-out;
} }
@@ -188,7 +209,8 @@ input[type=number]::-webkit-outer-spin-button {
} }
::placeholder { ::placeholder {
color: #FF0000; color: #ffbd9a;
;
} }
.select-style { .select-style {

View File

@@ -178,15 +178,16 @@ $(document).ready(function () {
'url': 'https://registrar.utexas.edu/schedules' 'url': 'https://registrar.utexas.edu/schedules'
}); });
}); });
$("#impexp").click(function () { $("#impexp").click(function () {
if ($("#impexp>i").text() == 'close') { if ($("#impexp>i").text() == 'close') {
$('#import').hide(); $('#import').hide();
$('#export').hide(); $('#export').hide();
$("#impexp>i").text('import_export'); $("#impexp>i").text('import_export');
// $(this).removeClass('selected');
} else { } else {
$("#impexp>i").text('close'); $("#impexp>i").text('close');
$('#import').show(); $('#import').show();
// $(this).addClass('selected');
$('#export').show(); $('#export').show();
} }
}); });
@@ -196,12 +197,14 @@ $(document).ready(function () {
$("#class_id").hide(); $("#class_id").hide();
$("#semcon").hide(); $("#semcon").hide();
$("#semesters").hide(); $("#semesters").hide();
// $(this).removeClass('selected');
} else { } else {
$("#search>i").text('close'); $("#search>i").text('close');
$("#class_id").show(); $("#class_id").show();
$("#semesters").show(); $("#semesters").show();
$("#semcon").show(); $("#semcon").show();
$('#class_id').focus(); $('#class_id').focus();
// $(this).addClass('selected');
} }
}); });
$('#import').click(function () { $('#import').click(function () {
@@ -381,9 +384,11 @@ function getSemesters() {
}, function (response) { }, function (response) {
if (response) { if (response) {
var object = $('<div/>').html(response).contents(); var object = $('<div/>').html(response).contents();
object.find('.callout2>ul>li>a').each(function () { object.find('.callout2>ul>li>a').each(function (index) {
if (index < 2) {
if ($(this).text() != "Course Schedule Archive") { if ($(this).text() != "Course Schedule Archive") {
var semname = $(this).text().split(" ")[0].substring(0, 2) + " " + $(this).text().split(" ")[1]; var semname = $(this).text().split(" ")[0].substring(0, 2) + " " + $(this).text().split(" ")[1];
$("#semesters").append(`<option>${semname}</option>`);
chrome.runtime.sendMessage({ chrome.runtime.sendMessage({
method: "GET", method: "GET",
action: "xhttp", action: "xhttp",
@@ -392,13 +397,24 @@ function getSemesters() {
}, function (response) { }, function (response) {
if (response) { if (response) {
var object = $('<div/>').html(response).contents(); var object = $('<div/>').html(response).contents();
var name = object.find(".page-title").text();
name = name.substring(name.lastIndexOf('|') + 1).trim();
name = name.split(" ")[0].substring(0, 2) + " " + name.split(" ")[1];
console.log(name);
object.find('.gobutton>a').each(function () { object.find('.gobutton>a').each(function () {
var semnum = $(this).attr('href').substring($(this).attr('href').lastIndexOf('/') + 1); var semnum = $(this).attr('href').substring($(this).attr('href').lastIndexOf('/') + 1);
$("#semesters").append(`<option value="${semnum}"">${semname}</option>`); $("option").each(function () {
console.log($(this).text());
if ($(this).text() == name) {
$(this).val(semnum);
console.log($(this).val());
}
})
}); });
} }
}); });
} }
}
}); });
} }
}); });

View File

@@ -34,7 +34,7 @@
<input type="text" id="class_id" name="class_id" maxlength="5" style="display:none;text-indent: 10px;border-style: solid; border-color:#FF0000;" <input type="text" id="class_id" name="class_id" maxlength="5" style="display:none;text-indent: 10px;border-style: solid; border-color:#FF0000;"
placeholder="Unique #?"></input> placeholder="Unique #?"></input>
<button title='Search' style="background-color:white;" class="settingsbut" id='search'> <button title='Search' style="background-color:white;margin-left: 5px;" class="settingsbut" id='search'>
<i style='color:#FF9800' class="material-icons"> <i style='color:#FF9800' class="material-icons">
search search
</i> </i>