1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-16 03:34:33 +02:00

Fix issue processwire/processwire-issues#763 for ProcessRole, plus this commit also contains some minor tweaks to ProcessPageLister

This commit is contained in:
Ryan Cramer
2018-12-14 09:03:23 -05:00
parent c1b9349a7c
commit 05fd707b9c
4 changed files with 7 additions and 148 deletions

View File

@@ -1,144 +1 @@
#ProcessLister {
margin-top: -2px; }
#ProcessListerResultsTab {
padding-top: 0.5em; }
#ProcessListerResults > form.InputfieldForm {
margin-bottom: 0; }
#ProcessListerResults #ProcessListerTable {
clear: both;
overflow-x: auto; }
#ProcessListerResults #ProcessListerTable > div {
margin-top: 0; }
#ProcessListerResults #ProcessListerTable table.ProcessListerTable {
clear: both;
position: relative;
margin-top: 0; }
#ProcessListerResults #ProcessListerTable table.ProcessListerTable td table {
width: 100%; }
#ProcessListerResults #ProcessListerTable table.ProcessListerTable > thead th {
font-size: 0.857142857142857em; }
#ProcessListerResults #ProcessListerTable table.ProcessListerTable > thead th i {
font-size: 14px; }
#ProcessListerResults #ProcessListerTable table.ProcessListerTable > thead th strong {
white-space: nowrap; }
#ProcessListerResults #ProcessListerTable table.ProcessListerTable > thead th b,
#ProcessListerResults #ProcessListerTable table.ProcessListerTable > thead .th b {
display: none; }
#ProcessListerResults #ProcessListerTable table.ProcessListerTable > thead th:first-child {
padding-left: 0;
/* reno */ }
#ProcessListerResults #ProcessListerTable table.ProcessListerTable > tbody > tr > td {
font-size: 0.928571428571429em; }
#ProcessListerResults #ProcessListerTable table.ProcessListerTable > tbody > tr > td:first-child, #ProcessListerResults #ProcessListerTable table.ProcessListerTable > tbody > tr > td:first-child > a {
padding-left: 0;
/* reno */ }
#ProcessListerResults #ProcessListerTable table.ProcessListerTable > tbody > tr > td ul.MarkupFieldtype {
margin: 0;
padding-left: 0; }
#ProcessListerResults #ProcessListerTable table.ProcessListerTable > tbody > tr > td ul.MarkupFieldtype > li {
list-style: none;
margin: 0;
padding-left: 0; }
#ProcessListerResults #ProcessListerTable table.ProcessListerTable > tbody > tr > td ul.MarkupFieldtype > li + li {
border-top: 1px solid #eee; }
#ProcessListerResults #ProcessListerTable table.ProcessListerTable > tbody > tr > td > *:first-child, #ProcessListerResults #ProcessListerTable table.ProcessListerTable > tbody > tr > td .col_preview > *:first-child {
margin-top: 0; }
#ProcessListerResults #ProcessListerTable table.ProcessListerTable > tbody > tr > td > *:last-child, #ProcessListerResults #ProcessListerTable table.ProcessListerTable > tbody > tr > td .col_preview > *:last-child {
margin-bottom: 0; }
#ProcessListerResults .PageListerActions {
display: none;
line-height: 1.3em;
text-transform: lowercase; }
#ProcessListerResults .PageListerActions a.PageExtra {
margin-bottom: 3px; }
#ProcessListerResults .PageListerActions a.PageExtras i {
margin-left: 3px;
margin-right: 2px; }
#ProcessListerResults .PageListerActions a.PageExtras.open i {
margin-left: 2px;
margin-right: 3px; }
#ProcessListerResults .row_message {
display: inline; }
#ProcessListerResults .PageListStatusUnpublished {
text-decoration: line-through;
opacity: 0.5; }
#ProcessListerResults .PageListStatusHidden {
opacity: 0.5; }
#ProcessListerResults .MarkupPagerNav {
float: right; }
#ProcessListerResults .nobr {
white-space: nowrap; }
#ProcessListerResults table + .MarkupPagerNav {
margin: 0; }
#ProcessListerResults .datetime {
white-space: nowrap; }
#ProcessListerResults td:not(.col_editing) .InputfieldHasFileList .InputfieldHeader {
display: none; }
#ProcessListerResults td:not(.col_editing) .InputfieldHasFileList .InputfieldContent {
padding: 5px;
border: none;
margin-top: 5px;
margin-bottom: 5px; }
@media only screen and (max-width: 767px) {
#ProcessListerResults table.ProcessListerTable + .MarkupPagerNav {
margin-bottom: 1em; }
#ProcessListerResults .MarkupPagerNav {
float: none; } }
.AdminDataTable p {
margin: 1em 0; }
#ProcessListerResults + a button {
float: left;
margin-right: 0;
margin-top: 0; }
#ProcessListerSpinner {
margin-left: 0.5em;
font-size: 20px;
position: relative; }
#ProcessListerSpinner i {
position: absolute;
top: -15px;
left: 0; }
.pw-content .lister_headline,
#content .lister_headline {
float: left;
margin-top: 1em; }
@media only screen and (max-width: 767px) {
.pw-content .lister_headline,
#content .lister_headline {
float: none;
clear: both; } }
#lister_open_cnt {
display: none; }
#filters_spinner {
float: right;
margin-top: 4px; }
#ProcessListerRefreshTab {
float: right; }
#ProcessListerSelector {
display: inline-block; }
p.version {
clear: both; }
#ProcessListerScript {
display: none; }
#table_bookmarks {
margin-top: 0.5em; }
.AdminThemeReno a.lister-lightbox {
padding: 0 !important; }
.AdminThemeReno a.lister-lightbox img {
margin: 0 !important; }
.AdminThemeReno #content .lister_headline {
margin-top: 0.5em; }
#ProcessLister{margin-top:-2px}#ProcessListerResultsTab{padding-top:.5em}#ProcessListerResults>form.InputfieldForm{margin-bottom:0}#ProcessListerResults #ProcessListerTable{clear:both;overflow-x:auto}#ProcessListerResults #ProcessListerTable>div{margin-top:0}#ProcessListerResults #ProcessListerTable table.ProcessListerTable{clear:both;position:relative;margin-top:0}#ProcessListerResults #ProcessListerTable table.ProcessListerTable td table{width:100%}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>thead th{font-size:.8571428571em}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>thead th i{font-size:14px}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>thead th strong{white-space:nowrap}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>thead th b,#ProcessListerResults #ProcessListerTable table.ProcessListerTable>thead .th b{display:none}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>thead th:first-child{padding-left:0}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td{font-size:.9285714286em}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td:first-child,#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td:first-child>a{padding-left:0}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td ul.MarkupFieldtype{margin:0;padding-left:0}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td ul.MarkupFieldtype>li{list-style:none;margin:0;padding-left:0}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td ul.MarkupFieldtype>li+li{border-top:1px solid #eee}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td>*:first-child,#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td .col_preview>*:first-child{margin-top:0}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td>*:last-child,#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td .col_preview>*:last-child{margin-bottom:0}#ProcessListerResults .PageListerActions{display:none;line-height:1.3em;text-transform:lowercase}#ProcessListerResults .PageListerActions a.PageExtra{margin-bottom:3px}#ProcessListerResults .PageListerActions a.PageExtras i{margin-left:3px;margin-right:2px}#ProcessListerResults .PageListerActions a.PageExtras.open i{margin-left:2px;margin-right:3px}#ProcessListerResults .row_message{display:inline}#ProcessListerResults .PageListStatusUnpublished{text-decoration:line-through;opacity:.5}#ProcessListerResults .PageListStatusHidden{opacity:.5}#ProcessListerResults .MarkupPagerNav{float:right}#ProcessListerResults .nobr{white-space:nowrap}#ProcessListerResults table+.MarkupPagerNav{margin:0}#ProcessListerResults .datetime{white-space:nowrap}#ProcessListerResults td:not(.col_editing) .InputfieldHasFileList .InputfieldHeader{display:none}#ProcessListerResults td:not(.col_editing) .InputfieldHasFileList .InputfieldContent{padding:5px;border:none;margin-top:5px;margin-bottom:5px}@media only screen and (max-width: 767px){#ProcessListerResults table.ProcessListerTable+.MarkupPagerNav{margin-bottom:1em}#ProcessListerResults .MarkupPagerNav{float:none}}.AdminDataTable p{margin:1em 0}#ProcessListerResults+a button{float:left;margin-right:0;margin-top:0}#ProcessListerSpinner{margin-left:.5em;font-size:20px;position:relative}#ProcessListerSpinner i{position:absolute;top:-15px;left:0}.pw-content .lister_headline,#content .lister_headline{float:left;margin-top:1em}@media only screen and (max-width: 767px){.pw-content .lister_headline,#content .lister_headline{float:none;clear:both}}#lister_open_cnt{display:none}#filters_spinner{float:right;margin-top:4px}#ProcessListerRefreshTab{float:right}#ProcessListerSelector{display:inline-block}p.version{clear:both;padding-top:1em}#ProcessListerScript{display:none}#table_bookmarks{margin-top:.5em}.AdminThemeReno a.lister-lightbox{padding:0 !important}.AdminThemeReno a.lister-lightbox img{margin:0 !important}.AdminThemeReno #content .lister_headline{margin-top:.5em}

View File

@@ -1535,6 +1535,7 @@ class ProcessPageLister extends Process implements ConfigurableModule {
if(is_null($pageListRender)) {
require_once($this->wire('config')->paths->ProcessPageList . 'ProcessPageListRenderJSON.php');
$pageListRender = $this->wire(new ProcessPageListRenderJSON($this->wire('page'), $this->wire('pages')->newPageArray()));
$pageListRender->setUseTrash($this->wire('user')->isSuperuser());
}
$actions = $pageListRender->getPageActions($p);
@@ -1830,7 +1831,8 @@ class ProcessPageLister extends Process implements ConfigurableModule {
$btn->href = $this->addURL . $action;
$btn->showInHeader();
$btn->icon = 'plus-circle';
$out = str_replace("<a ", "<a class='$btnClass' ", $btn->render());
$btn->aclass = $btnClass;
$out = $btn->render();
if($this->editMode == self::windowModeBlank) $out = str_replace("<a " ,"<a target='_blank' ", $out);
}

View File

@@ -204,7 +204,7 @@
p.version {
clear: both;
//padding-top: 1em;
padding-top: 1em;
}
#ProcessListerScript {

View File

@@ -469,11 +469,11 @@ class ProcessRole extends ProcessPageType {
if($permission->name == 'page-view' && $this->guestRole->hasPermission('page-view', $template)) {
$checked = true;
$disabled = true;
$note = $this->_('(inherited from guest role)');
$note = $this->_('(required because inherited from guest role)');
}
$checked = $checked ? 'checked' : '';
$disabled = $disabled ? 'disabled' : '';
$disabled = $disabled ? 'onclick="return false"' : '';
$class = "template-permission template{$template->id}-permission$permission->id";
// note: pt=permission+template, tp=template+permission