* [DEV] Fixed error in pager

* [DEV] Improved form handling
* [DEV] Visual improvements
This commit is contained in:
nuxsmin
2016-10-31 17:24:57 +01:00
parent 4ed57af817
commit 8560915545
18 changed files with 341 additions and 335 deletions

View File

@@ -37,7 +37,7 @@ require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Bas
Request::checkReferer('POST');
if (!Init::isLoggedIn()) {
Util::logout();
Response::printJson(_('La sesión no se ha iniciado o ha caducado'), 10);
}
$sk = \SP\Http\Request::analyze('sk', false);

1
css/styles.min.css vendored

File diff suppressed because one or more lines are too long

View File

@@ -46,7 +46,7 @@ use SP\Mgmt\Users\UserUtil;
class AccItemsController extends GridTabControllerBase implements ActionsInterface
{
/**
* @var int
* @var ItemSearchData
*/
private $SearchData;
@@ -78,7 +78,6 @@ class AccItemsController extends GridTabControllerBase implements ActionsInterfa
$Grid = $this->Grids->getUsersGrid();
$Grid->getData()->setData(UserSearch::getItem()->getMgmtSearch($this->SearchData));
$Grid->updatePager();
$Grid->getPager()->setOnClickArgs($this->SearchData);
$this->view->append('tabs', $Grid);
}
@@ -97,7 +96,6 @@ class AccItemsController extends GridTabControllerBase implements ActionsInterfa
$Grid = $this->Grids->getGroupsGrid();
$Grid->getData()->setData(GroupSearch::getItem()->getMgmtSearch($this->SearchData));
$Grid->updatePager();
$Grid->getPager()->setOnClickArgs($this->SearchData);
$this->view->append('tabs', $Grid);
}
@@ -116,7 +114,6 @@ class AccItemsController extends GridTabControllerBase implements ActionsInterfa
$Grid = $this->Grids->getProfilesGrid();
$Grid->getData()->setData(ProfileSearch::getItem()->getMgmtSearch($this->SearchData));
$Grid->updatePager();
$Grid->getPager()->setOnClickArgs($this->SearchData);
$this->view->append('tabs', $Grid);
}
@@ -135,7 +132,6 @@ class AccItemsController extends GridTabControllerBase implements ActionsInterfa
$Grid = $this->Grids->getTokensGrid();
$Grid->getData()->setData(ApiTokensUtil::getTokensMgmtSearch($this->SearchData));
$Grid->updatePager();
$Grid->getPager()->setOnClickArgs($this->SearchData);
$this->view->append('tabs', $Grid);
}
@@ -154,7 +150,6 @@ class AccItemsController extends GridTabControllerBase implements ActionsInterfa
$Grid = $this->Grids->getPublicLinksGrid();
$Grid->getData()->setData(PublicLinkSearch::getItem()->getMgmtSearch($this->SearchData));
$Grid->updatePager();
$Grid->getPager()->setOnClickArgs($this->SearchData);
$this->view->append('tabs', $Grid);
}

View File

@@ -313,8 +313,6 @@ class AccountSearchController extends ControllerBase implements ActionsInterface
$GridPager->setLimitStart($this->limitStart);
$GridPager->setLimitCount($this->limitCount);
$GridPager->setOnClickFunction('account/sort');
$GridPager->setOnClickArgs($this->sortKey);
$GridPager->setOnClickArgs($this->sortOrder);
$GridPager->setFilterOn($this->filterOn);
$GridPager->setSourceAction(new DataGridActionSearch(self::ACTION_ACC_SEARCH));

View File

@@ -86,7 +86,6 @@ class AppItemsController extends GridTabControllerBase implements ActionsInterfa
$Grid = $this->Grids->getCategoriesGrid();
$Grid->getData()->setData(CategorySearch::getItem()->getMgmtSearch($this->SearchData));
$Grid->updatePager();
$Grid->getPager()->setOnClickArgs($this->SearchData);
$this->view->append('tabs', $Grid);
}
@@ -105,7 +104,6 @@ class AppItemsController extends GridTabControllerBase implements ActionsInterfa
$Grid = $this->Grids->getCustomersGrid();
$Grid->getData()->setData(CustomerSearch::getItem()->getMgmtSearch($this->SearchData));
$Grid->updatePager();
$Grid->getPager()->setOnClickArgs($this->SearchData);
$this->view->append('tabs', $Grid);
}
@@ -142,7 +140,6 @@ class AppItemsController extends GridTabControllerBase implements ActionsInterfa
$Grid = $this->Grids->getCustomFieldsGrid();
$Grid->getData()->setData(CustomFieldDefSearch::getItem()->getMgmtSearch($this->SearchData));
$Grid->updatePager();
$Grid->getPager()->setOnClickArgs($this->SearchData);
$this->view->append('tabs', $Grid);
}
@@ -162,7 +159,6 @@ class AppItemsController extends GridTabControllerBase implements ActionsInterfa
$Grid = $this->Grids->getFilesGrid();
$Grid->getData()->setData(FileSearch::getItem()->getMgmtSearch($this->SearchData));
$Grid->updatePager();
$Grid->getPager()->setOnClickArgs($this->SearchData);
$this->view->append('tabs', $Grid);
}
@@ -181,7 +177,6 @@ class AppItemsController extends GridTabControllerBase implements ActionsInterfa
$Grid = $this->Grids->getAccountsGrid();
$Grid->getData()->setData(AccountUtil::getAccountsMgmtSearch($this->SearchData));
$Grid->updatePager();
$Grid->getPager()->setOnClickArgs($this->SearchData);
$this->view->append('tabs', $Grid);
}
@@ -200,7 +195,6 @@ class AppItemsController extends GridTabControllerBase implements ActionsInterfa
$Grid = $this->Grids->getTagsGrid();
$Grid->getData()->setData(TagSearch::getItem()->getMgmtSearch($this->SearchData));
$Grid->updatePager();
$Grid->getPager()->setOnClickArgs($this->SearchData);
$this->view->append('tabs', $Grid);
}

View File

@@ -54,7 +54,6 @@ abstract class GridItemsSearchController extends ControllerBase
{
$Pager->setLimitStart($SearchData->getLimitStart());
$Pager->setLimitCount($SearchData->getLimitCount());
$Pager->setOnClickArgs($SearchData->getLimitCount());
$Pager->setFilterOn($SearchData->getSeachString() !== '');
}
}

View File

@@ -0,0 +1,84 @@
/* Estilos para mostrar la búsqueda en formato tarjeta */
#content #data-search {
text-align: center
}
#content #data-search .account-label {
width: 310px;
text-align: left;
margin: 1em;
padding: .5em;
color: #696969;
background-color: #fcfcfc;
display: inline-block
}
#content #data-search .account-label .label-field {
width: 100%;
height: 2.5em
}
#content #data-search .account-label .field-name {
float: left;
width: 80px;
padding: .4em .2em;
color: #b9b9b9
}
#content #data-search .account-label .field-text {
float: left;
width: 215px;
padding: .4em .2em
}
#content #data-search .account-label .header .field-name {
color: white;
font-weight: bold
}
#content #data-search .account-label .field-customer .field-name {
display: none
}
#content #data-search .account-label .field-customer .field-text {
width: 304px
}
#content #data-search .account-label .field-url {
height: 3em
}
#content #data-search .account-label .field-text a {
color: #4895fa
}
#content #data-search .account-label .no-link, #content #data-search .account-label .no-link a {
color: white;
font-weight: bold
}
#content #data-search .account-info {
width: 100%;
height: 2em;
padding: .5em 0;
text-align: left
}
#content #data-search .account-actions {
width: 100%;
height: 2.5em;
padding-top: 5px;
text-align: right;
background-color: #f5f5f5;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.075) inset
}
#content .actions-optional {
display: none
}
#content #data-search .account-spacer {
width: 100%;
height: 7.5em
}

View File

@@ -0,0 +1 @@
#content #data-search{text-align:center}#content #data-search .account-label{width:310px;text-align:left;margin:1em;padding:.5em;color:#696969;background-color:#fcfcfc;display:inline-block}#content #data-search .account-label .label-field{width:100%;height:2.5em}#content #data-search .account-label .field-name{float:left;width:80px;padding:.4em .2em;color:#b9b9b9}#content #data-search .account-label .field-text{float:left;width:215px;padding:.4em .2em}#content #data-search .account-label .header .field-name{color:white;font-weight:bold}#content #data-search .account-label .field-customer .field-name{display:none}#content #data-search .account-label .field-customer .field-text{width:304px}#content #data-search .account-label .field-url{height:3em}#content #data-search .account-label .field-text a{color:#4895fa}#content #data-search .account-label .no-link,#content #data-search .account-label .no-link a{color:white;font-weight:bold}#content #data-search .account-info{width:100%;height:2em;padding:.5em 0;text-align:left}#content #data-search .account-actions{width:100%;height:2.5em;padding-top:5px;text-align:right;background-color:#f5f5f5;box-shadow:0 0 8px rgba(0,0,0,0.075) inset}#content .actions-optional{display:none}#content #data-search .account-spacer{width:100%;height:7.5em}

View File

@@ -1,55 +1,123 @@
/* Estilos para mostrar la búsqueda en formato cuadrícula */
#content #data-search .account-info img,
#content #data-search .account-actions img {width: 24px; height: 24px;margin: 0 0.5em;}
#content #data-search .account-actions img {
width: 24px;
height: 24px;
margin: 0 0.5em;
}
#content #data-search {text-align: center; padding: 0.5em 0; width: 100%;margin: 0 auto;}
#content #data-search .account-label{
#content #data-search {
text-align: center;
padding: 0.5em 0;
width: 100%;
height: 70px;
text-align: left;
margin: 0 auto;
margin-bottom: 0.2em;
padding: 0.5em;
}
#content #data-search .account-label {
display: flex;
justify-content: space-between;
width: 100%;
height: 8em;
text-align: left;
margin: 0 auto 0.2em;
color: #696969;
background-color: #fcfcfc;
display: inline-block;
padding: 0 .5em;
}
#content #data-search .account-label .label-row-up,
#content #data-search .account-label .label-row-down {
display: flex;
height: 3em;
width: 100%;
padding: 0.5em 0;
}
#content #data-search .account-label .label-row-down {
height: auto;
}
#content #data-search .account-label .label-left {
display: flex;
flex-wrap: wrap;
align-items: center;
}
#content #data-search .account-label .label-right {
display: flex;
flex-wrap: wrap;
width: 15em;
}
#content #data-search .account-label .label-right > div {
width: 15em;
}
#content #data-search .account-label .label-field {
width: 15em;
height: 3em;
}
#content #data-search .account-label .field-customer {
width: 20em;
}
#content #data-search .account-label .field-name {
padding: 0.3em 0.2em;
color: #b9b9b9;
display: none
}
#content #data-search .account-label .field-text {
width: 14em;
padding: 0.3em 0.3em;
word-wrap: break-word;
}
#content #data-search .account-label .header .field-name {
color: white;
font-weight: bold
}
#content #data-search .account-label .field-text a {
color: #4895FA
}
#content #data-search .account-label .label-field{float: left; width: 18%; height: 3em;}
#content #data-search .account-label .field-name{float: left; width: 80px; padding: 0.3em 0.2em; color: #b9b9b9; display: none}
#content #data-search .account-label .field-text{float: left; width: 95%; padding: 0.3em 0.3em; word-wrap: break-word;}
#content #data-search .account-label .header .field-name{color: white; font-weight: bold}
#content #data-search .account-label .field-text a{color: #4895FA}
#content #data-search .account-label .no-link,
#content #data-search .account-label .no-link a{color: white; font-weight: bold;}
#content #data-search .account-label .no-link a {
color: white;
font-weight: bold;
}
#content #data-search .account-label .field-customer .field-text{height: 2.5em; width: 95%;}
#content #data-search .account-label .field-category{width: 10% !important;}
#content #data-search .account-info {
padding: .5em 0 .5em 0;
text-align: left;
}
#content #data-search .account-info{
#content #data-search .account-actions {
align-self: baseline;
padding: .5em 0;
text-align: right;
/*background-color: transparent;*/
/*box-shadow: 0 0 8px rgba(0, 0, 0, 0.075) inset;*/
border-top: 1px solid #c9c9c9;
}
#content .actions-optional {
display: none;
}
#content #data-search .account-spacer {
float: left;
clear: left;
width: 20%;
/*height: 2em;*/
padding: 0.5em 0;
text-align: left;
/*border-top: 1px solid #d9d9d9;*/
border: none;
height: 2em;
width: 20%
}
#content #data-search .account-actions{
float: right;
position: relative;
top: -3em;
width: auto;
max-width: 18%;
height: auto;
padding: 0.5em;
text-align: right;
/*border-top: 1px solid #c9c9c9;*/
background-color: transparent;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.075) inset;
#content #data-search .tags-box {
display: inline-block;
}
#content #data-search .tags-box span.tag {
cursor: pointer;
}
#content #data-search .account-actions img{margin:3px 5px;}
#content .actions-optional{display: none;}
#content #data-search .account-spacer{float: left; clear: left; height: 2em; width: 20%}

View File

@@ -1 +1 @@
#content #data-search .account-info img,#content #data-search .account-actions img{width:24px;height:24px;margin:0 .5em}#content #data-search{text-align:center;padding:.5em 0;width:100%;margin:0 auto}#content #data-search .account-label{width:100%;height:70px;text-align:left;margin:0 auto;margin-bottom:.2em;padding:.5em;color:#696969;background-color:#fcfcfc;display:inline-block}#content #data-search .account-label .label-field{float:left;width:18%;height:3em}#content #data-search .account-label .field-name{float:left;width:80px;padding:.3em .2em;color:#b9b9b9;display:none}#content #data-search .account-label .field-text{float:left;width:95%;padding:.3em .3em;word-wrap:break-word}#content #data-search .account-label .header .field-name{color:white;font-weight:bold}#content #data-search .account-label .field-text a{color:#4895fa}#content #data-search .account-label .no-link,#content #data-search .account-label .no-link a{color:white;font-weight:bold}#content #data-search .account-label .field-customer .field-text{height:2.5em;width:95%}#content #data-search .account-label .field-category{width:10% !important}#content #data-search .account-info{float:left;clear:left;width:20%;padding:.5em 0;text-align:left;border:0}#content #data-search .account-actions{float:right;position:relative;top:-3em;width:auto;max-width:18%;height:auto;padding:.5em;text-align:right;background-color:transparent;box-shadow:0 0 8px rgba(0,0,0,0.075) inset}#content #data-search .account-actions img{margin:3px 5px}#content .actions-optional{display:none}#content #data-search .account-spacer{float:left;clear:left;height:2em;width:20%}
#content #data-search .account-info img,#content #data-search .account-actions img{width:24px;height:24px;margin:0 .5em}#content #data-search{text-align:center;padding:.5em 0;width:100%;margin:0 auto}#content #data-search .account-label{display:flex;justify-content:space-between;width:100%;height:8em;text-align:left;margin:0 auto .2em;color:#696969;background-color:#fcfcfc;padding:0 .5em}#content #data-search .account-label .label-row-up,#content #data-search .account-label .label-row-down{display:flex;height:3em;width:100%;padding:.5em 0}#content #data-search .account-label .label-row-down{height:auto}#content #data-search .account-label .label-left{display:flex;flex-wrap:wrap;align-items:center}#content #data-search .account-label .label-right{display:flex;flex-wrap:wrap;width:15em}#content #data-search .account-label .label-right>div{width:15em}#content #data-search .account-label .label-field{width:15em;height:3em}#content #data-search .account-label .field-customer{width:20em}#content #data-search .account-label .field-name{padding:.3em .2em;color:#b9b9b9;display:none}#content #data-search .account-label .field-text{width:14em;padding:.3em .3em;word-wrap:break-word}#content #data-search .account-label .header .field-name{color:white;font-weight:bold}#content #data-search .account-label .field-text a{color:#4895fa}#content #data-search .account-label .no-link,#content #data-search .account-label .no-link a{color:white;font-weight:bold}#content #data-search .account-info{padding:.5em 0 .5em 0;text-align:left}#content #data-search .account-actions{align-self:baseline;padding:.5em 0;text-align:right;border-top:1px solid #c9c9c9}#content .actions-optional{display:none}#content #data-search .account-spacer{float:left;clear:left;height:2em;width:20%}#content #data-search .tags-box{display:inline-block}#content #data-search .tags-box span.tag{cursor:pointer}

View File

@@ -225,7 +225,6 @@ pre, code, samp, kbd {
top: 0;
width: 100%;
height: auto;
min-height: 650px;
background: url("../imgs/logo_full.svg") no-repeat left top transparent;
background-size: auto 150px
}
@@ -239,32 +238,6 @@ pre, code, samp, kbd {
margin-bottom: 15px
}
#container #session {
width: 35%;
margin: 0 auto;
height: 25px;
background: url("../imgs/bg_session.png") repeat-x scroll left top #e9e9e9;
color: #999;
font-size: 10px;
text-align: right
}
#container #session img {
width: 24px;
height: 24px;
margin-left: 10px;
margin-right: 10px;
vertical-align: middle
}
#container #session .imgLang {
width: 28px;
height: auto;
filter: alpha(opacity=40);
-moz-opacity: .4;
opacity: .4
}
#container #actionsBar {
position: absolute;
top: 0;
@@ -284,7 +257,7 @@ pre, code, samp, kbd {
#container #content {
width: 95%;
min-height: 500px;
/*min-height: 500px;*/
margin: 10em auto 5em auto
}
@@ -316,7 +289,7 @@ pre, code, samp, kbd {
}
#content #resBuscar {
min-height: 450px;
/*min-height: 450px;*/
margin-bottom: 50px
}
@@ -502,15 +475,6 @@ pre, code, samp, kbd {
text-align: right
}
#content .tags-box {
display: inline-block;
margin: 0 1.5em;
}
#content .tags-box span.tag {
cursor: pointer;
}
#content span.tag {
margin: 0 3px 3px 0;
padding: 1px 3px;
@@ -703,89 +667,6 @@ pre, code, samp, kbd {
margin: 0 .5em
}
#content #data-search {
text-align: center
}
#content #data-search .account-label {
width: 310px;
text-align: left;
margin: 1em;
padding: .5em;
color: #696969;
background-color: #fcfcfc;
display: inline-block
}
#content #data-search .account-label .label-field {
width: 100%;
height: 2.5em
}
#content #data-search .account-label .field-name {
float: left;
width: 80px;
padding: .4em .2em;
color: #b9b9b9
}
#content #data-search .account-label .field-text {
float: left;
width: 215px;
padding: .4em .2em
}
#content #data-search .account-label .header .field-name {
color: white;
font-weight: bold
}
#content #data-search .account-label .field-customer .field-name {
display: none
}
#content #data-search .account-label .field-customer .field-text {
width: 304px
}
#content #data-search .account-label .field-url {
height: 3em
}
#content #data-search .account-label .field-text a {
color: #4895fa
}
#content #data-search .account-label .no-link, #content #data-search .account-label .no-link a {
color: white;
font-weight: bold
}
#content #data-search .account-info {
width: 100%;
height: 2em;
padding: .5em 0;
text-align: left
}
#content #data-search .account-actions {
width: 100%;
height: 2.5em;
padding-top: 5px;
text-align: right;
background-color: #f5f5f5;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.075) inset
}
#content .actions-optional {
display: none
}
#content #data-search .account-spacer {
width: 100%;
height: 7.5em
}
#content .rowSpace > .cellBorder {
height: 10px;
border-top: 1px solid #d9d9d9
@@ -866,10 +747,6 @@ pre, code, samp, kbd {
color: #696969
}
#content #tabs > div {
min-height: 475px
}
#content #tabs.ui-widget-content {
border: 0;
background-color: transparent
@@ -1784,7 +1661,6 @@ fieldset.warning a {
#container #content {
width: 95%;
min-height: 500px;
margin: 15em auto 5em auto
}

File diff suppressed because one or more lines are too long

View File

@@ -10,63 +10,74 @@
<?php if ($index === 'count'): continue; endif; ?>
<div class="account-label round shadow">
<div class="field-customer label-field">
<div class="field-name"><?php echo _('Cliente'); ?></div>
<?php if (!empty($Account->getCustomerLink())): ?>
<a href="<?php echo $Account->getCustomerLink(); ?>" target="blank"
title="<?php echo _('Buscar en Wiki'); ?>&nbsp;<?php echo $Account->getCustomerName(); ?>">
<div class="label-left">
<div class="label-row-up">
<div class="field-customer label-field">
<div class="field-name"><?php echo _('Cliente'); ?></div>
<?php if (!empty($Account->getCustomerLink())): ?>
<a href="<?php echo $Account->getCustomerLink(); ?>" target="blank"
title="<?php echo _('Buscar en Wiki'); ?>&nbsp;<?php echo $Account->getCustomerName(); ?>">
<span class="mdl-chip mdl-chip--contact">
<span style="background-color: <?php echo $Account->getColor(); ?>;"
class="mdl-chip__contact mdl-color-text--white">
<?php echo $Account->getCustomerName()[0]; ?></span>
<span class="mdl-chip__text"><?php echo $Account->getCustomerName(); ?></span>
</span>
</a>
<?php else: ?>
<span class="mdl-chip mdl-chip--contact">
</a>
<?php else: ?>
<span class="mdl-chip mdl-chip--contact">
<span style="background-color: <?php echo $Account->getColor(); ?>;"
class="mdl-chip__contact mdl-color-text--white">
<?php echo $Account->getCustomerName()[0]; ?></span>
<span class="mdl-chip__text"><?php echo $Account->getCustomerName(); ?></span>
</span>
<?php endif; ?>
</div>
<div class="field-account label-field">
<div class="field-name"><?php echo _('Nombre'); ?></div>
<?php if ($Account->isShow() && $Account->getLink()): ?>
<a title="<?php echo _('Detalles de Cuenta'); ?>" class="btn-action"
data-action-id="<?php echo \SP\Core\ActionsInterface::ACTION_ACC_VIEW; ?>"
data-item-id="<?php echo $Account->getId(); ?>"
data-onclick="account/view"><?php echo $Account->getName(); ?></a>
<?php else: ?>
<div class="field-text">
<?php echo $Account->getName(); ?>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
<div class="field-category label-field">
<div class="field-name"><?php echo _('Categoría'); ?></div>
<div class="field-text"><?php echo $Account->getCategoryName(); ?></div>
</div>
<div class="field-account label-field">
<div class="field-name"><?php echo _('Nombre'); ?></div>
<?php if ($Account->isShow() && $Account->getLink()): ?>
<a title="<?php echo _('Detalles de Cuenta'); ?>" class="btn-action"
data-action-id="<?php echo \SP\Core\ActionsInterface::ACTION_ACC_VIEW; ?>"
data-item-id="<?php echo $Account->getId(); ?>"
data-onclick="account/view"><?php echo $Account->getName(); ?></a>
<?php else: ?>
<div class="field-text">
<?php echo $Account->getName(); ?>
</div>
<?php endif; ?>
</div>
<?php if ($Account->isShow()): ?>
<div class="field-user label-field">
<div class="field-name"><?php echo _('Usuario'); ?></div>
<div class="field-text"><?php echo $Account->getLogin(); ?></div>
<div class="field-category label-field">
<div class="field-name"><?php echo _('Categoría'); ?></div>
<div class="field-text"><?php echo $Account->getCategoryName(); ?></div>
</div>
<?php if ($Account->isShow()): ?>
<div class="field-user label-field">
<div class="field-name"><?php echo _('Usuario'); ?></div>
<div class="field-text"><?php echo $Account->getLogin(); ?></div>
</div>
<div class="field-url label-field">
<div class="field-name"><?php echo _('URL / IP'); ?></div>
<?php if ($Account->isUrlIslink()): ?>
<a href="<?php echo $Account->getUrl(); ?>" target="_blank"
title="<?php echo _('Abrir enlace a'), ': ', $Account->getUrl(); ?>"><?php echo $Account->getUrlShort(); ?></a>
<?php else: ?>
<div class="field-text"><?php echo $Account->getUrlShort(); ?></div>
<?php endif; ?>
</div>
</div>
<div class="field-url label-field">
<div class="field-name"><?php echo _('URL / IP'); ?></div>
<?php if ($Account->isUrlIslink()): ?>
<a href="<?php echo $Account->getUrl(); ?>" target="_blank"
title="<?php echo _('Abrir enlace a'), ': ', $Account->getUrl(); ?>"><?php echo $Account->getUrlShort(); ?></a>
<?php else: ?>
<div class="field-text"><?php echo $Account->getUrlShort(); ?></div>
<?php endif; ?>
<div class="label-row-down">
<div class="tags-box">
<?php foreach ($Account->getTags() as $tag): ?>
<span class="tag"><?php echo $tag; ?></span>
<?php endforeach; ?>
</div>
</div>
</div>
<div class="label-right">
<div class="account-info">
<?php if ($Account->isShow()): ?>
<i id="accesses-<?php echo $Account->getId(); ?>" class="material-icons">face</i>
@@ -99,7 +110,8 @@
<?php endif; ?>
<?php if ($Account->getNumFiles() > 0): ?>
<i id="attachments-<?php echo $Account->getId(); ?>" class="material-icons">attach_file</i>
<i id="attachments-<?php echo $Account->getId(); ?>"
class="material-icons">attach_file</i>
<div class="mdl-tooltip" for="attachments-<?php echo $Account->getId(); ?>">
<?php echo _('Archivos adjuntos'), ': ', $Account->getNumFiles(); ?>
</div>
@@ -125,55 +137,47 @@
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
<div class="tags-box">
<?php foreach ($Account->getTags() as $tag): ?>
<span class="tag"><?php echo $tag; ?></span>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
<?php else: ?>
<div class="account-spacer"></div>
<?php endif; ?>
<div class="account-actions round">
<?php foreach ($data->getDataActions() as $action): ?>
<?php if ($action->getReflectionFilter()->invoke($Account)): ?>
<i class="btn-action material-icons <?php echo $action->getIcon()->getClass(); ?>"
title="<?php echo $action->getTitle(); ?>"
data-item-id="<?php echo $Account->getId(); ?>"
<?php foreach ($action->getData() as $name => $actionData): ?>
<?php echo 'data-', $name, '=', '"', $actionData, '"'; ?>
<?php endforeach; ?>><?php echo $action->getIcon()->getIcon(); ?></i>
<div class="account-actions">
<?php foreach ($data->getDataActions() as $action): ?>
<?php if ($action->getReflectionFilter()->invoke($Account)): ?>
<i class="btn-action material-icons <?php echo $action->getIcon()->getClass(); ?>"
title="<?php echo $action->getTitle(); ?>"
data-item-id="<?php echo $Account->getId(); ?>"
<?php foreach ($action->getData() as $name => $actionData): ?>
<?php echo 'data-', $name, '=', '"', $actionData, '"'; ?>
<?php endforeach; ?>><?php echo $action->getIcon()->getIcon(); ?></i>
<?php endif; ?>
<?php endforeach; ?>
<?php if (count($data->getDataActionsMenu()) > 0): ?>
<button id="actions-menu-lower-right-<?php echo $Account->getId(); ?>"
class="mdl-button mdl-js-button mdl-button--icon">
<i class="material-icons">more_vert</i>
</button>
<ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect"
for="actions-menu-lower-right-<?php echo $Account->getId(); ?>">
<?php foreach ($data->getDataActionsMenu() as $actionMenu): ?>
<?php if ($actionMenu->getReflectionFilter()->invoke($Account)): ?>
<li class="btn-action mdl-menu__item"
data-item-id="<?php echo $Account->getId(); ?>"
<?php foreach ($actionMenu->getData() as $name => $actionData): ?>
<?php echo 'data-', $name, '=', '"', $actionData, '"'; ?>
<?php endforeach; ?>>
<i class="material-icons <?php echo $actionMenu->getIcon()->getClass(); ?>"
title="<?php echo $actionMenu->getTitle(); ?>"><?php echo $actionMenu->getIcon()->getIcon(); ?></i>
<?php echo $actionMenu->getName(); ?>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<?php endforeach; ?>
<?php if (count($data->getDataActionsMenu()) > 0): ?>
<button id="actions-menu-lower-right-<?php echo $Account->getId(); ?>"
class="mdl-button mdl-js-button mdl-button--icon">
<i class="material-icons">more_vert</i>
</button>
<ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect"
for="actions-menu-lower-right-<?php echo $Account->getId(); ?>">
<?php foreach ($data->getDataActionsMenu() as $actionMenu): ?>
<?php if ($actionMenu->getReflectionFilter()->invoke($Account)): ?>
<li class="btn-action mdl-menu__item"
data-item-id="<?php echo $Account->getId(); ?>"
<?php foreach ($actionMenu->getData() as $name => $actionData): ?>
<?php echo 'data-', $name, '=', '"', $actionData, '"'; ?>
<?php endforeach; ?>>
<i class="material-icons <?php echo $actionMenu->getIcon()->getClass(); ?>"
title="<?php echo $actionMenu->getTitle(); ?>"><?php echo $actionMenu->getIcon()->getIcon(); ?></i>
<?php echo $actionMenu->getName(); ?>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
</div>
<?php endforeach; ?>
</div>

View File

@@ -3,15 +3,13 @@
* @var $data SP\Html\DataGrid\DataGridTab
* @var $account SP\Account\AccountsSearchData
* @var $this SP\Core\Template
* @var $icons \SP\Core\UI\ThemeIconsBase
*/
?>
<div id="searchbox" class="round shadow">
<form method="post" name="frmSearch" id="frmSearch">
<form method="post" name="frmSearch" id="frmSearch" class="form-action" data-onsubmit="account/search">
<div id="tblTools">
<div id="toolsLeft">
<i id="btnClear" class="material-icons"
title="<?php echo _('Limpiar'); ?>"><?php echo $icons->getIconClear()->getIcon(); ?></i>
<div class="mdl-textfield mdl-js-textfield">
<input class="mdl-textfield__input mdl-color-text--indigo-400" type="text" id="search"
name="search" value="<?php echo $searchTxt; ?>"/>
@@ -19,6 +17,13 @@
</div>
<div id="help-account_search" class="icon material-icons mdl-color-text--indigo-A200">help_outline</div>
<button type="reset"
class="btn-clear mdl-button mdl-js-button mdl-button--mini-fab mdl-js-ripple-effect"
title="<?php echo $icons->getIconClear()->getTitle(); ?>">
<i class="material-icons"><?php echo $icons->getIconClear()->getIcon(); ?></i>
</button>
<div class="mdl-tooltip mdl-tooltip--large" for="help-account_search">
<p>
<?php echo _('Parámetros especiales:'); ?>

View File

@@ -5,9 +5,6 @@
active: <?php echo $activeTabId; ?>,
create: function( event, ui ) {
$("input:visible:first").focus();
},
activate: function( event, ui ) {
sysPassApp.setContentSize();
}
});

View File

@@ -37,9 +37,10 @@
<form method="post" id="<?php echo $action->getName(); ?>"
name="<?php echo $action->getName(); ?>"
class="form-action"
data-target="#data-rows-<?php echo $data->getId(); ?>"
data-activetab="<?php echo $index; ?>"
data-onsubmit="<?php echo $action->getOnSubmit(); ?>">
<i class="btn-clear material-icons"
title="<?php echo _('Limpiar'); ?>">clear_all</i>
<div class="mdl-textfield mdl-js-textfield">
<input class="mdl-textfield__input mdl-color-text--indigo-400" type="text"
id="txtSearch"
@@ -47,9 +48,16 @@
<label class="mdl-textfield__label"
for="txtSearch"><?php echo $action->getTitle(); ?></label>
</div>
<button type="reset"
class="btn-clear mdl-button mdl-js-button mdl-button--mini-fab mdl-js-ripple-effect"
title="<?php echo $icons->getIconClear()->getTitle(); ?>">
<i class="material-icons"><?php echo $icons->getIconClear()->getIcon(); ?></i>
</button>
<input type="hidden" name="sk" value="">
<input type="hidden" name="target" value="data-rows-<?php echo $data->getId(); ?>">
<input type="hidden" name="activeTab" value="<?php echo $index; ?>">
<input type="hidden" name="start" value="0">
<input type="hidden" name="count" value="<?php echo $data->getPager()->getLimitCount(); ?>">
<input type="hidden" name="actionId" value="<?php echo $action->getId(); ?>">
<input type="hidden" name="isAjax" value="1">
</form>

View File

@@ -90,7 +90,6 @@ sysPass.Actions = function (Common) {
Common.appRequests().getActionCall(opts, function (response) {
$("#content").html(response);
Common.setContentSize();
});
};
@@ -796,36 +795,26 @@ sysPass.Actions = function (Common) {
$obj.html(response);
});
},
search: function (clear) {
search: function () {
log.info("account:search");
var $frmSearch = $("#frmSearch");
$frmSearch.find("input[name='sk']").val(Common.sk.get());
if (clear === true) {
// document.frmSearch.search.value = "";
$frmSearch.find("select").each(function () {
$(this)[0].selectize.clear();
});
$frmSearch.find("input[name=\"search\"]").val("");
$frmSearch.find("input[name=\"start\"], input[name=\"skey\"], input[name=\"sorder\"]").val(0);
$frmSearch.find("input[name=\"searchfav\"]").val(0).change();
order.key = 0;
order.dir = 0;
}
order.key = $frmSearch.find("input[name='skey']").val();
order.dir = $frmSearch.find("input[name='sorder']").val();
var opts = Common.appRequests().getRequestOpts();
opts.url = ajaxUrl.account.search;
opts.data = $frmSearch.serialize();
Common.appRequests().getActionCall(opts, function (json) {
if (typeof json.sk !== "undefined") {
Common.sk.set(json.sk);
$frmSearch.find("input[name=\"sk\"]").val(json.sk);
if (json.status === 10){
Common.msg.out(json);
}
Common.sk.set(json.sk);
$("#res-content").html(json.html);
});
},
@@ -918,50 +907,34 @@ sysPass.Actions = function (Common) {
}
});
},
search: function (form) {
search: function ($obj) {
log.info("appMgmt:search");
var $form = $(form);
var targetId = $form.find("[name=target]").val();
var $target = $($obj.data("target"));
var opts = Common.appRequests().getRequestOpts();
opts.url = ajaxUrl.appMgmt.search;
opts.data = $form.serialize();
opts.data = $obj.serialize();
Common.appRequests().getActionCall(opts, function (json) {
var $target = $("#" + targetId);
if (json.status === 0) {
$target.html(json.html);
$form.find("[name='sk']").val(json.sk);
$obj.find("[name='sk']").val(json.sk);
} else {
$target.html(Common.msg.html.error(json.description));
}
});
return false;
},
nav: function ($obj) {
log.info("appMgmt:nav");
var $form = $("#" + $obj.data("action-form"));
var opts = Common.appRequests().getRequestOpts();
opts.url = ajaxUrl.appMgmt.search;
opts.data = $form.serialize() + "&start=" + $obj.data("start") + "&count=" + $obj.data("count");
$form.find("[name='start']").val($obj.data("start"));
$form.find("[name='count']").val($obj.data("count"));
$form.find("[name='sk']").val(Common.sk.get());
Common.getActionCall(opts, function (json) {
var $target = $("#" + $form.find("[name=target]").val());
if (json.status === 0) {
$target.html(json.html);
$form.find("[name='sk']").val(json.sk);
} else {
$target.html(Common.msg.html.error(json.description));
}
});
return false;
appMgmt.search($form);
}
};

View File

@@ -184,6 +184,10 @@ sysPass.Triggers = function (Common) {
var $this = $(this);
$("#" + $this.data("help")).dialog("open");
}).on("reset", ".form-action", function (e) {
log.info("reset");
$(this).find("input[name='start'], input[name='skey'], input[name='sorder']").val(0);
});
};
@@ -206,7 +210,6 @@ sysPass.Triggers = function (Common) {
Common.appActions().doAction({actionId: $(this).data("action-id")});
});
setFixedMenu();
Common.appActions().doAction({actionId: 1});
@@ -216,18 +219,20 @@ sysPass.Triggers = function (Common) {
var $frmSearch = $("#frmSearch");
$frmSearch.on("submit", function (e) {
e.preventDefault();
Common.appActions().account.search();
});
$frmSearch.find("select, #rpp").on("change", function () {
Common.appActions().account.search();
$frmSearch.submit();
});
$frmSearch.find("#btnClear").click(function () {
Common.appActions().account.search(true);
$frmSearch.find("button.btn-clear").on("click", function () {
$frmSearch[0].reset();
$frmSearch.find("select").each(function () {
$(this)[0].selectize.clear();
});
$frmSearch.find("input[name=\"searchfav\"]").val(0).change();
$frmSearch.submit();
});
$frmSearch.find("input:text:visible:first").focus();
@@ -238,7 +243,7 @@ sysPass.Triggers = function (Common) {
$frmSearch.find("input[name='gsearch']").val(val);
Common.appActions().account.search();
$frmSearch.submit();
}
);
@@ -297,7 +302,7 @@ sysPass.Triggers = function (Common) {
$(".datagrid-action-search>form").each(function () {
var $this = $(this);
$this.find("i.btn-clear").on("click", function () {
$this.find("button.btn-clear").on("click", function () {
$this.trigger("reset").submit();
});
});