TrainSignManage/WebFrame/build/js/BoxWidget.js
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/* BoxWidget()
* ======
* Adds box widget functions to boxes.
*
* @Usage: $('.my-box').boxWidget(options)
* This plugin auto activates on any element using the `.box` class
* Pass any option as data-option="value"
*/
+function ($) {
'use strict';
var DataKey = 'lte.boxwidget';
var Default = {
animationSpeed : 500,
collapseTrigger: '[data-widget="collapse"]',
removeTrigger : '[data-widget="remove"]',
collapseIcon : 'fa-minus',
expandIcon : 'fa-plus',
removeIcon : 'fa-times'
};
var Selector = {
data : '.box',
collapsed: '.collapsed-box',
header : '.box-header',
body : '.box-body',
footer : '.box-footer',
tools : '.box-tools'
};
var ClassName = {
collapsed: 'collapsed-box'
};
var Event = {
collapsed: 'collapsed.boxwidget',
expanded : 'expanded.boxwidget',
removed : 'removed.boxwidget'
};
// BoxWidget Class Definition
// =====================
var BoxWidget = function (element, options) {
this.element = element;
this.options = options;
this._setUpListeners();
};
BoxWidget.prototype.toggle = function () {
var isOpen = !$(this.element).is(Selector.collapsed);
if (isOpen) {
this.collapse();
} else {
this.expand();
}
};
后面还有 107 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。