rails_admin_simple_has_many 0.0.3 → 0.0.4
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: 3d03b57d1e997ab136a6dec10636e1f51f63b8d9
|
4
|
+
data.tar.gz: 58cdf59ac8e3b01429f2e3e6e8a60c8f4396fa51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 517b0156dc2b565bb618a6ac872177b02b2e87579b5b855d692d77a849bce160bca5be6b8b87a6edffc41242537f6bfebc719387d451dcfd7fbdc3fe6f92add5
|
7
|
+
data.tar.gz: 3b8903f8e6210489dd346fc4c0337abb38161fc7c7a4e76ad0097120917334c903467ed763b1fc313cb4e46211328567686791d72baa734aa44b6fe8649c998c
|
@@ -124,12 +124,22 @@ $(document).on('rails_admin.dom_ready', function(e, content) {
|
|
124
124
|
content = content ? content : $('form');
|
125
125
|
content.find('[data-simplehasmany]').each(function() {
|
126
126
|
$(this).simpleHasMany($(this).data('options'));
|
127
|
-
if ($(this).parents("#modal").length) {
|
127
|
+
if ($(this).parents("#modal").length) {
|
128
128
|
return $(this).siblings('.create').each(function ()
|
129
129
|
{
|
130
130
|
$(this).attr('href', $(this).attr('data-link'))
|
131
131
|
$(this).attr('target', '_new')
|
132
132
|
$(this).removeAttr('data-link', '')
|
133
|
+
var edit_url = $(this).parent().find('select').first().data('options') && $(this).parent().find('select').first().data('options')['edit-url'];
|
134
|
+
if(typeof(edit_url) != 'undefined' && edit_url.length) {
|
135
|
+
$(document).on('dblclick', '.ra-multiselect option:not(:disabled)', function(e){
|
136
|
+
console.log(this.title)
|
137
|
+
var win = window.open(edit_url.replace('__ID__', this.value), '_blank');
|
138
|
+
if (win) { win.focus(); }
|
139
|
+
});
|
140
|
+
}
|
141
|
+
|
142
|
+
|
133
143
|
});
|
134
144
|
} else {
|
135
145
|
return $(this).parents('.control-group').first().remoteForm();
|