Skip to content
This repository was archived by the owner on Nov 2, 2020. It is now read-only.

Conversation

ParidelPooya
Copy link

Hi

I changed JSONedit a little for my project and I think these changes are useful:
-Bug fix: Array values now changed correctly.
-Add json-change-key attribute to directive so now it is possible to switch on/off changing key.
-Add json-change-order attribute to directive so now it is possible to switch on/off changing ordering of array child.
-Add json-add attribute to directive so now it is possible to switch on/off adding new capability.
-Add json-delete attribute to directive so now it is possible to switch on/off deleting capability.

ParidelPooya and others added 5 commits March 4, 2015 16:28
Add json-change-key attribute to directive so now it is possible to switch on/off changing key
Add json-change-order attribute to directive so now it is possible to switch on/off changing ordering of array child
Add json-add attribute to directive so now it is possible to switch on/off adding new capability
Add json-delete attribute to directive so now it is possible to switch on/off deleting capability
@verygoodsoftwarenotvirus
Copy link
Contributor

Array values change, but on keypress, which exits the text input. You'd literally have to change your array keys one at a time.

Disregard, I was looking at the wrong commit's version of directives.js, this works for me. Thanks!

@mb21 can you take a glance at this? It fixes issue #26

@ParidelPooya
Copy link
Author

@mb21 @LiterallyElvis is there any problem with my changes and my merge request? My only intention was to help this project. but no one care any more here.

@mb21
Copy link
Owner

mb21 commented Aug 17, 2015

So which change exactly fixes the array editing?

I'm not sure I want to merge the added features since they complicate the code and I'd rather have this version stay as simple as possible, people can then customize it to their liking (like you did).

@jtreleaven
Copy link

Customizing it to ones liking works to an extent, however, consider if someone is using a bower.json which will always install your master branch. This would force everyone else who clones a project using this tool to make the same changes to fix this. The changes made by @ParidelPooya don't "complicate" the code, they fix the code which was very obviously broken. @ParidelPooya thank you very much for your contributions!

@verygoodsoftwarenotvirus
Copy link
Contributor

I agree with @jtreleaven, I think this change makes it function the way a user would expect. I don't think that editing an array and expecting that data to bind both ways should require customization.

@mb21
Copy link
Owner

mb21 commented Aug 20, 2015

Okay, I extracted from this pull request what seems to fix the array editing bug, see b2d3022.

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

Successfully merging this pull request may close these issues.

4 participants