Skip to content

Commit

Permalink
css updates
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanHershey committed Aug 23, 2024
1 parent 7fe3e58 commit d3930d3
Show file tree
Hide file tree
Showing 23 changed files with 268 additions and 209 deletions.
2 changes: 1 addition & 1 deletion app/femr/ui/controllers/FeedbackController.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public Result indexPost() {

if(!viewModel.getFeedbackMsg().equals("")){
userService.createFeedback(viewModel.getFeedbackMsg());
return redirect("/?feedback=received");
return redirect("/");
}

return redirect("/feedback");
Expand Down
2 changes: 1 addition & 1 deletion app/femr/ui/views/admin/index.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
});
</script>

@admin("Admin Panel", currentUser, assets = assets) {
@admin("Admin", currentUser, assets = assets) {
<h3 id="admin_welcome">Welcome, Administrator. Choose an option to get started.</h3>
}
6 changes: 3 additions & 3 deletions app/femr/ui/views/feedback/feedback.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@

@main("Feedback", currentUser, styles = additionalStyles, scripts = additionalScripts, assets = assets) {
<div class="ifContainer">
<h1 id="feedback_header">Give Feedback</h1>
<p class="welcomeMessage" id="feedback_welcome_message">Thanks for choosing to give feedback to fEMR. Please be honest and as thorough as possible to make sure we are able to understand and implement your feedback appropriately. The maximum number of characters allowed per feedback submission is 10000.</p>
<h2 id="feedback_header">Give Feedback</h2>
<p class="welcomeMessage" id="feedback_welcome_message">Thanks for choosing to give feedback to fEMR. Please be honest and as thorough as possible to make sure we are able to understand and implement your feedback appropriately.</p>

@helper.form(action = FeedbackController.indexPost()) {
<textarea name="feedbackMsg" id="usrFeedback" cols="50" rows="10" maxlength="10000" required></textarea>
<textarea class="fTextArea" name="feedbackMsg" id="usrFeedback" cols="50" rows="10" maxlength="10000" required></textarea>
<button type="submit" class="fButton fSubmitButton" id="feedback_submit">Submit</button>
}

Expand Down
127 changes: 63 additions & 64 deletions app/femr/ui/views/home/index.scala.html
Original file line number Diff line number Diff line change
@@ -1,81 +1,80 @@
@(currentUser: femr.common.dtos.CurrentUser, assets: AssetsFinder)
@import femr.ui.views.html.layouts.main

@additionalScripts = {
<script type="text/javascript" src="@assets.path("js/libraries/handlebars.min.js")"></script>
<script type="text/javascript" src="@assets.path("js/libraries/typeahead.bundle.min.js")"></script>
@additionalScripts = {
<script type="text/javascript" src="@assets.path("js/libraries/handlebars.min.js")"></script>
<script type="text/javascript" src="@assets.path("js/libraries/typeahead.bundle.min.js")"></script>

<script>
if (window.location.search.indexOf('feedback=received') > -1) {
$('#feedbackResponse').css({"display":"block"});
setTimeout(function () {
$('#feedbackResponse').show().delay(2000).fadeOut('fast');
}, 2000);
}
</script>
<script>
document.addEventListener('DOMContentLoaded', function(event) {
let languageData;
<script>
if (window.location.search.indexOf('feedback=received') > -1) {
$('#feedbackResponse').css({"display":"block"});
setTimeout(function () {
$('#feedbackResponse').show().delay(2000).fadeOut('fast');
}, 2000);
}
</script>
<script>
document.addEventListener('DOMContentLoaded', function(event) {
let languageData;

// Fetch language data
fetch('@routes.Assets.versioned("json/languages.json")')
.then(response => response.json())
.then(data => {
languageData = data;
updateLanguage("@{currentUser.getLanguageCode}");
// Fetch language data
fetch('@routes.Assets.versioned("json/languages.json")')
.then(response => response.json())
.then(data => {
languageData = data;
updateLanguage("@{currentUser.getLanguageCode}","@{currentUser.getFirstName}");

})
.catch(error => console.error('Error fetching language data:', error));
})
.catch(error => console.error('Error fetching language data:', error));

function updateTextContent(elementId, value) {
const element = document.getElementById(elementId);
if (element) {
element.textContent = value;
} else {
console.error(`Element with ID '${elementId}' not found.`);
}
}
function updateTextContent(elementId, value) {
const element = document.getElementById(elementId);
if (element) {
element.textContent = value;
} else {
console.error(`Element with ID '${elementId}' not found.`);
}
}

function updateLanguage(languageCode, currUser = " Admin!") {
const language = languageCode;
if (languageData && languageData[language]) {
updateTextContent("home_index_h2_Welcome", languageData[language].home_index_h2_Welcome + currUser);
updateTextContent("home_index_p_Please", languageData[language].home_index_p_Please);
updateTextContent("home_index_p_Search", languageData[language].home_index_p_Search);
const patientSearch = document.getElementById("patientSearch");
if (patientSearch) {
patientSearch.placeholder = languageData[language].home_index_div_ID;
} else {
console.error("Element with ID 'patientSearch' not found.");
}
} else {
console.error(`Language data for code '${language}' not found.`);
}
function updateLanguage(languageCode, currUser) {
const language = languageCode;
if (languageData && languageData[language]) {
updateTextContent("home_index_h2_Welcome", languageData[language].home_index_h2_Welcome + " " + currUser + "!");
updateTextContent("home_index_p_Please", languageData[language].home_index_p_Please);
updateTextContent("home_index_p_Search", languageData[language].home_index_p_Search);
const patientSearch = document.getElementById("patientSearch");
if (patientSearch) {
patientSearch.placeholder = languageData[language].home_index_div_ID;
} else {
console.error("Element with ID 'patientSearch' not found.");
}
});

</script>
}
} else {
console.error(`Language data for code '${language}' not found.`);
}
}
});
</script>
}


@top = {
@top = {
<div class="jumbotron">
<div class="container">
<h2 id="home_index_h2_Welcome">Welcome to fEMR 3.0.0, @currentUser.getFirstName!</h2>
@*<p>This is a placeholder landing page. As more features are developed, this page will change over time.</p>*@
<p id="home_index_p_Please">Please select a tab at the top to get started!</p>
<p id="home_index_p_Search">Search Below:</p>
<div id="patientSearchContainer">
<input type="text" class="patientSearch fInput typeahead loading" id="patientSearch" name="patientSearch" placeholder="ID, Name, or Phone #" disabled="disabled"/>
<div class="container">
<h2 id="home_index_h2_Welcome">Welcome to fEMR 3.0.0, @currentUser.getFirstName!</h2>
@*<p>This is a placeholder landing page. As more features are developed, this page will change over time.</p>*@
<p id="home_index_p_Please">Please select a tab at the top to get started!</p>
<p id="home_index_p_Search">Search Below:</p>
<div id="patientSearchContainer">
<input type="text" class="patientSearch fInput typeahead loading" id="patientSearch" name="patientSearch" placeholder="ID, Name, or Phone #" />
</div>
</div>
</div>
</div>
}
}

@main("Home", currentUser, outsideContainerTop = top, scripts = additionalScripts, assets = assets) {
@*<ul>
@for(role <- currentUser.getRoles) {
<li>@role.getName</li>
}
</ul> *@
@*<ul>
@for(role <- currentUser.getRoles) {
<li>@role.getName</li>
}
</ul> *@
}
2 changes: 1 addition & 1 deletion app/femr/ui/views/manager/index.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="@assets.path("css/manager/manager.css")">
}

@main("ManagerTab", currentUser, styles = additionalStyles, assets = assets) {
@main("Manager", currentUser, styles = additionalStyles, assets = assets) {
<script>
document.addEventListener('DOMContentLoaded', function(event) {
let languageData;
Expand Down
2 changes: 1 addition & 1 deletion app/femr/ui/views/medical/index.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
.then(response => response.json())
.then(data => {
languageData = data;
updateLanguage("@{currentUser.getLanguageCode()}");
updateLanguage("@{currentUser.getLanguageCode}");
});

function updateTextContent(elementId, value) {
Expand Down
3 changes: 2 additions & 1 deletion app/femr/ui/views/partials/footer.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@
</div>
</div>
<div class="col-xs-4">
<p class="text-right" id="langCode_googleChrome">Designed for use in Google Chrome</p>
<p class="text-right footerTextRight" id="langCode_googleChrome">Designed for Google Chrome</p>
</div>
</div>
<br/>
</footer>
@*<script>*@
@* document.addEventListener('DOMContentLoaded', function(event) {*@
Expand Down
28 changes: 20 additions & 8 deletions app/femr/ui/views/partials/search.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,38 @@
@page.toLowerCase match {
case "triage" => {
@helper.form(action = SearchController.handleSearch("triage")) {
<input type="text" class="fInput" id = "nameOrIdSearchForm" placeholder="ID, Name, or Phone #" name="patientSearchQuery"/>
<button type="submit" id="searchBtn" class="fButton fRedButton fGlobalSearchButton">Search</button>
<div class="nameOrIdSearchFormWrap">
<label for="nameOrIdSearchForm"></label>
<input type="text" class="fInput" id = "nameOrIdSearchForm" placeholder="ID, Name, or Phone #" name="patientSearchQuery"/>
<button type="submit" id="searchBtn" class="fButton fRedButton fGlobalSearchButton nameOrIdSearchButton">Search</button>
</div>
}
}
case "history" => {
@helper.form(action = SearchController.handleSearch("history")) {
<input type="text" class="fInput" id = "nameOrIdSearchForm" placeholder="ID, Name, or Phone #" name="patientSearchQuery"/>
<button type="submit" id="searchBtn" class="fButton fRedButton fGlobalSearchButton">Search</button>
<div class="nameOrIdSearchFormWrap">
<label for="nameOrIdSearchForm"></label>
<input type="text" class="fInput" id = "nameOrIdSearchForm" placeholder="ID, Name, or Phone #" name="patientSearchQuery"/>
<button type="submit" id="searchBtn" class="fButton fRedButton fGlobalSearchButton nameOrIdSearchButton">Search</button>
</div>
}
}
case "medical" => {
@helper.form(action = SearchController.handleSearch("medical")) {
<input type="text" class="fInput" id = "nameOrIdSearchForm" placeholder="ID, Name, or Phone #" name="patientSearchQuery"/>
<button type="submit" id="searchBtn" class="fButton fRedButton fGlobalSearchButton">Search</button>
<div class="nameOrIdSearchFormWrap">
<label for="nameOrIdSearchForm"></label>
<input type="text" class="fInput" id = "nameOrIdSearchForm" placeholder="ID, Name, or Phone #" name="patientSearchQuery"/>
<button type="submit" id="searchBtn" class="fButton fRedButton fGlobalSearchButton nameOrIdSearchButton">Search</button>
</div>
}
}
case "pharmacy" => {
@helper.form(action = SearchController.handleSearch("pharmacy")) {
<input type="text" class="fInput" id = "nameOrIdSearchForm" placeholder="ID, Name, or Phone #" name="patientSearchQuery"/>
<button type="submit" id="searchBtn" class="fButton fRedButton fGlobalSearchButton">Search</button>
<div class="nameOrIdSearchFormWrap">
<label for="nameOrIdSearchForm"></label>
<input type="text" class="fInput" id = "nameOrIdSearchForm" placeholder="ID, Name, or Phone #" name="patientSearchQuery"/>
<button type="submit" id="searchBtn" class="fButton fRedButton fGlobalSearchButton nameOrIdSearchButton">Search</button>
</div>
}
}
case _ => {
Expand Down
2 changes: 1 addition & 1 deletion app/femr/ui/views/partials/shared/searchBox.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</script>

<div class="searchWrap">
<h2 id="search_box_title">@page Search</h2>
<h2 class="searchTitle" id="search_box_title">@page Search</h2>
@if(patientId > 0) {

<label for="id" class="hidden">Patient ID</label>
Expand Down
2 changes: 1 addition & 1 deletion app/femr/ui/views/partials/triage/inputGender.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@import femr.ui.views.html.partials.triage.inputButton
@inputBlock = {
<div class="generalInfoInput">
<label>Gender <span class="red bold">*</span></label>
<label>Gender</label><span class="red bold">*</span>
<div class="btn-group" id="genderBtns" data-toggle="buttons">
@inputButton("Male", "sex", "maleBtn",
if(viewModel != null) viewModel.getPatient.getSex == "" || viewModel.getPatient.getSex == null else true,
Expand Down
2 changes: 1 addition & 1 deletion app/femr/ui/views/partials/triage/inputText.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<div class="generalInfoInput">
@if(required == true) {
<label for="@forInput">@name <span class="red bold">*</span></label>
<label for="@forInput">@name</label><span class="red bold">*</span>
} else {
<label for="@forInput">@name</label>
}
Expand Down
4 changes: 2 additions & 2 deletions app/femr/ui/views/research/index.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,9 @@
}

</div>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main researchWrap">

<h1 id="research_header" class="page-header">Research</h1>
<h2 id="research_header" class="page-header">Research</h2>

<div class="chart-container">

Expand Down
Loading

0 comments on commit d3930d3

Please sign in to comment.