mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-21 15:36:22 +08:00
Merge pull request #5173 from scinote-eln/revert-5169-gc_SCI_8098
Revert "Cursor position improvements, focused fields - part 1 (more in addons) [SCI-8098]"
This commit is contained in:
commit
fb427f7d55
|
@ -9,7 +9,6 @@ function applyCreateWopiFileCallback() {
|
||||||
$modal.find('#element_id').val($(this).data('id'));
|
$modal.find('#element_id').val($(this).data('id'));
|
||||||
$modal.find('#element_type').val($(this).data('type'));
|
$modal.find('#element_type').val($(this).data('type'));
|
||||||
$modal.modal('show');
|
$modal.modal('show');
|
||||||
$($modal).find('#new-wopi-file-name').focus();
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
|
@ -333,13 +333,6 @@ var ExperimnetTable = {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
initModalInputFocus: function() {
|
|
||||||
$(document).on('shown.bs.modal', function() {
|
|
||||||
var inputField = $('#edit-module-name-input');
|
|
||||||
var value = inputField.val();
|
|
||||||
inputField.focus().val('').val(value);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
initMoveModulesModal: function() {
|
initMoveModulesModal: function() {
|
||||||
$('#moveTask').on('click', () => {
|
$('#moveTask').on('click', () => {
|
||||||
this.openMoveModulesModal(this.selectedMyModules);
|
this.openMoveModulesModal(this.selectedMyModules);
|
||||||
|
@ -646,7 +639,6 @@ var ExperimnetTable = {
|
||||||
this.initMyModuleActions();
|
this.initMyModuleActions();
|
||||||
this.initRestoreMyModules();
|
this.initRestoreMyModules();
|
||||||
this.initManageUsersDropdown();
|
this.initManageUsersDropdown();
|
||||||
this.initModalInputFocus();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1522,9 +1522,7 @@ function initEditModules() {
|
||||||
})
|
})
|
||||||
.on("shown.bs.modal", function(event) {
|
.on("shown.bs.modal", function(event) {
|
||||||
// Focus the text element
|
// Focus the text element
|
||||||
var inputField = $('#edit-module-name-input');
|
$(this).find("#edit-module-name-input").focus();
|
||||||
var value = inputField.val();
|
|
||||||
inputField.focus().val('').val(value);
|
|
||||||
})
|
})
|
||||||
.on("hide.bs.modal", function (event) {
|
.on("hide.bs.modal", function (event) {
|
||||||
// Remove potential error classes
|
// Remove potential error classes
|
||||||
|
@ -2962,7 +2960,7 @@ function drawRoundRectangle(ctx, xPos, yPos, width, height, radius) {
|
||||||
height = Math.max(height, 0)
|
height = Math.max(height, 0)
|
||||||
if (width < 2 * radius) radius = width / 2;
|
if (width < 2 * radius) radius = width / 2;
|
||||||
if (height < 2 * radius) radius = height / 2;
|
if (height < 2 * radius) radius = height / 2;
|
||||||
|
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.lineWidth = 4;
|
ctx.lineWidth = 4;
|
||||||
ctx.strokeStyle = '#104DA9';
|
ctx.strokeStyle = '#104DA9';
|
||||||
|
|
|
@ -42,6 +42,7 @@ var ProjectsIndex = (function() {
|
||||||
// Init new project folder modal function
|
// Init new project folder modal function
|
||||||
function initNewProjectFolderModal() {
|
function initNewProjectFolderModal() {
|
||||||
var newProjectFolderModal = '#new-project-folder-modal';
|
var newProjectFolderModal = '#new-project-folder-modal';
|
||||||
|
|
||||||
// Modal's submit handler function
|
// Modal's submit handler function
|
||||||
$(projectsWrapper)
|
$(projectsWrapper)
|
||||||
.on('ajax:success', newProjectFolderModal, function(ev, data) {
|
.on('ajax:success', newProjectFolderModal, function(ev, data) {
|
||||||
|
@ -327,13 +328,6 @@ var ProjectsIndex = (function() {
|
||||||
$.get(url, function(result) {
|
$.get(url, function(result) {
|
||||||
$(editProjectModal).find('.modal-content').html(result.html);
|
$(editProjectModal).find('.modal-content').html(result.html);
|
||||||
$(editProjectModal).modal('show');
|
$(editProjectModal).modal('show');
|
||||||
// focusing at the end of the field
|
|
||||||
['project_name', 'project_folder_name'].forEach(function(inputId) {
|
|
||||||
var inputField = $('#' + inputId);
|
|
||||||
var value = inputField.val();
|
|
||||||
inputField.focus().val('').val(value);
|
|
||||||
});
|
|
||||||
|
|
||||||
$(editProjectModal).find('.selectpicker').selectpicker();
|
$(editProjectModal).find('.selectpicker').selectpicker();
|
||||||
$(editProjectModal).find('form')
|
$(editProjectModal).find('form')
|
||||||
.on('ajax:success', function(ev, data) {
|
.on('ajax:success', function(ev, data) {
|
||||||
|
@ -418,7 +412,7 @@ var ProjectsIndex = (function() {
|
||||||
$(moveToModal).find('.modal-content').html(result.html);
|
$(moveToModal).find('.modal-content').html(result.html);
|
||||||
$(moveToModal).modal('show');
|
$(moveToModal).modal('show');
|
||||||
initializeJSTree($(moveToModal).find('#moveToFolders'));
|
initializeJSTree($(moveToModal).find('#moveToFolders'));
|
||||||
$('#searchFolderTree').focus();
|
|
||||||
$(moveToModal).find('form')
|
$(moveToModal).find('form')
|
||||||
.on('ajax:before', function() {
|
.on('ajax:before', function() {
|
||||||
$('<input>').attr({
|
$('<input>').attr({
|
||||||
|
|
|
@ -323,12 +323,6 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('shown.bs.modal', function() {
|
|
||||||
var inputField = $('#experiment-name');
|
|
||||||
var value = inputField.val();
|
|
||||||
inputField.focus().val('').val(value);
|
|
||||||
});
|
|
||||||
|
|
||||||
function initNewExperimentToolbarButton() {
|
function initNewExperimentToolbarButton() {
|
||||||
let forms = '.new-experiment-form';
|
let forms = '.new-experiment-form';
|
||||||
$(experimentsPage)
|
$(experimentsPage)
|
||||||
|
|
|
@ -328,7 +328,7 @@
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label">Name</label>
|
<label class="control-label">Name</label>
|
||||||
<input type="text" class="form-control" autofocus onChange="DragNDropResults.validateTextSize(this)"
|
<input type="text" class="form-control" onChange="DragNDropResults.validateTextSize(this)"
|
||||||
rel="results[name]" name="results[name][${i}]">
|
rel="results[name]" name="results[name][${i}]">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
@ -8,7 +8,6 @@ export default {
|
||||||
$wopiModal.find('#element_id').val(step.id);
|
$wopiModal.find('#element_id').val(step.id);
|
||||||
$wopiModal.find('#element_type').val('Step');
|
$wopiModal.find('#element_type').val('Step');
|
||||||
$wopiModal.modal('show');
|
$wopiModal.modal('show');
|
||||||
$($wopiModal).find('#new-wopi-file-name').focus();
|
|
||||||
|
|
||||||
$wopiModal.find('form').on(
|
$wopiModal.find('form').on(
|
||||||
'ajax:success',
|
'ajax:success',
|
||||||
|
|
Loading…
Reference in a new issue