hydra-editor 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6661a8fe832c72842cbacaf90bb26a294a8da3be
4
- data.tar.gz: c463048fbe5673bfa3b2f7aef4623b6ca7f9742c
3
+ metadata.gz: c5937ac78d43f5fd201c63ef427ea0d6ea92a5dd
4
+ data.tar.gz: 3d49662b8bee6eec6e6b9a432dc4049dc8584832
5
5
  SHA512:
6
- metadata.gz: 6d1e3a97ef5dd7c3aa1b7a4e6ef7116253d21165bcf54c1c00d3d1c10f7c656db3c62ac6cdeed55e5550863033654d7f7872022e9e732246a48a08eeee645e65
7
- data.tar.gz: 27c5c1509eb5225c87121bf25dc63c87ffe825b3788ebc3666c07e84c5ed6e49db58774a5264acb100f12c8e84685345bc295a8a20024b5808975df77a1422dd
6
+ metadata.gz: a0f9dbe37836743e76b213ecba5f70c7fa6802767ca9f904553c303fd2a359074ea1cd1f4800483b620f19ca47bceeb0dd965eeb6f7679fee974540a578ab5b5
7
+ data.tar.gz: b2bb49f551f84ce0967bc757efcbdf2eabc60610310a25f2d5263fb5f589ec369ff7923ce74f47bfa8dc4beba98a9b8b423dd66cf3c4927fdd635ce7fecdb5c3
@@ -36,7 +36,7 @@
36
36
 
37
37
  function removeField () {
38
38
  // get parent and remove it
39
- $(this).parent().remove();
39
+ $(this).parent().parent().remove();
40
40
  return false;
41
41
  }
42
42
 
@@ -74,7 +74,7 @@ module RecordsHelperBehavior
74
74
 
75
75
  def more_or_less_button(key, html_class, symbol)
76
76
  # TODO, there could be more than one element with this id on the page, but the fuctionality doesn't work without it.
77
- content_tag('button', class: "#{html_class} btn", id: "additional_#{key}_submit", name: "additional_#{key}") do
77
+ content_tag('button', class: "#{html_class} btn btn-default", id: "additional_#{key}_submit", name: "additional_#{key}") do
78
78
  (symbol +
79
79
  content_tag('span', class: 'sr-only') do
80
80
  "add another #{key.to_s}"
@@ -1,5 +1,5 @@
1
1
  <% render_req ||= true # render_req is true for single file edit, false for batch edit%>
2
- <div class="control-group">
2
+ <div class="form-group">
3
3
  <% vals = f.object[key] %>
4
4
  <% if render_req && f.object.required?(key) %>
5
5
  <% tmp = '<span class="error">*</span>' + field_label(key) %>
@@ -1,8 +1,8 @@
1
- <div class="controls" <% if index == 0 %> id="additional_<%= key.to_s %>_clone" <% end %>>
2
- <% required = render_req && (index == 0) && f.object.required?(key) %>
3
- <%= text_field_tag "#{ActiveModel::Naming.singular(f.object)}[#{key.to_s}][]", v, :id => "#{ActiveModel::Naming.singular(f.object)}_#{key.to_s}", :class => "input-large", :required => required %>
1
+ <div class="input-group" <% if index == 0 %> id="additional_<%= key.to_s %>_clone" <% end %>>
2
+ <% required = render_req && index == 0 && f.object.required?(key) %>
3
+ <%= text_field_tag "#{ActiveModel::Naming.singular(f.object)}[#{key.to_s}][]", v, id: "#{ActiveModel::Naming.singular(f.object)}_#{key.to_s}", class: "form-control", required: required %>
4
4
  <% unless f.object.class.unique?(key) %>
5
- <%= render :partial=>"records/edit_fields/suffix", :locals=>{key: key, index: index} %>
5
+ <%= render "records/edit_fields/suffix", {key: key, index: index} %>
6
6
  <% end %>
7
7
  </div>
8
8
  <div id="additional_<%= key %>_elements"></div>
@@ -1,6 +1,7 @@
1
- <% if index == 0 %>
2
- <%= add_field(key) %>
3
- <% else %>
4
- <%= subtract_field(key) %>
5
- <% end %>
6
-
1
+ <span class="input-group-btn field-controls">
2
+ <% if index == 0 %>
3
+ <%= add_field(key) %>
4
+ <% else %>
5
+ <%= subtract_field(key) %>
6
+ <% end %>
7
+ </span>
@@ -1,3 +1,3 @@
1
1
  module HydraEditor
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydra-editor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-06 00:00:00.000000000 Z
12
+ date: 2014-07-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails