loyal_rails_kindeditor 0.0.1 → 0.0.2

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.
@@ -9,7 +9,9 @@ RailsKindeditor.setup do |config|
9
9
  config.upload_flash_ext = %w[swf flv]
10
10
  config.upload_media_ext = %w[swf flv mp3 wav wma wmv mid avi mpg asf rm rmvb]
11
11
  config.upload_file_ext = %w[doc docx xls xlsx ppt htm html txt zip rar gz bz2]
12
-
12
+
13
+ config.march_upload_host = 'http://assets.ruby800.com' # please set your host
14
+
13
15
  # Porcess upload image size
14
16
  # eg: 1600x1600 => 800x800
15
17
  # 1600x800 => 800x400
@@ -19,7 +19,9 @@ module RailsKindeditor
19
19
 
20
20
  mattr_accessor :upload_file_ext
21
21
  @@upload_file_ext = %w[doc docx xls xlsx ppt htm html txt zip rar gz bz2]
22
-
22
+
23
+ mattr_accessor :march_upload_host
24
+
23
25
  mattr_accessor :image_resize_to_limit
24
26
 
25
27
  def self.root_path
@@ -51,4 +53,4 @@ module RailsKindeditor
51
53
  yield self
52
54
  end
53
55
 
54
- end
56
+ end
@@ -31,6 +31,11 @@ module RailsKindeditor
31
31
  end
32
32
 
33
33
  def get_options(options)
34
+ options.reverse_merge!(
35
+ :basePath => "#{::RailsKindeditor.march_upload_host}/assets/kindeditor/",
36
+ :marchUploadHost => ::RailsKindeditor.march_upload_host
37
+ )
38
+
34
39
  options.delete(:editor_id)
35
40
  options.delete(:window_onload)
36
41
  options.reverse_merge!(:width => '100%')
@@ -67,4 +72,4 @@ module RailsKindeditor
67
72
  @template.send("kindeditor", @object_name, method, objectify_options(options))
68
73
  end
69
74
  end
70
- end
75
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loyal_rails_kindeditor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: