body: bodyPromise,
footer: footer.customfootertemplate,
large: true,
+ scrollable: false,
templateContext: {
classes: 'modchooser'
}
return !this.getModal().hasClass('modal-lg');
};
+ /**
+ * Set this modal to be scrollable or not.
+ *
+ * @method setScrollable
+ * @param {bool} value Whether the modal is scrollable or not
+ */
+ Modal.prototype.setScrollable = function(value) {
+ if (!value) {
+ this.getModal()[0].classList.remove('modal-dialog-scrollable');
+ return;
+ }
+
+ this.getModal()[0].classList.add('modal-dialog-scrollable');
+ };
+
+
/**
* Determine the highest z-index value currently on the page.
*
var create = function(modalConfig, triggerElement) {
var type = modalConfig.type || TYPES.DEFAULT;
var isLarge = modalConfig.large ? true : false;
+ // If 'scrollable' is not configured, set the modal to be scrollable by default.
+ var isScrollable = modalConfig.hasOwnProperty('scrollable') ? modalConfig.scrollable : true;
var registryConf = null;
var templateContext = {};
modal.setRemoveOnClose(modalConfig.removeOnClose);
}
+ modal.setScrollable(isScrollable);
+
return modal;
});
This files describes API changes in core libraries and APIs,
information provided here is intended especially for developers.
+=== 4.0 ===
+* Added function setScrollable in core/modal. This function can be used to set the modal's body to be scrollable or not
+ when the modal's height exceeds the browser's height. This is also supported in core/modal_factory through the
+ 'scrollable' config parameter which can be set to either true or false. If not explicitly defined, the default value
+ of 'scrollable' is true.
+
=== 3.9 ===
* Following function has been deprecated, please use \core\task\manager::run_from_cli().
- cron_run_single_task()
}
}
+echo $OUTPUT->header();
+
$manager = new message_airnotifier_manager();
$warnings = [];
$msg .= $OUTPUT->continue_button($returl);
-echo $OUTPUT->header();
echo $OUTPUT->box($msg, 'generalbox ');
echo $OUTPUT->footer();
if ($ADMIN->fulltree) {
$notify = new \core\output\notification(
- get_string('moodleappsportallimitswarning', 'message_airnotifier'),
+ get_string('moodleappsportallimitswarning', 'message_airnotifier',
+ (new moodle_url('https://apps.moodle.com'))->out()),
\core\output\notification::NOTIFY_WARNING);
$settings->add(new admin_setting_heading('tool_mobile/moodleappsportalfeaturesappearance', '', $OUTPUT->render($notify)));