diff --git a/src/app/components/proposal-box/proposal-box.directive.js b/src/app/components/proposal-box/proposal-box.directive.js
index 0f69b64..d79c9c9 100644
--- a/src/app/components/proposal-box/proposal-box.directive.js
+++ b/src/app/components/proposal-box/proposal-box.directive.js
@@ -205,9 +205,23 @@
return vm.$state.href('programa', {
slug: vm.topic.slug,
proposal_id: vm.proposal.id,
+ }, {
+ absolute: true
});
};
+ ProposalBoxController.prototype.getSocialText = function() {
+ var vm = this;
+
+ return vm.proposal.abstract;
+ };
+
+ ProposalBoxController.prototype.getSocialImage = function() {
+ var vm = this;
+
+ return vm.$rootScope.basePath + vm.topic.image.url;
+ };
+
var directive = {
restrict: 'E',
templateUrl: 'app/components/proposal-box/proposal-box.html',
diff --git a/src/app/components/proposal-box/proposal-box.html b/src/app/components/proposal-box/proposal-box.html
index 3f8d833..06ca9b1 100644
--- a/src/app/components/proposal-box/proposal-box.html
+++ b/src/app/components/proposal-box/proposal-box.html
@@ -30,10 +30,10 @@
+ social-url="vm.getSocialUrl()"
+ social-text="vm.getSocialText()"
+ social-image="vm.getSocialImage()"
+ class="dropdown-menu dropdown-menu-right">
diff --git a/src/app/components/social-share/social-share.directive.js b/src/app/components/social-share/social-share.directive.js
index 4f5ae0b..cd285c6 100644
--- a/src/app/components/social-share/social-share.directive.js
+++ b/src/app/components/social-share/social-share.directive.js
@@ -11,10 +11,11 @@
restrict: 'E',
templateUrl: 'app/components/social-share/social-share.html',
scope: {
- url: '=',
- image: '=',
- text: '=',
- arrowClass: '@',
+ socialVia: '=',
+ socialUrl: '=',
+ socialImage: '=',
+ socialText: '=',
+ arrowClass: '@'
},
controller: SocialShareController,
controllerAs: 'vm',
@@ -27,7 +28,13 @@
function SocialShareController($log) {
$log.debug('SocialShareController');
- // var vm = this;
+ var vm = this;
+
+ vm.socialVia = vm.socialVia || "687948707977695"; // 476168325877872
+ vm.socialUrl = vm.socialUrl || "http://dialoga.gov.br/";
+ vm.socialImage = vm.socialImage || "http://dialoga.gov.br/images/logo.png";
+ vm.socialText = vm.socialText || "Conheça o Dialoga Brasil. Dialoga Brasil | O País fica melhor quando VOCÊ PARTICIPA.";
+
}
}
diff --git a/src/app/components/social-share/social-share.html b/src/app/components/social-share/social-share.html
index 4080d19..e95627b 100644
--- a/src/app/components/social-share/social-share.html
+++ b/src/app/components/social-share/social-share.html
@@ -3,17 +3,15 @@