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. <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
|
|
|
78
|
General Category / EasyUI for jQuery / tree create infinite child element
|
on: July 24, 2015, 11:03:49 PM
|
Tree create infinite child element. Please see the attach file I applied code from demo. May be something wrong in json file. Could you please advice? Thank you. <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. <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>
|
|
|
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. <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>
|
|
|
|