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

trouble with manual install directions? #36

Open
jkeesh opened this issue Dec 24, 2015 · 1 comment
Open

trouble with manual install directions? #36

jkeesh opened this issue Dec 24, 2015 · 1 comment

Comments

@jkeesh
Copy link

jkeesh commented Dec 24, 2015

Hi there--

Great js library. I ended up getting it to work but it required modifications and the "quick start" directions didn't work for me so wanted to report a bug in case this was a real issue.

Steps to reproduce

  • Downloaded the zip file release to install.
  • Included the min js file and css file
  • add data-sortable to table attribute
  • This table was being generated through JS, so I added a call to Sortable.init()
  • No js errors, but also no results.
  • Tried to narrow down by installing the full js file and found it was returning an array with undefined in the initTable function

How I fixed it:

  • Included install.js
  • Included sortable.js
  • Included css file for theme
  • Modified install.js to include a fixed dictionary with var options = {'theme': 'minimal'};
  • Did not include data-sortable table attribute

This seemed to work for me but i was quite confused why the simple quick start did nothing. I tried loading it on my page using the Eager install button and that did work. It seems the install.js was configured for that eager button, but without that configuration it did not work.

I've reproduced the bug and my fix using the a minimal example from the manually including instructions.

(Following directions from http://github.hubspot.com/sortable/
Instructions
Bug: http://thekeesh.com/projectlist/demo/demo_bug.html
Hacked fix: http://thekeesh.com/projectlist/demo/demo_working.html

I may be missing something obvious, but you may want to consider updating the "Manually Including" instructions on this page to clarify: http://github.hubspot.com/sortable/

@pablomdata
Copy link

Great, thanks! I almost got it now... how did you modify install.js? I replaced "var options = ..." with the default dictionary and it didn't work

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

No branches or pull requests

2 participants