diff --git a/client/app/app.js b/client/app/app.js index 2328228..a00a06f 100755 --- a/client/app/app.js +++ b/client/app/app.js @@ -15,13 +15,14 @@ angular.module('dssWebApp', [ 'infinite-scroll', 'angularFileUpload', 'angulartics', + 'ngClipboard', 'angular-jwt', 'http-auth-interceptor', 'angular-smilies', 'angulartics.google.analytics' ]) .config(function ($stateProvider, $sceDelegateProvider, $httpProvider, $urlRouterProvider, $locationProvider, $provide, - jwtInterceptorProvider, $analyticsProvider, dialogsProvider, DSProvider, DSHttpAdapterProvider, + ngClipProvider, jwtInterceptorProvider, $analyticsProvider, dialogsProvider, DSProvider, DSHttpAdapterProvider, SERVER_CONFIG, STORAGE) { $urlRouterProvider .otherwise('/'); @@ -30,6 +31,8 @@ angular.module('dssWebApp', [ $httpProvider.defaults.useXDomain = true; $httpProvider.interceptors.push('AuthInterceptor'); + ngClipProvider.setPath("bower_components/zeroclipboard/dist/ZeroClipboard.swf"); + $analyticsProvider.firstPageview(true); $analyticsProvider.withAutoBase(true); diff --git a/client/app/main.controller.js b/client/app/main.controller.js index 2ca1649..9770ac8 100755 --- a/client/app/main.controller.js +++ b/client/app/main.controller.js @@ -100,6 +100,19 @@ angular.module('dssWebApp') SocketService.removeHandler('site:broadcast'); }); + $scope.getMixUrl = function(mix){ + var port = window.location.port; + return window.location.protocol + + "//" + window.location.hostname + + (port === '80' ? '' : ':' + port) + + $state.href('root.user.mix', {user: mix.user.slug, mix: mix.slug}); + }; + + $scope.copyUrl = function(mix){ + var url = getMixUrl(mix); + console.log("Copied URL", url); + }; + $scope.showChatbar = function () { $scope.chatVisible = !$scope.chatVisible; }; diff --git a/client/app/views/mixes/mixes.directive.html b/client/app/views/mixes/mixes.directive.html index b590646..d4a7c1b 100755 --- a/client/app/views/mixes/mixes.directive.html +++ b/client/app/views/mixes/mixes.directive.html @@ -2,13 +2,13 @@