promethee 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/promethee/components/image/_edit.inspect.html.erb +13 -5
- data/app/views/promethee/components/image/_edit.move.html.erb +2 -2
- data/app/views/promethee/components/image/_show.html.erb +1 -3
- data/app/views/promethee/components/slider/_edit.define.html.erb +3 -1
- data/app/views/promethee/components/slider/_edit.inspect.html.erb +12 -3
- data/app/views/promethee/components/slider/_edit.move.html.erb +12 -0
- data/app/views/promethee/components/slider/_localize.html.erb +11 -1
- data/app/views/promethee/components/slider/_show.html.erb +1 -0
- data/lib/promethee/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e9310c26b839c49494d9aceffa60d8b46e37281
|
4
|
+
data.tar.gz: ac9017a60e6e5a019af5a7426575cbb0befb38a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cf9bbb70156397ace563ea34180c012b37ca8155b0d1f55cb367f362b05ea1eed917b983aa3d873a03ee83a2976f4c6813271a0c3ff14d48c4566a6fff78e0d
|
7
|
+
data.tar.gz: f2fc6e21b5635adb1c66a271f576c95976a1c8ae65e95327f6606dd989a448026789493e052ea333f17f3de4dac2b362fabad66493b5baa68127968716b755f6
|
@@ -10,12 +10,20 @@
|
|
10
10
|
</div>
|
11
11
|
|
12
12
|
<div class="form-group">
|
13
|
-
<label class="label-control">
|
14
|
-
<input class="form-control" ng-model="promethee.inspected.attributes.
|
13
|
+
<label class="label-control">Caption</label>
|
14
|
+
<input class="form-control" ng-model="promethee.inspected.attributes.caption">
|
15
15
|
</div>
|
16
16
|
|
17
|
-
<div class="
|
18
|
-
<
|
19
|
-
|
17
|
+
<div class="panel panel-default" ng-init="advancedConfigurationOpen = false">
|
18
|
+
<div class="panel-heading" ng-click="advancedConfigurationOpen = !advancedConfigurationOpen">
|
19
|
+
Advanced configuration
|
20
|
+
<%= fa_icon 'angle-down', class: 'fa-pull-right', 'ng-class': "{'fa-rotate-180': advancedConfigurationOpen}", style: 'font-size: 18px' %>
|
21
|
+
</div>
|
22
|
+
<div class="panel-body" ng-show="advancedConfigurationOpen">
|
23
|
+
<div class="form-group">
|
24
|
+
<label class="label-control">Alt</label>
|
25
|
+
<input class="form-control" ng-model="promethee.inspected.attributes.alt">
|
26
|
+
</div>
|
27
|
+
</div>
|
20
28
|
</div>
|
21
29
|
</script>
|
@@ -4,9 +4,9 @@
|
|
4
4
|
<img ng-src="/promethee/blob/{{component.attributes.blob.id}}"
|
5
5
|
class="img-responsive">
|
6
6
|
<figcaption ng-show="component.attributes.caption"
|
7
|
-
ng-bind-html="component.attributes.caption
|
7
|
+
ng-bind-html="component.attributes.caption"></figcaption>
|
8
8
|
</figure>
|
9
|
-
<div ng-hide="component.attributes.
|
9
|
+
<div ng-hide="component.attributes.blob_id">
|
10
10
|
<p ng-hide="editing"
|
11
11
|
class="text-center">Click to set the image</p>
|
12
12
|
</div>
|
@@ -7,8 +7,6 @@ caption = component[:attributes][:caption].to_s
|
|
7
7
|
<figure class="<%= promethee_class_for component %>">
|
8
8
|
<%= image_tag url_for(blob.variant(resize: '1920')), class: 'img-responsive', alt: alt if blob %>
|
9
9
|
<% if caption.present? %>
|
10
|
-
<figcaption>
|
11
|
-
<%= caption.html_safe %>
|
12
|
-
</figcaption>
|
10
|
+
<figcaption><%= caption %></figcaption>
|
13
11
|
<% end %>
|
14
12
|
</figure>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<script type="text/ng-template" id="promethee/components/slider/edit/inspect">
|
2
|
-
<div ui-sortable ng-model="promethee.inspected.children">
|
2
|
+
<div ui-sortable="{handle: '.handle'}" ng-model="promethee.inspected.children">
|
3
3
|
<div
|
4
4
|
class="panel panel-default"
|
5
5
|
ng-repeat="component in promethee.inspected.children"
|
6
6
|
>
|
7
7
|
<div class="panel-body">
|
8
|
-
<div class="row">
|
8
|
+
<div class="row handle">
|
9
9
|
<div class="col-xs-9">
|
10
10
|
<span class="label label-default">#{{$index + 1}}</span>
|
11
11
|
<span class="label label-info">{{component.type}}</span>
|
@@ -14,6 +14,15 @@
|
|
14
14
|
<ng-include src="'promethee/move/component'"></ng-include>
|
15
15
|
</div>
|
16
16
|
</div>
|
17
|
+
|
18
|
+
<div class="row">
|
19
|
+
<div class="col-xs-12">
|
20
|
+
<div class="form-group">
|
21
|
+
<label class="label-control">Text</label>
|
22
|
+
<summernote config="summernoteConfig" ng-model="promethee.inspected.attributes.contents['content-' + component.id]"></summernote>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</div>
|
17
26
|
</div>
|
18
27
|
</div>
|
19
28
|
</div>
|
@@ -33,7 +42,7 @@
|
|
33
42
|
|
34
43
|
var clone = function(object) {
|
35
44
|
return JSON.parse(JSON.stringify(object));
|
36
|
-
}
|
45
|
+
};
|
37
46
|
|
38
47
|
$scope.addItem = function(definition) {
|
39
48
|
var item = JSON.parse(JSON.stringify(definition.data));
|
@@ -16,5 +16,17 @@
|
|
16
16
|
$scope.parent_id = $scope.component.id;
|
17
17
|
$scope.parent_type = $scope.component.type;
|
18
18
|
$scope.components = $scope.component.children;
|
19
|
+
|
20
|
+
$scope.$watch('component.children.length', function() {
|
21
|
+
console.log('watch');
|
22
|
+
|
23
|
+
var keys = $scope.component.children.map(function(component) {
|
24
|
+
return 'content-' + component.id;
|
25
|
+
});
|
26
|
+
|
27
|
+
for(var key in $scope.component.attributes.contents) {
|
28
|
+
if(!keys.includes(key)) delete $scope.component.attributes.contents[key];
|
29
|
+
}
|
30
|
+
});
|
19
31
|
}]);
|
20
32
|
</script>
|
@@ -1,3 +1,13 @@
|
|
1
1
|
<script type="text/ng-template" id="promethee/components/slider/localize">
|
2
|
-
|
2
|
+
<div ng-repeat="key, content in component.master.attributes.contents">
|
3
|
+
<hr>
|
4
|
+
<div class="row">
|
5
|
+
<div class="col-md-6">
|
6
|
+
<div class="promethee-edit__wrapper" ng-bind-html="component.master.attributes.contents[key] | htmlSafe"></div>
|
7
|
+
</div>
|
8
|
+
<div class="col-md-6" ng-prevent-drag="true">
|
9
|
+
<summernote config="options" ng-model="component.attributes.contents[key]"></summernote>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
</div>
|
3
13
|
</script>
|
@@ -3,6 +3,7 @@
|
|
3
3
|
<% component[:children].each.with_index do |child, n| %>
|
4
4
|
<div class="item<%= ' active' if n.zero? %>">
|
5
5
|
<%= render 'promethee/show/component', component: child %>
|
6
|
+
<%= component[:attributes].dig(:contents, :"content-#{child.id}").to_s.html_safe %>
|
6
7
|
</div>
|
7
8
|
<% end %>
|
8
9
|
</div>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: promethee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julien Dargelos
|
@@ -341,7 +341,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
341
341
|
version: '0'
|
342
342
|
requirements: []
|
343
343
|
rubyforge_project:
|
344
|
-
rubygems_version: 2.6.
|
344
|
+
rubygems_version: 2.6.12
|
345
345
|
signing_key:
|
346
346
|
specification_version: 4
|
347
347
|
summary: Bring fire to your page
|