Commit Graph

217 Commits

Author SHA1 Message Date
Christopher Joe
89150c48e7 Fix preview in pages section 2016-10-11 13:47:00 +13:00
Paul Clarke
8b02d9d68a Remove legacy classes for flexbox classes 2016-10-11 13:46:49 +13:00
Christopher Joe
0a0a990c54 Remove add wrapper element
Added 100% height to fill-width to fix some layout issues
2016-10-11 13:46:38 +13:00
Paul Clarke
eb7a8be3f8 Temp work in progress- to clean up 2016-10-11 13:46:38 +13:00
Paul Clarke
a37bf87857 Replace Layout with flexbox CSS classes 2016-10-11 13:46:24 +13:00
Paul Clarke
472e135602 Add Layout js back in as it contains preview JS 2016-10-11 13:46:24 +13:00
Paul Clarke
4a45793af9 Hide preview in other areas of the cms outside of pages 2016-10-11 13:46:24 +13:00
Paul Clarke
e7829eb974 Replace jLayout classes with flexbox CSS classes 2016-10-11 13:46:24 +13:00
Paul Clarke
1fd46ed36d Pages area: remove layout classes, replace with flexbox CSS classes 2016-10-11 13:46:24 +13:00
Paul Clarke
8dd56efe2e Add flex classes, remove layout classes 2016-10-11 13:45:08 +13:00
Paul Clarke
1b0839a8e8 Remove Layout 2016-10-11 13:45:08 +13:00
Damian Mooyman
27d35403e8 API Force formschema to be reloaded on form submission
BUG Fix missing action state
2016-10-07 13:26:57 +13:00
Christopher Joe
21dc238685 Fixed classes that weren't matching icon 2016-10-06 20:46:30 +13:00
Christopher Joe
e5b86457b4 Added react LookupField component
API MultiSelectField readonly transformation casts to LookupField instead of ReadonlyField
FIX removed jQuery dependency from i18n
2016-10-05 15:32:05 +13:00
Christopher Joe
287809ec3b Refactored react FormFields to use react-bootstrap FormControl components
Addded Checkbox, CheckboxSet and Optionset (radio) fields
Refactored documentation
2016-10-05 10:25:21 +13:00
Paul Clarke
3ac0eaaf62 Remove legacy styles 2016-09-30 15:45:12 +13:00
Paul Clarke
b794a40864 Group button icon styles 2016-09-30 15:44:17 +13:00
Paul Clarke
374ef6e0c3 Modal styles 2016-09-30 15:44:17 +13:00
Christopher Joe
963445e743 FIX tab link on top panel changes even when "cancel to browse" was selected 2016-09-30 14:57:15 +13:00
Daniel Hensby
74ecaded08
Merge branch '3' 2016-09-26 14:00:58 +01:00
Daniel Hensby
99f98e51d0
Merge branch '3' 2016-09-23 17:15:59 +01:00
Ingo Schommer
34dcda15ef Rebuild dist files 2016-09-22 14:48:00 +12:00
Sam Minnee
c24201b5f3 FIX: Break dist javascript and onto newlines.
This doesn’t have much impact on resulting JS size, but it will
hopefully make merge conflicts much less frequent.

The CSS growth is a little higher (6.5% increase in size) but is not
material.

If this materially reduces the number of merge conflicts we have, by
letting the git merge tools resolve some dist file mergers, I think it
would be worth it.

Some example changes in file size:

bundle.js 290K -> 301K
vendor.js 1,325K -> 1,321K
bundle.css 628K -> 669K
2016-09-22 14:38:17 +12:00
Paul Clarke
62dcb0d0c4 close panel icon moved up to align with title 2016-09-22 11:21:54 +12:00
Ingo Schommer
ca620c1c14 Merge pull request #6036 from open-sausages/pulls/4.0/fix-cms-buttons
BUG fix issue with popup menu appearing on the left
2016-09-22 09:17:20 +12:00
Damian Mooyman
ef88619d2f BUG Fix error in campaign area
Fix alignment of add campaign fields
2016-09-21 17:36:51 +12:00
Ingo Schommer
e1b827f7c8 Optimise webpack build time (#6049)
* Rename bundles (prep for webpack optimisation)

This might or might not reduce the overall repo size,
because git can combine similar chunks in the newly generated files

* Optimise webpack build time

Consolidates bundles, since a separation of bundle-framework.js vs. bundle-legacy.js
vs. bundle-lib.js no longer makes sense - they're all loaded upfront anyway,
since we'll be introducing more react-powered logic alongside the "legacy" JavaScript.

By consolidating into fewer bundles, we give the optimisation scripts (UglifyJS)
more options to reduce the overall file size.

The main motivation for a vendor.js is to shorten rebuild times:
Most active development is happening in files required through bundle.js.
This commit drastically reduces the rebuild time for those changes (15s to 4s).
2016-09-21 17:14:43 +12:00
Damian Mooyman
5a59c4f4b4 API Add bootstrap button row template
API Add bootstrap button template
BUG fix draft / published preview selector
2016-09-21 15:59:12 +12:00
Chris Joe
a85ba1222b Add helper-circle and block icons (#6035) 2016-09-21 15:15:59 +12:00
Chris Joe
51ef369630 FIX stringify api call body to work for IE10 (#6032)
* FIX stringify api call body to work for IE10

* Pull out functions defined in createEndpointFetcher
2016-09-21 14:45:30 +12:00
Paul
4d52d655fd Fix for spacing of sitetree panel, reportAdmin, and toggle on Member details page (#5955)
* Panel/tab-panel and alerts spacing, button padding consistency and alignment

* Reports panel spacing adjustments

* ReportAdmin panel and toolbar spacing

* Comment change

* Fix formatting help toggle link

* Use standard line-heights and padding for buttons

* Add base panel styles

* Update to .panel styles and .toolbar spacing

* Remove legacy styles, linting fixes

* Toolbar--content to have consistent styles throughout

* Add panel and toolbar styles to areas missing them

* Replace values with variables

* Layout overrides for tabs and panels with padding

* Adjust JQueryUI button spacing to match other UI buttons

* Remove custom ReportAdmin styles

Update values to variables and modify panel and tab-panel spacing

* Remove text color override

* Remove double (.m-t-1) spacing from campaign panel

* Profile page remove legacy JLayout

* Remove legacy spacing

* Removed Layout from page so !important not needed

* Improve use of variables

* Add missing closing bracket, minor linting fixes

* Linting fixes

* Remove css importants

* Add temp fix for file upload within gridfield

Tidy structure of css

* css build

* Spacing bug fixed for campaign list alert
2016-09-21 10:12:58 +12:00
Chris Joe
08a39f5f93 Update file edit form (#6024)
* Added Created field to File/Image editor

* switch default input value to null

Fix react errors and added a field description

* API Use new DBField::getSchemaValue()
2016-09-20 12:56:45 +12:00
Daniel Hensby
f65168ef8d
Merge branch '3' 2016-09-16 13:43:23 +01:00
Ingo Schommer
3d7c60f8cb Updated dist files 2016-09-16 13:46:11 +12:00
Ingo Schommer
8e5dd58c43 Removed unused dist files
Storing in fonts/, not font/fonts
2016-09-16 13:46:09 +12:00
Ingo Schommer
ee10dbb680 API Moved frontend assets into admin/ "module"
We've removed the ability to directly reference JS and CSS files
for form fields and other SilverStripe features in favour of a common bundle built by Webpack.

The logical next step is to make the framework module free of frontend dependencies,
which should simplify its operation, and avoid another time intensive "npm install" on a module.
2016-09-16 13:46:06 +12:00
Ingo Schommer
6be25f3b52 Entry point for UploadField_select.js
Used in iframe, so can't be rolled into other code.
Moved in admin/ since that's easier for now with Webpack entry points,
and we'll move all JS/CSS into admin/ anyway soon.
2016-09-16 13:44:14 +12:00
Ingo Schommer
25f4741142 Removed ModelAdmin/SecurityAdmin Webpack entry points
There's not a lot of benefit in packaging these separately in terms of initial CMS load size,
so let's simplify the setup. They'll eventually become lazy loaded chunks in a React-based setup
2016-09-16 13:44:12 +12:00
Ingo Schommer
5f7b13ee49 API Removed unused images across CMS UI
Many of these are now inline via Webpack's url-loader plugin (https://github.com/webpack/url-loader),
and a tonne were legacy references (e.g. leftovers from ComplexTableField).

Some of these might still be used in other modules like userforms,
but we're removing support for "hotlinking" images in core - they're not an API.
2016-09-15 22:19:10 +12:00
Sam Minnee
1b527fca3f FIX Webpack handles images & fonts.
Responsibility for finding and referencing images and fonts is now
given to webpack. All the url references are now relative to the
component scss file, and point to font & images files in src/, rather
than assuming someone else will place them in dist.

This makes the source more modular, and makes it easier to, for
example, inline images are data URIs, or create a new build script that
builds several modules for a project in a single pass.

Workaround for bad font path in bundle.css:
ExtactTextPlugin didn’t work as well with a subfolder reference in the
filename. This is just a short-term fix and could probably be improved
to put bundle.css back in the styles subfolder.

Webpack handles images & fonts:
Responsibility for finding and referencing images and fonts is now
given to webpack. All the url references are now relative to the
component scss file, and point to font & images files in src/, rather
than assuming someone else will place them in dist.

This makes the source more modular, and makes it easier to, for
example, inline images are data URIs, or create a new build script that
builds several modules for a project in a single pass.

Clarify docs on spriting and webfonts:
We've decided to remove sprity since it comes with hundreds of dependencies,
and needs compilation within the "npm install" - dragging out the already overweight
install process, and making the resulting node_modules/ folder less portable between systems.
2016-09-15 22:19:09 +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
Paul Clarke
440a3073fe improve class naming to be more generic 2016-09-14 15:09:45 +12:00
Ingo Schommer
294644ce1a Updated dist files 2016-09-14 14:12:04 +12:00
Paul
955d75b219 Insert media into TinyMCE modal, styling fixes and improvements (#5967)
* Remove interference of nested for__fieldgroup-item

* Adjust position of dropdown field

* Remove divider lines, adjust position of upload area

Clean up styles a bit too

* Adjust position of image

* Mostly css tidy up, added use of a few variables

* Toggle arrow was showing other icon because of icon height

* All buttons in toolbars remove margin below, adjust button link color

* Reorder sort and filter, add toolbar styles

* Add button styles to toolbar

* Remove some of the linting issues

* Added new panel variables

* Simplify variable

* Replace panel variable, insert media dialog positioning

* Update with new variable name, reduce space below toolbar

* Build

* Uploading file spacing, toolbar styles added

* Visual uploads, error upload fixes, edit details panel spacing

* Add toolbar to upload modal

* build

* Build

* increase width of pagination on gridfield

* Add height to uploading items only

* Build

* Added class back for beat test to pass
2016-09-14 13:48:33 +12:00
Damian Mooyman
9b1c24cf4c API Move preview panel to CMS module
BUG Fix preview area flashing on section navigation
Fix source file issue
2016-09-13 13:20:17 +12:00
Ingo Schommer
7bc6f3ee9f Enforce JS var declaration with value (#5993)
This caught us out recently where code did a strict type check for `myVar === undefined`.
The var was defined as `let myVar;`, without a value - so the check returned false (it's `null`).
To avoid this situation, we've decided to enforce declarations with values.
Note that preference should be given to single, immutable assignments via const where possible.

See http://eslint.org/docs/rules/init-declarations
2016-09-13 11:02:15 +12:00
Ingo Schommer
65718770d6 Update to React v15.0 2016-09-06 21:39:20 +12:00
Ingo Schommer
57d885f406 Updated dist files 2016-09-06 20:40:20 +12:00
Damian Mooyman
1eb4e70201 Merge pull request #5945 from open-sausages/pulls/4.0/insert-link
Insert link styling adjustments incl. minor text updates
2016-09-05 15:56:23 +12:00
Ingo Schommer
6d0d46b06b Merge pull request #5946 from robbieaverill/bugfix/5936-show-formatting-help
FIX Show formatting help toggle link
2016-09-05 12:10:57 +12:00
Robbie Averill
cbdf3eb725 FIX Show formatting help toggle link
* Fixes #5936
2016-09-05 11:59:14 +12:00
Paul Clarke
f2637fc059 Remove additional divider lines, adjust padding 2016-09-02 16:50:52 +12:00
Ingo Schommer
ecaed8c08d Fixed icon regression in <Breadcrumb> 2016-09-01 14:07:02 +12:00
Ingo Schommer
56b249eb23 Field values in FormBuilder action handling
Allows actions to make decisions based on the form payload.
For example, a "delete" button can pass the currently edited record ID to its API endpoint.
2016-09-01 07:55:56 +12:00
Ingo Schommer
fa5e6bbd69 Fixed breadcrumb icon spacing
Regression from https://github.com/silverstripe/silverstripe-framework/issues/5917
2016-08-31 22:31:39 +12:00
Christopher Joe
c1c20aaafc Breadcrumbs with new icons generated 2016-08-30 14:46:59 +12:00
Christopher Joe
b509f9199d Fix Modal response positioning 2016-08-29 10:50:17 +12:00
Ingo Schommer
564ddfa602 Apply .field class to <FieldHolder> react component
It keeps styling consistent between Entwine sections (generated by FieldHolder.ss)
and React sections (generated by <FieldHolder> component).
2016-08-28 13:31:17 +12:00
Ingo Schommer
a0d4e363c2 Moved <select> styles to generic _forms.scss
Form element styles should be consistent throughout the CMS.
While we still have the ability to create dropdowns (<select>) which aren't based on
Entwine/HTML rather than new components like <SingleSelectField>,
we need to ensure those are rendered the same.

By default, the Entwine-based CMS sections will transform <select>
into a ChosenJS control, but you can still apply .no-chosen.
Hence there's a need for correct height both in React and Entwine sections,
not just in a React component.
2016-08-28 13:30:18 +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
Paul Clarke
b01de98b04 Remove padding override but adjust contents to suit container padding
Remove spacing to the right of icon as there is no btn label
2016-08-28 13:07:31 +12:00
Ingo Schommer
5c2e8d1299 Fix form attr merging order 2016-08-28 13:07:31 +12:00
Christopher Joe
b9624994ac AddToCampaign save message, Submitting indicator on FormAction button 2016-08-28 13:07:31 +12:00
Christopher Joe
fb64e27960 Cleanup API for better form schema support 2016-08-28 13:07:30 +12:00
Damian Mooyman
59efd280ad Fix issues with CMS permission codes
Standardise template locations
Move CMSSettingsController class to SiteConfig module
Fix CMSMenu behaviour for namespaced admin sections
Split classes into one per file
Manual fixes and cleanup
2016-08-17 11:19:14 +12:00
Christopher Joe
8a5f8fbc2d Created FieldHolder HOC for TextField and HtmlReadonlyField 2016-08-16 16:53:17 +12:00
Christopher Joe
0363351ee5 Add React HtmlReadonlyField and fixed TextField id 2016-08-16 11:10:44 +12:00
Christopher Joe
a68ba38478 Improve FormBuilder API and added HeaderField and LiteralField 2016-08-16 11:09:19 +12:00
Daniel Hensby
988af4582d Merge pull request #5862 from silverstripe-terraformers/fixes/batch-actions-checkboxes
Fix batch action permissions not applied to new nodes loaded
2016-08-11 14:26:27 +01:00
Damian Mooyman
6005a1c2b2 API Upgrade for silverstripe CMS namespace changes 2016-08-11 11:51:02 +12:00
Christopher Joe
7448fb7bae Fix batch action permissions not applied to new nodes loaded 2016-08-11 11:41:07 +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
Daniel Hensby
d42826e2ba Merge pull request #5851 from open-sausages/pulls/4.0/fix-hash-navigation
BUG Fix hash link navigation in CMS
2016-07-29 11:26:07 +01:00
Damian Mooyman
06ae50e4f5
BUG Fix hash link navigation in CMS 2016-07-29 15:58:23 +12:00
Oly Su
89508a8f19 Tidy up history panel 2016-07-29 15:54:00 +12:00
Paul
e2826927a7 Adjust width of select dropdown (#5850) 2016-07-29 10:48:12 +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
Oly Su
2805baecd3 Added missing bootstrap form messages
Align top of selection-group and label
Fix styles for overly nested composite fields
Step label added and new templates for forms
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
Daniel Hensby
c7767b0e5b Merge pull request #5812 from silverstripe-terraformers/fixes/cms-action-spinner
Moved spinner to right so it does not overlap text
2016-07-19 15:34:44 +01:00
Daniel Hensby
ac17e12464
Merge pull request #3274 from colymba/custom-admin-url 2016-07-19 14:42:25 +01:00
Oly Su
059d03bb37 Moved spinner to right so it does not overlap text 2016-07-19 13:57:08 +12:00
Daniel Hensby
a8c0c0fc6a
Merge pull request #3614 from chillu/pulls/switch-states 2016-07-17 12:39:20 +01:00
Loz Calver
0a7e4cf7c3
Merge branch '3' 2016-07-15 16:01:48 +01: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
Damian Mooyman
68a9b45a9a Build dist client files 2016-07-13 14:43:07 +12:00
Damian Mooyman
d54f4dc9c6 Convert tabs to spaces in legacy script files 2016-07-13 14:33:19 +12:00
Damian Mooyman
859acf571e API mute frontend debugging by default (#5777) 2016-07-07 10:22:24 +01:00
Christopher Joe
b8d634166f remove adding "original classes" 2016-07-06 21:44:11 +12:00
Damian Mooyman
80e5b9149e
API Move dependency on model class from form schema API
API Refactor hard-coded dataobject class references from CampaignAdmin
Fixes #5730
2016-06-23 11:04:42 +12:00
David Craig
83308689d5 API Initialise React controllers via routes (#5436) 2016-06-16 15:04:14 +12:00
Paul Clarke
b3a96e7e3d minor linting fix 2016-06-07 12:45:38 +12:00
Paul Clarke
5e634c2a16 Update Form component to just Form
Convert form and Textfield  styles to use Bootstrap
Split out btn styles a bit more clearly defined (BEM)
Toolbar modifier to improve spacing for smaller screens
Use bootstrap spacer styles .m-t-1 (margin-top-1 x spacer) instead of custom spacer
Added a few typography helpers
Tab styles continued although they are hidden (used on AssetAdmin editor panel)
2016-06-03 15:52:31 +12:00
Chris Joe
b4c5c71a0b ActionTabSet, Change position absolute to bottom instead of top (#5602)
* change position absolute to bottom instead of top

* Fixed bottom position to 100% to uncover the tabset title
2016-05-31 09:48:59 +01:00