Sha256: 44aa3d4a7e3776fd81a99d8f344ed1bb402180b1f491d8afd311b7e8f6f2b826
Contents?: true
Size: 1.41 KB
Versions: 1
Compression:
Stored size: 1.41 KB
Contents
<script type="text/ng-template" id="promethee/write/component/row"> <div ng-controller="RowController" class="row promethee-editor__component promethee-editor__component--row"> <div class="promethee-editor__toolbar"> Row <ng-include src="'promethee/write/toolbar'"></ng-include> </div> <div ng-show="editing" class="promethee-editor__wrapper"> </div> <ng-include src="'promethee/write/components'"></ng-include> <div class="clearfix"></div> <span class="btn btn-default btn-block" ng-click="addColumn()" style="margin: 0 6px 6px 6px;width: auto">Add column</span> </div> </script> <script> angular.injector(['ng', 'Promethee']).get('definitions').push({ name: 'Row', thumb: 'http://via.placeholder.com/300x200', data: { type: 'row', attributes: {}, children: [] } }); promethee.controller('RowController', ['$scope', function($scope) { $scope.allowedTypes = ['column']; $scope.addColumn = function() { this.component.children.push({ type: 'column', attributes: { size: 4, offset: 0 }, children: [] }) } $scope.editing = false; $scope.edit = function() { this.editing = true; }; $scope.complete = function() { this.editing = false; }; $scope.toggleEdit = function() { this.editing = !this.editing; }; }]); </script>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
promethee-1.0.16 | app/views/promethee/edit/write/component/_row.html.erb |