Sha256: 8dfc20df4aec8a3f6cd0f2bc9ee1280c309ec33ae066c39fa2db186070ad17fd

Contents?: true

Size: 1.18 KB

Versions: 2

Compression:

Stored size: 1.18 KB

Contents

<script type="text/ng-template" id="promethee/components/slider/edit/move">
  <%= render 'promethee/edit/move.header', type: 'slider' %>
      <div class="header">Slider</div>
      <div class="row" ng-controller="SliderMoveController">
        <div class="col-md-2" ng-repeat-start="component in components">
          <ng-include src="'promethee/move/component'"></ng-include>
        </div>
        <div class="clearfix" ng-if="$index%6 === 5" ng-repeat-end></div>
        <pre class="hidden">{{component.attributes.search = concatenateChildrenSearch(component)}}</pre>
      </div>
    </div>
  </div>
</script>

<script>
  promethee.controller('SliderMoveController', ['$scope', function($scope) {
    $scope.parent_id = $scope.component.id;
    $scope.parent_type = $scope.component.type;
    $scope.components = $scope.component.children;

    $scope.$watch('component.children.length', function() {
      var keys = $scope.component.children.map(function(component) {
        return 'content-' + component.id;
      });

      for(var key in $scope.component.attributes.contents) {
        if(!keys.includes(key)) delete $scope.component.attributes.contents[key];
      }
    });
  }]);
</script>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
promethee-1.5.2 app/views/promethee/components/slider/_edit.move.html.erb
promethee-1.5.0 app/views/promethee/components/slider/_edit.move.html.erb