This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<!-- Run in full-screen mode. --> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<!-- Make the status bar black with white text. --> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%-- Page.ss --%> | |
<div class="language-chooser"> | |
<% include LanguageChooser %> | |
</div> | |
<div id="language-switch"> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.language-chooser { | |
// .box-shadow(-2px 2px 2px rgba(0,0,0,.1)); | |
position: absolute; | |
right: 30px; | |
top: 6px; | |
z-index: 99050; | |
// background: white; | |
font-size: 13px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(window).on('scroll', function() { | |
var header = $("header"); | |
var scrollBottom = $(document).height() - $(this).scrollTop() - $(this).height(); | |
if ($(this).scrollTop() > 350 && scrollBottom > 450 ) { | |
if (!header.data('faded')) header.data('faded', 1).stop(true).fadeTo(400, 0); | |
} else if (header.data('faded')) { | |
header.data('faded', 0).stop(true).fadeTo(400, 1); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function getNiceCreated() { | |
return $this->obj('Created')->FormatI18N('%d.%m.%Y'); | |
} | |
public function getNiceEventDate() { | |
$Event = $this->Invoice()->Event(); | |
return $Event->dbObject('EndDate')->FormatI18N('%d.%m.%Y'); | |
} | |
Or in Template! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class CurrencyEuro extends Currency { | |
protected static $currencySymbol = '€'; | |
public function Nice() { | |
$val = number_format(abs($this->value), 2, ',', '.') . ' ' . self::$currencySymbol; | |
if($this->value < 0) return "($val)"; | |
else return $val; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @return SS_HTTPRequest | |
*/ | |
public function assetbackup() { | |
$name = $this->Title . '.zip'; | |
$tmpName = TEMP_FOLDER . '/' . $name; | |
$zip = new ZipArchive(); | |
if(!$zip->open($tmpName, ZipArchive::OVERWRITE)) { | |
user_error('Client Export Extension: Unable to read/write temporary zip archive', E_USER_ERROR); | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function getCMSFields() { | |
$fields = parent::getCMSFields(); | |
$TabSet = $fields->findOrMakeTab('Root'); | |
$Main = $TabSet->fieldByName('Main'); | |
$TabSet->removeByName('Main'); | |
……………… | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isEmptyObject($o) { | |
if ( $o->toMap()['ID'] > 0) { | |
return false; | |
} else { | |
return true; | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$gridField->getConfig()->getComponentByType('GridFieldDataColumns')->setDisplayFields(array( | |
'Created' => 'Erstellt', | |
'Code' => 'Code', | |
'Value' => 'Wert', | |
'Origin' => 'Gutscheinart', | |
'Invoice.Buyer.FirstName' => 'Vorname', | |
'Invoice.Buyer.Surname' => 'Nachname', | |
'inUse' => 'Benutzt' | |
)); |
OlderNewer