Browse Source

[Backend] Documents : tri des utilisateurs #409

refactoring
Guillaume Bourgeois 2 years ago
parent
commit
6566959305
2 changed files with 8 additions and 1 deletions
  1. +1
    -1
      backend/views/document/_form.php
  2. +7
    -0
      backend/web/js/backend.js

+ 1
- 1
backend/views/document/_form.php View File

@@ -70,7 +70,7 @@ use common\models\Producer;
])->hiddenInput(); ?>
<?php else: ?>
<?php
$usersArray = User::findBy()->orderBy('type DESC')->all();
$usersArray = User::findBy()->orderBy('type DESC, name_legal_person ASC, lastname ASC, name ASC')->all();
?>
<?= $form->field($model, 'id_user', [
'template' => '{label} <a href="' . Yii::$app->urlManager->createUrl(['user/create']) . '" class="btn btn-xs btn-default">Nouvel utilisateur <span class="glyphicon glyphicon-plus"></span></a><div>{input}</div>{hint}',

+ 7
- 0
backend/web/js/backend.js View File

@@ -46,6 +46,7 @@ $(document).ready(function() {
opendistrib_product_prices() ;
opendistrib_confirm_delete() ;
opendistrib_product_availability_points_sale();
opendistrib_user_index();
opendistrib_menu_treeview();
}) ;

@@ -59,6 +60,12 @@ var UrlManager = {
}
};

function opendistrib_user_index() {
if($('body').hasClass('user-index')) {
$('#w0-filters input:first').focus();
}
}

function opendistrib_menu_treeview() {
$('li.treeview a').unbind('click').click(function() {
var href = $(this).attr('href');

Loading…
Cancel
Save