diff --git a/app/assets/javascripts/repositories/renderers/edit_renderers.js b/app/assets/javascripts/repositories/renderers/edit_renderers.js
index 09692d640..e90ac8ee5 100644
--- a/app/assets/javascripts/repositories/renderers/edit_renderers.js
+++ b/app/assets/javascripts/repositories/renderers/edit_renderers.js
@@ -13,11 +13,12 @@ $.fn.dataTable.render.editRowName = function(formId, cell) {
form="${formId}"
type="text"
name="repository_row[name]"
- value="${text}"
+ value=""
placeholder="${I18n.t('repositories.table.enter_row_name')}"
data-type="RowName">
`);
+ $cell.find('input').val(text);
};
$.fn.dataTable.render.editRepositoryAssetValue = function(formId, columnId, cell) {
@@ -34,11 +35,11 @@ $.fn.dataTable.render.editRepositoryTextValue = function(formId, columnId, cell)
form="${formId}"
type="text"
name="repository_cells[${columnId}]"
- value="${text}"
+ value=""
placeholder="${I18n.t('repositories.table.text.enter_text')}"
data-type="RepositoryTextValue">
`);
-
+ $cell.find('input').val(text);
SmartAnnotation.init($cell.find('input'));
};
diff --git a/app/assets/javascripts/repositories/renderers/view_renderers.js b/app/assets/javascripts/repositories/renderers/view_renderers.js
index 8d23fce1f..dbabd2d46 100644
--- a/app/assets/javascripts/repositories/renderers/view_renderers.js
+++ b/app/assets/javascripts/repositories/renderers/view_renderers.js
@@ -26,7 +26,8 @@ $.fn.dataTable.render.defaultRepositoryAssetValue = function() {
};
$.fn.dataTable.render.RepositoryTextValue = function(data) {
- var text = $(`${data.value.view}`);
+ var text = $(`${data.value.view}`);
+ text.attr('data-edit-value', data.value.edit);
return text.prop('outerHTML');
};