文章标签 ‘EasyUi’

[转载]jQuery.EasyUI-1.2.6 API chm 格式 下载! – 疯狂秀才 – 博客园. 当前版本的更新内容如下:疯狂秀才 QQ:1055818239 Blog:http://hxling.cnblogs.com   ChangeLog   Bug 疯狂秀才 QQ:1055818239 Blog:http://hxling.cnblogs.com   tabs: Call ‘add’ method with ‘selected:false’ option, the added tab panel is always selected. fixed. treegrid: The ‘onSelect’ and ‘onUnselect’ events can’t be triggered. fixed. treegrid: Cannot display zero value field. fixed.   Improvement   [...]

2012年4月21日17:32 评论关闭

[转载]DWR Loader – Extension – jQuery EasyUI. Include ‘dwrloader.js’ To using DWR to get data for easyui, include ‘dwrloader.js’ file first. <script type=“text/JavaScript” src=“../../JQuery-1.7.2.min.js”></script>   <script type=“text/JavaScript” src=“../../JQuery.easyui.min.js”></script>   <script type=“text/javascript” src=“dwrloader.js”></script>   Assign DWR method to ‘url’ property As the default json loader, the ‘url’ property indicate the remote URL to retrieve json data. While using DWR loader, we should assign a function [...]

2012年4月18日08:57 评论关闭

[转载]Download jQuery EasyUI 1.2.6 – jQuery EasyUI. Download JQuery EasyUI 1.2.6   Current Version: 1.2.6   ChangeLog   Bug   tabs: Call ‘add’ method with ‘selected:false’ option, the added tab panel is always selected. fixed. treegrid: The ‘onSelect’ and ‘onUnselect’ events can’t be triggered. fixed. treegrid: Cannot display zero value field. fixed.   Improvement   [...]

2012年4月18日08:30 评论关闭

项目中需要根据不同的属性设置EasyUI的Tab组件的某页的动态关闭和显示,tab标签的代码如下: <div id=’tt’ class="easyui-tabs" cache="false"> <div title=’基本信息’></div> <div title=’联系方式’></div> <div id=’product’ title=’产品’></div> </div> 需要根据用户的类型来显示和隐藏产品tab页,开始以为直接根据状态直接$(‘#product’).hide();就可以了,可是试过后发现不行,于是查看了easyUI的tab组件的文档,发现有close方法可以关闭tab页,于是改写成: if(data.state==’1′) $(‘#tt’).tabs(‘close’,'产品’); 可是,如果data.state==2则需要打开tabs可是没有open方法,tab已经被关闭了,没办法只好创建一个了,代码如下: if ($(‘#tt’).tabs(‘exists’, title)) { //$(‘#tt’).tabs(‘select’, title); reloadTab(title,url); } else { $(‘#tt’).tabs(‘add’, { title: title, href:url }); }

2012年3月19日17:15 评论关闭

最近项目中需要跨域调用其他项目的数据,其他项目也是使用的EasyUI的datagrid组件,开始以为直接在datagrid的url属性定义为其他项目的url地址即可,可是测试下发现的确是返回了json数据但是json数据提示“invalid label” 错误,网上搜索了下错误解决办法,参考 “JavaScript处理Json的invalid label错误解决办法“的方法利用datagrid的loadData方法加载并转换了json还是提示上述错误,感觉原因不在格式问题。 搜索了下JavaScript跨域调用的文章“JavaScript跨域访问问题解决方法”得到启发,发现原来是因为easyUI使用的是JQuery的异步方法加载数据,应该遵循JQuery的跨域访问规则,也就是上述文章中提到的url中需要加入jsoncallback=?回调函数参数,并且返回的json的格式必须修改为:回调函数名(json数据),而现在返回的数据只是json格式的数据没有回调函数名,自然提示格式错误,于是修改了ASP.NET MVC自定义的JsonResult类,具体如何编写自定义的JsonResult类见:自定义ASP.NET MVC JsonResult序列化结果, 代码如下: public class CustomJsonResult:JsonResult { public override void ExecuteResult(ControllerContext context) { if (context == null) { throw new ArgumentNullException("context"); } HttpResponseBase response = context.HttpContext.Response; if (!String.IsNullOrEmpty(ContentType)) { response.ContentType = ContentType; } else { response.ContentType = "application/json"; } if (ContentEncoding != null) { response.ContentEncoding = ContentEncoding; } [...]

2012年3月14日15:03 评论关闭
备案信息:冀ICP备10007948号