Commit Graph

15 Commits

Author SHA1 Message Date
Ingo Schommer
9cb9a05ec0 API Removed duplicated thirdparty deps
These were originally copied from node_modules via an "npm run thirdparty" task,
in order to have them loadable with oldschool <script> tags.
Since webpack supports CommonJS-style loading, that's no longer required,
we can simply inline those scripts into the bundle.

We need to use imports-loader though, in order to ensure
that "define" is not available in some module scopes,
which triggers AMD behavior that's not compatible with Webpack's loaders.
See http://webpack.github.io/docs/shimming-modules.html

I've had to pin to the exact versions used in the 3.x CMS,
since jquery-upload has introduced an AMD wrapper sometime
between 6.0 and 6.9 (the latest version NPM automatically pulls in).
This AMD wrapper confuses Webpack, since it's trying to resolve the
dependencies contained in it. We could create shims for those instead,
but the easiest way was to simply revert to the versions already used
before the Webpack migration (since the newer versions in node_modules
were never actually copied into thirdparty, they weren't used before).
2016-09-15 22:19:12 +12:00
Sam Minnee
2e577ddb1d API Use Webpack
The bundle is generated by running “webpack” directly - gulp is no
longer needed as an intermediary. The resulting config is a lot shorter,
although more configuration is pushed into lib.js.

Modules are shared between javascript files as global variables.
Although this global state pollution is a bit messy, I don’t think it’s
practically any worse than the previous state, and it highlights the
heavy coupling between the different packages we have in place.
Reducing the width of the coupling between the core javascript and
add-on modules would probably be a better way of dealing with this than
replacing global variables with some other kind of global state.

The web pack execution seems roughly twice as fast - if I clear out my
framework/client/dist/js folder, it takes 13.3s to rebuild. However,
it’s not rebuilding other files inside dist, only the bundle files.

CSS files are now included from javascript and incorporated into
bundle.css by the webpack. Although the style-loader is helpful in some
dev workflows (it allows live reload), it introduces a flash of
unstyled content which makes it inappropriate for production.

Instead ExtractTextPlugin is used to write all the aggregated CSS
into a single bundle.css file. A style-loader-based configuration could
be introduced for dev environments, if we make use of the webpack live
reloader in the future.

Note that the following features have been removed as they don't appear to be
necessary when using Webpack:
 - UMD module generation
 - thirdparty dist file copying

LeftAndMain.js deps: Without it, ssui.core.js gets loaded too late,
which leads e.g. to buttons being initialised without this added behaviour.
2016-09-15 22:19:05 +12:00
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
Paul Clarke
cfee2022ba Remove .show() as not compatible with Flex
Removed .show() as it uses display: block rather than display: flex
2016-09-02 16:41:26 +12:00
Paul Clarke
b9445511b7 Bootstrap GridField 2016-08-03 18:35:18 +12:00
Christopher Joe
d93d9bc3c4 Disable datepicker for disabled or readonly fields, they were still editable through the picker 2016-08-01 11:47:48 +12:00
Damian Mooyman
d15b19d208 Fix merge regressions in add-link fixes 2016-07-28 17:03:46 +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
Hamish Friedlander
1f8c2f781b Fix "Insert Link" dialog in HTMLEditorField. CSS still needs work. 2016-07-28 16:01:50 +12:00
Damian Mooyman
a809e80d01 API Convert CMS forms to bootstrap
NEW Add cms-forms microtheme to cater to bootstrap's needs.

Note that the old SS3 assets section is buggy as a result of this change.
2016-07-25 17:24:26 +12:00
Paul
f4037fe319 Swap out .Actions class for bootstrap .btn-toolbar (#5581)
* Swap out .Actions class for bootstrap .btn-toolbar

* Converted all south toolbars to use new toolbar component styles, content and preview styles for scrollbars adjusted where required
2016-05-27 13:39:10 +12:00
Simon Erkelens
20fac04637 RFC #5487 Remove Oembed in favor of embed/embed. (#5536) 2016-05-27 13:09:03 +12:00
Damian Mooyman
f88d708ee9 BUG Fix GridFieldAddExistingAutocompleter and GridFieldExportButton
Based on https://github.com/silverstripe/silverstripe-framework/pull/5426
Fixes #5267
2016-05-03 17:45:46 +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