CC-3250: UI design for mount monitor for media monitor
( Manage Media Folder and Playlist Builder screen) - adding tooltip and fixed a minor bug
This commit is contained in:
parent
1f5f5057bf
commit
0ec58f0bc3
|
@ -875,11 +875,10 @@ class ApiController extends Zend_Controller_Action
|
||||||
$watched_dirs = Application_Model_MusicDir::getWatchedDirs(null,null);
|
$watched_dirs = Application_Model_MusicDir::getWatchedDirs(null,null);
|
||||||
|
|
||||||
foreach( $added_list as $ad){
|
foreach( $added_list as $ad){
|
||||||
|
$ad .= '/';
|
||||||
foreach( $watched_dirs as $dir ){
|
foreach( $watched_dirs as $dir ){
|
||||||
$dirPath = $dir->getDirectory();
|
$dirPath = $dir->getDirectory();
|
||||||
|
|
||||||
$ad .= '/';
|
|
||||||
|
|
||||||
// if mount path itself was watched
|
// if mount path itself was watched
|
||||||
if($dirPath == $ad){
|
if($dirPath == $ad){
|
||||||
Application_Model_MusicDir::addWatchedDir($dirPath, false);
|
Application_Model_MusicDir::addWatchedDir($dirPath, false);
|
||||||
|
@ -901,9 +900,9 @@ class ApiController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach( $removed_list as $rd){
|
foreach( $removed_list as $rd){
|
||||||
|
$rd .= '/';
|
||||||
foreach( $watched_dirs as $dir ){
|
foreach( $watched_dirs as $dir ){
|
||||||
$dirPath = $dir->getDirectory();
|
$dirPath = $dir->getDirectory();
|
||||||
$rd .= '/';
|
|
||||||
// if dir contains any dir in removed_list( if watched dir resides on new mounted path )
|
// if dir contains any dir in removed_list( if watched dir resides on new mounted path )
|
||||||
if(substr($dirPath, 0, strlen($rd)) === $rd && $dir->getExistsFlag() == true){
|
if(substr($dirPath, 0, strlen($rd)) === $rd && $dir->getExistsFlag() == true){
|
||||||
Application_Model_MusicDir::removeWatchedDir($dirPath, false);
|
Application_Model_MusicDir::removeWatchedDir($dirPath, false);
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
<?php if (count($watched_dirs) > 0): ?>
|
<?php if (count($watched_dirs) > 0): ?>
|
||||||
<?php foreach($watched_dirs as $watched_dir): ?>
|
<?php foreach($watched_dirs as $watched_dir): ?>
|
||||||
<dd class="block-display selected-item">
|
<dd class="block-display selected-item">
|
||||||
<span><?php echo ($watched_dir->getExistsFlag())?"":"<img src='/css/images/warning-icon.png'>"?></span><span><?php echo $watched_dir->getDirectory();?></span></span><span class="ui-icon ui-icon-close"></span>
|
<?php echo ($watched_dir->getExistsFlag())?"":"<span class='ui-icon-alert'><img src='/css/images/warning-icon.png'></span>"?><span><?php echo $watched_dir->getDirectory();?></span></span><span class="ui-icon ui-icon-close"></span>
|
||||||
</dd>
|
</dd>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
|
|
|
@ -764,7 +764,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
|
|
||||||
$pl.find(".ui-icon-alert").qtip({
|
$pl.find(".ui-icon-alert").qtip({
|
||||||
content: {
|
content: {
|
||||||
text: "File does not exist on disk..."
|
text: "Airtime is unsure about the status of this file. This can happen when the file is on a remote drive that is unaccessible or the file is in a directory that isn't \"watched\" anymore."
|
||||||
},
|
},
|
||||||
position:{
|
position:{
|
||||||
adjust: {
|
adjust: {
|
||||||
|
|
|
@ -98,5 +98,23 @@ function setWatchedDirEvents() {
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
setWatchedDirEvents();
|
setWatchedDirEvents();
|
||||||
|
$(".ui-icon-alert").qtip({
|
||||||
|
content: {
|
||||||
|
text: "This path is currently not accessible."
|
||||||
|
},
|
||||||
|
position:{
|
||||||
|
adjust: {
|
||||||
|
resize: true,
|
||||||
|
method: "flip flip"
|
||||||
|
},
|
||||||
|
at: "right center",
|
||||||
|
my: "left top",
|
||||||
|
viewport: $(window)
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
classes: "ui-tooltip-dark"
|
||||||
|
},
|
||||||
|
show: 'mouseover',
|
||||||
|
hide: 'mouseout'
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -442,7 +442,10 @@ class AirTimeApiClient(ApiClientInterface):
|
||||||
|
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
response = None
|
response = None
|
||||||
logger.error("Exception with file %s: %s", md, e)
|
import traceback
|
||||||
|
top = traceback.format_exc()
|
||||||
|
logger.error('Exception: %s', e)
|
||||||
|
logger.error("traceback: %s", top)
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue