Skip to content
Open
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
6 changes: 4 additions & 2 deletions core/functions/actions/mutate_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -516,11 +516,13 @@ function getTVDisplayFormat($name, $value, $format, $paramstring = "", $tvtype =
$grd->cssClass = $params['tblc'];
$grd->itemClass = $params['itmc'];
$grd->altItemClass = $params['aitmc'];
$grd->pagerClass = $params['pclass'];

$grd->columnHeaderStyle = $params['chdrs'];
$grd->cssStyle = $params['tbls'];
$grd->itemStyle = $params['itms'];
$grd->altItemStyle = $params['aitms'];
$grd->pagerStyle = $params['pstyle'];

$grd->columns = $params['cols'];
$grd->fields = $params['flds'];
Expand All @@ -533,10 +535,10 @@ function getTVDisplayFormat($name, $value, $format, $paramstring = "", $tvtype =
$grd->cellSpacing = $params['cspace'];
$grd->header = $params['head'];
$grd->footer = $params['foot'];

$grd->pageSize = $params['psize'];
$grd->pagerLocation = $params['ploc'];
$grd->pagerClass = $params['pclass'];
$grd->pagerStyle = $params['pstyle'];

$o = $grd->render();
break;

Expand Down
8 changes: 5 additions & 3 deletions core/functions/tv.php
Original file line number Diff line number Diff line change
Expand Up @@ -476,15 +476,17 @@ function getTVDisplayFormat($name, $value, $format, $paramstring = '', $tvtype =

$grd->noRecordMsg = $params['egmsg'];

$grd->columnHeaderClass = $params['chdrc'];
$grd->cssClass = $params['tblc'];
$grd->columnHeaderClass = $params['chdrc'];
$grd->itemClass = $params['itmc'];
$grd->altItemClass = $params['aitmc'];
$grd->pagerClass = $params['pclass'];

$grd->columnHeaderStyle = $params['chdrs'];
$grd->cssStyle = $params['tbls'];
$grd->itemStyle = $params['itms'];
$grd->altItemStyle = $params['aitms'];
$grd->pagerStyle = $params['pstyle'];

$grd->columns = $params['cols'];
$grd->fields = $params['flds'];
Expand All @@ -497,10 +499,10 @@ function getTVDisplayFormat($name, $value, $format, $paramstring = '', $tvtype =
$grd->cellSpacing = $params['cspace'];
$grd->header = $params['head'];
$grd->footer = $params['foot'];

$grd->pageSize = $params['psize'];
$grd->pagerLocation = $params['ploc'];
$grd->pagerClass = $params['pclass'];
$grd->pagerStyle = $params['pstyle'];

$o = $grd->render();
break;

Expand Down
18 changes: 12 additions & 6 deletions core/src/Controllers/ManagerLog.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php namespace EvolutionCMS\Controllers;
<?php
namespace EvolutionCMS\Controllers;

use EvolutionCMS\Interfaces\ManagerTheme;

Expand Down Expand Up @@ -135,18 +136,23 @@ protected function getItems()
// set page size to 0 t show all items
$grd = new \EvolutionCMS\Support\DataGrid('', $items, $this->amount);

$grd->pagerClass = '';
$grd->pagerStyle = 'white-space: normal;';
$grd->pageClass = 'page-item';
$grd->selPageClass = 'page-item active';

$grd->noRecordMsg = $this->managerTheme->getLexicon('no_records_found');

$grd->cssClass = 'table data nowrap';
$grd->columnHeaderClass = 'tableHeader';
$grd->itemClass = 'tableItem overflow-hidden';
$grd->altItemClass = 'tableAltItem';
$grd->pagerClass = '';
$grd->pageClass = 'page-item';
$grd->selPageClass = 'page-item active';

$grd->pagerStyle = 'white-space: normal;';

$grd->fields = 'username,action,itemid,itemname,timestamp,ip,useragent';

// $grd->pageSize = $this->amount;
$grd->pagerLocation = 'both-left';

$columns = [
[ // username
'width' => '1%',
Expand Down
13 changes: 12 additions & 1 deletion manager/actions/mutate_module.dynamic.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,15 +374,26 @@ class="form-control" onchange="documentDirty=true;"/>
->where('site_module_depobj.module', $id)
->orderBy('site_module_depobj.type')
->orderBy('name');
$grd = new \EvolutionCMS\Support\DataGrid('', $depobj, 0); // set page size to 0 t show all items

// set page size to 0 to show all items
$grd = new \EvolutionCMS\Support\DataGrid('', $depobj, 0);

$grd->noRecordMsg = $_lang['no_records_found'];
$grd->prepareResult = ['type' => [10 => 'Chunk', 20 => 'Document', 30 => 'Plugin', 40 => 'Snippet', 50 => 'Template', 60 => 'TV']];

$grd->cssClass = 'grid';
$grd->columnHeaderClass = 'gridHeader';
$grd->itemClass = 'gridItem';
$grd->altItemClass = 'gridAltItem';

$grd->pagerStyle = 'white-space: normal;';

$grd->columns = $_lang['element_name'] . " ," . $_lang['type'];
$grd->fields = "name,type";

// $grd->pageSize = 0;
$grd->pagerLocation = 'both-left';

echo $grd->render();
?>
</div>
Expand Down
15 changes: 13 additions & 2 deletions manager/actions/mutate_module_resources.dynamic.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,16 +230,27 @@ function openSelector(resource, mode, callback, w, h) {
->where('site_module_depobj.module', $id)
->orderBy('site_module_depobj.type')
->orderBy('name');
$grd = new \EvolutionCMS\Support\DataGrid('', $depobj, 0); // set page size to 0 t show all items

// set page size to 0 to show all items
$grd = new \EvolutionCMS\Support\DataGrid('', $depobj, 0);

$grd->noRecordMsg = $_lang["no_records_found"];
$grd->prepareResult = ['type' => [10 => 'Chunk', 20 => 'Document', 30 => 'Plugin', 40 => 'Snippet', 50 => 'Template', 60 => 'TV']];

$grd->cssClass = "grid";
$grd->columnHeaderClass = "gridHeader";
$grd->itemClass = "gridItem";
$grd->altItemClass = "gridAltItem";

$grd->pagerStyle = 'white-space: normal;';

$grd->columns = $_lang["element_name"] . " ," . $_lang["type"];
$grd->colTypes = "template:<input type='checkbox' name='depid[]' value='[+id+]'> [+value+]";
$grd->fields = "name,type";
$grd->colTypes = "template:<input type='checkbox' name='depid[]' value='[+id+]'> [+value+]";

// $grd->pageSize = 0;
$grd->pagerLocation = 'both-left';

echo $grd->render();
?>
</td>
Expand Down
15 changes: 13 additions & 2 deletions manager/actions/resource_selector.static.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,19 +190,30 @@ function setCheckbox(chk)
<div class="row">
<div class="table-responsive">
<?php
$grd = new \EvolutionCMS\Support\DataGrid('', $ds, 0); // set page size to 0 t show all items
// set page size to 0 to show all items
$grd = new \EvolutionCMS\Support\DataGrid('', $ds, 0);

$grd->noRecordMsg = $_lang["no_records_found"];

$grd->cssClass = "table data nowrap";
$grd->columnHeaderClass = "tableHeader";
$grd->itemClass = "tableItem";
$grd->altItemClass = "tableAltItem";

$grd->pagerStyle = 'white-space: normal;';

$grd->columns = $_lang["name"] . " ," . $_lang["description"];
$grd->fields = $rt == 'tpl' ? 'templatename,description' : 'name,description';
$grd->colTypes = "template:<input type='" . ($sm == 'm' ? 'checkbox' : 'radio') . "' name='id[]' value='[+id+]' onclick='setCheckbox(this);'> [+e.value+]||template:[+e.value+]";
$grd->colWidths = "45%";
$grd->fields = $rt == 'tpl' ? 'templatename,description' : 'name,description';

// $grd->pageSize = 0;
$grd->pagerLocation = 'both-left';

if ($_REQUEST['listmode'] == '1') {
$grd->pageSize = 0;
}

echo $grd->render();
?>
</div>
Expand Down
29 changes: 21 additions & 8 deletions manager/views/page/eventlog.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@
$cm = new \EvolutionCMS\Support\ContextMenu('cntxm', 150);
$cm->addItem(ManagerTheme::getLexicon('view_log'), 'js:menuAction(1)', $_style['icon_eye']);
//$cm->addSeparator();
$cm->addItem(ManagerTheme::getLexicon('delete'), 'js:menuAction(2)', $_style['icon_trash'], !$modx->hasPermission('delete_eventlog') ? 1 : 0);
$cm->addItem(
ManagerTheme::getLexicon('delete'),
'js:menuAction(2)',
$_style['icon_trash'],
!$modx->hasPermission('delete_eventlog') ? 1 : 0,
);
$contextmenu = $cm->render();
@endphp
@push('scripts.top')
Expand Down Expand Up @@ -157,29 +162,37 @@ class="{{ $_style['icon_table'] }}"></i></a>
});
}
}

$grd = new \EvolutionCMS\Support\DataGrid('', $eventLog, 100); // set page size to 0 t show all items
$grd->pagerClass = '';
$grd->pagerStyle = 'white-space: normal;';
$grd->pageClass = 'page-item';
$grd->selPageClass = 'page-item active';
$grd->prepareResult = ['icon' => [1 => 'text-info ' . $_style['icon_info_circle'], 2 => 'text-warning ' . $_style['icon_info_triangle'], 3 => 'text-danger ' . $_style['icon_cancel']]];

$grd->noRecordMsg = ManagerTheme::getLexicon('no_records_found');
$grd->prepareResult = ['icon' => [1 => 'text-info ' . $_style['icon_info_circle'], 2 => 'text-warning ' . $_style['icon_info_triangle'], 3 => 'text-danger ' . $_style['icon_cancel']]];

$grd->cssClass = 'table data nowrap';
$grd->columnHeaderClass = 'tableHeader';
$grd->itemClass = 'tableItem';
$grd->altItemClass = 'tableAltItem';
$grd->fields = 'type,source,createdon,eventid,username';
$grd->pageClass = 'page-item';
$grd->selPageClass = 'page-item active';

$grd->pagerStyle = 'white-space: normal;';

$grd->columns = ManagerTheme::getLexicon('type') . ' ,' . ManagerTheme::getLexicon('source') . ' ,' . ManagerTheme::getLexicon('date') . ' ,' . ManagerTheme::getLexicon('event_id') . ' ,' . ManagerTheme::getLexicon('sysinfo_userid');
$grd->fields = 'type,source,createdon,eventid,username';
$grd->colWidths = '1%,,1%,1%,1%';
$grd->colAligns = 'center,,,center,center';
$grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . ManagerTheme::getLexicon('click_to_context') . "'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='" . ManagerTheme::getLexicon('click_to_view_details') . "'>[+source+]</a>||date: " . $modx->toDateFormat(null, 'formatOnly') . ' H:i:s';

// $grd->pageSize = 0;
$grd->pagerLocation = 'both-left';

if ($listmode == '1') {
$grd->pageSize = 0;
}
if (get_by_key($_REQUEST, 'op') === 'reset') {
$grd->pageNumber = 1;
}
// render grid

echo $grd->render();
?>
</div>
Expand Down