Commit e5eaeb79 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:sparkles: feat(interface): activate sorting in snapshot list

Snapshot list can now be sorted if needed

issue #5708
Showing with 23 additions and 2 deletions
+23 -2
......@@ -25,8 +25,8 @@
<script src="include/controls.js" type="text/javascript"></script>
<script src="include/pulldown.js" type="text/javascript"></script>
<script src="include/datepicker.js" type="text/javascript"></script>
<script src="include/tsorter.js" type="text/javascript"></script>
{/if}
<script src="include/tsorter.js" type="text/javascript"></script>
{foreach from=$js_files item=file}
<script src="{$file}" type="text/javascript"></script>
{/foreach}
......
......@@ -85,6 +85,27 @@ class SnapshotsAttribute extends OrderedArrayAttribute
$this->setInLdap(FALSE);
}
function setParent (&$plugin)
{
parent::setParent($plugin);
if (is_object($this->plugin)) {
if ($this->plugin->global) {
$this->setHeaders(array(
_('DN'),
_('Date'),
_('Description'),
''
));
} else {
$this->setHeaders(array(
_('Date'),
_('Description'),
''
));
}
}
}
function loadPostValue ()
{
if ($this->isVisible()) {
......@@ -193,10 +214,10 @@ class SnapshotRestoreDialog extends simplePlugin
function __construct ($dn, $parent, $global, $aclCategory)
{
$this->global = $global;
parent::__construct();
$this->object_dn = $dn;
$this->parent = $parent;
$this->global = $global;
$this->aclCategory = $aclCategory;
if ($this->global) {
$this->attributesAccess['object_dn']->setVisible(FALSE);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment