Skip to content
This repository has been archived by the owner on Mar 7, 2022. It is now read-only.

Commit

Permalink
fix for sms thanks @shaibo10
Browse files Browse the repository at this point in the history
  • Loading branch information
45kb committed Sep 29, 2016
1 parent c36e95e commit b312957
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 16 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-socialshare",
"version": "2.3.0",
"version": "2.3.1",
"description": "A social media url and content share module for angularjs.",
"authors": [
"Filippo Oretti <[email protected]",
Expand Down
16 changes: 10 additions & 6 deletions dist/angular-socialshare.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*
* angular-socialshare
* 2.3.0
* 2.3.1
*
* A social media url and content share module for angularjs.
* http://720kb.github.io/angular-socialshare
*
* MIT license
* Wed Sep 28 2016
* Thu Sep 29 2016
*/
/*global angular*/
/*eslint no-loop-func:0, func-names:0*/
Expand Down Expand Up @@ -764,10 +764,9 @@
element.attr('target', '_top');

}
,manageSmsShare = function smsShare($window, attrs, element) {
, manageSmsShare = function smsShare($window, attrs, element) {

if(attrs.socialshareText.indexOf('%')>=0)
{
if(attrs.socialshareText.indexOf('%') >= 0) {
$log.warn('sending sms text with "%" sign is not supported');
}

Expand Down Expand Up @@ -810,7 +809,7 @@
, 'Skype', 'toolbar=0,status=0,resizable=yes,width=' + attrs.socialsharePopupWidth + ',height=' + attrs.socialsharePopupHeight
+ ',top=' + ($window.innerHeight - attrs.socialsharePopupHeight) / 2 + ',left=' + ($window.innerWidth - attrs.socialsharePopupWidth) / 2);
}
, socialshareService = /*@ngInject*/ ['$window', function socialshareService($window) {
, socialshareService = /*@ngInject*/ ['$window', '$log', function socialshareService($window, $log) {

this.emailShare = manageEmailShare;
this.facebookShare = manageFacebookShare;
Expand Down Expand Up @@ -840,6 +839,7 @@
//**** whatsapp can't share without an element clicked (href)
//this.whatsappShare = manageWhatsappShare;
this.skypeShare = skypeShare;
this.smsShare = manageSmsShare;

this.share = function shareTrigger(serviceShareConf) {

Expand All @@ -848,6 +848,10 @@
this.emailShare($window, serviceShareConf.attrs);
break;
}
case 'sms': {
this.smsShare($window, $log, serviceShareConf.attrs);
break;
}
case 'facebook': {
this.facebookShare($window, serviceShareConf.attrs);
break;
Expand Down
Loading

0 comments on commit b312957

Please sign in to comment.