chiliec / yii2-vote

Provides voting for any model :+1: :-1:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Suggetion : Use Bootstrap Popover Plugin to display messages

teranchristian opened this issue · comments

Currently, the messages are display using DIVs. This might break the layout of the site.

Before vote
screenshot from 2016-05-09 19-25-00

After vote
screenshot from 2016-05-09 19-25-11

displaying the messages using the popover plugin can fix the layout issue
Example
screenshot from 2016-05-09 19-28-14

Good suggestion, I like it.

I'm already working on it. Happy to share my code

I have new way with notification.

\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

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

Great work, I merged, thanks! But only I have this problem?
strange
P.S.: Chrome 51.0.2704.106 on Mac OS El Captain 10.11.5

@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!