web/assets/libs/common/bootstrap-modal-hack2.js
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
define(function(require, exports, module) {
$(document).on('click.modal.data-api', '[data-toggle="modal"]', function(e) {
var imgUrl = app.config.loading_img_path;
var $this = $(this),
href = $this.attr('href'),
url = $(this).data('url');
if (url) {
var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, '')));
var $loadingImg = "<img src='" + imgUrl + "' class='modal-loading' style='z-index:1041;width:60px;height:60px;position:absolute;top:50%;left:50%;margin-left:-30px;margin-top:-30px;'/>";
$target.html($loadingImg);
$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();
var $modal = $(e.delegateTarget);
$.get($(this).attr('href'), function(html) {
$modal.html(html);
});
});
;
(function($, window, undefined) {
// outside the scope of the jQuery plugin to
// keep track of all dropdowns
var $allDropdowns = $();
// if instantlyCloseOthers is true, then it will instantly
// shut other nav items when a new one is hovered over
$.fn.dropdownHover = function(options) {
// don't do anything if touch is supported
// (plugin causes some issues on mobile)
if ('ontouchstart' in document) return this; // don't want to affect chaining
// the element we really care about
// is the dropdown-toggle's parent
$allDropdowns = $allDropdowns.add(this.parent());
return this.each(function() {
var $this = $(this),
$parent = $this.parent(),
defaults = {
delay: 100,
instantyCloseOthers: true
},
data = {
delay: $(this).data('delay'),
instantlyCloseOthers: $(this).data('close-others')
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。