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: 913f9a70707dc21cc9cb45eaec8ee9edaa38c0ce
4
- data.tar.gz: e8627ef01220178d59c402ce83642c94d1b6a0d2
3
+ metadata.gz: f44b806e44773aaef00d1ed770577bedeffce5ca
4
+ data.tar.gz: 9a25014011ec7c17cfbc6f96ec322d509948f308
5
5
  SHA512:
6
- metadata.gz: 6f6edb2fec8c7a49e1d5b73244fdfce3766cc5de73b65c186c0737b314f8284b3502cea9358981346ad37ae91acaa118efe84dd007199161423729a1ef5fd51d
7
- data.tar.gz: fdfcdc167e33faf002db452d183477c39e753b519fa3ecebb8da6bbd684f5b22d9cf322a93368809cbc1143db375b6a11f7f4bc43a1be59f59f869b6159df873
6
+ metadata.gz: 3a66b012d71eb03806bf08db3801125ad987f9d528facb27c169d0bbfc7fbee29dd4cf0fdadad478b67f83a5b4ee849c1e4f6f95cd8386311fc98610a794c9ea
7
+ data.tar.gz: b1485b5dd9e31278595c5f60a9137d0e58c5c0cb3c998f8d3134fd24ea0bc69d0ee580c324ae3e254e79d4eeff9fffeae5c5462d2b6ffac52441497030c87ca2
@@ -11,6 +11,7 @@
11
11
  // about supported directives.
12
12
  //
13
13
  //= require jquery
14
+ //= require jquery_ujs
14
15
  //= require fuel/admin
15
16
  //= require fuel/facebook
16
17
  //= require fuel/sliding-panel
@@ -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
- var editor = new wysihtml5.Editor("fuel_post_content", { // id of textarea element
7
- toolbar: "editor", // id of toolbar element
8
- parserRules: wysihtml5ParserRules,
9
- stylesheets: "<%= stylesheet_path('fuel/wysihtml') %>"
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: submitUrl,
28
+ url: editorSubmitUrl,
28
29
  type: 'POST',
29
30
  autoUpload: true,
30
- formData: 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 = '//<%= @s3_direct_post.url.host %>/' + key;
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
- <%= javascript_include_tag "application" %>
20
+ <%# javascript_include_tag "application" %>
20
21
 
21
22
  <%= render 'fuel/admin/posts/editor' %>
22
23
 
data/lib/fuel/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Fuel
2
- VERSION = "0.3.33"
2
+ VERSION = "0.3.34"
3
3
  end
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.33
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-20 00:00:00.000000000 Z
11
+ date: 2015-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails