summaryrefslogtreecommitdiffstats
path: root/core/js/share.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/share.js')
-rw-r--r--core/js/share.js26
1 files changed, 19 insertions, 7 deletions
diff --git a/core/js/share.js b/core/js/share.js
index 0939259b7da..e769edd0a21 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -48,7 +48,7 @@ OC.Share={
var action = $(file).find('.fileactions .action[data-action="Share"]');
var img = action.find('img').attr('src', image);
action.addClass('permanent');
- action.html(' '+t('core', 'Shared')).prepend(img);
+ action.html(' <span>'+t('core', 'Shared')+'</span>').prepend(img);
} else {
var dir = $('#dir').val();
if (dir.length > 1) {
@@ -63,7 +63,7 @@ OC.Share={
if (img.attr('src') != OC.imagePath('core', 'actions/public')) {
img.attr('src', image);
$(action).addClass('permanent');
- $(action).html(' '+t('core', 'Shared')).prepend(img);
+ $(action).html(' <span>'+t('core', 'Shared')+'</span>').prepend(img);
}
});
}
@@ -103,10 +103,10 @@ OC.Share={
var img = action.find('img').attr('src', image);
if (shares) {
action.addClass('permanent');
- action.html(' '+ escapeHTML(t('core', 'Shared'))).prepend(img);
+ action.html(' <span>'+ escapeHTML(t('core', 'Shared'))+'</span>').prepend(img);
} else {
action.removeClass('permanent');
- action.html(' '+ escapeHTML(t('core', 'Share'))).prepend(img);
+ action.html(' <span>'+ escapeHTML(t('core', 'Share'))+'</span>').prepend(img);
}
}
}
@@ -584,8 +584,8 @@ $(document).ready(function() {
$(checkboxes).filter('input[name="edit"]').attr('checked', false);
// Check Edit if Create, Update, or Delete is checked
} else if (($(this).attr('name') == 'create'
- || $(this).attr('name') == 'update'
- || $(this).attr('name') == 'delete'))
+ || $(this).attr('name') == 'update'
+ || $(this).attr('name') == 'delete'))
{
$(checkboxes).filter('input[name="edit"]').attr('checked', true);
}
@@ -718,9 +718,21 @@ $(document).ready(function() {
$(document).on('change', '#dropdown #expirationDate', function() {
var itemType = $('#dropdown').data('item-type');
var itemSource = $('#dropdown').data('item-source');
+
+ $(this).tipsy('hide');
+ $(this).removeClass('error');
+
$.post(OC.filePath('core', 'ajax', 'share.php'), { action: 'setExpirationDate', itemType: itemType, itemSource: itemSource, date: $(this).val() }, function(result) {
if (!result || result.status !== 'success') {
- OC.dialogs.alert(t('core', 'Error setting expiration date'), t('core', 'Error'));
+ var expirationDateField = $('#dropdown #expirationDate');
+ if (!result.data.message) {
+ expirationDateField.attr('original-title', t('core', 'Error setting expiration date'));
+ } else {
+ expirationDateField.attr('original-title', result.data.message);
+ }
+ expirationDateField.tipsy({gravity: 'n', fade: true});
+ expirationDateField.tipsy('show');
+ expirationDateField.addClass('error');
}
});
});