bootstrap-wysihtml5-rails 0.3.1.19 → 0.3.1.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rvmrc +10 -5
- data/README.md +3 -10
- data/Rakefile +7 -2
- data/lib/bootstrap-wysihtml5-rails.rb +2 -2
- data/lib/bootstrap-wysihtml5-rails/version.rb +1 -1
- data/testapp/app/assets/javascripts/application.js +2 -1
- data/vendor/assets/javascripts/bootstrap-wysihtml5/core.js.erb +23 -11
- data/vendor/assets/javascripts/bootstrap-wysihtml5/locales/de-DE.js +2 -1
- metadata +13 -27
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d677d6beb4229ec2375734e26167982487ab36b4
|
4
|
+
data.tar.gz: a939716fc1d9a0c4d3d7c6aa6e548d0a8223778a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3b36d07ef7da14c6e60610edc494ba4678c250597367a8d10fc63fa284030a8e1f7d40b1ed29d22321a8650ede1054a93dfe6e0fc3b96aaf1b2f8765bd92ef9b
|
7
|
+
data.tar.gz: 773601b3cd8422c10ca29ebd4e614fffa8f7ef26468d6c2d203cab779304be00874caeb2a4e8804472dccde0b01b0c24d801aad2a6206fc5d1a25d762aa9c787
|
data/.rvmrc
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
|
7
7
|
# Only full ruby name is supported here, for short names use:
|
8
|
-
# echo "rvm use
|
9
|
-
environment_id="ruby-
|
8
|
+
# echo "rvm use 2.0.0" > .rvmrc
|
9
|
+
environment_id="ruby-2.0.0-p0@bootstrap-wysihtml5-rails"
|
10
10
|
|
11
11
|
# Uncomment the following lines if you want to verify rvm version per project
|
12
|
-
# rvmrc_rvm_version="1.
|
12
|
+
# rvmrc_rvm_version="1.19.0 (master)" # 1.10.1 seams as a safe start
|
13
13
|
# eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
|
14
14
|
# echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
|
15
15
|
# return 1
|
@@ -23,8 +23,13 @@ if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
|
|
23
23
|
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
|
24
24
|
then
|
25
25
|
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
|
26
|
-
|
27
|
-
|
26
|
+
for __hook in "${rvm_path:-$HOME/.rvm}/hooks/after_use"*
|
27
|
+
do
|
28
|
+
if [[ -f "${__hook}" && -x "${__hook}" && -s "${__hook}" ]]
|
29
|
+
then \. "${__hook}" || true
|
30
|
+
fi
|
31
|
+
done
|
32
|
+
unset __hook
|
28
33
|
else
|
29
34
|
# If the environment file has not yet been created, use the RVM CLI to select.
|
30
35
|
rvm --create "$environment_id" || {
|
data/README.md
CHANGED
@@ -34,21 +34,14 @@ This gem doesn't include Bootstrap. You can get Bootstrap here: https://github.c
|
|
34
34
|
|
35
35
|
## Configuration
|
36
36
|
|
37
|
-
|
37
|
+
Bootstrap-wysihtml5 depends on jquery and bootstrap.
|
38
38
|
|
39
|
+
app/assets/stylesheets/application.css
|
39
40
|
``` css
|
40
41
|
*= require bootstrap-wysihtml5
|
41
42
|
```
|
42
43
|
|
43
|
-
|
44
|
-
|
45
|
-
``` javascript
|
46
|
-
//= require jquery # Not included
|
47
|
-
//= require bootstrap-button # Not included
|
48
|
-
```
|
49
|
-
|
50
|
-
Add necessary javascript(s) files to app/assets/javascripts/application.js
|
51
|
-
|
44
|
+
app/assets/javascripts/application.js
|
52
45
|
```javascript
|
53
46
|
//= require bootstrap-wysihtml5
|
54
47
|
|
data/Rakefile
CHANGED
@@ -8,8 +8,11 @@ task 'update' do
|
|
8
8
|
dest_javascript_path = "vendor/assets/javascripts/bootstrap-wysihtml5"
|
9
9
|
dest_css_path = "vendor/assets/stylesheets/bootstrap-wysihtml5"
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
if Dir.exist?('bootstrap-wysihtml5')
|
12
|
+
system("cd bootstrap-wysihtml5 && git pull && cd ..")
|
13
|
+
else
|
14
|
+
system("git clone git://github.com/jhollingworth/bootstrap-wysihtml5.git bootstrap-wysihtml5")
|
15
|
+
end
|
13
16
|
|
14
17
|
system("cp #{origin_src_path}/bootstrap-wysihtml5.css #{dest_css_path}/core.css")
|
15
18
|
|
@@ -42,6 +45,8 @@ end
|
|
42
45
|
|
43
46
|
desc "Publish a new version"
|
44
47
|
task :publish => :build do
|
48
|
+
tags = `git tag`.split
|
49
|
+
system("git tag #{BootstrapWysihtml5Rails::Rails::VERSION}") unless tags.include?(BootstrapWysihtml5Rails::Rails::VERSION)
|
45
50
|
system("gem push bootstrap-wysihtml5-rails-#{BootstrapWysihtml5Rails::Rails::VERSION}.gem")
|
46
51
|
system("git push")
|
47
52
|
end
|
@@ -3,10 +3,10 @@ require "bootstrap-wysihtml5-rails/version"
|
|
3
3
|
|
4
4
|
module BootstrapWysihtml5Rails
|
5
5
|
module Rails
|
6
|
-
if ::Rails.version < "3.1"
|
6
|
+
if ::Rails.version.to_s < "3.1"
|
7
7
|
require "bootstrap-wysihtml5-rails/railtie"
|
8
8
|
else
|
9
9
|
require "bootstrap-wysihtml5-rails/engine"
|
10
10
|
end
|
11
11
|
end
|
12
|
-
end
|
12
|
+
end
|
@@ -13,6 +13,9 @@
|
|
13
13
|
"<li><a data-wysihtml5-command='formatBlock' data-wysihtml5-command-value='h1' tabindex='-1'>" + locale.font_styles.h1 + "</a></li>" +
|
14
14
|
"<li><a data-wysihtml5-command='formatBlock' data-wysihtml5-command-value='h2' tabindex='-1'>" + locale.font_styles.h2 + "</a></li>" +
|
15
15
|
"<li><a data-wysihtml5-command='formatBlock' data-wysihtml5-command-value='h3' tabindex='-1'>" + locale.font_styles.h3 + "</a></li>" +
|
16
|
+
"<li><a data-wysihtml5-command='formatBlock' data-wysihtml5-command-value='h4'>" + locale.font_styles.h4 + "</a></li>" +
|
17
|
+
"<li><a data-wysihtml5-command='formatBlock' data-wysihtml5-command-value='h5'>" + locale.font_styles.h5 + "</a></li>" +
|
18
|
+
"<li><a data-wysihtml5-command='formatBlock' data-wysihtml5-command-value='h6'>" + locale.font_styles.h6 + "</a></li>" +
|
16
19
|
"</ul>" +
|
17
20
|
"</li>";
|
18
21
|
},
|
@@ -50,6 +53,7 @@
|
|
50
53
|
"</div>" +
|
51
54
|
"<div class='modal-body'>" +
|
52
55
|
"<input value='http://' class='bootstrap-wysihtml5-insert-link-url input-xlarge'>" +
|
56
|
+
"<label class='checkbox'> <input type='checkbox' class='bootstrap-wysihtml5-insert-link-target' checked>" + locale.link.target + "</label>" +
|
53
57
|
"</div>" +
|
54
58
|
"<div class='modal-footer'>" +
|
55
59
|
"<a href='#' class='btn' data-dismiss='modal'>" + locale.link.cancel + "</a>" +
|
@@ -282,6 +286,7 @@
|
|
282
286
|
var self = this;
|
283
287
|
var insertLinkModal = toolbar.find('.bootstrap-wysihtml5-insert-link-modal');
|
284
288
|
var urlInput = insertLinkModal.find('.bootstrap-wysihtml5-insert-link-url');
|
289
|
+
var targetInput = insertLinkModal.find('.bootstrap-wysihtml5-insert-link-target');
|
285
290
|
var insertButton = insertLinkModal.find('a.btn-primary');
|
286
291
|
var initialValue = urlInput.val();
|
287
292
|
var caretBookmark;
|
@@ -294,10 +299,12 @@
|
|
294
299
|
self.editor.composer.selection.setBookmark(caretBookmark);
|
295
300
|
caretBookmark = null;
|
296
301
|
}
|
302
|
+
|
303
|
+
var newWindow = targetInput.prop("checked");
|
297
304
|
self.editor.composer.commands.exec("createLink", {
|
298
|
-
href: url,
|
299
|
-
target:
|
300
|
-
rel:
|
305
|
+
'href' : url,
|
306
|
+
'target' : (newWindow ? '_blank' : '_self'),
|
307
|
+
'rel' : (newWindow ? 'nofollow' : '')
|
301
308
|
});
|
302
309
|
};
|
303
310
|
var pressedEnter = false;
|
@@ -350,7 +357,7 @@
|
|
350
357
|
});
|
351
358
|
},
|
352
359
|
shallowExtend: function (options) {
|
353
|
-
var settings = $.extend({}, $.fn.wysihtml5.defaultOptions, options || {});
|
360
|
+
var settings = $.extend({}, $.fn.wysihtml5.defaultOptions, options || {}, $(this).data());
|
354
361
|
var that = this;
|
355
362
|
return methods.bypassDefaults.apply(that, [settings]);
|
356
363
|
},
|
@@ -416,6 +423,9 @@
|
|
416
423
|
"h1": {},
|
417
424
|
"h2": {},
|
418
425
|
"h3": {},
|
426
|
+
"h4": {},
|
427
|
+
"h5": {},
|
428
|
+
"h6": {},
|
419
429
|
"blockquote": {},
|
420
430
|
"u": 1,
|
421
431
|
"img": {
|
@@ -427,12 +437,10 @@
|
|
427
437
|
}
|
428
438
|
},
|
429
439
|
"a": {
|
430
|
-
set_attributes: {
|
431
|
-
target: "_blank",
|
432
|
-
rel: "nofollow"
|
433
|
-
},
|
434
440
|
check_attributes: {
|
435
|
-
href:
|
441
|
+
'href': "url", // important to avoid XSS
|
442
|
+
'target': 'alt',
|
443
|
+
'rel': 'alt'
|
436
444
|
}
|
437
445
|
},
|
438
446
|
"span": 1,
|
@@ -456,7 +464,10 @@
|
|
456
464
|
normal: "Normal text",
|
457
465
|
h1: "Heading 1",
|
458
466
|
h2: "Heading 2",
|
459
|
-
h3: "Heading 3"
|
467
|
+
h3: "Heading 3",
|
468
|
+
h4: "Heading 4",
|
469
|
+
h5: "Heading 5",
|
470
|
+
h6: "Heading 6"
|
460
471
|
},
|
461
472
|
emphasis: {
|
462
473
|
bold: "Bold",
|
@@ -471,7 +482,8 @@
|
|
471
482
|
},
|
472
483
|
link: {
|
473
484
|
insert: "Insert link",
|
474
|
-
cancel: "Cancel"
|
485
|
+
cancel: "Cancel",
|
486
|
+
target: "Open link in new window"
|
475
487
|
},
|
476
488
|
image: {
|
477
489
|
insert: "Insert image",
|
metadata
CHANGED
@@ -1,62 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap-wysihtml5-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.3.1.20
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Gonzalo Rodríguez-Baltanás Díaz
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-05-10 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: railties
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '3.0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '3.0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: bundler
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '1.0'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '1.0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rake
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
description: A wysiwyg text editor for Twitter Bootstrap
|
@@ -168,32 +161,25 @@ files:
|
|
168
161
|
- vendor/assets/stylesheets/bootstrap-wysihtml5/wysiwyg-color.css
|
169
162
|
homepage: https://github.com/Nerian/bootstrap-wysihtml5-rails
|
170
163
|
licenses: []
|
164
|
+
metadata: {}
|
171
165
|
post_install_message:
|
172
166
|
rdoc_options: []
|
173
167
|
require_paths:
|
174
168
|
- lib
|
175
169
|
required_ruby_version: !ruby/object:Gem::Requirement
|
176
|
-
none: false
|
177
170
|
requirements:
|
178
|
-
- -
|
171
|
+
- - '>='
|
179
172
|
- !ruby/object:Gem::Version
|
180
173
|
version: '0'
|
181
|
-
segments:
|
182
|
-
- 0
|
183
|
-
hash: 1845273924155229667
|
184
174
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
185
|
-
none: false
|
186
175
|
requirements:
|
187
|
-
- -
|
176
|
+
- - '>='
|
188
177
|
- !ruby/object:Gem::Version
|
189
178
|
version: '0'
|
190
|
-
segments:
|
191
|
-
- 0
|
192
|
-
hash: 1845273924155229667
|
193
179
|
requirements: []
|
194
180
|
rubyforge_project:
|
195
|
-
rubygems_version:
|
181
|
+
rubygems_version: 2.0.3
|
196
182
|
signing_key:
|
197
|
-
specification_version:
|
183
|
+
specification_version: 4
|
198
184
|
summary: A wysiwyg text editor for Twitter Bootstrap
|
199
185
|
test_files: []
|