mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts: admin/javascript/LeftAndMain.js tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsUiContext.php tests/control/ControllerTest.php
This commit is contained in:
commit
2160fb8000
@ -5,10 +5,23 @@ jQuery.noConflict();
|
|||||||
*/
|
*/
|
||||||
(function($) {
|
(function($) {
|
||||||
|
|
||||||
window.onresize = function(e) {
|
var windowWidth, windowHeight;
|
||||||
|
$(window).bind('resize.leftandmain', function(e) {
|
||||||
// Entwine's 'fromWindow::onresize' does not trigger on IE8. Use synthetic event.
|
// Entwine's 'fromWindow::onresize' does not trigger on IE8. Use synthetic event.
|
||||||
$('.cms-container').trigger('windowresize');
|
var cb = function() {$('.cms-container').trigger('windowresize');};
|
||||||
};
|
|
||||||
|
// Workaround to avoid IE8 infinite loops when elements are resized as a result of this event
|
||||||
|
if($.browser.msie && parseInt($.browser.version, 10) < 9) {
|
||||||
|
var newWindowWidth = $(window).width(), newWindowHeight = $(window).height();
|
||||||
|
if(newWindowWidth != windowWidth || newWindowHeight != windowHeight) {
|
||||||
|
windowWidth = newWindowWidth;
|
||||||
|
windowHeight = newWindowHeight;
|
||||||
|
cb();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
cb();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// setup jquery.entwine
|
// setup jquery.entwine
|
||||||
$.entwine.warningLevel = $.entwine.WARN_LEVEL_BESTPRACTISE;
|
$.entwine.warningLevel = $.entwine.WARN_LEVEL_BESTPRACTISE;
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
* - SS_DATABASE_SUFFIX: A suffix to add to the database name.
|
* - SS_DATABASE_SUFFIX: A suffix to add to the database name.
|
||||||
* - SS_DATABASE_PREFIX: A prefix to add to the database name.
|
* - SS_DATABASE_PREFIX: A prefix to add to the database name.
|
||||||
* - SS_DATABASE_TIMEZONE: Set the database timezone to something other than the system timezone.
|
* - SS_DATABASE_TIMEZONE: Set the database timezone to something other than the system timezone.
|
||||||
|
* - SS_DATABASE_MEMORY: Use in-memory state if possible. Useful for testing, currently only
|
||||||
|
* supported by the SQLite database adapter.
|
||||||
*
|
*
|
||||||
* There is one more setting that is intended to be used by people who work on SilverStripe.
|
* There is one more setting that is intended to be used by people who work on SilverStripe.
|
||||||
* - SS_DATABASE_CHOOSE_NAME: Boolean/Int. If set, then the system will choose a default database name for you if
|
* - SS_DATABASE_CHOOSE_NAME: Boolean/Int. If set, then the system will choose a default database name for you if
|
||||||
@ -110,6 +112,10 @@ if(defined('SS_DATABASE_USERNAME') && defined('SS_DATABASE_PASSWORD')) {
|
|||||||
// For schema enabled drivers:
|
// For schema enabled drivers:
|
||||||
if(defined('SS_DATABASE_SCHEMA'))
|
if(defined('SS_DATABASE_SCHEMA'))
|
||||||
$databaseConfig["schema"] = SS_DATABASE_SCHEMA;
|
$databaseConfig["schema"] = SS_DATABASE_SCHEMA;
|
||||||
|
|
||||||
|
// For SQlite3 memory databases (mainly for testing purposes)
|
||||||
|
if(defined('SS_DATABASE_MEMORY'))
|
||||||
|
$databaseConfig["memory"] = SS_DATABASE_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(defined('SS_SEND_ALL_EMAILS_TO')) {
|
if(defined('SS_SEND_ALL_EMAILS_TO')) {
|
||||||
|
@ -173,7 +173,7 @@ the markup in the `else` clause is used, if that clause is present.
|
|||||||
:::ss
|
:::ss
|
||||||
<% if $MyDinner=="quiche" %>
|
<% if $MyDinner=="quiche" %>
|
||||||
Real men don't eat quiche
|
Real men don't eat quiche
|
||||||
<% else_if $MyDinner=$YourDinner %>
|
<% else_if $MyDinner==$YourDinner %>
|
||||||
We both have good taste
|
We both have good taste
|
||||||
<% else %>
|
<% else %>
|
||||||
Can I have some of your chips?
|
Can I have some of your chips?
|
||||||
|
@ -4,8 +4,22 @@
|
|||||||
* On resize of any close the open treedropdownfields
|
* On resize of any close the open treedropdownfields
|
||||||
* as we'll need to redo with widths
|
* as we'll need to redo with widths
|
||||||
*/
|
*/
|
||||||
$(window).resize(function() {
|
var windowWidth, windowHeight;
|
||||||
$('.TreeDropdownField').closePanel();
|
$(window).bind('resize.treedropdownfield', function() {
|
||||||
|
// Entwine's 'fromWindow::onresize' does not trigger on IE8. Use synthetic event.
|
||||||
|
var cb = function() {$('.TreeDropdownField').closePanel();};
|
||||||
|
|
||||||
|
// Workaround to avoid IE8 infinite loops when elements are resized as a result of this event
|
||||||
|
if($.browser.msie && parseInt($.browser.version, 10) < 9) {
|
||||||
|
var newWindowWidth = $(window).width(), newWindowHeight = $(window).height();
|
||||||
|
if(newWindowWidth != windowWidth || newWindowHeight != windowHeight) {
|
||||||
|
windowWidth = newWindowWidth;
|
||||||
|
windowHeight = newWindowHeight;
|
||||||
|
cb();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
cb();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var strings = {
|
var strings = {
|
||||||
|
@ -110,6 +110,12 @@ class ControllerTest extends FunctionalTest {
|
|||||||
'if action is not a method but rather a template discovered by naming convention'
|
'if action is not a method but rather a template discovered by naming convention'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$response = $this->get("ControllerTest_AccessSecuredController/templateaction");
|
||||||
|
$this->assertEquals(403, $response->getStatusCode(),
|
||||||
|
'Access denied on action with $allowed_actions on defining controller, ' .
|
||||||
|
'if action is not a method but rather a template discovered by naming convention'
|
||||||
|
);
|
||||||
|
|
||||||
$this->session()->inst_set('loggedInAs', $adminUser->ID);
|
$this->session()->inst_set('loggedInAs', $adminUser->ID);
|
||||||
$response = $this->get("ControllerTest_AccessSecuredController/templateaction");
|
$response = $this->get("ControllerTest_AccessSecuredController/templateaction");
|
||||||
$this->assertEquals(200, $response->getStatusCode(),
|
$this->assertEquals(200, $response->getStatusCode(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user