mirror of
https://github.com/moodle/moodle.git
synced 2025-04-05 00:12:42 +02:00
MDL-65034 forum: Rename identifier to camel case
This commit is contained in:
parent
e564ae863d
commit
ee6b5ba343
2
mod/forum/amd/build/discussion.min.js
vendored
2
mod/forum/amd/build/discussion.min.js
vendored
@ -1 +1 @@
|
||||
define(["jquery","core/custom_interaction_events","mod_forum/selectors"],function(a,b,c){var d=function(a){var b=a.prev(c.post.post);if(b.length){var d=b.find(c.post.post).last();d.length?d.focus():b.focus()}else a.parents(c.post.post).first().focus()},e=function(b){var d=b.find(c.post.post).first();if(d.length)d.focus();else{var e=b.next(c.post.post);e.length?e.focus():b.parents().toArray().forEach(function(b){var d=a(b).next(c.post.post);if(d.length)return void d.focus()})}},f=function(f){var g=f.find(c.post.post);g.each(function(b,d){var e=a(d).find(c.post.action),f=e.first();e.attr("tabindex","-1"),f.attr("tabindex",0)}),b.define(f,[b.events.up,b.events.down,b.events.next,b.events.previous,b.events.home,b.events.end]),f.on(b.events.up,function(){var b=a(document.activeElement).closest(c.post.post);b.length?d(b):f.find(c.post.post).first().focus()}),f.on(b.events.down,function(){var b=a(document.activeElement).closest(c.post.post);b.length?e(b):f.find(c.post.post).first().focus()}),f.on(b.events.home,function(){f.find(c.post.post).first().focus()}),f.on(b.events.end,function(){f.find(c.post.post).last().focus()}),f.on(b.events.next,c.post.action,function(b,d){var e=a(b.target),f=e.closest(c.post.actions_container),g=f.find(c.post.action),h=e.next(c.post.action);g.attr("tabindex","-1"),h.length||(h=g.first()),h.attr("tabindex",0),h.focus(),d.originalEvent.preventDefault()}),f.on(b.events.previous,c.post.action,function(b,d){var e=a(b.target),f=e.closest(c.post.actions_container),g=f.find(c.post.action),h=e.prev(c.post.action);g.attr("tabindex","-1"),h.length||(h=g.last()),h.attr("tabindex",0),h.focus(),d.originalEvent.preventDefault()}),f.on(b.events.home,c.post.action,function(b,d){var e=a(b.target),f=e.closest(c.post.actions_container),g=f.find(c.post.action),h=g.first();g.attr("tabindex","-1"),h.attr("tabindex",0),h.focus(),b.stopPropagation(),d.originalEvent.preventDefault()}),f.on(b.events.end,c.post.action,function(b,d){var e=a(b.target),f=e.closest(c.post.actions_container),g=f.find(c.post.action),h=g.last();g.attr("tabindex","-1"),h.attr("tabindex",0),h.focus(),b.stopPropagation(),d.originalEvent.preventDefault()})};return{init:function(a){f(a)}}});
|
||||
define(["jquery","core/custom_interaction_events","mod_forum/selectors"],function(a,b,c){var d=function(a){var b=a.prev(c.post.post);if(b.length){var d=b.find(c.post.post).last();d.length?d.focus():b.focus()}else a.parents(c.post.post).first().focus()},e=function(b){var d=b.find(c.post.post).first();if(d.length)d.focus();else{var e=b.next(c.post.post);e.length?e.focus():b.parents().toArray().forEach(function(b){var d=a(b).next(c.post.post);if(d.length)return void d.focus()})}},f=function(f){var g=f.find(c.post.post);g.each(function(b,d){var e=a(d).find(c.post.action),f=e.first();e.attr("tabindex","-1"),f.attr("tabindex",0)}),b.define(f,[b.events.up,b.events.down,b.events.next,b.events.previous,b.events.home,b.events.end]),f.on(b.events.up,function(){var b=a(document.activeElement).closest(c.post.post);b.length?d(b):f.find(c.post.post).first().focus()}),f.on(b.events.down,function(){var b=a(document.activeElement).closest(c.post.post);b.length?e(b):f.find(c.post.post).first().focus()}),f.on(b.events.home,function(){f.find(c.post.post).first().focus()}),f.on(b.events.end,function(){f.find(c.post.post).last().focus()}),f.on(b.events.next,c.post.action,function(b,d){var e=a(b.target),f=e.closest(c.post.actionsContainer),g=f.find(c.post.action),h=e.next(c.post.action);g.attr("tabindex","-1"),h.length||(h=g.first()),h.attr("tabindex",0),h.focus(),d.originalEvent.preventDefault()}),f.on(b.events.previous,c.post.action,function(b,d){var e=a(b.target),f=e.closest(c.post.actionsContainer),g=f.find(c.post.action),h=e.prev(c.post.action);g.attr("tabindex","-1"),h.length||(h=g.last()),h.attr("tabindex",0),h.focus(),d.originalEvent.preventDefault()}),f.on(b.events.home,c.post.action,function(b,d){var e=a(b.target),f=e.closest(c.post.actionsContainer),g=f.find(c.post.action),h=g.first();g.attr("tabindex","-1"),h.attr("tabindex",0),h.focus(),b.stopPropagation(),d.originalEvent.preventDefault()}),f.on(b.events.end,c.post.action,function(b,d){var e=a(b.target),f=e.closest(c.post.actionsContainer),g=f.find(c.post.action),h=g.last();g.attr("tabindex","-1"),h.attr("tabindex",0),h.focus(),b.stopPropagation(),d.originalEvent.preventDefault()})};return{init:function(a){f(a)}}});
|
2
mod/forum/amd/build/selectors.min.js
vendored
2
mod/forum/amd/build/selectors.min.js
vendored
@ -1 +1 @@
|
||||
define([],function(){return{subscription:{toggle:"[data-type='subscription-toggle'][data-action='toggle']"},post:{post:'[data-region="post"]',action:'[data-region="post-action"]',actions_container:'[data-region="post-actions-container"]'}}});
|
||||
define([],function(){return{subscription:{toggle:"[data-type='subscription-toggle'][data-action='toggle']"},post:{post:'[data-region="post"]',action:'[data-region="post-action"]',actionsContainer:'[data-region="post-actions-container"]'}}});
|
@ -155,7 +155,7 @@ function(
|
||||
|
||||
root.on(CustomEvents.events.next, Selectors.post.action, function(e, data) {
|
||||
var currentAction = $(e.target);
|
||||
var container = currentAction.closest(Selectors.post.actions_container);
|
||||
var container = currentAction.closest(Selectors.post.actionsContainer);
|
||||
var actions = container.find(Selectors.post.action);
|
||||
var nextAction = currentAction.next(Selectors.post.action);
|
||||
|
||||
@ -173,7 +173,7 @@ function(
|
||||
|
||||
root.on(CustomEvents.events.previous, Selectors.post.action, function(e, data) {
|
||||
var currentAction = $(e.target);
|
||||
var container = currentAction.closest(Selectors.post.actions_container);
|
||||
var container = currentAction.closest(Selectors.post.actionsContainer);
|
||||
var actions = container.find(Selectors.post.action);
|
||||
var nextAction = currentAction.prev(Selectors.post.action);
|
||||
|
||||
@ -191,7 +191,7 @@ function(
|
||||
|
||||
root.on(CustomEvents.events.home, Selectors.post.action, function(e, data) {
|
||||
var currentAction = $(e.target);
|
||||
var container = currentAction.closest(Selectors.post.actions_container);
|
||||
var container = currentAction.closest(Selectors.post.actionsContainer);
|
||||
var actions = container.find(Selectors.post.action);
|
||||
var firstAction = actions.first();
|
||||
|
||||
@ -205,7 +205,7 @@ function(
|
||||
|
||||
root.on(CustomEvents.events.end, Selectors.post.action, function(e, data) {
|
||||
var currentAction = $(e.target);
|
||||
var container = currentAction.closest(Selectors.post.actions_container);
|
||||
var container = currentAction.closest(Selectors.post.actionsContainer);
|
||||
var actions = container.find(Selectors.post.action);
|
||||
var lastAction = actions.last();
|
||||
|
||||
|
@ -29,7 +29,7 @@ define([], function() {
|
||||
post: {
|
||||
post: '[data-region="post"]',
|
||||
action: '[data-region="post-action"]',
|
||||
actions_container: '[data-region="post-actions-container"]'
|
||||
actionsContainer: '[data-region="post-actions-container"]'
|
||||
}
|
||||
};
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user