From 1c888dbcb555ea88d7754bdbfc7980ad2544c58f Mon Sep 17 00:00:00 2001 From: Americo Savinon Date: Tue, 6 May 2014 13:05:39 -0400 Subject: [PATCH 1/3] Adding depend_on_asset "Jcrop.gif" on jquery.Jcrop.css.erb After trying this gem and following the github readme, I noticed that the gem isn't referencing "Jcrop.gif". Unless I'm missing something, this file (and so the minify mersion) needs this line. --- app/assets/stylesheets/jquery.Jcrop.css.erb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/stylesheets/jquery.Jcrop.css.erb b/app/assets/stylesheets/jquery.Jcrop.css.erb index 2e0704a..e76c801 100644 --- a/app/assets/stylesheets/jquery.Jcrop.css.erb +++ b/app/assets/stylesheets/jquery.Jcrop.css.erb @@ -8,6 +8,9 @@ A better method for styling can be seen below with .jcrop-light (Add a class to the holder and style elements for that extended class) */ + +//= depend_on_asset "Jcrop.gif" + .jcrop-holder { direction: ltr; text-align: left; From 6ebfef16c95c962b3a480268ebc7091a966b9a7c Mon Sep 17 00:00:00 2001 From: Americo Savinon Date: Wed, 7 May 2014 11:43:24 -0400 Subject: [PATCH 2/3] Removing depened_on_asset Removed depend_onasset for Jcrop.gif --- app/assets/stylesheets/jquery.Jcrop.css.erb | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/assets/stylesheets/jquery.Jcrop.css.erb b/app/assets/stylesheets/jquery.Jcrop.css.erb index e76c801..2e0704a 100644 --- a/app/assets/stylesheets/jquery.Jcrop.css.erb +++ b/app/assets/stylesheets/jquery.Jcrop.css.erb @@ -8,9 +8,6 @@ A better method for styling can be seen below with .jcrop-light (Add a class to the holder and style elements for that extended class) */ - -//= depend_on_asset "Jcrop.gif" - .jcrop-holder { direction: ltr; text-align: left; From fb18c93ecad64d916116898007109764b4261daa Mon Sep 17 00:00:00 2001 From: Americo Savinon Date: Wed, 7 May 2014 11:56:34 -0400 Subject: [PATCH 3/3] Updating Readme Updating Readme to tell users they might need to add //= depend_on_asset "Jcrop.gif" if they are on a older version of sprockets-rails gem --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index fa29839..e90f233 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,8 @@ That's all. Now you can use Jcrop inside your application. > If you want to use minified JS & CSS versions of Jcrop then just replace `jquery.Jcrop` to `jquery.Jcrop.min` in code snippets provided above. +> In case you are using an older version of the sprockets-rails gem (2.1.0 or lower) you might need to add ```//= depend_on_asset "Jcrop.gif"``` at the top of jquery.Jcrop.css.erb + ### In-place integration If you want to use Jcrop in specified views only you can include its use the following commands: