621 Commits

Author SHA1 Message Date
Damyon Wiese
1320c3177b Merge branch 'MDL-18375_master' of git://github.com/markn86/moodle 2013-09-09 10:41:12 +08:00
Petr Škoda
4db9d48253 MDL-28094 add function that detects if subdirs used and fix subdirs option in form editor 2013-09-07 11:30:18 +02:00
Mark Nelson
deed22ea39 MDL-18375 calendar: removed usage of the calendar type in the usergetdate function
The usergetdate function is not only used to display dates, it is also passed
to the function make_timestamp. This means users using another calendar type
other than Gregorian will generate incorrect timestamps which may be saved in
the DB or used to populate the date_selector and date_time_selector elements.
For example, when creating an assignment using another calendar type other
than Gregorian, the mod_form.php file calls $this->apply_admin_defaults()
which uses the function usergetmidnight to set the "Allow submissions from"
date to today's date and the "Due date" field to 7 days in the future. The
usergetmidnight function calls usergetdate which is then passed to
make_timestamp. Since the usergetdate function was using the calendar
type's timestamp_to_date_array function the date being passed to
make_timestamp was not in Gregorian. So, when using the hijri calendar the
year 1434 was being passed which was generating a large negative number as
the timestamp which was then used to populate the date fields.
2013-09-05 18:32:16 +08:00
Mark Nelson
6eafa4ddba MDL-18375 calendar: changed the name of the function factory to be more descriptive 2013-09-05 18:32:16 +08:00
Mark Nelson
022745acd2 MDL-18375 calendar: implemented the usage of the recently introduced automatic class loading 2013-09-05 18:32:16 +08:00
Mark Nelson
29cb1e83b0 MDL-18375 calendar: only display the YUI2 calendar when the Gregorian type is used 2013-09-05 18:30:05 +08:00
Mark Nelson
2f00e1b245 MDL-18375 calendar: huge refactor of the initial patch
1) Moved the calendar types location to a sub-folder in the calendar directory.
2) Removed/moved language strings.
3) Removed calendar types that should be downloaded as plugins.
4) Removed a Non-English language pack for the Gregorian calendar type that
should be downloaded separately.
5) Removed custom files responsible for checking for updates and uninstalling
calendar types, which should be done by core.
6) Removed JS from the calendar_month block as there is no non-JS alternative
provided and the JS written does not make use of the YUI library to ensure
multiple browser support.
7) Removed code from the base class responsible for creating timestamps that
are saved in the DB.
8) Added PHPDocs.

Note: In the original patch we are editing core functions responsible for saving
time in the database in the calendar base class. This is very dangerous, we do
not want to touch these functions as it could cause a complete fubar of the
database. There are places we are forcing the use of the gregorian calendar as
we are passing dates generated by the PHP date function, where as sometimes
we pass dates from usergetdate (which was being overwritten to return the
date specific to the calendar). We can not expect third party modules to
change the calendar type depending on the format they pass to these functions.
2013-09-05 18:30:05 +08:00
Shamim Rezaie
6dd59aabfa MDL-18375 calendar: added multiple calendar support
Conflicts:

	course/edit_form.php
	lib/db/install.xml
	lib/form/dateselector.php
	lib/form/datetimeselector.php
	lib/setup.php
2013-09-05 18:30:05 +08:00
Dan Poltawski
11b80a6044 Merge branch 'MDL-35930' of git://github.com/rwijaya/moodle 2013-08-26 14:55:54 +08:00
Rossiani Wijaya
3f0d3a7ea0 MDL-35930 filepicker filemanaer: make announcement on page change when selecting view files options 2013-08-26 14:30:35 +08:00
Petr Škoda
1eb135568a MDL-41022 cleanup form tests 2013-08-24 16:18:18 +02:00
Damyon Wiese
fd782261de MDL-39851 javascript: Fixes for filepicker dialogs
Fixes display issues with the filepicker dialogs that were
converted to M.core.dialogue.

Note: These dialogue use table based layouts and the table width is not
counted in the form that it sits in. I have changed the dialogues to have
a wider width but for really small screens this causes horizontal scrolling.

The only solution for that is to rewrite all the filepicker/filemanager dialogs
to use css for layout.
2013-08-15 10:52:24 +08:00
Dan Poltawski
387d040b7b Merge branch 'MDL-40668-master' of git://github.com/damyon/moodle 2013-08-13 11:14:37 +08:00
Damyon Wiese
0c0dfa8fbd MDL-40668 tinymce: Remove collapsable editor options
We have an alternative (pdw toolbars)
Also, allow tinymce to be collapsed down to a single row.
2013-08-13 10:54:36 +08:00
Damyon Wiese
bf7c86cfcf MDL-39851 M.core.dialogue: Various fixes
Items addressed
* Get rid of custom attribute srcNode
* Change extraClasses to a config only parameter.
* Change attribute fullscreen to a method.
* Restore the original window overflow value.
* Use setStyles instead of setStyle for performance.
* Tinymce end the zindex wars
* Prevent fullscreen dialogs in an iframe (tinymce managefiles plugin).
* tinymce: Cross browser fix for zindex on popups
* Use CSS for overflow changes (easier to keep track of the previous state).
* Fix Coding style for css changes
2013-08-13 10:42:01 +08:00
Damyon Wiese
c402943a33 MDL-39851 forms: Convert filemanager popups to M.core.dialogue 2013-08-13 10:39:36 +08:00
Rossiani Wijaya
1b25169215 MDL-35934 Filemanager: change the set attribute to use setAttribute() instead of YUI set(). 2013-08-12 12:28:03 +08:00
Rossiani Wijaya
26489591ab MDL-35934 Filemanager: update set focus attribute.
Also limit the display string for the dialog header to fit nicely on mobile devices
2013-08-09 10:01:36 +08:00
Rossiani Wijaya
7f60308a35 MDL-35934 Filemanager: add aria attributes for editing file/folder.
Add unique reference ids
2013-08-09 10:01:36 +08:00
Matt Petro
2f8edd067f MDL-35674 formslib: Optimized disabledIf javascript for large forms 2013-07-22 00:08:18 +01:00
Sam Hemelryk
615a5aa6f1 Merge branch 'MDL-39280-master-int' of git://github.com/FMCorz/moodle 2013-06-24 14:19:20 +12:00
Sam Hemelryk
80b3780a53 Revert "MDL-38555 forms: Prevent same data submission multiple times."
This reverts commit 761670208a97c0ed7e1ff7c2e6a7ec5494eb93d3.
2013-06-19 13:45:46 +12:00
Sam Hemelryk
d35d831190 Merge branch 'MDL-38555-master' of https://github.com/lucisgit/moodle 2013-06-18 11:38:05 +12:00
Ruslan Kabalin
761670208a MDL-38555 forms: Prevent same data submission multiple times.
This disables Submit button when the form has been submitted to
prevent consequent submissions before the page has been loaded.
2013-06-12 15:19:47 +01:00
Sam Hemelryk
c601027d8f Revert "MDL-38555 forms: Prevent same data submission multiple times."
This reverts commit 9f2f313e9f7c88eab154450de394c2451f530f58.
2013-06-12 14:22:01 +12:00
Sam Hemelryk
44df0d9aaa Merge branch 'MDL-38555-master' of https://github.com/lucisgit/moodle 2013-06-12 11:36:40 +12:00
Sam Hemelryk
bd7004d51c Merge branch 'wip-mdl-34508' of git://github.com/rajeshtaneja/moodle 2013-06-11 10:29:11 +12:00
Dan Poltawski
f4c824c009 Merge branch 'wip-mdl-39639' of git://github.com/rajeshtaneja/moodle 2013-06-10 15:28:17 +08:00
Mark Nelson
85c402a89d MDL-40008 forms: fixed ordering of the calendar icon and enable checkbox for the date selector element 2013-06-04 11:55:48 +08:00
Rajesh Taneja
75fd791d87 MDL-39639 Formslib: Hide calendar for datetime element on disable event 2013-05-14 11:59:05 +08:00
Mark Nelson
edc4670b4c MDL-39581 forms: prevent calendar popup from changing multiple date elements 2013-05-10 11:22:07 +08:00
Frederic Massart
58f3865fce MDL-39280 form: Multiple select support disabledIf with multiple values 2013-05-10 09:33:46 +08:00
Mark Nelson
e019dcccdf MDL-39463 forms: use the date selectors 'optional' parameter rather than creating additional logic 2013-05-08 16:36:54 +08:00
Eloy Lafuente (stronk7)
4ce97aed0d Merge branch 'wip-mdl-39332' of git://github.com/rajeshtaneja/moodle 2013-05-08 00:28:15 +02:00
Mark Nelson
34f9862edf MDL-39187 forms: fixed issue where calendar pop-up did not display when a date selector form element was added to a group 2013-05-03 13:01:58 +08:00
Rajesh Taneja
5e0ab6704a MDL-39332 Formslib: remove z-index from calendar panel
calendar panel.render() sets zIndex to 0, when calendar is used next to filepicker, it overlaps
zIndex should be set by css and not JS, and previously used removeAttr on panel breaks JS on ie8.
So solution is to render panel and then remove z-index from dom
2013-05-03 10:59:46 +08:00
Damyon Wiese
ea03f1149e Merge branch 'MDL-30940-master' of git://github.com/FMCorz/moodle 2013-04-29 14:03:34 +08:00
Frederic Massart
e62e473d44 MDL-30940 form: Mutiple select work correctly without any selection 2013-04-19 11:04:34 +08:00
Rajesh Taneja
afec254467 MDL-34508 Formslib: Removed deprecated setHelpButton() from editor.php and hidden.php 2013-04-17 14:21:07 +08:00
Damyon Wiese
6a508eaccf Merge branch 'w15_MDL-34674_m25_spell' of git://github.com/skodak/moodle 2013-04-16 15:56:10 +08:00
Dan Poltawski
34ddaf7146 Merge branch 'MDL-39047_master' of https://github.com/markn86/moodle 2013-04-15 12:15:24 +01:00
Mark Nelson
12cb45f199 MDL-39047 forms: set the z-index of the calendar pop-up so that it renders above the filemanager 2013-04-15 17:37:41 +08:00
Frederic Massart
87c1c82286 MDL-38716 accessibility: ARIA attributes and roles defined on form actions 2013-04-15 11:46:05 +08:00
Petr Škoda
0ac97084fa MDL-34674 use browser built-in spell checking in all browsers except < IE10 2013-04-12 11:33:23 +02:00
Mark Nelson
1711361042 MDL-26649 forms: ensure that both necessary variables are set before altering calendar image 2013-04-10 12:48:13 +08:00
Eloy Lafuente (stronk7)
668aaeb8f3 MDL-26649 forms: temp disable problematic call
The new version of the dateselector is causing JS to stop
working completely in a lot of forms, so I've disabled
temporarily the ofending call to allow other stuff to be
integrated and tested.
2013-04-09 19:37:08 +02:00
Mark Nelson
f40df210ab MDL-26649 forms: added a calendar icon that will display the calendar pop-up when clicked rather than the select boxes triggering the event 2013-04-09 14:52:57 +08:00
Eloy Lafuente (stronk7)
33871fbf3e Merge branch 'MDL-38751-master' of git://github.com/FMCorz/moodle 2013-04-04 01:07:23 +02:00
Dan Poltawski
5cc929bc12 Merge branch 'MDL-38691-master-int' of git://github.com/FMCorz/moodle 2013-04-03 16:27:16 +08:00
Frederic Massart
5581c618fc MDL-38751 usability: Different style for cancel button 2013-03-28 11:14:24 +08:00