RM.Web/Themes/Scripts/artDialog/jquery.artDialog.source.js
(开头部分) 32KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*!
* artDialog 4.1.6
* Date: 2012-07-16 22:57
* http://code.google.com/p/artdialog/
* (c) 2009-2012 TangBin, http://www.planeArt.cn
*
* This is licensed under the GNU LGPL, version 2.1 or later.
* For details, see: http://creativecommons.org/licenses/LGPL/2.1/
*/
;(function ($, window, undefined) {
$.noop = $.noop || function () {}; // jQuery 1.3.2
var _box, _thisScript, _skin, _path,
_count = 0,
_$window = $(window),
_$document = $(document),
_$html = $('html'),
_elem = document.documentElement,
_isIE6 = window.VBArray && !window.XMLHttpRequest,
_isMobile = 'createTouch' in document && !('onmousemove' in _elem)
|| /(iPhone|iPad|iPod)/i.test(navigator.userAgent),
_expando = 'artDialog' + + new Date;
var artDialog = function (config, ok, cancel) {
config = config || {};
if (typeof config === 'string' || config.nodeType === 1) {
config = {content: config, fixed: !_isMobile};
};
var api,
defaults = artDialog.defaults,
elem = config.follow = this.nodeType === 1 && this || config.follow;
// 合并默认配置
for (var i in defaults) {
if (config[i] === undefined) config[i] = defaults[i];
};
// 兼容v4.1.0之前的参数,未来版本将删除此
$.each({ok:"yesFn",cancel:"noFn",close:"closeFn",init:"initFn",okVal:"yesText",cancelVal:"noText"},
function(i,o){config[i]=config[i]!==undefined?config[i]:config[o]});
// 返回跟随模式或重复定义的ID
if (typeof elem === 'string') elem = $(elem)[0];
config.id = elem && elem[_expando + 'follow'] || config.id || _expando + _count;
api = artDialog.list[config.id];
if (elem && api) return api.follow(elem).zIndex().focus();
if (api) return api.zIndex().focus();
// 目前主流移动设备对fixed支持不好
if (_isMobile) config.fixed = false;
// 按钮队列
if (!$.isArray(config.button)) {
config.button = config.button ? [config.button] : [];
};
if (ok !== undefined) config.ok = ok;
if (cancel !== undefined) config.cancel = cancel;
后面还有 1193 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
