1(function () { 2 'use strict'; 3 4 angular.module('download-song-modal', []) 5 .directive('downloadSongModal', ['$uibModal', 'loginModal', function ($uibModal, loginModal) { 6 return { 7 restrict: 'A', 8 scope: false, 9 link: function(scope, element, attr) { 10 element.bind('click', function (){ 11 12 13 if (!scope.loggedIn) { 14 loginModal(); 15 return; 16 } 17 18 var modalInstance = $uibModal.open({ 19 animation: true, 20 templateUrl: '/app/ng-templates/downloadSongModal.html', 21 controller: 'downloadSongModalCtrl', 22 size: 'md', 23 resolve: { 24 song: function () { 25 return scope.song; 26 } 27 } 28 }); 29 }) 30 } 31 } 32 }]) 33 .controller('downloadSongModalCtrl', ['$scope', '$uibModalInstance', 'song', function ($scope, $uibModalInstance, song) { 34 35 $scope.song = song; 36 $scope.downloadLinksSupported = downloadLinksSupported(); 37 38 $scope.cancel = function () { 39 $uibModalInstance.dismiss('cancel'); 40 }; 41 42 $scope.downloadSongModalOpen = false; 43 44 $uibModalInstance.opened.then(function() { 45 $scope.downloadSongModalOpen = true; 46 $('body').css('overflow-y','scroll'); 47 }); 48 $uibModalInstance.closed.then(function() { 49 $scope.downloadSongModalOpen = false; 50 }); 51 52 53}]) 54 55}());
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.