mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-68951 user: Add appropriate exceptions for table/participants
This commit is contained in:
parent
bbb7dfc62e
commit
eb087fc5de
12 changed files with 31 additions and 20 deletions
2
lib/table/amd/build/dynamic.min.js
vendored
2
lib/table/amd/build/dynamic.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -26,6 +26,7 @@ import Events from './local/dynamic/events';
|
|||
import Pending from 'core/pending';
|
||||
import {addIconToContainer} from 'core/loadingicon';
|
||||
import {fetch as fetchTableData} from 'core_table/local/dynamic/repository';
|
||||
import Notification from 'core/notification';
|
||||
|
||||
let watching = false;
|
||||
|
||||
|
@ -353,49 +354,50 @@ export const init = () => {
|
|||
if (sortableLink) {
|
||||
e.preventDefault();
|
||||
|
||||
setSortOrder(tableRoot, sortableLink.dataset.sortby, sortableLink.dataset.sortorder);
|
||||
setSortOrder(tableRoot, sortableLink.dataset.sortby, sortableLink.dataset.sortorder)
|
||||
.catch(Notification.exception);
|
||||
}
|
||||
|
||||
const firstInitialLink = e.target.closest(Selectors.initialsBar.links.firstInitial);
|
||||
if (firstInitialLink !== null) {
|
||||
e.preventDefault();
|
||||
|
||||
setFirstInitial(tableRoot, firstInitialLink.dataset.initial);
|
||||
setFirstInitial(tableRoot, firstInitialLink.dataset.initial).catch(Notification.exception);
|
||||
}
|
||||
|
||||
const lastInitialLink = e.target.closest(Selectors.initialsBar.links.lastInitial);
|
||||
if (lastInitialLink !== null) {
|
||||
e.preventDefault();
|
||||
|
||||
setLastInitial(tableRoot, lastInitialLink.dataset.initial);
|
||||
setLastInitial(tableRoot, lastInitialLink.dataset.initial).catch(Notification.exception);
|
||||
}
|
||||
|
||||
const pageItem = e.target.closest(Selectors.paginationBar.links.pageItem);
|
||||
if (pageItem) {
|
||||
e.preventDefault();
|
||||
|
||||
setPageNumber(tableRoot, pageItem.dataset.pageNumber);
|
||||
setPageNumber(tableRoot, pageItem.dataset.pageNumber).catch(Notification.exception);
|
||||
}
|
||||
|
||||
const hide = e.target.closest(Selectors.table.links.hide);
|
||||
if (hide) {
|
||||
e.preventDefault();
|
||||
|
||||
hideColumn(tableRoot, hide.dataset.column);
|
||||
hideColumn(tableRoot, hide.dataset.column).catch(Notification.exception);
|
||||
}
|
||||
|
||||
const show = e.target.closest(Selectors.table.links.show);
|
||||
if (show) {
|
||||
e.preventDefault();
|
||||
|
||||
showColumn(tableRoot, show.dataset.column);
|
||||
showColumn(tableRoot, show.dataset.column).catch(Notification.exception);
|
||||
}
|
||||
|
||||
const resetTablePreferencesLink = e.target.closest('.resettable a');
|
||||
if (resetTablePreferencesLink) {
|
||||
e.preventDefault();
|
||||
|
||||
resetTablePreferences(tableRoot);
|
||||
resetTablePreferences(tableRoot).catch(Notification.exception);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue