mirror of
https://github.com/nextcloud/server.git
synced 2026-02-13 15:54:59 -05:00
Replace custom tooltips with native ones in files
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
This commit is contained in:
parent
8d53b82a2d
commit
251d143338
9 changed files with 11 additions and 51 deletions
|
|
@ -64,7 +64,6 @@
|
|||
// Toggle for grid view
|
||||
this.$showGridView = $('input#showgridview');
|
||||
this.$showGridView.on('change', _.bind(this._onGridviewChange, this));
|
||||
$('#view-toggle').tooltip({placement: 'bottom', trigger: 'hover'});
|
||||
|
||||
if ($('#fileNotFound').val() === "1") {
|
||||
OC.Notification.show(t('files', 'File could not be found'), {type: 'error'});
|
||||
|
|
@ -147,10 +146,6 @@
|
|||
// trigger URL change event handlers
|
||||
this._onPopState(urlParams);
|
||||
|
||||
$('#quota.has-tooltip').tooltip({
|
||||
placement: 'top'
|
||||
});
|
||||
|
||||
this._debouncedPersistShowHiddenFilesState = _.debounce(this._persistShowHiddenFilesState, 1200);
|
||||
this._debouncedPersistCropImagePreviewsState = _.debounce(this._persistCropImagePreviewsState, 1200);
|
||||
|
||||
|
|
@ -428,10 +423,9 @@
|
|||
this.$showGridView.next('#view-toggle')
|
||||
.removeClass('icon-toggle-filelist icon-toggle-pictures')
|
||||
.addClass(isGridView ? 'icon-toggle-filelist' : 'icon-toggle-pictures')
|
||||
this.$showGridView.next('#view-toggle').attr(
|
||||
'data-original-title',
|
||||
isGridView ? t('files', 'Show list view') : t('files', 'Show grid view'),
|
||||
)
|
||||
this.$showGridView.next('#view-toggle')
|
||||
.attr('title', isGridView ? t('files', 'Show list view') : t('files', 'Show grid view'))
|
||||
this.$showGridView.attr('aria-label', isGridView ? t('files', 'Show list view') : t('files', 'Show grid view'))
|
||||
|
||||
if (this.currentFileList) {
|
||||
this.currentFileList.setGridView(isGridView);
|
||||
|
|
|
|||
|
|
@ -1102,8 +1102,6 @@ OC.Uploader.prototype = _.extend({
|
|||
*/
|
||||
start: function(e) {
|
||||
self.log('start', e, null);
|
||||
//hide the tooltip otherwise it covers the progress bar
|
||||
$('#upload').tooltip('hide');
|
||||
self._uploading = true;
|
||||
},
|
||||
fail: function(e, data) {
|
||||
|
|
|
|||
|
|
@ -470,7 +470,7 @@
|
|||
);
|
||||
}
|
||||
);
|
||||
$actionEl.tooltip({placement:'top'});
|
||||
|
||||
return $actionEl;
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -1856,9 +1856,7 @@
|
|||
"title": formatted,
|
||||
"data-timestamp": mtime,
|
||||
"style": 'color:rgb('+modifiedColor+','+modifiedColor+','+modifiedColor+')'
|
||||
}).text(text)
|
||||
.tooltip({placement: 'top'})
|
||||
);
|
||||
}).text(text));
|
||||
tr.find('.filesize').text(simpleSize);
|
||||
tr.append(td);
|
||||
return tr;
|
||||
|
|
@ -2893,7 +2891,6 @@
|
|||
};
|
||||
|
||||
function restore() {
|
||||
input.tooltip('hide');
|
||||
tr.data('renaming',false);
|
||||
form.remove();
|
||||
td.children('a.name').children(':not(.thumbnail-wrapper)').show();
|
||||
|
|
@ -2914,7 +2911,6 @@
|
|||
|
||||
try {
|
||||
var newName = input.val().trim();
|
||||
input.tooltip('hide');
|
||||
form.remove();
|
||||
|
||||
if (newName !== oldName) {
|
||||
|
|
@ -2974,9 +2970,6 @@
|
|||
}
|
||||
} catch (error) {
|
||||
input.attr('title', error);
|
||||
input.tooltip({placement: 'right', trigger: 'manual'});
|
||||
input.tooltip('_fixTitle');
|
||||
input.tooltip('show');
|
||||
input.addClass('error');
|
||||
}
|
||||
return false;
|
||||
|
|
@ -2985,13 +2978,9 @@
|
|||
// verify filename on typing
|
||||
try {
|
||||
checkInput();
|
||||
input.tooltip('hide');
|
||||
input.removeClass('error');
|
||||
} catch (error) {
|
||||
input.attr('title', error);
|
||||
input.tooltip({placement: 'right', trigger: 'manual'});
|
||||
input.tooltip('_fixTitle');
|
||||
input.tooltip('show');
|
||||
input.addClass('error');
|
||||
}
|
||||
if (event.keyCode === 27) {
|
||||
|
|
@ -3852,7 +3841,6 @@
|
|||
}));
|
||||
|
||||
$actionsContainer.prepend($newButton);
|
||||
$newButton.tooltip({'placement': 'bottom'});
|
||||
$newButton.attr('aria-expanded', 'false');
|
||||
$newButton.click(_.bind(this._onClickNewButton, this));
|
||||
this._newButton = $newButton;
|
||||
|
|
@ -3863,7 +3851,6 @@
|
|||
if (!$target.hasClass('.button')) {
|
||||
$target = $target.closest('.button');
|
||||
}
|
||||
this._newButton.tooltip('hide');
|
||||
$target.attr('aria-expanded', 'true');
|
||||
event.preventDefault();
|
||||
if ($target.hasClass('disabled')) {
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
}
|
||||
if (response.data !== undefined && response.data.uploadMaxFilesize !== undefined) {
|
||||
$('#free_space').val(response.data.freeSpace);
|
||||
$('#upload.button').attr('data-original-title', response.data.maxHumanFilesize);
|
||||
$('#upload.button').attr('title', response.data.maxHumanFilesize);
|
||||
$('#usedSpacePercent').val(response.data.usedSpacePercent);
|
||||
$('#usedSpacePercent').data('mount-type', response.data.mountType);
|
||||
$('#usedSpacePercent').data('mount-point', response.data.mountPoint);
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
return;
|
||||
}
|
||||
if (response[0].uploadMaxFilesize !== undefined) {
|
||||
$('#upload.button').attr('data-original-title', response[0].maxHumanFilesize);
|
||||
$('#upload.button').attr('title', response[0].maxHumanFilesize);
|
||||
$('#usedSpacePercent').val(response[0].usedSpacePercent);
|
||||
Files.displayStorageWarnings();
|
||||
}
|
||||
|
|
@ -104,7 +104,7 @@
|
|||
var humanUsed = OC.Util.humanFileSize(response.data.used, true);
|
||||
var humanTotal = OC.Util.humanFileSize(response.data.total, true);
|
||||
if (response.data.quota > 0) {
|
||||
$('#quota').attr('data-original-title', t('files', '{used}%', {used: Math.round(response.data.usedSpacePercent)}));
|
||||
$('#quota').attr('title', t('files', '{used}%', {used: Math.round(response.data.usedSpacePercent)}));
|
||||
$('#quota progress').val(response.data.usedSpacePercent);
|
||||
$('#quotatext').html(t('files', '{used} of {quota} used', {used: humanUsed, quota: humanTotal}));
|
||||
} else {
|
||||
|
|
@ -346,8 +346,6 @@
|
|||
this.setSelectionRange(0, this.value.length);
|
||||
});
|
||||
|
||||
$('#upload').tooltip({placement:'right'});
|
||||
|
||||
//FIXME scroll to and highlight preselected file
|
||||
/*
|
||||
if (getURLParameter('scrollto')) {
|
||||
|
|
|
|||
|
|
@ -69,17 +69,7 @@
|
|||
_setupClipboard: function() {
|
||||
var clipboard = new Clipboard('.permalink');
|
||||
clipboard.on('success', function(e) {
|
||||
var $el = $(e.trigger);
|
||||
$el.tooltip('hide')
|
||||
.attr('data-original-title', t('core', 'Copied!'))
|
||||
.tooltip('_fixTitle')
|
||||
.tooltip({placement: 'bottom', trigger: 'manual'})
|
||||
.tooltip('show');
|
||||
_.delay(function() {
|
||||
$el.tooltip('hide');
|
||||
$el.attr('data-original-title', t('files', 'Copy direct link (only works for users who have access to this file/folder)'))
|
||||
.tooltip('_fixTitle');
|
||||
}, 3000);
|
||||
OC.Notification.show(t('files', 'Direct link was copied (only works for users who have access to this file/folder)'), {type: 'success'});
|
||||
});
|
||||
clipboard.on('error', function(e) {
|
||||
var $row = this.$('.permalink-field');
|
||||
|
|
@ -192,7 +182,6 @@
|
|||
}
|
||||
$iconDiv.css('background-image', 'url("' + iconUrl + '")');
|
||||
}
|
||||
this.$el.find('[title]').tooltip({placement: 'bottom'});
|
||||
} else {
|
||||
this.$el.empty();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,9 +137,6 @@
|
|||
}
|
||||
} catch (error) {
|
||||
$input.attr('title', error);
|
||||
$input.tooltip({placement: 'right', trigger: 'manual', container: self.$el});
|
||||
$input.tooltip('_fixTitle');
|
||||
$input.tooltip('show');
|
||||
$input.addClass('error');
|
||||
}
|
||||
return false;
|
||||
|
|
@ -148,7 +145,6 @@
|
|||
// verify filename on typing
|
||||
$input.keyup(function() {
|
||||
if (checkInput()) {
|
||||
$input.tooltip('hide');
|
||||
$input.removeClass('error');
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -63,9 +63,8 @@
|
|||
$('#uploadprogressbar .ui-progressbar-value>em').addClass('inner');
|
||||
$('#uploadprogressbar>em').replaceWith(labelHtml);
|
||||
$('#uploadprogressbar>em').addClass('outer');
|
||||
$('#uploadprogressbar').tooltip({placement: 'bottom', container: '#uploadprogresswrapper'});
|
||||
if (title) {
|
||||
$('#uploadprogressbar').attr('data-original-title', title);
|
||||
$('#uploadprogressbar').attr('title', title);
|
||||
$('#uploadprogresswrapper .tooltip-inner').text(title);
|
||||
}
|
||||
if(textDesktop || textMobile) {
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ OCA.Sharing.PublicApp = {
|
|||
// Toggle for grid view
|
||||
this.$showGridView = $('input#showgridview');
|
||||
this.$showGridView.on('change', _.bind(this._onGridviewChange, this));
|
||||
$('#view-toggle').tooltip({placement: 'bottom', trigger: 'hover'});
|
||||
|
||||
var filesClient = new OC.Files.Client({
|
||||
host: OC.getHost(),
|
||||
|
|
@ -380,7 +379,7 @@ OCA.Sharing.PublicApp = {
|
|||
.removeClass('icon-toggle-filelist icon-toggle-pictures')
|
||||
.addClass(isGridView ? 'icon-toggle-filelist' : 'icon-toggle-pictures')
|
||||
this.$showGridView.next('#view-toggle').attr(
|
||||
'data-original-title',
|
||||
'title',
|
||||
isGridView ? t('files', 'Show list view') : t('files', 'Show grid view'),
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue