CC-4229: Smart Playlist: refactor code

- done
This commit is contained in:
James 2012-08-15 11:36:41 -04:00
parent 92568db01f
commit 9fc5411895
9 changed files with 234 additions and 199 deletions

View file

@ -31,14 +31,21 @@
<?php echo $this->element->getElement("sp_criteria_field_".$i."_".$j) ?>
<a class='ui-button sp-ui-button-icon-only sp_no_margins' id='modifier_add_<?php echo $i ?>'>
<span class='ui-icon ui-icon-plusthick'></span>
</a>
</a>
<?php echo $this->element->getElement("sp_criteria_modifier_".$i."_".$j) ?>
<?php echo $this->element->getElement("sp_criteria_value_".$i."_".$j) ?>
<span class='sp_text_font' id="extra_criteria" <?php echo $this->element->getElement("sp_criteria_extra_".$i."_".$j)->getAttrib("disabled") == "disabled"?'style="display:none;"':""?>> to <?php echo $this->element->getElement('sp_criteria_extra_'.$i."_".$j) ?></span>
<span class='sp_text_font' id="extra_criteria" <?php echo $this->element->getElement("sp_criteria_extra_".$i."_".$j)->getAttrib("disabled") == "disabled"?'style="display:none;"':""?>> to <?php echo $this->element->getElement('sp_criteria_extra_'.$i."_".$j) ?></span>
<a class='ui-button sp-ui-button-icon-only' id='criteria_remove_<?php echo $i ?>'>
<span class='ui-icon ui-icon-closethick'></span>
</a>
<br />
<?php if($this->element->getElement("sp_criteria_field_".$i."_".$j)->hasErrors()) : ?>
<?php foreach($this->element->getElement("sp_criteria_field_".$i."_".$j)->getMessages() as $error): ?>
<span class='errors sp-errors'>
<?php echo $error; ?>
</span>
<?php endforeach; ?>
<?php endif; ?>
</div>
<?php } ?>
@ -61,20 +68,20 @@
files meet the criteria
</span>
<span class='checked-icon sp-checked-icon' id='sp_pool_count_icon'></span>
<?php
<?php
} else if ($this->poolCount == 1) {
echo $this->poolCount;
?>
file meets the criteria
</span>
<span class='checked-icon sp-checked-icon' id='sp_pool_count_icon'></span>
<?php
<?php
} else {
?>
?>
0 files meet the criteria
</span>
<span class='sp-warning-icon' id='sp_pool_count_icon'></span>
<?php
<?php
}
?>
</div>

View file

@ -27,7 +27,7 @@
<span>Name:</span><span><?php echo ($this->md["dc:title"]);?></span><br />
<span>Creator:</span><span><?php echo ($this->md["dc:creator"]);?></span><br />
<?php if ($this->type == "block" && $this->blType == "Dynamic") { ?>
<span>Length:</span><span><?php echo $this->block->getFormattedLength();?></span><br />
<span>Length:</span><span><?php echo $this->block->getLength();?></span><br />
<?php } else { ?>
<span>Length:</span><span><?php echo ($this->md["dcterms:extent"]);?></span><br />
<?php } ?>
@ -67,7 +67,7 @@
<tr class='file-md-qtip-playlist <?php if ($isStatic) echo 'static'; else echo 'dynamic';?>'>
<td class='file-md-qtip-row-width-title file-md-qtip-nowrap'><?php echo $row["track_title"] ?></td>
<td class='file-md-qtip-row-width-artist file-md-qtip-nowrap'><?php echo $row["creator"] ?></td>
<td class='file-md-qtip-row-width-small'><?php echo $bl->getFormattedLength(); ?></td>
<td class='file-md-qtip-row-width-small'><?php echo $bl->getLength(); ?></td>
</tr>
<?php } else if ($row["type"] == 1) {?>
<tr class='file-md-qtip-playlist webstream'>