polyblock 0.9.8 → 0.9.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f27f08474cb1fd485e2a694418e5514b42aea79c
4
- data.tar.gz: bed9d5827e26440c09b72523f31bba79606a5206
3
+ metadata.gz: 0dbc9eda0536cf7f020fd91e2aa480106995d263
4
+ data.tar.gz: 0d8573b3296243a4a17c74b9b56d3450158780ff
5
5
  SHA512:
6
- metadata.gz: 979dcaf2d0c6d455be4b2c33fb65a3ded3d056790c8af3dd455298d5ad9d2373088de83337e686ce07654e6c67be44eb76a74e9b62fd1ba07a7daa07d765f68a
7
- data.tar.gz: da2764e8c43bd51ae5b91be442857eb50a5a41a65b8ed031994a753b00bd67a0b34e70c3a657b9a5641d94c2251fa76f105082ef7b7943a17e911fd0b30c753b
6
+ metadata.gz: ac156e689cff5b6b14085c972ab1c9c03c44cd2fe5d94894fc1bf90467c4a86c01e0f206a42451e5ea5c6a2d875969f9cd3367cba0ec3f37268bc6cf56c3b27a
7
+ data.tar.gz: f33025823d296e7cfb1eb117808cbee7bfb4546f437ccc88ff3b45ec09b3b3695467c228661f111c95275ed43ae0a9e06e5b0ca3d0a381292bdd6ef96db53c59
@@ -10,6 +10,7 @@ CKEDITOR.config.enterMode = CKEDITOR.ENTER_BR;
10
10
  //
11
11
 
12
12
  CKEDITOR.config.plugins += ',sourcedialog';
13
+ // CKEDITOR.config.removePlugins = 'iframe';
13
14
  CKEDITOR.config.toolbar_mini = [
14
15
  ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
15
16
  ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
@@ -78,4 +79,4 @@ CKEDITOR.editorConfig = function(config) {
78
79
  }
79
80
  }
80
81
  });
81
- };
82
+ };
@@ -89,12 +89,18 @@ jQuery ($)->
89
89
  saveChanges = (cb)->
90
90
  stopListening()
91
91
  showSavingChanges()
92
- pbs = $.map blocks, (b, i)->
93
- {
94
- id: $(b).attr("data-pbid"),
95
- name: $(b).attr("data-pbname"),
96
- content: $(b).html()
97
- }
92
+ original_scroll = x: window.scrollX, y: window.scrollY
93
+ pbs = $.map blocks, (block_element, i)->
94
+ block = $(block_element)
95
+ pbid = block.attr('data-pbid')
96
+ pbname = block.attr('data-pbname')
97
+ editor = CKEDITOR.instances[block.attr('id')]
98
+ editor.focus()
99
+ content = editor.getData()
100
+ editor.focusManager.blur true
101
+ $('*:focus').blur()
102
+ { id: pbid, name: pbname, content: content }
103
+ setTimeout (-> window.scrollTo original_scroll.x, original_scroll.y), 1
98
104
  $.post "/polyblock/update", {pbs: pbs}, (data)->
99
105
  showSavedChanges()
100
106
  editorModeOff ->
@@ -1,3 +1,3 @@
1
1
  module Polyblock
2
- VERSION = "0.9.8"
2
+ VERSION = "0.9.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polyblock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8
4
+ version: 0.9.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - MacKinley Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-06 00:00:00.000000000 Z
11
+ date: 2015-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails