This module supports focusing on a specified Node, or attempting to
determine the Node which caused the displayed the Widget to return focus to
that location.
Most of the moodle core dialogue types should be shown modally, and
centred. They should also be shown on instantiation.
Rather than re-define all of these settings, this patch introduces a new
subclass of M.core.dialogue which sets them up with the same settings.
Various dialogue attributes are optional and are provided by the parent and
not provided as attributes to the dialogue being initted.
As a result, if the setting is not provided during init, we were assuming
that the value would be false rather than checking the real attribute.
The listener was previously confirming, even when the cancel or 'No'
buttons were selected. However, having the default action as 'Confirm'
seems dangerous in this situation, so removing this option entirely.
* Fixed the way we added the block class to the dock panel in dock.js
* Added a class to the h2 that is used to test dock title width
* Fixed RTL alignment issues as best I could at present
* Fixed overlap of dock + navbar on small screens
* Fixed the docked block width to be constrained to the available space
* Fixed hidden actions on docked blocks
The [X] button on the dialogue is another form of the 'No' button and
should behave as such. In some dialogues this matters more than others
because the dialogue is destroyed.
Although we were previously creating the DOM markup for a block region if
it did not exist, we were not making use of it.
This change ensures that we make use of that block region as part of the
blocks code.
When we submit the chooser dialogue, we disable the radio buttons used for
selection. Since browsers do not actually submit values for disabled
elements, we store the radio value in a hidden element which is not
disabled.
This commit abstracts this out of the activity chooser and into the generic
chooser dialogue such that other types of chooser dialogue may use it.
In certain situations, the click event is propagated through to the
hideIfOutside and immediately closes the menu.
This happens when blocks are dock for example.
We used to ignore the 'visible' field in the initializer, but now we hide
dialogues if visible is false. This was an unintentional change from the
stable API and means that confirmation boxes, alerts, and exceptions are no
longer shown by default.
The lightbox attribute just sets the modal attribute of the upstream
dialogue and provides no real benefit. We should deprecate it in favour of
documented upstream attributes of Y.Panel.
Since we modify the config object when instantiating a new Dialogue, we
need to clone the configuration to prevent those changes from being
reflected back in the caller.