Commit 7d102130 authored by El-gitano's avatar El-gitano

Correction du chargement des images et utilisation de ng-if à la place de ng-show quand nécessaire

parent d6818b26
......@@ -20,7 +20,7 @@
<div class="row ligne-filtres">
<!-- Bouton ajouter joueur (format compact) -->
<button ng-show="editable" type="button" class="btn btn-success bouton-ajouter-reduit pull-left" ng-click="ajouterJoueur()">
<button ng-if="editable" type="button" class="btn btn-success bouton-ajouter-reduit pull-left" ng-click="ajouterJoueur()">
<span class="glyphicon glyphicon-plus"></span>
</button>
......@@ -40,12 +40,12 @@
</div>
<!-- Bouton pour afficher/cacher les filtres du tableau -->
<button type="button" class="btn btn-default pull-right" ng-click="changerAffichageFiltres()" ng-show="filtrable()" ng-disabled="tableauVide()">
<button type="button" class="btn btn-default pull-right" ng-click="changerAffichageFiltres()" ng-if="filtrable()" ng-disabled="tableauVide()">
<span class="glyphicon glyphicon-filter"></span>
</button>
<!-- Groupe de boutons gérant le tri et son ordination -->
<div ng-show="triable()" class="btn-group container-sort pull-right" role="group">
<div ng-if="triable()" class="btn-group container-sort pull-right" role="group">
<!-- Ordre de tri -->
<button type="button" class="btn btn-default" ng-click="inverserTri()" ng-disabled="!sensTri || tableauVide()">
......@@ -86,18 +86,18 @@
<!-- Entête -->
<thead>
<tr>
<th ng-show="editable" data-field="checker" class="col-sm-1 vert-align text-center bordure-droite">
<th ng-if="editable" data-field="checker" class="col-sm-1 vert-align text-center bordure-droite">
<span ng-click="changerSelectionGlobale()" class="glyphicon box-selection" ng-class="{'glyphicon-unchecked':!selectionGlobale, 'glyphicon-check':selectionGlobale}"></span>
</th>
<th ng-repeat="entree in infos" data-field="{{entree.nomColonne | lowercase}}" class="col-sm-{{entree.tailleColonne}} text-center">{{entree.nomColonne}}</th>
<th data-field="edition" ng-show="editable" class="col-sm-2 text-center text-center">
<th data-field="edition" ng-if="editable" class="col-sm-2 text-center text-center">
<button class="btn btn-xs btn-danger" ng-disabled="nbSelection === 0" ng-click="supprimerSelection()">
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Supprimer {{nbSelection}} entrée(s)
</button>
</th>
</tr>
<tr ng-show="affichageFiltres">
<tr ng-if="filtrable" ng-show="affichageFiltres">
<th ng-repeat="entree in infos | filter:{filtrable:true}" class="col-sm-{{entree.tailleFiltre}}" colspan="{{tailleFiltres}}">
<input class="form-control" type="text" placeholder="Rechercher par {{entree.nomTriage | lowercase}}" focus-on="affichageFiltres" position="{{$first}}"/>
</th>
......@@ -111,19 +111,19 @@
</tr>
<tr ng-repeat="entree in entrees | orderBy:entreeTriSelection.champs:sensTri | slice:premiereEntree(false):derniereEntree(false) | filter:recherche">
<td data-title="checker" ng-show="editable" class="text-center bordure-droite vert-align">
<td data-title="checker" ng-if="editable" class="text-center bordure-droite vert-align">
<span ng-click="selectionnerEntree(entree)" class="glyphicon box-selection" ng-class="{'glyphicon-unchecked':!entree.selection, 'glyphicon-check':entree.selection}"></span>
</td>
<td ng-repeat="info in infos" data-title="info.nomColonne | lowercase" class="text-center vert-align">
<!-- URL d'image ou texte ? -->
<img ng-show="info.image" src="{{entree[info.champs]}}" alt="{{info.nomColonne | lowercase}}" height="30" width="50"/>
<span ng-hide="info.image">{{entree[info.champs]}}</span>
<img ng-if="info.image" ng-src="{{entree[info.champs]}}" alt="{{info.nomColonne | lowercase}}" height="30" width="50"/>
<span ng-if="!info.image">{{entree[info.champs]}}</span>
</td>
<td data-title="edition" ng-show="editable" class="text-center vert-align">
<td data-title="edition" ng-if="editable" class="text-center vert-align">
<div class="btn-group" role="group">
<!-- Bouton éditer -->
......@@ -144,7 +144,7 @@
</div>
</td>
</tr>
<tr ng-show="editable">
<tr ng-if="editable">
<td colspan="{{infos.length+editable+1}}">
<button type="button" ng-click="ajouterJoueur()" class="btn btn-success btn-block">
<span class="glyphicon glyphicon-plus"></span> Ajouter un joueur
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment