rails_admin_simple_has_many 0.0.2 → 0.0.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1889586995384f60b27388e998fd642077734fd
|
4
|
+
data.tar.gz: 3fc065aa20a170431d02417cd5eba5bd0490a9de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e9417774ba14c4b56c16e9b07afec176dec150097880895b665e7d70afe7af180ec87222b8ea4306f037590d941eb07582a8aecfc373b740872b1983fc998ef
|
7
|
+
data.tar.gz: 131340bf57639c3bea8006c168ed77e31bca13cefe248a809cb19b1717dcb7514597c7aac5ee32f61b557565f67c10d54f517bb9d26d4d4079129e09158a178b
|
@@ -70,13 +70,15 @@
|
|
70
70
|
var widget = this;
|
71
71
|
|
72
72
|
this.remove.click(function(e){
|
73
|
+
if ($(':selected', widget.selection).length == 0)
|
74
|
+
return
|
73
75
|
selected_id = $(':selected', widget.selection)[0].value
|
74
76
|
title = $(':selected', widget.selection)[0].title
|
75
77
|
model_name = this.options.model_name
|
76
78
|
delete_path = Routes.rails_admin_delete_path(model_name, selected_id)
|
77
79
|
|
78
80
|
var answer = confirm ("Are you sure you want to delete '" + title + "' ? " +
|
79
|
-
"\nThis will take effect immediately
|
81
|
+
"\nThis will take effect immediately and CANNOT be undone");
|
80
82
|
if (answer)
|
81
83
|
{
|
82
84
|
$.ajax({
|
@@ -122,8 +124,13 @@ $(document).on('rails_admin.dom_ready', function(e, content) {
|
|
122
124
|
content = content ? content : $('form');
|
123
125
|
content.find('[data-simplehasmany]').each(function() {
|
124
126
|
$(this).simpleHasMany($(this).data('options'));
|
125
|
-
if ($(this).parents("#modal").length) {
|
126
|
-
return $(this).siblings('.
|
127
|
+
if ($(this).parents("#modal").length) { //
|
128
|
+
return $(this).siblings('.create').each(function ()
|
129
|
+
{
|
130
|
+
$(this).attr('href', $(this).attr('data-link'))
|
131
|
+
$(this).attr('target', '_new')
|
132
|
+
$(this).removeAttr('data-link', '')
|
133
|
+
});
|
127
134
|
} else {
|
128
135
|
return $(this).parents('.control-group').first().remoteForm();
|
129
136
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_admin_simple_has_many
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aiman Najjar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -35,6 +35,9 @@ dependencies:
|
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.2'
|
40
|
+
- - ">="
|
38
41
|
- !ruby/object:Gem::Version
|
39
42
|
version: 1.2.4
|
40
43
|
type: :runtime
|
@@ -42,6 +45,9 @@ dependencies:
|
|
42
45
|
version_requirements: !ruby/object:Gem::Requirement
|
43
46
|
requirements:
|
44
47
|
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '1.2'
|
50
|
+
- - ">="
|
45
51
|
- !ruby/object:Gem::Version
|
46
52
|
version: 1.2.4
|
47
53
|
description: Simple Has Many Widget is a RailsAdmin plugin that enables a simpler
|
@@ -123,7 +129,7 @@ rubyforge_project:
|
|
123
129
|
rubygems_version: 2.5.1
|
124
130
|
signing_key:
|
125
131
|
specification_version: 4
|
126
|
-
summary:
|
132
|
+
summary: A RailsAdmin field type that renders a simpler has_many field
|
127
133
|
test_files:
|
128
134
|
- test/dummy/app/assets/javascripts/application.js
|
129
135
|
- test/dummy/app/assets/stylesheets/application.css
|