rails_kindeditor 0.3.14 → 0.3.15

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: 49f55735781f4a21a72d13431378b822de72b0a0
4
- data.tar.gz: a0f0ba28aade0c9ecb1368b0e9dc4791158cc4cb
3
+ metadata.gz: 9b6cfb7130f199515719e293a4c199691661712a
4
+ data.tar.gz: 15881a605cca4945a17d87f11739bf6d8f513980
5
5
  SHA512:
6
- metadata.gz: e2f21d45a23f0d912b1263d70c697305e617a407d7db698961fc1ff8f2604baf14a1f86aba7972598ae2a69da85a873469e01df57d4dd20c51b994e46efb731e
7
- data.tar.gz: 6c1b0a19dd78a0380960044c2d9429cc6b88c6b091c179684fc24f0e0a83ee18ea48d64b5516fdac28a760884f1babce7d7d3b4da5dda0eef2d44cd6ce3f6c3b
6
+ metadata.gz: 1a71b336bcb4280a0b2edab79132834fdfb7a7889150a1dd533d922e71fdb62fc2aed35251f96fb6c6338d2183ced82a96971722f5259797c4683144c9929ffd
7
+ data.tar.gz: c3dd5813fe30b5d2fdff83bd50dfd9c60567776ab49f872dba6c7ee66bcf4b4660788520ee388f0d6bf21b2e7660117c10692861720dc54793069d8ed2a75892
data/README.md CHANGED
@@ -13,7 +13,7 @@ Deprecation: rails_kindeditor ~> v0.3.0 only support Rails3.1+!(include Rails3.1
13
13
  ### Add this to your Gemfile
14
14
 
15
15
  ```ruby
16
- gem 'rails_kindeditor', '~> 0.3.14'
16
+ gem 'rails_kindeditor', '~> 0.3.15'
17
17
  ```
18
18
 
19
19
  ### Run "bundle" command.
@@ -169,7 +169,7 @@ rails_kindeditor可以帮助你的rails程序集成kindeditor,包括了图片和
169
169
  ### 将下面代码加入Gemfile:
170
170
 
171
171
  ```ruby
172
- gem 'rails_kindeditor', '~> 0.3.11'
172
+ gem 'rails_kindeditor', '~> 0.3.15'
173
173
  ```
174
174
 
175
175
  ### 运行"bundle"命令:
@@ -1,4 +1,4 @@
1
1
  module RailsKindeditor
2
- VERSION = "0.3.14"
2
+ VERSION = "0.3.15"
3
3
  end
4
4
 
@@ -5,7 +5,7 @@
5
5
  * @author Roddy <luolonghao@gmail.com>
6
6
  * @website http://www.kindsoft.net/
7
7
  * @licence http://www.kindsoft.net/license.php
8
- * @version 4.1.6 (2013-03-24)
8
+ * @version 4.1.7 (2013-04-21)
9
9
  *******************************************************************************/
10
10
  (function (window, undefined) {
11
11
  if (window.KindEditor) {
@@ -17,7 +17,7 @@ if (!window.console) {
17
17
  if (!console.log) {
18
18
  console.log = function () {};
19
19
  }
20
- var _VERSION = '4.1.6 (2013-03-24)',
20
+ var _VERSION = '4.1.7 (2013-04-21)',
21
21
  _ua = navigator.userAgent.toLowerCase(),
22
22
  _IE = _ua.indexOf('msie') > -1 && _ua.indexOf('opera') == -1,
23
23
  _GECKO = _ua.indexOf('gecko') > -1 && _ua.indexOf('khtml') == -1,
@@ -5016,12 +5016,10 @@ KEditor.prototype = {
5016
5016
  statusbar.removeClass('statusbar').addClass('ke-statusbar')
5017
5017
  .append('<span class="ke-inline-block ke-statusbar-center-icon"></span>')
5018
5018
  .append('<span class="ke-inline-block ke-statusbar-right-icon"></span>');
5019
- function fullscreenResizeHandler(e) {
5020
- if (self.isCreated) {
5021
- self.resize(_docElement().clientWidth, _docElement().clientHeight, false);
5022
- }
5019
+ if (self._fullscreenResizeHandler) {
5020
+ K(window).unbind('resize', self._fullscreenResizeHandler);
5021
+ self._fullscreenResizeHandler = null;
5023
5022
  }
5024
- K(window).unbind('resize', fullscreenResizeHandler);
5025
5023
  function initResize() {
5026
5024
  if (statusbar.height() === 0) {
5027
5025
  setTimeout(initResize, 100);
@@ -5031,7 +5029,12 @@ KEditor.prototype = {
5031
5029
  }
5032
5030
  initResize();
5033
5031
  if (fullscreenMode) {
5034
- K(window).bind('resize', fullscreenResizeHandler);
5032
+ self._fullscreenResizeHandler = function(e) {
5033
+ if (self.isCreated) {
5034
+ self.resize(_docElement().clientWidth, _docElement().clientHeight, false);
5035
+ }
5036
+ };
5037
+ K(window).bind('resize', self._fullscreenResizeHandler);
5035
5038
  toolbar.select('fullscreen');
5036
5039
  statusbar.first().css('visibility', 'hidden');
5037
5040
  statusbar.last().css('visibility', 'hidden');
@@ -5476,6 +5479,7 @@ _plugin('core', function(K) {
5476
5479
  self.toolbar.disableAll(false);
5477
5480
  self.edit.design(true);
5478
5481
  self.toolbar.unselect('source');
5482
+ self.cmd.selection();
5479
5483
  }
5480
5484
  self.designMode = self.edit.designMode;
5481
5485
  });
@@ -5794,6 +5798,12 @@ _plugin('core', function(K) {
5794
5798
  html = html.replace(/<div\s+[^>]*data-ke-input-tag="([^"]*)"[^>]*>([\s\S]*?)<\/div>/ig, function(full, tag) {
5795
5799
  return unescape(tag);
5796
5800
  });
5801
+ html = html.replace(/(<input)((?:\s+[^>]*)?>)/ig, function($0, $1, $2) {
5802
+ if (!/\s+type="[^"]+"/i.test($0)) {
5803
+ return $1 + ' type="text"' + $2;
5804
+ }
5805
+ return $0;
5806
+ });
5797
5807
  }
5798
5808
  return html.replace(/(<(?:noscript|noscript\s[^>]*)>)([\s\S]*?)(<\/noscript>)/ig, function($0, $1, $2, $3) {
5799
5809
  return $1 + _unescape($2).replace(/\s+/g, ' ') + $3;
@@ -153,6 +153,8 @@ KindEditor.plugin('flash', function(K) {
153
153
  },
154
154
  'delete' : function() {
155
155
  self.plugin.getSelectedFlash().remove();
156
+ // [IE] 删除图片后立即点击图片按钮出错
157
+ self.addBookmark();
156
158
  }
157
159
  };
158
160
  self.clickToolbar(name, self.plugin.flash.edit);
@@ -310,6 +310,8 @@ KindEditor.plugin('image', function(K) {
310
310
  target = target.parent();
311
311
  }
312
312
  target.remove();
313
+ // [IE] 删除图片后立即点击图片按钮出错
314
+ self.addBookmark();
313
315
  }
314
316
  };
315
317
  self.clickToolbar(name, self.plugin.image.edit);
@@ -162,6 +162,8 @@ KindEditor.plugin('media', function(K) {
162
162
  },
163
163
  'delete' : function() {
164
164
  self.plugin.getSelectedMedia().remove();
165
+ // [IE] 删除图片后立即点击图片按钮出错
166
+ self.addBookmark();
165
167
  }
166
168
  };
167
169
  self.clickToolbar(name, self.plugin.media.edit);
@@ -569,7 +569,7 @@ KindEditor.plugin('table', function(K) {
569
569
  if (table.rows.length <= nextRowIndex) {
570
570
  return;
571
571
  }
572
- var cellIndex = _getCellIndex(table, row, cell); // 下一行单元格的index
572
+ var cellIndex = cell.cellIndex; // 下一行单元格的index
573
573
  if (nextRow.cells.length <= cellIndex) {
574
574
  return;
575
575
  }
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.14
4
+ version: 0.3.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Macrow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-26 00:00:00.000000000 Z
11
+ date: 2013-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: carrierwave