Ingo Schommer
d9f0914e4f
Use props.extraClass on TextField holder
...
This should be separated out to a common FormField class,
but for now we're only using TextField. Can be solved
properly at the same time as switching form fields to
react-bootstrap.
Required for readonly field value alignment in the "campaigns" edit form.
2016-05-10 10:45:12 +12:00
Ingo Schommer
eab90bc82e
Simple GridField ReactJS loading indication
...
Better than no feedback at all while campaigns are loading.
Not using spinner.gif because a loading animation is already presented when the section is loaded (via PJAX).
Not translating the "Loading..." text because its temporary.
2016-05-09 22:35:51 +12:00
Ingo Schommer
984d7c1cf6
Don't use Object.freeze on functions ( fixes #5473 )
...
We're not using it for any other props passed to ReactJS components,
so there's no reason to do it here. Props are immutable by convention.
While it would be nice to enforce this, its too common to pass through
function objects which aren't supported by IE's Object.freeze().
IE isn't following the spec on how to handle Object.freeze(function() {}).
See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze#Notes
> In ES6, a non-object argument will be treated as if it was a frozen ordinary object, simply return it.
MS docs on https://msdn.microsoft.com/en-us/subscriptions/downloads/ff806186(v=vs.94).aspx
> If the object argument is not an object, a TypeError exception is thrown.
2016-05-09 21:19:43 +12:00
Damian Mooyman
8b94dd83df
API Add CSRF to Campaign delete
2016-05-09 17:33:10 +12:00
Paul Clarke
261ca9378e
Fixes campaign thumbnail left alignment issue
2016-05-09 12:51:35 +12:00
Paul Clarke
2681b81d29
Swapped a few btn classes for updated ones
2016-05-09 12:36:14 +12:00
Ingo Schommer
c251fab9af
Fixed more SCSSLint errors, disabled some files
...
The mixins and compasscompat will probably be replaced in time,
and install.scss is quite low priority to fix (same treatment as legacy/* styles)
2016-05-06 08:02:38 +12:00
Paul Clarke
22f26d10a8
moved assetadmin variables into framework
2016-05-05 17:19:05 +12:00
Damian Mooyman
8b1146be9a
API Implement campaign item edit button
2016-05-05 10:24:08 +12:00
Paul
e04fb5b986
Fixes missing actions on responsive gridfield, cleanup indentation ( #5446 )
2016-05-04 20:21:11 +12:00
Paul
4b8e98b351
fix for scss linting issues in new scss ( #5448 )
2016-05-04 20:14:56 +12:00
Paul Clarke
cd9a5dbbe9
created placeholder ListGroup.js, not currently used
2016-05-03 16:17:36 +12:00
Paul Clarke
7895e21d51
hide campaign links for alpha1
2016-05-03 16:17:36 +12:00
Paul Clarke
c7eca59a8a
Refactored class names, split out campaign specific elements, hide campaign links
2016-05-03 16:17:28 +12:00
Paul Clarke
6d1a14de9c
delete unused file, swap class for bootstrap list-group-item-heading class
2016-05-03 16:04:48 +12:00
Paul Clarke
bcbb0fcc5c
rename class for better reusability and refactor
2016-05-03 16:04:47 +12:00
Paul Clarke
5b2d910aeb
Form action styles update
...
Doesn’t conform to BEM.
Need to update places btn-success is being used and replace with
btn-primary, but the differences shouldn’t be too noticeable.
2016-05-03 16:04:47 +12:00
Paul Clarke
3be4e80711
Restructure accordion so list items are in their own component
...
Accordion styles to get more BEM
2016-05-03 16:04:42 +12:00
Paul
a7f5ef7b95
Removed More Options action and popover from template ( #5435 )
2016-05-03 15:30:41 +12:00
Damian Mooyman
72fcfbf4bc
API Campaign preview for images
2016-05-02 15:27:12 +12:00
Damian Mooyman
4be5e7c961
API Implement basic preview behaviour
2016-05-02 15:27:12 +12:00
Paul
9238bc5778
Added class to actions cell to reduce space ( #5404 )
2016-05-02 08:53:53 +12:00
Paul Clarke
acb1b46a46
Add back button for smaller screens
2016-04-27 14:09:57 +12:00
Paul
fc8d94d789
Fix for toolbar-south width ( #5391 )
2016-04-26 17:41:07 +12:00
Paul Clarke
bbf74bdca9
Minor adjustments to align header, removed cancel icon and give space to main actions
2016-04-26 15:32:10 +12:00
David Craig
8af1ad09d0
Add loading indicator to save button on scaffolded forms
2016-04-26 15:32:10 +12:00
Ingo Schommer
576e916504
Don't group form buttons by default
...
Looks weird with a "save" and "cancel" button for example
2016-04-26 15:32:10 +12:00
Ingo Schommer
b0d4283c17
Allow form action props override in FormBuilder
...
Also added bootstrapButtonStyle defaults
2016-04-26 15:32:10 +12:00
Paul Clarke
78a385c16a
Update no-text class to BEM
2016-04-26 15:32:10 +12:00
Paul Clarke
ec99452ce1
Toolbar renaming from north-header and move styles to component
2016-04-26 15:32:10 +12:00
David Craig
0b9a339b79
Make 'form' state key singular rather than plural
2016-04-26 15:32:10 +12:00
David Craig
25f1f992a9
Made FormBuilder.mergeFieldData do deep merge
2016-04-26 15:32:09 +12:00
David Craig
7e7946e50a
Fixed case sensitive naming regressions
2016-04-26 15:32:09 +12:00
David Craig
35ad44b8c8
Refactor GridFieldComponent render method
...
- Splits render out into logical methods
- Fixes missing key props issue for table header palceholder
2016-04-26 15:32:09 +12:00
Damian Mooyman
b2e8fd96ec
BUG Fix form schema to use correct ID values
...
API Implement creation of new changesets endpoint
2016-04-26 15:32:08 +12:00
David Craig
2b8ef99d5e
Add 'Cancel' button to Campaign creation form
2016-04-26 15:32:08 +12:00
David Craig
5cc6171f77
Apply default action props in FormBuilder
...
Perviously consumers had to props to FormBuilder for styling common actions like 'save'. The props are now automatically passed to FormActions by the FormBuilder. Consumers can override these defaults via the 'createFn' prop.
2016-04-26 15:32:08 +12:00
Ingo Schommer
48d01343c3
Adapt to new naming convention
2016-04-26 15:32:08 +12:00
David Craig
a15a392bd3
Styling updates for the Campaign edit form
2016-04-26 15:32:08 +12:00
David Craig
1ad6730b9e
Add form component styling
2016-04-26 15:32:08 +12:00
David Craig
58036cd156
Add back button to NorthHeader component
2016-04-26 15:32:08 +12:00
Damian Mooyman
e2afcd0acb
API Implement back end for saving forms via react
2016-04-26 15:32:08 +12:00
David Craig
7fcdf35438
Add DetailEditForm to Campaign admin
...
- Add edit form to campaigns section
- Handle form submissions with FormBuilder
- Handle form state via Redux
- Garbage collect form state
- Removes $itemID as a required param for schema requests.
Developers should be able to scaffold forms without populating
values from an existing record. For example when building a form for creating new records.
2016-04-26 15:32:07 +12:00
Ingo Schommer
21db18e7ef
Correct naming for JS and CSS files in client/
...
Removed some dist/js/*.js files since they're no longer built as individual files.
This was a side effect of them living in the toplevel folder of admin/client/src/,
which used to have all the legacy/*.js files in there (they do need to be built).
Following AirBnB convention: https://github.com/airbnb/javascript#naming--filename-matches-export
While it technically allows index.js files, we found them to be bad for dev and debugging in practice:
Depending on the used IDE, editor tabs all look the same. Other views like Chrome Dev Tools with
sourcemaps rely on path context, and are harder to auto-complete.
There's no direct rules for CSS files, but same principles apply here.
Also renamed the sections/ folder to containers/, which more clearly communicates
the distinction between components/ (shouldn't contain state-dependant, smart components).
Renamed state/ files to follow AirBnB naming conventions
https://github.com/airbnb/javascript#naming--filename-matches-export
https://github.com/airbnb/javascript#naming--camelCase-default-export
https://github.com/airbnb/javascript#naming--PascalCase-singleton
Leaving the folder name in state/<state-key> lowercase since
that's also the key to reducers in the actual state object.
References:
http://engineering.kapost.com/2016/01/organizing-large-react-applications/
https://github.com/erikras/react-redux-universal-hot-example/tree/master/src
https://github.com/RickWong/react-isomorphic-starterkit/tree/master/src
https://github.com/react-toolbox/react-toolbox/issues/98
https://github.com/react-bootstrap/react-bootstrap/tree/master/src
2016-04-25 15:43:19 +12:00
Ingo Schommer
c66a45c8b8
Fixed GridField JS test warnings
2016-04-25 14:58:26 +12:00
Paul Clarke
01145301fa
Delete unwanted stylesheets and move remainder styles to better location
2016-04-21 15:39:58 +12:00
Paul Clarke
35a2e13085
Added modifier for img --fits-space, will need to use js to detect so styles can be adapted
2016-04-21 11:19:30 +12:00
Paul Clarke
9b5430a80c
Use bootstrap mixing text-truncate instead of custom styles
2016-04-21 11:19:29 +12:00
Paul Clarke
02bb158a27
Removed old typography, minor updates and rebase regressions
2016-04-21 11:19:20 +12:00
Paul Clarke
a7e5da8228
Fix for height
2016-04-21 11:03:45 +12:00
Paul Clarke
cc7170d424
improved consistency of toolbars included in preview and other areas of cms
2016-04-21 11:03:45 +12:00
Paul Clarke
6cd5bf2f3f
Preview panel as its own component, file preview styles, no preview message.
...
Improved layout reusability
Moved layout styles to its own stylesheet
Added scrollable panels
2016-04-21 11:03:42 +12:00
Ingo Schommer
19de22f427
API Moved frontend assets into admin/client/
...
admin/javascript => admin/client
admin/javascript/src => admin/client/src/legacy (mostly)
admin/scss/_variables.scss => admin/client/styles/_variables.scss
admin/scss => admin/client/styles/legacy/
admin/css/editor.css => admin/client/dist/css/editor.css
admin/css/screen.css => admin/client/dist/css/bundle.css
admin/images => admin/client/dist/images
admin/images/sprites/src => admin/client/src/sprites
admin/images/sprites/dist => admin/client/dist/sprites
admin/font => admin/client/dist/font
2016-04-20 21:13:10 +12:00