From 1b3d61913b36f384efde4feb3637e3c6bc940c0e Mon Sep 17 00:00:00 2001 From: james Date: Wed, 16 Nov 2011 16:31:27 -0500 Subject: [PATCH 1/4] CC-3052: Stream settings collapse when req. input is missing - fixed. It was only handling error in the "Additional Input" --- .../public/js/airtime/preferences/streamsetting.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/public/js/airtime/preferences/streamsetting.js b/airtime_mvc/public/js/airtime/preferences/streamsetting.js index bf29514c2..277d1e34a 100644 --- a/airtime_mvc/public/js/airtime/preferences/streamsetting.js +++ b/airtime_mvc/public/js/airtime/preferences/streamsetting.js @@ -2,9 +2,12 @@ function showErrorSections() { $(".errors").each(function(i){ if($(this).length > 0){ - $(window).scrollTop($(this).closest("div").position().top); - $(this).closest("fieldset").removeClass('closed'); - return false; + var div = $(this).closest("div") + if(div.attr('class') == "stream-setting-content"){ + $(this).closest("div").show(); + $(this).closest("fieldset").removeClass('closed'); + $(window).scrollTop($(this).closest("div").position().top); + } } }); } From 1f9b2559ab780b0541c9563096db3f21c5dabf39 Mon Sep 17 00:00:00 2001 From: james Date: Wed, 16 Nov 2011 16:46:54 -0500 Subject: [PATCH 2/4] CC-3032: Airtime -> Help -> About. shows variable name instead of value - fixed --- airtime_mvc/application/controllers/DashboardController.php | 2 +- airtime_mvc/application/views/scripts/dashboard/about.phtml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/controllers/DashboardController.php b/airtime_mvc/application/controllers/DashboardController.php index 8b918137d..afdb26f33 100644 --- a/airtime_mvc/application/controllers/DashboardController.php +++ b/airtime_mvc/application/controllers/DashboardController.php @@ -35,7 +35,7 @@ class DashboardController extends Zend_Controller_Action public function aboutAction() { - // action body + $this->view->airtime_version = Application_Model_Preference::GetAirtimeVersion(); } } diff --git a/airtime_mvc/application/views/scripts/dashboard/about.phtml b/airtime_mvc/application/views/scripts/dashboard/about.phtml index 6a551c1e4..bdedfcfd2 100644 --- a/airtime_mvc/application/views/scripts/dashboard/about.phtml +++ b/airtime_mvc/application/views/scripts/dashboard/about.phtml @@ -1,7 +1,7 @@

About

-Airtime , the open radio software for scheduling and remote station management.
+Airtime airtime_version ?>, the open radio software for scheduling and remote station management.
© 2011 Sourcefabric o.p.s 2011. Airtime is distributed under the GNU GPL v.3

From 590a74b8ce072f6bac98ab1292065ad8ff21a2d8 Mon Sep 17 00:00:00 2001 From: james Date: Wed, 16 Nov 2011 17:57:07 -0500 Subject: [PATCH 3/4] CC-3053: Stream settings -> the collapse/expend arrow is pointing the wrong way - fixed --- .../application/views/scripts/form/stream-setting-form.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airtime_mvc/application/views/scripts/form/stream-setting-form.phtml b/airtime_mvc/application/views/scripts/form/stream-setting-form.phtml index 5417b35a6..020be44a9 100644 --- a/airtime_mvc/application/views/scripts/form/stream-setting-form.phtml +++ b/airtime_mvc/application/views/scripts/form/stream-setting-form.phtml @@ -1,7 +1,7 @@ stream_number; ?> -

Stream stream_number?>

+

">Stream stream_number?>

stream_number != '1'?'style="display: none;':''?> id="-config">
From ad708d9983cc583639b861f24ff39bf4837d854b Mon Sep 17 00:00:00 2001 From: james Date: Wed, 16 Nov 2011 18:14:10 -0500 Subject: [PATCH 4/4] CC-2156: Searching for a host and hitting ENTER submits the show form - done. Had to port the code manually --- .../controllers/UserController.php | 1 + airtime_mvc/application/forms/AddShowWho.php | 2 +- airtime_mvc/application/models/User.php | 2 +- .../public/js/airtime/schedule/add-show.js | 20 +++++++++++++++++-- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/airtime_mvc/application/controllers/UserController.php b/airtime_mvc/application/controllers/UserController.php index b84a0dede..37404931c 100644 --- a/airtime_mvc/application/controllers/UserController.php +++ b/airtime_mvc/application/controllers/UserController.php @@ -63,6 +63,7 @@ class UserController extends Zend_Controller_Action public function getHostsAction() { $search = $this->_getParam('term'); + $res = Application_Model_User::getHosts($search); $this->view->hosts = Application_Model_User::getHosts($search); } diff --git a/airtime_mvc/application/forms/AddShowWho.php b/airtime_mvc/application/forms/AddShowWho.php index 360a5abea..22dd109eb 100644 --- a/airtime_mvc/application/forms/AddShowWho.php +++ b/airtime_mvc/application/forms/AddShowWho.php @@ -16,7 +16,7 @@ class Application_Form_AddShowWho extends Zend_Form_SubForm $hosts = Application_Model_User::getHosts(); foreach ($hosts as $host) { - $options[$host['value']] = $host['label']; + $options[$host['index']] = $host['label']; } //Add hosts selection diff --git a/airtime_mvc/application/models/User.php b/airtime_mvc/application/models/User.php index 6f0ec13c7..81548f013 100644 --- a/airtime_mvc/application/models/User.php +++ b/airtime_mvc/application/models/User.php @@ -163,7 +163,7 @@ class Application_Model_User { $sql; - $sql_gen = "SELECT id AS value, login AS label FROM cc_subjs "; + $sql_gen = "SELECT login AS value, login AS label, id as index FROM cc_subjs "; $sql = $sql_gen; if(is_array($type)) { diff --git a/airtime_mvc/public/js/airtime/schedule/add-show.js b/airtime_mvc/public/js/airtime/schedule/add-show.js index 09e6a997e..0a7da3f8d 100644 --- a/airtime_mvc/public/js/airtime/schedule/add-show.js +++ b/airtime_mvc/public/js/airtime/schedule/add-show.js @@ -40,7 +40,7 @@ function createDateInput(el, onSelect) { function autoSelect(event, ui) { - $("#add_show_hosts-"+ui.item.value).attr("checked", "checked"); + $("#add_show_hosts-"+ui.item.index).attr("checked", "checked"); event.preventDefault(); } @@ -50,11 +50,21 @@ function findHosts(request, callback) { url = "/User/get-hosts"; search = request.term; + var noResult = new Array(); + noResult[0] = new Array(); + noResult[0]['value'] = $("#add_show_hosts_autocomplete").val(); + noResult[0]['label'] = "No result found"; + noResult[0]['index'] = null; + $.post(url, {format: "json", term: search}, function(json) { - callback(json.hosts); + if(json.hosts.length<1){ + callback(noResult); + }else{ + callback(json.hosts); + } }); } @@ -232,6 +242,12 @@ function setAddShowEvents() { select: autoSelect, delay: 200 }); + + form.find("#add_show_hosts_autocomplete").keypress(function(e){ + if( e.which == 13 ){ + return false; + } + }) form.find("#schedule-show-style input").ColorPicker({ onChange: function (hsb, hex, rgb, el) {