sibu 0.8.3 → 0.8.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cddd12680eea5507eda3f1b851337aab642c5a2b
|
4
|
+
data.tar.gz: 9d6cf08c38f7459d759fda9ea6456d28234d8e29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6998bfcfb8d923ecaa92db0e5d7e8d225153e569e307f01fdda5bd5bc38b0366743ef60f656bd552d5b1ba54a16874a4a150aafd6c27be961bf330506b2ed465
|
7
|
+
data.tar.gz: 90e2d568bf8a02310aac7cc9c8419083c3708ad6532e611c0d3c6113738937add8a6eafee93b9bebd1eaad7aba4708254501eed9a8a91ec3f24a5eaac78a1cb4
|
@@ -113,6 +113,7 @@ function initQuillEditor(container) {
|
|
113
113
|
function initCustomCenter() {
|
114
114
|
var wrapper = $(".sibu_center > img"), centerPos = $(".sibu_center > #sibu_center_pos");
|
115
115
|
displayCurrentCenter(wrapper[0], centerPos);
|
116
|
+
$(".sibu_center > #sibu_center_desc").show();
|
116
117
|
wrapper.click(function(e) {
|
117
118
|
var rect = e.target.getBoundingClientRect();
|
118
119
|
var x = e.clientX - rect.left;
|
@@ -58,6 +58,10 @@ $sibu-color3 : #333 !default;
|
|
58
58
|
&.selected {
|
59
59
|
background-color: $sibu-color3;
|
60
60
|
}
|
61
|
+
|
62
|
+
&:hover {
|
63
|
+
cursor: pointer;
|
64
|
+
}
|
61
65
|
}
|
62
66
|
|
63
67
|
.sibu_form {
|
@@ -163,35 +167,6 @@ $sibu-color3 : #333 !default;
|
|
163
167
|
width: 70%;
|
164
168
|
max-height: calc(100vh - 300px);
|
165
169
|
overflow: auto;
|
166
|
-
|
167
|
-
.sibu_image {
|
168
|
-
position: relative;
|
169
|
-
span {
|
170
|
-
position: absolute;
|
171
|
-
z-index: -1;
|
172
|
-
line-height: 1;
|
173
|
-
width: 100%;
|
174
|
-
text-align: center;
|
175
|
-
top: 30px;
|
176
|
-
|
177
|
-
& + .selected {
|
178
|
-
background-color: transparentize($sibu-color3, 0.5);
|
179
|
-
}
|
180
|
-
}
|
181
|
-
}
|
182
|
-
|
183
|
-
img {
|
184
|
-
padding: 5px;
|
185
|
-
border: 1px solid $sibu-color3;
|
186
|
-
|
187
|
-
&.selected {
|
188
|
-
background-color: $sibu-color3;
|
189
|
-
}
|
190
|
-
|
191
|
-
&:hover {
|
192
|
-
cursor: pointer;
|
193
|
-
}
|
194
|
-
}
|
195
170
|
}
|
196
171
|
|
197
172
|
.sibu_selected_image {
|
@@ -219,6 +194,12 @@ $sibu-color3 : #333 !default;
|
|
219
194
|
color: white;
|
220
195
|
text-shadow: 0 2px grey;
|
221
196
|
}
|
197
|
+
|
198
|
+
#sibu_center_desc {
|
199
|
+
font-size: 10px;
|
200
|
+
line-height: 1.2;
|
201
|
+
margin-top: 5px;
|
202
|
+
}
|
222
203
|
}
|
223
204
|
}
|
224
205
|
|
@@ -7,13 +7,29 @@
|
|
7
7
|
<div class="sibu_select_images sibu_field">
|
8
8
|
<p>Sélectionnez ou <%= link_to 'téléchargez', new_image_path(page_id: @page.id, section_id: @section_id, entity_type: @entity_type,
|
9
9
|
element_id: @element_id, img_id: @element["id"], size: @size) %> une image</p>
|
10
|
-
|
11
|
-
<
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
10
|
+
<table class="sibu_images">
|
11
|
+
<thead>
|
12
|
+
<tr>
|
13
|
+
<th>Aperçu</th>
|
14
|
+
<th>Descriptif</th>
|
15
|
+
<th>Crédits</th>
|
16
|
+
</tr>
|
17
|
+
</thead>
|
18
|
+
<tbody>
|
19
|
+
<% site_images.each do |image| %>
|
20
|
+
<tr>
|
21
|
+
<td>
|
22
|
+
<span class="sibu_image" data-img-id="<%= image.id %>">
|
23
|
+
<%= image_tag image.file_url(:small), class: (@element["src"] == image.file_url(@size) ? 'selected' : ''),
|
24
|
+
data: {src: image.file_url(@size), alt: image.alt} %>
|
25
|
+
</span>
|
26
|
+
</td>
|
27
|
+
<td><%= image.alt %></td>
|
28
|
+
<td><%= image.credits %></td>
|
29
|
+
</tr>
|
30
|
+
<% end %>
|
31
|
+
</tbody>
|
32
|
+
</table>
|
17
33
|
</div>
|
18
34
|
<div class="sibu_selected_image">
|
19
35
|
<% if @element["src"] == DEFAULT_IMG || @element["src"].blank? %>
|
@@ -26,6 +42,7 @@
|
|
26
42
|
<div class="sibu_center">
|
27
43
|
<%= image_tag(@element["src"]) unless @element["src"] == DEFAULT_IMG || @element["src"].blank? %>
|
28
44
|
<div id="sibu_center_pos" style="display: none;">✕</div>
|
45
|
+
<div id="sibu_center_desc" style="display: none;"><em>Cliquez sur l'image pour la recentrer sur un point donné (à utiliser lorsque l'image est tronquée car la zone d'affichage est trop petite).</em></div>
|
29
46
|
</div>
|
30
47
|
<div class="sibu_field" style="display: <%= (@element["src"] == DEFAULT_IMG || @element["src"].blank?) ? 'none' : 'block' %>">
|
31
48
|
<%= label_tag 'element[alt]', 'Légende / texte alternatif' %>
|
@@ -38,15 +38,19 @@ editPanel.slideDown("fast", function() {
|
|
38
38
|
"text-align": wrapper.css("text-align")
|
39
39
|
});
|
40
40
|
<% when 'media' %>
|
41
|
-
var images = editPanel.find(".sibu_image
|
42
|
-
var customCenter = $("#custom_center")
|
41
|
+
var images = editPanel.find(".sibu_image");
|
42
|
+
var customCenter = $("#custom_center");
|
43
43
|
images.click(function() {
|
44
44
|
if(!$(this).hasClass('selected')) {
|
45
45
|
images.removeClass('selected');
|
46
46
|
$(this).addClass('selected');
|
47
|
-
$(
|
48
|
-
$("#
|
49
|
-
|
47
|
+
var imgElt = $(this).find("img");
|
48
|
+
$("#element_src").val(imgElt.data("src"));
|
49
|
+
$("#element_alt").val(imgElt.data("alt"));
|
50
|
+
editPanel.find(".sibu_center").html(
|
51
|
+
'<img src="' + $("#element_src").val() + '"/>' +
|
52
|
+
'<div id="sibu_center_pos" style="display: none;">✕</div>' +
|
53
|
+
'<div id="sibu_center_desc" style="display: none;"><em>Cliquez sur l\'image pour la recentrer sur un point donné (à utiliser lorsque l\'image est tronquée car la zone d\'affichage est trop petite)</em></div>');
|
50
54
|
editPanel.find(".sibu_selected_image > p:first-child").hide();
|
51
55
|
editPanel.find(".sibu_selected_image").find(".sibu_custom_center").show();
|
52
56
|
editPanel.find(".sibu_selected_image").find(".sibu_field").show();
|
@@ -69,6 +73,7 @@ editPanel.slideDown("fast", function() {
|
|
69
73
|
$("#element_class").val("");
|
70
74
|
$(".sibu_center").attr("style", "");
|
71
75
|
$(".sibu_center > #sibu_center_pos").hide();
|
76
|
+
$(".sibu_center > #sibu_center_desc").hide();
|
72
77
|
}
|
73
78
|
});
|
74
79
|
<% when 'link' %>
|
data/lib/sibu/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sibu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Baptiste Vilain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|