mirror of
https://github.com/nextcloud/server.git
synced 2024-08-05 20:16:00 +02:00
adjust animations of Share, Versions and others to OC.menuSpeed
This commit is contained in:
parent
30b745fc59
commit
f0b0287333
@ -40,6 +40,7 @@ $(document).ready(function(){
|
|||||||
if ( $('#dropdown').hasClass('drop-versions') && file == $('#dropdown').data('file')) {
|
if ( $('#dropdown').hasClass('drop-versions') && file == $('#dropdown').data('file')) {
|
||||||
createDropDown = false;
|
createDropDown = false;
|
||||||
}
|
}
|
||||||
|
$('#dropdown').slideUp(OC.menuSpeed);
|
||||||
$('#dropdown').remove();
|
$('#dropdown').remove();
|
||||||
$('tr').removeClass('mouseOver');
|
$('tr').removeClass('mouseOver');
|
||||||
}
|
}
|
||||||
@ -71,7 +72,7 @@ function revertFile(file, revision) {
|
|||||||
if (response.status === 'error') {
|
if (response.status === 'error') {
|
||||||
OC.Notification.show( t('files_version', 'Failed to revert {file} to revision {timestamp}.', {file:file, timestamp:formatDate(revision * 1000)}) );
|
OC.Notification.show( t('files_version', 'Failed to revert {file} to revision {timestamp}.', {file:file, timestamp:formatDate(revision * 1000)}) );
|
||||||
} else {
|
} else {
|
||||||
$('#dropdown').hide('blind', function() {
|
$('#dropdown').slideUp(OC.menuSpeed, function() {
|
||||||
$('#dropdown').closest('tr').find('.modified:first').html(relative_modified_date(revision));
|
$('#dropdown').closest('tr').find('.modified:first').html(relative_modified_date(revision));
|
||||||
$('#dropdown').remove();
|
$('#dropdown').remove();
|
||||||
$('tr').removeClass('mouseOver');
|
$('tr').removeClass('mouseOver');
|
||||||
@ -175,13 +176,13 @@ function createVersionsDropdown(filename, files, fileList) {
|
|||||||
version.appendTo('#found_versions');
|
version.appendTo('#found_versions');
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#dropdown').show('blind');
|
$('#dropdown').slideDown(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
$(this).click(
|
$(this).click(
|
||||||
function(event) {
|
function(event) {
|
||||||
if ($('#dropdown').has(event.target).length === 0 && $('#dropdown').hasClass('drop-versions')) {
|
if ($('#dropdown').has(event.target).length === 0 && $('#dropdown').hasClass('drop-versions')) {
|
||||||
$('#dropdown').hide('blind', function() {
|
$('#dropdown').slideUp(OC.menuSpeed, function() {
|
||||||
$('#dropdown').remove();
|
$('#dropdown').remove();
|
||||||
$('tr').removeClass('mouseOver');
|
$('tr').removeClass('mouseOver');
|
||||||
});
|
});
|
||||||
|
@ -44,12 +44,12 @@
|
|||||||
var area = $(areaSelector);
|
var area = $(areaSelector);
|
||||||
|
|
||||||
function hideArea() {
|
function hideArea() {
|
||||||
area.slideUp(function() {
|
area.slideUp(OC.menuSpeed*4, function() {
|
||||||
area.trigger(new $.Event('hide'));
|
area.trigger(new $.Event('hide'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function showArea() {
|
function showArea() {
|
||||||
area.slideDown(function() {
|
area.slideDown(OC.menuSpeed*4, function() {
|
||||||
area.trigger(new $.Event('show'));
|
area.trigger(new $.Event('show'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -590,7 +590,7 @@ OC.Share={
|
|||||||
dropDownEl.appendTo(appendTo);
|
dropDownEl.appendTo(appendTo);
|
||||||
}
|
}
|
||||||
dropDownEl.attr('data-item-source-name', filename);
|
dropDownEl.attr('data-item-source-name', filename);
|
||||||
$('#dropdown').show('blind', function() {
|
$('#dropdown').slideDown(OC.menuSpeed, function() {
|
||||||
OC.Share.droppedDown = true;
|
OC.Share.droppedDown = true;
|
||||||
});
|
});
|
||||||
if ($('html').hasClass('lte9')){
|
if ($('html').hasClass('lte9')){
|
||||||
@ -600,7 +600,7 @@ OC.Share={
|
|||||||
},
|
},
|
||||||
hideDropDown:function(callback) {
|
hideDropDown:function(callback) {
|
||||||
OC.Share.currentShares = null;
|
OC.Share.currentShares = null;
|
||||||
$('#dropdown').hide('blind', function() {
|
$('#dropdown').slideUp(OC.menuSpeed, function() {
|
||||||
OC.Share.droppedDown = false;
|
OC.Share.droppedDown = false;
|
||||||
$('#dropdown').remove();
|
$('#dropdown').remove();
|
||||||
if (typeof FileActions !== 'undefined') {
|
if (typeof FileActions !== 'undefined') {
|
||||||
@ -753,14 +753,14 @@ OC.Share={
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$('#linkText').val(link);
|
$('#linkText').val(link);
|
||||||
$('#linkText').show('blind');
|
$('#linkText').slideDown(OC.menuSpeed);
|
||||||
$('#linkText').css('display','block');
|
$('#linkText').css('display','block');
|
||||||
if (oc_appconfig.core.enforcePasswordForPublicLink === false || password === null) {
|
if (oc_appconfig.core.enforcePasswordForPublicLink === false || password === null) {
|
||||||
$('#showPassword').show();
|
$('#showPassword').show();
|
||||||
$('#showPassword+label').show();
|
$('#showPassword+label').show();
|
||||||
}
|
}
|
||||||
if (password != null) {
|
if (password != null) {
|
||||||
$('#linkPass').show('blind');
|
$('#linkPass').slideDown(OC.menuSpeed);
|
||||||
$('#showPassword').attr('checked', true);
|
$('#showPassword').attr('checked', true);
|
||||||
$('#linkPassText').attr('placeholder', '**********');
|
$('#linkPassText').attr('placeholder', '**********');
|
||||||
}
|
}
|
||||||
@ -770,11 +770,11 @@ OC.Share={
|
|||||||
$('#allowPublicUploadWrapper').show();
|
$('#allowPublicUploadWrapper').show();
|
||||||
},
|
},
|
||||||
hideLink:function() {
|
hideLink:function() {
|
||||||
$('#linkText').hide('blind');
|
$('#linkText').slideUp(OC.menuSpeed);
|
||||||
$('#defaultExpireMessage').hide();
|
$('#defaultExpireMessage').hide();
|
||||||
$('#showPassword').hide();
|
$('#showPassword').hide();
|
||||||
$('#showPassword+label').hide();
|
$('#showPassword+label').hide();
|
||||||
$('#linkPass').hide('blind');
|
$('#linkPass').slideUp(OC.menuSpeed);
|
||||||
$('#emailPrivateLink #email').hide();
|
$('#emailPrivateLink #email').hide();
|
||||||
$('#emailPrivateLink #emailButton').hide();
|
$('#emailPrivateLink #emailButton').hide();
|
||||||
$('#allowPublicUploadWrapper').hide();
|
$('#allowPublicUploadWrapper').hide();
|
||||||
@ -805,7 +805,7 @@ OC.Share={
|
|||||||
}
|
}
|
||||||
$('#expirationCheckbox').attr('checked', true);
|
$('#expirationCheckbox').attr('checked', true);
|
||||||
$('#expirationDate').val(date);
|
$('#expirationDate').val(date);
|
||||||
$('#expirationDate').show('blind');
|
$('#expirationDate').slideDown(OC.menuSpeed);
|
||||||
$('#expirationDate').css('display','block');
|
$('#expirationDate').css('display','block');
|
||||||
$('#expirationDate').datepicker({
|
$('#expirationDate').datepicker({
|
||||||
dateFormat : 'dd-mm-yy'
|
dateFormat : 'dd-mm-yy'
|
||||||
@ -817,7 +817,7 @@ OC.Share={
|
|||||||
datePickerOptions.maxDate = new Date(shareTime + oc_appconfig.core.defaultExpireDate * 24 * 3600 * 1000);
|
datePickerOptions.maxDate = new Date(shareTime + oc_appconfig.core.defaultExpireDate * 24 * 3600 * 1000);
|
||||||
}
|
}
|
||||||
if(oc_appconfig.core.defaultExpireDateEnabled) {
|
if(oc_appconfig.core.defaultExpireDateEnabled) {
|
||||||
$('#defaultExpireMessage').show('blind');
|
$('#defaultExpireMessage').slideDown(OC.menuSpeed);
|
||||||
}
|
}
|
||||||
$.datepicker.setDefaults(datePickerOptions);
|
$.datepicker.setDefaults(datePickerOptions);
|
||||||
}
|
}
|
||||||
@ -905,7 +905,7 @@ $(document).ready(function() {
|
|||||||
$('#dropdown').trigger(new $.Event('sharesChanged', {shares: OC.Share.currentShares}));
|
$('#dropdown').trigger(new $.Event('sharesChanged', {shares: OC.Share.currentShares}));
|
||||||
OC.Share.updateIcon(itemType, itemSource);
|
OC.Share.updateIcon(itemType, itemSource);
|
||||||
if (typeof OC.Share.statuses[itemSource] === 'undefined') {
|
if (typeof OC.Share.statuses[itemSource] === 'undefined') {
|
||||||
$('#expiration').hide('blind');
|
$('#expiration').slideUp(OC.menuSpeed);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -988,7 +988,7 @@ $(document).ready(function() {
|
|||||||
OC.Share.updateIcon(itemType, itemSource);
|
OC.Share.updateIcon(itemType, itemSource);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$('#linkPass').toggle('blind');
|
$('#linkPass').slideToggle(OC.menuSpeed);
|
||||||
$('#linkPassText').focus();
|
$('#linkPassText').focus();
|
||||||
}
|
}
|
||||||
if (expireDateString !== '') {
|
if (expireDateString !== '') {
|
||||||
@ -997,7 +997,7 @@ $(document).ready(function() {
|
|||||||
} else {
|
} else {
|
||||||
// Delete private link
|
// Delete private link
|
||||||
OC.Share.hideLink();
|
OC.Share.hideLink();
|
||||||
$('#expiration').hide('blind');
|
$('#expiration').slideUp(OC.menuSpeed);
|
||||||
if ($('#linkText').val() !== '') {
|
if ($('#linkText').val() !== '') {
|
||||||
$loading.removeClass('hidden');
|
$loading.removeClass('hidden');
|
||||||
$button.addClass('hidden');
|
$button.addClass('hidden');
|
||||||
@ -1010,7 +1010,7 @@ $(document).ready(function() {
|
|||||||
$('#dropdown').trigger(new $.Event('sharesChanged', {shares: OC.Share.currentShares}));
|
$('#dropdown').trigger(new $.Event('sharesChanged', {shares: OC.Share.currentShares}));
|
||||||
OC.Share.updateIcon(itemType, itemSource);
|
OC.Share.updateIcon(itemType, itemSource);
|
||||||
if (typeof OC.Share.statuses[itemSource] === 'undefined') {
|
if (typeof OC.Share.statuses[itemSource] === 'undefined') {
|
||||||
$('#expiration').hide('blind');
|
$('#expiration').slideUp(OC.menuSpeed);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -1063,7 +1063,7 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '#dropdown #showPassword', function() {
|
$(document).on('click', '#dropdown #showPassword', function() {
|
||||||
$('#linkPass').toggle('blind');
|
$('#linkPass').slideToggle(OC.menuSpeed);
|
||||||
if (!$('#showPassword').is(':checked') ) {
|
if (!$('#showPassword').is(':checked') ) {
|
||||||
var itemType = $('#dropdown').data('item-type');
|
var itemType = $('#dropdown').data('item-type');
|
||||||
var itemSource = $('#dropdown').data('item-source');
|
var itemSource = $('#dropdown').data('item-source');
|
||||||
@ -1133,9 +1133,9 @@ $(document).ready(function() {
|
|||||||
if (!result || result.status !== 'success') {
|
if (!result || result.status !== 'success') {
|
||||||
OC.dialogs.alert(t('core', 'Error unsetting expiration date'), t('core', 'Error'));
|
OC.dialogs.alert(t('core', 'Error unsetting expiration date'), t('core', 'Error'));
|
||||||
}
|
}
|
||||||
$('#expirationDate').hide('blind');
|
$('#expirationDate').slideUp(OC.menuSpeed);
|
||||||
if (oc_appconfig.core.defaultExpireDateEnforced === false) {
|
if (oc_appconfig.core.defaultExpireDateEnforced === false) {
|
||||||
$('#defaultExpireMessage').show('blind');
|
$('#defaultExpireMessage').slideDown(OC.menuSpeed);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -1161,7 +1161,7 @@ $(document).ready(function() {
|
|||||||
expirationDateField.addClass('error');
|
expirationDateField.addClass('error');
|
||||||
} else {
|
} else {
|
||||||
if (oc_appconfig.core.defaultExpireDateEnforced === 'no') {
|
if (oc_appconfig.core.defaultExpireDateEnforced === 'no') {
|
||||||
$('#defaultExpireMessage'). hide('blind');
|
$('#defaultExpireMessage').slideUp(OC.menuSpeed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user