Skip to content

Commit

Permalink
Merge pull request #1179 from StochSS/develop
Browse files Browse the repository at this point in the history
v2.3.6 Release
  • Loading branch information
jtcooper10 authored Jul 23, 2021
2 parents 398009b + ce40208 commit 8831f1f
Show file tree
Hide file tree
Showing 124 changed files with 3,892 additions and 1,921 deletions.
23 changes: 22 additions & 1 deletion client/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,25 @@ let newWorkflow = (parent, mdlPath, isSpatial, type) => {
});
}

tooltipSetup = () => {
$(function () {
$('[data-toggle="tooltip"]').tooltip();
$('[data-toggle="tooltip"]').on('click ', function () {
$('[data-toggle="tooltip"]').tooltip("hide");
});
});
}

documentSetup = () => {
tooltipSetup();
$(document).on('shown.bs.modal', function (e) {
$('[autofocus]', e.target).focus();
});
$(document).on('hide.bs.modal', '.modal', function (e) {
e.target.remove();
});
}

module.exports = {
routePrefix: routePrefix,
getApiPath: getApiPath,
Expand All @@ -202,7 +221,9 @@ module.exports = {
changeCollapseButtonText: changeCollapseButtonText,
newWorkflow: newWorkflow,
getXHR: getXHR,
postXHR: postXHR
postXHR: postXHR,
tooltipSetup: tooltipSetup,
documentSetup: documentSetup
};


39 changes: 39 additions & 0 deletions client/modals.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,40 @@ let templates = {
</div>
</div>
</div>`
},
presentationLinks : (modalID, title, name, headers, links) => {
return `
<div id=${modalID} class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content info">
<div class="modal-header">
<h5 class="modal-title"> ${title} </h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<h4><u>${headers[0]}</u></h4>
<div>
<a href="${links.presentation}" target="_blank"> View ${name} Presentation</a>
</div>
<hr>
<h4><u>${headers[1]}</u></h4>
<div>
<a href="${links.download}"> Download ${name} Presentation</a>
</div>
<hr>
<h4><u>${headers[2]}</u></h4>
<div>
<a href="${links.open}" target="_blank"> Open ${name} Presentation</a>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary box-shadow close-btn" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>`
}
}

Expand Down Expand Up @@ -541,5 +575,10 @@ module.exports = {
</div>
</div>
</div>`
},
presentationLinks : (title, name, headers, links) => {
let modalID = "presentationLinksModal"

return templates.presentationLinks(modalID, title, name, headers, links);
}
}
Loading

0 comments on commit 8831f1f

Please sign in to comment.