Skip to content

Commit

Permalink
Merge pull request #10127 from cdrini/fix-edit-js
Browse files Browse the repository at this point in the history
Remove no longer needed identifier jquery repeat
  • Loading branch information
cdrini authored Dec 6, 2024
2 parents c232799 + 0d82393 commit d1a4947
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
8 changes: 0 additions & 8 deletions openlibrary/plugins/openlibrary/js/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,6 @@ export function validateIdentifiers(data) {
return true;
}

export function initIdentifierValidation() {
initJqueryRepeat();
$('#identifiers').repeat({
vars: {prefix: 'edition--'},
validate: function(data) {return validateIdentifiers(data)},
});
}

export function initClassificationValidation() {
initJqueryRepeat();
const dataConfig = JSON.parse(document.querySelector('#classifications').dataset.config);
Expand Down
6 changes: 1 addition & 5 deletions openlibrary/plugins/openlibrary/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ jQuery(function () {
const autocompleteSubjects = document.querySelector('.csv-autocomplete--subjects');
const addRowButton = document.getElementById('add_row_button');
const roles = document.querySelector('#roles');
const identifiers = document.querySelector('#identifiers');
const classifications = document.querySelector('#classifications');
const excerpts = document.getElementById('excerpts');
const links = document.getElementById('links');
Expand All @@ -109,7 +108,7 @@ jQuery(function () {
edition ||
autocompleteAuthor || autocompleteLanguage || autocompleteWorks ||
autocompleteSeeds || autocompleteSubjects ||
addRowButton || roles || identifiers || classifications ||
addRowButton || roles || classifications ||
excerpts || links
) {
import(/* webpackChunkName: "user-website" */ './edit')
Expand All @@ -132,9 +131,6 @@ jQuery(function () {
if (roles) {
module.initRoleValidation();
}
if (identifiers) {
module.initIdentifierValidation();
}
if (classifications) {
module.initClassificationValidation();
}
Expand Down

0 comments on commit d1a4947

Please sign in to comment.