Additional top level actions #13

Merged
merged 1 commit into from Feb 25, 2014

Projects

None yet

2 participants

Contributor
elvanja commented Feb 25, 2014

Changelog:

  • added number & time picker inputs
  • fix for new types and form default initialization
@elvanja elvanja Additional top level actions:
* added number & time picker inputs
* fix for new types and form default initialization
5e84343
@levity levity commented on the diff Feb 25, 2014
app/helpers/deckhand/templates_helper.rb
@@ -27,6 +27,13 @@ def angular_input(name, options)
args['type'] = 'file'
args['ng-file-select'] = "onFileSelect($files, '#{name}')"
args.delete('ng-model')
+ elsif options[:type] == Time
+ args.delete('class')
+ elsif options[:type] == Integer
+ args['type'] = 'number'
+ elsif options[:type] == Float
+ args['type'] = 'number'
+ args['step'] = 0.01
levity
levity Feb 25, 2014 Contributor

this is only applicable to currency fields so it shouldn't be applied to all floats

elvanja
elvanja Feb 25, 2014 Contributor

Default HTML5 number formatted field is represented as integer unless precision is given. What shall we do then with floats?

levity
levity Feb 25, 2014 Contributor

Ah, I see. That's fine then.

On Tue, Feb 25, 2014 at 3:05 PM, Vanja Radovanović <notifications@github.com

wrote:

In app/helpers/deckhand/templates_helper.rb:

@@ -27,6 +27,13 @@ def angular_input(name, options)
args['type'] = 'file'
args['ng-file-select'] = "onFileSelect($files, '#{name}')"
args.delete('ng-model')

  • elsif options[:type] == Time
  •  args.delete('class')
    
  • elsif options[:type] == Integer
  •  args['type'] = 'number'
    
  • elsif options[:type] == Float
  •  args['type'] = 'number'
    
  •  args['step'] = 0.01
    

Default HTML5 number formatted field is represented as integer unless
precision is given. What shall we do then with floats?


Reply to this email directly or view it on GitHubhttps://github.com/somawater/deckhand/pull/13/files#r10061070
.

elvanja
elvanja Feb 25, 2014 Contributor

Cool :-)

Contributor
elvanja commented Feb 25, 2014

OK :-)

@levity levity merged commit 325d613 into somawater:master Feb 25, 2014
@elvanja elvanja deleted the elvanja:additional_top_level_actions branch Feb 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment