You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also, there's this setting up of the initial variable and the new_taxon which the document.ready code expects to have been set.
I got my customization done, but if you're interested interested in having this contributed back into the project as a refactoring, I'll make the changes to spree and submit a pull request.
Basically, what I'd do is:
Change that set up code of the initial to use a new method on Taxonomy called to_js_tree which would call a method of the same name on its root taxon. This way any taxonomy can generate its own js tree instead of limiting it to the instance variable in the edit action on the taxonomies controller.
Extract the code in the document.ready into it's own function, and then call it with the appropriate arguments to keep the tree showing up on the taxononmies edit page, without relying on variables defined elsewhere.
I think that's all that needs to change.
Let me know if you're interested in seeing it, or just close this issue if not.
The text was updated successfully, but these errors were encountered:
I've been working on a customization where I needed to display the taxonomy tree some place else.
From that view, it looks nice, but the javascript that sets is up isn't reusable.
Also, there's this setting up of the
initial
variable and thenew_taxon
which thedocument.ready
code expects to have been set.I got my customization done, but if you're interested interested in having this contributed back into the project as a refactoring, I'll make the changes to spree and submit a pull request.
Basically, what I'd do is:
initial
to use a new method onTaxonomy
calledto_js_tree
which would call a method of the same name on its root taxon. This way any taxonomy can generate its own js tree instead of limiting it to the instance variable in theedit
action on the taxonomies controller.document.ready
into it's own function, and then call it with the appropriate arguments to keep the tree showing up on the taxononmies edit page, without relying on variables defined elsewhere.I think that's all that needs to change.
Let me know if you're interested in seeing it, or just close this issue if not.
The text was updated successfully, but these errors were encountered: