Merge branch '2.5.x-albertenhancements' into saas
This commit is contained in:
commit
936d11b367
|
@ -49,6 +49,13 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
||||||
$stationLogoUpload->setAttrib('accept', 'image/*');
|
$stationLogoUpload->setAttrib('accept', 'image/*');
|
||||||
$this->addElement($stationLogoUpload);
|
$this->addElement($stationLogoUpload);
|
||||||
|
|
||||||
|
$stationLogoRemove = new Zend_Form_Element_Button('stationLogoRemove');
|
||||||
|
$stationLogoRemove->setLabel(_('Remove'));
|
||||||
|
$stationLogoRemove->setAttrib('class', 'btn');
|
||||||
|
$stationLogoRemove->setAttrib('id', 'logo-remove-btn');
|
||||||
|
$stationLogoRemove->setAttrib('onclick', 'removeLogo();');
|
||||||
|
$this->addElement($stationLogoRemove);
|
||||||
|
|
||||||
//Default station crossfade duration
|
//Default station crossfade duration
|
||||||
$this->addElement('text', 'stationDefaultCrossfadeDuration', array(
|
$this->addElement('text', 'stationDefaultCrossfadeDuration', array(
|
||||||
'class' => 'input_text',
|
'class' => 'input_text',
|
||||||
|
|
|
@ -7,10 +7,12 @@
|
||||||
|
|
||||||
<?php echo $this->element->getElement('stationLogo')->render() ?>
|
<?php echo $this->element->getElement('stationLogo')->render() ?>
|
||||||
|
|
||||||
<button id="logo-remove-btn" value="Remove" class="btn">Remove</button>
|
<?php echo $this->element->getElement('stationLogoRemove')->render() ?>
|
||||||
|
|
||||||
|
<!-- <button id="logo-remove-btn" value="Remove" class="btn">Remove</button>-->
|
||||||
|
|
||||||
<div id="Logo-img-container">
|
<div id="Logo-img-container">
|
||||||
<img onError="this.onerror = '';this.style.visibility='hidden';$('#logo-remove-btn').hide();" id="logo-img" onload='resizeImg(this, 450, 450);' src="data:image/png;base64,<?php echo $this->element->getView()->logoImg ?>" />
|
<img onError="this.onerror = '';this.style.visibility='hidden';$('#logo-remove-btn').hide();$('[id^=stationLogoRemove]').each(function(i,v){v.style.width=v.style.height=v.style.margin=v.style.padding='0px';});" id="logo-img" onload='resizeImg(this, 450, 450);' src="data:image/png;base64,<?php echo $this->element->getView()->logoImg ?>" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php echo $this->element->getElement('locale')->render() ?>
|
<?php echo $this->element->getElement('locale')->render() ?>
|
||||||
|
|
|
@ -2197,12 +2197,17 @@ dd.radio-inline-list, .preferences dd.radio-inline-list, .stream-config dd.radio
|
||||||
height: 120px;
|
height: 120px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.preferences #stationLogoRemove-label {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.preferences #logo-remove-btn {
|
.preferences #logo-remove-btn {
|
||||||
float: right;
|
float: right;
|
||||||
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.preferences #Logo-img-container {
|
.preferences #Logo-img-container {
|
||||||
float: left;
|
margin-top: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#show_time_info {
|
#show_time_info {
|
||||||
|
|
|
@ -115,6 +115,11 @@ function setSoundCloudCheckBoxListener() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function removeLogo() {
|
||||||
|
$.post(baseUrl+'Preference/remove-logo', function(json){});
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
$('.collapsible-header').live('click',function() {
|
$('.collapsible-header').live('click',function() {
|
||||||
|
@ -123,10 +128,6 @@ $(document).ready(function() {
|
||||||
return false;
|
return false;
|
||||||
}).next().hide();
|
}).next().hide();
|
||||||
|
|
||||||
$('#logo-remove-btn').click(function() {
|
|
||||||
$.post(baseUrl+'Preference/remove-logo', function(json){});
|
|
||||||
});
|
|
||||||
|
|
||||||
/* No longer using AJAX for this form. Zend + our code makes it needlessly hard to deal with. -- Albert
|
/* No longer using AJAX for this form. Zend + our code makes it needlessly hard to deal with. -- Albert
|
||||||
$('#pref_save').live('click', function() {
|
$('#pref_save').live('click', function() {
|
||||||
var data = $('#pref_form').serialize();
|
var data = $('#pref_form').serialize();
|
||||||
|
|
Loading…
Reference in New Issue