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