ack_rails_admin_settings 1.2.3.1 → 1.2.3.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7475254aec1be5faacfa836cb045f377cd5ed001
|
4
|
+
data.tar.gz: fca4672f725d0e6d08e7304f8bfd03f2e40c7f49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 093f8d1fd239916b4d205d0985181f7efdaa4e1f36a7b884172f64d6ba392b294b612b95851fe83a343c507c70a7498fa085e5e960a45487f4ef3769282ed496
|
7
|
+
data.tar.gz: 2e63f9930bb6d269166c38bf94648511987f235c4553e261ea74310d23e511943d5fedfc28bd6a2a7481194f159e0c1295b83fb9999062621065ea1326b86672
|
data/Gemfile.lock
CHANGED
@@ -1,43 +1,48 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
$(
|
1
|
+
if !window.rails_admin_settings or !window.rails_admin_settings.array_loaded
|
2
|
+
$(document).on "click", "#edit_rails_admin_settings_setting .raw_array_field .rails_admin_settings_array_element_add_link", (e)->
|
3
|
+
e.preventDefault()
|
4
|
+
link = $(e.currentTarget)
|
5
|
+
link_parent = link.parent()
|
6
|
+
link_parent.before(link.data('template'))
|
7
|
+
link_parent.prev().find('input:first').focus().select().trigger('change')
|
8
|
+
return false
|
9
|
+
|
10
|
+
|
11
|
+
$(document).on 'click', '#edit_rails_admin_settings_setting .raw_array_field .rails_admin_settings_array_element_delete_link', (e)->
|
12
|
+
e.preventDefault()
|
13
|
+
hidden_field = $(e.currentTarget).closest(".raw_array_field").find("[type='hidden']")
|
14
|
+
$(e.currentTarget).parent().remove()
|
15
|
+
hidden_field.trigger('change')
|
16
|
+
return false
|
17
|
+
|
18
|
+
|
19
|
+
$(document).on 'click', '#edit_rails_admin_settings_setting .raw_array_field .rails_admin_settings_array_element_move_link', (e)->
|
20
|
+
e.preventDefault()
|
21
|
+
link = $(e.currentTarget)
|
22
|
+
array_element_block = link.parent()
|
23
|
+
if link.hasClass("up")
|
24
|
+
prev = array_element_block.prev(".rails_admin_settings_array_element_block")
|
25
|
+
array_element_block.insertBefore(prev) if prev.length > 0
|
26
|
+
if link.hasClass("down")
|
27
|
+
next = array_element_block.next(".rails_admin_settings_array_element_block")
|
28
|
+
array_element_block.insertAfter(next) if next.length > 0
|
29
|
+
return false
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
$(document).on "change", "#edit_rails_admin_settings_setting .raw_array_field :input", (e)->
|
34
|
+
field_block = $(e.currentTarget).closest(".raw_array_field")
|
35
|
+
hidden_field = field_block.find("[type='hidden']")
|
36
|
+
if field_block.find(":input:not([type='hidden'])").serializeArray().length == 0
|
37
|
+
hidden_field.prop('name', hidden_field.data('name')) if hidden_field.data('name')
|
38
|
+
else
|
39
|
+
hidden_field.data('name', hidden_field.prop('name')) if hidden_field.prop('name')
|
40
|
+
hidden_field.prop('name', '')
|
41
|
+
|
42
|
+
|
43
|
+
$(document).on "rails_admin.dom_ready", (e)->
|
44
|
+
$("#edit_rails_admin_settings_setting .raw_array_field").find(":input[type='hidden']").trigger('change')
|
45
|
+
|
46
|
+
|
47
|
+
window.rails_admin_settings ||= {}
|
48
|
+
window.rails_admin_settings.array_loaded = true
|
@@ -1,32 +1,37 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
if !window.rails_admin_settings or !window.rails_admin_settings.hash_loaded
|
2
|
+
$(document).on "click", "#edit_rails_admin_settings_setting .raw_hash_field .rails_admin_settings_hash_element_add_link", (e)->
|
3
|
+
e.preventDefault()
|
4
|
+
link = $(e.currentTarget)
|
5
|
+
link_parent = link.parent()
|
6
|
+
link_parent.before(link.data('template'))
|
7
|
+
$("#edit_rails_admin_settings_setting .raw_hash_field .rails_admin_settings_hash_element_block input:last").blur()
|
8
|
+
return false
|
8
9
|
|
9
10
|
|
10
|
-
$(document).on 'click', '#edit_rails_admin_settings_setting .raw_hash_field .rails_admin_settings_hash_element_delete_link', (e)->
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
$(document).on 'click', '#edit_rails_admin_settings_setting .raw_hash_field .rails_admin_settings_hash_element_delete_link', (e)->
|
12
|
+
e.preventDefault()
|
13
|
+
$(e.currentTarget).parent().remove()
|
14
|
+
return false
|
14
15
|
|
15
|
-
$(document).on 'blur', '#edit_rails_admin_settings_setting .raw_hash_field .rails_admin_settings_hash_element_key_field', (e)->
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
16
|
+
$(document).on 'blur', '#edit_rails_admin_settings_setting .raw_hash_field .rails_admin_settings_hash_element_key_field', (e)->
|
17
|
+
e.preventDefault()
|
18
|
+
input = $(e.currentTarget).siblings('input')
|
19
|
+
old_id = input.prop('id')
|
20
|
+
old_name = input.prop('name')
|
21
|
+
new_name = e.currentTarget.value
|
22
|
+
reg_for_id = /\[[^\[\]]+\]$/i
|
23
|
+
reg_for_name = /\[[^\[\]]+\]\]$/i
|
24
|
+
input.prop('id', old_id.replace(reg_for_id, "[" + new_name + "]"))
|
25
|
+
input.prop('name', old_name.replace(reg_for_name, "[" + new_name + "]]"))
|
26
|
+
return false
|
26
27
|
|
27
28
|
|
28
|
-
$(document).on 'blur', '#edit_rails_admin_settings_setting .raw_hash_field .rails_admin_settings_hash_element_block input', (e)->
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
29
|
+
$(document).on 'blur', '#edit_rails_admin_settings_setting .raw_hash_field .rails_admin_settings_hash_element_block input', (e)->
|
30
|
+
fields_block = $(e.currentTarget).closest(".controls")
|
31
|
+
fields_block.find('.value_field').each ->
|
32
|
+
$(this).parent().removeClass('duplicate')
|
33
|
+
fields_block.find('.value_field').not($(this)).filter("[name='" + this.name + "']").parent().addClass('duplicate')
|
34
|
+
|
35
|
+
|
36
|
+
window.rails_admin_settings ||= {}
|
37
|
+
window.rails_admin_settings.hash_loaded = true
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ack_rails_admin_settings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.3.
|
4
|
+
version: 1.2.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Kiseliev
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-08-
|
12
|
+
date: 2017-08-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mongoid
|