Skip to content

Commit

Permalink
Fix double slash in modal calls
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelfolaron committed Aug 29, 2024
1 parent 0ad3069 commit a8b0d08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion public/assets/js/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ jQuery(document).ready(function () {

window.addEventListener("HTMX.ShowNotification", function(evt) {
jQuery.get(leantime.appUrl+"/notifications/getLatestGrowl", function(data){
console.log(data);
let notification = JSON.parse(data);
jQuery.growl({
message: notification.notification, style: notification.notificationType
Expand Down
5 changes: 4 additions & 1 deletion public/assets/js/app/core/modals.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ leantime.modals = (function () {
modalOptions.sizes.minH = 1800;
}

//Ensure we have no trailing slash at the end.
var baseUrl = leantime.appUrl.replace(/\/$/, '');

var urlParts = url.split("/");
if(urlParts.length>2 && urlParts[1] !== "tab") {
jQuery.nmManual(leantime.appUrl+"/"+url, modalOptions);
jQuery.nmManual(baseUrl+""+url, modalOptions);
}
}

Expand Down

0 comments on commit a8b0d08

Please sign in to comment.