Stub publish action for context menu
This commit is contained in:
parent
73e489fdc8
commit
b721545c68
|
@ -121,6 +121,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
if ($isAdminOrPM || $file->getFileOwnerId() == $user->getId()) {
|
||||
$menu["del"] = array("name"=> _("Delete"), "icon" => "delete", "url" => $baseUrl."library/delete");
|
||||
$menu["edit"] = array("name"=> _("Edit Metadata"), "icon" => "edit", "url" => $baseUrl."library/edit-file-md/id/{$id}");
|
||||
$menu["publish"] = array("name"=> _("Publish..."), "icon" => "soundcloud", "url" => $baseUrl."library/publish/id/{$id}");
|
||||
}
|
||||
|
||||
// It's important that we always return the parent id (cc_files id)
|
||||
|
|
|
@ -1155,6 +1155,23 @@ var AIRTIME = (function(AIRTIME) {
|
|||
oItems.del.callback = callback;
|
||||
}
|
||||
|
||||
// Publish.
|
||||
if (oItems.publish !== undefined) {
|
||||
if (data.ftype === "audioclip") {
|
||||
callback = function() {
|
||||
alert("TODO: Publish track with ID " + data.id);
|
||||
|
||||
/*
|
||||
$.get(oItems.publish.url, {format: "json"}, function(json){
|
||||
//AIRTIME.playlist.fileMdEdit(json);
|
||||
alert("derp");
|
||||
});*/
|
||||
};
|
||||
}
|
||||
oItems.publish.callback = callback;
|
||||
}
|
||||
|
||||
|
||||
// define a download callback.
|
||||
if (oItems.download !== undefined) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue