Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to use different input types #544

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

damisul
Copy link

@damisul damisul commented Apr 14, 2016

HTML5 introduced new handy input types like number, url, etc. and some basic validations.
I've tried to pass additional options to bip_helper in html_attrs params like

best_in_place item, :arrived, html_attrs: {type: :number, min: 0, max: 100, step: 1, required: true}
but got javascript errors.

I've checked sources and see that input editor assumes that input always has 'text' type.
I've modified javascript to allow other input types.

now it works for me

…y. Fixed them by creating application.css and including it in application.html.erb instead of separate css files
@damisul
Copy link
Author

damisul commented Apr 14, 2016

Also there were rspec failures in rails-4.2 enviroment. If I understand correctly, they were caused by sprocked v3.0
I've tried to fix them, not sure if everything is ok though

@nxdefiant
Copy link

I wonder why this havn't been merged yet, also duplicate of #551

@KenneyE
Copy link

KenneyE commented Oct 2, 2018

This would be very helpful. Anything we can do to get this moved forward?

thejandroman pushed a commit to thejandroman/best_in_place that referenced this pull request Jan 15, 2019
thejandroman pushed a commit to thejandroman/best_in_place that referenced this pull request Jan 15, 2019
@0agautam
Copy link

0agautam commented Apr 2, 2021

Thanks this post helped me a lot and i made the changes in my best_in_place.js file according to your commit and my code is successfully working 👍
4846545

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

Successfully merging this pull request may close these issues.

4 participants