mirror of
				https://github.com/scinote-eln/scinote-web.git
				synced 2025-10-31 16:49:40 +08:00 
			
		
		
		
	Revert "Cursor position improvements, focused fields - part 1 (more in addons) [SCI-8098]"
This commit is contained in:
		
							parent
							
								
									b089453ec7
								
							
						
					
					
						commit
						44098ece5d
					
				
					 7 changed files with 5 additions and 29 deletions
				
			
		|  | @ -9,7 +9,6 @@ function applyCreateWopiFileCallback() { | |||
|     $modal.find('#element_id').val($(this).data('id')); | ||||
|     $modal.find('#element_type').val($(this).data('type')); | ||||
|     $modal.modal('show'); | ||||
|     $($modal).find('#new-wopi-file-name').focus(); | ||||
| 
 | ||||
|     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() { | ||||
|     $('#moveTask').on('click', () => { | ||||
|       this.openMoveModulesModal(this.selectedMyModules); | ||||
|  | @ -646,7 +639,6 @@ var ExperimnetTable = { | |||
|     this.initMyModuleActions(); | ||||
|     this.initRestoreMyModules(); | ||||
|     this.initManageUsersDropdown(); | ||||
|     this.initModalInputFocus(); | ||||
|   } | ||||
| }; | ||||
| 
 | ||||
|  |  | |||
|  | @ -1522,9 +1522,7 @@ function initEditModules() { | |||
|   }) | ||||
|   .on("shown.bs.modal", function(event) { | ||||
|     // Focus the text element | ||||
|     var inputField = $('#edit-module-name-input'); | ||||
|     var value = inputField.val(); | ||||
|     inputField.focus().val('').val(value); | ||||
|     $(this).find("#edit-module-name-input").focus(); | ||||
|   }) | ||||
|   .on("hide.bs.modal", function (event) { | ||||
|     // Remove potential error classes | ||||
|  |  | |||
|  | @ -42,6 +42,7 @@ var ProjectsIndex = (function() { | |||
|   // Init new project folder modal function
 | ||||
|   function initNewProjectFolderModal() { | ||||
|     var newProjectFolderModal = '#new-project-folder-modal'; | ||||
| 
 | ||||
|     // Modal's submit handler function
 | ||||
|     $(projectsWrapper) | ||||
|       .on('ajax:success', newProjectFolderModal, function(ev, data) { | ||||
|  | @ -327,13 +328,6 @@ var ProjectsIndex = (function() { | |||
|       $.get(url, function(result) { | ||||
|         $(editProjectModal).find('.modal-content').html(result.html); | ||||
|         $(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('form') | ||||
|           .on('ajax:success', function(ev, data) { | ||||
|  | @ -418,7 +412,7 @@ var ProjectsIndex = (function() { | |||
|         $(moveToModal).find('.modal-content').html(result.html); | ||||
|         $(moveToModal).modal('show'); | ||||
|         initializeJSTree($(moveToModal).find('#moveToFolders')); | ||||
|         $('#searchFolderTree').focus(); | ||||
| 
 | ||||
|         $(moveToModal).find('form') | ||||
|           .on('ajax:before', function() { | ||||
|             $('<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() { | ||||
|     let forms = '.new-experiment-form'; | ||||
|     $(experimentsPage) | ||||
|  |  | |||
|  | @ -328,7 +328,7 @@ | |||
|                     <div class="panel-body"> | ||||
|                       <div class="form-group"> | ||||
|                         <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}]"> | ||||
|                       </div> | ||||
|                       <div class="form-group"> | ||||
|  |  | |||
|  | @ -8,7 +8,6 @@ export default { | |||
|       $wopiModal.find('#element_id').val(step.id); | ||||
|       $wopiModal.find('#element_type').val('Step'); | ||||
|       $wopiModal.modal('show'); | ||||
|       $($wopiModal).find('#new-wopi-file-name').focus(); | ||||
| 
 | ||||
|       $wopiModal.find('form').on( | ||||
|         'ajax:success', | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue