Sha256: 37f7821fe00e4ac708c74b9ef2aa24082a92066257ef46f2ac72c346552e21bb
Contents?: true
Size: 1.51 KB
Versions: 24
Compression:
Stored size: 1.51 KB
Contents
<script type="text/ng-template" id="promethee/components/slider/edit/inspect"> <div ui-sortable ng-model="promethee.inspected.children"> <div class="panel panel-default" ng-repeat="component in promethee.inspected.children" > <div class="panel-body"> <div class="row"> <div class="col-xs-9"> <span class="label label-default">#{{$index + 1}}</span> <span class="label label-info">{{component.type}}</span> </div> <div class="col-xs-3"> <ng-include src="'promethee/move/component'"></ng-include> </div> </div> </div> </div> </div> <div class="pull-right btn-toolbar" ng-controller="SliderInspectorController"> <span ng-repeat="definition in itemDefinitions" class="btn btn-default" ng-click="addItem(definition)">Add {{definition.name}}</span> </div> </script> <script> promethee.controller('SliderInspectorController', ['$scope', 'identifier', function($scope, identifier) { var availableComponents = ['image', 'video']; $scope.itemDefinitions = $scope.promethee.definitions.filter(function(definition) { return availableComponents.includes(definition.data.type); }); var clone = function(object) { return JSON.parse(JSON.stringify(object)); } $scope.addItem = function(definition) { var item = JSON.parse(JSON.stringify(definition.data)); item.id = identifier.generate(); $scope.promethee.inspected.children.push(item); } }]) </script>
Version data entries
24 entries across 24 versions & 1 rubygems