This commit is mainly as a result of creating DN entries and improves some backend functions:

* Enable creation of new entries,
* Change all our ajax frames to go through /frames URI instead of /dn,
* Add our frame command to the encrypted DN,
* Automatically redirect to root URL when selecting a tree item and currently in another path (as a result of a prior POST activity),
* Some validation improvements DNExists/HasStructuralObjectClass
This commit is contained in:
2025-02-23 18:14:41 +11:00
parent f08fdb1bcd
commit 996d7bb1dc
27 changed files with 687 additions and 147 deletions

View File

@@ -7,9 +7,12 @@ img.jpegphoto {
/** ensure our userpassword has select is next to the password input */
div#userPassword .select2-container--bootstrap-5 .select2-selection {
font-size: inherit;
border-bottom-right-radius: unset;
border-top-right-radius: unset;
width: 9em;
border: #444054 1px solid;
background-color: #f0f0f0;
}
.input-group:first-child .select2-container--bootstrap-5 .select2-selection {
border-bottom-right-radius: unset;
border-top-right-radius: unset;
}

View File

@@ -303,4 +303,8 @@ div#objectClass .input-group-delete {
bottom: 30px;
right: 10px;
height: 5px;
}
.input-group-text {
background-color: #fafafa;
}

27
public/js/custom.js vendored
View File

@@ -13,32 +13,41 @@ function expandChildren(node) {
function getNode(item) {
$.ajax({
url: '/dn',
url: '/frame',
method: 'POST',
data: { key: item },
dataType: 'html',
beforeSend: function() {
content = $('.main-content').contents();
$('.main-content').empty().append('<div class="fa-3x"><i class="fas fa-spinner fa-pulse"></i></div>');
content = $('.main-content')
.contents();
$('.main-content')
.empty()
.append('<div class="fa-3x"><i class="fas fa-spinner fa-pulse"></i></div>');
}
}).done(function(html) {
$('.main-content').empty().append(html);
$('.main-content')
.empty()
.append(html);
}).fail(function(item) {
switch(item.status) {
}).fail(function(e) {
switch(e.status) {
case 404:
$('.main-content').empty().append(item.responseText);
$('.main-content').empty().append(e.responseText);
break;
case 409:
location.replace('/#'+item);
break;
case 419:
alert('Session has expired, reloading the page and try again...');
location.reload();
break;
case 500:
$('.main-content').empty().append(item.responseText);
$('.main-content').empty().append(e.responseText);
break;
default:
alert(item.status+': Well that didnt work?');
alert('Well that didnt work? Code ['+e.status+']');
}
});
}