app/Resources/static-src/common/bootstrap-modal-hack.js
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
(function() {
$(document).on('click.modal.data-api', '[data-toggle="modal"]', function() {
let $this = $(this),
href = $this.attr('href'),
url = $this.data('url');
if (url) {
let $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, '')));
let loading = cd.loading({
isFixed: true
});
$target.html(loading);
$target.load(url);
}
});
// 同时存在多个modal时,关闭时还有其他modal存在,防止无法上下拖动
$(document).on('hidden.bs.modal', '#attachment-modal', function() {
if ($('#modal').attr('aria-hidden')) $(document.body).addClass('modal-open');
if ($('#material-preview-player').length > 0) $('#material-preview-player').html('');
});
$('.modal').on('click', '[data-toggle=form-submit]', function(e) {
e.preventDefault();
$($(this).data('target')).submit();
});
$('.modal').on('click.modal-pagination', '.pagination a', function(e) {
e.preventDefault();
let $modal = $(e.delegateTarget);
const url = $(this).attr('href');
const limitHref = 'javascript:;';
if (url === limitHref || typeof url === 'undefined') {
return;
}
$.get(url, function(html) {
$modal.html(html);
});
});
}());
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。