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:
James 2012-04-11 17:24:26 -04:00
parent 1f5f5057bf
commit 0ec58f0bc3
5 changed files with 27 additions and 7 deletions

View File

@ -875,11 +875,10 @@ class ApiController extends Zend_Controller_Action
$watched_dirs = Application_Model_MusicDir::getWatchedDirs(null,null);
foreach( $added_list as $ad){
$ad .= '/';
foreach( $watched_dirs as $dir ){
$dirPath = $dir->getDirectory();
$ad .= '/';
// if mount path itself was watched
if($dirPath == $ad){
Application_Model_MusicDir::addWatchedDir($dirPath, false);
@ -901,9 +900,9 @@ class ApiController extends Zend_Controller_Action
}
}
foreach( $removed_list as $rd){
$rd .= '/';
foreach( $watched_dirs as $dir ){
$dirPath = $dir->getDirectory();
$rd .= '/';
// 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){
Application_Model_MusicDir::removeWatchedDir($dirPath, false);

View File

@ -38,7 +38,7 @@
<?php if (count($watched_dirs) > 0): ?>
<?php foreach($watched_dirs as $watched_dir): ?>
<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>
<?php endforeach; ?>
<?php else: ?>

View File

@ -764,7 +764,7 @@ var AIRTIME = (function(AIRTIME){
$pl.find(".ui-icon-alert").qtip({
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:{
adjust: {

View File

@ -98,5 +98,23 @@ function setWatchedDirEvents() {
$(document).ready(function() {
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'
});
});

View File

@ -442,7 +442,10 @@ class AirTimeApiClient(ApiClientInterface):
except Exception, e:
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