Open Sam2243 opened 10 years ago
The ns-popover-tooltip-custom is a custom theme and is not part of te nsPopover, it was created to show how to create custom themes.
The built-in them for tooltips is the ns-popover-tooltip-theme and that is not described in the documentation properly. I will fix that.
Thanks, for your help.
Seriously man you need to work on your documentations, how do close popovers from a ng controller programmatically?
avatsaev .. You can call hidePopover method on ng-click like this
<a ng-click="hidePopover();"></a>
I was trying to hide them from a controller without ng click, because when I open a popover and then another one, I need all previous popovers to disappear and not stand there. Any adivce on how I can achieve that?
You can have a boolean variable in you controller as "isPopoverOpen" which would be set to false initially. Set it to true when the first popover and add a check to not to open the next unless the variable is set to false again :)
A new option "ns-popover-modal" was added to allow popover to be grouped and displayed separatelly. The basic usage is in the docs page. This feature is not tested yet and is planed to be available in the next release.
2014-12-15 12:41 GMT-03:00 Sam2243 notifications@github.com:
You can have a boolean variable in you controller as "isPopoverOpen" which would be set to false initially. Set it to true when the first popover and add a check to not to open the next unless the variable is set to false again :)
— Reply to this email directly or view it on GitHub https://github.com/nohros/nsPopover/issues/31#issuecomment-67012691.
true - All popover instances will be hidden when this one instance is shown
I've tried ("ns-popover-modal" => "true"), didn't work, the popover isn't showing up at all
Like I said, this feature was not tested yet and we plan to publish on the next release, which will occur at 20/12/2014.
2014-12-15 12:55 GMT-03:00 Vatsaev Aslan notifications@github.com:
true - All popover instances will be hidden when this one instance is shown
I've tried it, didn't work at all
— Reply to this email directly or view it on GitHub https://github.com/nohros/nsPopover/issues/31#issuecomment-67015129.
Noted
@Sam2243 Thanks for your issue. In the meantime, would you be interested in filling the gap and contributing documentation, in your spare time of course?
Oh yeah sure I will do it. Let me know where I could add the documentation.
@Sam2243 Thanks for your willingness, very heart warming :) If you're familiar with git, then just submit a pull request with new documentation. If you're comfortable with any other means, like a simple text editor, just download README.md file and adjust it accordingly. Then send it over to my Email, which you can see on my profile page.
Sure thing. I'll submit a pull request very soon for sure.
Splendid! Thanks @Sam2243 for your help.
What about the implementation of hiding the popover via a controller? (without ng-click) Any news? The ns-popover-group doesn't seem to work :(
Everything seems to be working pretty well for the most part thank you! I don't see any documentation on taking advantage of the onOpen and onClose callbacks. I've tried attaching a scope-level function to the onOpen attribute using ns-popover-on-open, but for some reason it gets lost in translation during the $parse in the options object. Anyways, I know I'd find it helpful to have documentation regarding all of the available attributes you can pass it.
The control that you have created is quite good but the documentation is not providing enough information to add a nsPopover having theme "ns-popover-tooltip-custom".. What I found in your code was the following snippet you should add inside your template first to make the popover visible otherwise it won't show up.
<div class="triangle"></div><div class="ns-popover-tooltip-custom">
I suppose you should add this in your documentation. Thanks!