adeia 0.15.1 → 0.15.2

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: 605ce68d14c5ef2253c3781728549c7d2a1f3f96
4
- data.tar.gz: 5676dd30928133149c7065863b8efde3d74670de
3
+ metadata.gz: 4b08277fdb322062a8103b23b881081812ee24c9
4
+ data.tar.gz: 712d833cba713600dcc68bf2138f39f93b5c6278
5
5
  SHA512:
6
- metadata.gz: e71c77a3fa2bf4451eb47cccc57dba45b76e3d980b8f5e40d353439c8679c468148508cc18777b26ee85677393e96d3e0d67b6f32e571982b060b4a6a7d6ee9d
7
- data.tar.gz: 46155469ad139615faac10e783d627e14166989d709e8dfda97b3184469a838a69fce00c65cad3028cc754eb4efab4f16214a84beca3b681e76925b771a7b0d3
6
+ metadata.gz: 6563fa5410b78d7fff5d42c16938f3ae4b32f74cc1a5233e1fc9f568e0f769244de88c1f0a73133d5d083a30a088415fede04c1ddb67045a467ca744a94a0f07
7
+ data.tar.gz: 86a5f3306dd1eff5650f7cf4f43d932b45f0a3d4fce089b49d35ba3d421305e8a326fd44ac34c1c7d34e7dde54052ecac989e360908470b2edaf1e18dae36e72
@@ -1,5 +1,5 @@
1
- $(document).on("ready page:load", function() {
1
+ $(document).on("ready", function() {
2
2
  $('body').on("click", "#flash .close", function() {
3
3
  $('#flash').hide();
4
4
  });
5
- });
5
+ });
@@ -1,4 +1,4 @@
1
- $(document).on("ready page:load", function() {
1
+ $(document).on("ready", function() {
2
2
 
3
3
  $(".add-fields").click(function(e) {
4
4
  e.preventDefault();
@@ -6,8 +6,8 @@ $(document).on("ready page:load", function() {
6
6
  lastFields = $("." + type + "-fields:last"), newFields = lastFields.clone();
7
7
  count++;
8
8
  newFields.find("input, select")
9
- .attr("name", function( i, val ) { if(val) { return val.replace(/\d/, count) } })
10
- .attr("id", function( i, val ) { if(val) { return val.replace(/\d/, count) } })
9
+ .attr("name", function(i, val) { if(val) { return val.replace(/\d/, count) } })
10
+ .attr("id", function(i, val) { if(val) { return val.replace(/\d/, count) } })
11
11
  .val([]);
12
12
  newFields.find("label").attr("for", function( i, val ) { return val.replace(/\d/, count) });
13
13
  newFields.insertAfter(lastFields);
@@ -23,4 +23,4 @@ $(document).on("ready page:load", function() {
23
23
  fields.hide();
24
24
  });
25
25
 
26
- });
26
+ });
@@ -41,7 +41,7 @@ module Adeia
41
41
  private
42
42
 
43
43
  def permission_params
44
- params.require(:permission).permit(:permission_type, :adeia_element_id, :global_owner, :read_right, :create_right, :update_right, :destroy_right, :resource_id, actions_attributes: [:name])
44
+ params.require(:permission).permit(:permission_type, :adeia_element_id, :global_owner, :read_right, :create_right, :update_right, :destroy_right, :resource_id, actions_attributes: [:id, :name, :_destroy])
45
45
  end
46
46
 
47
47
  end
@@ -24,7 +24,7 @@ class Adeia::Permission < ActiveRecord::Base
24
24
  end
25
25
 
26
26
  def autosave_associated_records_for_actions
27
- self.actions = actions.reject{ |a| a._destroy == true }.map do |action|
27
+ self.actions = actions.reject{ |a| a.marked_for_destruction? }.map do |action|
28
28
  Adeia::Action.find_or_create_by(name: action.name)
29
29
  end
30
30
  end
@@ -4,7 +4,7 @@
4
4
 
5
5
  <%= f.label :permission_type %>
6
6
  <%= f.select :permission_type, options_for_enum(@permission, :permission_type) %>
7
-
7
+
8
8
  <%= f.label :adeia_element_id %>
9
9
  <%= f.collection_select :adeia_element_id, Adeia::Element.all, :id, :name %>
10
10
 
@@ -32,6 +32,8 @@
32
32
  <%= action_f.label :name %>
33
33
  <%= action_f.text_field :name %>
34
34
 
35
+ <%= action_f.hidden_field :_destroy, identifier: "destroy" %>
36
+
35
37
  <button class="remove-fields" data-type="actions"><%= t "adeia.permissions.form.actions.destroy" %></button>
36
38
  </div>
37
39
 
@@ -44,4 +46,4 @@
44
46
 
45
47
  <%= f.submit %>
46
48
 
47
- <% end %>
49
+ <% end %>
@@ -1,3 +1,3 @@
1
1
  module Adeia
2
- VERSION = "0.15.1"
2
+ VERSION = "0.15.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adeia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.1
4
+ version: 0.15.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - khcr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-06 00:00:00.000000000 Z
11
+ date: 2018-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails