Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
874220ce30
|
@ -10,20 +10,23 @@ class LoginController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
if(Zend_Auth::getInstance()->hasIdentity())
|
if(Zend_Auth::getInstance()->hasIdentity())
|
||||||
{
|
{
|
||||||
$this->_redirect('Nowplaying');
|
$this->_redirect('Nowplaying');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//uses separate layout without a navigation.
|
||||||
|
$this->_helper->layout->setLayout('login');
|
||||||
|
|
||||||
|
$request = $this->getRequest();
|
||||||
|
$baseUrl = $request->getBaseUrl();
|
||||||
|
|
||||||
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/login/login.js','text/javascript');
|
||||||
|
|
||||||
//uses separate layout without a navigation.
|
|
||||||
$this->_helper->layout->setLayout('login');
|
|
||||||
|
|
||||||
$request = $this->getRequest();
|
|
||||||
|
|
||||||
$form = new Application_Form_Login();
|
$form = new Application_Form_Login();
|
||||||
|
|
||||||
|
$message = "Please enter your user name and password";
|
||||||
|
|
||||||
$message = "Please enter your user name and password";
|
|
||||||
|
|
||||||
if($request->isPost())
|
if($request->isPost())
|
||||||
{
|
{
|
||||||
// if the post contains recaptcha field, which means form had recaptcha field.
|
// if the post contains recaptcha field, which means form had recaptcha field.
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
$(document).ready(function(){
|
||||||
|
$("#username").focus()
|
||||||
|
})
|
|
@ -50,6 +50,16 @@ function hideForShoutcast(ele){
|
||||||
restrictOggBitrate(ele, false)
|
restrictOggBitrate(ele, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function validate(ele,evt) {
|
||||||
|
var theEvent = evt || window.event;
|
||||||
|
var key = theEvent.keyCode || theEvent.which;
|
||||||
|
if ((ele.val().length >= 5 || (key < 48 || key > 57)) && !(key == 8 || key == 9 || key == 13 || key == 37 || key == 39 || key == 46)) {
|
||||||
|
theEvent.returnValue = false;
|
||||||
|
if(theEvent.preventDefault) theEvent.preventDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function showForIcecast(ele){
|
function showForIcecast(ele){
|
||||||
var div = ele.closest("div")
|
var div = ele.closest("div")
|
||||||
div.find("#outputMountpoint-label").show()
|
div.find("#outputMountpoint-label").show()
|
||||||
|
@ -69,6 +79,10 @@ $(document).ready(function() {
|
||||||
rebuildStreamURL($(this))
|
rebuildStreamURL($(this))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
$("input:[id$=-port]").keypress(function(e){
|
||||||
|
validate($(this),e)
|
||||||
|
})
|
||||||
|
|
||||||
$("select:[id$=-output]").change(function(){
|
$("select:[id$=-output]").change(function(){
|
||||||
rebuildStreamURL($(this))
|
rebuildStreamURL($(this))
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue