EasyUI Forum
May 04, 2024, 11:24:45 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: 1 ... 4 5 [6]
76  General Category / EasyUI for jQuery / 'panel' undefined when refresh panel href page contain datagrid with paging on: July 27, 2015, 12:47:16 AM
Chrome browser shown "Uncaught TypeError: Cannot read property 'panel' of undefined"
When I try to refresh panel onSelect Tab event.
Error occurred only href page that contain datagrid with paging.

Code:
<body>
    <div class="easyui-layout" id="viewport" fit="true">
<div id="TpConfig" class="easyui-tabs" data-options="fit:true,onSelect:refreshPanel">
<div id="TabUserCtrl" title="Users Control" data-options="href:'TabTemplate1.aspx'" style="padding:10px;"></div>
<div id="TabSystemSetting" title="System Settings" data-options="href:'TabTemplate2.aspx'" style="padding:10px;"></div>
</div>
</div>

<script type="text/javascript">
    function refreshPanel(title, index) {
        var p = $(this).tabs('getTab', index);  // get current tab
        p.panel('refresh'); // error this line
    }    
    </script>
   
</body>

Could you please advice. Many Thank
77  General Category / EasyUI for jQuery / Re: tree create infinite child element on: July 25, 2015, 06:35:50 AM
It's work now. Thank you very much.
78  General Category / EasyUI for jQuery / tree create infinite child element on: July 24, 2015, 11:03:49 PM
Tree create infinite child element. Shocked

Please see the attach file

I applied code from demo.

May be something wrong in json file.

Could you please advice?

Thank you.

Code:
<body>
    <h2>CheckBox Tree</h2>
    <p>Tree nodes with check boxes.</p>
    <div style="margin:20px 0;">
        <a href="#" class="easyui-linkbutton" onclick="getChecked()">GetChecked</a>
    </div>
    <div style="margin:10px 0">
        <input type="checkbox" checked onchange="$('#tt').tree({cascadeCheck:$(this).is(':checked')})">CascadeCheck
        <input type="checkbox" onchange="$('#tt').tree({onlyLeafCheck:$(this).is(':checked')})">OnlyLeafCheck
    </div>
    <div class="easyui-panel" style="padding:5px">
        <ul id="tt" class="easyui-tree" data-options="url:'treedata3.json',method:'get',animate:true,checkbox:true"></ul>
    </div>
    <script type="text/javascript">
        function getChecked(){
            var nodes = $('#tt').tree('getChecked',['checked','indeterminate']);
console.log(nodes);
            var s = '';
            for(var i=0; i<nodes.length; i++){
                if (s != '') s += ',';
                s += nodes[i].id;
            }
            alert(s);
        }
    </script>
</body>
79  General Category / EasyUI for jQuery / Re: treegrid don't fire onUnSelect, onUnCheck event on: June 22, 2015, 10:10:34 PM
3 days of research. I would like to share a solution that treegrid act like CasecadeCheck of tree control.

But it is not a perfect yet.

Code:
<table id="tg" title="Folder Browser" class="easyui-treegrid" style="width:100%;height:100%;"
data-options="
url: 'treegrid_data1.json',
method: 'get',
rownumbers: true,
idField: 'id',
treeField: 'name',
singleSelect: false,
selectOnCheck: true,
checkOnSelect: true,
onSelect: onSelect,
onUnselect: onUnselect
">
<thead>
<tr>
<th data-options="field:'ck',checkbox:true"></th>
<th data-options="field:'id'" width="50">ID</th>
<th data-options="field:'name'" width="220">Name</th>
<th data-options="field:'size'" width="100" align="right">Size</th>
<th data-options="field:'date'" width="150">Modified Date</th>
</tr>
</thead>
</table>

<script type="text/javascript">
function loopChildren(obj,result) {
obj.forEach( function (arrayItem)
{
var w = arrayItem.id;
result.push(w);
var x = arrayItem.children;
if(x){
loopChildren(x,result);
}
});
return result;
}
function onSelect(data) {
console.log(data.id);
var r = [];
var c = data.children;
if(c){
var s = loopChildren(c,r);
if(s) {
for(var i=0; i<s.length; i++){
var row = s[i];
$("#tg").treegrid('checkRow',row);
}
}
}
}
function onUnselect(data) {
console.log(data.id);
var r = [];
var c = data.children;
if(c){
var s = loopChildren(c,r);
if(s) {
for(var i=0; i<s.length; i++){
var row = s[i];
$("#tg").treegrid('unselectRow',row);
}
}
}
}
</script>   

80  General Category / EasyUI for jQuery / Re: treegrid don't fire onUnSelect, onUnCheck event on: June 22, 2015, 09:51:19 PM
I found a mistake.  Grin

onUnCheck must be onUncheck
onUnSelect must be onUnselect

Thank you.
81  General Category / EasyUI for jQuery / treegrid don't fire onUnSelect, onUnCheck event on: June 22, 2015, 09:14:41 PM
May be I do something wrong, Could you please suggest? Thank you.

Code:
<table title="Folder Browser" class="easyui-treegrid" style="width:700px;height:250px"
data-options="
url: 'treegrid_data1.asp',
method: 'get',
rownumbers: true,
idField: 'id',
treeField: 'name',
singleSelect: false,
selectOnCheck: true,
checkOnSelect: true,
onUnCheck: function(index,row){
console.log(index)
console.log(row)
},
onUnSelect: function(index,row){
console.log(index)
console.log(row)
}
">
<thead>
<tr>
<th data-options="field:'ck',checkbox:true"></th>
<th data-options="field:'id'" width="50">ID</th>
<th data-options="field:'name'" width="220">Name</th>
<th data-options="field:'size'" width="100" align="right">Size</th>
<th data-options="field:'date'" width="150">Modified Date</th>
</tr>
</thead>
</table>
82  General Category / EasyUI for jQuery / Re: Treegrid with checkbox selection on: June 20, 2015, 06:14:34 AM
Could you please show me how to set cascadeCheck like a [CheckBox Tree] and how to get value from selected rows. Many thank.
83  General Category / EasyUI for jQuery / Card View, How to change cursor to pointer when mouse over each row on: February 14, 2015, 08:40:20 PM
Hello,

Could you please show me how to change cursor to 'pointer' when mouse over each row?
From the demo cursor is 'default'.

Thank you
Pages: 1 ... 4 5 [6]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!