deconstructing class
This commit is contained in:
@@ -133,11 +133,23 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.topbuttons .matbut {
|
||||
.topbuttons .material-button {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.matbut {
|
||||
.rmp-button {
|
||||
|
||||
}
|
||||
|
||||
.ecis-button {
|
||||
|
||||
}
|
||||
|
||||
.textbook-button{
|
||||
|
||||
}
|
||||
|
||||
.material-button {
|
||||
border: none;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
@@ -149,14 +161,11 @@
|
||||
font-style: bold;
|
||||
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
|
||||
background: #ff9800;
|
||||
}
|
||||
|
||||
.matbut {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.matbut:after {
|
||||
.material-button:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
@@ -187,7 +196,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.matbut:focus:not(:active)::after {
|
||||
.material-button:focus:not(:active)::after {
|
||||
animation: ripple 1s ease-out;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
class Template {
|
||||
static Main = class Main {
|
||||
class Template{}
|
||||
|
||||
Template.Main = class {
|
||||
static modal() {
|
||||
return `<div class=modal id=myModal>
|
||||
<div class=modal-content>
|
||||
@@ -9,11 +10,11 @@ class Template {
|
||||
<h2 class=title id="title">Computer Fluency (C S 302)</h2>
|
||||
<h2 class=profname id="profname">with Bruce Porter</h2>
|
||||
<div id="topbuttons" class=topbuttons>
|
||||
<button class=matbut id="rateMyProf" style="background: #4CAF50;"> RMP </button>
|
||||
<button class=matbut id="eCIS" style="background: #CDDC39;"> eCIS </button>
|
||||
<button class=matbut id="textbook" style="background: #FFC107;"> Textbook </button>
|
||||
<button class=matbut id="Syllabi"> Past Syllabi </button>
|
||||
<button class=matbut id="saveCourse" value="add" style="background: #F44336;"> Save Course +</button>
|
||||
<button class=material-button id="rateMyProf" style="background: #4CAF50;"> RMP </button>
|
||||
<button class=material-button id="eCIS" style="background: #CDDC39;"> eCIS </button>
|
||||
<button class=material-button id="textbook" style="background: #FFC107;"> Textbook </button>
|
||||
<button class=material-button id="Syllabi"> Past Syllabi </button>
|
||||
<button class=material-button id="saveCourse" value="add" style="background: #F44336;"> Save Course +</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -41,9 +42,8 @@ class Template {
|
||||
static extension_button() {
|
||||
return `<td data-th="Plus"><input type="image" class="distButton" id="distButton" width="20" height="20" src='${chrome.extension.getURL('images/disticon.png')}'/></td>`
|
||||
}
|
||||
}
|
||||
|
||||
static Catalog = class Catalog {
|
||||
}
|
||||
Template.Catalog = class {
|
||||
static loading() {
|
||||
return `<div style="text-align:center">
|
||||
<div class="loader" id='loader'></div>
|
||||
@@ -51,13 +51,11 @@ class Template {
|
||||
<h1 id="nextlabel"style="color: #FF9800;display:none;">Loading Courses</h1>
|
||||
<h1 id="retrylabel"style="color: #F44336;display:none;">Failed to Load Courses</h1>
|
||||
<br>
|
||||
<button class=matbut id="retry" style="background: #F44336;display:none;">Retry</button>
|
||||
<button class=material-button id="retry" style="background: #F44336;display:none;">Retry</button>
|
||||
</div>`
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static UTPlanner = class UTPlanner{
|
||||
}
|
||||
Template.UTPlanner = class {
|
||||
static modal(){
|
||||
return `<div class=modal id=myModal>
|
||||
<div class=modal-content>
|
||||
@@ -67,10 +65,10 @@ class Template {
|
||||
<h2 class=title id="title">Computer Fluency (C S 302)</h2>
|
||||
<h2 class=profname id="profname" style="margin-bottom:0px;">with Bruce Porter</h2>
|
||||
<div id="topbuttons" class=topbuttons>
|
||||
<button class=matbut id="moreInfo" style="background: #2196F3;"> More Info </button>
|
||||
<button class=matbut id="textbook" style="background: #FFC107;"> Textbook </button>
|
||||
<button class=matbut id="Syllabi"> Past Syllabi </button>
|
||||
<button class=matbut id="saveCourse" value="add" style="background: #F44336;opacity:.4;"> Unable to Save</button>
|
||||
<button class=material-button id="moreInfo" style="background: #2196F3;"> More Info </button>
|
||||
<button class=material-button id="textbook" style="background: #FFC107;"> Textbook </button>
|
||||
<button class=material-button id="Syllabi"> Past Syllabi </button>
|
||||
<button class=material-button id="saveCourse" value="add" style="background: #F44336;opacity:.4;"> Unable to Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -87,10 +85,8 @@ class Template {
|
||||
</div>
|
||||
</div>`
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static Calendar = class Calendar {
|
||||
}
|
||||
Template.Calendar = class {
|
||||
static line(line) {
|
||||
let {
|
||||
days,
|
||||
@@ -127,9 +123,8 @@ class Template {
|
||||
</div>
|
||||
</div>`
|
||||
}
|
||||
}
|
||||
|
||||
static Popup = class Popup {
|
||||
}
|
||||
Template.Popup = class {
|
||||
static list_item(i, list_tile_color, unique, department, number, profname, list_sub_color, line) {
|
||||
return `<li id='${i}' class='course_list_item'>
|
||||
<div class='card course_list_card'>
|
||||
@@ -174,21 +169,17 @@ class Template {
|
||||
</span>
|
||||
<br>`
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static Import = class Import {
|
||||
}
|
||||
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='matbut' id='import' style='margin:15px 0px;'>${this.button_text_default}</button><br>`;
|
||||
return `<button class='material-button' id='import' style='margin:15px 0px;'>${this.button_text_default}</button><br>`;
|
||||
}
|
||||
|
||||
static waitlist_import_button() {
|
||||
return `<button class='matbut' id='import_waitlist' style='margin:0px'>${this.waitlist_button_text_default}</button><br>`;
|
||||
return `<button class='material-button' id='import_waitlist' style='margin:0px'>${this.waitlist_button_text_default}</button><br>`;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
59
js/config.js
59
js/config.js
@@ -1,52 +1,48 @@
|
||||
class Timing {
|
||||
static fade_time = 100;
|
||||
static calendar_fade_time = 100;
|
||||
static button_delay = 75;
|
||||
}
|
||||
class Timing{}
|
||||
Timing.fade_time = 100;
|
||||
Timing.calendar_fade_time = 100;
|
||||
Timing.button_delay = 75;
|
||||
|
||||
|
||||
class Colors {
|
||||
static material_colors = ['#4CAF50', '#CDDC39',
|
||||
class Colors{}
|
||||
Colors.material_colors = ['#4CAF50', '#CDDC39',
|
||||
'#FFC107', '#2196F3', '#F57C00', '#9C27B0', '#FF5722', '#673AB7',
|
||||
'#FF5252', '#E91E63', '#009688', '#00BCD4',
|
||||
'#4E342E', '#424242', '#9E9E9E'
|
||||
];
|
||||
static open = "#4CAF50";
|
||||
static waitlisted = "#FF9800";
|
||||
static closed = "#FF5722";
|
||||
static no_status = "#607D8B";
|
||||
];
|
||||
Colors.open = "#4CAF50";
|
||||
Colors.waitlisted = "#FF9800";
|
||||
Colors.closed = "#FF5722";
|
||||
Colors.no_status = "#607D8B";
|
||||
|
||||
|
||||
static open_light = "#C8E6C9";
|
||||
static waitlisted_light = "#FFE0B2";
|
||||
static closed_light = "#FFCCBC";
|
||||
static no_status_light = "#CFD8DC";
|
||||
Colors.open_light = "#C8E6C9";
|
||||
Colors.waitlisted_light = "#FFE0B2";
|
||||
Colors.closed_light = "#FFCCBC";
|
||||
Colors.no_status_light = "#CFD8DC";
|
||||
|
||||
|
||||
static highlight_conflict = "#F44336";
|
||||
static highlight_default = "#333333";
|
||||
static highlight_saved = "#4CAF50";
|
||||
Colors.highlight_conflict = "#F44336";
|
||||
Colors.highlight_default = "#333333";
|
||||
Colors.highlight_saved = "#4CAF50";
|
||||
|
||||
static badge_flash = "#FF5722";
|
||||
static badge_default = "#bf5700";
|
||||
}
|
||||
Colors.badge_flash = "#FF5722";
|
||||
Colors.badge_default = "#bf5700";
|
||||
|
||||
class Export {
|
||||
static png_options = {
|
||||
|
||||
class Export{}
|
||||
Export.png_options = {
|
||||
foreignObjectRendering: true,
|
||||
logging: true,
|
||||
removeContainer: true,
|
||||
async: true,
|
||||
}
|
||||
}
|
||||
|
||||
class Popup {
|
||||
static num_semesters = 2;
|
||||
}
|
||||
class Popup {}
|
||||
Popup.num_semesters = 2;
|
||||
|
||||
|
||||
class Text {
|
||||
static emptyText() {
|
||||
class Text{}
|
||||
Text.emptyText = function(){
|
||||
let arr = ["Doesn't Look Like Anything To Me.", "You Can't Fail Classes You're Not In.", "Pro-Tip: Don't Take O-Chem.",
|
||||
"No Work Happens On PCL 5th Floor.", "Sophomore But Freshman By Credit.", "Pain is temporary, GPA is forever.",
|
||||
"You've Yee'd Your Last Haw.", "lol everything is already waitlisted.", "At Least You're Not At A&M.",
|
||||
@@ -57,5 +53,4 @@ class Text {
|
||||
let index = Math.floor(Math.random() * arr.length);
|
||||
|
||||
return arr[index];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
<div>
|
||||
<h2 style="padding: 5px 16px 5px 16px; font-weight: normal;display: inline-block;text-align:left;">Conflict
|
||||
Highlighting</h2>
|
||||
<button id="togglecourseConflictHighlight" class="matbut"
|
||||
<button id="togglecourseConflictHighlight" class="material-button"
|
||||
style="float:right; display:inline-block;font-size:medium;background:#F44336;">Turn
|
||||
Off</button>
|
||||
<h2 style="padding: 5px 16px 16px 16px; font-weight: normal;display: inline-block;text-align:left;">Scroll To
|
||||
Load More Courses</h2>
|
||||
<button id="toggleloadAll" class="matbut"
|
||||
<button id="toggleloadAll" class="material-button"
|
||||
style="float: right;display:inline-block;font-size:medium;background:#F44336;">Turn
|
||||
Off</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user