sibu 0.1.14 → 0.1.15
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: 1a3645e4994b5e3506134df59486cae37c4d1b1e
|
4
|
+
data.tar.gz: 64698eca039fff001046d5b317f022aa1fbc7027
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fa0cce6ff2674f8929000aa63a1dad931020a65c03d82ec2407d6a2e70476e6f20bd1482163bd378ef9ccd4d512ec0f31862b75b508b20ec6b36d1e4fc9fccd
|
7
|
+
data.tar.gz: 351b29a13dd3460008c7b33ce0d2cee70b7b5e35421d82ecd6b097cdac42b9739de3081a28ce202454a9b93a6c2f51cf6c8c4f3495a7c595921d9071c671592e
|
@@ -144,14 +144,15 @@ module Sibu
|
|
144
144
|
|
145
145
|
def secsion(id, tag, html_opts = {}, &block)
|
146
146
|
@sb_section = [id]
|
147
|
-
|
147
|
+
rpt = html_opts.delete(:repeat)
|
148
|
+
opts = action_name != 'show' ? html_opts.merge({"data-sb-id" => id, "data-sb-repeat" => rpt, "data-sb-entity" => @sb_entity == @site ? 'site' : 'page'}) : html_opts
|
148
149
|
content_tag(tag, capture(self, &block), opts)
|
149
150
|
end
|
150
151
|
|
151
152
|
def secsions(id, tag, html_opts = {}, &block)
|
152
153
|
(@sb_entity.section(id).map.with_index do |elt, i|
|
153
154
|
@sb_section = [id, elt["id"]]
|
154
|
-
opts = action_name != 'show' ? html_opts.merge({"data-sb-id" => @sb_section.join('|'), "data-sb-entity" => @sb_entity == @site ? 'site' : 'page'}) : html_opts
|
155
|
+
opts = action_name != 'show' ? html_opts.merge({"data-sb-id" => @sb_section.join('|'), "data-sb-repeat" => true, "data-sb-entity" => @sb_entity == @site ? 'site' : 'page'}) : html_opts
|
155
156
|
content_tag(tag, capture(self, i, &block), opts)
|
156
157
|
end).join('').html_safe
|
157
158
|
end
|
@@ -65,7 +65,7 @@
|
|
65
65
|
editMode.find(".edit_mode_actions").css({"top": (top <= 40 ? (top + height) : (top - 40)), left: left, width: width});
|
66
66
|
editMode.find("#edit_section_msg").text("Modifier la section");
|
67
67
|
editMode.show();
|
68
|
-
if(!section.data('
|
68
|
+
if(!section.data('sb-repeat')) {
|
69
69
|
editMode.find("#clone_section").hide();
|
70
70
|
editMode.find("#delete_section").hide();
|
71
71
|
} else {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<% if @cloned %>
|
2
|
-
var section = $(".sibu_content_panel").find("[data-id='<%= @section_id %>']").first();
|
2
|
+
var section = $(".sibu_content_panel").find("[data-sb-id='<%= @section_id %>']").first();
|
3
3
|
var newSection = section.clone();
|
4
|
-
newSection.data("id", "<%= [@section_id.split('|')[0], @cloned["id"]].join('|') %>");
|
4
|
+
newSection.data("sb-id", "<%= [@section_id.split('|')[0], @cloned["id"]].join('|') %>");
|
5
5
|
section.after(newSection);
|
6
6
|
cancelEditMode();
|
7
7
|
<% else %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% if @deleted %>
|
2
|
-
$(".sibu_content_panel").find("[data-id='<%= @section_id %>']").first().remove();
|
2
|
+
$(".sibu_content_panel").find("[data-sb-id='<%= @section_id %>']").first().remove();
|
3
3
|
cancelEditMode();
|
4
4
|
<% else %>
|
5
5
|
$("#edit_section_msg").text("Une erreur s'est produite lors de la suppression.");
|
data/lib/sibu/version.rb
CHANGED