fixed copy button bug
This commit is contained in:
@@ -247,7 +247,7 @@ function convertDateTimeArrToLine(date, time, place) {
|
|||||||
let arr = seperateDays(date)
|
let arr = seperateDays(date)
|
||||||
let output = prettifyDaysText(arr)
|
let output = prettifyDaysText(arr)
|
||||||
let building = place.substring(0, place.search(/\d/) - 1);
|
let building = place.substring(0, place.search(/\d/) - 1);
|
||||||
building = building == "" ? "Undecided Location" : building;
|
building = building ? building : "Undecided Location";
|
||||||
return `${output} at ${time.replace(/\./g, '').replace(/\-/g, ' to ')} in <a style='font-size:medium' target='_blank' href='https://maps.utexas.edu/buildings/UTM/${building}'>${building}</>`;
|
return `${output} at ${time.replace(/\./g, '').replace(/\-/g, ' to ')} in <a style='font-size:medium' target='_blank' href='https://maps.utexas.edu/buildings/UTM/${building}'>${building}</>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -337,13 +337,10 @@ function openDialog(course_info, res) {
|
|||||||
$("#saveCourse").text("Add Course +");
|
$("#saveCourse").text("Add Course +");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
buildSemestersDropdown(course_info, res)
|
buildSemestersDropdown(course_info, res)
|
||||||
var data = []
|
var data = []
|
||||||
if (!badData(course_info, res))
|
if (!badData(course_info, res))
|
||||||
data = res.values[0];
|
data = res.values[0];
|
||||||
let status_color = getStatusColor(course_info["status"]);
|
|
||||||
//close button
|
|
||||||
allowClosing();
|
allowClosing();
|
||||||
setChart(data);
|
setChart(data);
|
||||||
}
|
}
|
||||||
|
|||||||
18
js/popup.js
18
js/popup.js
@@ -221,6 +221,11 @@ $("#options_button").click(function () {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$("#courseList").on('mouseover', '.copybut', function () {
|
$("#courseList").on('mouseover', '.copybut', function () {
|
||||||
$(this).addClass('shadow');
|
$(this).addClass('shadow');
|
||||||
}).on('mouseleave', '.copybut', function () {
|
}).on('mouseleave', '.copybut', function () {
|
||||||
@@ -229,7 +234,7 @@ $("#courseList").on('mouseover', '.copybut', function () {
|
|||||||
|
|
||||||
$("#courseList").on('click', '.copybut', function (e) {
|
$("#courseList").on('click', '.copybut', function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
copyButtonAnimation();
|
copyButtonAnimation($(this));
|
||||||
let unique = $(this).val();
|
let unique = $(this).val();
|
||||||
copyUnique(unique);
|
copyUnique(unique);
|
||||||
});
|
});
|
||||||
@@ -312,12 +317,12 @@ function handleEmpty() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function copyButtonAnimation() {
|
function copyButtonAnimation(copy_button) {
|
||||||
$(this).find('i').text('check');
|
$(copy_button).find('i').text('check');
|
||||||
$(this).stop(true, false).removeAttr('style').removeClass('shadow', {
|
$(copy_button).stop(true, false).removeAttr('style').removeClass('shadow', {
|
||||||
duration: 200
|
duration: 200
|
||||||
});
|
});
|
||||||
$(this).find('i').delay(400).queue(function (n) {
|
$(copy_button).find('i').delay(400).queue(function (n) {
|
||||||
$(this).text('content_copy');
|
$(this).text('content_copy');
|
||||||
$(this).parent().removeClass('shadow');
|
$(this).parent().removeClass('shadow');
|
||||||
if ($(this).parent().is(":hover")) {
|
if ($(this).parent().is(":hover")) {
|
||||||
@@ -327,7 +332,6 @@ function copyButtonAnimation() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function toggleTimeDropdown(clicked_item) {
|
function toggleTimeDropdown(clicked_item) {
|
||||||
let more_info_button = $(clicked_item).find('#moreInfo');
|
let more_info_button = $(clicked_item).find('#moreInfo');
|
||||||
let arrow = $('clicked_item').find("#arrow");
|
let arrow = $('clicked_item').find("#arrow");
|
||||||
@@ -373,8 +377,6 @@ function showImportExportPopup() {
|
|||||||
$("#import-export-popup").removeClass('hide');
|
$("#import-export-popup").removeClass('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function getSemesters() {
|
function getSemesters() {
|
||||||
var schedule_list = 'https://registrar.utexas.edu/schedules';
|
var schedule_list = 'https://registrar.utexas.edu/schedules';
|
||||||
$.get(schedule_list, function (response) {
|
$.get(schedule_list, function (response) {
|
||||||
|
|||||||
Reference in New Issue
Block a user