sibu 0.3.5 → 0.3.6

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: f0247137935e5bd2cdb1c4c0ed338ac575e000ea
4
- data.tar.gz: f0811fd7d45678a8c6d14a0a0aed75e0d0698a8d
3
+ metadata.gz: 0f17889c285411b415b5437dd974bd0731e9b5f2
4
+ data.tar.gz: 687b8c0f5eff9bf46250bbe81f8e80583e730bac
5
5
  SHA512:
6
- metadata.gz: 4ee04e07b9ec5bf247fc9458e7f3c2e7122f1a91ebe9a98326d03555f80b1f5e27f43ff87c5701948200e92343aac84d9ac826e120cef776f9176dd70a55fb3d
7
- data.tar.gz: e5c5a1bd58c1e2f8661ded62b07e6bd45d274b492be584b7c01b5e77b829b59c3f62c03c9b5330e35e2891267f3c6d8be4f92f43e4f8ead92b129ec4208dbc16
6
+ metadata.gz: b58c092b6062a412a1062b54374e17af37316c919dcd9da98fdddf17630256f04d6034007e79f749e36f994a71240568d710b2fb93922170450c942e2faf1363
7
+ data.tar.gz: 533b5e9e098e8ca680e3123092860e1bc79e228cd1ce278367a2a74e46840ee60bc3b71685189c233f86d0c688796b90cf1bcb521590986603993de8dc166ad0
@@ -104,11 +104,15 @@ function initCropper(imgId) {
104
104
  });
105
105
  }
106
106
 
107
- function refreshAfterEdit(sectionId) {
107
+ function refreshAfterEdit(reload, sectionId) {
108
108
  var baseUrl = window.location.href.split('?')[0];
109
- if (sectionId) {
110
- window.location.href = baseUrl + '?edit_section=' + sectionId;
109
+ if (reload) {
110
+ if (sectionId) {
111
+ window.location.href = baseUrl + '?edit_section=' + sectionId;
112
+ } else {
113
+ window.location.href = baseUrl;
114
+ }
111
115
  } else {
112
- window.location.href = baseUrl;
116
+ window.history.replaceState(null, null, window.location.pathname);
113
117
  }
114
118
  }
@@ -84,6 +84,9 @@
84
84
  cursor: pointer;
85
85
  }
86
86
 
87
+ .sb-editing [data-type] {
88
+ min-width: 1em;
89
+ }
87
90
 
88
91
  .ql-snow .ql-tooltip[data-mode="link"]::before {
89
92
  content: "Adresse du lien :";
@@ -56,7 +56,7 @@
56
56
  editMode.find(".overlay_bottom").css("top", top + height);
57
57
  editMode.find(".overlay_left").css({"height": height, "width": left, "top": top});
58
58
  editMode.find(".overlay_right").css({"height": height, "left": left + width, "top": top});
59
- editMode.find(".edit_mode_actions").css({"top": (top <= 40 ? (top + height) : (top - 40 - 20)), left: left, width: width});
59
+ editMode.find(".edit_mode_actions").css({"top": (top <= 120 ? (top + height) : (top - 40 - 20)), left: left, width: width});
60
60
  editMode.find("#edit_section_msg").text("Modifier la section");
61
61
  editMode.show();
62
62
  if(!section.data('sb-repeat')) {
@@ -75,6 +75,7 @@
75
75
  }
76
76
 
77
77
  function cancelEditMode() {
78
+ refreshAfterEdit(false);
78
79
  $("#edit_mode_overlay").hide();
79
80
  cancelEdit();
80
81
  $(".sb-editing").removeClass("sb-editing");
@@ -2,5 +2,5 @@
2
2
  $("#edit_panel #edit_msg").html("<p class='sibu_alert'>Une erreur s'est produite lors de l'enregistrement.</p>");
3
3
  <% else %>
4
4
  $("#edit_panel").slideUp();
5
- refreshAfterEdit('<%= @section_id %>');
5
+ refreshAfterEdit(true, '<%= @section_id %>');
6
6
  <% end %>
@@ -1,5 +1,5 @@
1
1
  <% if @deleted %>
2
- refreshAfterEdit('<%= @section_id %>');
2
+ refreshAfterEdit(true, '<%= @section_id %>');
3
3
  <% else %>
4
4
  $("#edit_section_msg").text("La suppression n'a pas pu être effectuée.");
5
5
  <% end %>
data/lib/sibu/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sibu
2
- VERSION = '0.3.5'
2
+ VERSION = '0.3.6'
3
3
  end
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.3.5
4
+ version: 0.3.6
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: 2018-05-15 00:00:00.000000000 Z
11
+ date: 2018-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails