Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/develop' into card007

card007 4 anni fa
parent
commit
31a5d461c5
1 ha cambiato i file con 9 aggiunte e 7 eliminazioni
  1. 9 7
      src/main/webapp/ux/style24_link.js

+ 9 - 7
src/main/webapp/ux/style24_link.js

@@ -1582,19 +1582,21 @@ function sendSns(sns, url, txt, media, description)
 	switch(sns)
 	{
 		case 'facebook':
-			var faceUrl = _isApp == 'true' ? 'public://?link=http://www.facebook.com/sharer/sharer.php?u=' : 'http://www.facebook.com/sharer/sharer.php?u=';
-			if (_isApp == 'ture' && _osType === 'I') {
-				location.href = faceUrl + _url;
+			var faceUrl = 'http://www.facebook.com/sharer/sharer.php?u=';
+
+			if (_isApp != null && _isApp == 'true') {
+				location.href = 'public://?link=' + faceUrl + _url;
 			} else {
 				window.open(faceUrl + _url, "_blank", 'width=600,height=400,resizable=yes,scrollbars=yes');
 			}
 			break;
 		case 'twitter':
-			var twitUrl = _isApp == 'true' ? 'public://?link=http://twitter.com/intent/tweet?text=' : 'http://twitter.com/intent/tweet?text=';
-			if (_isApp == 'true' && _osType === 'I') {
-				location.href = twitUrl + _txt;
+			var twitUrl = 'http://twitter.com/intent/tweet?text=';
+
+			if (_isApp != null && _isApp == 'true') {
+				location.href = 'public://?link=' + twitUrl + _txt;
 			} else {
-				window.open(twitUrl + _txt + '&url=' + _url, "_blank", 'width=600,height=400,resizable=yes,scrollbars=yes');
+				window.open(faceUrl + _txt + '&url=' + _url, "_blank", 'width=600,height=400,resizable=yes,scrollbars=yes');
 			}
 			break;
 		default: