Skip to content

Commit

Permalink
Issues #729, #730
Browse files Browse the repository at this point in the history
  • Loading branch information
drfho authored and dataflake committed Nov 8, 2019
1 parent aa407ff commit 0fb1d17
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ pip-selfcheck.json
Pipfile
Pipfile.lock
pyvenv.cfg
.vscode
2 changes: 1 addition & 1 deletion src/OFS/dtml/access.dtml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

<dtml-with "_.namespace(valid_roles=roles)">
<form action="manage_changePermissions" method="post">
<table class="table table-hover table-bordered">
<table id="table-permissions" class="table table-hover table-bordered table-responsive-sm">
<thead>
<tr>
<th scope="col" colspan="2" class="zmi-table-head-permisions">
Expand Down
38 changes: 33 additions & 5 deletions src/zmi/styles/resources/zmi_base.css
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ a:hover {
margin-top:1.75rem
}
.zmi-controls > * {
X-margin-right:.5rem;
margin-bottom:.6rem;
X-min-width: 7em;
}

.zmi .zmi-controls .btn.btn-primary,
Expand All @@ -114,7 +112,6 @@ a:hover {
background-color:white !important;
color:#6c757d;
border-color:#6c757d;
X-min-width: 7em;
}
.zmi-controls .btn.btn-primary:hover,
input.btn.btn-primary:hover {
Expand Down Expand Up @@ -382,7 +379,7 @@ form.zmi-upload {
width: 110px;
overflow: hidden;
display: inline-block;
text-align: center;
text-align: center;
}

@media (max-width: 768px) {
Expand Down Expand Up @@ -417,6 +414,37 @@ form.zmi-upload {
padding: 5px 0px 5px 20px;
}
}

/* USER PERMISSIONS TABLE: SIZE CONTROL */
.zmi #table-permissions.compress th.blank > div > span {
width: 110px;
overflow: hidden;
display: inline-block;
}
.zmi #table-permissions.compress .zmi-table-head th {
border:none;
}
.zmi #table-permissions.compress th.zmi-table-head-roles {
border-right-color:white !important;
}
.zmi #table-permissions.compress .zmi-table-head th.zmi-rolename {
height:95px;
white-space: nowrap;
}
.zmi #table-permissions.compress .zmi-table-head th.zmi-rolename > div,
.zmi #table-permissions.compress .zmi-table-head th.blank > div {
transform: translate(0px,63px) rotate(-60deg);
padding: 0;
max-width: 20px;
font-weight: normal;
cursor: default;
}
.zmi #table-permissions.compress .zmi-table-head th.zmi-rolename > div > span,
.zmi #table-permissions.compress .zmi-table-head th.blank > div > span {
border-top: 1px solid #ccc;
padding: 5px 0px 5px 20px;
}

.zmi .table-striped tbody tr:nth-of-type(odd) {
background-color: #e3e8ed33;
}
Expand Down Expand Up @@ -617,7 +645,6 @@ div#menu_tree i.icon.icon-collapse-alt:focus {
overflow: hidden;
text-overflow: ellipsis;
}

/* CUSTOM ICON: Folder (Ordered) */
.far.fa-folder.zmi-icon-folder-ordered {
background-image: url('data:image/svg+xml;utf8,<svg width="220.21" height="134.06" version="1.1" viewBox="0 0 220.21 134.06" xmlns="http://www.w3.org/2000/svg"><path d="m150.11 0h46.059c21.382 0 32.09 25.851 16.971 40.971l-86.059 86.059c-9.373 9.373-24.568 9.373-33.941 0l-86.059-86.059c-15.119-15.119-4.411-40.971 16.971-40.971h46.058z" fill="black"/></svg>');
Expand All @@ -626,6 +653,7 @@ div#menu_tree i.icon.icon-collapse-alt:focus {
background-repeat: no-repeat;
}


/* HEADER BAR */
header.navbar {
background: black;
Expand Down
12 changes: 12 additions & 0 deletions src/zmi/styles/resources/zmi_base.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,4 +226,16 @@ $(function() {
})
}

// COMPRESS USER PERMISSIONS TABLE SIZE
if ($('body.zmi-manage_access').length !== 0) {
function resize_permissions_table() {
if ( $('#table-permissions').width() > $(window).width() ) {
$('#table-permissions').addClass('compress');
}
}
resize_permissions_table();
$(window).resize(function() {
resize_permissions_table();
})
}
});

0 comments on commit 0fb1d17

Please sign in to comment.