Sha256: 6259758c839b4192cadbe13b9e22f536b563bc48ce82476791c5d709511f1c4b
Contents?: true
Size: 1.55 KB
Versions: 2
Compression:
Stored size: 1.55 KB
Contents
<script type="text/ng-template" id="promethee/write/component/image"> <div ng-controller="ImageController" class="promethee-editor__component promethee-editor__component--image"> <div class="promethee-editor__toolbar"> Image <ng-include src="'promethee/write/toolbar'"></ng-include> </div> <div ng-show="editing" class="promethee-editor__wrapper"> <div class="form-group"> <label class="label-control">Url</label> <input ng-model="component.attributes.src" class="form-control" type="text"/> </div> <div class="form-group"> <label class="label-control">Alt</label> <input ng-model="component.attributes.alt" class="form-control" type="text"/> </div> </div> <div ng-show="component.attributes.src"> <img ng-click="edit()" ng-src="{{component.attributes.src}}" class="img-responsive"> </div> <div ng-hide="component.attributes.src"> <p ng-hide="editing" ng-click="edit()" class="text-center">Click to set the image</p> </div> </div> </script> <script> angular.injector(['ng', 'Promethee']).get('definitions').push({ name: 'Image', thumb: 'http://via.placeholder.com/300x200', data: { type: 'image', attributes: { src: 'https://source.unsplash.com/random/1920x1080' } } }); promethee.controller('ImageController', ['$scope', function($scope) { $scope.editing = false; $scope.edit = function() { this.editing = true; }; $scope.complete = function() { this.editing = false; }; }]); </script>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
promethee-1.0.15 | app/views/promethee/edit/write/component/_image.html.erb |
promethee-1.0.14 | app/views/promethee/edit/write/component/_image.html.erb |