Commit Graph

17057 Commits

Author SHA1 Message Date
Ingo Schommer
54aad839c4 Clarified <% include %> use in SS4 (see #5952) 2016-09-22 11:29:32 +12:00
Ingo Schommer
a96edf4477 Merge pull request #6054 from open-sausages/pulls/4.0/asset-tidy
A mix of minor tidy up with AssetAdmin
2016-09-22 11:22:31 +12:00
Paul Clarke
62dcb0d0c4 close panel icon moved up to align with title 2016-09-22 11:21:54 +12:00
Paul Clarke
3d774a02cb Chosen no longer nested within .field 2016-09-22 11:20:29 +12:00
Paul Clarke
ab4592a84a adjust max width of file to expand over max allowable width if thin 2016-09-22 11:20:28 +12:00
Paul Clarke
119d46b734 Update folder icon 2016-09-22 11:20:28 +12:00
Paul Clarke
3f06d4f327 style dimensions 2016-09-22 11:20:28 +12:00
Ingo Schommer
c36d947faa Merge pull request #6050 from open-sausages/pulls/4.0/highlighted-file-tweak
API Move PreviewLink logic into File dataobject
2016-09-22 10:42:04 +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
Ingo Schommer
c309632b72 Merge pull request #6031 from open-sausages/pulls/4.0/fix-campaign-admin
BUG Fix error in campaign area
2016-09-22 09:14:30 +12:00
Christopher Joe
ea50e30079 API Move PreviewLink logic into File dataobject 2016-09-21 17:37:35 +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
Ingo Schommer
183b3915d3 Merge pull request #6045 from sminnee/fix-pr-builds
FIX: Make PR builds work.
2016-09-21 13:22:09 +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
Sam Minnee
2e054af7b1 FIX: Throw more helpful error if tests are run badly.
If you run tests outside of a composer autoloader-based environment, or
your autoloader isn’t pulling in Constants.php, everything will break.

This provides a more helpful error message.
2016-09-21 09:43:14 +12:00
Sam Minnee
3ea23ce2b7 FIX: Make PR builds work.
PR builds are consistently failing because the version of framework
being used cannot be inferred. This environment variable provides the
answer.

It will need to be fixed for each major release, but I think that’s
less maintenance burden than complicating the build script to read this
from composer.json:extra.branch-alias.dev-master.
2016-09-21 09:26:29 +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
Ingo Schommer
f9581438b5 Merge pull request #6016 from sminnee/travis-lint
NEW: Run JS/CSS linting in Travis.
2016-09-18 16:27:00 +12:00
Ingo Schommer
a0c0a4ae4f Updated docs with sass-lint references 2016-09-18 16:25:16 +12:00
Ingo Schommer
96892636c7 Removed CodeClimate badge 2016-09-18 16:25:08 +12:00
Ingo Schommer
8217109890 Added sass-lint to shrinkwrap file 2016-09-18 16:25:01 +12:00
Sam Minnee
b19475d748 NEW: Ignore npm-shrinkwrap for greenskeeper-provided PRs. 2016-09-18 14:52:00 +12:00
Sam Minnee
b61c5a56de FIX: sass-lint styleguide fixes 2016-09-18 14:50:27 +12:00
Sam Minnee
c2ebff5c19 NEW: Use sass-lint over scss-lint
SCSS linting now uses the node-based sass-lint tool, since we’re
shifting away from CodeClimate.

This has the benefit of not requiring a ruby gem on dev tools -
everything is provided as npm dev dependencies.

This was also necessary to run the linting inside travis.
2016-09-18 14:50:27 +12:00
Sam Minnee
f700d86557 NEW: Run JS/CSS linting in Travis.
The ‘npm run lint’ command will be used to run listing on Travis, which
can also be used on local dev environments. These can also be used with
editor plugins to highlight errors immediately.

The intention is that this can be used in place of codeclimate. The
benefits are that we use a single toolchain in both CI and local dev,
which is not entirely the case at the moment.

Note the sass-lint is provided by “sudo gem install scss_lint”. It’s
possible that we can move to a node-based sass-lint; I can’t recall
what the motivation for using the scss_lint gem was - I think it was
mainly that we had the AirBNB styleguide already implemented as a linter
config.
2016-09-18 14:49:08 +12:00
Daniel Hensby
6f28ac5365 Merge pull request #5986 from sminnee/simpler-test-run
Simpler test run
2016-09-17 08:10:46 +01:00
Sam Minnee
07396e4437 NEW: Move Travis behat test to run locally.
This shifts the behat test run to be triggered form composer activity
within the framework module directly,

 * silverstripe/serve is used to provide a webserver, based on the
   php -S command
 * se/selenium-server-standalone is used to install selenium rather than
   a download command

Because we’re using serve, the behat configuration can be locked down.

Further refinements could be made on this:

 * the behat-extension could be responsible for installing and
   starting/stopping selenium, making these tests more portable
 * xvfb initialisation could be provided with another bin tool in the
   begat-extension: vendor/bin/xvfb 1024x768
 * The bootstrap-file argument to serve could be provided as part of a
   composer.json setting. This would make it easier for developers to
   start a dev server simply by running vendor/bin/serve
 * the behat-extension could be responsible for installing and
   starting/stopping silverstripe/serve, removing the need for
   specifying base_url at all, and possibly utilising the same bootstrap
   file between serve and behat.
2016-09-17 15:40:37 +12:00
Sam Minnee
96126323d2 NEW: themedCSS() and themedJavascript() work with any file layout.
themedCSS() and themedJavascript() files have previously been hardcoded
to reside in the css/ or javascript/ folder directly beneath the theme
path.

This short-cut still works, but you can also specify the theme-relative
path in its entirely, giving you more flexibility about your resource
layout.
2016-09-17 15:40:37 +12:00
Sam Minnee
61d7c3af28 FIX: Fix tests when running directly from framework. 2016-09-17 15:40:32 +12:00
Daniel Hensby
c8fdc7b180
Merge branch '3' 2016-09-16 14:31:10 +01:00
Daniel Hensby
cb2352548d
Merge branch '3.4' into 3 2016-09-16 14:22:31 +01:00
Daniel Hensby
71cc5d83e6
Revert "Merge remote-tracking branch '3Dgoo/patch-1' into 3.4"
This reverts commit e617042422, reversing
changes made to 995d07756d.
2016-09-16 14:21:16 +01:00
Daniel Hensby
f65168ef8d
Merge branch '3' 2016-09-16 13:43:23 +01:00
Daniel Hensby
beeed8155a
Merge branch '3.4' into 3 2016-09-16 11:56:01 +01:00
Daniel Hensby
e617042422
Merge remote-tracking branch '3Dgoo/patch-1' into 3.4 2016-09-16 11:50:24 +01:00
Dmitry Kudryavtsev
78276e5397 corrupt YML in italian translation (#5997) 2016-09-16 17:25:02 +12:00
Sam Minnee
9dd5ebee8c NEW: Don’t set up SilverStripe project for test run
The SilverStripe project structure complicates the travis test run, and
the goal of this branch is to prevent it from being necessary.

 - Unit tests can be run simply with PHPUnit.
 - Behat test can be run with the silverstripe/serve module

Note that initially this commit doesn’t cater to the behat tests.

As part of this, we allow dev packages to be installed when testing

These settings don’t affect projects that use framework, only when
framework’s composer install / require calls are used themselves.

Since SS4 is pre-stable, these are important. They can probably be
removed once SS4 stable (and stable versions of support packages) have
been released.
2016-09-16 16:16:44 +12:00
Sam Minnee
6b640f81f2 FIX: Don’t double-include composer autoloader
If another file is include main.php and has included composer already,
code might get weird. In particular, if the parent context includes a
different vendor/autoload.php than the one main.php expects.
2016-09-16 16:16: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
Sam Minnee
cebcf7fb8c NEW: More flexible theme resolution for framework and cms.
using ‘silverstripe/framework’ or ‘silverstripe/cms’ will resolve the
right path even if these folders are in the project root.

‘vendor/module:/sub/path’ theme references are also supported so that
the admin sub-theme can be accessed.
2016-09-16 14:36:08 +12:00
Sam Minnee
6b847d3614 NEW: Allow project root to be treated as a module.
If the _config folder exists as a top-level directory, treat the project
root as a module too. This is useful, e.g. when initialisation a
SilverStripe environment within a module.

This is only a first cut. Modules in the vendor directory are excluded.
Most likely, we will need to search the vendor folder for modules with
type = silverstripe-module in their composer.json.
2016-09-16 14:36:08 +12:00
Sam Minnee
ab7e5944d1 API: Derive BASE_PATH from composer autoloader
The location of composer’s vendor/autoload_real.php file is a good
indicator of the root of a project, and can be used to derive a
BASE_PATH

This gives us more flexibility about where the framework module is
installed relative to a project root. It also lets us use the framework
module as a project root, e.g. in test runs.

THIRDPARTY_PATH and ADMIN_PATH are calculated relative to this, and
the FRAMEWORK_DIR, THIRDPARTY_DIR, and ADMIN_DIR are relative to the
BASE_PATH.
2016-09-16 14:36:08 +12:00
Sam Minnée
a1c9de3c91 Merge pull request #5918 from sminnee/webpack
Replace browserify/gulp with Webpack
2016-09-16 14:31:17 +12:00
Ingo Schommer
3d7c60f8cb Updated dist files 2016-09-16 13:46:11 +12:00
Ingo Schommer
556667c4ea Removed unused "npm run sanity"
We're no longer copying JS sources around,
hence there's no need for this task.
2016-09-16 13:46:11 +12:00
Ingo Schommer
30174db459 FIx i18n JS regression about locale selection
When rewriting the i18n.js file from ES5 to ES6, the detectLocale()
call in the constructor was missed - meaning the lang files were loaded by the browser,
but never actually used.
2016-09-16 13:46:11 +12:00