Commit Graph

286 Commits

Author SHA1 Message Date
Damian Mooyman
f265595c1e NEW: GridFieldPageCount control for displaying the current page count/total in the gridview header. Designed to complement a functional pager in the grid footer.
NEW: GridFieldPageCount widget to default config settings
FIX: @extend .col_buttons in GridField.scss which was raising a warning
2012-10-03 14:54:37 +13:00
Sam Minnee
1f7fc1f76a FIX Remove instances of lines longer than 120c
The entire framework repo (with the exception of system-generated files) has been amended to respect the 120c line-length limit.  This is in preparation for the enforcement of this rule with PHP_CodeSniffer.
2012-09-30 17:18:13 +13:00
Frank Mullenger
a602ba5941 BUGFIX: Old version of SimpleTest does not recognise input fields of
type 'email'.
2012-09-28 12:07:54 +12:00
Ingo Schommer
e44a3558dd Merge pull request #793 from halkyon/htmlvalue_parsing_fixes
BUG HtmlEditorField doesn't save HTML fragments in HTMLValue correctly
2012-09-20 02:09:36 -07:00
Ingo Schommer
e2f073f38a Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
Sean Harvey
26d70d6fca BUG HtmlEditorField doesn't save HTML fragments in HTMLValue correctly
The issue was raised in #7628, where an anchor tag was being changed from
<a name="anchor"></a> to <a name="anchor"/> by SS_HTMLValue, when
HtmlEditorField::saveInto() parses the HTML fragments.

This is because SS_HTMLValue uses DOMDocument::saveXML(), which is fine
for saving an XML document, but not suitable for HTML. This fix changes
that to use DOMDocument::saveHTML() instead.
Note that we can't use the parameter to saveHTML() for selecting a single
node only, as that's only supported in PHP 5.3.6+, SilverStripe 3.0 supports
PHP 5.3.2 as a minimum. The workaround for this shortcoming is to replace
unncessary output by DOMDocument with a regular expression.
2012-09-19 11:39:01 +12:00
Simon Welsh
4ead89a4d0 API Adds getManipulatedList() method to GridField to get the SS_List after applying Manipulators 2012-09-06 23:42:48 +12:00
Fred Condo
3e0782267c Allow scheme-relative URLs in requirements
The Requirements class currently treats only absolute URLs as URLs, and
tries to interpret anything else as a filesystem path. This prevents
using scheme-relative URLs for requirements.

Example:
<% require javascript(//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js) %>

This forces the unfortunate choice of not using a CDN for common
scripts, always using an https absolute URL, or accepting that some
browsers will throw a security warning when viewing the site in https.

This change allows scheme-relative URLs & updates RequirementsTest.
2012-08-22 16:49:55 -07:00
Ingo Schommer
1a91431d39 Query param searches for GridFieldAddExistingAutocompleter
Fixes issues with query construction in JS when the search URL
already contains GET paramters (e.g. when using the 'translatable'
module).
2012-07-17 13:26:33 +02:00
Ingo Schommer
bc1c7f766a Add sorting to GridFieldDetailFormTest fixtures
Broke SQLite3 tests in some cases due to random ordering of results.
2012-07-06 12:42:42 +02:00
Ingo Schommer
eff93bdd5b ENHANCEMENT Disable UploadField when handling unsaved relations (fixes #7187) 2012-06-15 17:44:34 +02:00
Sean Harvey
b04c199064 MINOR Fixing additional cases where DataList needs to be returned correctly when filtering 2012-06-15 16:09:40 +12:00
Will Rossiter
78c15ea882 BUGFIX: Fix correct input type for ImageFormAction replaces.
ImageFormAction is deprecated, using the new API results in a submit input rather than an image input being generated. Added hasAttribute helper to FormField as well as test coverage.
2012-06-13 09:57:54 +02:00
Sam Minnee
c41ff29d70 MINOR: Don't rely on singleton() inappropriately in FormScaffolderTest 2012-06-11 22:46:42 +12:00
Sean Harvey
5462cdaab2 MINOR Removing "." from the end of validation messages 2012-06-01 13:13:06 +12:00
Sean Harvey
c3eabffcb9 MINOR Use shorthand {class}::get() syntax instead of DataList::create()
in core code.
2012-05-28 21:13:42 +12:00
Sean Harvey
60c72c40d9 API CHANGE Use of the DropdownField $emptyString argument is now
properly deprecated (has been marked as deprecated since 2.3). Please
use setEmptyString() on the DropdownField instance instead.
2012-05-23 22:59:40 +12:00
Sean Harvey
f446547cd7 MINOR Using Config system instead of Director::addRules() in tests 2012-05-22 17:13:05 +12:00
Yuki Awano
c04b01fc2a BUGFIX Changed Date.php and DateTime.php to use DateTime->Format instead of strtotime to handle extended dates on 32bit environment(fixes #7311) 2012-05-18 16:09:38 +09:00
Normann Lou
5290b81c55 ENHANCEMENT: don't show the paginating elements in the paginator when only one page, and keep 'view 1 - 5 of 5' there 2012-05-18 11:31:33 +12:00
Ingo Schommer
0a6ec3d9c9 Merge pull request #443 from halkyon/sapphire
---
2012-05-14 15:33:48 +02:00
Ingo Schommer
45ae2465e8 Merge pull request #438 from ajshort/sapphire
---

These are some enhancements + tweaks I made as part of getting the advanced workflow module running in SS3:

* Added a readonly view button and action to GridField.
* Made LeftAndMain::getResponseNegotiator() public so CMS extensions can use it to generate responses.
* Fixed top tab background, made text more readable (http://i.imgur.com/yDmmY.png).
* Allow fields in the CMS to not be change tracked using ".no-change-track".
* Made all icons 16x16 (some were different sizes, being cut off), and allow them without .ui-state-default.
* Fixed ToggleCompositeField and tweaked field styling.
2012-05-14 14:25:16 +02:00
Sean Harvey
9da92e04cf API CHANGE Renamed setContainerFieldSet() to setContainerFieldList() to match the FieldList API.
API CHANGE Renamed rootFieldSet() to rootFieldList() to match the FieldList API.
2012-05-14 15:16:44 +12:00
Andrew Short
05cde92508 FEATURE: Implemented a view action for GridField, and a record viewing GridFieldConfig. 2012-05-12 18:49:56 +10:00
Ingo Schommer
368081f63c MINOR Supressing deprecation warnings in FieldListTest for new FieldList->rewriteTabPath() invocations 2012-05-12 09:58:37 +02:00
Ingo Schommer
ffbcf634bb Merge pull request #420 from chillu/sapphire
---

See http://open.silverstripe.org/ticket/7261
2012-05-11 13:42:47 +02:00
Ingo Schommer
8c9560d288 ENHANCEMENT FieldList->setTabPathRewrites() for better backwards compatibility (see #7261) 2012-05-09 17:18:16 +02:00
Sean Harvey
b1e17578c7 API CHANGE Removed assertType() and assertEmpty() workarounds. Use assertInstanceOf()
instead of assertType(), assertEmpty() is available in PHPUnit 3.5+.
PHPUnit 3.4 is no longer supported, so please upgrade your version to
work.

MINOR Removed FullTestSuite which was a workaround for PHPUnit but not
used.
2012-05-09 23:05:39 +12:00
Normann Lou
3b3b515571 API CHANGE Read-only fields no longer include companion hidden fields (see pull request #399)
BUGFIX Remove legacy code and template which is never picked-up so that TextareaField becomes 'readonly' when it is transfered to readonly field. Change TextareaFieldTest test cases to address a 'readonly' textarea field displaying the special html characters correctly.
2012-05-03 14:24:03 +02:00
Sean Harvey
521d436b45 MINOR Fixing broken test in pgsql 2012-05-03 11:22:54 +12:00
Ingo Schommer
72eadef113 ENHANCEMENT GridFieldDetailForm->setItemEditFormCallback() 2012-04-30 13:46:51 +02:00
Ingo Schommer
fed2785173 ENHANCEMENT Per-instance customisation of GridFieldDetailForm_ItemRequest 2012-04-30 12:31:17 +02:00
Sean Harvey
bb20587f01 ENHANCEMENT GridFieldExportButton allows an anon function to return the
value of a related object. Useful for handling has_many/many_many data
in a single CSV column.
2012-04-23 20:26:41 +12:00
Sean Harvey
007ed25c0b MINOR Fixing broken tests 2012-04-20 15:05:18 +12:00
Robert Curry
ee53df336d BUGFIX: Removed assumption in GridFieldDataColumnsTest that Member would always have the same summary fields. 2012-04-20 11:38:06 +12:00
Robert Curry
842784c8aa ENHANCEMENT: Fixes #7010. Move DisplayFields, FieldCasting and FieldFormatting functions from GridField to GridFieldDataColumns. 2012-04-19 12:44:59 +12:00
Mateusz Uzdowski
a9e7de0cf4 BUGFIX: make UploadField aware of relations to derived classes (os7140)
UploadField was relying entirely on the File::get_class_for_file_extension to
select a class, so it could only create File or Image objects. This
would break the relationships based on derived objects. Also make it
respect the FileField::relationAutoSetting.
2012-04-19 12:18:36 +12:00
Mateusz Uzdowski
a2c9c409a8 BUGFIX: fixed asserts and file cleanup
DataObject::get_one returns false if not found, so better check for
object. Also, the directory would not be cleaned, so on the subsequent
run the files could end up having suffixes.

missed this one
2012-04-19 12:13:02 +12:00
Sean Harvey
4cf8db3ee4 ENHANCEMENT Remove use of deprecated extraStatics in core files 2012-04-19 08:37:51 +12:00
Robert Curry
5603fbe153 ENHANCEMENT: Fixes #7059. Add test for allowedMaxFileNumber to UploadFieldTest. 2012-04-18 14:25:14 +12:00
Robert Curry
5686392a67 BUGFIX: Fixes #7071. Change gridfield tests to not assume ids are always
in order of addition.
2012-04-16 15:47:35 +12:00
Sean Harvey
01e0ce7b24 MINOR Ensure assertions of RequirementsTest use "framework" as the
FRAMEWORK_DIR, otherwise assertions of require() calls in
RequirementsTest_Conditionals template fail
2012-04-15 10:50:20 +12:00
Simon Welsh
f07258f3cf MINOR Update @package values to match renaming sapphire 2012-04-15 10:50:19 +12:00
Simon Welsh
3a6341a251 API-CHANGE sapphire folder can now be renamed. 2012-04-15 10:50:19 +12:00
Simon Welsh
f8082e4814 MINOR Add newline to end of files without one 2012-04-15 10:50:19 +12:00
Will Rossiter
07d2d5273a ENHANCEMENT: populate FormField:: on the fly based on class name of field rather than requiring explict definition. 2012-04-14 17:36:19 +12:00
Will Rossiter
907568b182 ENHANCEMENT: move hard coded template HTML for composite field and field group out to separate template files. 2012-04-14 17:36:08 +12:00
Ingo Schommer
8ba9c3ca6b API CHANGE Removed $params argument to DataObject->getCMSFields(), please use FormScaffolder directly (fixes #7135) 2012-04-13 15:46:47 +02:00
Sean Harvey
3c70ea4922 MINOR Fixing broken test MemberDatetimeOptionsetFieldTest, passing in null for $validator argument 2012-04-12 12:20:18 +12:00
Sean Harvey
6c9a3ba9f0 MINOR Fixed failing tests on pgsql 2012-04-10 17:07:41 +12:00