Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function (require) {
var TreeStrategy = require('esui/TreeStrategy');
var eoo = require('eoo');
var u = require('underscore');
/**
* 树的数据交互策略
*
* @class ui.SelectorTreeStrategy
*/
var SelectorTreeStrategy = eoo.create(
TreeStrategy,
{
/**
* @constructs ui.SelectorTreeStrategy
* @override
* @param {Object=} options 初始化参数
* @param {boolean=} options.defaultExpand 节点是否展开,默认为`false`
*/
constructor: function (options) {
var defaults = {
defaultExpand: true,
// 需要一种定向展开的策略,
// 也就是允许某些符合条件的节点展开,某些不展开
orientExpand: false
};
}
// 相当于执行清空操作
else {
this.clearQuery();
}
};
/**
* 获取筛选区Panel
* @return {esui.Panel}
*/
exports.getFilter = function () {
return this.getChild('body').getChild('filter');
};
var TableRichSelectorWithFilter = require('eoo').create(TableRichSelector, exports);
require('esui').register(TableRichSelectorWithFilter);
return TableRichSelectorWithFilter;
}
);
}
);
/**
* 抽象鼠标行为,包括鼠标事件的捕获、开始、移动、结束等,
* $(element).mouse(
* {
* distance: 2,
* delay: 10,
* onMousestart: function () {},
* onMousedrag: function () {},
* onMousestop: function () {}
* }
* );
*/
var Mouse = eoo.create(
Base,
{
type: type,
/**
* 构造函数
* @param {Object} options 配置
* @param {DOMElement} element DOM元素
* options属性参考defaultProperties
*/
constructor: function (options, element) {
options = u.extend(
{
// 不触发元素
cancel: 'input, textarea, button, select, option',
// 鼠标移动距离阈值,大于该值才触发
var eoo = require('eoo');
var esui = require('esui');
/**
* 表格自动排序扩展
*
* 当表格加上此扩展后,其排序功能将由扩展自动提供
*
* 扩展默认使用简单的两值相减(字符串用`localeCompare`)的方法判断大小,
* 也可以在表格具体列的配置中给出`comparer`属性来提供自定义的排序算法
*
* @class extension.AutoSort
* @extends Extension
* @constructor
*/
var AutoSort = eoo.create(
Extension,
{
/**
* 指定扩展类型,始终为`"AutoSort"`
*
* @type {string}
*/
type: 'AutoSort',
/**
* 激活扩展
*
* @override
*/
activate: function () {
* panel.on('tipbeforeshow', function (e) {
* if (e.title === 'submit') {
* this.setTitle('确认');
* this.setContent('确认后才可以点击!');
* }
* else {
* this.setContent('取消的提示!');
* }
* e.preventDefault();
* });
*
* @class extension.AutoTipLayer
* @extends Extension
* @constructor
*/
var AutoTipLayer = eoo.create(
Extension,
{
/**
* 指定扩展类型,始终为`"AutoTipLayer"`
*
* @type {string}
*/
type: 'AutoTipLayer',
/**
* 激活扩展
*
* @override
*/
activate: function () {
var InputControl = require('esui/InputControl');
var Layer = require('esui/Layer');
var ui = require('esui/main');
var moment = require('moment');
var u = require('underscore');
var $ = require('jquery');
var painters = require('esui/painters');
/**
* 双日历浮层
*
* @extends Layer
* @ignore
* @constructor
*/
var MultiCalendarLayer = eoo.create(
Layer,
{
create: function () {
var ele = this.$super(arguments);
$(this.control.main).after(ele);
$(ele).addClass(this.control.helper.getPrefixClass('multicalendar-layer'));
return ele;
},
/**
* 渲染双日历浮层
*
* @param {HTMLElement} element 浮层根元素
* @inner
*/
render: function (element) {
* panel.on('tipbeforeshow', function (e) {
* if (e.title === 'submit') {
* this.setTitle('确认');
* this.setContent('确认后才可以点击!');
* }
* else {
* this.setContent('取消的提示!');
* }
* e.preventDefault();
* });
*
* @class extension.AutoTipLayer
* @extends Extension
* @constructor
*/
var AutoTipLayer = eoo.create(
Extension,
{
/**
* 指定扩展类型,始终为`"AutoTipLayer"`
*
* @type {string}
*/
type: 'AutoTipLayer',
/**
* 激活扩展
*
* @override
*/
activate: function () {
function (require) {
var u = require('underscore');
var eoo = require('eoo');
var esui = require('./main');
var Control = require('./Control');
var Helper = require('./Helper');
var painters = require('./painters');
var $ = require('jquery');
/**
* 验证信息显示控件
*
* @extends Control
* @constructor
*/
var Validity = eoo.create(
Control,
{
type: 'Validity',
/**
* 创建主元素,默认使用`<label>`元素
*
* @return {HTMLElement}
* @protected
* @override
*/
createMain: function () {
return document.createElement('label');
},
</label>
function (require) {
var eoo = require('eoo');
var lib = require('./lib');
var Control = require('./Control');
var esui = require('./main');
var Panel = require('./Panel');
var $ = require('jquery');
var u = require('underscore');
/**
* Sidebar控件
*
* @param {Object=} options 初始化参数
* @constructor
*/
var Sidebar = eoo.create(
Control,
{
type: 'Sidebar',
/**
* 创建控件主元素
*
* @return {HTMLElement}
* @override
* @protected
*/
createMain: function (options) {
if (!options.tagName) {
return this.$super([options]);
}
function (require) {
var u = require('underscore');
var lib = require('./lib');
var InputControl = require('./InputControl');
var $ = require('jquery');
var painters = require('./painters');
var esui = require('./main');
/**
* 单选或复选框组控件
*
* @extends InputControl
* @constructor
*/
var BoxGroup = require('eoo').create(
InputControl,
{
/**
* 控件类型,始终为`"BoxGroup"`
*
* @type {string}
* @readonly
* @override
*/
type: 'BoxGroup',
/**
* 初始化参数
*
* @param {Object} [options] 构造函数传入的参数
* @protected