diff --git a/airtime_mvc/application/controllers/LibraryController.php b/airtime_mvc/application/controllers/LibraryController.php index 1d715bfa4..6fbf6e034 100644 --- a/airtime_mvc/application/controllers/LibraryController.php +++ b/airtime_mvc/application/controllers/LibraryController.php @@ -56,32 +56,7 @@ class LibraryController extends Zend_Controller_Action } $url = $file->getRelativeFileUrl($baseUrl).'/download/true'; - $menu["download"] = array("name" => "Download", "icon" => "download", "url" => $url); - - if (Application_Model_Preference::GetUploadToSoundcloudOption()) { - - //create a menu separator - $menu["sep1"] = "-----------"; - - //create a sub menu for Soundcloud actions. - $menu["soundcloud"] = array("name" => "Soundcloud", "icon" => "soundcloud", "items" => array()); - - $scid = $file->getSoundCloudId(); - - if (!is_null($scid)){ - $text = "Re-upload to SoundCloud"; - } - else { - $text = "Upload to SoundCloud"; - } - - $menu["soundcloud"]["items"]["upload"] = array("name" => $text, "icon" => "soundcloud", "url" => "/library/upload-file-soundcloud/id/{$id}"); - - if ($scid > 0){ - $url = $file->getSoundCloudLinkToFile(); - $menu["soundcloud"]["items"]["view"] = array("name" => "View on Soundcloud", "icon" => "soundcloud", "url" => $url); - } - } + $menu["download"] = array("name" => "Download", "icon" => "download", "url" => $url); } else if ($type === "playlist") { @@ -94,6 +69,33 @@ class LibraryController extends Zend_Controller_Action //Open a jPlayer window and play the audio clip. $menu["play"] = array("name"=> "Play", "icon" => "play"); + + + //SOUNDCLOUD MENU OPTIONS + if ($type === "audioclip" && Application_Model_Preference::GetUploadToSoundcloudOption()) { + + //create a menu separator + $menu["sep1"] = "-----------"; + + //create a sub menu for Soundcloud actions. + $menu["soundcloud"] = array("name" => "Soundcloud", "icon" => "soundcloud", "items" => array()); + + $scid = $file->getSoundCloudId(); + + if (!is_null($scid)){ + $text = "Re-upload to SoundCloud"; + } + else { + $text = "Upload to SoundCloud"; + } + + $menu["soundcloud"]["items"]["upload"] = array("name" => $text, "icon" => "soundcloud", "url" => "/library/upload-file-soundcloud/id/{$id}"); + + if ($scid > 0){ + $url = $file->getSoundCloudLinkToFile(); + $menu["soundcloud"]["items"]["view"] = array("name" => "View on Soundcloud", "icon" => "soundcloud", "url" => $url); + } + } $this->view->items = $menu; } diff --git a/airtime_mvc/public/css/jquery.contextMenu.css b/airtime_mvc/public/css/jquery.contextMenu.css index 98e5c5091..ac0c8332a 100755 --- a/airtime_mvc/public/css/jquery.contextMenu.css +++ b/airtime_mvc/public/css/jquery.contextMenu.css @@ -35,7 +35,7 @@ font-size: 11px; } -.context-menu-item { +.context-menu-item.icon { padding: 2px 2px 2px 28px; background-color: #f0f0f0; position: relative;