ledge 0.2.3 → 0.2.4
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/ledge/rows/text.coffee.erb +47 -42
- data/lib/ledge/version.rb +1 -1
- metadata +2 -4
- data/test/dummy/tmp/pids/server.pid +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 04720f10614faeff48955045c88af1f8e640063b
|
|
4
|
+
data.tar.gz: ac997f4ebbc0d69db31f99041d3c51764d4d5b19
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0f1b649a305f88c88c3261cba996fc258903868a076ba85e58652dd8da279f09da8049938c33ffcf001685d34d4e29cefab8fec5a4fa21025c84156a0f62c3d8
|
|
7
|
+
data.tar.gz: 080494a4f6c5a9e48b47432be992ca73b98e17b1e34b729add9734bc123c742a3d9859255766c9e13bc3d98a3e4ee29f902ece789d104aa6e187ca8af40268c7
|
|
@@ -1,49 +1,54 @@
|
|
|
1
1
|
# Icons: https://www.iconfinder.com/iconsets/silk2
|
|
2
2
|
|
|
3
3
|
class Text extends Row
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
type: "text"
|
|
5
|
+
name: "Text"
|
|
6
|
+
initial_content: "<p>Your text here..</p>"
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
8
|
+
options: ["bold", "italic", "underline", "strikeThrough", "createLink", "unlink", "insertImage", "floatLeft", "floatRight", "insertOrderedList", "insertUnorderedList", "indent", "outdent", "justifyLeft", "justifyCenter", "justifyRight", "justifyFull", "subscript", "superscript"]
|
|
9
|
+
icons:
|
|
10
|
+
"bold": "<%= asset_path('text_bold.png') %>"
|
|
11
|
+
"italic": "<%= asset_path('text_italic.png') %>"
|
|
12
|
+
"underline": "<%= asset_path('text_underline.png') %>"
|
|
13
|
+
"strikeThrough": "<%= asset_path('text_strikethrough.png') %>"
|
|
14
|
+
"createLink": "<%= asset_path('link_add.png') %>"
|
|
15
|
+
"unlink": "<%= asset_path('link_delete.png') %>"
|
|
16
|
+
"insertOrderedList": "<%= asset_path('text_list_numbers.png') %>"
|
|
17
|
+
"insertUnorderedList": "<%= asset_path('text_list_bullets.png') %>"
|
|
18
|
+
"indent": "<%= asset_path('text_indent.png') %>"
|
|
19
|
+
"outdent": "<%= asset_path('text_indent_remove.png') %>"
|
|
20
|
+
"justifyLeft": "<%= asset_path('text_align_left.png') %>"
|
|
21
|
+
"justifyCenter": "<%= asset_path('text_align_center.png') %>"
|
|
22
|
+
"justifyRight": "<%= asset_path('text_align_right.png') %>"
|
|
23
|
+
"justifyFull": "<%= asset_path('text_align_justify.png') %>"
|
|
24
|
+
"subscript": "<%= asset_path('text_subscript.png') %>"
|
|
25
|
+
"superscript": "<%= asset_path('text_superscript.png') %>"
|
|
26
|
+
"insertImage": "<%= asset_path('image_add.png') %>"
|
|
27
|
+
"floatLeft": "<%= asset_path('shape_align_left.png') %>"
|
|
28
|
+
"floatRight": "<%= asset_path('shape_align_right.png') %>"
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
30
|
+
on_option: (row, option) ->
|
|
31
|
+
args = null
|
|
32
|
+
success = true
|
|
33
|
+
switch option
|
|
34
|
+
when "createLink"
|
|
35
|
+
args = prompt("Where should the link take you? (Link URL)")
|
|
36
|
+
when "insertImage"
|
|
37
|
+
url = prompt("What is the image URL?")
|
|
38
|
+
if url
|
|
39
|
+
width = prompt("What is the image width (height will be calculated)?")
|
|
40
|
+
args = "<img class='img-thumbnail img-responsive' src='#{url}' width='#{width}'>"
|
|
41
|
+
option = "insertHTML"
|
|
42
|
+
else
|
|
43
|
+
success = false
|
|
44
|
+
when "floatRight"
|
|
45
|
+
$(window.getSelection().focusNode).addClass("pull-right")
|
|
46
|
+
return
|
|
47
|
+
when "floatLeft"
|
|
48
|
+
$(window.getSelection().focusNode).addClass("pull-left")
|
|
49
|
+
return
|
|
50
|
+
else
|
|
51
|
+
if success
|
|
52
|
+
document.execCommand(option, false, args)
|
|
48
53
|
|
|
49
54
|
window.Text = Text
|
data/lib/ledge/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ledge
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Birtles
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-07-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -402,7 +402,6 @@ files:
|
|
|
402
402
|
- test/dummy/tmp/cache/assets/development/sprockets/f72e72ebd1884d808afb460eaafa915f
|
|
403
403
|
- test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
|
404
404
|
- test/dummy/tmp/cache/assets/development/sprockets/fc52113c89ff2b34f4b2f696dae97d8a
|
|
405
|
-
- test/dummy/tmp/pids/server.pid
|
|
406
405
|
- test/ledge_test.rb
|
|
407
406
|
- test/test_helper.rb
|
|
408
407
|
homepage: http://github.com/JamesHBirtles/ledge
|
|
@@ -703,6 +702,5 @@ test_files:
|
|
|
703
702
|
- test/dummy/tmp/cache/assets/development/sprockets/f72e72ebd1884d808afb460eaafa915f
|
|
704
703
|
- test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
|
705
704
|
- test/dummy/tmp/cache/assets/development/sprockets/fc52113c89ff2b34f4b2f696dae97d8a
|
|
706
|
-
- test/dummy/tmp/pids/server.pid
|
|
707
705
|
- test/ledge_test.rb
|
|
708
706
|
- test/test_helper.rb
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
12520
|