-
Notifications
You must be signed in to change notification settings - Fork 55
Add origin common modal popup component. #135
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a few small comments
{{$ctrl.modalTitle}} | ||
</h4> | ||
<div ng-transclude></div> | ||
<a href="" class="origin-modal-popup-close" ng-click="$ctrl.onClose()()"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the extra parens intentional because of how we are passing the callback? If so, worth a comment in case someone "fixes" it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary, I've fixed it.
var leftPos; | ||
var elementRect = positionElement.getBoundingClientRect(); | ||
var windowHeight = $window.innerHeight; | ||
var modalElement = angular.element($element)[0].children[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does $element[0].children[0]
work without the angular.element()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does, I've removed it.
Minor change for binding type of on-close (& to <) for consistency. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, ready to merge?
@spadgett Yes |
Migrate from origin-web-catalog and make more generic.