Merge remote-tracking branch 'sf/2.2.x' into cc-4585

This commit is contained in:
Rudi Grinberg 2012-11-05 09:19:20 -05:00
commit e01a61208d
3 changed files with 28 additions and 27 deletions

View File

@ -321,7 +321,7 @@ class LibraryController extends Zend_Controller_Action
if (isset($file)) { if (isset($file)) {
try { try {
$res = $file->delete(true); $res = $file->delete();
} catch (FileNoPermissionException $e) { } catch (FileNoPermissionException $e) {
$message = $noPermissionMsg; $message = $noPermissionMsg;
} catch (Exception $e) { } catch (Exception $e) {

View File

@ -335,7 +335,7 @@ SQL;
* @param boolean $p_deleteFile * @param boolean $p_deleteFile
* *
*/ */
public function delete($deleteFromPlaylist=false) public function delete()
{ {
$filepath = $this->getFilePath(); $filepath = $this->getFilePath();
@ -359,9 +359,6 @@ SQL;
Application_Model_RabbitMq::SendMessageToMediaMonitor("file_delete", $data); Application_Model_RabbitMq::SendMessageToMediaMonitor("file_delete", $data);
} }
if ($deleteFromPlaylist) {
Application_Model_Playlist::DeleteFileFromAllPlaylists($this->getId());
}
// set file_exists falg to false // set file_exists falg to false
$this->_file->setDbHidden(true); $this->_file->setDbHidden(true);
$this->_file->save(); $this->_file->save();

View File

@ -369,29 +369,33 @@ var AIRTIME = (function(AIRTIME){
$.each($("div .big_play"), function(index, value){ $.each($("div .big_play"), function(index, value){
if ($(value).attr('blockId') === undefined) { if ($(value).attr('blockId') === undefined) {
var mime = $(value).attr("data-mime-type"); var mime = $(value).attr("data-mime-type");
if (isAudioSupported(mime)) { //If mime is undefined it is likely because the file was
$(value).bind("click", openAudioPreview); //deleted from the library. This case is handled in mod.onReady()
} else { if (mime !== undefined) {
$(value).attr("class", "big_play_disabled dark_class"); if (isAudioSupported(mime)) {
$(value).qtip({ $(value).bind("click", openAudioPreview);
content: 'Your browser does not support playing this file type: "'+ mime +'"', } else {
show: 'mouseover', $(value).attr("class", "big_play_disabled dark_class");
hide: { $(value).qtip({
delay: 500, content: 'Your browser does not support playing this file type: "'+ mime +'"',
fixed: true show: 'mouseover',
}, hide: {
style: { delay: 500,
border: { fixed: true
width: 0,
radius: 4
}, },
classes: "ui-tooltip-dark ui-tooltip-rounded" style: {
}, border: {
position: { width: 0,
my: "left bottom", radius: 4
at: "right center" },
}, classes: "ui-tooltip-dark ui-tooltip-rounded"
}) },
position: {
my: "left bottom",
at: "right center"
},
})
}
} }
} else { } else {
if ($(value).attr('blocktype') === 'dynamic') { if ($(value).attr('blocktype') === 'dynamic') {