Commit Graph

702 Commits

Author SHA1 Message Date
Paul Clarke
d9519983f8 build js 2016-04-19 15:07:06 +12:00
Paul Clarke
4d9e38c62b toolbar improvements 2016-04-19 15:01:38 +12:00
Paul Clarke
47ca889567 bugfix for Add campaign button spacing 2016-04-19 14:22:50 +12:00
Ingo Schommer
6ccfbb7c52 Fixed breadcrumbs test 2016-04-19 13:40:57 +12:00
Ingo Schommer
e939452129 Update build artifacts 2016-04-19 12:15:14 +12:00
Paul Clarke
7f59a7e6f7 Converted grid-field to table markup and SCSS to BEM
Also added tab index
2016-04-19 12:15:09 +12:00
Paul Clarke
e0fe90b3c8 General CMS typography swap to bootstrap
Start of using bootstrap variables and typography styles, remove old
cms reset in favour of bootstrap reboot
2016-04-19 11:13:53 +12:00
Paul Clarke
6a53fe0fb7 small improvement to success button 2016-04-19 11:13:53 +12:00
Ingo Schommer
b2516ae7d0 Updated build artifacts 2016-04-18 23:45:24 +12:00
Ingo Schommer
75b2c7c360 BEM notation corrections, use Bootstrap vars
See comments on https://github.com/silverstripe/silverstripe-framework/pull/5317
2016-04-18 23:45:14 +12:00
Ingo Schommer
3c8960d88b Simplified breadcrumb component
The "multiline" variation was the only one actually used at the moment.
If we need a "singleline" one, we could make a "condensed" variation instead
2016-04-18 23:35:55 +12:00
Paul Clarke
40c98c6047 CSS updates to Campaign Admin
refactored breadcrumbs to use bootstrap
fix border lines on table
Layout variables updated for spacing, added toolbar heights
Added as part of campaigns as this area needs to use these variables.
Added action toolbar for content, swapped values to variables
toolbar action spacing
Adjustments of breadcrumb variable
Move accordion styles to its own component
Campaign items, styles for linked items and state badges
Small update to class name
Class name updates, convert values into variables
2016-04-18 23:35:31 +12:00
Ingo Schommer
c967e62e97 Updated build artifacts 2016-04-18 14:03:53 +12:00
Ingo Schommer
90e352ca7d Fix "urlencoded" HTTP header notation
Misspelling caused data to be sent as binary (browser default?)
rather than urlencoded, meaning it doesn't show up in $_POST.
2016-04-18 13:59:18 +12:00
Ingo Schommer
e840ba805e Use SecurityID in destructive campaign actions
Using POST rather than PUT because SecurityToken->checkRequest()
doesn't accept PUT data (it's only in the request body, not
in $_POST and HTTPRequest->requestVars()).
2016-04-18 13:59:18 +12:00
Ingo Schommer
572d8427e0 Implement defaultData on silverstripe-backend 2016-04-18 13:59:18 +12:00
David Craig
ef6a1f33ee Minor updates and fixes for campaign admin front-end
- Updated FormActionComponent prop from 'style' to 'bootstrapButtonStyle because 'style' is a built in React prop.

- Linted and added missing propTypes to campaign admin List component.

- Added missing initial state key to campaign reducer.

- Forced REST verb to lowercase in silverstripe-backend to make comparisions more robust.
2016-04-18 13:59:18 +12:00
Paul Clarke
d51e94c035 Added icons to publish and revert buttons 2016-04-18 13:59:18 +12:00
Ingo Schommer
8554b43ccc Correct campaign badges, "revert" placeholder button 2016-04-18 13:59:18 +12:00
Ingo Schommer
37d3d22fbd Publish loading indicator 2016-04-18 13:59:18 +12:00
Ingo Schommer
aefc1a5c01 Use keyed redux record store
It's the recommended approach in Redux docs, and more performant (key-based).
It'll also simplify a move to Immutable.js later on.

The PHP APIs still return unkeyed data, which is standard REST API behaviour,
but for Redux state we transform it to be keyed.
2016-04-18 13:59:18 +12:00
Ingo Schommer
f7237a9936 Fix <FormAction> external and prop definition
click handler shouldn't be required
2016-04-18 13:59:18 +12:00
Ingo Schommer
107e38b7a7 Campaign publish feature 2016-04-18 13:59:18 +12:00
Ingo Schommer
067c64e07c Add babel-polyfill for better ES6 support
See http://babeljs.io/docs/usage/polyfill/
2016-04-18 12:08:35 +12:00
Damian Mooyman
f70cb08229 Improve i18n on campaigns section 2016-04-14 12:23:21 +12:00
Ingo Schommer
5d29d30118 Fixed silverstripe-backend GET use regression
fetch() doesn't allow a HTTP body for GET, which is fair enough.
This means we need to dynamically combine arguments based on HTTP verb.
2016-04-14 12:05:40 +12:00
Damian Mooyman
484680a2d5 Update artifacts 2016-04-14 12:04:50 +12:00
Damian Mooyman
5900893753 API Implement campaign list view 2016-04-14 12:02:59 +12:00
Hamish Friedlander
2983dd58ff Fix admin area after upgrade to Chosen 1.5 2016-04-14 10:47:15 +12:00
Hamish Friedlander
31247a67bd API Replace baked-in and modified Chosen 0.9.8 with npm'ed in Chosen 1.5.1 2016-04-14 10:45:39 +12:00
Ingo Schommer
6e0ef669be payloadSchema support in createEndpointFetcher()
Required for REST URLs which require data to be populated on call.
For example, PUT admin/campaigns/set/:id/publish to publish a campaign.
At the time when createEndpointFetcher() is called, the ":id" parameter can not be resolved,
since the "data" argument is passed in once the returned function is evaluated (since the component using it).
Since the whole idea of createEndpointFetcher() is that components shouldn't know about the backend internals,
its not the right place to interpolate urls.

I'm sending through any payload data in addition to replacing URLs, to keep the API simple for the component.
Again, it shouldn't worry about the presence URL interpolation. The trade off here is that data will be submitted
both in the payload (in case of a POST, PUT or DELETE request), as well as (optionally) in the URL.
2016-04-12 22:03:43 +12:00
Sam Minnee
8c469899d0 MINOR: Fix linting errors in tests.
Tests were previously excluded from eslint calls. This leads to messier
code inside tests, and potentially errors.

Now they all meet the listing rules, and so we don’t need to ignore
tests in .eslintignore.
2016-04-12 16:50:06 +12:00
Sam Minnee
b088efc6f9 MINOR: Test for backend.createEndpointFetcher() 2016-04-12 12:15:37 +12:00
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
Ingo Schommer
429682e626 Remove <IE10 specific workarounds
We no longer support IE browsers older than IE10
2016-04-11 14:50:00 +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
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
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
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
d27e3c2d34 Delete campaign feature 2016-04-06 08:49:47 +12:00