From e0a674a96cd277b53f9f9572da60fa1b6510d500 Mon Sep 17 00:00:00 2001 From: denise Date: Mon, 16 Jul 2012 18:24:46 -0400 Subject: [PATCH] CC-84: Smart Playlists -added save button for static playlists --- .../forms/SmartPlaylistCriteria.php | 10 +++- .../form/smart-playlist-criteria.phtml | 10 ++-- .../views/scripts/playlist/playlist.phtml | 4 +- airtime_mvc/public/css/styles.css | 8 +++- .../airtime/playlist/smart_playlistbuilder.js | 46 +++++++++---------- python_apps/pypo/liquidsoap_bin | 2 +- 6 files changed, 44 insertions(+), 36 deletions(-) diff --git a/airtime_mvc/application/forms/SmartPlaylistCriteria.php b/airtime_mvc/application/forms/SmartPlaylistCriteria.php index 5a480fafa..99256bac2 100644 --- a/airtime_mvc/application/forms/SmartPlaylistCriteria.php +++ b/airtime_mvc/application/forms/SmartPlaylistCriteria.php @@ -205,8 +205,16 @@ class Application_Form_SmartPlaylistCriteria extends Zend_Form_SubForm $save = new Zend_Form_Element_Button('save_button'); $save->setAttrib('class', 'ui-button ui-state-default right-floated'); $save->setIgnore(true); - $save->setLabel('Generate'); + $save->setLabel('Save'); + $save->setDecorators(array('viewHelper')); $this->addElement($save); + + $generate = new Zend_Form_Element_Button('generate_button'); + $generate->setAttrib('class', 'ui-button ui-state-default right-floated'); + $generate->setIgnore(true); + $generate->setLabel('Generate'); + $generate->setDecorators(array('viewHelper')); + $this->addElement($generate); } diff --git a/airtime_mvc/application/views/scripts/form/smart-playlist-criteria.phtml b/airtime_mvc/application/views/scripts/form/smart-playlist-criteria.phtml index 6b0302765..f5fd85a58 100644 --- a/airtime_mvc/application/views/scripts/form/smart-playlist-criteria.phtml +++ b/airtime_mvc/application/views/scripts/form/smart-playlist-criteria.phtml @@ -27,7 +27,7 @@ element->getElement('sp_criteria_modifier_'.$i) ?> element->getElement('sp_criteria_value_'.$i) ?>element->getElement('sp_criteria_extra_'.$i)->getAttrib("disabled") == "disabled"?'style="display:none;"':""?>> to element->getElement('sp_criteria_extra_'.$i) ?> - + @@ -45,10 +45,10 @@ element->getElement('sp_limit_options') ?> - -
- element->getElement('save_button') ?> -
+
+ element->getElement('save_button') ?> + element->getElement('generate_button') ?> +
diff --git a/airtime_mvc/application/views/scripts/playlist/playlist.phtml b/airtime_mvc/application/views/scripts/playlist/playlist.phtml index 5f958318c..ef78a1caa 100644 --- a/airtime_mvc/application/views/scripts/playlist/playlist.phtml +++ b/airtime_mvc/application/views/scripts/playlist/playlist.phtml @@ -31,9 +31,7 @@ - form; ?> + form; ?>