Commit Graph

640 Commits

Author SHA1 Message Date
Will Rossiter
56c2363909 Implement feedback fixes
Enhancement Fix ModelAdmin import form not POSTing to correct form
2017-01-10 11:05:58 +13:00
Paul Clarke
e893fc4c51 Enhancement improve secondary action colours
Enhancement add accessibility info to page number
Enhancement new font icons added, improve trash icon and increase icon size of close
Enhancement improve title of gridfield search trigger
Enhancement add title to button to open gridfield search and improve gridfield search styles
API Shortcode fails if no parent
API JQuery-UI classes removed
Enhancement centre actions tabs within dropup in more-actions
Enhancement fix IE input height issue and fix for safari of icons in buttons with hidden text (e.g. pagination)
Enhancement only show external link on hover
2017-01-10 10:55:34 +13:00
Will Rossiter
cb6ec11f1b Enhancement Implement import CSV icon and tidy up import forms
Enhancement Tidy up permission icons to new icon library
WIP The modal is a short term workaround until the UI is all react based but we wanted to do some cleanup prior to 4 release
API Remove ssui.button
Enhancement Update buttons to new flat bootstrap style
2017-01-10 10:49:15 +13:00
Lee Bradley
87fbd5f781 Fix for v4: Admin returns "Too many pages" for subpages below top level (#6464)
* Fix for v4: Admin returns "Too many pages" for subpages below top level

Simple logic error during porting to new version it appears

* V4: LeftAndMain::getSiteTreeFor() returning space & New line in link

The "Too many pages" "View as list" link had a return &
  tab characters in it

* V4: LeftAndMain::getSiteTreeFor() fixes link for list view

"Too many pages" link pointed to `?view=list` which is
  just normal hierarchy. Value had been updated to "listview"
  in #8c87ea6b
2017-01-09 12:45:03 +00:00
Paul Clarke
178bd480eb API Changes required for asset search behaviour 2017-01-09 14:55:20 +13:00
Damian Mooyman
9be5142fc1 API ChangeSet::publish() / canPublish() no longer treats hasChanges() = false as a permission error
BUG fix issues with doArchive() in live mode
2016-12-21 14:28:20 +13:00
Damian Mooyman
c2a1e86f5d Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
Damian Mooyman
6e589aac75
API Updates to Form, ValidationResponse, ValidationException
API Implement form schema "errors" handling
2016-12-09 14:24:11 +13:00
Damian Mooyman
2a25a525cb
ENHANCEMENT Move temporary JSON block into standard component 2016-12-08 13:31:11 +13:00
Will Rossiter
8d373046db Add OtherItemID as a schema param
History Form needs both an ItemID and a VersionID. Follows the same naming as $ID/$OtherID available in other controllers.
2016-12-06 14:05:28 +13:00
Daniel Hensby
1be2e70a2a
Merge branch '3' 2016-11-24 14:18:09 +00:00
Damian Mooyman
22cb3d0d74 Fix various ORM test issues 2016-11-23 19:25:12 +13:00
Daniel Hensby
f311ef4ca5 Merge pull request #6309 from Zauberfisch/modeladmin-showImportForm-2
Added $showSearchForm to ModelAdmin
2016-11-10 14:22:49 +00:00
zauberfisch
6697327a98 Added $showSearchForm to ModelAdmin 2016-11-10 13:50:44 +00:00
Daniel Hensby
bcc21c2403
Merge branch '3' 2016-11-10 01:09:35 +00:00
Daniel Hensby
955e02ab90
Merge branch '3.4' into 3 2016-11-08 17:03:10 +00:00
Martijn
1ec56a1202
Prevent undefined index notices 2016-11-07 15:09:35 +00:00
Daniel Hensby
27206c9240 Revert "Added $showSearchForm to ModelAdmin" 2016-11-07 13:42:47 +00:00
Damian Mooyman
cc451d9ca4 BUG Fix crash when re-ordering pages (#6281)
Fixes #6273
2016-11-03 14:51:17 +13:00
Chris Joe
82119888c1 Validation on server side for React forms (fixes #6205) 2016-10-28 16:13:29 +13:00
Damian Mooyman
d7ed308e17 BUG Fix minor html encoding issue in SecurityAdmin (#6240) 2016-10-28 15:22:21 +13:00
zauberfisch
c4aed0c081 Added $showSearchForm to ModelAdmin 2016-10-26 11:35:52 +00:00
Ingo Schommer
bed547fc86 Merge pull request #6206 from Chibby/master
Prevent undefined index notices
2016-10-26 09:06:35 +13:00
Damian Mooyman
316ac86036
API Writes to versioned dataobjects always writes to stage even when written on live
API Remove "Archive" actions
API "Delete" actions for pages now archives records
BUG Fix batch actions failing on certain controllers
Fixes #6059
2016-10-21 13:16:32 +13:00
Damian Mooyman
7cd32b7d72
Remove unnecessary $schemaLink parameter 2016-10-21 11:11:18 +13:00
Martijn
b0566b0cb8 Prevent undefined index notices 2016-10-20 14:04:15 +02:00
Ingo Schommer
1e478a5378 Consistently set 'id' in FormSchema
The URL to request the schema representation is the unique identifier.
We can't default to $request->getURL() since that's different for form submissions.

The schema.schema_url key is redundant, since the identifier is already contained on the top level 'id' key.
Keeping schema_url in a schema itself makes it less portable, particularly once we transition into
generic schemas which are not reliant on a particular record context (that's only contained in the schema_url)

This also fixes the issue of form schemas not refreshing after submit,
e.g. when form fields are added or removed.
2016-10-20 15:33:50 +13:00
Damian Mooyman
f60fe7d4a9
API Versioned::publishRecursive() now uses a ChangeSet
API Add IsInferred to inferred changesets
API Add SapphireTest::assertNotDOSContains
Fixes #5667
2016-10-13 17:38:08 +13:00
Daniel Hensby
369fde2a5b Merge pull request #6150 from open-sausages/pulls/4.0/fix-form-validation-persistence
BUG prevent form data / validation persisting in state when using form schema
2016-10-11 15:43:59 +01:00
Christopher Joe
5a5d62fa27 Fix profile layout 2016-10-11 15:50:35 +13:00
Christopher Joe
7acb3b5fc2 Fix selected view mode not reflected on button
Fix other ModelAdmin layout (test)
Fix fieldholder placement
2016-10-11 13:47:09 +13:00
Paul Clarke
a37bf87857 Replace Layout with flexbox CSS classes 2016-10-11 13:46:24 +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
Damian Mooyman
f130ebf9de Restore tab indentation to LeftAndMain.php 2016-10-07 13:24:48 +13:00
Steve Azzopardi
d7530ed22b Update css doc to spaces instead of tabs 2016-10-06 22:01:44 +02:00
Steve Azzopardi
2ec14cefcb Update yml formating for extra javascript & css 2016-10-06 20:03:00 +02:00
Damian Mooyman
82e72d062f BUG prevent form data / validation persisting in state when using form schema 2016-10-05 10:26:32 +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
Daniel Hensby
45736ef2db
Merge branch '3' 2016-10-03 12:00:20 +01:00
Daniel Hensby
5e9d16646d
Merge branch '3.4' into 3 2016-10-03 10:24:32 +01:00
Daniel Hensby
f2d3026e93
Merge pull request #3628 from JeremyRoundill/3.1 2016-09-30 17:16:47 +01:00
Damian Mooyman
cbe0ac8507 BUG Fix invalid import form requirements (#6071) 2016-09-23 16:13:09 +12:00
Sam Minnee
c52adad1fe FIX: Graceful degradation if obsolete classnames in ChangeSetItem (fixes #6065)
NEW: Add SilverStripe\ORM\UnexpectedDataException class.

This change provides more graceful handling of the case where a
ChangeSetItem is referencing a no-longer-existing class.

The new exception, SilverStripe\ORM\UnexpectedDataException, is
intended to be available for throwing whenever we have unexpected data
in the database.

It can be trapped by the relevant UIs and more graceful errors than
HTTP 500s can be provided.
2016-09-23 12:28:32 +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
Sam Minnee
93a0122c0f FIX: Don’t treat URLs as root relative when FRAMEWORK_DIR = “”
Code was assuming that FRAMEWORK_DIR would always have a value. If it
doesn’t (because you’re running a test instance of a naked framework)
This caused URLs to be treated as root relative, which creates some
duplicate-inclusion bugs.

The use of ltrim() works, but is a bit clumsy. A more flexible approach
to including front-end assets of given modules would be preferable;
ideally something that also let you keep your code outside of the
web root.
2016-09-16 16:16:39 +12:00
Ingo Schommer
8f23fa99a5 API Moved CMS-specific JavaScript to admin/thirdparty
The 'admin' module will be split off from 'framework',
where 'framework' only provides (mostly) frontend-agnostic PHP classes.
For example, HTMLEditorField.php has a TinyMCEConfig.php driver,
but doesn't come with its own JS includes.
2016-09-16 13:46:10 +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
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
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