sibu 0.1.14 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c61f2f2905326da60f6cd60d7a4288fda6c788b4
4
- data.tar.gz: ff7bb3dc20761e3919071963598eca29ad12fb61
3
+ metadata.gz: 1a3645e4994b5e3506134df59486cae37c4d1b1e
4
+ data.tar.gz: 64698eca039fff001046d5b317f022aa1fbc7027
5
5
  SHA512:
6
- metadata.gz: a0d470dac9b1215dd9d27e59b21e278c40beae5abbaed2dde2718348945dd9e42411c1e9ccef307e9cec56de5736cdc90d23684621e2a2574c1ace95861d8c28
7
- data.tar.gz: 9d7896645eb2ae46714c8f60acf0e379a93738ad159f075a986a79d5ff979e4d4b8f3b792e4628db91b1be897366901913024bf2e25cef084d18c7523d364a10
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
- opts = action_name != 'show' ? html_opts.merge({"data-sb-id" => id, "data-sb-entity" => @sb_entity == @site ? 'site' : 'page'}) : html_opts
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('duplicate')) {
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
@@ -1,3 +1,3 @@
1
1
  module Sibu
2
- VERSION = '0.1.14'
2
+ VERSION = '0.1.15'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sibu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Baptiste Vilain