Merge lp:~abreu-alexandre/webapps-core/link-share-webpage-title into lp:webapps-core

Proposed by Alexandre Abreu
Status: Merged
Approved by: David Barth
Approved revision: 138
Merge reported by: David Barth
Merged at revision: not available
Proposed branch: lp:~abreu-alexandre/webapps-core/link-share-webpage-title
Merge into: lp:webapps-core
Diff against target: 97 lines (+11/-4)
5 files modified
webapp-facebook/unity-webapps-facebook/HubSharer.qml (+2/-0)
webapp-facebook/unity-webapps-facebook/Share.qml (+2/-0)
webapp-facebook/unity-webapps-facebook/ShareComponent.qml (+3/-0)
webapp-facebook/unity-webapps-facebook/facebook.user.js (+1/-1)
webapp-twitter/unity-webapps-twitter/share.user.js (+3/-3)
To merge this branch: bzr merge lp:~abreu-alexandre/webapps-core/link-share-webpage-title
Reviewer Review Type Date Requested Status
David Barth (community) Approve
Review via email: mp+297205@code.launchpad.net

Commit message

Add web page title as part of the Links sharing operation

Description of the change

Add web page title as part of the Links sharing operation

To post a comment you must log in.
Revision history for this message
David Barth (dbarth) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'webapp-facebook/unity-webapps-facebook/HubSharer.qml'
--- webapp-facebook/unity-webapps-facebook/HubSharer.qml 2016-04-29 20:17:48 +0000
+++ webapp-facebook/unity-webapps-facebook/HubSharer.qml 2016-06-13 15:06:03 +0000
@@ -26,6 +26,7 @@
2626
27 property string contentType27 property string contentType
28 property string fileToShare28 property string fileToShare
29 property string text
2930
30 function _callback(accessToken,31 function _callback(accessToken,
31 fileToShare,32 fileToShare,
@@ -79,6 +80,7 @@
79 visible: true80 visible: true
8081
81 fileToShare: main.fileToShare82 fileToShare: main.fileToShare
83 text: main.text
82 contentType: main.contentType84 contentType: main.contentType
83 callback: _callback85 callback: _callback
8486
8587
=== modified file 'webapp-facebook/unity-webapps-facebook/Share.qml'
--- webapp-facebook/unity-webapps-facebook/Share.qml 2016-02-26 18:47:52 +0000
+++ webapp-facebook/unity-webapps-facebook/Share.qml 2016-06-13 15:06:03 +0000
@@ -27,6 +27,7 @@
27 anchors.fill: parent27 anchors.fill: parent
2828
29 property string fileToShare29 property string fileToShare
30 property string text
30 property string contentType31 property string contentType
31 property var callback32 property var callback
3233
@@ -61,6 +62,7 @@
6162
62 resourceToShare: root.fileToShare63 resourceToShare: root.fileToShare
63 contentType: root.contentType64 contentType: root.contentType
65 text: root.text
6466
65 onCancelled: root.cancelled()67 onCancelled: root.cancelled()
66 onShare: callback(root.accessToken,68 onShare: callback(root.accessToken,
6769
=== modified file 'webapp-facebook/unity-webapps-facebook/ShareComponent.qml'
--- webapp-facebook/unity-webapps-facebook/ShareComponent.qml 2016-02-26 18:47:52 +0000
+++ webapp-facebook/unity-webapps-facebook/ShareComponent.qml 2016-06-13 15:06:03 +0000
@@ -26,6 +26,7 @@
26 property string accountProviderDisplayName26 property string accountProviderDisplayName
27 property string contentType27 property string contentType
28 property string resourceToShare28 property string resourceToShare
29 property string text
2930
30 signal cancelled()31 signal cancelled()
31 signal share(string userMessage)32 signal share(string userMessage)
@@ -169,6 +170,8 @@
169 font.pixelSize: FontUtils.sizeToPixels("medium")170 font.pixelSize: FontUtils.sizeToPixels("medium")
170 font.weight: Font.Light171 font.weight: Font.Light
171 focus: true172 focus: true
173
174 text: shareComponent.text
172 }175 }
173 }176 }
174 }177 }
175178
=== modified file 'webapp-facebook/unity-webapps-facebook/facebook.user.js'
--- webapp-facebook/unity-webapps-facebook/facebook.user.js 2016-02-26 18:58:26 +0000
+++ webapp-facebook/unity-webapps-facebook/facebook.user.js 2016-06-13 15:06:03 +0000
@@ -36,7 +36,7 @@
36 api.launchEmbeddedUI(36 api.launchEmbeddedUI(
37 "HubSharer",37 "HubSharer",
38 uploadLink,38 uploadLink,
39 {"fileToShare": items[0], contentType: type});39 {"fileToShare": items[0].url, text: items[0].text, contentType: type});
40 });40 });
41 }41 }
42 });42 });
4343
=== modified file 'webapp-twitter/unity-webapps-twitter/share.user.js'
--- webapp-twitter/unity-webapps-twitter/share.user.js 2015-04-16 14:59:02 +0000
+++ webapp-twitter/unity-webapps-twitter/share.user.js 2016-06-13 15:06:03 +0000
@@ -47,7 +47,7 @@
47 });47 });
48 } else if (type === hub.ContentType.Links) {48 } else if (type === hub.ContentType.Links) {
49 transfer.items(function(items) {49 transfer.items(function(items) {
50 uploadLink(items[0].url)50 uploadLink(items[0].url, items[0].text)
51 });51 });
52 }52 }
53 });53 });
@@ -55,8 +55,8 @@
55hub.onShareRequested(_shareRequested);55hub.onShareRequested(_shareRequested);
5656
5757
58function uploadLink(url) {58function uploadLink(url, text) {
59 window.location.href = 'https://www.twitter.com/share?url=' + url59 window.location.href = 'https://www.twitter.com/share?url=' + url + '&text=' + text
60 if (activeTransfer) {60 if (activeTransfer) {
61 activeTransfer.setState(61 activeTransfer.setState(
62 hub.ContentTransfer.State.Finalized)62 hub.ContentTransfer.State.Finalized)

Subscribers

People subscribed via source and target branches

to all changes: