dynaspan 0.0.4 → 0.0.5

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: 776a6ddc1a853d0a2c2ae552317c068261929e87
4
- data.tar.gz: a20311de560f49266ce4c400043993eae7480cb8
3
+ metadata.gz: 49e0c7307a4aaa55cff2d0966fd46cc6dbfec210
4
+ data.tar.gz: 2e6049f9c65480051895b2c1171b6dac49edaa10
5
5
  SHA512:
6
- metadata.gz: 01ea874214a0c5b4b298d4f804a5ae27aa27d29d757ab8071dad0dcad85cd64c8a1fd49c6242e9b10ca2fec57e15eda5c4ca6955e7571705ee762331b80057cd
7
- data.tar.gz: 108e7acc82a5ad11e55ace636a88acebbf82ee35545d2bbad61e737dcdb3ac7410a3a7bbd176dfa26b9177e3131082f883c88dd23b1310f7dd8bed689db8db5c
6
+ metadata.gz: 76f858cdc40b7d37b0540713005185d5b5639d09503b67f37ed7ad1991df2222a91620edfea95d5873260e40f6dc33296d9e42863d0791b5ed40aec88bed4362
7
+ data.tar.gz: 95c613583563e022d5e8f0bb6a6be14e79271b9e5f26d8365f610975800351d7541c0ffa323795d3744fc60f9eb736d42cab12e7b192d627f788f9742d32a84b
data/README.md CHANGED
@@ -6,7 +6,7 @@ Dynaspan also accepts updating an attribute for a nested object, but only 1 leve
6
6
 
7
7
  ###Installation
8
8
 
9
- - [ ] Add `gem 'dynaspan'` to your Gemfile.
9
+ - [ ] Add `gem 'dynaspan', '~> 0.0.4'` to your Gemfile.
10
10
  - [ ] Run `bundle`.
11
11
  - [ ] Next add `include Dynaspan::ApplicationHelper` inside your **ApplicationHelper** module.
12
12
  - [ ] Add `//= require dynaspan/dynaspan` to your **application.js** file.
@@ -5,10 +5,10 @@
5
5
  <% if master_ds_object.nested_attributes_options.keys.any? {|i| i.to_s.=~(/#{attr_object.class.try(:model_name).try(:i18n_key).to_s}/) || i.to_s.=~(/#{attr_object.class.try(:table_name)}/) } and !attr_object.nil? %>
6
6
  <%= f.fields_for master_ds_object.nested_attributes_options.keys.select {|i| i.to_s.=~(/#{attr_object.class.model_name.i18n_key.to_s}/) || i.to_s.=~(/#{attr_object.class.table_name}/) }.first, attr_object do |a|%>
7
7
  <%= a.hidden_field :id, value: attr_object.id %>
8
- <%= a.text_area attrib, id: "dyna_span_field_val_#{unique_ref_id}", class: 'dyna-span form-control', onfocus: "$().dynaspan.upLast('#{unique_ref_id}');", onblur: "$().dynaspan.upHide('#{unique_ref_id}');" %>
8
+ <%= a.text_area attrib, id: "dyna_span_field_val_#{unique_ref_id}", class: 'dyna-span form-control dyna-span-input', onfocus: "$().dynaspan.upLast('#{unique_ref_id}');", onblur: "$().dynaspan.upHide('#{unique_ref_id}');" %>
9
9
  <% end %>
10
10
  <% else %>
11
- <%= f.text_area attrib, id: "dyna_span_field_val_#{unique_ref_id}", class: 'dyna-span form-control', onfocus: "$().dynaspan.upLast('#{unique_ref_id}');", onblur: "$().dynaspan.upHide('#{unique_ref_id}');" %>
11
+ <%= f.text_area attrib, id: "dyna_span_field_val_#{unique_ref_id}", class: 'dyna-span form-control dyna-span-input', onfocus: "$().dynaspan.upLast('#{unique_ref_id}');", onblur: "$().dynaspan.upHide('#{unique_ref_id}');" %>
12
12
  <% end %>
13
13
  <% end %>
14
14
  </div>
@@ -5,10 +5,10 @@
5
5
  <% if master_ds_object.nested_attributes_options.keys.any? {|i| i.to_s.=~(/#{attr_object.class.try(:model_name).try(:i18n_key).to_s}/) || i.to_s.=~(/#{attr_object.class.try(:table_name)}/) } and !attr_object.nil? %>
6
6
  <%= f.fields_for master_ds_object.nested_attributes_options.keys.select {|i| i.to_s.=~(/#{attr_object.class.model_name.i18n_key.to_s}/) || i.to_s.=~(/#{attr_object.class.table_name}/) }.first, attr_object do |a|%>
7
7
  <%= a.hidden_field :id, value: attr_object.id %>
8
- <%= a.text_field attrib, id: "dyna_span_field_val_#{unique_ref_id}", class: 'dyna-span form-control', onfocus: "$().dynaspan.upLast('#{unique_ref_id}');", onblur: "$().dynaspan.upHide('#{unique_ref_id}');" %>
8
+ <%= a.text_field attrib, id: "dyna_span_field_val_#{unique_ref_id}", class: 'dyna-span form-control dyna-span-input', onfocus: "$().dynaspan.upLast('#{unique_ref_id}');", onblur: "$().dynaspan.upHide('#{unique_ref_id}');" %>
9
9
  <% end %>
10
10
  <% else %>
11
- <%= f.text_field attrib, id: "dyna_span_field_val_#{unique_ref_id}", class: 'dyna-span form-control', onfocus: "$().dynaspan.upLast('#{unique_ref_id}');", onblur: "$().dynaspan.upHide('#{unique_ref_id}');" %>
11
+ <%= f.text_field attrib, id: "dyna_span_field_val_#{unique_ref_id}", class: 'dyna-span form-control dyna-span-input', onfocus: "$().dynaspan.upLast('#{unique_ref_id}');", onblur: "$().dynaspan.upHide('#{unique_ref_id}');" %>
12
12
  <% end %>
13
13
  <% end %>
14
14
  </div>
@@ -1,3 +1,3 @@
1
1
  module Dynaspan
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
@@ -1,4 +1,6 @@
1
- (function($){
1
+ // MIT LICENSE
2
+ // Copyright (c) 2014 Daniel P. Clark
3
+ (function($){
2
4
  $.fn.dynaspan = function(){};
3
5
 
4
6
  $.fn.dynaspan.upLast = function(uniq_id_ref){
@@ -6,8 +8,12 @@
6
8
  };
7
9
 
8
10
  $.fn.dynaspan.upShow = function(uniq_id_ref){
9
- $('#dyna_span_div' + uniq_id_ref).show().find('input').focus();
11
+ //setTimeout(
12
+ // function(){
13
+ $('#dyna_span_div' + uniq_id_ref).show().find('.dyna-span-input').focus();
10
14
  $('#dyna_span_span' + uniq_id_ref).hide();
15
+ // }, 0
16
+ //);
11
17
  };
12
18
 
13
19
  $.fn.dynaspan.upHide = function(uniq_id_ref){
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
4
+ version: 0.0.5
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-04 00:00:00.000000000 Z
11
+ date: 2014-12-09 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: