Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/css/fixes.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ body {
*/

.logo-src {
background: url('/images/logo-h.png');
background: url('../images/logo-h.png');
width: 152px !important;
}

Expand Down
14 changes: 8 additions & 6 deletions public/js/custom.js
Original file line number Diff line number Diff line change
@@ -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);
Expand All @@ -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',
Expand All @@ -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:
Expand All @@ -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 <div id="tree"> element
Expand Down Expand Up @@ -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}
};

Expand All @@ -111,4 +113,4 @@ $(document).ready(function() {
}
}
});
});
});
1 change: 0 additions & 1 deletion resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">

<base href="{{ Request::header('X-Forwarded-Prefix', '/') }}"/>

<title>{{ config('app.name') }} - @yield('htmlheader_title','🥇 An LDAP Administration Tool')</title>
<link rel="shortcut icon" href="/{{ config('app.favicon','favicon.png') }}"/>
<link rel="shortcut icon" href="{{ config('app.favicon', asset('/favicon.png')) }}"/>

<!-- App CSS -->
<link rel="stylesheet" href="{{ asset('/css/app.css') }}">
Expand Down
1 change: 1 addition & 0 deletions webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');