Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'release/5'

  • Loading branch information...
commit fbc9305ab7887df50f6e19acb9445919e7298e91 2 parents 38ac34a + 6f9eca3
MIchael Jerome authored
View
8 TIME TRACKING.txt
@@ -1,3 +1,11 @@
+2 October - 8 hours
+ - Get text areas working.
+ - Add 'admin' screens.
+ - Write overview email.
+
+1 October - 8 hours
+ - Get user uploads working.
+
29 September - 1 hour
- Get first cropping samples running on iMac
View
2  VERSION
@@ -1 +1 @@
-4
+5
View
8 app/controllers/requests_controller.rb
@@ -28,12 +28,12 @@ def new
when "1"
@request = Request.new( :unique_id => "sample1", :background_image_file_name => "CHM-X-220-C.png" )
sample_user_images = [
- { :file_name => "5772-091.jpg", :crop_x => 1720, :crop_y => 266, :crop_width => 728, :crop_height => 855, :zoom => 47, :location_x => 490, :location_y => 710 },
- { :file_name => "5772-097.jpg", :crop_x => 1255, :crop_y => 247, :crop_width => 590, :crop_height => 525, :zoom => 70, :location_x => 1634, :location_y => 732 }
+ { :file_name => "5772-089.jpg", :crop_x => 214, :crop_y => 235, :crop_width => 360, :crop_height => 360, :zoom => 50, :location_x => 480, :location_y => 730 },
+ { :file_name => "5772-097.jpg", :crop_x => 881, :crop_y => 156, :crop_width => 400, :crop_height => 500, :zoom => 70, :location_x => 1632, :location_y => 723 }
]
sample_user_images.each{ |sample| @request.user_images.build(sample) }
sample_text_areas = [
- { :content => "To Gary and<br>Debbie", :font_size => 128, :width => 750, :height => 410, :location_x => 900, :location_y => 268, :font_colour => 'ffffff', :font_file_name => 'TrajanPro-Bold.otf' },
+ { :content => "To Marge and<br>Debbie", :font_size => 128, :width => 750, :height => 410, :location_x => 900, :location_y => 268, :font_colour => 'ffffff', :font_file_name => 'TrajanPro-Bold.otf' },
{ :content => "Love from Mike", :font_size => 60, :width => 547, :height => 114, :location_x => 1739, :location_y => 1529, :font_colour => 'ffffff', :font_file_name => 'MarkerFelt.ttc' }
]
sample_text_areas.each{ |sample| @request.text_areas.build(sample) }
@@ -41,7 +41,7 @@ def new
when "2"
@request = Request.new( :unique_id => "sample2", :background_image_file_name => "card1.png" )
sample_user_images = [
- { :file_name => "dog.jpg", :crop_x => 450, :crop_y => 450, :crop_width => 1000, :crop_height => 1000, :zoom => 84, :location_x => 712, :location_y => 789 }
+ { :file_name => "dog.jpg", :crop_x => 450, :crop_y => 450, :crop_width => 834, :crop_height => 744, :zoom => 84, :location_x => 726, :location_y => 832 }
]
sample_user_images.each{ |sample| @request.user_images.build(sample) }
sample_text_areas = [
View
2  app/models/user_image.rb
@@ -13,8 +13,8 @@ class UserImage < ActiveRecord::Base
def image
image = original_image
- image.crop "#{self.crop_width}x#{self.crop_height}+#{self.crop_x}+#{self.crop_y}"
image.resize "#{self.zoom}%"
+ image.crop "#{self.crop_width}x#{self.crop_height}+#{self.crop_x}+#{self.crop_y}"
image
end
View
8 app/views/requests/_user_image_fields.html.erb
@@ -4,6 +4,10 @@
<%= f.text_field :file_name %>
</p>
<p>
+ <%= f.label :zoom %>
+ <%= f.text_field :zoom %>
+</p>
+<p>
<%= f.label :crop_x %>
<%= f.text_field :crop_x %>
</p>
@@ -20,10 +24,6 @@
<%= f.text_field :crop_height %>
</p>
<p>
- <%= f.label :zoom %>
- <%= f.text_field :zoom %>
-</p>
-<p>
<%= f.label :location_x %>
<%= f.text_field :location_x %>
</p>
Please sign in to comment.
Something went wrong with that request. Please try again.