fuel 0.3.33 → 0.3.34
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: f44b806e44773aaef00d1ed770577bedeffce5ca
|
4
|
+
data.tar.gz: 9a25014011ec7c17cfbc6f96ec322d509948f308
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a66b012d71eb03806bf08db3801125ad987f9d528facb27c169d0bbfc7fbee29dd4cf0fdadad478b67f83a5b4ee849c1e4f6f95cd8386311fc98610a794c9ea
|
7
|
+
data.tar.gz: b1485b5dd9e31278595c5f60a9137d0e58c5c0cb3c998f8d3134fd24ea0bc69d0ee580c324ae3e254e79d4eeff9fffeae5c5462d2b6ffac52441497030c87ca2
|
@@ -2,32 +2,33 @@
|
|
2
2
|
$(function() {
|
3
3
|
$body = $("body");
|
4
4
|
|
5
|
+
var editorId = "fuel_post_content";
|
6
|
+
var editorStylesheetPath = "<%= stylesheet_path('fuel/wysihtml') %>";
|
7
|
+
var editorSubmitUrl = '<%= s3_direct_post.url %>';
|
8
|
+
var editorFormData = JSON.parse('<%= s3_direct_post.fields.to_json.html_safe %>');
|
9
|
+
var editorHostUrl = '//<%= @s3_direct_post.url.host %>/';
|
10
|
+
|
5
11
|
if ($("body").hasClass("posts-controller")){
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
12
|
+
var editor = new wysihtml5.Editor(editorId, { // id of textarea element
|
13
|
+
toolbar: "editor", // id of toolbar element
|
14
|
+
parserRules: wysihtml5ParserRules,
|
15
|
+
stylesheets: editorStylesheetPath
|
16
|
+
});
|
11
17
|
|
12
18
|
<% if s3_direct_post %>
|
13
19
|
$('.directUpload').each(function(i, elem) {
|
14
20
|
var fileInput = $(elem);
|
15
|
-
// var form = $(fileInput.parents('form:first'));
|
16
21
|
var submitButton = $(".save-button");
|
17
22
|
var progressBar = $("<div class='bar'></div>");
|
18
23
|
var barContainer = $("<div class='progress'></div>").append(progressBar);
|
19
|
-
// var submitUrl = fileInput.data("url");
|
20
|
-
// var formData = fileInput.data("formData");
|
21
|
-
var submitUrl = '<%= s3_direct_post.url %>';
|
22
|
-
var formData = JSON.parse('<%= s3_direct_post.fields.to_json.html_safe %>');
|
23
24
|
|
24
25
|
fileInput.after(barContainer);
|
25
26
|
fileInput.fileupload({
|
26
27
|
fileInput: fileInput,
|
27
|
-
url:
|
28
|
+
url: editorSubmitUrl,
|
28
29
|
type: 'POST',
|
29
30
|
autoUpload: true,
|
30
|
-
formData:
|
31
|
+
formData: editorFormData,
|
31
32
|
paramName: 'file', // S3 does not like nested name fields i.e. name="user[avatar_url]"
|
32
33
|
dataType: 'XML', // S3 returns XML if success_action_status is set to 201
|
33
34
|
replaceFileInput: false,
|
@@ -50,7 +51,7 @@
|
|
50
51
|
// extract key and generate URL from response
|
51
52
|
var key = $(data.jqXHR.responseXML).find("Key").text();
|
52
53
|
|
53
|
-
var newUrl =
|
54
|
+
var newUrl = editorHostUrl + key;
|
54
55
|
console.log(newUrl);
|
55
56
|
|
56
57
|
// set url in form
|
@@ -15,8 +15,9 @@
|
|
15
15
|
<main role="main" aria-label="main-content" class="<%= controller_name -%> <%= action_name -%> navbar-offset">
|
16
16
|
<%= yield %>
|
17
17
|
</main>
|
18
|
+
|
18
19
|
<%= javascript_include_tag "fuel/application" %>
|
19
|
-
|
20
|
+
<%# javascript_include_tag "application" %>
|
20
21
|
|
21
22
|
<%= render 'fuel/admin/posts/editor' %>
|
22
23
|
|
data/lib/fuel/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fuel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.34
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Francis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|