polyblock 0.3.5 → 0.3.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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/polyblock/polyblock.js.coffee +3 -2
- data/lib/polyblock/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 89cc1b54c98c9cccd0c5376b116d0a570c7377c1
|
|
4
|
+
data.tar.gz: 6a272bab405dd0ab54bacbf77dc973c8da0d655a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7a9ea4724e71b8c0e50f02f4045395ce2ee9623ba4b65aaf40296512b81eef79f4f7002129c49fc79859a8f94b94e7f1bc4809594f9eb5143e588d5fdef0cdc2
|
|
7
|
+
data.tar.gz: 8d96190c8c82683a1658fd42768abc166caf29c1edbd10ab5c72188a9e1f7e24ffd1d13f92ee2d32af8196611fbc0060470a15b0e62f919b32266e6fc742f5da
|
|
@@ -5,7 +5,8 @@ window.onbeforeunload = -> return "Are you sure you want to leave this page? You
|
|
|
5
5
|
$ ->
|
|
6
6
|
$(document).ready ->
|
|
7
7
|
# Find blocks
|
|
8
|
-
|
|
8
|
+
fetch_blocks = -> $(".polyblock[contenteditable='true']").not('.polyblock-condensed')
|
|
9
|
+
blocks = fetch_blocks()
|
|
9
10
|
return unless blocks.length
|
|
10
11
|
|
|
11
12
|
# Find switches
|
|
@@ -143,7 +144,7 @@ $ ->
|
|
|
143
144
|
when "HTML" then convertToTextarea block, html_beautify(content)
|
|
144
145
|
when "HAML" then $.post "/convert_html_to_haml", {html: content}, (data)=> convertToTextarea(block,data," ")
|
|
145
146
|
when "Markdown" then convertToTextarea block, html_beautify(content)
|
|
146
|
-
blocks =
|
|
147
|
+
blocks = fetch_blocks() if previousMode == "WYSIWYG"
|
|
147
148
|
blocks.each -> changeModes $(@)
|
|
148
149
|
$(@).siblings().removeClass("active").end().addClass("active")
|
|
149
150
|
|
data/lib/polyblock/version.rb
CHANGED