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

Add Open Button For Chosen Fluidity Entity Picker #44

Merged
merged 1 commit into from
May 2, 2018

Conversation

prjseal
Copy link
Contributor

@prjseal prjseal commented Apr 29, 2018

  • added support for opening a chosen record using the fluidity entity picker

@prjseal prjseal changed the title Add Open Button for cho Fluidity Entity Picker Add Open Button For Chosen Fluidity Entity Picker Apr 29, 2018
@prjseal
Copy link
Contributor Author

prjseal commented Apr 29, 2018

This is related to this issue. #43

@prjseal
Copy link
Contributor Author

prjseal commented Apr 29, 2018

Here is what it will look like
open-link

Copy link
Owner

@mattbrailsford mattbrailsford left a comment

Choose a reason for hiding this comment

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

Nice addition. Just a small change to make.

@@ -84,6 +84,11 @@
angularHelper.getCurrentForm($scope).$setDirty();
};

$scope.open = function (section, collection, id) {
var openHref = "/umbraco/#/" + section + "/fluidity/edit/" + collection + "!" + id;
window.location.href = openHref;
Copy link
Owner

Choose a reason for hiding this comment

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

Need to use the $location service and call $location.path(/section/fluidity/edit/collection!id) instead of changing the window location explicitly as that's the angular way to do it. By changing it via window you are requiring the need of /umbraco/ in the route which could break if someone changes this (it's possible to change in config).

@mattbrailsford mattbrailsford merged commit 4dbf660 into mattbrailsford:develop May 2, 2018
@mattbrailsford mattbrailsford added this to the 1.0.3 milestone Jun 19, 2018
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.

2 participants