Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
Yuchen Wang 2011-11-16 19:45:48 -05:00
commit d836425931
8 changed files with 30 additions and 10 deletions

View File

@ -35,7 +35,7 @@ class DashboardController extends Zend_Controller_Action
public function aboutAction()
{
// action body
$this->view->airtime_version = Application_Model_Preference::GetAirtimeVersion();
}
}

View File

@ -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);
}

View File

@ -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

View File

@ -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)) {

View File

@ -1,7 +1,7 @@
<div class="text-content">
<h2>About</h2>
<p>
<a href="http://airtime.sourcefabric.org">Airtime</a> <?php echo AIRTIME_VERSION ?>, the open radio software for scheduling and remote station management.<br>
<a href="http://airtime.sourcefabric.org">Airtime</a> <?php echo $this->airtime_version ?>, the open radio software for scheduling and remote station management.<br>
© 2011 <a href="http://www.sourcefabric.org">Sourcefabric</a> o.p.s 2011. Airtime is distributed under the <a href="http://www.gnu.org/licenses/gpl-3.0-standalone.html">GNU GPL v.3</a>
</p>
</div>

View File

@ -1,7 +1,7 @@
<?php
$s_name = "s".$this->stream_number;
?>
<h3 class="collapsible-header"><span class="arrow-icon"></span>Stream <?php echo $this->stream_number?></h3>
<h3 class="collapsible-header <?php echo $this->stream_number != '1'?"close":""?>"><span class="arrow-icon"></span>Stream <?php echo $this->stream_number?></h3>
<div class="stream-setting-content" <?php echo $this->stream_number != '1'?'style="display: none;':''?> id="<?=$s_name?>-config">
<fieldset class="padded">
<dl class="zend_form clearfix">

View File

@ -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);
}
}
});
}

View File

@ -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) {