more deconstructing
This commit is contained in:
@@ -171,15 +171,11 @@ Template.Popup = class {
|
||||
}
|
||||
}
|
||||
Template.Import = class {
|
||||
|
||||
static button_text_default = "<span style='font-size:small'>Import to </span><b>UT Reg +<b>";
|
||||
static waitlist_button_text_default = "<span style='font-size:small'>Import Waitlists to </span><b>UT Reg +<b>";
|
||||
static button_success = "Courses Saved!";
|
||||
static import_button() {
|
||||
return `<button class='material-button' id='import' style='margin:15px 0px;'>${this.button_text_default}</button><br>`;
|
||||
return `<button class='material-button' id='import' style='margin:15px 0px;'>${Text.button_text_default}</button><br>`;
|
||||
}
|
||||
|
||||
static waitlist_import_button() {
|
||||
return `<button class='material-button' id='import_waitlist' style='margin:0px'>${this.waitlist_button_text_default}</button><br>`;
|
||||
return `<button class='material-button' id='import_waitlist' style='margin:0px'>${Text.waitlist_button_text_default}</button><br>`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,3 +54,6 @@ Text.emptyText = function(){
|
||||
|
||||
return arr[index];
|
||||
}
|
||||
Text.button_text_default = "<span style='font-size:small'>Import to </span><b>UT Reg +<b>";
|
||||
Text.waitlist_button_text_default = "<span style='font-size:small'>Import Waitlists to </span><b>UT Reg +<b>";
|
||||
Text.button_success = "Courses Saved!";
|
||||
|
||||
@@ -30,8 +30,8 @@ $(function () {
|
||||
|
||||
function importButtonAnimation(button) {
|
||||
let is_waitlisted_button = $(button).attr('id') == "import_waitlist";
|
||||
let return_text = is_waitlisted_button ? Template.Import.waitlist_button_text_default : Template.Import.button_text_default;
|
||||
$(button).text(Template.Import.button_success).css("background-color", Colors.open);
|
||||
let return_text = is_waitlisted_button ? Text.waitlist_button_text_default : Text.button_text_default;
|
||||
$(button).text(Text.button_success).css("background-color", Colors.open);
|
||||
setTimeout(function () {
|
||||
$(button).html(return_text).css('background-color', Colors.waitlisted);
|
||||
}, 1000);
|
||||
@@ -135,4 +135,4 @@ function getDayTimeArray(row, course_info) {
|
||||
}
|
||||
}
|
||||
return day_time_array;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user