403 Commits

Author SHA1 Message Date
Rajesh Taneja
43759f5e23
MDL-46514 behat: Catch errors shown by JS 2016-08-19 06:46:27 +08:00
Eloy Lafuente (stronk7)
ddf1d5c692 Merge branch 'MDL-55244-master' of git://github.com/danpoltawski/moodle 2016-07-27 00:19:40 +02:00
Dan Poltawski
3a0bc0fdc4 MDL-55244 js: build changes
There should be no changes to minified code
2016-07-25 07:58:05 +01:00
Dan Poltawski
bc8b6dc652 MDL-55244 js: fix various lint warnings in yui
* Incorrect brace style
* Empty functions
* Multiple var statemnts
2016-07-25 07:53:05 +01:00
Dan Poltawski
5bb4f444de MDL-55244 js: fix problems with eslint --fix
eslint --fix '**/yui/src/**/*.js'
2016-07-25 07:53:05 +01:00
Adrian Greeve
b559497393 MDL-54796 forms: Editor restore event created.
The editor restore event is currently being subscribed
to by the change checkers to refresh their savedstate.
2016-07-25 10:42:58 +08:00
Dan Poltawski
ad3f8cd18c MDL-54944 eslint: make the .eslintrc default stricter
Instead of using the more rollup-tolerant config for all files, make the
configuration stricter by default but lower in grunt for yui modules.

This means that manual runs (prechecker) or editor integrations will
flag up the errors as well as grunt.

Also add ignore lines to the core files so that eslint isn't noisy when
not running with grunt.
2016-07-11 12:44:34 +01:00
Cameron Ball
fd5466af99 MDL-54722 navigation: Properly overflow expanded nav trees 2016-06-01 10:15:22 +08:00
David Monllao
f0a2dbf188 Merge branch 'MDL-54121-master' of git://github.com/damyon/moodle 2016-05-17 17:16:12 +08:00
Andrew Nicols
6885517d78 MDL-54121 core-notification: Fix lockscroll recalc for nest dialogues 2016-05-13 12:12:05 +08:00
Damyon Wiese
79e4a72f09 MDL-54121 core-notification: Make dialogues re-calculate the lockscroll
When the content of a dialogue changes after it is first opened - you need to call centerDialogue()
to make sure it still sits in the middle of the window. In addition this now recalculates the "lockScroll"
so that if you need to scroll down to see all of the dialogue you can do it.
2016-05-11 13:52:47 +08:00
Andrew Nicols
a321eb06b7 MDL-53293 core: Add destructor phases to core-dragdrop 2016-05-11 08:19:39 +08:00
Ryan Wyllie
5d2c5ba3e4 MDL-51983 actionmenu: fix hideIfOutside
The hideIfOutside function was being too restrictive with the
selector for checking if the event occurred within a menu child
(anchor tag) rather than the menu itself.
2015-11-04 03:42:09 +00:00
Ryan Wyllie
4456c306df MDL-51983 actionmenu: stop event propagation
Stop event propagation on keyboard events that have been
successfully handled by the action menu code.
2015-11-04 03:41:34 +00:00
Ryan Wyllie
f8f477ece5 MDL-51799 javascript: dialogue accessibility
Moved setting the aria visiblity of the dialogues from the show
and hide functions into the visibility change handler to stop
multiple calls.

Also made the visibility checker just continue to buffer the elements
it hides, rather than clearning them, on multiple calls.
2015-10-29 05:10:10 +00:00
sam marshall
a0ef17628a MDL-51451 Moodle dialogues: Lock scroll causes background jump
When you add a module or otherwise cause a Moodle dialogue to appear, this
enables the 'lock scroll' feature (the scrollbar disappears).

On some browsers this causes the width of the viewport to change, which can
cause centered/right-aligned theme elements to move distractingly.

This change temporarily sets body max-width while lock scroll is active.
2015-10-07 10:24:25 +01:00
Eloy Lafuente (stronk7)
880eb93d3f Merge branch 'MDL-51292-master' of git://github.com/cameron1729/moodle 2015-09-30 17:32:57 +02:00
Andrew Nicols
853555f9a7 Merge branch 'MDL-35918-master' of git://github.com/ryanwyllie/moodle 2015-09-29 13:42:24 +08:00
Ryan Wyllie
f56ae5a7ac MDL-35918 javascript: dialogues screen reader support
The YUI notification dialogues will now set the appropriate
aria attributes when they are shown/hidden to allow screen
readers to navigate them correctly.

When the dialogue is shown all background elements will be marked
as hidden while the dialogue is marked as visible to a screen reader.

When the dialogue is closed the modified elements will be reverted
to their previous state and the dialogue will be marked as hidden to
a screen reader.
2015-09-29 04:48:57 +00:00
Cameron Ball
584dd1b35d MDL-51292 core_message: Notify when leaving page or closing modal.
- Add reset_dirty_state method to formchangechecker. This is useful when used in combination with a modal.
- Modify hide method of sendmessage to reset formchangechecker dirty state on modal close.
2015-09-24 12:35:20 +08:00
Dan Poltawski
74ede2d89a Merge branch 'MDL-46157-master' of git://github.com/cameron1729/moodle 2015-09-22 08:15:01 +01:00
Jun Pataleta
36e0030ffe MDL-50852 formslib: Fixed client-side form validation problem.
This patch fixes the problem of client validation being broken when
shortforms is not enabled. This issue is caused by moodle-core-event
module not being loaded and the broadcast parameter in the
Y.Global.publish set to 2 instead of true.
2015-09-09 15:35:01 +08:00
Cameron Ball
9b5882d3e1 MDL-46157 drag and drop: Improve item labels
Ignore the edit menu when determining the region to drag.
2015-09-08 11:33:24 +08:00
David Monllao
c32c21802b Merge branch 'MDL-50971' of git://github.com/NeillM/moodle 2015-09-02 09:23:11 +08:00
Neill Magill
ccfb9b69db MDL-50971 ActionMenu: Action menus cause page to jump when closing
This patch changes the behavior of open action menus when using a mouse.

Before this patch when clicking on the page with an open action menu the focus would be
returned to the action menu's call button. This could cause the page to jump when a
mouse user did not close an action menu, scrolled and then tried to perform another
action on the page.

After this patch when clicking the focus will not be returned to the action menu's call button.
The behavior of the script will not be changed when using the keyboard.
2015-08-28 12:13:16 +01:00
Andrew Nicols
e3554c1c57 MDL-50999 dock: Stop adding commands to DOM
The commands div should not be added to the DOM. The version shown in the
dock is different to the standard version in the block, and is manually
added to the dock panel when it is displayed.

The docked version contains additional actions (e.g. the undock button).

The original version of the dock should ideally remain untouched.

Note: A duplicate delegation was discovered when fixing this issue. This
was previosuly not triggered because the watched Node was removed
before the delegation took effect.
2015-08-05 10:06:35 +08:00
Neill Magill
2c9aca8a45 MDL-50563 blocks: A hidden block that is dropped should be dimmed
Before this patch when dragging and dropping a hidden block it would display as though visible when it was dropped.

This is only a display issue, as a page refresh caused it to be dimmed in its new position.
2015-07-17 09:25:38 +01:00
Dan Poltawski
56420e3664 Merge branch 'MDL-39319-master' of git://github.com/mastnym/moodle 2015-07-01 11:04:37 +02:00
Martin Mastny
78ee66c097 MDL-50216 JavaScript: Default visibility of M.core.info set to false 2015-06-16 09:50:36 +08:00
Martin Mastny
96a2e00d42 MDL-39319 langimport: Javascript confirmation when uninstalling 2015-05-29 13:08:33 +08:00
Martin Mastny
eaec9cfec7 MDL-49783 forms: Collapsed form section is opened on error 2015-05-07 08:57:30 +08:00
Dave Cooper
81d7de1aa1 MDL-48936 lang: Changed "My Home" to "Dashboard".
Part of MDL-45774
2015-04-10 17:16:27 +08:00
Dan Poltawski
68d52a732f Merge branch 'master_MDL-48419' of https://github.com/danmarsden/moodle 2015-03-23 11:15:55 +00:00
Dan Marsden
552281e461 MDL-48419 mod_scorm: Check net script too agressive
in some cases high latency and network issues result in longer
than 2 sec responses from a server, increase this to avoid
excessive warnings.
2015-03-18 20:06:39 +13:00
Dan Poltawski
3bec364f35 Merge branch 'MDL-49442-master' of git://github.com/jethac/moodle 2015-03-16 13:31:07 +00:00
Jetha Chan
a1679a115c MDL-49442 javascript: fix handlebars get_string behaviour 2015-03-09 17:22:22 +08:00
Andrew Nicols
eb67d5a690 MDL-49094 dock: Add -only class to body for non-legacy regions
This also tidies up the dock region code.
2015-03-06 11:09:44 +08:00
Andrew Nicols
557f44d970 MDL-48620 JavaScript: Updated shifted files to comply with coding style 2015-01-23 14:51:24 +08:00
Andrew Nicols
57996fe956 MDL-44642 session: Add a client-side session keepalive system
For pages where there will be significant user interaction in which the
server is not updated, it may be necessary to poll the server periodically
to touch the session.

This makes use of the existing checknet script which was designed for
checking network connectivity but fits into this use-case reasonably well.
2014-12-16 08:32:46 +08:00
Andrew Nicols
64e7aa4de1 MDL-28286 JavaScript: Convert all uses of M.str to M.util.get_string 2014-12-01 08:32:04 +13:00
Adam Olley
09869dd583 MDL-42756 dock: Trigger actionmenu enhance when showing dock panel
Additionally fixes the styling for the actionmenu icon size in
bootstrapbase'd themes.
2014-11-12 14:10:07 +10:30
Dan Poltawski
0af29b0383 Merge branch 'MDL-47368' of git://github.com/timhunt/moodle 2014-10-29 11:18:15 +00:00
Tim Hunt
08ab7a3c10 MDL-47368 core JS: dragdrop click move fills the dom with divs
Every time you click the move icon, it builds a new dialogue with a list
of drop targets, but it never discards the old ones. Not only does this
fill the DOM with junk, but it also causes Behat tests to fail, since
the old dialogues come first, and are hidden, but contain links with the
same text that you are trying to click.
2014-10-28 11:32:44 +00:00
Andrew Nicols
2af57bdbc5 MDL-47734 core: Do not set scrolltop on fixed dialogues
Fixed position dialogues use a different xy positioning than standard
dialogues so cannot use the scrollTop positioning method.
2014-10-27 11:22:30 +08:00
Dan Poltawski
1429a25cd8 Merge branch 'MDL-47734-master' of git://github.com/andrewnicols/moodle 2014-10-24 14:13:59 +01:00
Andrew Nicols
d247a50113 MDL-47734 core: Prevent jumping of YUI dialogues
When a YUI dialogue was opened, it was focusing on the boundingBox, with
the browser moving the scroll position to focus on the top of the
boundingBox. This caused a jump. This only happens when the dialogue is
modal and consequentially has a maskNode present as it changes the initial
positioning behaviour of the boundingBox.

To avoid this, when the maskNode is shown, the dialogue is position at 0,0
in the current viewport. For centered dialogues, the dialogue is
automatically re-positioned after the window has shown. For non-centered
dialogues, the original position is stored and the dialogue is restored to
that position after it has been displayed.

This should not interfere with use of the align function as this will be
called later in the proceedings, after the show has run.
2014-10-23 14:44:14 +08:00
Andrew Nicols
4a8c380abb MDL-47513 Fix RTL issues with grade report 2014-10-23 11:15:35 +08:00
sam marshall
5298d02f6e MDL-42974 UI: Modal dialogs do not work in IE8 2014-09-26 15:47:36 +01:00
Nadav Kavalerchik
f2ee054b52 MDL-47269 yui/src/dock: Invert dock reset blocks icon, in RTL mode 2014-09-22 11:41:17 +03:00
Marina Glancy
49b9144c87 Merge branch 'm28_MDL-46315' of git://github.com/totara/moodle 2014-08-12 15:01:30 +08:00