fix [Add] button in ACL and render it as popup, needs fixing of scrollbars shown

This commit is contained in:
Ralf Becker 2016-02-25 08:42:33 +00:00
parent 0fbd48a0db
commit 91f3671be4
5 changed files with 118 additions and 20 deletions

View File

@ -5,7 +5,7 @@
* @link http://www.egroupware.org * @link http://www.egroupware.org
* @author Ralf Becker <rb@stylite.de> * @author Ralf Becker <rb@stylite.de>
* @package admin * @package admin
* @copyright (c) 2013 by Ralf Becker <rb@stylite.de> * @copyright (c) 2013-16 by Ralf Becker <rb@stylite.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$ * @version $Id$
*/ */
@ -264,7 +264,7 @@ class admin_acl
'location' => 'acl_rights', 'location' => 'acl_rights',
'owner' => $query['account_id'], 'owner' => $query['account_id'],
), array(), true); ), array(), true);
foreach($apps as $appname => $rights) foreach(array_keys($apps) as $appname)
{ {
$rows['sel_options']['filter2'][] = array( $rows['sel_options']['filter2'][] = array(
'value' => $appname, 'value' => $appname,
@ -283,8 +283,8 @@ class admin_acl
* Check if current user has access to ACL setting of a given location * Check if current user has access to ACL setting of a given location
* *
* @param int $account_id numeric account-id * @param int $account_id numeric account-id
* @param int|string $location=null numeric account-id or "run" * @param int|string $location =null numeric account-id or "run"
* @param boolean $throw=true if true, throw an exception if no access, instead of just returning false * @param boolean $throw =true if true, throw an exception if no access, instead of just returning false
* @return boolean true if access is granted, false if notification_bo * @return boolean true if access is granted, false if notification_bo
* @throws egw_exception_no_permission * @throws egw_exception_no_permission
*/ */
@ -330,7 +330,7 @@ class admin_acl
* Checks access and throws an exception, if a change is attempted without proper access * Checks access and throws an exception, if a change is attempted without proper access
* *
* @param string|array $ids "$app:$account:$location" string used as row-id in list * @param string|array $ids "$app:$account:$location" string used as row-id in list
* @param int $rights=null null to delete, or new rights * @param int $rights =null null to delete, or new rights
* @throws egw_exception_no_permission * @throws egw_exception_no_permission
*/ */
public static function ajax_change_acl($ids, $rights=null) public static function ajax_change_acl($ids, $rights=null)
@ -382,10 +382,12 @@ class admin_acl
/** /**
* New index page * New index page
* *
* @param array $content * @param array $_content =null
*/ */
public function index(array $content=null) public function index(array $_content=null)
{ {
unset($_content); // not used, required by function signature
$tpl = new etemplate_new('admin.acl'); $tpl = new etemplate_new('admin.acl');
$content = array(); $content = array();
@ -399,7 +401,6 @@ class admin_acl
$GLOBALS['egw_info']['user']['preferences']['admin']['acl_filter']), $GLOBALS['egw_info']['user']['preferences']['admin']['acl_filter']),
'filter2' => !empty($_GET['acl_app']) ? $_GET['acl_app'] : '', 'filter2' => !empty($_GET['acl_app']) ? $_GET['acl_app'] : '',
'lettersearch' => false, 'lettersearch' => false,
'header_row' => 'admin.acl.add',
'order' => 'acl_appname', 'order' => 'acl_appname',
'sort' => 'ASC', 'sort' => 'ASC',
'row_id' => 'id', 'row_id' => 'id',
@ -418,8 +419,8 @@ class admin_acl
'run' => lang('%1 run rights for applications', $user), 'run' => lang('%1 run rights for applications', $user),
) )
); );
$tpl->exec('admin.admin_acl.index', $content, $sel_options); $tpl->exec('admin.admin_acl.index', $content, $sel_options, array(), array(), 2);
} }
/** /**

View File

@ -3,7 +3,7 @@
<!-- $Id$ --> <!-- $Id$ -->
<overlay> <overlay>
<template id="admin.acl.add" template="" lang="" group="0" version="1.9.001"> <template id="admin.acl.add" template="" lang="" group="0" version="1.9.001">
<buttononly label="Add" id="add" onclick='app.admin.acl({id:"add"},[{id:""}])'/> <buttononly statustext="Add" id="add" onclick='app.admin.acl({id:"add"},[{id:""}])'/>
</template> </template>
<template id="admin.acl.rows" template="" lang="" group="0" version="1.9.001"> <template id="admin.acl.rows" template="" lang="" group="0" version="1.9.001">
<grid width="100%"> <grid width="100%">
@ -61,8 +61,7 @@
</template> </template>
<template id="admin.acl" template="" lang="" group="0" version="1.9.001"> <template id="admin.acl" template="" lang="" group="0" version="1.9.001">
<vbox> <vbox>
<description id="msg" class="message"/> <nextmatch id="nm" template="admin.acl.rows" header_left="admin.acl.add"/>
<nextmatch id="nm" template="admin.acl.rows"/>
<hbox class="dialogFooterToolbar"> <hbox class="dialogFooterToolbar">
<button label="Close" id="cancel" onclick="window.close();"/> <button label="Close" id="cancel" onclick="window.close();"/>
</hbox> </hbox>

View File

@ -50,9 +50,6 @@ td.admin_userAgent span {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
#admin-acl_filter {
max-width: 100% !important;
}
.admin_account_delete > * { .admin_account_delete > * {
padding: 8px; padding: 8px;
} }
@ -94,4 +91,11 @@ td.admin_userAgent span {
*/ */
#admin-passwordreset_actions >:nth-child(2) { #admin-passwordreset_actions >:nth-child(2) {
display: block; display: block;
} }
/**
* ACL popup
*/
#admin-acl_filter {
max-width: 100% !important;
}

View File

@ -11,7 +11,101 @@
* @package addressbook * @package addressbook
* @version $Id$ * @version $Id$
*/ */
@import "../default/app.css"; /**
* EGroupware - CSS Styles used by admin app
*
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package etemplate
* @link http://www.egroupware.org
* @author Ralf Becker <RalfBecker@outdoor-training.de>
* @version $Id: app.css 53026 2015-07-01 18:35:24Z ralfbecker $
*/
.admin_tree table,
.admin_tree tr,
.admin_tree td {
border: none;
}
div#divAppbox {
padding: 0;
}
body {
background-image: none;
background-color: white;
}
/* otherwise it is transparent */
#admin_iframe {
background-color: white;
}
tr.adminAccountInactive .adminStatus {
color: red;
}
.adminOverflowEllipsis {
width: 100%;
white-space: nowrap;
display: block;
overflow: hidden;
text-overflow: ellipsis;
}
img.admin_aclApp {
width: 16px;
}
td.admin_userAgent {
max-width: 200px;
}
td.admin_userAgent span {
display: block;
white-space: nowrap;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
.admin_account_delete > * {
padding: 8px;
}
/* Global Category classes*/
.globalCat_confirmDelete {
position: absolute;
left: 120px;
top: 80px;
background-color: white;
display: none;
border: 2px solid black;
}
.globalCat_hiddenCatid {
display: none;
}
/**
* Custom fields list
*/
#admin-customfields_nm .values {
display: inline-block;
max-height: 13em;
overflow: auto;
}
/* Set a max height for all app type options */
#admin-customfields_admin-customfields-types + table {
max-height: 300px;
overflow: auto;
}
#admin-customfield_edit tr:not([class]) td {
padding: 5px 0px;
}
#admin-customfield_edit .attributes .et2_label,
#admin-customfield_edit .attributes input {
margin-right: 1em;
}
/**
* Bulk password reset
*/
#admin-passwordreset_actions > :nth-child(2) {
display: block;
}
/**
* ACL popup
*/
#admin-acl_filter {
max-width: 100% !important;
}
@media all { @media all {
div.dhtmlxTree td.standartTreeRow span.selectedTreeRow { div.dhtmlxTree td.standartTreeRow span.selectedTreeRow {
background-color: #ffdd73; background-color: #ffdd73;
@ -78,7 +172,7 @@
@media only screen and (max-device-width: 1024px) { @media only screen and (max-device-width: 1024px) {
#admin-index table.egwGridView_outer tbody span[id^="admin-index"][id$='status]'] { #admin-index table.egwGridView_outer tbody span[id^="admin-index"][id$='status]'] {
text-align: right; text-align: right;
font-size: 8pt; font-size: 9pt;
} }
#admin-index table.egwGridView_outer tbody .adminCol2 { #admin-index table.egwGridView_outer tbody .adminCol2 {
float: right; float: right;

View File

@ -15,7 +15,7 @@
@import (reference) "../../../pixelegg/less/definitions.less"; @import (reference) "../../../pixelegg/less/definitions.less";
@import (reference) "../../../pixelegg/less/def_mobile.less"; @import (reference) "../../../pixelegg/less/def_mobile.less";
@import (reference) "../default/app.css"; @import (less) "../default/app.css";
@media all { @media all {