added link to go down DN level
This commit is contained in:
parent
f0cbe217eb
commit
5f62f9aed3
|
@ -1044,13 +1044,15 @@ window.lam.html.showDnSelection = function(fieldId, title, okText, cancelText, t
|
|||
.done(function(jsonData) {
|
||||
jQuery('#dlg_' + fieldId).html(jsonData.dialogData);
|
||||
var buttonList = {};
|
||||
buttonList[cancelText] = function() { jQuery(this).dialog("close"); };
|
||||
buttonList[cancelText] = function() { jQuery(this).dialog("destroy"); };
|
||||
jQuery('#dlg_' + fieldId).dialog({
|
||||
modal: true,
|
||||
title: title,
|
||||
dialogClass: 'defaultBackground',
|
||||
buttons: buttonList,
|
||||
width: 'auto'
|
||||
width: 'auto',
|
||||
maxHeight: 600,
|
||||
position: {my: 'center', at: 'center', of: window}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
@ -1066,7 +1068,7 @@ window.lam.html.selectDn = function(el, fieldId) {
|
|||
var field = jQuery('#' + fieldId);
|
||||
var dn = jQuery(el).parents('.row').data('dn');
|
||||
field.val(dn);
|
||||
jQuery('#dlg_' + fieldId).dialog("close");
|
||||
jQuery('#dlg_' + fieldId).dialog("destroy");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -221,6 +221,9 @@ class Ajax {
|
|||
private function buildDnSelectionHtml($dnList, $currentDn) {
|
||||
$fieldId = trim($_POST['fieldId']);
|
||||
$mainRow = new htmlResponsiveRow();
|
||||
$onclickUp = 'window.lam.html.updateDnSelection(this, \''
|
||||
. htmlspecialchars($fieldId) . '\', \'' . getSecurityTokenName() . '\', \''
|
||||
. getSecurityTokenValue() . '\')';
|
||||
if (!empty($currentDn)) {
|
||||
$row = new htmlResponsiveRow();
|
||||
$row->addDataAttribute('dn', $currentDn);
|
||||
|
@ -236,9 +239,6 @@ class Ajax {
|
|||
$row->add($button, 12, 3);
|
||||
$mainRow->add($row, 12);
|
||||
// back up
|
||||
$onclickUp = 'window.lam.html.updateDnSelection(this, \''
|
||||
. htmlspecialchars($fieldId) . '\', \'' . getSecurityTokenName() . '\', \''
|
||||
. getSecurityTokenValue() . '\')';
|
||||
$row = new htmlResponsiveRow();
|
||||
$row->addDataAttribute('dn', extractDNSuffix($currentDn));
|
||||
$text = new htmlLink('..', '#');
|
||||
|
@ -257,7 +257,9 @@ class Ajax {
|
|||
foreach ($dnList as $dn) {
|
||||
$row = new htmlResponsiveRow();
|
||||
$row->addDataAttribute('dn', $dn);
|
||||
$row->add(new htmlOutputText($dn), 12, 9);
|
||||
$link = new htmlLink($dn, '#');
|
||||
$link->setOnClick($onclickUp);
|
||||
$row->add($link, 12, 9);
|
||||
$row->setCSSClasses(array('text-right'));
|
||||
$buttonId = base64_encode($dn);
|
||||
$buttonId = str_replace('=', '', $buttonId);
|
||||
|
|
Loading…
Reference in New Issue