activeadmin_pagedown 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
$(document).ready(function() {
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
$wmd_input = $('.wmd-input');
|
3
|
+
if ( $wmd_input.length > 0 ) {
|
4
|
+
|
5
|
+
$wmd_input.each(function( index ) {
|
6
|
+
$this = $(this);
|
7
|
+
$this.attr('id', 'wmd-input-' + index);
|
8
|
+
$this.closest('.pagedown_text').find('.wmd-preview').attr('id', 'wmd-preview-' + index);
|
9
|
+
$this.closest('.wmd-panel').find('.wmd-button-bar').attr('id', 'wmd-button-bar-' + index);
|
10
|
+
converter = Markdown.getSanitizingConverter();
|
11
|
+
options = {};
|
12
|
+
editor = new Markdown.Editor(converter, "-" + index, options );
|
13
|
+
editor.run();
|
14
|
+
});
|
15
|
+
}
|
5
16
|
});
|
@@ -2,7 +2,7 @@ class PagedownTextInput < Formtastic::Inputs::StringInput
|
|
2
2
|
|
3
3
|
|
4
4
|
def input_html_options
|
5
|
-
super.merge(:class => "wmd-input"
|
5
|
+
super.merge(:class => "wmd-input")
|
6
6
|
end
|
7
7
|
|
8
8
|
def to_html
|
@@ -11,13 +11,13 @@ class PagedownTextInput < Formtastic::Inputs::StringInput
|
|
11
11
|
label_html <<
|
12
12
|
|
13
13
|
template.content_tag(:div, :class => 'wmd-panel' ) do
|
14
|
-
template.content_tag(:div, "", :
|
14
|
+
template.content_tag(:div, "", :class => 'wmd-button-bar') <<
|
15
15
|
builder.text_area(method, input_html_options)
|
16
16
|
end <<
|
17
17
|
|
18
18
|
template.content_tag(:div, "", :style=> 'margin-top:20px' ) do
|
19
19
|
template.content_tag(:label, "Preview" ) <<
|
20
|
-
template.content_tag(:div, "", :
|
20
|
+
template.content_tag(:div, "", :class => "wmd-panel wmd-preview" )
|
21
21
|
end
|
22
22
|
end.html_safe
|
23
23
|
end
|
@@ -1,3 +1,3 @@
|
|
1
1
|
module ActiveAdminPagedown
|
2
|
-
VERSION = "0.0.
|
3
|
-
end
|
2
|
+
VERSION = "0.0.2"
|
3
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeadmin_pagedown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activeadmin
|
@@ -65,12 +65,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
65
65
|
- - ! '>='
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '0'
|
68
|
+
segments:
|
69
|
+
- 0
|
70
|
+
hash: 2812949798030819770
|
68
71
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
72
|
none: false
|
70
73
|
requirements:
|
71
74
|
- - ! '>='
|
72
75
|
- !ruby/object:Gem::Version
|
73
76
|
version: '0'
|
77
|
+
segments:
|
78
|
+
- 0
|
79
|
+
hash: 2812949798030819770
|
74
80
|
requirements: []
|
75
81
|
rubyforge_project:
|
76
82
|
rubygems_version: 1.8.24
|