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

Import from json #162

Merged
merged 6 commits into from
Sep 5, 2016
Merged

Import from json #162

merged 6 commits into from
Sep 5, 2016

Conversation

dominikl
Copy link
Member

@dominikl dominikl commented Aug 4, 2016

Adds the possibility to create a Figure from a (previously exported) JSON object, see Trello - import Figure from json.

I'm not sure, if that's the correct way to add stuff to models, views, etc. please correct me, if not. Especially listening on the form submit within figure_view.js seems to be a bit out of place.

@will-moore
Copy link
Member

This looks great and works nicely.

I wonder if you could avoid the code duplication by calling the new figure_fromJSON(data) from within load_from_OMERO() above. You might need to add fileId to the data object, but otherwise the code looks pretty similar. You can use the self handle in the getJSON callback, E.g. self.figure_fromJSON(data).

Cheers!



load_from_JSON: function(data) {
self = this;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a var:
var self = this;
Also it would be great to keep all indents at 4 spaces so we are consistent everywhere.

@will-moore
Copy link
Member

Thanks! Looks great. Tested locally.
Good to merge.

@snoopycrimecop snoopycrimecop mentioned this pull request Aug 11, 2016
6 tasks
@@ -104,7 +110,7 @@

return json;
},

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dominikl I wonder if you could remove this whitespace change (and see if there are any others that could be cleaned up)?
I don't know if you're using $ git add -p but I find this can help avoiding unnecessary whitespace changes?
Thanks

@dominikl dominikl force-pushed the import_from_json branch 2 times, most recently from cbc8114 to c2642eb Compare August 24, 2016 13:01
@jburel jburel merged commit 357c2af into ome:master Sep 5, 2016
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

Successfully merging this pull request may close these issues.

3 participants