This file contains hidden or 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 to make it easier to compare date ranges (where range is between start date and end date) | |
*/ | |
class DateRange { | |
public $StartDate = null; | |
public $EndDate = null; | |
/** |
This file contains hidden or 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 | |
/** | |
* Add 'no alignment' option when inserting images through 'Insert Media' form | |
*/ | |
class HtmlEditorField_ToolbarExtension extends Extension { | |
public function updateFieldsForImage(&$fields, $url, $file) { | |
$className = $fields->fieldByName('CSSClass'); | |
$classes = $className->getSource(); | |
$classes = array_merge(array('' => _t('HtmlEditorField.CSSCLASSNONE', 'No alignment.')), $classes); |
This file contains hidden or 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
jQuery(function($) { | |
$('form[data-async]').live('submit', function(event) { | |
var $form = $(this); | |
var $target = $($form.attr('data-target')); | |
$.ajax({ | |
type: $form.attr('method'), | |
url: $form.attr('action'), | |
data: $form.serialize(), |
This file contains hidden or 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 | |
/** | |
* An extension to SilverStripes inbuilt {@link Image} class to handle resizing | |
* large images on upload either through the backend interface or through upload | |
* forms. | |
* | |
* File is resized to a copy, then the original is deleted and the smaller image | |
* moved back. | |
* |
NewerOlder