Commit Graph

52 Commits

Author SHA1 Message Date
Christopher Joe
ee5b4fd8d3 Tabs support in new file/image editor
Introducing <Tabs> component based on react-bootstrap
Better support for nested fields in FormBuilder
Tweaks to get FormBuilder working with frameworktest BasicFieldsPage fields
Added exception in FormBuilder when Component is defined but not found
Added check in SingleSelectField for empty value before adding one in
Added temporary workaround for CompositeFields with no name (another story to address the actual problem)
Added asset_preview_height for File image preview, matches the defined CSS max-height
Added documentation to DBFile::PreviewLink() method
2016-09-14 14:08:59 +12:00
Ingo Schommer
0cc91d3b38 Use react-bootstrap-ss fork
The react-bootstrap project won't update their codebase for TWBS4 compat
until they're out of alpha (https://github.com/react-bootstrap/react-bootstrap/issues/1187).
So we have to work in a fork for the meantime.
2016-09-06 21:36:58 +12:00
Ingo Schommer
79b9bb6f18 React for "Add to campaign" on pages
Reuse existing functionality rather than creating "new legacy code" through writing more Entwine
2016-08-28 13:07:32 +12:00
Christopher Joe
b77d21c25a Fix pages add to campaign, improved FormActions error handling, Popover focus highlight and refactored AddToCampaignModal to FormBuilderModal
tweaked tests to suit new generic FormBuilderModal, changed FormAction handler to throw a promise instead
2016-08-28 13:07:32 +12:00
Christopher Joe
6a4b29d703 Add to campaign modal 2016-08-28 13:07:30 +12:00
Damian Mooyman
a868ecdbfa BUG Correct include paths for legacy JS files 2016-07-28 16:34:28 +12:00
Damian Mooyman
6e74b57c36 BUG Fix issue with gulpfile.js not compiling client/src/legacy dir
BUG Make SelectionGroup.ss and SelectionGroup.js work together
BUG Fix for IE visual indentation of composite field
2016-07-28 16:32:40 +12:00
Damian Mooyman
5cb4ab4a82 API Add PopoverField for extra-actions popup in react 2016-07-15 15:46:11 +12:00
Damian Mooyman
6e68f38efb API Update react sections to use react-router instead of page.js (#5796)
Fixes #5711
2016-07-14 17:51:01 +12:00
David Craig
83308689d5 API Initialise React controllers via routes (#5436) 2016-06-16 15:04:14 +12:00
Damian Mooyman
8b94dd83df API Add CSRF to Campaign delete 2016-05-09 17:33: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
ddfe660f0a Fix variable references when debugging 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
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
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
28e81db545 Require silverstripe-backend to avoid double include 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
Damian Mooyman
5900893753 API Implement campaign list view 2016-04-14 12:02:59 +12:00
Damian Mooyman
5f2edb4e91 Fix ESLint issues, shrinkwrap, and missing image 2016-04-14 11:20:22 +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
d7eed8fe8d Fix gulpfile.js ESLint syntax 2016-04-12 22:04:37 +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
d1502cd49f Include config in bundles
Merge regression
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
Ingo Schommer
34d40bed5f Add ESLint support
See https://github.com/silverstripe/silverstripe-framework/pull/5108
2016-04-06 10:43:33 +12:00
Ingo Schommer
4f148c2778 More logical dependency ordering in Gulpfile 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
scott1702
d1e4c563ce Move ActionComponent into FormActionComponent 2016-04-06 08:41:11 +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
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
Paul Clarke
0ca090a391 Add generic React components
Includes moving some components from AssetAdmin
2016-04-06 08:35:50 +12:00
David Craig
d0ffa7771c Client config 2016-04-05 22:43:29 +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
Ingo Schommer
6926e85fff Reinstate route externals in Gulpfile
Accidental regression from c4e5074f67 (see aa1aebd007)
2016-04-04 08:58:59 +12:00
Ingo Schommer
c4e5074f67 Partially reverted b1b85b5
We still require copying thirdparty components from node_modules on tiny_mce
2016-04-04 08:15:27 +12:00
Sean Harvey
b1b85b539e TinyMCE 4 optimisations. Use TinyMCE_Compressor. 2016-04-04 07:58:45 +12:00
David Craig
aa1aebd007 Implement client-side routing with Page.js
- Removes thirdparty dependency History.js
- Adds thirdparty dependency Page.js to manage client-side routing
- Adds a wrapper around Page.js for SilverStripe specific behaviour
- Increased minimum browser requirement to IE10. Native HTML History API routing requires IE10 or newer (necessitated by removal of History.js)
- PJAX pannel loading via now uses promises rather than callbacks
- Adds getClientConfig method to LeftAndMain which can be used to pass config from to the front-end client
2016-04-01 13:45:14 +13:00
Ingo Schommer
dbe85dff0a Watch admin SCSS files 2016-03-28 21:02:27 +13:00
David Craig
97176581eb Tidy grunt file
- Don't watch in prod mode
- Use gulp-if instead of if statements
2016-03-28 21:02:15 +13:00
Damian Mooyman
2d56ea278a API Move ss buttons plugin out of thirdparty
BUG Fix incorrect parsing of shortcode properties
2016-03-21 13:51:33 +13:00
Ingo Schommer
8ae794ee99 API TinyMCE Image shortcodes 2016-03-21 09:23:40 +13:00
Ingo Schommer
9079c1110a Don't add comments to dist files via babelify
We've had some issues with different dependencies causing different results based on the environment,
which in turn causes unnecessary diffs - making our work harder to review.

Comments can be read through the ES6 source files, and through source maps when
generated through `npm run build --development`
2016-02-23 11:12:24 +13:00
David Craig
5a42a4181a Added Bootstrap Alpha.2
- Managed by npm
- Created an `npm run css` task to compile
- Updated shrinkwrap
- Updated changelog
2016-02-23 11:11:24 +13:00
Damian Mooyman
f20ad434ce API Update TinyMCE to 4.x
API Allow HtmlEditorField to be individually configured
BUG Fix incorrect change detection
BUG Fix missing i18n files
2016-02-23 10:10:02 +13:00
scott1702
38b1c0a162 Replace Compass with gulp-sass 2016-02-16 18:35:57 +13:00
scott1702
2bf802a8cd Include React and related libraries in framework 2016-02-15 16:05:55 +13:00