Readme updated with rambling

This commit is contained in:
Devon Noonan 2012-10-02 10:47:02 -04:00
parent 5852736240
commit 606d220531

View File

@ -18,9 +18,12 @@ Or install it yourself as:
For a basic install include the following in your *app/assets/javascripts/application.js* file For a basic install include the following in your *app/assets/javascripts/application.js* file
//= require jstorage
//= require sisyphus //= require sisyphus
To support IE6/7 users include jStorage as well
//= require jstorage
## How it Works ## How it Works
Sisyphus uses an aliased form_tag method to automatically put a *<script>...</script>* tag infront of your forms to initialize Sisyphus. It also uses an aliased FormHelper form_for method to read options. Sisyphus uses an aliased form_tag method to automatically put a *<script>...</script>* tag infront of your forms to initialize Sisyphus. It also uses an aliased FormHelper form_for method to read options.
@ -49,15 +52,20 @@ To stop Sisyphus from initializing on a form include the *with_sisyphus* option
## TODO ## TODO
- Tests - Tests
- Move away from form_tag_helper, should be able to do it all from form_helper? Script tag can go at the end anyhow. - Move away from form_tag_helper, should be able to do it all from form_helper? Script tag can go at the end anyhow. Why aren't we doing that right now? We don't seem to have access to the same variables that the regular form_for does. Also the options array gets muddied by the FormHelper form_for call -> it removes the [:html] section (we need the id of the form for sisyphus).
- conflict resolution... i.e. you have an object edit form, the fields are populated from the DB but if you have local browser changes they may get overridden. We need a way to resolve conflicts between local and remote data -> could use a jquery based modal dialog to present the diff?
- Model/Object based exclusions via config or activerecord extension? - Model/Object based exclusions via config or activerecord extension?
- block based options - Env. based and global on/off switches
- block based options (this would allow us to easily and neatly implement Sisyphus options)
<%= form_for User.new do |f| %> <%= form_for User.new do |f| %>
<% :sisyphus => flase %> <% :sisyphus => flase %>
<% :sisyphus_customKeyPrefix => 'sisy' %>
... ...
<% end %> <% end %>
- implement all sisyphus options and any relevant ones in jStorage
## Contributing ## Contributing
1. Fork it 1. Fork it
@ -66,7 +74,12 @@ To stop Sisyphus from initializing on a form include the *with_sisyphus* option
4. Push to the branch (`git push origin my-new-feature`) 4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request 5. Create new Pull Request
## Dependencies ## Included Libraries
https://github.com/rails/jquery-rails
https://github.com/simsalabim/sisyphus https://github.com/simsalabim/sisyphus
https://github.com/andris9/jStorage https://github.com/andris9/jStorage
## Resources
http://coding.smashingmagazine.com/2011/12/05/sisyphus-js-client-side-drafts-and-more/