mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge remote-tracking branch 'origin/3.1'
This commit is contained in:
commit
542728cd94
@ -830,7 +830,7 @@ class LeftAndMain extends Controller implements PermissionProvider {
|
|||||||
// match the filter criteria until they're queried (and matched up with previously marked nodes).
|
// match the filter criteria until they're queried (and matched up with previously marked nodes).
|
||||||
$nodeThresholdLeaf = Config::inst()->get('Hierarchy', 'node_threshold_leaf');
|
$nodeThresholdLeaf = Config::inst()->get('Hierarchy', 'node_threshold_leaf');
|
||||||
if($nodeThresholdLeaf && !$filterFunction) {
|
if($nodeThresholdLeaf && !$filterFunction) {
|
||||||
$nodeCountCallback = function($parent, $numChildren) use($controller, $className, $nodeThresholdLeaf) {
|
$nodeCountCallback = function($parent, $numChildren) use(&$controller, $className, $nodeThresholdLeaf) {
|
||||||
if($className == 'SiteTree' && $parent->ID && $numChildren > $nodeThresholdLeaf) {
|
if($className == 'SiteTree' && $parent->ID && $numChildren > $nodeThresholdLeaf) {
|
||||||
return sprintf(
|
return sprintf(
|
||||||
'<ul><li class="readonly"><span class="item">'
|
'<ul><li class="readonly"><span class="item">'
|
||||||
|
@ -149,7 +149,7 @@ form.nostyle label.left { float: none; display: inherit; width: auto; padding: 0
|
|||||||
form.nostyle .middleColumn { margin-left: 0; }
|
form.nostyle .middleColumn { margin-left: 0; }
|
||||||
form.nostyle input.text, form.nostyle textarea, form.nostyle select, form.nostyle .TreeDropdownField { width: auto; max-width: auto; }
|
form.nostyle input.text, form.nostyle textarea, form.nostyle select, form.nostyle .TreeDropdownField { width: auto; max-width: auto; }
|
||||||
|
|
||||||
.field { display: block; border-bottom: 1px solid #d0d3d5; -webkit-box-shadow: 0 1px 0 rgba(245, 245, 245, 0.8); -moz-box-shadow: 0 1px 0 rgba(245, 245, 245, 0.8); box-shadow: 0 1px 0 rgba(245, 245, 245, 0.8); padding: 0 0 7px 0; margin: 8px 0; *zoom: 1; }
|
.field { display: block; border-bottom: 1px solid #d0d3d5; -webkit-box-shadow: 0 1px 0 rgba(245, 245, 245, 0.8); -moz-box-shadow: 0 1px 0 rgba(245, 245, 245, 0.8); -o-box-shadow: 0 1px 0 rgba(245, 245, 245, 0.8); box-shadow: 0 1px 0 rgba(245, 245, 245, 0.8); padding: 0 0 7px 0; margin: 8px 0; *zoom: 1; }
|
||||||
.field.noborder, .field:last-child { padding-bottom: 0; border-bottom: none; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; }
|
.field.noborder, .field:last-child { padding-bottom: 0; border-bottom: none; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; }
|
||||||
.field:after { content: "\0020"; display: block; height: 0; clear: both; overflow: hidden; visibility: hidden; }
|
.field:after { content: "\0020"; display: block; height: 0; clear: both; overflow: hidden; visibility: hidden; }
|
||||||
.field.nolabel .middleColumn { margin-left: 0; }
|
.field.nolabel .middleColumn { margin-left: 0; }
|
||||||
|
@ -16,10 +16,7 @@ form.nostyle {
|
|||||||
|
|
||||||
.field {
|
.field {
|
||||||
display: block;
|
display: block;
|
||||||
border-bottom: 1px solid $color-light-separator;
|
@include doubleborder(bottom, $color-light-separator, $box-shadow-shine-minimal);
|
||||||
@include box-shadow(0 1px 0 $box-shadow-shine-minimal);
|
|
||||||
|
|
||||||
//TODO: use single border line with shadow instead:: http://daverupert.com/2011/06/two-tone-borders-with-css3/
|
|
||||||
//overflow: hidden;
|
//overflow: hidden;
|
||||||
|
|
||||||
// bottom padding accounts for the border and we have a negative
|
// bottom padding accounts for the border and we have a negative
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
* Support for PHP 5.4's built-in webserver
|
* Support for PHP 5.4's built-in webserver
|
||||||
* Support for [Composer](http://getcomposer.org) dependency manager (also works with 3.0)
|
* Support for [Composer](http://getcomposer.org) dependency manager (also works with 3.0)
|
||||||
* Added support for filtering incoming HTML from TinyMCE (disabled by default, see [security](/topics/security))
|
* Added support for filtering incoming HTML from TinyMCE (disabled by default, see [security](/topics/security))
|
||||||
|
* More secure forms by limiting HTTP submissions to GET or POST only (optional)
|
||||||
|
|
||||||
## Details
|
## Details
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ Can be re-written as:
|
|||||||
:::ss
|
:::ss
|
||||||
<% cached LastEdited %>
|
<% cached LastEdited %>
|
||||||
|
|
||||||
<% cached Children.max(LastEdited) %>
|
<% cached AllChildren.max(LastEdited) %>
|
||||||
<% loop $Children %>
|
<% loop $Children %>
|
||||||
$Name
|
$Name
|
||||||
<% end_loop %>
|
<% end_loop %>
|
||||||
|
@ -25,9 +25,9 @@ element, so you can define 'screen' or 'print' for example.
|
|||||||
If you do not want to touch the PHP (for example you are constructing a generic theme) then you can include a file via
|
If you do not want to touch the PHP (for example you are constructing a generic theme) then you can include a file via
|
||||||
the templates
|
the templates
|
||||||
|
|
||||||
<% require css(cms/css/TreeSelector.css) %>
|
<% require css("cms/css/TreeSelector.css") %>
|
||||||
<% require themedCSS(TreeSelector) %>
|
<% require themedCSS("TreeSelector") %>
|
||||||
<% require javascript(cms/javascript/LeftAndMain.js) %>
|
<% require javascript("cms/javascript/LeftAndMain.js") %>
|
||||||
|
|
||||||
## Combining Files
|
## Combining Files
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ Here is a very simple template:
|
|||||||
<head>
|
<head>
|
||||||
<% base_tag %>
|
<% base_tag %>
|
||||||
<title>$Title</title>
|
<title>$Title</title>
|
||||||
<% require themedCSS(screen) %>
|
<% require themedCSS("screen") %>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
@ -122,7 +122,7 @@ You can also perform includes using the Requirements Class via the template cont
|
|||||||
[Includes in Templates](requirements#including_inside_template_files) for more details and examples.
|
[Includes in Templates](requirements#including_inside_template_files) for more details and examples.
|
||||||
|
|
||||||
:::ss
|
:::ss
|
||||||
<% require themedCSS(LeftNavMenu) %>
|
<% require themedCSS("LeftNavMenu") %>
|
||||||
|
|
||||||
### Including CSS and JavaScript files (a.k.a "Requirements")
|
### Including CSS and JavaScript files (a.k.a "Requirements")
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ In your controller (e.g. `mysite/code/Page.php`):
|
|||||||
Or in your template (e.g. `themes/yourtheme/templates/Page.ss`):
|
Or in your template (e.g. `themes/yourtheme/templates/Page.ss`):
|
||||||
|
|
||||||
:::ss
|
:::ss
|
||||||
<% require css(mymodule/css/my.css) %>
|
<% require css("mymodule/css/my.css") %>
|
||||||
|
|
||||||
Management through the `Requirements` class has the advantage that modules can include their own CSS files without modifying
|
Management through the `Requirements` class has the advantage that modules can include their own CSS files without modifying
|
||||||
your template. On the other hand, you as a template developer can "block" or change certain CSS files that are included from
|
your template. On the other hand, you as a template developer can "block" or change certain CSS files that are included from
|
||||||
|
@ -123,7 +123,7 @@ By standard SilverStripe uses 3 CSS Files for your site -
|
|||||||
* **typography.css** contains the styling for the text/fonts/links (used in both front and back ends)
|
* **typography.css** contains the styling for the text/fonts/links (used in both front and back ends)
|
||||||
* **form.css** styling for forms.
|
* **form.css** styling for forms.
|
||||||
|
|
||||||
You can add more stylesheets using the template tag `<% require themedCSS(filename) %>`, which will load filename.css from
|
You can add more stylesheets using the template tag `<% require themedCSS("filename") %>`, which will load filename.css from
|
||||||
your css directory.
|
your css directory.
|
||||||
|
|
||||||
Note: If you're using a default install of Silverstripe and notice that you're getting layout.css, typography.css and
|
Note: If you're using a default install of Silverstripe and notice that you're getting layout.css, typography.css and
|
||||||
|
@ -555,6 +555,7 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
|
|||||||
this.find('.field[id$="AnchorSelector_Holder"]').show();
|
this.find('.field[id$="AnchorSelector_Holder"]').show();
|
||||||
this.find('.field[id$="AnchorRefresh_Holder"]').show();
|
this.find('.field[id$="AnchorRefresh_Holder"]').show();
|
||||||
}
|
}
|
||||||
|
this.find('.field#Description').show();
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @return Object Keys: 'href', 'target', 'title'
|
* @return Object Keys: 'href', 'target', 'title'
|
||||||
|
@ -834,9 +834,13 @@ class SSViewer {
|
|||||||
}
|
}
|
||||||
$found = $loader->findTemplates("$type/$identifier", $theme);
|
$found = $loader->findTemplates("$type/$identifier", $theme);
|
||||||
|
|
||||||
if ($found) {
|
if (isset($found['main'])) {
|
||||||
return $found['main'];
|
return $found['main'];
|
||||||
}
|
}
|
||||||
|
else if (!empty($found)) {
|
||||||
|
$founds = array_values($found);
|
||||||
|
return $founds[0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user