sibu 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/sibu/sibu.js.erb +9 -0
- data/app/controllers/sibu/pages_controller.rb +1 -0
- data/app/views/layouts/sibu/edit_content.html.erb +4 -1
- data/app/views/sibu/pages/clone_element.js.erb +1 -1
- data/app/views/sibu/pages/delete_element.js.erb +1 -1
- data/app/views/sibu/sites/index.html.erb +1 -1
- data/lib/sibu/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: 9c1ca172bea6e5ba5f500f8cda367d8155ee254d
|
4
|
+
data.tar.gz: 0f7ab7fd7b34b65a264aa0265dd3f267b102eb4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64365b46c750eefe62aac607a9347e65d9fb088551b15af15f93b98e3467c4d09b4cc4ff795e7d43ae245f89ba1a511358f743e416cc1bd35e38e20b7638b78a
|
7
|
+
data.tar.gz: 0dd3026521e37e9e91f73ec779f0a60c9f5f38bb8dca671bbfd80d9db0944013896ae0fa2dfbc58c0660072921ebe8e996d118bc2d3cab92d2a6d95dfb8e944d
|
@@ -102,4 +102,13 @@ function initCropper(imgId) {
|
|
102
102
|
$("#element_style").val("width: " + width + "; height: " + height + "; margin-left: " + marginLeft + "; margin-top: " + marginTop +"; max-width: none; max-height: none;");
|
103
103
|
}
|
104
104
|
});
|
105
|
+
}
|
106
|
+
|
107
|
+
function refreshAfterEdit(sectionId) {
|
108
|
+
var baseUrl = window.location.href.split('?')[0];
|
109
|
+
if (sectionId) {
|
110
|
+
window.location.href = baseUrl + '?edit_section=' + sectionId;
|
111
|
+
} else {
|
112
|
+
window.location.href = baseUrl;
|
113
|
+
}
|
105
114
|
}
|
@@ -83,6 +83,7 @@ module Sibu
|
|
83
83
|
@page = Sibu::Page.find(params[:page_id])
|
84
84
|
@site = Sibu::Site.includes(:pages).find(@page.site_id) if @page
|
85
85
|
@links = @site.pages_path_by_id if @site
|
86
|
+
@edit_section = params[:edit_section]
|
86
87
|
render :edit_content, layout: 'sibu/edit_content'
|
87
88
|
end
|
88
89
|
|
@@ -45,6 +45,9 @@
|
|
45
45
|
$(function () {
|
46
46
|
initOverlays();
|
47
47
|
sibuCallback("editContent");
|
48
|
+
<% unless @edit_section.blank? %>
|
49
|
+
$("[data-sb-overlay='<%= @edit_section %>']").click();
|
50
|
+
<% end %>
|
48
51
|
});
|
49
52
|
|
50
53
|
function setEditMode(section, overlay, left, top, width, height) {
|
@@ -205,7 +208,7 @@
|
|
205
208
|
var offset = section.offset();
|
206
209
|
var yOffset = offset.top - $(".sibu_content_panel").offset().top;
|
207
210
|
var width = section.outerWidth(), height = (section.outerHeight() === 0 ? childrenHeight(section) : section.outerHeight());
|
208
|
-
var overlay = $("<div>Modifier</div>");
|
211
|
+
var overlay = $("<div data-sb-overlay='" + section.attr("data-sb-id") + "'>Modifier</div>");
|
209
212
|
container.append(overlay);
|
210
213
|
overlay.css({top: yOffset, left: offset.left, width: width, height: height});
|
211
214
|
overlay.hover(function() {
|
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.3.
|
4
|
+
version: 0.3.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: 2018-
|
11
|
+
date: 2018-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|