volt-editable-text 0.0.2 → 0.0.3

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
2
  SHA1:
3
- metadata.gz: 0520aa3b7e25784180121ec29d8eeaccb0d00379
4
- data.tar.gz: 57eca1e21113414f4aaa1d3d6fc17a47f8c839b0
3
+ metadata.gz: 3d3165f891893aea9ba5adfe7a985c0ecfa0c736
4
+ data.tar.gz: 473371238b10134bde4099dc048397f3a29388cc
5
5
  SHA512:
6
- metadata.gz: 719ffff710f4f9963b74786dc9678cc0bb5a5d0164021b54823abd6489eb15afd8c1d4444b420fc0ff5e16fa161ab26aa7f01687781d9c444809961b747d677b
7
- data.tar.gz: 097f39860cefd1cde39787984fbc5a4aa971492d5111df77202f565e4fa7b1463bbabb908a98e87e0e50143aa9bca08599ced78d07c92695c7eaacb3d9cb3b4e
6
+ metadata.gz: 59e30cbe4dbe7108f7879fb1bf07bc4893cfc498fa9aefd9513643702f4b09981f02b0ed564fb2ff696db2ae24cca9cc86a247803d586515e3f06e3fa2c82476
7
+ data.tar.gz: 90a2d95475d1e7b01a9184909de01f213d34121fab309e4ece0b05c0a55c0d3a9b0ec23b1578f4289665593102270f9b6bb431836a921f525023dbdd22c7e396
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -1,29 +1,22 @@
1
1
  module EditableText
2
2
  class IndexController < ModelController
3
- model :page
4
-
5
- attr_reader :data
6
3
  attr_accessor :section
7
4
 
8
- def initialize(data)
9
- super
10
-
11
- @data = data
12
-
5
+ def index
13
6
  @toggled = ReactiveValue.new(false)
14
7
  end
15
8
 
16
9
  def toggled
17
10
  @toggled
18
11
  end
19
-
12
+
20
13
  def body_element
21
14
  Element.find('body')
22
15
  end
23
16
 
24
17
  def toggle_editing
25
18
  controller._toggled = (!controller._toggled).cur
26
-
19
+
27
20
  if controller._toggled.cur
28
21
  # Editing enabled, bind a listener for when they click on the document to disable
29
22
  # it again.
@@ -44,7 +37,7 @@ module EditableText
44
37
  def edit(event)
45
38
  if event.key_code == 13
46
39
  event.stop
47
-
40
+
48
41
  toggle_editing
49
42
  end
50
43
  end
@@ -1,6 +1,6 @@
1
1
  <:Body>
2
2
  {#if controller._toggled}
3
- <input type="text" e-keypress="edit(event)" value="{data.value}" />
3
+ <input type="text" e-keypress="edit(event)" value="{@value}" />
4
4
  {#else}
5
- <span e-click="toggle_editing">{data.value}</span>
5
+ <span e-click="toggle_editing">{@value}</span>
6
6
  {/}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: volt-editable-text
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stout
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-19 00:00:00.000000000 Z
11
+ date: 2014-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: volt