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
- SHA1:
3
- metadata.gz: 13fbe8a348a082c445d93eb308b2ea965a34c4ad
4
- data.tar.gz: c05dd0e6b9e3dab1dc79a023454c272bb814fb77
2
+ SHA256:
3
+ metadata.gz: 1078a156470857ec35278af91f9777701f9b4723cfc3e0c3dbf3649a606dd793
4
+ data.tar.gz: 839f5f11fd4793e8c95447a99b44c69971a9fec2327603ae748dba65b8a14660
5
5
  SHA512:
6
- metadata.gz: c667c7c35ed1b4cce53deda11442c4879b28ca2e6c4369b983cc3ff145aa16924e8c24d55ab920fa38c4e44a6582fadbb504b44d6aacd68de3e1a48d8bcbcf43
7
- data.tar.gz: 322d5f44452c82d0c41299e73bcf9b4400617af6239e871e6bddc7d950d8f33d97762cfb070552e3d014a048e7c5e652d3a7aea0071a96f623aa4e01ff7dc661
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 .edit a": "toggleEditView"
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).parent().addClass('active')
20
- $('.edit a').parent().removeClass('active')
21
- $('#preview').html('Loading...')
22
- $('#note_body').hide()
23
- $('#preview').show()
24
- $.post '/notes/preview', {body: $('#note_body').val()}, (data)->
25
- $('#preview').html(data)
26
- false
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: 15px; }
13
+ a { font-size: 16px; }
13
14
  }
14
- .info { color: #AAA; font-size: 12px; }
15
+ .info { color: #999; font-size: 14px; }
15
16
  }
16
17
 
17
18
  .markdown {
@@ -2,6 +2,6 @@ module Homeland
2
2
  module Note
3
3
  NAME = 'note'
4
4
  DESCRIPTION = 'Note for Homeland.'
5
- VERSION = '0.2.0'
5
+ VERSION = '0.2.1'
6
6
  end
7
7
  end
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.0
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: 2018-04-18 00:00:00.000000000 Z
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: '5'
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: '5'
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
- rubyforge_project:
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