-
Notifications
You must be signed in to change notification settings - Fork 0
Erratic loads #564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Erratic loads #564
Changes from 9 commits
10eb6f5
49752b7
9aa4384
7ffa2dd
3a209ae
c5d6acd
4bc9de9
ad7ec82
2920a4b
b636a19
7900b37
925fa62
183d21d
726e3b0
d3d6818
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -353,21 +353,28 @@ function clearTextArea() { //makes sure that it empties text areas and p tags wh | |
|
|
||
|
|
||
|
|
||
| function loadOverloadModal(formHistoryID, laborStatusFormID) { | ||
| /* | ||
| This method sends an AJAX call to recieve data used to populate | ||
| the overload modal. | ||
| function loadOverloadModal(formHistoryID) { | ||
| /* | ||
| This method resets the modal content to a loading state to prevent | ||
| displaying stale data, then fetches and renders the new form data. | ||
| */ | ||
|
|
||
| $("#overloadModal").find(".modal-content").html('<div class="modal-body">Loading...</div>'); | ||
| $("#overloadModal").modal("show"); | ||
| $("#overloadModal").find('.modal-content').load('/admin/overloadModal/' + formHistoryID); | ||
| $("#overloadModal").find('.modal-content').load('/admin/overloadModal/' + formHistoryID) ; | ||
|
|
||
| } | ||
|
|
||
|
|
||
| function loadReleaseModal(formHistoryID, laborStatusFormID) { | ||
| $("#modalRelease").modal("show"); | ||
| function loadReleaseModal(formHistoryID) { | ||
| /* | ||
| This method resets the modal content to a loading state to prevent | ||
| displaying stale data, then fetches and renders the new form data. | ||
| */ | ||
| $("#modalRelease").find('.modal-content').html('<div class="modal-body">Loading...</div>'); | ||
|
||
| $("#modalRelease").modal("show"); | ||
| $("#modalRelease").find('.modal-content').load('/admin/releaseModal/' + formHistoryID); | ||
|
|
||
|
|
||
|
|
||
| } | ||
|
|
||
|
|
||
|
|
@@ -604,7 +611,7 @@ function notesCounter(laborStatusFormID, formHistoryID){ | |
| success: function(response) { | ||
| var viewNotesID = '#notes_' + String(formHistoryID) | ||
| var modalViewNotesID = '#modalNote_' + String(formHistoryID) | ||
| $(viewNotesID).html('View Notes (' + response['noteTotal'] + ')') | ||
| $(viewNotesID).html('Notes (' + response['noteTotal'] + ')') | ||
| $(modalViewNotesID).html('View Notes (' + response['noteTotal'] + ')') | ||
| }, | ||
| error: function(request,status,error){ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also curious about the use of the "Loading..." text here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The need for the "Loading..." is because the modal content persists from the last time it was opened. This creates a "flash" of the wrong student's data, followed by a self-correction when it is updated.
Through the way that it is handeld we are creating a buffer that is user-friendly (as it gives visual feedback), at the same time, renders the right information.