CC-84: Smart Playlists
- subforms now open and close on the click event - fixed add and remove criteria to work with new subforms
This commit is contained in:
parent
952a584f10
commit
64185dac95
7 changed files with 73 additions and 37 deletions
|
@ -2,6 +2,7 @@
|
|||
class Application_Form_SmartPlaylistCriteriaSubForm extends Zend_Form_SubForm
|
||||
{
|
||||
private $setNumber;
|
||||
private $openSubset;
|
||||
|
||||
public function init(){
|
||||
|
||||
|
@ -131,15 +132,20 @@ class Application_Form_SmartPlaylistCriteriaSubForm extends Zend_Form_SubForm
|
|||
$extra = $crit->getDbExtra();
|
||||
|
||||
if($criteria == "limit"){
|
||||
$storedCrit["limit"] = array("value"=>$value, "modifier"=>$modifier);
|
||||
$storedCrit[]["limit"] = array("value"=>$value, "modifier"=>$modifier);
|
||||
}else{
|
||||
$storedCrit["crit"][] = array("criteria"=>$criteria, "value"=>$value, "modifier"=>$modifier, "extra"=>$extra);
|
||||
$storedCrit[]["crit"][] = array("criteria"=>$criteria, "value"=>$value, "modifier"=>$modifier, "extra"=>$extra);
|
||||
}
|
||||
}
|
||||
|
||||
$openSmartPlaylistOption = false;
|
||||
if (!empty($storedCrit)) {
|
||||
$openSmartPlaylistOption = true;
|
||||
$this->openSubset = $openSmartPlaylistOption;
|
||||
}
|
||||
|
||||
if(!empty($subsetOpen)){
|
||||
$openSmartPlaylistOption = true;
|
||||
}
|
||||
|
||||
$numElements = count($criteriaOptions);
|
||||
|
@ -232,4 +238,9 @@ class Application_Form_SmartPlaylistCriteriaSubForm extends Zend_Form_SubForm
|
|||
'criteriasLength' => count($criteriaOptions), 'poolCount' => $files['count'], 'setNumber' => $this->setNumber))
|
||||
));
|
||||
}
|
||||
|
||||
public function getIsOpen()
|
||||
{
|
||||
return $this->openSubset;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue