Sha256: ddbc479cac544e6e2ffc8c5624fcabcb1314ab63716eae2084ecf382a93227f7

Contents?: true

Size: 1.31 KB

Versions: 16

Compression:

Stored size: 1.31 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 ng-bind-html="parent.attributes.contents['content-' + component.id] | htmlSafe"></div>
        </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 = $scope.component;
    $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

16 entries across 16 versions & 1 rubygems

Version Path
promethee-1.6.14 app/views/promethee/components/slider/_edit.move.html.erb
promethee-1.6.13 app/views/promethee/components/slider/_edit.move.html.erb
promethee-1.6.12 app/views/promethee/components/slider/_edit.move.html.erb
promethee-1.6.11 app/views/promethee/components/slider/_edit.move.html.erb
promethee-1.6.10 app/views/promethee/components/slider/_edit.move.html.erb
promethee-1.6.8 app/views/promethee/components/slider/_edit.move.html.erb
promethee-1.6.7 app/views/promethee/components/slider/_edit.move.html.erb
promethee-1.6.6 app/views/promethee/components/slider/_edit.move.html.erb
promethee-1.6.5 app/views/promethee/components/slider/_edit.move.html.erb
promethee-1.6.4 app/views/promethee/components/slider/_edit.move.html.erb
promethee-1.6.3 app/views/promethee/components/slider/_edit.move.html.erb
promethee-1.6.2 app/views/promethee/components/slider/_edit.move.html.erb
promethee-1.6.1 app/views/promethee/components/slider/_edit.move.html.erb
promethee-1.6.0 app/views/promethee/components/slider/_edit.move.html.erb
promethee-1.5.4 app/views/promethee/components/slider/_edit.move.html.erb
promethee-1.5.3 app/views/promethee/components/slider/_edit.move.html.erb