Commit Graph

393 Commits

Author SHA1 Message Date
Damian Mooyman
6b5efb91fd Merge pull request #6434 from open-sausages/features/4.0/ui-button-refresh
Refresh CMS UI buttons to new flat style and bootstrap classes
2017-01-11 14:22:25 +13:00
Daniel Hensby
a996e20e79 Merge pull request #6450 from mikenz/page-to-sitetree
ENHANCEMENT: Use SiteTree instead of Page class in more places
2017-01-10 16:02:15 +00:00
Christopher Joe
8118448a9c Fix PHP linting issues 2017-01-10 11:34:50 +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
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
Mike Cochrane
0cf477d36e Use SiteTree instead of Page class in more places 2017-01-03 20:37:17 +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
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
Damian Mooyman
cc451d9ca4 BUG Fix crash when re-ordering pages (#6281)
Fixes #6273
2016-11-03 14:51:17 +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
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
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
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
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
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
Damian Mooyman
bfd9cb1aca Rename SS_ prefixed classes (#5974) 2016-09-09 18:43:05 +12:00
Damian Mooyman
8dd644d25d
API Namespace all classes
Namespace all templates
Move difflib and BBCodeParser2 to thirdparty
Remove deprecated API marked for removal in 4.0
2016-09-08 10:23:17 +12:00
Damian Mooyman
c9b6e9bac0
API Update template lookup to late resolution for performance reasons
API Update behaviour of form fields to use standard template lookup mechanism
API Support custom "type" parameter to template lookup
2016-09-06 12:54:03 +12:00
Daniel Hensby
1d1227cc9a
Merge branch '3' 2016-08-23 10:37:47 +01: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
Damian Mooyman
db34e011f3 Apply SilverStripe\Admin namespace 2016-08-17 11:12:22 +12:00
Damian Mooyman
6005a1c2b2 API Upgrade for silverstripe CMS namespace changes 2016-08-11 11:51:02 +12:00
Damian Mooyman
7de5b998e1 Merge 3.4 into 3 2016-08-05 19:12:25 +12:00
Damian Mooyman
ca754eb887 Merge 3.3 into 3.4
# Conflicts:
#	admin/javascript/lang/fa_IR.js
#	admin/javascript/lang/it.js
#	admin/javascript/lang/src/fa_IR.js
#	admin/javascript/lang/src/it.js
#	lang/cs.yml
#	lang/eo.yml
#	lang/fa_IR.yml
#	lang/fi.yml
#	lang/it.yml
#	lang/sk.yml
2016-08-05 16:48:26 +12:00
Daniel Hensby
af3412a4c2 Merge pull request #5340 from dnadesign/fixToGridFieldLoadingWrongCurrentPage
fix to grid field loading wrong current page id when using multiple tabs
2016-08-02 12:44:11 +01:00
Daniel Hensby
7391ba6229
Merge branch '3.4' into 3 2016-07-25 11:46:06 +01:00
Damian Mooyman
9c7c7f6aa9 BUG Fix regression in missing require_js from #4259 2016-07-25 17:50:56 +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
Damian Mooyman
20daf1f8e1
API Abstract ThemeManifest into ThemeList
BUG Fix Requirements not resolving $default theme
2016-07-21 12:11:25 +12:00
Daniel Hensby
ac17e12464
Merge pull request #3274 from colymba/custom-admin-url 2016-07-19 14:42:25 +01:00
Loz Calver
0a7e4cf7c3
Merge branch '3' 2016-07-15 16:01:48 +01:00
Hamish Friedlander
b8b4e98ac2 API Theme stacking 2016-07-15 16:29:25 +12:00
Damian Mooyman
d08ab6ac81
API Allow X-Frame-Options to be configured
Fixes #2970
2016-07-15 14:08:14 +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
26d46517ac
API Remove custom DBHTMLText::exists() custom behaviour
Fix merge regressions
2016-07-13 18:45:57 +12:00
Damian Mooyman
859acf571e API mute frontend debugging by default (#5777) 2016-07-07 10:22:24 +01:00
Damian Mooyman
af22a83166 API Apply Framework\Security namespace 2016-07-07 11:32:28 +12:00
Hamish Friedlander
80d4af6b6e
API Apply Framework\ORM Namespace to model 2016-06-29 10:02:32 +12:00