分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 前端开发

easyui datagrade pagination发送两次请求,jquery.easyui.min.js最后面加下面代码

发布时间:2023-09-06 01:34责任编辑:郭大石关键词:jseasyui

/**

* The Patch for jQuery EasyUI 1.4
*/
(function($){
varplugin = $.fn._size;
$.fn._size =function(options, parent){
if(typeofoptions !=‘string‘){
returnthis.each(function(){
parent = parent || $(this).parent();
if(parent.length){
plugin.call($(this), options, parent);
}
});
}elseif(options ==‘unfit‘){
returnthis.each(function(){
varp = $(this).parent();
if(p.length){
plugin.call($(this), options, parent);
}
});
}else{
returnplugin.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){
returnjq.each(function(){
vartarget =this;
$(‘input,select,textarea‘, target).each(function(){
vart =this.type, tag =this.tagName.toLowerCase();
if(t ==‘text‘|| t ==‘hidden‘|| t ==‘password‘|| tag ==‘textarea‘){
this.value =‘‘;
}elseif(t ==‘file‘){
varfile = $(this);
if(!file.hasClass(‘textbox-value‘)){
varnewfile = file.clone().val(‘‘);
newfile.insertAfter(file);
if(file.data(‘validatebox‘)){
file.validatebox(‘destroy‘);
newfile.validatebox();
}else{
file.remove();
}
}
}elseif(t ==‘checkbox‘|| t ==‘radio‘){
this.checked =false;
}elseif(tag ==‘select‘){
this.selectedIndex = -1;
}
});
vart = $(target);
varplugins = [‘textbox‘,‘combo‘,‘combobox‘,‘combotree‘,‘combogrid‘,‘slider‘];
for(vari=0; i<plugins.length; i++){
varplugin = plugins[i];
varr = t.find(‘.‘+plugin+‘-f‘);
if(r.length && r[plugin]){
r[plugin](‘clear‘);
}
}
$(target).form(‘validate‘);
});
}
});
})(jQuery);
(function($){
functionsetSize(target, param){
varopts = $.data(target,‘linkbutton‘).options;
if(param){
$.extend(opts, param);
}
if(opts.width || opts.height || opts.fit){
varbtn = $(target);
varparent = btn.parent();
varisVisible = btn.is(‘:visible‘);
if(!isVisible){
varspacer = $(‘<div style="display:none"></div>‘).insertBefore(target);
varstyle = {
position: btn.css(‘position‘),
display: btn.css(‘display‘),
left: btn.css(‘left‘)
};
btn.appendTo(‘body‘);
btn.css({
position:‘absolute‘,
我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved