diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/ajax/share.php | 7 | ||||
-rw-r--r-- | core/js/share.js | 33 | ||||
-rw-r--r-- | core/l10n/gl.php | 5 |
3 files changed, 21 insertions, 24 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php index 77529c620db..0dacc17d3a5 100644 --- a/core/ajax/share.php +++ b/core/ajax/share.php @@ -305,8 +305,9 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo && $uid != OC_User::getUser()) { $shareWith[] = array( 'label' => $displayName, - 'value' => array('shareType' => OCP\Share::SHARE_TYPE_USER, - 'shareWith' => $uid) + 'value' => array( + 'shareType' => OCP\Share::SHARE_TYPE_USER, + 'shareWith' => $uid) ); $count++; } @@ -324,7 +325,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo || !is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP]) || !in_array($group, $_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP])) { $shareWith[] = array( - 'label' => $group.' ('.$l->t('group').')', + 'label' => $group, 'value' => array( 'shareType' => OCP\Share::SHARE_TYPE_GROUP, 'shareWith' => $group diff --git a/core/js/share.js b/core/js/share.js index 1e61360f8a1..281cccaaef8 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -203,18 +203,7 @@ OC.Share={ html += '<input id="shareWith" type="text" placeholder="'+t('core', 'Share with')+'" />'; html += '<ul id="shareWithList">'; html += '</ul>'; - var linksAllowed = false; - $.ajax({ - type: 'GET', - url: OC.filePath('core', 'ajax', 'appconfig.php'), - data: { action:'getValue', app:'core', key:'shareapi_allow_links', defaultValue:'yes' }, - async: false, - success: function(result) { - if (result && result.status === 'success' && result.data === 'yes') { - linksAllowed = true; - } - } - }); + var linksAllowed = $('#allowShareWithLink').val() === 'yes'; if (link && linksAllowed) { html += '<div id="link">'; html += '<input type="checkbox" name="linkCheckbox" id="linkCheckbox" value="1" /><label for="linkCheckbox">'+t('core', 'Share with link')+'</label>'; @@ -293,7 +282,7 @@ OC.Share={ // Default permissions are Edit (CRUD) and Share var permissions = OC.PERMISSION_ALL; OC.Share.share(itemType, itemSource, shareType, shareWith, permissions, function() { - OC.Share.addShareWith(shareType, shareWith, selected.item.value.shareWith, permissions, possiblePermissions); + OC.Share.addShareWith(shareType, shareWith, selected.item.label, permissions, possiblePermissions); $('#shareWith').val(''); OC.Share.updateIcon(itemType, itemSource); }); @@ -302,12 +291,14 @@ OC.Share={ }) // customize internal _renderItem function to display groups and users differently .data("ui-autocomplete")._renderItem = function( ul, item ) { - var insert = $( "<a>" ).text( item.label ); - if(item.label.length > 8 && item.label.substr(item.label.length-8) === ' (group)') { - // current label is group - wrap "strong" element - insert = insert.wrapInner('<strong>'); + var insert = $( "<a>" ); + var text = (item.value.shareType == 1)? item.label + ' ('+t('core', 'group')+')' : item.label; + insert.text( text ); + if(item.value.shareType == 1) { + insert = insert.wrapInner('<strong></strong>'); } return $( "<li>" ) + .addClass((item.value.shareType == 1)?'group':'user') .append( insert ) .appendTo( ul ); }; @@ -723,14 +714,14 @@ $(document).ready(function() { var file = $('tr').filterAttr('data-id', String(itemSource)).data('file'); var email = $('#email').val(); if (email != '') { - $('#email').attr('disabled', "disabled"); + $('#email').prop('disabled', true); $('#email').val(t('core', 'Sending ...')); - $('#emailButton').attr('disabled', "disabled"); + $('#emailButton').prop('disabled', true); $.post(OC.filePath('core', 'ajax', 'share.php'), { action: 'email', toaddress: email, link: link, itemType: itemType, itemSource: itemSource, file: file}, function(result) { - $('#email').attr('disabled', "false"); - $('#emailButton').attr('disabled', "false"); + $('#email').prop('disabled', false); + $('#emailButton').prop('disabled', false); if (result && result.status == 'success') { $('#email').css('font-weight', 'bold'); $('#email').animate({ fontWeight: 'normal' }, 2000, function() { diff --git a/core/l10n/gl.php b/core/l10n/gl.php index b864294d590..a2d9606ac86 100644 --- a/core/l10n/gl.php +++ b/core/l10n/gl.php @@ -96,6 +96,7 @@ $TRANSLATIONS = array( "Email sent" => "Correo enviado", "Warning" => "Aviso", "The object type is not specified." => "Non se especificou o tipo de obxecto.", +"Enter new" => "Introduza o novo", "Delete" => "Eliminar", "Add" => "Engadir", "Edit tags" => "Editar etiquetas", @@ -124,6 +125,10 @@ $TRANSLATIONS = array( "Error loading tags" => "Produciuse un erro ao cargar as etiquetas", "Tag already exists" => "Xa existe a etiqueta", "Error deleting tag(s)" => "Produciuse un erro ao eliminar a(s) etiqueta(s)", +"Error tagging" => "Produciuse un erro ao etiquetar", +"Error untagging" => "Produciuse un erro ao eliminar a etiqueta", +"Error favoriting" => "Produciuse un erro ao marcar como favorito", +"Error unfavoriting" => "Produciuse un erro ao desmarcar como favorito", "Access forbidden" => "Acceso denegado", "Cloud not found" => "Nube non atopada", "Hey there,\n\njust letting you know that %s shared %s with you.\nView it: %s\n\n" => "Ola,\n\nsó facerlle saber que %s compartiu %s con vostede.\nVéxao en: %s\n\n", |