Skip to content

Commit

Permalink
Merge pull request #19 from gen4sp/master
Browse files Browse the repository at this point in the history
Click Events added
  • Loading branch information
koddr authored Mar 12, 2019
2 parents a702476 + 7cf86b9 commit 5257981
Show file tree
Hide file tree
Showing 17 changed files with 37 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/helpers/events.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function click (vue, label) {
vue.$emit('onClick', { label: label })
}
2 changes: 2 additions & 0 deletions src/providers/Email.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</template>

<script>
import { click } from '../helpers/events'
import { documentHref } from "../helpers/href";
export default {
Expand Down Expand Up @@ -48,6 +49,7 @@ export default {
* @return {object} a pop-up window
*/
showShareWindow: function() {
click(this, 'email');
// Variables
const width = 640;
const height = 640;
Expand Down
3 changes: 2 additions & 1 deletion src/providers/Facebook.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
</template>

<script>
import { click } from '../helpers/events'
import { documentHrefWithoutHash } from "../helpers/href";
export default {
name: "VueGoodshareFacebook",
props: {
Expand Down Expand Up @@ -76,6 +76,7 @@ export default {
* @return {object} a pop-up window
*/
showShareWindow: function() {
click(this, 'facebook');
// Variables
const width = 640;
const height = 640;
Expand Down
2 changes: 2 additions & 0 deletions src/providers/GooglePlus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</template>

<script>
import { click } from '../helpers/events'
import { documentHref } from "../helpers/href";
export default {
Expand Down Expand Up @@ -48,6 +49,7 @@ export default {
* @return {object} a pop-up window
*/
showShareWindow: function() {
click(this, 'googlePlus');
// Variables
const width = 640;
const height = 640;
Expand Down
2 changes: 2 additions & 0 deletions src/providers/Line.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</template>

<script>
import { click } from '../helpers/events'
import { documentHref } from "../helpers/href";
export default {
Expand Down Expand Up @@ -48,6 +49,7 @@ export default {
* @return {object} a pop-up window
*/
showShareWindow: function() {
click(this, 'line');
// Variables
const width = 640;
const height = 640;
Expand Down
4 changes: 3 additions & 1 deletion src/providers/LinkedIn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
<span class="title-social" v-if="this.$props.title_social">{{ title_social }}</span>
<span class="counter-linkedin"
v-model="counter_linkedin"
v-if="this.$props.has_counter"
v-if="this.$props.has_counter"
>{{ counter_linkedin }}</span>
</a>
</template>

<script>
import { click } from '../helpers/events'
import { documentHref } from "../helpers/href";
import { documentTitle } from "../helpers/title";
import { metaDescription } from "../helpers/description";
Expand Down Expand Up @@ -88,6 +89,7 @@ export default {
* @return {object} a pop-up window
*/
showShareWindow: function() {
click(this, 'linkedIn');
// Variables
const width = 640;
const height = 640;
Expand Down
2 changes: 2 additions & 0 deletions src/providers/LiveJournal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
</template>

<script>
import { click } from '../helpers/events'
import { documentHref } from "../helpers/href";
import { documentTitle } from "../helpers/title";
Expand Down Expand Up @@ -54,6 +55,7 @@ export default {
* @return {object} a pop-up window
*/
showShareWindow: function() {
click(this, 'liveJournal');
// Variables
const width = 640;
const height = 640;
Expand Down
4 changes: 3 additions & 1 deletion src/providers/MoiMir.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
<span class="title-social" v-if="this.$props.title_social">{{ title_social }}</span>
<span class="counter-moimir"
v-model="counter_moimir"
v-if="this.$props.has_counter"
v-if="this.$props.has_counter"
>{{ counter_moimir }}</span>
</a>
</template>

<script>
import { click } from '../helpers/events'
import { documentHref } from "../helpers/href";
import { documentTitle } from "../helpers/title";
import { metaDescription } from "../helpers/description";
Expand Down Expand Up @@ -94,6 +95,7 @@ export default {
* @return {object} a pop-up window
*/
showShareWindow: function() {
click(this, 'moiMir');
// Variables
const width = 640;
const height = 640;
Expand Down
2 changes: 2 additions & 0 deletions src/providers/Odnoklassniki.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
</template>

<script>
import { click } from '../helpers/events'
import { documentHrefWithoutHash } from "../helpers/href";
import { documentTitle } from "../helpers/title";
Expand Down Expand Up @@ -83,6 +84,7 @@ export default {
* @return {object} a pop-up window
*/
showShareWindow: function() {
click(this, 'odnoklassniki');
// Variables
const width = 640;
const height = 640;
Expand Down
2 changes: 2 additions & 0 deletions src/providers/Pinterest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
</template>

<script>
import { click } from '../helpers/events'
import { documentHref } from "../helpers/href";
import { metaDescription } from "../helpers/description";
import { linkAppleTouchIcon } from "../helpers/icon";
Expand Down Expand Up @@ -87,6 +88,7 @@ export default {
* @return {object} a pop-up window
*/
showShareWindow: function() {
click(this, 'pinterest');
// Variables
const width = 640;
const height = 640;
Expand Down
2 changes: 2 additions & 0 deletions src/providers/Reddit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
</template>

<script>
import { click } from '../helpers/events'
import { documentHref } from "../helpers/href";
import { documentTitle } from "../helpers/title";
Expand Down Expand Up @@ -82,6 +83,7 @@ export default {
* @return {object} a pop-up window
*/
showShareWindow: function() {
click(this, 'reddit');
// Variables
const width = 640;
const height = 640;
Expand Down
2 changes: 2 additions & 0 deletions src/providers/Telegram.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</template>

<script>
import { click } from '../helpers/events'
import { documentHrefWithoutHash } from "../helpers/href";
export default {
Expand Down Expand Up @@ -48,6 +49,7 @@ export default {
* @return {object} a pop-up window
*/
showShareWindow: function() {
click(this, 'telegram');
// Variables
const width = 640;
const height = 640;
Expand Down
2 changes: 2 additions & 0 deletions src/providers/Tumblr.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
</template>

<script>
import { click } from '../helpers/events'
import { documentHref } from "../helpers/href";
import { documentTitle } from "../helpers/title";
import { metaDescription } from "../helpers/description";
Expand Down Expand Up @@ -88,6 +89,7 @@ export default {
* @return {object} a pop-up window
*/
showShareWindow: function() {
click(this, 'tumblr');
// Variables
const width = 640;
const height = 640;
Expand Down
2 changes: 2 additions & 0 deletions src/providers/Twitter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
</template>

<script>
import { click } from '../helpers/events'
import { documentHref } from "../helpers/href";
import { documentTitle } from "../helpers/title";
Expand Down Expand Up @@ -54,6 +55,7 @@ export default {
* @return {object} a pop-up window
*/
showShareWindow: function() {
click(this, 'twitter');
// Variables
const width = 640;
const height = 640;
Expand Down
2 changes: 2 additions & 0 deletions src/providers/Viber.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</template>

<script>
import { click } from '../helpers/events'
import { documentHref } from "../helpers/href";
export default {
Expand Down Expand Up @@ -48,6 +49,7 @@ export default {
* @return {object} a pop-up window
*/
showShareWindow: function() {
click(this, 'viber');
// Variables
const width = 640;
const height = 640;
Expand Down
2 changes: 2 additions & 0 deletions src/providers/Vkontakte.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
</template>

<script>
import { click } from '../helpers/events'
import { documentHref } from "../helpers/href";
import { documentTitle } from "../helpers/title";
import { metaDescription } from "../helpers/description";
Expand Down Expand Up @@ -94,6 +95,7 @@ export default {
* @return {object} a pop-up window
*/
showShareWindow: function() {
click(this, 'vkontakte');
// Variables
const width = 640;
const height = 640;
Expand Down
2 changes: 2 additions & 0 deletions src/providers/WhatsApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</template>

<script>
import { click } from '../helpers/events'
import { documentHref } from "../helpers/href";
export default {
Expand Down Expand Up @@ -48,6 +49,7 @@ export default {
* @return {object} a pop-up window
*/
showShareWindow: function() {
click(this, 'whatsApp');
// Variables
const width = 640;
const height = 640;
Expand Down

0 comments on commit 5257981

Please sign in to comment.