Coder Social home page Coder Social logo

ios-checkboxes's People

Contributors

dnagir avatar georgediaz88 avatar manuelmeurer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ios-checkboxes's Issues

can't simulate a click

I need to simulate a click on a styled checkbox.

If I do

$('#checkbox').parents('.iPhoneCheckContainer').trigger('mousedown')

it raise me the following error :

event.originalEvent is undefined

it seems to came from the line 90 (coffeescript version) :

x = event.pageX || event.originalEvent.changedTouches[0].pageX

It doesn't show default images?

Are there any default images?
Currently it does not show images form my rail 3 app. Also it only selects the first checkbox.

Thanks in advance for any help.
screen shot 2013-06-26 at 11 32 35 pm

Resizing doesn't work when checkbox is initially hidden

I am using the iOs checkboxes in a tabbed menu. The checkboxes in the tab that is initially visible look fine: http://screencast.com/t/K2m4UB6e1iJ
But when I change to another tab (that was invisible via display: none), the checkboxes are barely visible: http://screencast.com/t/4wyUZr4D
The width of <div class="iPhoneCheckContainer"> is set to 15px in this case.
I am pretty sure the issue is somewhere in this method but I can't figure it out: https://github.com/dnagir/ios-checkboxes/blob/master/lib/assets/javascripts/ios-checkboxes/ios-checkboxes.js.coffee#L66

Screenshot?

Would be nice to include link to a screenshot in the documentation.

Toggle fires twice when clicked

Hey, thanks for the great work! I've used this in two places in our app, and one of them is acting strangely -- it only sticks if dragged. When clicked, the switch toggles on, then flips back.
Any idea what could cause this, or how to fix it? I haven't dove into the JS internals or tried debugging yet.

Here's my js: https://github.com/codeforamerica/textizen/blob/dev/app/assets/javascripts/polls.js.coffee
The problematic view: https://github.com/codeforamerica/textizen/blob/dev/app/views/polls/_form.html.erb

Requiring jQuery

ios-checkboxes.js always loads jQuery which can cause problems.

Example:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js" type="text/javascript"></script>
<script src="//foo.com/ios-checkboxes.js" type="text/javascript"></script>

jQuery UI will not be available after that because when it is loaded, it enhances the jQuery namespace, and when ios-checkboxes.js loads jQuery again it overwrites these enhancements.
I'd suggest just kicking the loading of jQuery and expecting the user to load jQuery manually before loading ios-checkboxes.js.
Alternatively you could add a check to see if jQuery is already loaded and only load it if it's not loaded.
I'd go with the first option though, since I've neves seen a jQuery plugin requiring jQuery by itself (correct me if I'm wrong), they all expect jQuery to already be present.

TypeError: $.browser is undefined

In rails 3.2.21 I got this error:

TypeError: $.browser is undefined

Near this:
iOSCheckbox.prototype.disableTextSelection = function() {
if ($.browser.msie) {
return $([this.handle, this.offLabel, this.onLabel, this.container]).attr("unselectable", "on");
}
};

Compilation Error

I have installed the gem but found this error. Any help is really appreciated because the gem looks really cool.

Compiled ios-checkboxes.css (19ms) (pid 71062)
Error compiling asset application.css:
Sass::SyntaxError: File to import not found or unreadable: compass/css3/opacity.
Load paths:
Sass::Rails::Importer(/Users/Vidya/.rvm/gems/ruby-1.9.3-p194@global/gems/ios-checkboxes-0.1.3/lib/assets/stylesheets/ios-checkboxes/ios-checkboxes.css.sass)
/Users/Vidya/.rvm/gems/ruby-1.9.3-p194@global/gems/ios-checkboxes-0.1.3/lib/assets/stylesheets

Here is my Gemfile.lock:

GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.4)
actionpack (= 3.1.4)
mail (> 2.3.0)
actionpack (3.1.4)
activemodel (= 3.1.4)
activesupport (= 3.1.4)
builder (
> 3.0.0)
erubis (> 2.7.0)
i18n (
> 0.6)
rack (> 1.3.6)
rack-cache (
> 1.1)
rack-mount (> 0.8.2)
rack-test (
> 0.6.1)
sprockets (> 2.0.3)
activemodel (3.1.4)
activesupport (= 3.1.4)
builder (
> 3.0.0)
i18n (> 0.6)
activerecord (3.1.4)
activemodel (= 3.1.4)
activesupport (= 3.1.4)
arel (
> 2.2.3)
tzinfo (> 0.3.29)
activeresource (3.1.4)
activemodel (= 3.1.4)
activesupport (= 3.1.4)
activesupport (3.1.4)
multi_json (
> 1.0)
addressable (2.2.8)
ansi (1.4.2)
arel (2.2.3)
bcrypt-ruby (3.0.1)
builder (3.0.0)
chunky_png (1.2.5)
coffee-rails (3.1.1)
coffee-script (>= 2.2.0)
railties (> 3.1.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.3.1)
compass (0.13.alpha.0)
chunky_png (
> 1.2)
fssm (>= 0.2.7)
sass (> 3.2.0.alpha.93)
daemons (1.1.8)
data_objects (0.10.8)
addressable (
> 2.1)
delayed_job (2.1.4)
activesupport (> 3.0)
daemons
delayed_job_data_mapper (1.0.0.rc)
delayed_job (
> 2.1)
dm-aggregates
dm-core
dm-observer
diff-lcs (1.1.3)
dm-active_model (1.2.1)
activemodel (> 3.0)
dm-core (
> 1.2.0)
dm-aggregates (1.2.0)
dm-core (> 1.2.0)
dm-constraints (1.2.0)
dm-core (
> 1.2.0)
dm-core (1.2.0)
addressable (> 2.2.6)
dm-do-adapter (1.2.0)
data_objects (
> 0.10.6)
dm-core (> 1.2.0)
dm-migrations (1.2.0)
dm-core (
> 1.2.0)
dm-observer (1.2.0)
dm-core (> 1.2.0)
dm-postgres-adapter (1.2.0)
dm-do-adapter (
> 1.2.0)
do_postgres (> 0.10.6)
dm-rails (1.2.1)
actionpack (
> 3.0)
dm-active_model (> 1.2.0)
dm-core (
> 1.2.0)
railties (> 3.0)
dm-sqlite-adapter (1.2.0)
dm-do-adapter (
> 1.2.0)
do_sqlite3 (> 0.10.6)
dm-timestamps (1.2.0)
dm-core (
> 1.2.0)
dm-transactions (1.2.0)
dm-core (> 1.2.0)
dm-types (1.2.1)
bcrypt-ruby (
> 3.0.0)
dm-core (> 1.2.0)
fastercsv (
> 1.5.4)
json (> 1.6.1)
multi_json (
> 1.0.3)
stringex (> 1.3.0)
uuidtools (
> 2.1.2)
dm-validations (1.2.0)
dm-core (> 1.2.0)
do_postgres (0.10.8)
data_objects (= 0.10.8)
do_sqlite3 (0.10.8)
data_objects (= 0.10.8)
erubis (2.7.0)
eventmachine (0.12.10)
execjs (1.3.2)
multi_json (
> 1.0)
factory_girl (3.3.0)
activesupport (>= 3.0.0)
factory_girl_rails (3.3.0)
factory_girl (> 3.3.0)
railties (>= 3.0.0)
faker (1.0.1)
i18n (
> 0.4)
fastercsv (1.5.4)
fssm (0.2.9)
gibberish (1.2.0)
hike (1.2.1)
i18n (0.6.0)
ios-checkboxes (0.1.3)
compass (>= 0.12.alpha.1)
rails (> 3.1.2)
sass-rails
jquery-rails (1.0.19)
railties (
> 3.0)
thor (> 0.14)
json (1.6.7)
mail (2.3.3)
i18n (>= 0.4.0)
mime-types (
> 1.16)
treetop (> 1.4.8)
mime-types (1.18)
multi_json (1.0.4)
polyglot (0.3.3)
rack (1.3.6)
rack-cache (1.2)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.1.4)
actionmailer (= 3.1.4)
actionpack (= 3.1.4)
activerecord (= 3.1.4)
activeresource (= 3.1.4)
activesupport (= 3.1.4)
bundler (
> 1.0)
railties (= 3.1.4)
railties (3.1.4)
actionpack (= 3.1.4)
activesupport (= 3.1.4)
rack-ssl (> 1.3.2)
rake (>= 0.8.7)
rdoc (
> 3.4)
thor (> 0.14.6)
rake (0.9.2.2)
rdoc (3.12)
json (
> 1.4)
right_aws (3.0.4)
right_http_connection (>= 1.2.5)
right_http_connection (1.3.0)
rspec (2.10.0)
rspec-core (> 2.10.0)
rspec-expectations (
> 2.10.0)
rspec-mocks (> 2.10.0)
rspec-core (2.10.0)
rspec-expectations (2.10.0)
diff-lcs (
> 1.1.3)
rspec-mocks (2.10.1)
rspec-rails (2.10.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec (> 2.10.0)
sass (3.2.0.alpha.237)
sass-rails (3.1.6)
actionpack (
> 3.1.0)
railties (> 3.1.0)
sass (>= 3.1.10)
tilt (
> 1.3.2)
sprockets (2.0.4)
hike (> 1.2)
rack (
> 1.0)
tilt (~> 1.1, != 1.3.0)
stringex (1.3.3)
thin (1.3.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
turn (0.9.5)
ansi
tzinfo (0.3.33)
uuidtools (2.1.2)

PLATFORMS
ruby

DEPENDENCIES
actionmailer (> 3.1.3)
actionpack (
> 3.1.3)
activesupport (> 3.1.3)
coffee-rails (
> 3.1.1)
daemons
delayed_job
delayed_job_data_mapper
dm-aggregates (> 1.2.0)
dm-constraints (
> 1.2.0)
dm-migrations (> 1.2.0)
dm-observer (
> 1.2.0)
dm-postgres-adapter (> 1.2.0)
dm-rails (
> 1.2.0)
dm-sqlite-adapter
dm-timestamps (> 1.2.0)
dm-transactions (
> 1.2.0)
dm-types (> 1.2.0)
dm-validations (
> 1.2.0)
factory_girl_rails
faker
gibberish
ios-checkboxes (> 0.1.3)
jquery-rails
railties (
> 3.1.3)
right_aws
rspec-rails (> 2.6)
sass-rails (
> 3.1.1)
thin
turn
tzinfo

Please release it

Hi @tdreyno,

Could you please release this gem?
It provides built-in assets via SASS as well as native implementation with CoffeeScript (no need to precompile).

To push just do:

git clone [email protected]:dnagir/ios-checkboxes.git
cd ios-checkboxes
bundle install
rake release

Or you can give me access to this gem so that I can do it.

Thanks a lot.

Rails 4 Compatibility

Hey there!

Any plans to relax the rails dependency in the gemspec s.add_dependency "rails", "~> 3.1" so that it's compatible with Rails4 projects? We're currently in the midst of an upgrade and I was curious if you wanted to tweak that dependency in the .gemspec so it could work for Rails4? Let me know what you think.

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.