dynaspan 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -0
- data/app/helpers/dynaspan/application_helper.rb +2 -1
- data/app/views/dynaspan/_dynaspan_text_area.html.erb +1 -1
- data/app/views/dynaspan/_dynaspan_text_field.html.erb +1 -1
- data/lib/dynaspan/version.rb +1 -1
- data/vendor/assets/javascripts/dynaspan/dynaspan.js +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98d6a9adf299b030cb5cc2a444d5bd4480b9a13c
|
4
|
+
data.tar.gz: d312099ffa1d0e843e4d4525802473ff588c264d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d44ed5db1cd4067d6b7763d9a6b4e778148ded767e0a39f3f13b66b596923ac968a90798703c5b6165af53950c2fef3c7b75a3e2bf2514ce4e1868e4b81a877e
|
7
|
+
data.tar.gz: 11472decede16e3f62ded5c0aaefbd099b0eaa07c2624eb6ca9cde8590d6473967da5685f29470e4c511d59281c1fe56b36142d2914441614455ccb7c1d1f17a
|
data/README.md
CHANGED
@@ -68,6 +68,15 @@ calling parents with selectors. Example usage:
|
|
68
68
|
|
69
69
|
###What's New
|
70
70
|
|
71
|
+
####Version 0.0.9
|
72
|
+
|
73
|
+
JavaScript callback option now available. Whenever the Dynaspan field is submitted you can have Dynaspan call
|
74
|
+
your own JavaScript method.
|
75
|
+
|
76
|
+
{
|
77
|
+
callback_on_update: "someMethod('some-relative-instance-value');"
|
78
|
+
}
|
79
|
+
|
71
80
|
####Version 0.0.8
|
72
81
|
|
73
82
|
You can now provide an option hash as a last parameter. Current
|
@@ -37,7 +37,8 @@ module Dynaspan
|
|
37
37
|
attrib: attrib,
|
38
38
|
unique_ref_id: dynaspan_counter,
|
39
39
|
dyna_span_edit_text: edit_text,
|
40
|
-
hidden_fields: options[:hidden_fields]
|
40
|
+
hidden_fields: options[:hidden_fields],
|
41
|
+
ds_callback_on_update: options[:callback_on_update]
|
41
42
|
}
|
42
43
|
)
|
43
44
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%# This is used through the helper method dynaspan_text_area %>
|
2
|
-
<div id="dyna_span_block<%= unique_ref_id %>" class='dyna-span<%= ' ds-content-present' if (attr_object.try(attrib).present? || master_ds_object.try(attrib).present?) %>'>
|
2
|
+
<div id="dyna_span_block<%= unique_ref_id %>" <%= "data-ds-callback-on-update=\"#{ds_callback_on_update}\" " if ds_callback_on_update.present? %>class='dyna-span<%= ' ds-content-present' if (attr_object.try(attrib).present? || master_ds_object.try(attrib).present?) %>'>
|
3
3
|
<%= hidden_field_tag "last_dyna_span_val_#{unique_ref_id}", attr_object.try(attrib) || master_ds_object.try(attrib), id: "last_dyna_span_val_#{unique_ref_id}" %>
|
4
4
|
<div id="<%= "dyna_span_div#{unique_ref_id}" %>" style="display:none;">
|
5
5
|
<%= form_for(master_ds_object, method: :patch, remote: true, authenticity_token: true) do |f| %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%# This is used through the helper method dynaspan_text_field %>
|
2
|
-
<div id="dyna_span_block<%= unique_ref_id %>" class='dyna-span<%= ' ds-content-present' if (attr_object.try(attrib).present? || master_ds_object.try(attrib).present?) %>'>
|
2
|
+
<div id="dyna_span_block<%= unique_ref_id %>" <%= "data-ds-callback-on-update=\"#{ds_callback_on_update}\" " if ds_callback_on_update.present? %>class='dyna-span<%= ' ds-content-present' if (attr_object.try(attrib).present? || master_ds_object.try(attrib).present?) %>'>
|
3
3
|
<%= hidden_field_tag "last_dyna_span_val_#{unique_ref_id}", attr_object.try(attrib) || master_ds_object.try(attrib), id: "last_dyna_span_val_#{unique_ref_id}" %>
|
4
4
|
<div id="<%= "dyna_span_div#{unique_ref_id}" %>" style="display:none;">
|
5
5
|
<%= form_for(master_ds_object, method: :patch, remote: true, authenticity_token: true) do |f| %>
|
data/lib/dynaspan/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynaspan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel P. Clark
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: In place text editing with AJAX substituting text to input field.
|
14
14
|
email:
|