Skip to content

Commit

Permalink
Fix #3258: Add share-to-classroom Button (#3743)
Browse files Browse the repository at this point in the history
* Add share-to-classroom Button Solves #3258

* Add ng-click directive for twitter,classroom shares
  • Loading branch information
rdrsadhu authored and seanlip committed Aug 14, 2017
1 parent 5b667e2 commit 254eb42
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
Binary file added assets/images/general/classroom.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Expand Up @@ -78,6 +78,9 @@ oppia.directive('sharingLinks', [

$scope.twitterUrl = UrlInterpolationService.getStaticImageUrl(
'/general/twitter.png');

$scope.classroomUrl = UrlInterpolationService.getStaticImageUrl(
'/general/classroom.png');
}
]
};
Expand Down
Expand Up @@ -12,11 +12,17 @@
</li>

<li>
<a ng-href="https://twitter.com/share?text=<[escapedTwitterText]>&url=<[serverName]>/<[activityType]>/<[activityId]>" onclick="return !window.open(this.href, '', 'height=460, width=640')" target="_window">
<a ng-href="https://twitter.com/share?text=<[escapedTwitterText]>&url=<[serverName]>/<[activityType]>/<[activityId]>" onclick="return !window.open(this.href, '', 'height=460, width=640')" ng-click="registerShareEvent('twitter')" target="_window">
<img class="share-option-img" ng-src="<[twitterUrl]>" alt="Twitter">
</a>
</li>

<li>
<a ng-href="https://classroom.google.com/share?url=<[serverName]>/<[activityType]>/<[activityId]>" onclick="return !window.open(this.href, '', 'height=460, width=640')" ng-click="registerShareEvent('classroom')" target="_window">
<img class="share-option-img" ng-src="<[classroomUrl]>" alt="Classroom">
</a>
</li>

<li ng-if="shareType === 'exploration'">
<a ng-click="showEmbedExplorationModal(explorationId)" tooltip="Embed" tooltip-placement="top" tabindex="0">
<i class="material-icons md-48 embed-link">&#xE86F;</i>
Expand Down

0 comments on commit 254eb42

Please sign in to comment.