if you add/remove more than one user from the share dialog replacing 'Share' with 'Shared' will lead to a string with more and more trailing 'd's

This commit is contained in:
Björn Schießle 2013-02-11 15:37:01 +01:00
parent e70aef603f
commit 45ed0c6010
1 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ OC.Share={
var action = $(file).find('.fileactions .action').filterAttr('data-action', 'Share'); var action = $(file).find('.fileactions .action').filterAttr('data-action', 'Share');
action.find('img').attr('src', image); action.find('img').attr('src', image);
action.addClass('permanent'); action.addClass('permanent');
action.html(action.html().replace(t('core', 'Share'), t('core', 'Shared'))); action.html(t('core', 'Shared'));
} }
var dir = $('#dir').val(); var dir = $('#dir').val();
if (dir.length > 1) { if (dir.length > 1) {
@ -40,7 +40,7 @@ OC.Share={
if (img.attr('src') != OC.imagePath('core', 'actions/public')) { if (img.attr('src') != OC.imagePath('core', 'actions/public')) {
img.attr('src', image); img.attr('src', image);
action.addClass('permanent'); action.addClass('permanent');
action.html(action.html().replace(t('core', 'Share'), t('core', 'Shared'))); action.html(t('core', 'Shared'));
} }
} }
last = path; last = path;
@ -87,10 +87,10 @@ OC.Share={
action.find('img').attr('src', image); action.find('img').attr('src', image);
if (shares) { if (shares) {
action.addClass('permanent'); action.addClass('permanent');
action.html(action.html().replace(t('core', 'Share'), t('core', 'Shared'))); action.html(t('core', 'Shared'));
} else { } else {
action.removeClass('permanent'); action.removeClass('permanent');
action.html(action.html().replace(t('core', 'Shared'), t('core', 'Share'))); action.html(t('core', 'Share'));
} }
} }
if (shares) { if (shares) {