Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

No modal appears in rails_admin field #30

Open
tourcaucasus opened this issue Jun 24, 2015 · 9 comments
Open

No modal appears in rails_admin field #30

tourcaucasus opened this issue Jun 24, 2015 · 9 comments

Comments

@tourcaucasus
Copy link

I included rails_admin_jcrop exactly like in instruction, I'm using CarrierWave, so I added process :rails_admin_crop, anyway modal window for cropping don't appear.
GEMS:
ruby 2.1.0
rails (4.0.4)
rails_admin (0.6.1)
rails_admin_jcrop (1.4.0)
carrierwave (0.10.0)

@salimhb
Copy link
Collaborator

salimhb commented Jun 24, 2015

Is there any javascript error in the browser console?

@PatrykM
Copy link

PatrykM commented Aug 28, 2015

i have the same problem with paperclip
ruby 2.1.2
rails 4.1.8
paperclip 4.3.0 from git://github.com/thoughtbot/paperclip.git (at master)
rails_admin (0.6.5)
rails_admin_jcrop (1.4.0)

i have no errors in the browser console, i have also used this #27 and still no effect.

I have in model
has_attached_file :photo, :styles => { :medium => "300x300>", :thumb => "263x148#" }, :default_url => "/images/:style/missing.png"

when i click in admin photo, new tab opens with image, when i have only has_attached_file :photo
then when i click in admin nothing happens.
JS files ale loaded just before photo

<script src="/assets/rails_admin/jquery.Jcrop.js?body=1"></script> <script src="/assets/rails_admin/ra.jcrop.js?body=1"></script>

Do you have any ideas what is wrong?

@PatrykM
Copy link

PatrykM commented Aug 28, 2015

ok. it works now :)

@iMacTia
Copy link

iMacTia commented Sep 26, 2015

@PatrykM : It would be great if you share the solution you found, as others can have your same problem 😄

@PatrykM
Copy link

PatrykM commented Nov 11, 2015

@iMacTia: first i just switched to active_admin and there i had the same problem, but i work around it just not using jcrop that's why it works :D. I didn't have much time to solve it, maybe i will try in the future ;)

@arachnos29a
Copy link

Did someone solve this? I just have this issue and have no idea what to do.
rails 4.2.5
ruby 2.2.1
rails_admin 0.8.1
paperclip 4.3.0
rails_admin_jcrop 1.4.0

UPD:

after manually adding
//=require rails_admin/jquery.Jcrop
//=require rails_admin/ra.jcrop.js
into /assets/javascripts/rails_admin/custom/ui.js
pulling ra.jcrop.js into project
and replacing ( #27 helped me a lot)
var thumbnailLink = dom_widget.find('img.img-polaroid').parent();
on
var thumbnailLink = dom_widget.find('img.img-thumbnail').parent();
into ra.jcrop.js

it finally start working.

patleb added a commit to o2web/rails_admin_jcrop that referenced this issue Dec 31, 2015
@DanAndreasson
Copy link

I also have this problem. With same configuration as @arachnos29a

@bctoh
Copy link

bctoh commented Sep 19, 2017

@DanAndreasson did u manage to work it by using this var thumbnailLink = dom_widget.find('img.img-thumbnail').parent(); instead of var thumbnailLink = dom_widget.find('img.img-polaroid').parent(); in /app/assets/javascripts/rails_admin/ra.jcrop.js:8?

@DanAndreasson
Copy link

@bctoh I don't remember. Was some time since I used this gem

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants