1(function () { 2 'use strict'; 3 4 angular.module('bookmark-song', []) 5 .directive('bookmarkSong',["$http", "$sce", "songsFactory", function ($http, $sce, songsFactory) { 6 return { 7 scope: false, 8 restrict: 'A', 9 template: '<span ng-show="song.bookmarked"><span class="fa fa-bookmark song_extra_action song_action_focused" uib-tooltip="Bookmarked" tooltip-placement="right" style="color:rgb(53, 232, 226)"></span></span>\ 10 <span ng-show="!song.bookmarked"><span class="fa fa-bookmark song_extra_action" uib-tooltip="Bookmark" tooltip-placement="right"></span></span>', 11 link: function(scope, element, attr) { 12 element.bind('click', function(){ 13 if (scope.song.bookmarked){ 14 songsFactory.BookmarkSong(scope.song.id, true, function(){ 15 scope.song.bookmarked = false; 16 //scope.$apply(); 17 }) 18 return; 19 } else { 20 songsFactory.BookmarkSong(scope.song.id, false, function(){ 21 scope.song.bookmarked = true; 22 //scope.$apply(); 23 }) 24 return; 25 } 26 27 }) 28 } 29 } 30 }]) 31}());
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.