Commit Graph

31 Commits

Author SHA1 Message Date
Ingo Schommer
34d40bed5f Add ESLint support
See https://github.com/silverstripe/silverstripe-framework/pull/5108
2016-04-06 10:43:33 +12:00
scott1702
6aa22c38ed Convert react grid-field from flexbox to table-based 2016-04-06 08:49:47 +12:00
Ingo Schommer
d27e3c2d34 Delete campaign feature 2016-04-06 08:49:47 +12:00
Ingo Schommer
0675f85d32 Use /index suffix for JS import statements
Otherwise browserify or gulp-sourcemaps doesn't include these
in the *.map file, which makes debugging impossible
2016-04-06 08:49:47 +12:00
scott1702
d1e4c563ce Move ActionComponent into FormActionComponent 2016-04-06 08:41:11 +12:00
Ingo Schommer
2a5c92e491 Generic state management for React GridField
Renaming state operations from 'campaign' to 'record'.
Implemented API endpoint retrieval of GridField data.

Added more mock data into CampaignAdmin (rather than hardcoding in client),
to be replaced by CampaignAdmin API endpoint querying the real datamodel.

Using more native isomorphic-fetch instead of jQuery.ajax
to minimise dependencies and get into a more forward-thinking API.

Also catching errors in ReactJS API backend:
Emulate jQuery.ajax() behaviour. Might change at a later point
if we have a general purpose backend with a promise-based catch()
implementation.
2016-04-06 08:41:07 +12:00
Ingo Schommer
47dd7b48af Relative ES6 module paths
http://stackoverflow.com/questions/20158401/how-do-i-manage-relative-path-aliasing-in-multiple-grunt-browserify-bundles/23608416#23608416
https://github.com/substack/node-browserify/issues/767
http://stackoverflow.com/questions/28078780/relative-paths-in-package-json
https://github.com/npm/npm/issues/1558
http://stackoverflow.com/questions/31624567/webstorm-es6-named-import-getting-cannot-resolve-symbol-error/31631415
http://stackoverflow.com/questions/20158401/how-do-i-manage-relative-path-aliasing-in-multiple-grunt-browserify-bundles/23608416#23608416
https://github.com/vigetlabs/gulp-starter/issues/17#issuecomment-44292681
2016-04-06 08:36:38 +12:00
Ingo Schommer
c70590e50c Consolidated grid-field component
Every top-level folder in /components should be a standalone component.
This isn't the case for the grid-field-* ones, so they belong into the same folder.
See https://github.com/Automattic/wp-calypso/blob/master/docs/components.md

merge styles
2016-04-06 08:36:37 +12:00
scott1702
e550363c67 - Add GridfieldActionsComponent
- Add ability to set desired relative width on gridfield cells
2016-04-06 08:36:37 +12:00
David Craig
ef97e0b52f Consolidated bundles, sourcemaps and watching
We don't want a bundle for each section, unnecessary network overhead
and too much boilerplate in defining build tooling.
2016-04-06 08:36:34 +12:00
Ingo Schommer
b4e6d498c9 Simplified form schema structure and mocks
Keyed by URL instead of anonymous object maps which need to be iterated on
Removed the 'schema.forms' namespace, unnecessary since all 'schema' items should be forms
2016-04-06 08:35:53 +12:00
Paul Clarke
0ca090a391 Add generic React components
Includes moving some components from AssetAdmin
2016-04-06 08:35:50 +12:00
David Craig
d0ffa7771c Client config 2016-04-05 22:43:29 +12:00
scott1702
2abe24f818 GridField and header styles 2016-04-05 22:42:15 +12:00
David Craig
f8c17bed3b CampaignAdmin and GridField React sections
Also removes watchify because it wasn't working.
Add SilverStripeBackend class used to fetch data from endpoints for the front-end
2016-04-05 22:42:13 +12:00
Ingo Schommer
7337f26d3a Fix non-standard url encoding in CMS search form
jQuery uses encodeURIComponent, but also this line here:
return s.join( "&" ).replace( r20, "+" );
https://github.com/jquery/jquery/blob/1.7.2/src/ajax.js#L797

This breaks when passing the result through $.path.addSearchParams(),
which in turn uses jQuery.param - any '%20' would've been wrongly encoded as '+' by jQuery.serialise(),
which in turn gets rightly encoded as '%2B' by jQuery.param().

This had the effect of breaking CMS searches with spaces in them.
2016-04-05 22:30:50 +12:00
Damian Mooyman
5a86f4232e BUG Fix error when using search bar 2016-04-05 17:10:21 +12:00
Ben Manu
5c7a6166b6 Moving thirdparty module to npm dependency - json-js. 2016-04-01 15:43:09 +13:00
Damian Mooyman
501b2f1809 API CMSMenu::get_cms_classes() is now sorted 2016-04-01 13:46:33 +13:00
David Craig
aa1aebd007 Implement client-side routing with Page.js
- Removes thirdparty dependency History.js
- Adds thirdparty dependency Page.js to manage client-side routing
- Adds a wrapper around Page.js for SilverStripe specific behaviour
- Increased minimum browser requirement to IE10. Native HTML History API routing requires IE10 or newer (necessitated by removal of History.js)
- PJAX pannel loading via now uses promises rather than callbacks
- Adds getClientConfig method to LeftAndMain which can be used to pass config from to the front-end client
2016-04-01 13:45:14 +13:00
Daniel Hensby
a7a23afe38 Merge pull request #5163 from mikenz/patch-5
Build dist assets and added console.warn
2016-03-14 16:38:28 +00:00
Paul Clarke
ae31619695 New styles for main nav 2016-03-14 10:18:32 +13:00
Mike Cochrane
0b81bbef22 FIX attempt to access https iframe from http interface 2016-03-09 21:36:39 +13:00
Mike Cochrane
a3ee9ece90 FIX avoid javascript error when preview is https
When the admin interface is http but the preview is https, javascript isn't able to read the contentDocument of the secure preview iframe. This currently results in a javascript error. Patch wraps try/catches around the two instances,
2016-03-09 21:19:26 +13:00
Ingo Schommer
f36b110db3 Merge remote-tracking branch 'origin/3.3' 2016-03-04 17:06:04 +13:00
Damian Mooyman
3b0a9f4ba2 Merge remote-tracking branch 'origin/3'
# Conflicts:
#	admin/javascript/LeftAndMain.Menu.js
#	control/HTTPRequest.php
#	css/GridField.css
#	css/GridField.css.map
#	docs/en/02_Developer_Guides/03_Forms/Field_types/01_Common_Subclasses.md
#	docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md
#	docs/en/02_Developer_Guides/06_Testing/index.md
#	docs/en/02_Developer_Guides/14_Files/01_File_Management.md
#	docs/en/02_Developer_Guides/14_Files/02_Images.md
#	filesystem/Upload.php
#	javascript/HtmlEditorField.js
#	model/Image.php
#	model/connect/MySQLDatabase.php
#	model/fieldtypes/Enum.php
#	model/versioning/Versioned.php
#	scss/GridField.scss
2016-02-25 14:51:59 +13:00
Damian Mooyman
f20ad434ce API Update TinyMCE to 4.x
API Allow HtmlEditorField to be individually configured
BUG Fix incorrect change detection
BUG Fix missing i18n files
2016-02-23 10:10:02 +13:00
scott1702
2bf802a8cd Include React and related libraries in framework 2016-02-15 16:05:55 +13:00
Damian Mooyman
d4521cbc92 Update gitattributes and Rebuild bundles 2016-01-26 13:14:48 +13:00
Damian Mooyman
6cebffd89b BUG Fix SSViewerTest not restoring old requirements
BUG Fix incorrect js path in UploadField.php
Restore changes missing from merge
2016-01-26 11:39:53 +13: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