Commit Graph

61 Commits

Author SHA1 Message Date
Damian Mooyman
c4710b2272 Merge remote-tracking branch 'origin/3.1' into 3.2
Conflicts:
	admin/code/GroupImportForm.php
	admin/code/MemberImportForm.php
	tests/model/DataListTest.php
2015-09-15 13:18:47 +12:00
Loz Calver
06cc18526a FIX: UploadField error when attempting to attach non-existent file IDs 2015-09-09 09:24:56 +01:00
Damian Mooyman
0b1f297873 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	.travis.yml
	README.md
	admin/code/LeftAndMain.php
	admin/css/screen.css
	admin/scss/screen.scss
	api/RestfulService.php
	conf/ConfigureFromEnv.php
	control/injector/ServiceConfigurationLocator.php
	control/injector/SilverStripeServiceConfigurationLocator.php
	core/ClassInfo.php
	core/Object.php
	css/AssetUploadField.css
	css/ComplexTableField_popup.css
	dev/CSSContentParser.php
	dev/DevelopmentAdmin.php
	docs/en/changelogs/index.md
	docs/en/misc/contributing/code.md
	docs/en/reference/execution-pipeline.md
	filesystem/GD.php
	filesystem/ImagickBackend.php
	filesystem/Upload.php
	forms/Form.php
	forms/FormField.php
	forms/HtmlEditorConfig.php
	forms/gridfield/GridFieldDetailForm.php
	forms/gridfield/GridFieldSortableHeader.php
	lang/en.yml
	model/Aggregate.php
	model/DataList.php
	model/DataObject.php
	model/DataQuery.php
	model/Image.php
	model/MySQLDatabase.php
	model/SQLQuery.php
	model/fieldtypes/HTMLText.php
	model/fieldtypes/Text.php
	scss/AssetUploadField.scss
	search/filters/SearchFilter.php
	security/Authenticator.php
	security/LoginForm.php
	security/Member.php
	security/MemberAuthenticator.php
	security/MemberLoginForm.php
	security/Security.php
	tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsFormsContext.php
	tests/control/HTTPTest.php
	tests/control/RequestHandlingTest.php
	tests/filesystem/UploadTest.php
	tests/forms/FormTest.php
	tests/forms/NumericFieldTest.php
	tests/model/DataListTest.php
	tests/model/DataObjectTest.php
	tests/model/TextTest.php
	tests/security/MemberAuthenticatorTest.php
	tests/security/SecurityDefaultAdminTest.php
	tests/view/SSViewerCacheBlockTest.php
	tests/view/SSViewerTest.php
2014-11-18 12:45:54 +13:00
Sean Harvey
2c25358828 Merge pull request #2866 from kinglozzer/2862-uploadfield-editform-height
FIX: UploadField height calculation fix (fixes #2862 & #2863)
2014-09-26 10:30:52 +12:00
Mateusz Uzdowski
8bf3853887 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	docs/en/misc/contributing/issues.md
	docs/en/reference/uploadfield.md
	forms/HtmlEditorField.php
	i18n/i18n.php
	javascript/HtmlEditorField.js
	model/DB.php
	model/Image.php
	model/SQLQuery.php
2014-08-14 09:08:26 +12:00
Sean Harvey
baa2b696eb BUG Fixing incorrect error message on failed UploadField upload
If applying custom Upload_Validator rules, uploads will fail POST with
a 403 to UploadField/upload as the upload was rejected, but UploadField
still shows that the upload was successful.

jqXHRorError returns either an error string, e.g. "Forbidden" or an
object. If it's a string, ensure that the upload summary shows an
error message. If it's an object and has a status of 200, show the
success message.
2014-07-29 13:38:03 +12:00
Mateusz Uzdowski
b34aaca2e8 BUG Fix several issues around onmatch/onunmatch entwines.
1. Add missing _super calls.

2. Make UI widget destroys more consistent to avoid exceptions.
Selectable would throw an exception in the GridField.js if destroy
called from onunmatch - at that stage jQuery UI would have had called
the destroy already. Add a guard, and change to onremove, which triggers
before the element is removed from DOM.

3. DOM traversal fails after the element is removed from DOM.
Onunmatch triggers after the removal of the element from the DOM, which
makes DOM traversal fail. Use onremove instead, which triggers while the
element is still in DOM.
2014-07-17 14:14:52 +12:00
Loz Calver
a3fb47a929 Fix: Remove superfluous iframe resize for UploadField (fixes #2863) 2014-06-25 16:12:32 +01:00
Loz Calver
58f8c2944a Fix: Incorrect calculation of UploadField height (fixes #2862) 2014-06-25 16:12:32 +01:00
Devlin
5f7ebd3c23 API UploadField: move replaceFile to the front end config 2014-05-21 12:03:26 +02:00
Simon Welsh
fe8dc50ffc Merge branch '3.1'
Conflicts:
	tests/view/SSViewerTest.php
2014-03-30 18:17:24 +13:00
Loz Calver
86a69f9118 NEW: Show loading indicator when attaching files to UploadField 2014-03-25 14:53:30 +00:00
Ingo Schommer
f29d51f433 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	docs/en/reference/dataobject.md
	lang/es.yml
2013-12-19 20:23:09 +01:00
Loz Calver
06d7bb77c0 FIX: Defer loading of UploadField EditForm iframes (fixes #2711)
Also addresses issue #1439.

I don’t like the binding iframe.on('load') events in the onclick handler, but apparently Entwine doesn't support binding on iframes.

AssetAdmin and HtmlEditorField support added
2013-12-19 09:11:31 +00:00
Andrew Short
bedf292612 Merge branch '3.1'
Conflicts:
	docs/en/reference/execution-pipeline.md
	lang/nl.yml
2013-11-11 18:18:25 +11:00
Ingo Schommer
61f99fa1ef UploadField changeDetection optional (fixes #2638) 2013-11-06 23:34:29 +01:00
Ingo Schommer
c547e426dd Merge pull request #2599 from tractorcow/pulls/3.1-uploadfield-formchanged
BUG / API - Change tracking for UploadField
2013-10-31 15:28:34 -07:00
Ingo Schommer
fe6cc6e36e Conditionally send "ID" val in UploadField
The "ID" form field is not always defined,
for example in the "Replace" tab of the "versionedfiles" module
(which uses GridFieldDetailForm). Since the path to that
detail form relies on the "ID" in AssetAdmin->currentPageID(),
and does an is_numeric() check to support the "root" folder,
we need to leave the "ID" param out completely.

Checked this without versionedfiles module in admin/assets
as well as a custom UploadField in CMSMain.
2013-10-31 21:38:39 +01:00
Damian Mooyman
415f8a04b2 API Change tracker allows explicit dirty messages
BUG Fixed issue with UploadField not detecting changes
2013-10-24 17:53:40 +13:00
Ingo Schommer
739d591e45 Merge pull request #2558 from chillu/pulls/uploadfield-874
HTML attr encoding for UploadField config
2013-10-23 13:00:39 -07:00
Ingo Schommer
b56ca812dc Merge remote-tracking branch 'origin/3.1'
Conflicts:
	tests/security/MemberTest.php
2013-10-23 14:53:29 +02:00
Ingo Schommer
3422761a41 Adjust UploadField edit form size
Thanks @kinglozzer for getting this started.
Fixes https://github.com/silverstripe/silverstripe-cms/issues/878
Replaces https://github.com/silverstripe/silverstripe-framework/pull/2221
2013-10-23 11:16:56 +02:00
Ingo Schommer
e1b7df38ef HTML attr encoding for UploadField config
Also fixed UploadField operation with canUpload=false,
which broke the JS because no config could be found,
since the <input> field wasn't present. We can't put the data-config
attribute on the field holder, since fields can be rendered
without their field holder through FormField->SmalLFieldHolder().

Fixes https://github.com/silverstripe/silverstripe-cms/issues/874
2013-10-17 10:55:11 +02:00
Andrew Short
bfdf14fafa Merge branch '3.1' 2013-07-09 13:42:32 +10:00
Loz Calver
041f5f51a5 FIX: UploadField action buttons aren't disabled when editing an item
Toggle disabled classes/attributes based on form visibility instead of .toggle()

Use jQuery.attr() simply because it looks nicer
2013-07-05 09:39:09 +01:00
Simon Welsh
fbce9fd7cd Merge branch '3.1'
Conflicts:
	.travis.yml
	docs/en/misc/contributing/code.md
	javascript/HtmlEditorField.js
2013-07-05 10:22:58 +12:00
Damian Mooyman
f47383f52e BUG Fixed issue where file upload via the HTML Editor media dialogue would not prompt users to overwrite existing files 2013-06-20 15:21:18 +12:00
Ingo Schommer
5a1d476e8d Merge branch 'idvalidattr' of git://github.com/wilr/sapphire into wilr-idvalidattr 2013-05-31 19:27:19 +02:00
Damian Mooyman
7f057ce343 API UploadField functions on new records
Fixed regression from 1e5d40474d (UploadField::canPreviewFolder).
Merged in pull request #2009 - (6018bdd631).
Merged pull request #1259 (34bfc862ee).
2013-05-27 15:22:59 +12:00
Will Rossiter
831a507c90 FIX: Update references to ID values from 79c9433 2013-05-26 11:11:55 +12:00
Ingo Schommer
6f2ba3fcac Merge pull request #2009 from sminnee/uploadfield-choose-new-file
NEW 'Choose another file' button on upload field AAS-917
2013-05-25 01:55:26 -07:00
Julian Seidenberg
22c7bbfcd4 NEW UploadField displays a warning before overwriting files (only relevant if config.yml: Upload:replaceFile = true). 2013-05-25 19:07:06 +12:00
jean
6018bdd631 NEW 'Choose another file' button on upload field AAS-917 2013-05-25 18:38:02 +12:00
Ingo Schommer
fe740515b4 Loading "OR" in admin/assets for Chrome (fixes #8245) 2013-02-04 22:00:12 +01:00
Nathan Cox
fd80c4fb3e Issue #7818: Making sure UploadField can find the form/SecurityID on direct page load/refresh 2013-01-11 16:42:20 +01:00
Sean Harvey
fbc6e3366b Merge branch '3.0' 2012-11-05 15:11:48 +13:00
Naomi Guyer
2dabaebad8 BUG: File Uploading Notifications (fixes #7883)
Put "File upload complete" and "back to folder" together. Turned 'File
upload' into a message, and updated the message styles.
Moved allowed file types into the area where users are uploading files.
This is a temporary fix until js tooltips are implemented, at which
point, these details will be shown when clicking a question mark beside
"Choose files".
Added small animation effect to files when opening iframe to edit. Now
slides down, rather than just appearing open
Linked to silverstripe/silverstripe-cms#223
2012-11-02 12:46:16 +13:00
Ingo Schommer
d342794cfe BUG Fixed intermittent absence of UploadField "drop" area
Only occurs when the UploadField resources are loaded uncached.
Possible cause: Randomized application between UploadField.js
setting "display: block" and UploadField.css setting "display: none". Simply hiding the element before showing it fixes the issue.
2012-10-31 11:34:12 +01:00
unclecheese
b57f2bd022 BUGFIX: UploadField does not work on DataObjects 2012-07-19 22:11:38 -03:00
Naomi Guyer
28e43bdc88 ENHANCEMENT: File/Image UI fixes
* Replaced cancel/delete button in files area
* Consolidated Image upload styles with AssetUpload styles
* Changed name of step 2 in image upload
* Made image editing hidden by default, so multiple files can be seen,
and added ability top open and close
* Tweaked styles in on page upload field (status colour and file name
width)
2012-05-28 11:50:34 +12:00
Mateusz Uzdowski
8d469b66c8 BUGFIX: add missing onunmatches 2012-05-23 16:24:15 +12:00
Ingo Schommer
bb72037de1 MINOR Don't double-trigger 'stop' event in UploadField.js (regression from d642eee2, fixes #7355) 2012-05-20 13:36:11 +02:00
Ingo Schommer
02505247d5 MINOR Indentation 2012-05-20 12:22:55 +02:00
Mateusz Uzdowski
37399f88db BUGFIX: add missing _super calls to all matchers and unmatchers
Otherwise some matchers might not be triggered as expected.
2012-05-18 12:27:30 +12:00
Ingo Schommer
61232ba848 MINOR Localization of new UploadField strings 2012-05-12 09:53:53 +02:00
Ingo Schommer
3f19f4cec0 MINOR Removing special case handling for chosen.js from UploadField, using generic change listener (incl. some iframe scoping fixes) 2012-05-11 12:40:57 +02:00
Naomi Guyer
9844328a06 BUGFIX: Fix error notification on files (fixes: 7295)
Add title text to all status messages
Make room for the error message details by expanding the name area in
the file details
Fix up changes status to work with selects
2012-05-11 14:43:17 +12:00
Naomi Guyer
f2411cf13a BUGFIX: Uploads save button not visible (Trac #7294)
Fixed the calculation of height for the upload (non AssetUploads) area
so that the save button would show. Took off the min-height, as this
will cause UI issues when there are multiple files open for editing.
2012-05-10 11:41:10 +02:00
Naomi Guyer
d642eee28e ENHANCEMENT: UI Changes to FileUpload Area (TRAC-7219)
1. Add arrows to edit dropdowns
2. Adjust lightened fields so they don't look like input boxes, and fix
rgba colours
3. Add ability to click file names to edit
4. Add feedback when edit button is hovered
5. Add feedback if a file has been opened for editing and shut again
(saved changes, unsaved changes, unchanged)
6. Add ability to open and close all files to edit them all at once
7. Add overall feedback for file uploads, and fix NaN error
8. Fix up area to match design
9. Fix error messages so they fit in the provided space
10. Fix case where a single uploaded file errors
2012-05-09 18:38:21 +12:00
Naomi Guyer
61c18c5dbc BUGFIXES: Fixes #7003 2012-04-30 12:25:35 +12:00