Revert "Cursor position improvements, focused fields - part 2 (more in addons) [SCI-8147]"

This commit is contained in:
artoscinote 2023-03-21 15:24:40 +01:00 committed by GitHub
parent a43c941b50
commit e2dc2e31ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 6 additions and 27 deletions

View file

@ -1054,10 +1054,6 @@ function reportHandsonTableConverter() {
return reportData;
}
function initNameContainerFocus() {
$('#newReportNameContainer').focus()
}
function initGenerateButton() {
$('.reports-new').on('click', '.generate-button', function() {
$.ajax({
@ -1445,7 +1441,6 @@ function reportHandsonTableConverter() {
$('#reportWizardEditWarning').modal('show');
$('.experiment-contents').sortable();
initNameContainerFocus();
initGenerateButton();
initReportWizard();
initDropdowns();

View file

@ -197,12 +197,6 @@
}
});
$(document).on('shown.bs.modal', function() {
var inputField = $('#repository_name');
var value = inputField.val();
inputField.focus().val('').val(value);
});
$('.create-new-repository').initSubmitModal('#create-repo-modal', 'repository');
if (notTurbolinksPreview()) {
initRepositoriesDataTable('#repositoriesList', $('.repositories-index').hasClass('archived'));

View file

@ -7,7 +7,6 @@ $.fn.dataTable.render.newRowName = function(formId, $cell) {
$cell.html(`
<div class="sci-input-container text-field error-icon">
<input class="sci-input-field"
id="newRepoNameField"
form="${formId}"
type="text"
name="repository_row[name]"

View file

@ -183,8 +183,8 @@ $.fn.dataTable.render.AssignedTasksValue = function(data, row) {
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">${data.tasks}</a>
<div class="dropdown-menu" role="menu">
<div class="sci-input-container right-icon">
<input id="searchAssignedTasks" type="text" class="sci-input-field search-tasks"
placeholder="${I18n.t('repositories.table.assigned_search')}" ></input>
<input type="text" class="sci-input-field search-tasks"
placeholder="${I18n.t('repositories.table.assigned_search')}"></input>
<i class="fas fa-times-circle clear-search"></i>
</div>
<div class="tasks"></div>

View file

@ -157,7 +157,6 @@ var RepositoryDatatable = (function(global) {
}
function changeToEditMode() {
$('#newRepoNameField').focus();
currentMode = 'editMode';
clearRowSelection();

View file

@ -170,10 +170,9 @@ var RepositoryColumns = (function() {
labelHTML: true
};
$.get(modalUrl, (data) => {
var inputField = $manageModal.find('.modal-content').html(data.html)
.find('#repository-column-name');
var value = inputField.val()
inputField.focus().val('').val(value);
$manageModal.find('.modal-content').html(data.html)
.find('#repository-column-name')
.focus();
if (button.data('action') !== 'destroy') {
columnType = $('#repository-column-data-type').val();

View file

@ -9,9 +9,6 @@ function initAssignedTasksDropdown(table) {
}
$(table).on('show.bs.dropdown', '.assign-counter-container', function() {
$(document).on('shown.bs.dropdown', function() {
$('#searchAssignedTasks').focus();
});
var cell = $(this);
loadTasks(cell);
});

View file

@ -1,7 +1,6 @@
$(document).on('turbolinks:load', function() {
$(document).on('click', '#twoFactorAuthenticationDisable', function() {
$('#twoFactorAuthenticationModal').modal('show');
$('#password').focus();
});
$(document).on('click', '#twoFactorAuthenticationEnable', function() {
@ -34,9 +33,6 @@ $(document).on('turbolinks:load', function() {
});
$('#twoFactorAuthenticationModal').on('click', '.btn-next-step', function() {
setTimeout(() => {
$('#submit_code').focus();
}, 500);
$('#twoFactorAuthenticationModal').find(`[href="${$(this).data('step')}"]`).tab('show');
});
});

View file

@ -1,7 +1,7 @@
<div class="content-pane flexible reports-new">
<div class="reports-new-header">
<div class="sci-input-container report-name-container">
<input id="newReportNameContainer" type="text" class="sci-input-field report-name" placeholder="<%= t("projects.reports.new.report_name_placeholder") %>" value="<%= @report.name %>"></input>
<input type="text" class="sci-input-field report-name" placeholder="<%= t("projects.reports.new.report_name_placeholder") %>" value="<%= @report.name %>"></input>
</div>
<button class="btn btn-secondary cancel-button" data-toggle="modal" data-target="#reportWizardExitWarning">