Skip to content

Commit

Permalink
signature: add filename
Browse files Browse the repository at this point in the history
  • Loading branch information
genywind committed Apr 25, 2013
1 parent a8abbd5 commit 0ea627d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/SignatureUtil/controller.rb
Expand Up @@ -12,7 +12,9 @@ def index
def new
imgFormat = System::get_property('platform') == 'WINDOWS' ? "bmp" : "jpg"

Rho::SignatureCapture.take(url_for( :action => :signature_callback), { :imageFormat => imgFormat, :penColor => 0xff0000, :penWidth=>5, :border => true, :bgColor => 0x00ff00 })
Rho::SignatureCapture.take(url_for( :action => :signature_callback), { :imageFormat => imgFormat, :penColor => 0xff0000, :penWidth=>5, :border => true, :bgColor => 0x00ff00,
:fileName => File.join( Rho::Application.databaseBlobFolder(), "/Image_" + Time.now.to_i.to_s() ) })

redirect :action => :index
end

Expand All @@ -38,7 +40,8 @@ def signature_callback
end

def inline_capture
Rho::SignatureCapture.visible(true, :penColor => 0xff0000, :penWidth=>1, :border => true, :bgColor => 0x00ff00 )
Rho::SignatureCapture.visible(true, :penColor => 0xff0000, :penWidth=>1, :border => true, :bgColor => 0x00ff00,
:fileName => File.join( Rho::Application.databaseBlobFolder(), "/Image_" + Time.now.to_i.to_s() ) )
end

def do_capture
Expand Down

0 comments on commit 0ea627d

Please sign in to comment.