mirror of https://github.com/portainer/portainer
fix(templates): fixes an issue regarding template selection when paged
parent
913c580340
commit
8fcae6810e
|
@ -121,7 +121,7 @@
|
|||
</rd-widget-header>
|
||||
<rd-widget-body classes="padding">
|
||||
<div class="template-list">
|
||||
<div dir-paginate="tpl in templates | itemsPerPage: pagination_count" class="container-template hvr-underline-from-center" id="template_{{ $index }}" ng-click="selectTemplate($index)">
|
||||
<div dir-paginate="tpl in templates | itemsPerPage: pagination_count" class="container-template hvr-underline-from-center" id="template_{{ tpl.index }}" ng-click="selectTemplate(tpl.index)">
|
||||
<img class="logo" ng-src="{{ tpl.logo }}" />
|
||||
<div class="title">{{ tpl.title }}</div>
|
||||
<div class="description">{{ tpl.description }}</div>
|
||||
|
|
|
@ -184,7 +184,10 @@ function ($scope, $q, $state, $filter, Config, Info, Container, ContainerHelper,
|
|||
|
||||
function initTemplates() {
|
||||
Templates.get(function (data) {
|
||||
$scope.templates = data;
|
||||
$scope.templates = data.map(function(tpl,index){
|
||||
tpl.index = index;
|
||||
return tpl;
|
||||
});
|
||||
$('#loadTemplatesSpinner').hide();
|
||||
}, function (e) {
|
||||
$('#loadTemplatesSpinner').hide();
|
||||
|
|
Loading…
Reference in New Issue