mida-project / prototype-multi-modality-assistant

[IJHCS] An assistant prototype for breast cancer diagnosis prepared with a multimodality strategy. The work was published in the International Journal of Human-Computer Studies.
https://mida-project.github.io/prototype-multi-modality-assistant
Other
2 stars 1 forks source link

Improving Client Index Generated HTML Tags & Attributes #17

Closed FMCalisto closed 5 years ago

FMCalisto commented 5 years ago

We need to improve the HTML generated tags to be more readable and less extensive. At the moment, several variables are summing the HTML tags. We need to divide each as a variable and, in the end, sum all.

For instance, at the src/client/index.js file, passing from this:

// Add a new tab for this study and switch to it
var studyTab = '<li><div id=complete-tab><a href="#x' + study.patientId + '" data-toggle="tab">' + study.patientId + '</a>' + '<input type="button" class="closeBtn" value="X" />' + '</li></div>';

To a more compact solution, like this:

// Add a new tab for this study and switch to it
var completeTab = '<li><div id=complete-tab><a href="#x';
var dataToggle = '" data-toggle="tab">';
var aTag = '</a>';
var clsBtn = '<input type="button" class="closeBtn" value="X" />';
var fnsTab = '</li></div>';
var stdPatId = study.patientId;
var studyTab = completeTab + stdPatId + dataToggle + stdPatId + aTag + clsBtn + fnsTab;