animacion difusion eliminada

This commit is contained in:
2025-11-14 01:00:48 +01:00
parent 4b8d400923
commit 1e62f2a4d8
3 changed files with 76 additions and 8 deletions
+67 -1
View File
@@ -17,7 +17,73 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
*/
// Disable jQuery fade animations to make UI snappier
(function (win) {
if (!win || !win.jQuery) {
return;
}
var $ = win.jQuery;
if ($.fn._noAnimationPatch) {
return;
}
function getCallback(args) {
for (var i = args.length - 1; i >= 0; i--) {
if (typeof args[i] === 'function') {
return args[i];
}
}
return null;
}
function immediate(action) {
return function () {
var callback = getCallback(arguments);
return this.each(function () {
var el = $(this);
if (action === 'show') {
el.show().css('opacity', 1);
} else if (action === 'hide') {
el.hide().css('opacity', 0);
}
if (callback) {
callback.call(this);
}
});
};
}
$.fn.fadeIn = immediate('show');
$.fn.fadeOut = immediate('hide');
$.fn.fadeTo = function () {
var callback = getCallback(arguments);
var target = typeof arguments[1] === 'number' ? arguments[1] : 1;
return this.each(function () {
var el = $(this);
el.css('opacity', target);
if (target === 0) {
el.hide();
} else {
el.show();
}
if (callback) {
callback.call(this);
}
});
};
$.fn.fadeToggle = function () {
var callback = getCallback(arguments);
return this.each(function () {
var el = $(this);
var hidden = !el.is(':visible') || el.css('opacity') === '0';
if (hidden) {
el.fadeIn(callback);
} else {
el.fadeOut(callback);
}
});
};
$.fn._noAnimationPatch = true;
})(window);
var globalSettings={
version: {value: (typeof globalSettingsVersion!='undefined' && globalSettingsVersion!=null) ? globalSettingsVersion : 1, locked:false},