EasyUI Forum
May 05, 2024, 01:56:10 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / How to repeatedly check input value on: March 19, 2012, 07:52:51 AM
There is an example: a datebox 'A' and the other datebox 'B', i want to check datebox 'A' value is later than today and is  later than value of databox 'B'.

Code snippets:
$.extend($.fn.validatebox.defaults.rules, { 
    isAfter: { 
        validator: function(value, param){ 
           ......; 
        }, 
        message: '......' 
    } ,
    isLaterToday: { 
        validator: function(value, param){ 
           ......; 
        }, 
        message: '......' 
    }
}); 

HTML:
<input id="A" class="easyui-datebox" validType=""/>
<input id="B" class="easyui-datebox" />
2  General Category / EasyUI for jQuery / Treegrid in the operation of the two questions on: November 04, 2011, 03:48:18 AM

1 .How to use treegrid append to the specified line?
2. How to  upgrade or downgrade treegrid one node ,  because treegrid the append method in the parent node of child nodes of the last line added. I want to treegrid  upgrade or downgrade on its own line.
3  General Category / EasyUI for jQuery / treegrid return row index proplem on: November 03, 2011, 03:25:28 AM
How to get in line treegrid index, in the API treegrid dependent datagrid, the datagrid has getRowIndex way to get row index. but, in treegrid always used to return -1.

code:

if use datagrid , the code like this:
var node = $("#tt").datagrid("getSelected");
var nodeIndex = $("#tt").datagrid("getRowIndex",node);

the nodeIndex value is right!

but use treegrid:
var node = $("#tt").treegrid("getSelected");
var nodeIndex = $("#tt").treegrid("getRowIndex",node);

the nodeIndex value is always -1

Thanks for help
4  General Category / EasyUI for jQuery / Re: treegrid select one row on: November 03, 2011, 03:17:44 AM
thinks
5  General Category / EasyUI for jQuery / treegrid select one row on: October 30, 2011, 08:18:15 AM
I want to use treegrid for the use of a line similar to the method  'selectRow' of datagrid  selected, if treegrid not provide such API?

code :
$('#tt').datagrid('selectRow',index);

but

$('#tt').treegrid('selectRow',index)

the red color code is not work.
6  General Category / EasyUI for jQuery / Re: easyui "form" clear problem on: October 30, 2011, 08:17:53 AM
thinks for your help ,but not is it , jquery form plugin's method 'ajaxClearForm' also. Change the 'ajaxReset' method
7  General Category / EasyUI for jQuery / easyui "form" clear problem on: October 21, 2011, 10:35:09 AM
Hi,
   I recently used easyui form of usage, use the clear method, found that after emptying the form data elements which can not be re-set the properties。for example:
<script type="text/javascript">
   $('#ff').form('clear');
  $('#bb').attr('checked',true);
</script>

html:
   <form id="ff">
      <input id="bb" type="checkbox" value="0">
   </form>

I found $('#bb').attr('checked',true);  is not work. The checkbox is not checked and  when I using the "iButton" plug, if  use  "clear" method, iButton effect in Firefox would fail. That is, can not choose
8  General Category / EasyUI for jQuery / easyui "form" clear problem on: October 21, 2011, 10:33:11 AM
Hi,
   I recently used easyui form of usage, use the clear method, found that after emptying the form data elements which can not be re-set the properties。for example:
<script type="text/javascript">
   $('#ff').form('clear');
  $('#bb').attr('checked',true);
</script>

html:
   <form id="ff">
      <input id="bb" type="checkbox" value="0">
   </form>

I found $('#bb').attr('checked',true);  is not work. The checkbox is not checked and  when I using the "iButton" plug, if  use  "clear" method, iButton effect in Firefox would fail. That is, can not choose
9  General Category / EasyUI for jQuery / DataGrid create table get json object on: July 21, 2011, 06:08:47 PM
I used DataGrid to create table , the program return json string like this:
[{
   "children":[
   {
   "children":[],
   "createDate":null,
   "creator":null,
   "description":"",
   "groupName":"eeeeeeee",
   "groupNo":"eeeeee",
   "isLeaf":0,
   "localeKey":null,
   "members":[],
   "parent":null,
   "sysId":3,
   "updateDate":null,
   "updateOperator":null
   }],
   "createDate":null,
   "creator":null,
   "description":"",
   "groupName":"123",
   "groupNo":"123",
   "isLeaf":1,
   "localeKey":null,
   "members":[],
   "parent":null,
   "sysId":1,
   "updateDate":null,
   "updateOperator":null
   },
   {
   "children":[],
   "createDate":null,
   "creator":null,
   "description":"",
   "groupName":"eeeeeeee",
   "groupNo":"eeeeee",
   "isLeaf":0,
   "localeKey":null,
   "members":[],
   "parent":{
    "children":[null],
    "createDate":null,
    "creator":null,
    "description":"",
    "groupName":"123",
    "groupNo":"123",
    "isLeaf":1,
    "localeKey":null,
    "members":[],
    "parent":null,
    "sysId":1,
    "updateDate":null,
    "updateOperator":null
    },
    "sysId":3,
    "updateDate":null,
    "updateOperator":null
}]

This string is tree data, I wanna use to create table,so html code like this:

<table id="listorg" class="easyui-datagrid"
title="<s:text name='list.org.title'/>"
url="permission/org!getOrganizationList" nowrap="false" striped="true" toolbar="#tb" idField="sysId" singleSelect="true" pagination="true">
<thead>
<tr>
<th field="groupNo" width="120"><s:text name="list.org.no" /></th>
<th field="groupName" width="120"><s:text name="list.org.name" /></th>
<th field="description" width="120"><s:text name="list.org.desc" /></th>
<th field="parent" width="120"><s:text name="list.org.parentName" /></th>
</tr>
</thead>
</table>

look the red font , if you can't ,look the html colum 'parent',result the page show '[object Object]'.

Ok, How should I get the data in the 'parent'?
10  General Category / EasyUI for jQuery / User combotree return json string problem on: July 19, 2011, 07:26:47 PM
Hi, I use combotree to show tree data, I found combotree receive json string like this:
[{
   "id":1,
   "text":"Folder1",
   "iconCls":"icon-ok",
   "children":[{
      "id":2,
      "text":"File1",
      "checked":true
   },{
      "id":3,
      "text":"Folder2",
      "state":"open",
      "children":[{
         "id":4,
         "text":"File3",
         "attributes":{
            "p1":"value1",
            "p2":"value2"
         },
         "checked":true,
         "iconCls":"icon-reload"
      },{
         "id": 8,
         "text":"Async Folder",
         "state":"closed"
      }]
   }]
},{
   "text":"Languages",
   "state":"closed",
   "children":[{
      "id":"j1",
      "text":"Java"
   },{
      "id":"j2",
      "text":"C#"
   }]
}]


but our project framework used 'Struts2' and struts2-json-plugin return json string , and data like this:
{"data":[{"children":[],"id":6,"text":"org6"}]}

the return json string add 'data' key, How should I let it parse the data, or return to the format defined
11  General Category / Bug Report / Re: easyui tabs and panel BUG on: July 17, 2011, 06:37:56 PM
Try the below code, set the 'closed' to true to create a hidden panel and the open it.

    $('#tt').tabs('add',{   
      title:title,
      href: url,
      closable:true,
      closed:true,
      cache:true
   });   


Thanks for your help again! set the 'closed' to true ,only send one request.
12  General Category / Bug Report / Re: easyui tabs and panel BUG on: July 15, 2011, 12:59:22 AM
For the first question, set 'cache' property to true to prevent reload page when select tab panel.

For the second question, when create panel with 'href' property, the remote page content will be loaded.
$('#p').panel({
      title: 'My Panel',
      href: xxxx.jsp
});
The code above will create a panel and send a remote request to load content.
Call 'refresh' will reload the panel content again, so a content page request will be sent to remote server again.

Thanks for your reply. But the first Bug, I set 'cache' property to true ,the Problem still. I try to change easyui version to '1.2.3' ,the Bug does not exist.
13  General Category / Bug Report / easyui tabs and panel BUG on: July 14, 2011, 11:40:23 PM
The version of 1.2.4 has two bugs:
1. The method of add for tabs, use the property 'href' to load remote content to fill the tab panel; when first create new tab,the  send twice request. such as:

function addTab(title, url){   
     if ($('#tt').tabs('exists', title)){   
   $('#tt').tabs('select', title);   
     } else {   
    $('#tt').tabs('add',{   
      title:title,
      href: url,
      closable:true,
      cache:false
   });   
   }   
}


2. the panel set property 'href', use method 'refresh', easyui also send twice request;such as:
$('#p').panel({
      title: 'My Panel',
      href: xxxx.jsp
})
$('#p').panel("refresh");

Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!