homeland-note 0.2.0 → 0.2.1
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1078a156470857ec35278af91f9777701f9b4723cfc3e0c3dbf3649a606dd793
|
4
|
+
data.tar.gz: 839f5f11fd4793e8c95447a99b44c69971a9fec2327603ae748dba65b8a14660
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c97ec9fbc3dd0f700b821ed46e69ff4cf0b3a1cbfebf62848f4fa60ad7c0821b316c52e438b2e50222fba204789288816c247f517a14163f38f97d8d728180d
|
7
|
+
data.tar.gz: 596fecf98fa911865c989b9141868b63b048094e6c8569b23803d07f4a5781eec906f54c54f7736d19b41a25928a223a091c8c33277589a9e74f8da7732657ec
|
@@ -1,29 +1,28 @@
|
|
1
1
|
window.NoteView = Backbone.View.extend
|
2
2
|
el: "body"
|
3
3
|
events:
|
4
|
-
"click .editor-toolbar .
|
5
|
-
"click .editor-toolbar .preview a": "togglePreviewView"
|
4
|
+
"click .editor-toolbar a.preview": "togglePreviewView"
|
6
5
|
|
7
6
|
initialize: (opts) ->
|
8
7
|
$("<div id='preview' class='markdown form-control' style='display:none;'></div>").insertAfter( $('#note_body') )
|
9
8
|
window._editor = new Editor()
|
10
9
|
|
11
|
-
toggleEditView: (e) ->
|
12
|
-
$(e.target).parent().addClass('active')
|
13
|
-
$('.preview a').parent().removeClass('active')
|
14
|
-
$('#preview').hide()
|
15
|
-
$('#note_body').show()
|
16
|
-
false
|
17
|
-
|
18
10
|
togglePreviewView: (e) ->
|
19
|
-
$(e.target)
|
20
|
-
$('
|
21
|
-
$('#
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
11
|
+
btn = $(e.target)
|
12
|
+
preview_box = $('#preview')
|
13
|
+
note_body = $('#note_body')
|
14
|
+
if btn.hasClass('active')
|
15
|
+
preview_box.hide()
|
16
|
+
note_body.show()
|
17
|
+
btn.removeClass('active')
|
18
|
+
else
|
19
|
+
btn.addClass('active')
|
20
|
+
note_body.hide()
|
21
|
+
preview_box.html('Loading...')
|
22
|
+
preview_box.css("height", note_body.height())
|
23
|
+
preview_box.show()
|
24
|
+
$.post '/notes/preview', {body: note_body.val()}, (data)->
|
25
|
+
preview_box.html(data)
|
27
26
|
false
|
28
27
|
|
29
28
|
document.addEventListener 'turbolinks:load', ->
|
@@ -1,5 +1,6 @@
|
|
1
1
|
#notes {
|
2
2
|
.info { color: #666; }
|
3
|
+
|
3
4
|
.media {
|
4
5
|
&:last-child {
|
5
6
|
padding-bottom: 0px;
|
@@ -9,9 +10,9 @@
|
|
9
10
|
padding: 15px 0;
|
10
11
|
|
11
12
|
.media-heading {
|
12
|
-
a { font-size:
|
13
|
+
a { font-size: 16px; }
|
13
14
|
}
|
14
|
-
.info { color: #
|
15
|
+
.info { color: #999; font-size: 14px; }
|
15
16
|
}
|
16
17
|
|
17
18
|
.markdown {
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: homeland-note
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
description: Note plugin for Homeland.
|
28
28
|
email:
|
29
29
|
- huacnlee@gmail.com
|
@@ -77,8 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: '0'
|
79
79
|
requirements: []
|
80
|
-
|
81
|
-
rubygems_version: 2.5.2
|
80
|
+
rubygems_version: 3.0.3
|
82
81
|
signing_key:
|
83
82
|
specification_version: 4
|
84
83
|
summary: Note plugin for Homeland
|