diff --git a/public/css/fixes.css b/public/css/fixes.css index 17a4814a..99f14367 100644 --- a/public/css/fixes.css +++ b/public/css/fixes.css @@ -5,7 +5,7 @@ body { */ .logo-src { - background: url('/images/logo-h.png'); + background: url('../images/logo-h.png'); width: 152px !important; } diff --git a/public/js/custom.js b/public/js/custom.js index 5efbf2f8..2b613a45 100644 --- a/public/js/custom.js +++ b/public/js/custom.js @@ -1,3 +1,5 @@ +const current_base_location = (document.getElementsByTagName('base')[0] ? document.getElementsByTagName('base')[0].href : location.origin+'/').replace(/\/*$/, '/'); + function expandChildren(node) { if (node.data.autoExpand && !node.isExpanded()) { node.setExpanded(true); @@ -13,7 +15,7 @@ function expandChildren(node) { function getNode(item) { $.ajax({ - url: '/frame', + url: current_base_location+'frame', method: 'POST', data: { _key: item }, dataType: 'html', @@ -38,9 +40,9 @@ function getNode(item) { break; case 409: // Not in root case 419: // Session Expired - location.replace('/#'+item); + location.replace(current_base_location+'#'+item); // When the session expires, and we are in the tree, we need to force a reload - if (location.pathname === '/') + if (location.pathname.replace(/\/+$/, '') === new URL(current_base_location).pathname.replace(/\/+$/, '')) location.reload(); break; case 500: @@ -59,7 +61,7 @@ $(document).ready(function() { if (typeof basedn !== 'undefined') { sources = basedn; } else { - sources = { method: 'POST', url: '/ajax/bases' }; + sources = { method: 'POST', url: current_base_location + 'ajax/bases' }; } // Attach the fancytree widget to an existing
element @@ -96,7 +98,7 @@ $(document).ready(function() { lazyLoad: function(event,data) { data.result = { method: 'POST', - url: '/ajax/children', + url: current_base_location+'ajax/children', data: {_key: data.node.data.item,create: true} }; @@ -111,4 +113,4 @@ $(document).ready(function() { } } }); -}); \ No newline at end of file +}); diff --git a/resources/js/app.js b/resources/js/app.js index 9b527d1f..50db4fe7 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -11,7 +11,6 @@ import 'jquery.fancytree/dist/modules/jquery.fancytree.filter'; import 'jquery.fancytree/dist/modules/jquery.fancytree.glyph'; import 'jquery.fancytree/dist/modules/jquery.fancytree.persist'; // import 'jquery-ui/dist/jquery-ui'; // USED? -import 'jquery.fancytree/dist/skin-xp/ui.fancytree.css'; // Bootstrap - included in architectui // import 'bootstrap/dist/js/bootstrap.bundle'; diff --git a/resources/themes/architect/views/layouts/partials/htmlheader.blade.php b/resources/themes/architect/views/layouts/partials/htmlheader.blade.php index 43edc577..23674926 100644 --- a/resources/themes/architect/views/layouts/partials/htmlheader.blade.php +++ b/resources/themes/architect/views/layouts/partials/htmlheader.blade.php @@ -10,8 +10,10 @@ + + {{ config('app.name') }} - @yield('htmlheader_title','🥇 An LDAP Administration Tool') - + diff --git a/webpack.mix.js b/webpack.mix.js index ab22fe64..c20d0760 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -18,4 +18,5 @@ mix.js([ 'resources/js/bootstrap3-typeahead.js', 'resources/themes/architect/src/init.js' ],'public/js').extract() + .setResourceRoot("..") .sass('resources/sass/app.scss','public/css');