Commit Graph

77 Commits

Author SHA1 Message Date
Ingo Schommer
efabde1416 Merge remote-tracking branch 'origin/3.0'
Conflicts:
	admin/css/screen.css
	admin/scss/_style.scss
	security/Member.php
2012-10-30 17:52:49 +01:00
Marcus Nyeholt
9c1b4693f7 BUG Fixed DateField date format error for IE8
On IE8, camel case element attributes are NOT included in the object returned
by $(elem).data(), meaning attrs defined in DateField.php (jqueryDateformat and
isoDateformat) are NOT seen by the code in DateField.js (ie the "config" var
doesn't have these set). Causing IE8 to fall back to using US date (mm/dd/yyyy)
formats. This can subsequently cause validation issues if the user's date
format is different.

DateField.js already explicitly checks for jquerydateformat (all lowercase)
so DateField.php has been modified to reflect the correct case for this
attribute name
2012-10-24 13:49:10 +11:00
Sean Harvey
f6a90467e4 Merge branch '3.0' 2012-10-15 10:10:01 +13:00
martimiz
5186bada17 FIX DateField Calendar - make dates with day- and monthnames validate
In locales other than en_US, as a result of missing jQuery locale
files, the DatePicker defaulted to English whenever day and monthnames
were used, breaking validation. Needed to change official locale files
before adding, because Zend_Date and jQuery day/monthnames not matching
again breaks validation.

Removed hard setting the names to uppercase, breaking validation for
other locales

Changed order in convert_iso_to_jquery_format(), to prevent EEE(E)
settings from being overwritten

Added a check for existing locale files, and made DatePicker fallback
to ISO yyy-MM-dd if a missing locale file would otherwise break
validation.

Added documentation for the DateField
2012-10-12 10:16:35 +02:00
Ingo Schommer
d1ee7612f5 Merge remote-tracking branch 'origin/3.0' 2012-10-08 16:48:52 +02:00
Normann Lou
9aaa6b1a7b ENHANCEMENT: change those harded-coded 'sapphire' to 'framework' either in javascript code or inline document, or a <a> href propty. 2012-10-05 17:00:39 +13:00
Ingo Schommer
56f7ce1dcf Merge remote-tracking branch 'origin/3.0'
Conflicts:
	control/Cookie.php
	control/Director.php
	control/HTTPResponse.php
	model/Database.php
	model/MySQLDatabase.php
	model/SQLQuery.php
	view/Requirements.php
	view/SSViewer.php
2012-10-03 16:16:19 +02: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
Simon Welsh
1e629f4585 Merge branch '3.0'
Conflicts:
	control/Cookie.php
	control/Director.php
	dev/Profiler.php
	view/Requirements.php
2012-09-21 14:56:56 +12:00
Ingo Schommer
e2f073f38a Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
Ingo Schommer
1088d044c5 Merge remote-tracking branch 'origin/3.0'
Conflicts:
	.travis.yml
2012-09-07 17:21:41 +02:00
Zauberfisch
d24ea5ec97 BUG jQueryUI configs broken because keys were all lowercase 2012-09-02 12:51:25 +02:00
Saophalkun Ponlu
f3fcae315d BUG Fix wrong date conversion from PHP format 'y' to jquery date and back.
While 'y' in PHP means 4 digits year (e.g. 2012), jquery date picker means 2 digits (e.g. 12). That's all fine until then but when you pass the 2 digit year value back to PHP it all goes awry.
For exmple, defatult date format in en_US is 'MMM d, y' so in jquery date picker it's something like this 'Aug 22, 12' and eventually PHP will convert that value to '0012-08-22' which completely wrong.
2012-08-30 22:21:04 +02:00
Jeremy Shipman
dbc1edef87 Merge branch 'master' of github.com:silverstripe/sapphire into datefield-fix 2012-06-30 19:13:03 +12:00
Ingo Schommer
cb145a0094 "dmyplaceholders" setting for DateFields 2012-06-27 10:12:42 +02:00
Jeremy Shipman
606d86a926 BUGFIX: DateField javascript fails when it is included in a GroupField 2012-06-25 20:32:53 +12:00
Sean Harvey
5462cdaab2 MINOR Removing "." from the end of validation messages 2012-06-01 13:13:06 +12:00
Ingo Schommer
7b18d9d0da MINOR Switching _t() calls from sprintf() to using injection parameters (#7170) 2012-05-01 22:17:00 +02: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
Andrew O'Neil
716ff9dcfa MINOR: Ensure all form fields have FieldHolder() with identical signature to FormField::FieldHolder(). Fixes E_STRICT warnings. 2012-04-11 18:07:55 +12:00
Andrew O'Neil
4be59a8d45 MINOR: Ensure all form fields Field() method has the same signature as FormField::Field(). Fixes E_STRICT warnings. 2012-04-11 17:33:36 +12:00
Ingo Schommer
40d73127ae MINOR Using late static binding instead of Object::create() calls 2012-04-04 17:10:31 +02:00
Sean Harvey
c02b4418bb BUGFIX Using DateField "dmyfields" option, if you set empty
day/month/year values, valueObj on DateField will contain erroneous values.
Check that all the value inputs aren't null or empty values BEFORE
calling Zend_Date on the value.
2012-03-27 14:46:09 +13:00
Sean Harvey
9f3344b355 API CHANGE Removed built-in behaviour.js client-side form validation.
This is no longer supported. Please use custom client-side validation instead. (see 3.0.0 changelog
for more information)
2012-03-09 12:19:57 +13:00
Ingo Schommer
a196135089 API CHANGE Replace jQuery.metadata in DateField markup with HTML5 data attributes 2012-02-17 13:35:54 +01:00
Ingo Schommer
7602d081a2 ENHANCEMENT Fluent interface in Form API by returning instance from all setters 2012-02-17 13:35:26 +01:00
Ingo Schommer
5911abc0f6 API CHANGE Removed prototype.js style $() alias usage for document.getElementById() to avoid confusion with the more common jQuery() alias.
API CHANGE Removed several unsed JavaScript globals: sprintf(), Number.prototype.CURRENCIES, Number.prototype.toCurrency(), String.prototype.ucfirst(), jQuery.fn.clearFields(), jQuery.fn.clearInputs()
MINOR Removed prototype_improvements.js and jquery_improvements.js files, now contained in individual component code (or removed altogether)
2012-02-16 12:27:47 +01:00
Fred Condo
d370423825 Clean up trailing ?> per coding standard
All sapphire but the lang directory
2012-02-12 12:40:16 -08:00
Sam Minnee
6a08a82c9c MINOR: Removed notice-level errors from form field construction. 2012-01-10 16:58:27 +13:00
Ingo Schommer
cc32957414 API CHANGE Don't allow specifying $form as constructor argument in various form fields, use setForm() instead (to achieve a cleaner API with less confusing parameter order) 2012-01-02 17:50:34 +01:00
Ingo Schommer
b5421d9598 ENHANCEMENT Allowing custom attributes in (most) FormField implementations, which allows for HTML5 data attributes 2012-01-02 16:48:14 +01:00
Ingo Schommer
7c147fed14 ENHANCEMENT Passing 'timeformat' and other metadata to markup generated in DateField, TimeField and DatetimeField, to allow for easier integration with third party libraries 2011-10-07 14:12:51 +02:00
Ingo Schommer
d93bd49edc ENHANCEMENT Allowing global default configuration for DateField, TimeField and DatetimeField 2011-10-07 14:12:50 +02:00
JayDevlin
b254b6ed3a ENHANCEMENT Pass through jQuery UI options through DateField->setConfig() (if applicable) 2011-09-19 15:46:03 +02:00
Ingo Schommer
168b1ff279 MINOR Allowing to retrieve the whole configuration array in DateField/TimeField/DateetimeField->getConfig() 2011-09-19 15:44:35 +02:00
Ingo Schommer
ce8e72cf0e MINOR Removing executable flag from all files (thanks miiihi) 2011-09-18 22:04:02 +02:00
Ingo Schommer
3588cefa30 MINOR DateField documentation 2011-05-25 21:24:33 +12:00
Julian Seidenberg
52070a0c3a ENHANCEMENT: including all of jquery-ui instead of specifying individual pieces of it. This is a larger download size, but should be quicker overall as it is just a single download instead of lots of small files. 2011-02-24 17:07:24 +13:00
Julian Seidenberg
a836456cd9 BUGFIX: updated links to new jquery ui file paths 2011-02-24 12:07:34 +13:00
Will Rossiter
1ca5ea6fb4 FEATURE: added ability to define a default configuration set for date field. PATCH via gigtech. Fixes (#6131).
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114816 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-11 02:26:59 +00:00
Sam Minnee
662f581b24 BUGFIX Fixed month conversion in DateField_View_JQuery::convert_iso_to_jquery_format() (fixes #6124, thanks mbren and natmchugh) (from r113247)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114523 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-05 08:20:13 +00:00
Sam Minnee
75c6c4941c BUGFIX: Use correct language code for jquery-ui date picker for en_US (from r113107)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114520 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-05 08:17:16 +00:00
Carlos Barberis
bf8afd6cac MINOR: call jquery-ui from thirdparty folder instead google api (see ticket 5915)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@113656 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-11 04:45:31 +00:00
Sam Minnee
89c3349a1c BUGFIX More common defaults for en_US.xml used by Zend_DateFormat (and DateField/DatetimeField), with less error prone numerical format replacing the Zend default of shortened month names (fixes #6071, thanks dalesaurus)
BUGFIX Correct locale mapping in DateField_View_JQuery for "en_US" and "en_NZ"
MINOR Fixed form validation message in DateField to include actual date format, rather than a hardcoded value (from r111843)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112928 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 05:01:18 +00:00
Sam Minnee
31d442f5da BUGFIX Respecting field specific locale settings in DatetimeField and DateField when validating and saving values (fixes #5931, thanks Tjofras) (from r110889)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112864 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:01:03 +00:00
Sam Minnee
2c60a67e09 BUGFIX Case insensitive DateField value navigation (fixes #5990, thanks gw0( (from r110838)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112851 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:40:21 +00:00
Sam Minnee
c5f4926d4d BUGFIX Fixed DateField->validate() with keyed, but empty array values
MINOR Fixed DateField/TimeField validation message translation (wrong sprintf() nesting) (from r107789)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112696 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-18 22:25:41 +00:00
Sam Minnee
171fdd6050 BUGFIX Using actual date format settings in DateField/TimeField->validate() messages (from r107786)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112694 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-18 22:23:40 +00:00
Sam Minnee
40bc9ced5d BUGFIX Limit 'showcalendar' javascript option to DateField instances (rather than applying to all available) (from r107785)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112693 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-18 22:22:56 +00:00