Merge remote-tracking branch 'origin/3.1'

This commit is contained in:
Ingo Schommer 2013-08-03 19:47:32 +02:00
commit 542728cd94
11 changed files with 18 additions and 15 deletions

View File

@ -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).
$nodeThresholdLeaf = Config::inst()->get('Hierarchy', 'node_threshold_leaf');
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) {
return sprintf(
'<ul><li class="readonly"><span class="item">'

View File

@ -149,7 +149,7 @@ form.nostyle label.left { float: none; display: inherit; width: auto; padding: 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; }
.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:after { content: "\0020"; display: block; height: 0; clear: both; overflow: hidden; visibility: hidden; }
.field.nolabel .middleColumn { margin-left: 0; }

View File

@ -16,10 +16,7 @@ form.nostyle {
.field {
display: block;
border-bottom: 1px solid $color-light-separator;
@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/
@include doubleborder(bottom, $color-light-separator, $box-shadow-shine-minimal);
//overflow: hidden;
// bottom padding accounts for the border and we have a negative

View File

@ -38,6 +38,7 @@
* Support for PHP 5.4's built-in webserver
* 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))
* More secure forms by limiting HTTP submissions to GET or POST only (optional)
## Details

View File

@ -227,7 +227,7 @@ Can be re-written as:
:::ss
<% cached LastEdited %>
<% cached Children.max(LastEdited) %>
<% cached AllChildren.max(LastEdited) %>
<% loop $Children %>
$Name
<% end_loop %>

View File

@ -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
the templates
<% require css(cms/css/TreeSelector.css) %>
<% require themedCSS(TreeSelector) %>
<% require javascript(cms/javascript/LeftAndMain.js) %>
<% require css("cms/css/TreeSelector.css") %>
<% require themedCSS("TreeSelector") %>
<% require javascript("cms/javascript/LeftAndMain.js") %>
## Combining Files

View File

@ -15,7 +15,7 @@ Here is a very simple template:
<head>
<% base_tag %>
<title>$Title</title>
<% require themedCSS(screen) %>
<% require themedCSS("screen") %>
</head>
<body>
<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.
:::ss
<% require themedCSS(LeftNavMenu) %>
<% require themedCSS("LeftNavMenu") %>
### Including CSS and JavaScript files (a.k.a "Requirements")

View File

@ -28,7 +28,7 @@ In your controller (e.g. `mysite/code/Page.php`):
Or in your template (e.g. `themes/yourtheme/templates/Page.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
your template. On the other hand, you as a template developer can "block" or change certain CSS files that are included from

View File

@ -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)
* **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.
Note: If you're using a default install of Silverstripe and notice that you're getting layout.css, typography.css and

View File

@ -555,6 +555,7 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
this.find('.field[id$="AnchorSelector_Holder"]').show();
this.find('.field[id$="AnchorRefresh_Holder"]').show();
}
this.find('.field#Description').show();
},
/**
* @return Object Keys: 'href', 'target', 'title'

View File

@ -834,9 +834,13 @@ class SSViewer {
}
$found = $loader->findTemplates("$type/$identifier", $theme);
if ($found) {
if (isset($found['main'])) {
return $found['main'];
}
else if (!empty($found)) {
$founds = array_values($found);
return $founds[0];
}
}
/**