SAAS-1214 - add Connect with Soundcloud button; Fix nav styling in some browsers

This commit is contained in:
Duncan Sommerville 2015-11-18 12:37:29 -05:00
parent 9a8e80f74b
commit 9218d76de9
5 changed files with 24 additions and 20 deletions

View file

@ -12,11 +12,19 @@ var AIRTIME = (function (AIRTIME) {
var dialogUrl = 'library/publish-dialog';
var PUBLISH_APP_NAME = 'publish';
//AngularJS app
var publishApp = angular.module(PUBLISH_APP_NAME, [])
.controller('Publish', function ($scope, $http, mediaId, tab) {
.controller('Publish', function ($sce, $scope, $http, mediaId, tab) {
$scope.publishData = {};
var isAdmin = userType == 'A' || userType == 'S';
// Javascript enum containing source connection HTML strings (ie. Connect with SoundCloud button)
$scope.sourceConnectEnum = Object.freeze({
soundcloud: isAdmin ? $sce.trustAsHtml(
"<a href='" + baseUrl + "soundcloud/authorize' target='_blank'>" +
"<img src='http://connect.soundcloud.com/2/btn-connect-sc-l.png'>" +
"</a>"
) : $sce.trustAsHtml($.i18n._("Ask your station administrator to connect to SoundCloud."))
});
var sourceInterval;
tab.contents.on("click", "input[type='checkbox']", function () {