SAAS-841: Default station logo to the Airtime logo
This commit is contained in:
parent
d6ec9e99b5
commit
305cb894c3
3 changed files with 21 additions and 4 deletions
|
@ -602,7 +602,14 @@ class Application_Model_Preference
|
|||
|
||||
public static function GetStationLogo()
|
||||
{
|
||||
return self::getValue("logoImage");
|
||||
$logoImage = self::getValue("logoImage");
|
||||
if (!empty($logoImage)) {
|
||||
return $logoImage;
|
||||
} else {
|
||||
// We return the Airtime logo if no logo is set in the database.
|
||||
// airtime_logo.png is stored under the public directory
|
||||
return "airtime_logo.png";
|
||||
}
|
||||
}
|
||||
|
||||
public static function SetUniqueId($id)
|
||||
|
|
|
@ -12,7 +12,15 @@
|
|||
<!-- <button id="logo-remove-btn" value="Remove" class="btn">Remove</button>-->
|
||||
|
||||
<div id="Logo-img-container">
|
||||
<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 ?>" />
|
||||
<?php
|
||||
$logoImg = $this->element->getView()->logoImg;
|
||||
if ($logoImg === "airtime_logo.png") {
|
||||
$src = "airtime_logo.png";
|
||||
} else {
|
||||
$src = "data:image/png;base64,".$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="<?php echo $src ?>" />
|
||||
</div>
|
||||
|
||||
<?php echo $this->element->getElement('locale')->render() ?>
|
||||
|
|
|
@ -3,8 +3,10 @@
|
|||
|
||||
<div class="bck_cover"></div>
|
||||
|
||||
<?php if (!empty($this->stationLogo)) {
|
||||
echo "<a href = '#' class='logo' ><img src = 'data:image/png;base64," . $this->stationLogo. "'></a>";
|
||||
<?php if ($this->stationLogo === "airtime_logo.png") {
|
||||
echo "<a href='#' class='logo'><img src='airtime_logo.png'></a>";
|
||||
} else {
|
||||
echo "<a href='#' class='logo' ><img src='data:image/png;base64," . $this->stationLogo . "'></a>";
|
||||
} ?>
|
||||
|
||||
<div id="tab-1" class="schedule tab_content current">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue