Damian Mooyman
4ca3d1dc94
API Allow custom 'type' option for scripts
...
Fixes #5829
2016-08-02 18:49:13 +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
f548ddf8a8
Merge branch '3'
2016-07-20 21:44:47 +01:00
Daniel Hensby
9282662293
Fixing bad syntax from PR
2016-07-15 17:00:33 +01:00
Daniel Hensby
51e02e2ed7
Merge remote-tracking branch 'tony/patch-1' into 3
2016-07-15 16:58:48 +01:00
Hamish Friedlander
b8b4e98ac2
API Theme stacking
2016-07-15 16:29:25 +12:00
Florian Thoma
9fc51dc527
add async and defer attributes to js requirements, replaces #4555
2016-07-08 14:31:39 +10:00
Cristian Torres
2f84c3431b
UPDATE: Throw exceptions on file missing
...
The class will throw exceptions whenever the css or js file is not found in any context and the site is in development mode
2016-05-18 16:47:38 -06:00
Daniel Hensby
0594542e7f
Merge branch '3'
2016-05-12 16:42:48 +01:00
Damian Mooyman
7041c5945c
API Enable requirements to persist between flushes
2016-05-12 12:46:30 +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
Damian Mooyman
0bd62735bc
BUG Fix issue with Requirements mangling custom scripts ( #5337 )
...
API Remove deprecated $template parameter from Requirements::includeInHTML
2016-04-19 17:20:30 +12:00
Cristian Torres
d75de1369f
themedScript Added
...
A function to call javascript files just by its name as it occurs with themedCSS
2016-04-02 11:20:27 -06:00
David Craig
2140025c20
Implement RFC-7 JavaScript module loader
...
- Adds ES6 support via Babel
- Transforms existing JavaScript to UMD modules
- Adds module bundling via Browserify
- Existing JavaScript converted to UMD modules
- lib.js and leftandmain.js are bundled using browserify
- JavaScript minifying of bundles handed by gulp
2016-01-26 11:39:20 +13:00
assertchris
c66f973fce
Replaced obsolete mime types
2016-01-24 18:15:47 +13:00
Damian Mooyman
e6b877df27
Merge remote-tracking branch 'origin/3'
...
# Conflicts:
# control/Director.php
# control/HTTP.php
# core/startup/ParameterConfirmationToken.php
# docs/en/00_Getting_Started/01_Installation/05_Common_Problems.md
# docs/en/00_Getting_Started/04_Directory_Structure.md
# docs/en/00_Getting_Started/05_Coding_Conventions.md
# docs/en/01_Tutorials/01_Building_A_Basic_Site.md
# docs/en/01_Tutorials/02_Extending_A_Basic_Site.md
# docs/en/01_Tutorials/03_Forms.md
# docs/en/01_Tutorials/04_Site_Search.md
# docs/en/01_Tutorials/05_Dataobject_Relationship_Management.md
# docs/en/02_Developer_Guides/12_Search/01_Searchcontext.md
# docs/en/02_Developer_Guides/13_i18n/index.md
# docs/en/02_Developer_Guides/15_Customising_the_Admin_Interface/06_Javascript_Development.md
# docs/en/03_Upgrading/index.md
# docs/en/changelogs/index.md
# docs/en/howto/customize-cms-menu.md
# docs/en/howto/navigation-menu.md
# docs/en/index.md
# docs/en/installation/index.md
# docs/en/installation/windows-manual-iis-6.md
# docs/en/misc/contributing/code.md
# docs/en/misc/contributing/issues.md
# docs/en/misc/module-release-process.md
# docs/en/reference/dataobject.md
# docs/en/reference/execution-pipeline.md
# docs/en/reference/grid-field.md
# docs/en/reference/modeladmin.md
# docs/en/reference/rssfeed.md
# docs/en/reference/templates.md
# docs/en/topics/commandline.md
# docs/en/topics/debugging.md
# docs/en/topics/email.md
# docs/en/topics/forms.md
# docs/en/topics/index.md
# docs/en/topics/module-development.md
# docs/en/topics/modules.md
# docs/en/topics/page-type-templates.md
# docs/en/topics/page-types.md
# docs/en/topics/search.md
# docs/en/topics/testing/index.md
# docs/en/topics/testing/testing-guide-troubleshooting.md
# docs/en/topics/theme-development.md
# docs/en/tutorials/1-building-a-basic-site.md
# docs/en/tutorials/2-extending-a-basic-site.md
# docs/en/tutorials/3-forms.md
# docs/en/tutorials/4-site-search.md
# docs/en/tutorials/5-dataobject-relationship-management.md
# docs/en/tutorials/building-a-basic-site.md
# docs/en/tutorials/dataobject-relationship-management.md
# docs/en/tutorials/extending-a-basic-site.md
# docs/en/tutorials/forms.md
# docs/en/tutorials/index.md
# docs/en/tutorials/site-search.md
# main.php
# model/SQLQuery.php
# security/ChangePasswordForm.php
# security/MemberLoginForm.php
# tests/control/ControllerTest.php
# tests/core/startup/ParameterConfirmationTokenTest.php
# tests/model/SQLQueryTest.php
# tests/security/SecurityTest.php
# tests/view/SSViewerTest.php
# view/SSTemplateParser.php
# view/SSTemplateParser.php.inc
# view/SSViewer.php
2016-01-20 13:16:27 +13:00
Damian Mooyman
8e1ae55ff6
API Enable single javascript files to declare that they include other files
2016-01-15 09:49:28 +13:00
Sam Minnee
3ee8f505b7
MINORE: Remove training whitespace.
...
The main benefit of this is so that authors who make use of
.editorconfig don't end up with whitespace changes in their PRs.
Spaces vs. tabs has been left alone, although that could do with a
tidy-up in SS4 after the switch to PSR-1/2.
The command used was this:
for match in '*.ss' '*.css' '*.scss' '*.html' '*.yml' '*.php' '*.js' '*.csv' '*.inc' '*.php5'; do
find . -path ./thirdparty -not -prune -o -path ./admin/thirdparty -not -prune -o -type f -name "$match" -exec sed -E -i '' 's/[[:space:]]+$//' {} \+
find . -path ./thirdparty -not -prune -o -path ./admin/thirdparty -not -prune -o -type f -name "$match" | xargs perl -pi -e 's/ +$//'
done
2016-01-07 10:15:54 +13:00
Jacob Buck
b6627a2f7c
BUG Change Requirements::include_in_response() to not add empty
...
'X-Include-JS' or 'X-Include-CSS' headers.
2015-12-22 13:58:07 +13:00
Damian Mooyman
c13b5d989f
API Enable advanced configuration options for requirements combined files
...
API Enable relative root paths for the default Flysystem AssetAdapter
2015-12-01 11:07:13 +13:00
Damian Mooyman
ce28259c5f
API Replace CacheGeneratedAssetHandler with FlysystemGeneratedAssetHandler
...
API Reduce GeneratedAssetHandler API
API Re-introduce Requirements::delete_all_combined_files();
API Re-introduce Requirements::flush()
API Combined files now uses new filenames distinguished by sha1 of sources
2015-11-26 16:12:05 +13:00
Damian Mooyman
d1ea74e40d
API Implement AssetField to edit DBFile fields
2015-10-23 16:57:44 +13:00
Damian Mooyman
e17a49f8a5
API Restore JS Minification
...
BUG Fix incorrect cache on CacheGeneratedAssetHandler
2015-10-23 14:14:38 +13:00
Damian Mooyman
f9892c628c
API Generated files API
...
API Refactor Requirements_Backend to use new APL
2015-10-23 10:07:48 +13:00
Peter Thaleikis
ffb25bd689
codestyle changes
2015-07-27 22:31:18 +12:00
Damian Mooyman
b195132407
Fix missing media parameter on Requirements::combine_files
...
Regression from #4136
2015-05-11 17:30:59 +12:00
Nik Rolls
8727f27f2a
Documentation tidy for Requirements.php
...
Documentation-only changes, except where a couple of methods have been moved to live next to other related functions.
2015-04-29 20:17:40 +12:00
Will Morgan
7c9810bf49
Merge pull request #3432 from IgorNadj/3.1-fix-minify
...
FIX making minify javascript fail-safe
2015-02-06 11:17:59 +00:00
Igor Nadj
657606e8c8
Updating code to allow unit test to use try-catch block to catch warning
...
without stopping code execution inside try
2014-11-26 15:27:54 +13:00
Juri Demeschew
19f11e72b0
Update Requirements.php
...
Makes requirements inclusion work with old PCRE versions
2014-10-31 15:41:58 +01:00
Juri Demeschew
3eabd7d41a
Fix #3356 js not properly included
2014-09-09 06:59:31 +02:00
Igor Nadj
f823831a63
FIX making minify javascript fail-safe
2014-08-25 11:49:38 +12:00
Sean Harvey
2b316e79e5
NEW Provide a consistent way of triggering flush
...
Provides an interface for classes to implement their own flush()
functionality. This function gets called early in a request on
all implementations of Flushable when flush=1|all is requested in the
URL.
This fix came out of an issue where Requirements combined files were not
being cleaned up after dev/build?flush=1, due to the fact that flush
would only occur when you called it while on a page that used those
combined files, but not in any other contexts. This will now call flush
on any implementors of Flushable regardless of the context of where
flush was called.
2014-08-22 09:24:27 +12:00
Ingo Schommer
78a530524b
Merge pull request #2684 from Firesphere/feature/force_write_js_to_bottom
...
NEW Forcefully write javascripts to the end of the HTML if wished
2013-12-19 09:21:06 -08:00
Firesphere
af7afbe918
IMPROVEMENT/FEATURE Forcefully write javascripts to the end of the HTML if wanted.
...
It's defaulted to false. But when set to true, the JS is written to the end of the HTML, even though there are earlier scripts.
This results in faster page-loading if the JS isn't needed earlier-on.
2013-12-14 14:04:03 +01:00
Ryan Wachtl
b260e5e29c
FIX Check for file in project() folder when calling Requirements::themedCSS() #2613
...
Allows overriding of theme and module css files by looking in project() folder first. Consistent with documented behavior.
2013-12-13 11:12:22 -06:00
Firesphere
41371fea72
NEW Force the javascripts to be put before the closing body tag
2013-12-07 15:47:31 +01:00
Firesphere
14447b167a
IMPROVEMENT/FEATURE Forcefully write javascripts to the end of the HTML if wanted.
...
It's defaulted to false. But when set to true, the JS is written to the end of the HTML, even though there are earlier scripts.
This results in faster page-loading if the JS isn't needed earlier-on.
2013-12-07 15:47:27 +01:00
Ingo Schommer
2c145cd454
API JS i18n files with short locale names, generated by build task
...
The files are uploaded to transifex.com now, which means we needed
to consolidate the file names (= locales). Since Transifex doesn't allow
arbitrary JavaScript structures, we're using an intermediary JSON
format which gets transformed into the JS used by the framework.
See b59f3858af
for generator logic.
Fixes https://github.com/silverstripe/silverstripe-framework/issues/2499
2013-10-25 12:05:46 +02:00
Jeremy Thomerson
4c0b452c0f
ENHANCEMENT: allow overridable JS/CSS minification
...
This allows someone to extends Requirements_Backend and plug in their own minification
of files, including CSS minification. It also allows them to override whether or not
the header comment is written for each file.
2013-06-04 12:52:11 +00:00
Ingo Schommer
cef955c8b9
Removed stray ampersand in Requirements ( fixes #1809 )
...
Only happens with suffix_requirements=true
2013-04-30 00:35:25 +02:00
Ingo Schommer
3334eafcb1
API Marked statics private, use Config API instead ( #8317 )
...
See "Static configuration properties are now immutable, you must use Config API." in the 3.1 change log for details.
2013-03-24 17:20:53 +01:00
g4b0
2f16951634
BUG: ampersand escaping
2013-03-11 09:58:14 +01:00
Ingo Schommer
b44720179c
Merge pull request #1180 from mateusz/css-combining-media
...
API Add possibility to combine media-targeting stylesheets.
2013-02-12 14:13:45 -08:00
Mateusz Uzdowski
53feb3a5ae
API Add possibility to combine media-targeting stylesheets.
2013-02-13 11:04:05 +13:00
Ingo Schommer
14a56c18e9
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
control/Director.php
2013-02-07 21:45:16 +01:00
Ingo Schommer
b381e9933d
Include "media" attr for module customCSS() ( fixes #8219 )
2013-02-01 10:23:16 +01:00
Ingo Schommer
5f8115f4c7
BUGFIX Hard fallback to en_US.js in Requirements
...
Ideally we'll have region-less locales like en.js as fallbacks,
but for now this prevents the UI becoming non-operational
e.g. when both i18n::set_locale() and i18n::default_locale()
are set to 'en_NZ'.
2013-01-09 22:31:19 +01:00
Ingo Schommer
618a3d0314
Requirements acces to files with query strings ( fixes #7735 )
...
Originally authored by florian.thoma, tests added
by Ingo Schommer. Also removed query params from
file paths before calling mtime() on it.
See https://github.com/silverstripe/sapphire/pull/1023
2012-12-18 01:01:19 +01:00
Matt Lewis
af6eccea96
Fixing typo in Requirements allowing access to files requested with query strings
2012-12-18 00:53:54 +01:00