From 13675dd2e7f5fb8ef13c9604278f643bb6a5cf7a Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Thu, 9 Jan 2020 14:57:37 +0100 Subject: [PATCH] Update placeholders for cells --- .../repositories/renderers/columns/checklist.js | 2 +- .../repositories/renderers/columns/list.js | 4 ++-- .../repositories/renderers/columns/status.js | 4 ++-- .../repositories/renderers/edit_renderers.js | 3 +++ .../repositories/renderers/new_renderers.js | 3 +++ app/assets/stylesheets/application.scss | 2 ++ config/locales/en.yml | 11 +++++++++++ 7 files changed, 24 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/repositories/renderers/columns/checklist.js b/app/assets/javascripts/repositories/renderers/columns/checklist.js index 39bbf88df..302d0b44d 100644 --- a/app/assets/javascripts/repositories/renderers/columns/checklist.js +++ b/app/assets/javascripts/repositories/renderers/columns/checklist.js @@ -11,7 +11,7 @@ var ChecklistColumnHelper = (function() { } return $(``); } diff --git a/app/assets/javascripts/repositories/renderers/columns/status.js b/app/assets/javascripts/repositories/renderers/columns/status.js index d2d197537..e51a96084 100644 --- a/app/assets/javascripts/repositories/renderers/columns/status.js +++ b/app/assets/javascripts/repositories/renderers/columns/status.js @@ -1,4 +1,4 @@ -/* global dropdownSelector */ +/* global dropdownSelector I18n */ /* eslint-disable no-unused-vars */ var StatusColumnHelper = (function() { @@ -10,7 +10,7 @@ var StatusColumnHelper = (function() { return $(``); } diff --git a/app/assets/javascripts/repositories/renderers/edit_renderers.js b/app/assets/javascripts/repositories/renderers/edit_renderers.js index c68253d62..abf3d1a8b 100644 --- a/app/assets/javascripts/repositories/renderers/edit_renderers.js +++ b/app/assets/javascripts/repositories/renderers/edit_renderers.js @@ -14,6 +14,7 @@ $.fn.dataTable.render.editRowName = function(formId, cell) { type="text" name="repository_row[name]" value="${text}" + placeholder="${I18n.t('repositories.table.enter_row_name')}" data-type="RowName"> `); @@ -54,6 +55,7 @@ $.fn.dataTable.render.editRepositoryTextValue = function(formId, columnId, cell) type="text" name="repository_cells[${columnId}]" value="${text}" + placeholder="${I18n.t('repositories.table.text.enter_text')}" data-type="RepositoryTextValue"> `); @@ -143,6 +145,7 @@ $.fn.dataTable.render.editRepositoryNumberValue = function(formId, columnId, cel type="number" name="repository_cells[${columnId}]" value="${number}" + placeholder="${I18n.t('repositories.table.number.enter_number')}" onchange="if (this.value !== '') { this.value = parseFloat(Number(this.value).toFixed(${decimals})); }" data-type="RepositoryNumberValue"> `); diff --git a/app/assets/javascripts/repositories/renderers/new_renderers.js b/app/assets/javascripts/repositories/renderers/new_renderers.js index d57229d28..815c461af 100644 --- a/app/assets/javascripts/repositories/renderers/new_renderers.js +++ b/app/assets/javascripts/repositories/renderers/new_renderers.js @@ -11,6 +11,7 @@ $.fn.dataTable.render.newRowName = function(formId, $cell) { type="text" name="repository_row[name]" value="" + placeholder="${I18n.t('repositories.table.enter_row_name')}" data-type="RowName"> `); @@ -44,6 +45,7 @@ $.fn.dataTable.render.newRepositoryTextValue = function(formId, columnId, $cell) type="text" name="repository_cells[${columnId}]" value="" + placeholder="${I18n.t('repositories.table.text.enter_text')}" data-type="RepositoryTextValue"> `); @@ -72,6 +74,7 @@ $.fn.dataTable.render.newRepositoryNumberValue = function(formId, columnId, $cel type="number" name="repository_cells[${columnId}]" value="" + placeholder="${I18n.t('repositories.table.number.enter_number')}" onchange="if (this.value !== '') { this.value = parseFloat(Number(this.value).toFixed(${decimals})); }" data-type="RepositoryNumberValue"> `); diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 3a28a9d3e..974d7675e 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -29,6 +29,8 @@ @import "my_modules/protocols/*"; @import "my_modules/results/*"; @import "protocols/*"; +@import "repository/*"; +@import "repository_columns/*"; @import "settings/*"; @import "shared/*"; @import "themes/*"; diff --git a/config/locales/en.yml b/config/locales/en.yml index fa22dcd2b..7e3dc22d8 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1053,8 +1053,19 @@ en: row_name: "Name" added_on: "Added on" added_by: "Added by" + enter_row_name: "Enter name" assets: select_file_btn: "Select File (Max %{max_size} MB)..." + text: + enter_text: "Enter text" + number: + enter_number: "Enter number" + list: + select_item: "Select..." + status: + set_status: "Set Status..." + checklist: + set_checklist: "Set Checklist..." date_time: errors: set_all_or_none: 'Needs to set both or none'