rails_kindeditor 0.3.18 → 0.3.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/rails_kindeditor/version.rb +1 -1
- data/vendor/assets/javascripts/kindeditor/kindeditor.js +13 -3
- 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: f051713b361f1eaeb094c8ff8ea1f9399cfe99d4
|
4
|
+
data.tar.gz: ead6e7b8a42d747ecf889e64bff980f3df6c80fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95f844d3a29b958041be1066e50bc89683d55fd107df9aee43389220343be7cb1a404bdd8a1a0adbb4af6bd5762e27e535c7e0bcc376860139f3cf2e1bd40125
|
7
|
+
data.tar.gz: 2e1447e268d1080dd332d2760bdce1efb9a738a9b2e3db1831638c7bc63a4a8d09b5cf5ea7dd264f87e26e1657b2714dac75b2d347e92b9dfd72de65c9f7fbd5
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ rails_kindeditor will helps your rails app integrate with kindeditor, includes i
|
|
10
10
|
### Add this to your Gemfile
|
11
11
|
|
12
12
|
```ruby
|
13
|
-
gem 'rails_kindeditor', '~> 0.3.
|
13
|
+
gem 'rails_kindeditor', '~> 0.3.19'
|
14
14
|
```
|
15
15
|
|
16
16
|
### Run "bundle" command.
|
@@ -172,7 +172,7 @@ rails_kindeditor可以帮助你的rails程序集成kindeditor,包括了图片和
|
|
172
172
|
### 将下面代码加入Gemfile:
|
173
173
|
|
174
174
|
```ruby
|
175
|
-
gem 'rails_kindeditor', '~> 0.3.
|
175
|
+
gem 'rails_kindeditor', '~> 0.3.19'
|
176
176
|
```
|
177
177
|
|
178
178
|
### 运行"bundle"命令:
|
@@ -212,17 +212,27 @@ var _INLINE_TAG_MAP = _toMap('a,abbr,acronym,b,basefont,bdo,big,br,button,cite,c
|
|
212
212
|
_AUTOCLOSE_TAG_MAP = _toMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'),
|
213
213
|
_FILL_ATTR_MAP = _toMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected'),
|
214
214
|
_VALUE_TAG_MAP = _toMap('input,button,textarea,select');
|
215
|
+
|
216
|
+
// Begining of modification by Macrow
|
215
217
|
function _getBasePath() {
|
216
218
|
var els = document.getElementsByTagName('script'), src;
|
217
219
|
for (var i = 0, len = els.length; i < len; i++) {
|
218
220
|
src = els[i].src || '';
|
219
|
-
if (/kindeditor[\w\-\.]*\.js/.test(src)) {
|
221
|
+
if (/kindeditor[\w\-\.]*\.js/.test(src)) { // in development mode
|
220
222
|
return src.substring(0, src.lastIndexOf('/') + 1);
|
221
223
|
}
|
224
|
+
if (/application[\w\-\.]*\.js/.test(src)) { // in production mode, we need application.js.
|
225
|
+
return src.substring(0, src.lastIndexOf('/') + 1) + 'kindeditor/';
|
226
|
+
}
|
227
|
+
if (/[\w\-\.]*\.js/.test(src)) { // if no application.js found, we just use the first js file path.
|
228
|
+
return src.substring(0, src.lastIndexOf('/') + 1) + 'kindeditor/';
|
229
|
+
}
|
222
230
|
}
|
223
|
-
return '';
|
231
|
+
return '/assets/kindeditor/';
|
224
232
|
}
|
225
|
-
|
233
|
+
// End of modification by Macrow
|
234
|
+
|
235
|
+
K.basePath = _getBasePath();
|
226
236
|
K.options = {
|
227
237
|
designMode : true,
|
228
238
|
fullscreenMode : false,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_kindeditor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Macrow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: carrierwave
|