mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Merge remote-tracking branch 'origin/master' into translation-staging
This commit is contained in:
commit
488845879a
@ -146,7 +146,8 @@ JS
|
||||
new GridFieldPaginator(15),
|
||||
new GridFieldEditButton(),
|
||||
new GridFieldDeleteAction(),
|
||||
new GridFieldDetailForm()
|
||||
new GridFieldDetailForm(),
|
||||
GridFieldLevelup::create($folder->ID)->setLinkSpec('admin/assets/show/%d')
|
||||
);
|
||||
|
||||
$gridField = new GridField('File', $title, $this->getList(), $gridFieldConfig);
|
||||
|
@ -676,7 +676,9 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
);
|
||||
if($parentID){
|
||||
$gridFieldConfig->addComponent(
|
||||
new GridFieldLevelup($parentID)
|
||||
GridFieldLevelup::create($parentID)
|
||||
->setLinkSpec('?ParentID=%d&view=list')
|
||||
->setAttributes(array('data-pjax' => 'ListViewForm,Breadcrumbs'))
|
||||
);
|
||||
}
|
||||
$gridField = new GridField('Page','Pages', $list, $gridFieldConfig);
|
||||
@ -695,8 +697,8 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
|
||||
$columns->setDisplayFields($fields);
|
||||
$columns->setFieldCasting(array(
|
||||
'Created' => 'Date->Ago',
|
||||
'LastEdited' => 'Date->Ago',
|
||||
'Created' => 'Datetime->Ago',
|
||||
'LastEdited' => 'Datetime->Ago',
|
||||
));
|
||||
|
||||
$controller = $this;
|
||||
|
@ -122,7 +122,9 @@ class CMSPageAddController extends CMSPageEditController {
|
||||
}
|
||||
|
||||
$record = $this->getNewItem("new-$className-$parentID".$suffix, false);
|
||||
if(class_exists('Translatable') && $record->hasExtension('Translatable')) $record->Locale = $data['Locale'];
|
||||
if(class_exists('Translatable') && $record->hasExtension('Translatable') && isset($data['Locale'])) {
|
||||
$record->Locale = $data['Locale'];
|
||||
}
|
||||
|
||||
try {
|
||||
$record->write();
|
||||
|
@ -25,8 +25,6 @@ class RedirectorPage extends Page {
|
||||
static $many_many = array(
|
||||
);
|
||||
|
||||
static $allowed_children = array();
|
||||
|
||||
/**
|
||||
* Returns this page if the redirect is external, otherwise
|
||||
* returns the target page.
|
||||
|
@ -2704,8 +2704,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
if(isset($entities['Page.SINGULARNAME'])) $entities['Page.SINGULARNAME'][3] = FRAMEWORK_DIR;
|
||||
if(isset($entities['Page.PLURALNAME'])) $entities['Page.PLURALNAME'][3] = FRAMEWORK_DIR;
|
||||
|
||||
$types = self::page_type_classes();
|
||||
foreach($types as $type) {
|
||||
$types = ClassInfo::subclassesFor('SiteTree');
|
||||
foreach($types as $k => $type) {
|
||||
$inst = singleton($type);
|
||||
$entities[$type . '.DESCRIPTION'] = array(
|
||||
$inst->stat('description'),
|
||||
|
@ -191,10 +191,11 @@ class FilesystemPublisher extends StaticPublisher {
|
||||
|
||||
Requirements::clear();
|
||||
|
||||
|
||||
|
||||
singleton('DataObject')->flushCache();
|
||||
|
||||
//skip any responses with a 404 status code. We don't want to turn those into statically cached pages
|
||||
if (!$response || $response->getStatusCode() == '404') continue;
|
||||
|
||||
// Generate file content
|
||||
// PHP file caching will generate a simple script from a template
|
||||
if($this->fileExtension == 'php') {
|
||||
|
@ -127,13 +127,13 @@
|
||||
* (Function) callback
|
||||
*/
|
||||
suggest: function(val, callback) {
|
||||
var field = this.find(':text');
|
||||
var field = this.find(':text'), urlParts = $.path.parseUrl(this.closest('form').attr('action')),
|
||||
url = urlParts.hrefNoSearch + '/field/' + field.attr('name') + '/suggest/?value=' + encodeURIComponent(val);
|
||||
if(urlParts.search) url += '&' + urlParts.search.replace(/^\?/, '');
|
||||
|
||||
$.get(
|
||||
this.closest('form').attr('action') +
|
||||
'/field/' + field.attr('name') + '/suggest/?value=' + encodeURIComponent(val),
|
||||
function(data) {
|
||||
callback.apply(this, arguments);
|
||||
}
|
||||
url,
|
||||
function(data) {callback.apply(this, arguments);}
|
||||
);
|
||||
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user