mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-32744: Maintain format specific CSS selectors in the format configuration.
This updates existing core formats and introduce a configuration function.
This commit is contained in:
parent
4f7f2a8828
commit
405eaac272
5 changed files with 214 additions and 46 deletions
|
@ -5,13 +5,24 @@ M.course = M.course || {};
|
|||
M.course.format = M.course.format || {};
|
||||
|
||||
/**
|
||||
* Get section list for this format
|
||||
* Get sections config for this format
|
||||
*
|
||||
* @param {YUI} Y YUI3 instance
|
||||
* @return {string} section list selector
|
||||
* The section structure is:
|
||||
* <ul class="topics">
|
||||
* <li class="section">...</li>
|
||||
* <li class="section">...</li>
|
||||
* ...
|
||||
* </ul>
|
||||
*
|
||||
* @return {object} section list configuration
|
||||
*/
|
||||
M.course.format.get_section_selector = function(Y) {
|
||||
return 'li.section';
|
||||
M.course.format.get_config = function() {
|
||||
return {
|
||||
container_node : 'ul',
|
||||
container_class : 'topics',
|
||||
section_node : 'li',
|
||||
section_class : 'section'
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,13 +5,24 @@ M.course = M.course || {};
|
|||
M.course.format = M.course.format || {};
|
||||
|
||||
/**
|
||||
* Get section list for this format
|
||||
* Get sections config for this format
|
||||
*
|
||||
* @param {YUI} Y YUI3 instance
|
||||
* @return {string} section list selector
|
||||
* The section structure is:
|
||||
* <ul class="weeks">
|
||||
* <li class="section">...</li>
|
||||
* <li class="section">...</li>
|
||||
* ...
|
||||
* </ul>
|
||||
*
|
||||
* @return {object} section list configuration
|
||||
*/
|
||||
M.course.format.get_section_selector = function(Y) {
|
||||
return 'li.section';
|
||||
M.course.format.get_config = function() {
|
||||
return {
|
||||
container_node : 'ul',
|
||||
container_class : 'weeks',
|
||||
section_node : 'li',
|
||||
section_class : 'section'
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue