bootstrap-wysihtml5-rails 0.2.5 → 0.2.6

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.
data/Rakefile CHANGED
@@ -8,6 +8,7 @@ task 'update' do
8
8
  system("cp bootstrap-wysihtml5/src/bootstrap-wysihtml5.css vendor/assets/stylesheets/bootstrap-wysihtml5.css")
9
9
  system("cp bootstrap-wysihtml5/src/bootstrap-wysihtml5.js vendor/assets/javascripts/bootstrap-wysihtml5.js")
10
10
  system("cp bootstrap-wysihtml5/lib/js/wysihtml5-0.3.0_rc2.js vendor/assets/javascripts/wysihtml5.js")
11
+ system("git status")
11
12
  end
12
13
 
13
14
  desc "Build the gem"
@@ -1,5 +1,5 @@
1
1
  module BootstrapWysihtml5Rails
2
2
  module Rails
3
- VERSION = "0.2.5"
3
+ VERSION = "0.2.6"
4
4
  end
5
5
  end
@@ -56,7 +56,7 @@
56
56
  + "<h3>Insert Image</h3>"
57
57
  + "</div>"
58
58
  + "<div class='modal-body'>"
59
- + "<input value='http://' class='bootstrap-wysihtml5-insert-link-url input-xlarge'>"
59
+ + "<input value='http://' class='bootstrap-wysihtml5-insert-image-url input-xlarge'>"
60
60
  + "</div>"
61
61
  + "<div class='modal-footer'>"
62
62
  + "<a href='#' class='btn' data-dismiss='modal'>Cancel</a>"
@@ -82,7 +82,7 @@
82
82
  "lists": true,
83
83
  "html": false,
84
84
  "link": true,
85
- "image": false,
85
+ "image": true,
86
86
  events: {},
87
87
  parserRules: {
88
88
  tags: {
@@ -130,8 +130,6 @@
130
130
  }
131
131
  });
132
132
  });
133
-
134
-
135
133
  };
136
134
 
137
135
  Wysihtml5.prototype = {
@@ -218,15 +216,12 @@
218
216
  var insertImageModal = toolbar.find('.bootstrap-wysihtml5-insert-image-modal');
219
217
  var urlInput = insertImageModal.find('.bootstrap-wysihtml5-insert-image-url');
220
218
  var insertButton = insertImageModal.find('a.btn-primary');
219
+ var initialValue = urlInput.val();
221
220
 
222
221
  var insertImage = function() {
223
222
  var url = urlInput.val();
224
- urlInput.val('');
225
- self.editor.composer.commands.exec("createLink", {
226
- href: url,
227
- target: "_blank",
228
- rel: "nofollow"
229
- });
223
+ urlInput.val(initialValue);
224
+ self.editor.composer.commands.exec("insertImage", url);
230
225
  };
231
226
 
232
227
  urlInput.keypress(function(e) {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap-wysihtml5-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -94,7 +94,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
94
94
  version: '0'
95
95
  segments:
96
96
  - 0
97
- hash: -3148264911314994071
97
+ hash: -4085197196618276745
98
98
  required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  none: false
100
100
  requirements:
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  version: '0'
104
104
  segments:
105
105
  - 0
106
- hash: -3148264911314994071
106
+ hash: -4085197196618276745
107
107
  requirements: []
108
108
  rubyforge_project:
109
109
  rubygems_version: 1.8.21