/**
* The Patch for jQuery EasyUI 1.4
*/
(
function
($){
var
plugin = $.fn._size;
$.fn._size =
function
(options, parent){
if
(
typeof
options !=
‘string‘
){
return
this
.each(
function
(){
parent = parent || $(
this
).parent();
if
(parent.length){
plugin.call($(
this
), options, parent);
}
});
}
else
if
(options ==
‘unfit‘
){
return
this
.each(
function
(){
var
p = $(
this
).parent();
if
(p.length){
plugin.call($(
this
), options, parent);
}
});
}
else
{
return
plugin.call(
this
, options, parent);
}
};
})(jQuery);
(
function
($){
$.map([
‘validatebox‘
,
‘textbox‘
,
‘filebox‘
,
‘searchbox‘
,
‘combo‘
,
‘combobox‘
,
‘combogrid‘
,
‘combotree‘
,
‘datebox‘
,
‘datetimebox‘
,
‘numberbox‘
,
‘spinner‘
,
‘numberspinner‘
,
‘timespinner‘
,
‘datetimespinner‘
],
function
(plugin){
if
($.fn[plugin]){
if
($.fn[plugin].defaults.events){
$.fn[plugin].defaults.events.click =
function
(e){
if
(!$(e.data.target).is(
‘:focus‘
)){
$(e.data.target).trigger(
‘focus‘
);
}
};
}
}
});
$.fn.combogrid.defaults.height = 22;
$(
function
(){
$(document).bind(
‘mousewheel.combo‘
,
function
(e){
$(e.target).trigger(
‘mousedown.combo‘
);
});
});
})(jQuery);
(
function
($){
$.extend($.fn.form.methods, {
clear:
function
(jq){
return
jq.each(
function
(){
var
target =
this
;
$(
‘input,select,textarea‘
, target).each(
function
(){
var
t =
this
.type, tag =
this
.tagName.toLowerCase();
if
(t ==
‘text‘
|| t ==
‘hidden‘
|| t ==
‘password‘
|| tag ==
‘textarea‘
){
this
.value =
‘‘
;
}
else
if
(t ==
‘file‘
){
var
file = $(
this
);
if
(!file.hasClass(
‘textbox-value‘
)){
var
newfile = file.clone().val(
‘‘
);
newfile.insertAfter(file);
if
(file.data(
‘validatebox‘
)){
file.validatebox(
‘destroy‘
);
newfile.validatebox();
}
else
{
file.remove();
}
}
}
else
if
(t ==
‘checkbox‘
|| t ==
‘radio‘
){
this
.checked =
false
;
}
else
if
(tag ==
‘select‘
){
this
.selectedIndex = -1;
}
});
var
t = $(target);
var
plugins = [
‘textbox‘
,
‘combo‘
,
‘combobox‘
,
‘combotree‘
,
‘combogrid‘
,
‘slider‘
];
for
(
var
i=0; i<plugins.length; i++){
var
plugin = plugins[i];
var
r = t.find(
‘.‘
+plugin+
‘-f‘
);
if
(r.length && r[plugin]){
r[plugin](
‘clear‘
);
}
}
$(target).form(
‘validate‘
);
});
}
});
})(jQuery);
(
function
($){
function
setSize(target, param){
var
opts = $.data(target,
‘linkbutton‘
).options;
if
(param){
$.extend(opts, param);
}
if
(opts.width || opts.height || opts.fit){
var
btn = $(target);
var
parent = btn.parent();
var
isVisible = btn.is(
‘:visible‘
);
if
(!isVisible){
var
spacer = $(
‘<div style="display:none"></div>‘
).insertBefore(target);
var
style = {
position: btn.css(
‘position‘
),
display: btn.css(
‘display‘
),
left: btn.css(
‘left‘
)
};
btn.appendTo(
‘body‘
);
btn.css({
position:
‘absolute‘
,
知识推荐
- php使用smtp类发送邮件
- Servlet&&Jsp 概述
- Linux中配置/etc/sysconfig/network-script/ifcfg-eth0
- 百度网络监控实战:NetRadar横空出世(上)
- 使用PuTTy在CentOS下安装web.py与简单的文件传输
- 跟我一起,利用bitcms内容管理系统从0到1学习小程序开发:三、上传图片到服务器
- 采用Opserver来监控你的ASP.NET项目系列(三、监控你的服务器状态)
- 全能自定义环境,一键快速安装PHP7.2版本,32/64位任选
- JS之json的基本用法
- 网站架构
- MVC设计模式
- js操作css变量
- Vue.js搭建路由报错 router.map is not a function,Cannot read property ‘component’ of undefined
- 网络相关的命令,firewalld,netfilter,iptabls语法
- asp.net core中DockerFile文件中的COPY
- phpcms之首页组成(二)
- css选择其指定标签父元素的子元素(first-child 与 first-of-type之间的区别)
- k8s+docker:部署留言板php+redis
我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8
不良信息举报平台
互联网安全管理备案
Copyright 2023 www.wodecom.cn All Rights Reserved