Skip to content

Commit

Permalink
[TranslatorBundle]: Scale textarea to content
Browse files Browse the repository at this point in the history
Remove spaces
  • Loading branch information
mattiasdelang committed Oct 12, 2016
1 parent a6aa15f commit fde8921
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ kunstmaanTranslatorBundle.inlineEdit = (function(window, undefined) {

$('.js-editable').each(function() {
var $field = $(this);
var width = $field.width();

$($field).on('shown', function(e, editable) {
editable.input.$input.css('width', width + 50);
});

$field.editable({
showbuttons: 'bottom',
Expand All @@ -21,12 +26,11 @@ kunstmaanTranslatorBundle.inlineEdit = (function(window, undefined) {
params.domain = $field.data('domain');
params.keyword = $field.data('keyword');
params.translationId = $field.data('tid');

return params;
},
success: function(response, newValue) {
if (response.success) {
$field.data('uid', response.uid);
$field.data('uid', response.uid);
}
}
});
Expand Down

0 comments on commit fde8921

Please sign in to comment.