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: d1889586995384f60b27388e998fd642077734fd
4
- data.tar.gz: 3fc065aa20a170431d02417cd5eba5bd0490a9de
3
+ metadata.gz: 3d03b57d1e997ab136a6dec10636e1f51f63b8d9
4
+ data.tar.gz: 58cdf59ac8e3b01429f2e3e6e8a60c8f4396fa51
5
5
  SHA512:
6
- metadata.gz: 7e9417774ba14c4b56c16e9b07afec176dec150097880895b665e7d70afe7af180ec87222b8ea4306f037590d941eb07582a8aecfc373b740872b1983fc998ef
7
- data.tar.gz: 131340bf57639c3bea8006c168ed77e31bca13cefe248a809cb19b1717dcb7514597c7aac5ee32f61b557565f67c10d54f517bb9d26d4d4079129e09158a178b
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();
@@ -1,3 +1,3 @@
1
1
  module RailsAdminSimpleHasMany
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
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.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aiman Najjar