Implemented independently of URL state to ensure that
state is retained on every user interaction, rather than
having to add it to each URL specifically.
Same reasons for not saving it as HTML5 history metadata,
as that's only inspected on history events, not
normal CMS navigation.
When one or more fragments are requested that are not in
the current DOM, we need to force loading the outermost
fragment instead (currently hardcoded to "Content").
This mainly prevents history back navigation from breaking,
e.g. admin/pages -> admin/pages/list ->
admin/pages/list/?ParentID=99 -> admin/pages/edit/show/5 -> (back)
Was using text/json, which Form->httpSubmission() interprets
(correctly) to returning JSON validation data.
This trips up the interface, which expects HTML with
the validation errors directly in the markup.
After Hamish's suggestion. Entwine onchange would not get executed in
IE8 at all, which would have the effect of the displyed dropdown
selection not being set.
Change to onadd also mandates the changes to onadd on other parts of the
tree component - otherwise the change event can trigger before the
tree elements are added to the DOM.
Space delimiter is often confused by browsers, and encoded as %20 which
breaks the shortcode system. Change to comma delimitation has already
been implemented, this is a followup cleanup.
Ref http://open.silverstripe.org/ticket/7337
Functionality that affects the values in the form better fits in
updateFromEditor function, where we expect the form to be modified.
Redraw should only affect visibility parameters.
Also added a more robust reset code, so we can always expect to get at
least a clean form, and re-added missing "target" checkbox.
Returning a link type "internal" in the situation when no link has been
detected is confusing and makes it hard to know downstream if the link
was detected or not. Switched that to null.
Also added target option to file downloads, as we don't currently have a
mechanism to default this field to "yes" for files.
This is now the default setting for both "sake" and "phpunit"
runs, because of performance reasons (every manifest flush takes
multiple seconds). On the other hand, we want to make errors
like missing classes more obvious to developers.
See discussion in https://github.com/silverstripe/sapphire/pull/620
This is a one-off merge in the direction master->3.0,
to ensure all bugfixes since we branched off find
their way into the next micro/minor release.
From now on, we'll commit to the latest release branch,
and merge back to master. API changes should go into
the master branch (not merged into a release branch).
While well-intentioned, this test keeps causing problems
due to wrong timezone settings in test mode.
It shouldn't completely abort test execution,
since its more of an environment sanity check than a failed test.
Refactored to mark test skipped (regardless of offset, as long as
its greater than 5 seconds). And skipping tests altogether
on SQLite3 with new supportsTimezoneOverride() check.
SapphireTest->setUp() sets the PHP timezone to UTC (see 59547745),
but SQLite doesn't support this for a DB connection.
Since changing it on a global UNIX system level is infeasible,
the tests need to be skipped.
Leave the decision to the phpunit.xml config (via <get> setting),
or to the individual run via "phpunit <folder> '' flush=1".
Flushing takes multiple seconds even on my fast SSD,
which greatly reduces the likelyhood of developers adopting TDD.
Avoids problems when PHPUnit includes this test through autodiscovery. This is the case when running PHPUnit
with a specific path argument, which overrules phpunit.xml.dist
(e.g. "phpunit sapphire/").
Moved some more important stuff up the page,
rewritten upgrading overview to be more task focused,
reduced excessive use of paragraphs to make the text more scannable.
Necessary to have the <get name="db" /> directive
working in phpunit.xml definitions, which in turns allows
us to use GET parameters to switch the database connection
for running automated tests.
When querying DataObjects by a generic parent class (like SiteTree for instance), fields added via $db
set on child classes wouldnt appear.
This is because Object::__construct wasnt called early enough in DataObject::__construct, so
extensions werent initialised when $db was first accessed
See initial idea at http://open.silverstripe.org/ticket/6441. Added $template property and corresponding getters / setters for customizing the template used. Added relevant unit test.