Commit Graph

15899 Commits

Author SHA1 Message Date
Sam Minnee
21a1065329 NEW: Add createEndpointFetcher to backend
SilverStripeBackend now has a createEndpointFetcher method, described
in its docblock in more detail.

It’s based the asset-admin code for apiCallerFromEndpoint(). It’s
refactored and generalised into framework in order to provide a
general-purpose API for tying Javascript components to backend APIs.

@todo: tests
2016-04-11 21:43:21 +12:00
Loz Calver
7ebc544334 Merge pull request #5293 from open-sausages/pulls/4.0/remove-ie8-styles
Remove <IE10 specific workarounds
2016-04-11 09:39:50 +01:00
Ingo Schommer
429682e626 Remove <IE10 specific workarounds
We no longer support IE browsers older than IE10
2016-04-11 14:50:00 +12:00
Damian Mooyman
5fe8288e18 Merge pull request #5287 from open-sausages/pulls/4.0/fix-react-form-attrs
Fix React DOM warnings about <form> attrs
2016-04-11 10:46:20 +12:00
Ingo Schommer
ce8ac58ddb Fix React DOM warnings about <form> attrs
"class" is a reserved word in JS, hence React uses "className".
"encType" has to be camel cased correctly, see https://facebook.github.io/react/docs/tags-and-attributes.html#html-attributes

Also marked less attrs on <form> as required
2016-04-11 09:16:32 +12:00
Damian Mooyman
fcaa579572 Merge pull request #5282 from patricknelson/issue-5279-director-code-quality-master
FIX for #5279 Addressing only a few PSR-2 items in one file, but primarily targeting Director::is_https() and invalid URL's.
2016-04-11 08:48:35 +12:00
Daniel Hensby
d7289a17fc Merge pull request #5271 from bummzack/5244-remove-email-subclasses
Fix 5244: Removed Email Subclasses
2016-04-08 17:09:44 +01:00
Ingo Schommer
1059a3f546 Merge pull request #5284 from sminnee/fix-for-add-folder
NEW: Expose silverstripe-backend for modules to access.
2016-04-08 13:23:45 +12:00
Sam Minnee
a17c5cb148 NEW: Expose silverstripe-backend for modules to access.
FIX: Ensure post has correct content-type header.

Exporting silverstripe-backend lets other modules (such as asset-admin)
use it.

In addition, the Content-type header of a post request of URL-encoded
data was being set to text/plain by default, which isn’t correct and
stopped PHP from interpreting it.
2016-04-08 10:14:24 +12:00
Hamish Friedlander
97a62b4982 Merge pull request #5278 from open-sausages/pulls/4.0/campaign-admin
Campaigns Feature
2016-04-08 10:14:06 +12:00
Ingo Schommer
3e575681ae Updated build artifacts 2016-04-07 23:50:12 +12:00
Ingo Schommer
097d7ee6d3 Removed unnecessary thunk wrapper in actions 2016-04-07 23:50:09 +12:00
Ingo Schommer
f9d5b0db97 More concise breadcrumb generation
Courtesy of @hafriedlander
2016-04-07 23:32:32 +12:00
Ingo Schommer
2f801f9319 Pass all field attributes via <FormBuilder>
Also make them immutable via deep-freeze
2016-04-07 23:32:32 +12:00
Ingo Schommer
e7d2e9b0b2 Allow user-defined <Form> attributes 2016-04-07 23:32:32 +12:00
Ingo Schommer
0fe330621c Only list existing <FormBuilder> data types 2016-04-07 23:32:32 +12:00
Ingo Schommer
3835291cdf More accurate variable naming
schema.schema is awkward
2016-04-07 23:32:31 +12:00
Ingo Schommer
ab874a0c8d Correct state handling in <FormBuilder> component 2016-04-07 23:32:31 +12:00
Ingo Schommer
874146afda Syntax fix 2016-04-07 23:32:31 +12:00
Ingo Schommer
a1ea239c8f Enforcing can*() in CampaignAdmin reads 2016-04-07 23:32:31 +12:00
Ingo Schommer
783d45cedd Added TODO elements to unimplemented CampaignAdmin functionality 2016-04-07 23:32:30 +12:00
Patrick Nelson
0aec89d0c8 FIX for #5279 Addressing only a few PSR-2 items in one file, but primarily targeting Director::is_https() and invalid URL's. 2016-04-06 18:26:47 -07:00
Roman Schmid
ca4036b882 Removed Email Subclasses used by the Member class (Member_ChangePasswordEmail and Member_ForgotPasswordEmail).
Added a test for the forgot password email.
Improved the test for the change-password email.
Fixed issue where `SapphireTest::mailer` was cleared during `setUp` by moving instantiation of the mailer at the end of the `setUp` method.
No longer use deprecated i18n method in test-setup.
Replace potentially real Email Address with a fake one.
2016-04-06 09:54:17 +02:00
Ingo Schommer
7ff646091e Noting update to LeftAndMain.help_link
See https://github.com/silverstripe/silverstripe-framework/pull/5167/
2016-04-06 19:39:17 +12:00
Ingo Schommer
f0906f6e92 Merge pull request #5261 from tractorcow/pulls/4.0/fixup-tinymce
BUG fix missing language on non-global TinyMCE Configs
2016-04-06 19:32:55 +12:00
Ingo Schommer
d1502cd49f Include config in bundles
Merge regression
2016-04-06 10:57:57 +12:00
Ingo Schommer
573e7844ac Don't show diff for compiled CSS files 2016-04-06 10:57:57 +12:00
Ingo Schommer
759c40793f Always use uglify during build
It makes very little difference between "npm run build"
and "npm run build --development" (both under a second),
since the gulp pipeline is smart enough to only uglify the new bits.

Creating different dist files with "--development"
is causing grief during pull requests, since most
devs will add the changed files without reviewing them.
It also means you can commit without stopping your "watch" npm task.
2016-04-06 10:57:57 +12:00
Ingo Schommer
0fadd7a15a Fix IE compat through babelify
Requires a polyfill for Object.assign
2016-04-06 10:57:57 +12:00
scott1702
5c8df9f16e Updates to FormActionComponent 2016-04-06 10:57:54 +12:00
Ingo Schommer
34d40bed5f Add ESLint support
See https://github.com/silverstripe/silverstripe-framework/pull/5108
2016-04-06 10:43:33 +12:00
scott1702
6aa22c38ed Convert react grid-field from flexbox to table-based 2016-04-06 08:49:47 +12:00
Ingo Schommer
4f148c2778 More logical dependency ordering in Gulpfile 2016-04-06 08:49:47 +12:00
Ingo Schommer
ca25c78dda Updated babel dependency 2016-04-06 08:49:47 +12:00
Ingo Schommer
830523541a Updated react dependency 2016-04-06 08:49:47 +12:00
Ingo Schommer
d27e3c2d34 Delete campaign feature 2016-04-06 08:49:47 +12:00
Ingo Schommer
0675f85d32 Use /index suffix for JS import statements
Otherwise browserify or gulp-sourcemaps doesn't include these
in the *.map file, which makes debugging impossible
2016-04-06 08:49:47 +12:00
Damian Mooyman
2cf5fbcfce Implement readCampaigns()
Renamed "item/items" urls to "set/sets" to distinguish between change sets and change set items.
2016-04-06 08:49:44 +12:00
scott1702
d1e4c563ce Move ActionComponent into FormActionComponent 2016-04-06 08:41:11 +12:00
Ingo Schommer
2a5c92e491 Generic state management for React GridField
Renaming state operations from 'campaign' to 'record'.
Implemented API endpoint retrieval of GridField data.

Added more mock data into CampaignAdmin (rather than hardcoding in client),
to be replaced by CampaignAdmin API endpoint querying the real datamodel.

Using more native isomorphic-fetch instead of jQuery.ajax
to minimise dependencies and get into a more forward-thinking API.

Also catching errors in ReactJS API backend:
Emulate jQuery.ajax() behaviour. Might change at a later point
if we have a general purpose backend with a promise-based catch()
implementation.
2016-04-06 08:41:07 +12:00
Ingo Schommer
47dd7b48af Relative ES6 module paths
http://stackoverflow.com/questions/20158401/how-do-i-manage-relative-path-aliasing-in-multiple-grunt-browserify-bundles/23608416#23608416
https://github.com/substack/node-browserify/issues/767
http://stackoverflow.com/questions/28078780/relative-paths-in-package-json
https://github.com/npm/npm/issues/1558
http://stackoverflow.com/questions/31624567/webstorm-es6-named-import-getting-cannot-resolve-symbol-error/31631415
http://stackoverflow.com/questions/20158401/how-do-i-manage-relative-path-aliasing-in-multiple-grunt-browserify-bundles/23608416#23608416
https://github.com/vigetlabs/gulp-starter/issues/17#issuecomment-44292681
2016-04-06 08:36:38 +12:00
Ingo Schommer
c70590e50c Consolidated grid-field component
Every top-level folder in /components should be a standalone component.
This isn't the case for the grid-field-* ones, so they belong into the same folder.
See https://github.com/Automattic/wp-calypso/blob/master/docs/components.md

merge styles
2016-04-06 08:36:37 +12:00
scott1702
e550363c67 - Add GridfieldActionsComponent
- Add ability to set desired relative width on gridfield cells
2016-04-06 08:36:37 +12:00
David Craig
ef97e0b52f Consolidated bundles, sourcemaps and watching
We don't want a bundle for each section, unnecessary network overhead
and too much boilerplate in defining build tooling.
2016-04-06 08:36:34 +12:00
Ingo Schommer
b4e6d498c9 Simplified form schema structure and mocks
Keyed by URL instead of anonymous object maps which need to be iterated on
Removed the 'schema.forms' namespace, unnecessary since all 'schema' items should be forms
2016-04-06 08:35:53 +12:00
Paul Clarke
0ca090a391 Add generic React components
Includes moving some components from AssetAdmin
2016-04-06 08:35:50 +12:00
Ingo Schommer
b0ba742c1f Campaign form schema and edit form
Remove once we have a schema-driven GridField in place.
Edit form should be a GridFieldDetailForm, but there's more work to do for schema generation
from this component.
2016-04-05 22:43:30 +12:00
David Craig
d0ffa7771c Client config 2016-04-05 22:43:29 +12:00
scott1702
2abe24f818 GridField and header styles 2016-04-05 22:42:15 +12:00
David Craig
f8c17bed3b CampaignAdmin and GridField React sections
Also removes watchify because it wasn't working.
Add SilverStripeBackend class used to fetch data from endpoints for the front-end
2016-04-05 22:42:13 +12:00