SAAS-1083 - more work on publish dialog
This commit is contained in:
parent
706db9bc25
commit
b4db2ff4ca
8 changed files with 111 additions and 34 deletions
|
@ -19,16 +19,16 @@ var AIRTIME = (function (AIRTIME) {
|
|||
$scope.publishSources = {};
|
||||
|
||||
function init () {
|
||||
$http.get(endpoint + mediaId, { csrf_token: jQuery("#csrf").val() })
|
||||
var csrfToken = jQuery("#csrf").val();
|
||||
$http.get(endpoint + mediaId, { csrf_token: csrfToken })
|
||||
.success(function (json) {
|
||||
console.log(json);
|
||||
$scope.media = json;
|
||||
tab.setName($scope.media.track_title);
|
||||
});
|
||||
|
||||
// Get an object containing all sources, their translated labels,
|
||||
// and their publication state for the file with the given ID
|
||||
$http.get(endpoint + mediaId + '/publish-sources', { csrf_token: jQuery("#csrf").val() })
|
||||
$http.get(endpoint + mediaId + '/publish-sources', { csrf_token: csrfToken })
|
||||
.success(function (json) {
|
||||
$scope.sources = json;
|
||||
// Store the data (whether each source should be published to when publish is clicked)
|
||||
|
@ -40,6 +40,13 @@ var AIRTIME = (function (AIRTIME) {
|
|||
});
|
||||
}
|
||||
|
||||
$scope.openEditDialog = function() {
|
||||
var uid = AIRTIME.library.MediaTypeStringEnum.FILE + "_" + mediaId;
|
||||
$.get(baseUrl + "library/edit-file-md/id/" + mediaId, {format: "json"}, function (json) {
|
||||
AIRTIME.playlist.fileMdEdit(json, uid);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.publish = function () {
|
||||
var data = {};
|
||||
jQuery.each($scope.publishData, function(k, v) {
|
||||
|
@ -131,6 +138,5 @@ var AIRTIME = (function (AIRTIME) {
|
|||
});*/
|
||||
};
|
||||
|
||||
|
||||
return AIRTIME;
|
||||
}(AIRTIME || {}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue