|
@@ -50,6 +50,7 @@ $(document).ready(function () {
|
|
|
initPrimaryForm();
|
|
|
initPatientPresenceIndicator();
|
|
|
runMCInitializers();
|
|
|
+ initFileInputs();
|
|
|
|
|
|
// if(typeof initializeCalendar !== 'undefined') {
|
|
|
// initializeCalendar();
|
|
@@ -172,6 +173,7 @@ function onFastLoaded(_data, _href, _history) {
|
|
|
initPrimaryForm();
|
|
|
initPatientPresenceIndicator();
|
|
|
runMCInitializers();
|
|
|
+ initFileInputs();
|
|
|
if (window.top.currentMcUrl.split('?')[0] !== window.top.location.href.split('?')[0]) {
|
|
|
$(window).scrollTop(0);
|
|
|
}
|
|
@@ -382,6 +384,20 @@ function initQuillEdit(_selector = '.note-content[auto-edit]') {
|
|
|
}
|
|
|
|
|
|
var patientPresenceTimer = false;
|
|
|
+function initFileInputs() {
|
|
|
+ $(document)
|
|
|
+ .off('change', 'input[type="file"]')
|
|
|
+ .on('change', 'input[type="file"]', function(_e) {
|
|
|
+ if(_e.target.files && _e.target.files.length) {
|
|
|
+ $(this).attr('selected-file', _e.target.files[0].name);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ $(this).attr('selected-file', 'No file chosen');
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+ $('input[type="file"]').attr('selected-file', 'No file chosen');
|
|
|
+}
|
|
|
function initPatientPresenceIndicator() {
|
|
|
return false;
|
|
|
if (patientPresenceTimer !== false) {
|