Commit Graph

17031 Commits

Author SHA1 Message Date
3Dgoo
cd8904e045 Fixing button destroy bug
When you want to add a button to the CMS but don't want LeftAndMain to apply jQuery UI button to it we add the `data-button="true"` attribute to our button. 

The `onadd` function checks that this attribute does not exist before calling `this.button()`.

The `onremove` incorrectly checks that this attribute does exist before calling `this.button('destroy')`. This should be checking that this attribute does not exist, just like the `onadd` function.

What this causes is when you have a button with the `data-button` attribute a button is not created, but when you leave the page `destory` gets called on an item which doesn't exist. We end up with the following error:

> Uncaught Error: cannot call methods on button prior to initialization; attempted to call method 'destroy'

The other issue with this logic is buttons are never getting destroyed when `onremove` is called.

The whole issue is caused by a missing `!` in the if statement. This change adds it in to fix the problem.
2016-09-15 08:23:22 +09:30
Daniel Hensby
f25b88b146 showqueries debugging tool now inserts parameters in place (#5885) 2016-09-15 09:15:19 +12:00
Daniel Hensby
4e1d38c209
Merge branch '3' 2016-09-14 11:49:07 +01:00
Daniel Hensby
a9df28c791
Merge branch '3.4' into 3 2016-09-14 11:40:15 +01:00
Daniel Hensby
8c23b67b9f
Merge branch '3.3' into 3.4 2016-09-14 11:39:49 +01:00
Daniel Hensby
64de2223f8
Merge branch '3.2' into 3.3 2016-09-14 11:39:28 +01:00
Daniel Hensby
90a01870ea
Merge branch '3.1' into 3.2 2016-09-14 11:39:00 +01:00
Ingo Schommer
c2292a4cc1 Merge pull request #6003 from open-sausages/pulls/4.0/readonly-field-icon
Adjustment for icons within readonly fields
2016-09-14 16:06:20 +12:00
Paul Clarke
440a3073fe improve class naming to be more generic 2016-09-14 15:09:45 +12:00
Paul Clarke
d2cabce852 Added icon style for readonly fields containing icons 2016-09-14 15:09:16 +12:00
Ingo Schommer
4d8fb16c3e Merge pull request #5964 from open-sausages/pulls/4.0/tabify
Tabs and CompositeField added to React formfields
2016-09-14 14:12:52 +12:00
Ingo Schommer
294644ce1a Updated dist files 2016-09-14 14:12:04 +12:00
Paul Clarke
d51c46dc89 Increase consistency of tab styles across legacy and bootstrap tabs
Using BS variables where possible for all tabs
2016-09-14 14:10:41 +12:00
Paul Clarke
660aa20dad Remove tab styles from legacy stylesheet 2016-09-14 14:09:02 +12:00
Paul Clarke
82eea479e8 Adjust tab height (was a mix of 2px and 3px) 2016-09-14 14:09:02 +12:00
Christopher Joe
190ed628bc API PreviewThumbnail now uses ScaleMaxWidth
This will mean that if a thumbnail image is smaller than the preview_width defined, then it will no longer get blown up to the defined size.
2016-09-14 14:09:01 +12:00
Christopher Joe
ee5b4fd8d3 Tabs support in new file/image editor
Introducing <Tabs> component based on react-bootstrap
Better support for nested fields in FormBuilder
Tweaks to get FormBuilder working with frameworktest BasicFieldsPage fields
Added exception in FormBuilder when Component is defined but not found
Added check in SingleSelectField for empty value before adding one in
Added temporary workaround for CompositeFields with no name (another story to address the actual problem)
Added asset_preview_height for File image preview, matches the defined CSS max-height
Added documentation to DBFile::PreviewLink() method
2016-09-14 14:08:59 +12:00
Paul
955d75b219 Insert media into TinyMCE modal, styling fixes and improvements (#5967)
* Remove interference of nested for__fieldgroup-item

* Adjust position of dropdown field

* Remove divider lines, adjust position of upload area

Clean up styles a bit too

* Adjust position of image

* Mostly css tidy up, added use of a few variables

* Toggle arrow was showing other icon because of icon height

* All buttons in toolbars remove margin below, adjust button link color

* Reorder sort and filter, add toolbar styles

* Add button styles to toolbar

* Remove some of the linting issues

* Added new panel variables

* Simplify variable

* Replace panel variable, insert media dialog positioning

* Update with new variable name, reduce space below toolbar

* Build

* Uploading file spacing, toolbar styles added

* Visual uploads, error upload fixes, edit details panel spacing

* Add toolbar to upload modal

* build

* Build

* increase width of pagination on gridfield

* Add height to uploading items only

* Build

* Added class back for beat test to pass
2016-09-14 13:48:33 +12:00
Damian Mooyman
014d6db8d8 Merge pull request #5989 from dhensby/pulls/3.1/fix-sake-lf
FIX Force line endings to LF on sake file
2016-09-14 10:21:41 +12:00
Damian Mooyman
360d3bc331 Merge pull request #5988 from dhensby/pulls/many-many-fixture-fix
API Allow has_many fixtures to be declared with array format as well …
2016-09-14 09:57:56 +12:00
Daniel Hensby
60250903cb Merge pull request #5994 from open-sausages/pulls/4.0/preview-panel
API Move preview panel to CMS module
2016-09-13 15:11:57 +01: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
Ingo Schommer
7bc6f3ee9f Enforce JS var declaration with value (#5993)
This caught us out recently where code did a strict type check for `myVar === undefined`.
The var was defined as `let myVar;`, without a value - so the check returned false (it's `null`).
To avoid this situation, we've decided to enforce declarations with values.
Note that preference should be given to single, immutable assignments via const where possible.

See http://eslint.org/docs/rules/init-declarations
2016-09-13 11:02:15 +12:00
Ingo Schommer
23f764f8b0 Merge pull request #5991 from dhensby/docs/3.4/composer-install-docs
Docs/3.4/composer install docs
2016-09-13 07:50:24 +12:00
Daniel Hensby
e3ac75febd
DOCS Reference composer docs for installation instructions 2016-09-12 17:04:20 +01:00
Daniel Hensby
a14df0bc2d
FIX Force line endings to LF on sake file 2016-09-12 14:15:07 +01:00
Damian Mooyman
c6457c50e9
API Allow has_many fixtures to be declared with array format as well as many_many (#5944)
BUG Fix issue with parsing of extrafields in fixtures
BUG Fix issue in duplicate relation name, and ensure FixtureBlueprint fails on these
2016-09-12 14:01:08 +01:00
Daniel Hensby
8b8996f4a4 Merge pull request #5985 from open-sausages/pulls/4.0/codeclimate-better-excludes
Improved CodeClimate excludes
2016-09-12 09:46:04 +01:00
Ingo Schommer
778b821797 Improved CodeClimate excludes
Exclude lang folders, make other includes less verbose
by using globs, see https://docs.codeclimate.com/docs/excluding-files-and-folders
2016-09-12 18:55:47 +12:00
Ingo Schommer
1c021bd3e4 Merge pull request #5982 from pandauxstudio/patch-1
Update 01_Error_Handling.md
2016-09-12 18:35:49 +12:00
Daniel Hensby
3f92767512 Merge pull request #5979 from open-sausages/pulls/4.0/groupeddropdown-include-ns
Fix GroupedDropdownField include namespace
2016-09-12 00:54:42 +01:00
Zaid Al-Dabbagh
d0aa0cb911 Update 01_Error_Handling.md
Indentation error causes yaml parsing error.
2016-09-12 10:51:30 +12:00
Ingo Schommer
90e2f56a22 Merge pull request #5977 from sminnee/remove-manual-includes
FIX: Remove unnecessary manual includes
2016-09-10 15:13:56 +12:00
Ingo Schommer
68c6137f29 Fix GroupedDropdownField include namespace
Follow up from https://github.com/silverstripe/silverstripe-framework/pull/5921
2016-09-10 15:05:45 +12:00
Sam Minnee
5a786624aa FIX: Remove unnecessary manual includes
Core.php can rely on composer’s autoloader now that classes are PSR-4
compliant.

If you stuck to the core modules, you could even remove ClassLoader’s
autoloader, but this would break any module that hasn’t been updated
to support PSR-4, so I’ve left it in.

In the future, it would be good to apply SilverStripe’s auto-loader
only to those modules that aren’t coded to use PSR-4, as it would
make class loading more predictable.
2016-09-10 11:13:23 +12:00
Damian Mooyman
bfd9cb1aca Rename SS_ prefixed classes (#5974) 2016-09-09 18:43:05 +12:00
Damian Mooyman
f5d71dc8ec Merge pull request #5975 from silverstripe/pulls/4.0/clarify-upgrader-docs
Clarify upgrader docs
2016-09-09 14:21:13 +12:00
Ingo Schommer
01fdb7949f Clarify upgrader docs 2016-09-09 13:54:54 +12:00
Ingo Schommer
484b6f6c62 Merge pull request #5968 from open-sausages/pulls/4.0/upgrade-guide
Restructure 4.0.0.md
2016-09-09 13:35:07 +12:00
Ingo Schommer
97c2baedeb Less verbosity in upgrading guide 2016-09-09 13:33:52 +12:00
Damian Mooyman
fe5925726e
Restructure 4.0.0.md 2016-09-09 13:16:09 +12:00
Daniel Hensby
1b6242ac64 Merge pull request #5970 from open-sausages/pulls/4.0/fix-folder-validate
BUG Fix issue with Folder::validate() failing on allowed_extensions
2016-09-08 11:44:31 +01:00
Daniel Hensby
a5494504ff Merge pull request #5971 from open-sausages/pulls/4.0/core-include
BUG fix core include
2016-09-08 09:47:58 +01:00
Damian Mooyman
d4de776a45 BUG fix core include 2016-09-08 19:19:32 +12:00
Damian Mooyman
d2229ce8a6 BUG Fix issue with Folder::validate() failing on allowed_extensions 2016-09-08 18:07:34 +12:00
Ingo Schommer
8f26908b3b Merge pull request #5969 from open-sausages/pulls/4.0/fix-case
Fix case of required paths
2016-09-08 17:58:58 +12:00
Damian Mooyman
eaac957248
Fix case of required paths 2016-09-08 17:53:44 +12:00
Ingo Schommer
15d62fe788 Merge pull request #5921 from open-sausages/pulls/4.0/namespace-everything
API Apply all SilverStripe namespaces to framework
2016-09-08 17:44:20 +12:00
Damian Mooyman
77d1677304
Fix issue with core/Core.php includes
Fix PHP 5.5 compatibility issue
2016-09-08 16:31:02 +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