Suggetion : Use Bootstrap Popover Plugin to display messages
teranchristian opened this issue · comments
Good suggestion, I like it.
I'm already working on it. Happy to share my code
I have new way with notification.
- In vote action https://github.com/Chiliec/yii2-vote/blob/master/actions/VoteAction.php#L23 all messages I return as flash-message
\Yii::$app->session->setFlash('error', Yii::t('vote', 'modelId has not been sent'));
example - https://github.com/loveorigami/lo-module-vote/blob/master/actions/VoteAction.php
- Next I use yii2-notification wrapper
https://github.com/loveorigami/yii2-notification-wrapper
where I can use different Layers for display flash-notification.
https://github.com/loveorigami/yii2-notification-wrapper#supported-layers
this check this https://github.com/teranchristian/yii2-vote, still a couple of things to improve
@teranchristian which line in your code is responsible for the bootstrap popup in your screen shot above?
Hi @jsobers1331, did you try the code ?
about the code look at yii2-vote/widget/vote.php
Thank you, I found it in your popover branch.
@teranchristian why you don't create pull request?
hey @chiliec, sure. I am going to clean the code tomorrow, then i will pull a request. Cheers, C
@teranchristian could you take a look above? would love this in my project.
Hey @jsobers1331,
sorry for my late reply.
I just fixed this issue and pushed my changes.
Do you mind testing it ?
cheers,
C
I've merged. Thank you, @teranchristian!
Included in release 4.0.0