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

Recline Slickgrid view supports editing #384

Closed
rufuspollock opened this issue Jan 9, 2014 · 13 comments
Closed

Recline Slickgrid view supports editing #384

rufuspollock opened this issue Jan 9, 2014 · 13 comments
Milestone

Comments

@rufuspollock
Copy link
Member

Should be quite straightforward.

See http://mleibman.github.io/SlickGrid/examples/example3-editing.html

@rufuspollock
Copy link
Member Author

Most of what is needed is already there - see https://github.com/okfn/recline/blob/master/src/view.slickgrid.js#L26

We just need to:

  • Auto-guess editor type if not supplied (based on field types)
  • Make sure we pass through edits in a sensible way to backbone objects
  • Add support for adding / deleting an entire row

@aliounedia
Copy link
Contributor

Hi Ruffus , I Happy to work to perform recline js and to fix above problems, I' am
proposing this solution.

1 - If The fisrt cell contain % we bind a PercentType to field
else
2 - checking the first cell of field and call Javascript methods on it ParseInt , ParseFloaf,
to find the corresponding SlikckGrid Editor Type : Text, LongText .

With this solution I Have some question how we can guess an type like editor: Slick.Editors.Checkbox
I don't see any corresponding value into a csv file (Maybe "True") or ("False")

I think that I simple Hack Here https://github.com/okfn/recline/blob/master/src/view.slickgrid.js#L112
Could be Fix problem . what do you think about proposal .

--Ad

@rufuspollock
Copy link
Member Author

@aliounedia i'd suggest we just run off the field types we have - see http://okfnlabs.org/recline/docs/models.html#types and https://github.com/okfn/recline/blob/master/src/model.js#L384

With fallback if no type specified to (text field or long text field).

I don't think we want to try to guess from the data at this point (that is a useful task - to infer field types from data - but should be separate (and it is not easy!)).

@rufuspollock
Copy link
Member Author

@aliounedia did the above make sense - would love to have you as a contributor here so let me know if I should make further suggestions ...

@aliounedia
Copy link
Contributor

@rgrp I 'will make some pull request soon , maybe tonight based on your suggestion ,
Juste some issue I have, I dont known yet what eidtor Type we will bind to a field type like geo_json or
binary . For string or date I imagine a SlickGrid.string or SlickGrid.date

have you any ideas http://okfnlabs.org/recline/docs/models.html#types ?
--Ad

rufuspollock added a commit that referenced this issue Jan 12, 2014
…eld type.

* multiview demo now has editing turned on
* [license][xs]: update to 2011-2014.
@rufuspollock
Copy link
Member Author

@aliounedia I've actually pushed some changes that address this a bit (see just above) - take a look to see how this is working.

However, it would be nice to add e.g. validators or to have date editor work properly (e.g. respect date formatting (yyyy-mm-dd by default i guess).

We also need to support onAddNewRow (and enableAddRow).

Separately, it would be nice to enhance the demo so that it reports the changes you've made (illustrating how to subscribe to changes) - we probably want to think about whether we auto-sync changes or not ...

@aliounedia
Copy link
Contributor

grp Ok for me me this is exactly what I had done , Thank to push it , I will check the formating and row add/delete points , I will back if I have any questions

@aliounedia
Copy link
Contributor

@rgrp Hi Ruffus I have added a validtor for field format , aliounedia@dc24909

aliounedia added a commit to aliounedia/recline that referenced this issue Jan 15, 2014
aliounedia added a commit to aliounedia/recline that referenced this issue Jan 15, 2014
aliounedia added a commit to aliounedia/recline that referenced this issue Jan 16, 2014
@aliounedia
Copy link
Contributor

@rgrp I added I pull request , can you check please #385
support for row/add/delete to Grid , The delete/Row bouton is added to each row as first item
, And the Add/Row bouton is added as side-bar , just like query-editor widget.

aliounedia added a commit to aliounedia/recline that referenced this issue Jan 20, 2014
aliounedia added a commit to aliounedia/recline that referenced this issue Jan 20, 2014
rufuspollock added a commit that referenced this issue Jan 22, 2014
[#384] add validator  to validate user input.
@rufuspollock
Copy link
Member Author

@aliounedia I think we're just about done here :-)

Would you be interested in getting this integrated into Data Explorer - see rufuspollock-okfn/dataexplorer#154

@aliounedia
Copy link
Contributor

@rgrp I am working Tonight for okfn senegal community to help
building a dataset
here http://www.creationdentreprise.sn ( public institutional agency for
entreprise
registration in senegal )
https://github.com/aliounedia/bce-data
I will be happy to work on this new issue tomorrow , Thank you for adding
me
--Ad

@aliounedia
Copy link
Contributor

@rgrp

I think we're just about done here :-)
Yes :) , just need to activate demo , I Will do.

@rufuspollock
Copy link
Member Author

FIXED.

@rufuspollock rufuspollock added this to the v0.6 milestone Mar 8, 2014
@rufuspollock rufuspollock modified the milestones: v0.6, v0.7 Aug 16, 2014
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