Procházet zdrojové kódy

[Administration] Menu déroulant producteurs : ajout identifiant + entrée rapide avec la touche Entrée

feature/rotating_product
Guillaume Bourgeois před 6 měsíci
rodič
revize
d15ae5e56e
4 změnil soubory, kde provedl 125 přidání a 78 odebrání
  1. +6
    -0
      backend/views/layouts/header.php
  2. +94
    -77
      backend/web/css/screen.css
  3. +8
    -1
      backend/web/js/backend.js
  4. +17
    -0
      backend/web/sass/_adminlte.scss

+ 6
- 0
backend/views/layouts/header.php Zobrazit soubor

@@ -82,6 +82,9 @@ $userCurrent = GlobalParam::getCurrentUser();
<?php endif; ?>
<div class="title">
<?= Html::encode($producer->name) ?>
<?php if ($userModule->getAuthorizationChecker()->isGrantedAsAdministrator($userCurrent)): ?>
<span class="producer-id">#<?= $producer->id ?></span>
<?php endif; ?>
<?php if (!$producer->active): ?>
<span class="label label-danger">Hors-ligne</span>
<?php endif; ?>
@@ -120,6 +123,7 @@ $userCurrent = GlobalParam::getCurrentUser();
<a href="<?= Yii::$app->urlManagerBackend->createUrl(['site/switch-producer', 'id' => $producer->id]); ?>">
<label class="label label-info">Nouveau</label>
<?= Html::encode($producer->name) ?>
<span class="producer-id">#<?= $producer->id ?></span>
</a>
</li>
<?php endif; ?>
@@ -130,6 +134,7 @@ $userCurrent = GlobalParam::getCurrentUser();
<a href="<?= Yii::$app->urlManagerBackend->createUrl(['site/switch-producer', 'id' => $producer->id]); ?>">
<?php if($producer->is_new): ?> <label class="label label-info">Nouveau</label> <?php endif; ?>
<?= Html::encode($producer->name) ?>
<span class="producer-id">#<?= $producer->id ?></span>
</a>
</li>
<?php endif; ?>
@@ -140,6 +145,7 @@ $userCurrent = GlobalParam::getCurrentUser();
<a href="<?= Yii::$app->urlManagerBackend->createUrl(['site/switch-producer', 'id' => $producer->id]); ?>">
<label class="label label-danger">Hors-ligne</label>
<?= Html::encode($producer->name) ?>
<span class="producer-id">#<?= $producer->id ?></span>
</a>
</li>
<?php endif; ?>

+ 94
- 77
backend/web/css/screen.css Zobrazit soubor

@@ -1621,201 +1621,218 @@ body.skin-black .main-header .navbar .producer-panel .title {
top: 2px;
text-transform: uppercase;
}
/* line 85, ../sass/_adminlte.scss */
/* line 83, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .title .producer-id {
color: gray;
font-size: 13px;
}
/* line 90, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .sidebar-toggle {
color: #333;
}
/* line 89, ../sass/_adminlte.scss */
/* line 94, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .link-support {
float: left;
padding: 15px 15px;
border-right: solid 1px #e0e0e0;
color: #333;
}
/* line 95, ../sass/_adminlte.scss */
/* line 100, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .link-support:hover {
text-decoration: none;
color: #F39C12;
}
/* line 101, ../sass/_adminlte.scss */
/* line 106, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .navbar-custom-menu .nav {
display: block;
}
/* line 105, ../sass/_adminlte.scss */
/* line 110, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .navbar-custom-menu .navbar-nav > li > a,
body.skin-black .main-header .navbar .navbar-right > li > a {
border-left: solid 1px #e0e0e0;
color: #333;
}
/* line 111, ../sass/_adminlte.scss */
/* line 116, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav > li > a:hover, body.skin-black .main-header .navbar .nav > li > a:active, body.skin-black .main-header .navbar .nav > li > a:focus,
body.skin-black .main-header .navbar .nav .open > a, body.skin-black .main-header .navbar .nav .open > a:hover, body.skin-black .main-header .navbar .nav .open > a:focus,
body.skin-black .main-header .navbar .nav > .active > a {
color: #F39C12;
}
/* line 117, ../sass/_adminlte.scss */
/* line 122, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .dropdown-menu {
-moz-box-shadow: 0px 0px 4px gray;
-webkit-box-shadow: 0px 0px 4px gray;
box-shadow: 0px 0px 4px gray;
}
/* line 122, ../sass/_adminlte.scss */
/* line 127, ../sass/_adminlte.scss */
body.skin-black .main-header .logo, body.skin-black .main-header .navbar .sidebar-toggle {
border-right: solid 1px #e0e0e0;
}
/* line 126, ../sass/_adminlte.scss */
/* line 131, ../sass/_adminlte.scss */
body.skin-black .main-header .link-control-sidebar {
display: none;
}
/* line 131, ../sass/_adminlte.scss */
/* line 136, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu {
max-height: 300px;
}
/* line 134, ../sass/_adminlte.scss */
/* line 139, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a {
padding-top: 4px;
padding-bottom: 4px;
}
/* line 138, ../sass/_adminlte.scss */
/* line 143, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a h5 {
margin-bottom: 2px;
}
/* line 141, ../sass/_adminlte.scss */
/* line 146, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a h5 small {
float: right;
}
/* line 146, ../sass/_adminlte.scss */
/* line 151, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a p {
margin-left: 10px;
}
/* line 157, ../sass/_adminlte.scss */
/* line 162, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .dropdown-menu {
width: 400px;
}
/* line 161, ../sass/_adminlte.scss */
/* line 166, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .search-producer {
margin: 10px;
width: 94%;
}
/* line 166, ../sass/_adminlte.scss */
/* line 171, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .li-alert-no-results {
display: none;
}
/* line 169, ../sass/_adminlte.scss */
/* line 174, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .li-alert-no-results .alert {
margin-bottom: 0px;
margin-left: 10px;
margin-right: 10px;
padding: 15px 15px 10px 15px;
}
/* line 177, ../sass/_adminlte.scss */
/* line 182, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .label {
position: relative;
top: -2px;
left: 0px;
}
/* line 183, ../sass/_adminlte.scss */
/* line 188, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu #link-display-producers-offline {
color: #F39C12;
}
/* line 187, ../sass/_adminlte.scss */
/* line 192, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .offline {
display: none;
}
/* line 194, ../sass/_adminlte.scss */
/* line 196, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu a {
color: #333;
}
/* line 200, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .producer-id {
position: relative;
top: 4px;
color: gray;
font-size: 12px;
float: right;
}
/* line 211, ../sass/_adminlte.scss */
body.skin-black .sidebar .sidebar-menu > li.header {
color: #899397;
}
/* line 198, ../sass/_adminlte.scss */
/* line 215, ../sass/_adminlte.scss */
body.skin-black .sidebar .label {
padding-top: 5px;
position: relative;
top: -3px;
}
/* line 205, ../sass/_adminlte.scss */
/* line 222, ../sass/_adminlte.scss */
body.skin-black .sidebar-menu > li.active > a {
border-color: #F39C12;
}
/* line 210, ../sass/_adminlte.scss */
/* line 227, ../sass/_adminlte.scss */
body.skin-black section.sidebar .user-panel {
text-align: center;
}
/* line 213, ../sass/_adminlte.scss */
/* line 230, ../sass/_adminlte.scss */
body.skin-black section.sidebar .user-panel .image {
margin-bottom: 3px;
}
/* line 217, ../sass/_adminlte.scss */
/* line 234, ../sass/_adminlte.scss */
body.skin-black section.sidebar .user-panel .title {
font-weight: bold;
color: white;
}
/* line 224, ../sass/_adminlte.scss */
/* line 241, ../sass/_adminlte.scss */
body.skin-black .content-wrapper {
background-color: #f5f5f5;
}
/* line 227, ../sass/_adminlte.scss */
/* line 244, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .content-header {
background-color: #F5F5F5;
padding-bottom: 15px;
border-bottom: solid 1px #e0e0e0;
border-top: solid 1px #e0e0e0;
}
/* line 233, ../sass/_adminlte.scss */
/* line 250, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .content-header .btn {
padding: 3px 6px;
font-size: 10px;
font-family: Arial;
text-transform: uppercase;
}
/* line 240, ../sass/_adminlte.scss */
/* line 257, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .content-header h1 {
font-family: 'myriadpro-light';
font-size: 20px;
}
/* line 246, ../sass/_adminlte.scss */
/* line 263, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .col-no-padding-left {
padding-left: 0px;
}
/* line 250, ../sass/_adminlte.scss */
/* line 267, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .col-no-padding-right {
padding-right: 0px;
}
/* line 254, ../sass/_adminlte.scss */
/* line 271, ../sass/_adminlte.scss */
body.skin-black .content-wrapper a {
color: #e08e0b;
}
/* line 257, ../sass/_adminlte.scss */
/* line 274, ../sass/_adminlte.scss */
body.skin-black .content-wrapper a.disable {
pointer-events: none;
cursor: default;
}
/* line 263, ../sass/_adminlte.scss */
/* line 280, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .label {
padding-top: 4px;
padding-bottom: 1px;
}
/* line 268, ../sass/_adminlte.scss */
/* line 285, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn {
color: white;
}
/* line 272, ../sass/_adminlte.scss */
/* line 289, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn-default {
color: #333;
background-color: white;
}
/* line 277, ../sass/_adminlte.scss */
/* line 294, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn-primary {
background-color: #F39C12;
color: white;
border-color: #F39C12;
}
/* line 284, ../sass/_adminlte.scss */
/* line 301, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .nav.nav-tabs .badge {
margin-left: 4px;
background-color: #e0e0e0;
color: #444;
}
/* line 291, ../sass/_adminlte.scss */
/* line 308, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .tab-content {
border-left: solid 1px #ddd;
border-bottom: solid 1px #ddd;
@@ -1823,20 +1840,20 @@ body.skin-black .content-wrapper .tab-content {
padding: 30px 15px 15px 15px;
background-color: white;
}
/* line 299, ../sass/_adminlte.scss */
/* line 316, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert {
position: relative;
}
/* line 302, ../sass/_adminlte.scss */
/* line 319, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert a {
color: white;
}
/* line 305, ../sass/_adminlte.scss */
/* line 322, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert a.btn {
color: #333;
text-decoration: none;
}
/* line 310, ../sass/_adminlte.scss */
/* line 327, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert .close {
font-size: 30px;
position: absolute;
@@ -1846,83 +1863,83 @@ body.skin-black .content-wrapper .alert .close {
color: white;
opacity: 0.6;
}
/* line 319, ../sass/_adminlte.scss */
/* line 336, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert .close:hover {
opacity: 1;
}
/* line 324, ../sass/_adminlte.scss */
/* line 341, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert.alert-dark {
background-color: #ece4d8;
color: black;
}
/* line 331, ../sass/_adminlte.scss */
/* line 348, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box h3 {
font-size: 28px;
font-family: 'Source Sans Pro',sans-serif;
}
/* line 336, ../sass/_adminlte.scss */
/* line 353, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box .icon {
top: -2px;
}
/* line 340, ../sass/_adminlte.scss */
/* line 357, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box .small-box-footer {
color: white;
padding-top: 6px;
padding-bottom: 2px;
}
/* line 349, ../sass/_adminlte.scss */
/* line 366, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout h4 .fa {
margin-right: 7px;
}
/* line 352, ../sass/_adminlte.scss */
/* line 369, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout a {
color: white;
}
/* line 355, ../sass/_adminlte.scss */
/* line 372, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout .btn {
color: #333;
text-decoration: none;
}
/* line 362, ../sass/_adminlte.scss */
/* line 379, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table th {
font-size: 13px;
}
/* line 365, ../sass/_adminlte.scss */
/* line 382, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table th.column-actions, body.skin-black .content-wrapper .table td.column-actions {
width: 172px;
text-align: right;
}
/* line 369, ../sass/_adminlte.scss */
/* line 386, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table td.text-small, body.skin-black .content-wrapper .table th.text-small {
font-size: 12px;
}
/* line 373, ../sass/_adminlte.scss */
/* line 390, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table.table-bordered > thead > tr > th, body.skin-black .content-wrapper .table.table-bordered > tbody > tr > th, body.skin-black .content-wrapper .table.table-bordered > tfoot > tr > th, body.skin-black .content-wrapper .table.table-bordered > thead > tr > td, body.skin-black .content-wrapper .table.table-bordered > tbody > tr > td, body.skin-black .content-wrapper .table.table-bordered > tfoot > tr > td {
border: 1px solid #ddd;
}
/* line 382, ../sass/_adminlte.scss */
/* line 399, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table.table-bordered > thead > tr > th, body.skin-black .content-wrapper .table.table-bordered > thead > tr > td {
border-bottom-width: 2px;
}
/* line 388, ../sass/_adminlte.scss */
/* line 405, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > .active > a, body.skin-black .content-wrapper .pagination > .active > span, body.skin-black .content-wrapper .pagination > .active > a:hover, body.skin-black .content-wrapper .pagination > .active > span:hover, body.skin-black .content-wrapper .pagination > .active > a:focus, body.skin-black .content-wrapper .pagination > .active > span:focus {
background-color: #F39C12;
border: solid 1px #F39C12;
color: white;
}
/* line 394, ../sass/_adminlte.scss */
/* line 411, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > li > a, body.skin-black .content-wrapper .pagination > li > span {
color: #F39C12;
}
/* line 396, ../sass/_adminlte.scss */
/* line 413, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > li > a:hover, body.skin-black .content-wrapper .pagination > li > span:hover {
color: #c87f0a;
}
/* line 401, ../sass/_adminlte.scss */
/* line 418, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .submenu {
margin-bottom: 25px;
}
/* line 405, ../sass/_adminlte.scss */
/* line 422, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-actions {
position: fixed;
bottom: 0;
@@ -1936,71 +1953,71 @@ body.skin-black .content-wrapper .form-actions {
z-index: 10;
border-top: solid 1px #e0e0e0;
}
/* line 418, ../sass/_adminlte.scss */
/* line 435, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-actions a, body.skin-black .content-wrapper .form-actions button {
margin-left: 10px;
}
/* line 423, ../sass/_adminlte.scss */
/* line 440, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-buttons {
margin-top: 25px;
text-align: right;
}
/* line 430, ../sass/_adminlte.scss */
/* line 447, ../sass/_adminlte.scss */
body.skin-black .main-footer a {
color: #F39C12;
}
/* line 435, ../sass/_adminlte.scss */
/* line 452, ../sass/_adminlte.scss */
body.skin-black .gridview-pagesize {
float: right;
margin-bottom: 8px;
}
/* line 440, ../sass/_adminlte.scss */
/* line 457, ../sass/_adminlte.scss */
body.skin-black #yii-debug-toolbar {
bottom: 64px;
}

/* line 445, ../sass/_adminlte.scss */
/* line 462, ../sass/_adminlte.scss */
body.login-page {
background: none;
background-color: white;
}
/* line 449, ../sass/_adminlte.scss */
/* line 466, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo {
text-align: center;
font-family: 'worksans_bold';
}
/* line 453, ../sass/_adminlte.scss */
/* line 470, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo img {
width: 150px;
}
/* line 459, ../sass/_adminlte.scss */
/* line 476, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body,
body.login-page .login-box .login-box-body input#loginform-email,
body.login-page .login-box .login-box-body input#loginform-password,
body.login-page .login-box .login-box-body .btn-primary {
font-size: 14px;
}
/* line 466, ../sass/_adminlte.scss */
/* line 483, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary {
background-color: #F39C12;
border-color: #F39C12;
padding: 5px 10px;
margin-bottom: 15px;
}
/* line 472, ../sass/_adminlte.scss */
/* line 489, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary:active {
background-color: #f4a62a;
border-color: #F39C12;
}
/* line 478, ../sass/_adminlte.scss */
/* line 495, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a {
color: #F39C12;
}
/* line 480, ../sass/_adminlte.scss */
/* line 497, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a:hover {
color: #f4a62a;
}
/* line 485, ../sass/_adminlte.scss */
/* line 502, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .checkbox label input {
position: relative;
top: 0px;

+ 8
- 1
backend/web/js/backend.js Zobrazit soubor

@@ -177,7 +177,7 @@ function opendistrib_dropdown_producers() {
setTimeout(function() { $('.producer-menu .search-producer').focus(); }, 100);
});

$('.producer-menu .search-producer').keyup(function () {
$('.producer-menu .search-producer').keyup(function (event) {
var $alertNoResults = $('.producer-menu .li-alert-no-results');
var searchWords = $(this).val().toLowerCase();
var count = 0;
@@ -201,6 +201,13 @@ function opendistrib_dropdown_producers() {
$alertNoResults.hide();
$('.producer-menu li.producer').show();
}

if(event.key == 'Enter') {
$firstProducer = $('.producer-menu li.producer:visible:first');
if($firstProducer.length > 0) {
window.location = $firstProducer.find('a').attr('href');
}
}
});

$('#link-display-producers-offline').click(function () {

+ 17
- 0
backend/web/sass/_adminlte.scss Zobrazit soubor

@@ -79,6 +79,11 @@ body.skin-black {
position: relative;
top: 2px;
text-transform: uppercase;

.producer-id {
color: gray;
font-size: 13px;
}
}
}

@@ -187,6 +192,18 @@ body.skin-black {
.offline {
display: none;
}

a {
color: #333;
}

.producer-id {
position: relative;
top: 4px;
color: gray;
font-size: 12px;
float: right;
}
}
}


Načítá se…
Zrušit
Uložit