Commit Graph

13558 Commits

Author SHA1 Message Date
Ingo Schommer
659634557d Use links for CMS preview states to allow open in new tab
Important to allow users to send around preview links,
open draft versions in new tabs, or find out which URL to
use to preview on mobile phones and other devices which
can't load the CMS preview panel directly.

Removed CSS animations since they complicated the component too much.

Removed input/label setup since its not contained in a form,
so has no relevance as far as server-side state goes.

This does mean there's no longer an indication that only one
state can be active at a given time (which the radio buttons communicated),
but that's no different from e.g. the CMS menu.

Not an API change since the Entwine JS and PHP interfaces stay the same.

Conflicts:
	admin/css/screen.css
2014-11-10 10:40:24 +13:00
Loz Calver
9cbd6f8023 Merge pull request #3598 from micmania1/patch-4
FIX Image backend ignoring config.
2014-11-03 09:03:43 +00:00
Michael Strong
51337acda9 FIX Image backend ignoring config.
The method directly calls the static property instead of the config value.
2014-11-03 20:03:10 +13:00
Sean Harvey
4d603b85f0 Merge pull request #3555 from micmania1/patch-3
Duplicated content
2014-10-15 13:57:14 +13:00
Michael Strong
a401db2d34 Duplicated content
For some reason the quick fire dos and donts were duplicated.
2014-10-15 12:47:55 +13:00
Sean Harvey
7a8b4a7f63 Merge pull request #3511 from tractorcow/pr/3098
Pr/3098
2014-10-10 10:16:54 +13:00
Damian Mooyman
1e612607aa Suggested improvements / test case fixes 2014-10-10 09:28:11 +13:00
Daniel Hensby
3b9056fc01 NEW Cookie_Backend for managing cookie state
I've decoupled `Cookie` from the actual act of setting and getting
cookies. Currently there are a few limitations to how Cookie works that
this change mitigates:

0. `Cookie` currently changes the super global `$_COOKIE` when setting
to make the state of an application a bit more managable, but this is
bad because we shouldn't be modifying super globals
0. One can't actually change the `$cookie_class` once the
`Cookie::$inst` has been instantiated
0. One can't test cookies as there is no class that holds the state of
the cookies (it's just held in the super global which is reset as part
of `Director::test()`
0. One can't tell the origin of a cookie (eg: did the application set it
and it needs to be sent, or did we receive it from the browser?)
0. `time()` was used, so testing was made difficult
0. There was no way to get all the cookies at once (without accessing
the super global)

Todos are on the phpdoc and I'd like to write some tests for the backend
as well as update the docs (if there are any) around cookies.
DOCS Adding `Cookie` docs

Explains basic usage of `Cookie` as well as how the `Cookie_Backend`
controls the setting and getting of cookies and manages state of sent vs
received cookies
Fixing `Cookie` usage

`Cookie` is being used inconsistently with the API throughout framework.
Either by not using `force_expiry` to expire cookies or setting them to
null and then expiring them (which is redundant).
NEW `Director::test()` takes `Cookie_Backend` rather than `array` for `$cookies` param
2014-10-06 17:44:51 +13:00
Sean Harvey
b4df2aa80f Merge pull request #3512 from tractorcow/pulls/3.2/exceptions
BUG ErrorControlChain now supports exception handling
2014-10-06 15:22:11 +13:00
Damian Mooyman
db0cad4616 BUG ErrorControlChain now supports exception handling 2014-09-26 16:54:34 +12:00
Damian Mooyman
3ff4bf633e Merge pull request #3407 from dhensby/pulls/file-link
Removing duplicate code and keeping File API consistent
2014-09-26 12:16:34 +12:00
Sean Harvey
99f8fb29b5 Merge pull request #3507 from tractorcow/pulls/fix-mailer
API / FIX / Cleanup - Mailer and Convert::html2raw
2014-09-26 10:15:18 +12:00
Sean Harvey
f61bb186a7 Merge pull request #3007 from tractorcow/pulls/singleton
API Singleton method allowing type inference
2014-09-26 10:11:42 +12:00
Damian Mooyman
bf4e9eb044 API Singleton method allowing type inference
This pattern improves over the current usage of singleton by allowing type inference.
This also better supports refactor, code usage detection, and auto-completion of classes.
2014-09-26 09:10:25 +12:00
Sean Harvey
04e26d4a36 Merge pull request #3025 from tractorcow/pulls/3.2-date-relevance
API DateTime.Ago better infers significance of date units.
2014-09-25 18:28:30 +12:00
Damian Mooyman
e47800917a API Mailer can be configured to use different encoding mechanisms, and added support for unicode quoted-string encoding
API Mailer bounce email can now be configured
API Mailer no longer calls Convert::xml2raw on all email subjects
API Deprecate dead Mailer code and refactored duplicate or mis-documented code.
2014-09-25 16:04:56 +12:00
Damian Mooyman
29e3347562 API Convert::html2raw no longer wraps text automatically
BUG Convert::html2raw now correctly decodes single quotes
2014-09-25 16:04:48 +12:00
Sean Harvey
bbd4e8b8c1 Merge pull request #3462 from tractorcow/pulls/3.2/fix-versioned
BUG Fix versioned failing to generate new versions
2014-09-24 18:03:40 +12:00
Simon Welsh
7e58bbf6ce Merge pull request #3505 from halkyon/cookie_httponly
Cookies set via Cookie::set() are now HTTP only by default
2014-09-24 15:49:32 +10:00
Sean Harvey
563155391f API Cookies set via Cookie::set() are now HTTP only by default 2014-09-24 17:48:13 +12:00
Sean Harvey
4ba6d8153d Merge pull request #3490 from tractorcow/pulls/3.2/parameterised-joins
API Allow parameterised joins / subselects
2014-09-17 07:31:18 +12:00
Damian Mooyman
062ad8e685 API Allow parameterised joins / subselects 2014-09-16 17:54:30 +12:00
Damian Mooyman
35fcb551d9 Refactor / Cleanup Versioned 2014-09-02 09:17:13 +12:00
Damian Mooyman
c140459ac6 BUG Fix versioned
Versioned is not writing Version to _version tables for subclasses of Version dataobjects which have their own DB fields
- Fix disjoint of ID / RecordID (which should be the same)
- Fix calculation of new record version
- Fix use of empty vs !isset to check for existing version
2014-09-02 09:14:08 +12:00
Ingo Schommer
26d7febe05 Merge pull request #3461 from NightJar/testfix
Fix some edgecase test issues
2014-09-02 08:52:56 +12:00
Nightjar
e4b563e596 Fixing the failure of some tests if the framework dir is named something other than 'framework' (which is a legitimate option) 2014-09-01 13:53:06 +01:00
Ingo Schommer
da61229221 Merge pull request #3430 from kinglozzer/pulls/retina
Add "retina" graphics for high-dpi screens
2014-09-01 23:09:40 +12:00
Will Rossiter
265a34141e GridFieldDeleteAction missing button text without icons
The text on the button is hidden from view via CSS already. This allows the button to have text in the event that the GridField does not provide icons (and likely is better for your screen readers).
2014-09-01 21:58:07 +12:00
Will Rossiter
3644110349 FIX: Ensure that columns are unique within a gridfield 2014-09-01 21:50:36 +12:00
Will Rossiter
0991477e5a Add support for directly saving into a File object
saveInto() assumed you were either saving into a hasOne or if you wanted to create a new object.

This made it impossible to have a FileField on an object that you wanted to upload to. This adds a check so that if the local object is a file, save to that.
2014-08-31 15:59:17 +12:00
Will Rossiter
4b6a03bb0b Fix deprecation warning with word_list 2014-08-31 15:59:16 +12:00
Sean Harvey
98ab540aba Merge pull request #3454 from christopherdarling/patch-1
add .yml indentation
2014-08-29 21:57:04 +12:00
Christopher Darling
d993ea8cd0 add .yml indentation
added some extra rules for any _config/*.yml files so that they use 2 space indents.
2014-08-29 09:48:40 +01:00
Will Rossiter
7b0ae41916 Merge pull request #3452 from assertchris/add-editorconfig
Add editorconfig.
2014-08-29 15:32:25 +12:00
Christopher Pitt
e391ed5b91 Add editorconfig. 2014-08-29 10:28:05 +12:00
Loz Calver
5f653a00eb Add "retina" styles for high-dpi screens 2014-08-27 17:06:57 +01:00
Damian Mooyman
e301279358 Merge pull request #3425 from halkyon/removing_deprecated2
Removing deprecated class/functions marked for deprecation in 3.0/3.1
2014-08-26 09:13:08 +12:00
Sean Harvey
89245ef443 Merge pull request #3433 from chillu/pulls/authenticate-backurl-master
Don't clear BackURL after MemberAuthenticator::authenticate()
2014-08-26 08:59:58 +12:00
Ingo Schommer
e56ad9b37c Don't clear BackURL after MemberAuthenticator::authenticate()
It breaks logic flow, e.g. when

Its called by BasicAuth:requireLogin() when basic auth is enabled,
before any controller logic kicks in (on every HTTP request).
This means you can't use session-based BackURLs with basic auth enabled,
breaking flows like redirection after Facebook logins.

I can't see why a clear() was necessary here, looks like a overly
cautious way to prevent infinite loops? Can't see how those
would be caused by requireLogin() though.

Been there since all the way back in 2007: a377a67e54
2014-08-25 23:12:52 +12:00
Sean Harvey
07eef2ece2 Removing deprecated class/functions marked for deprecation in 3.0/3.1 2014-08-25 12:06:05 +12:00
Damian Mooyman
f3974f0e63 Merge pull request #3412 from halkyon/redundant_config
Removing redundant aggregatestore cache config (#3404)
2014-08-25 11:21:18 +12:00
Damian Mooyman
5b553616dc API DateTime.Ago better infers significance of date units.
BUG Fixes missing i18n translation in Date::TimeDiffIn
BUG Fixes Date::TimeDiffIn not respecting mocked SS_Datetime::now
This provides less vague date periods. I.e. "36 days" has a lot more relevance that "1 month"
Reduced duplication of time period calculation code
(ref: CWPBUG-141)
2014-08-25 10:04:24 +12:00
Sean Harvey
c7fb61120e Removing redundant aggregatestore cache config (#3404) 2014-08-21 09:13:28 +12:00
Daniel Hensby
6577324a9c Removing duplicate code and keeping File API consistent 2014-08-20 11:18:18 +01:00
Sean Harvey
c0abb08b61 Merge pull request #3397 from tractorcow/pulls/3.2/whitespace
Remove all redundant whitespace
2014-08-19 09:55:31 +12:00
Damian Mooyman
eb069e605d Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
Damian Mooyman
64bf786958 Merge pull request #3396 from halkyon/deprecation_cleanup
Removing @deprecated 3.1 functionality and classes.
2014-08-19 08:40:14 +12:00
Sean Harvey
404478b07f Removing @deprecated 3.1 functionality and classes.
Changelog has been updated to include what was removed in terms of
major functionality, and what to use as a replacement.
2014-08-18 16:00:13 +12:00
Sean Harvey
b346d2b4d3 Merge pull request #3376 from mateusz/link-tracking
Move the link-tracking into the cms to remove the SiteTree dependency.
2014-08-14 14:11:22 +12:00
Sean Harvey
f8a77eeace Merge pull request #3385 from mateusz/viewable-data-getter
API Add a getter for customisedObject property.
2014-08-14 11:45:35 +12:00