Show Posts
|
Pages: [1] 2 3
|
5
|
General Category / General Discussion / scrolling horizontal doesn't work [SOLVED]
|
on: November 27, 2017, 03:29:23 AM
|
i created extend function for my treegrid. it binds event keydown for treegrid's panel that makes user can press key right (keycode=39) and left (keycode=37) on a row so user can move from columns to next/prev columns.
i didn't set fitcolumns to true, but why the horizontal scrollbar dont move to next column while i press 'right key' neither 'left key'? so i can see the right column by press keyboard, i have use mouse to scroll it.
any idea to solve it?
PS: i've set fitcolumns to false, but it still doesnt work
|
|
|
7
|
General Category / General Discussion / $.messager.progress show/run simultaneously
|
on: November 25, 2017, 01:18:28 AM
|
how to make $.messager.progress show simultan before the next line
$.messager.progress({ title:'Proses', msg:'Searching...' }).dialog('dialog').css('z-index', 9999999);
t.tree('update', { target: nodes[0].target, iconCls: 'icon-loading' });
for(var i=0; i<nodes.length; i++){ var node = nodes; $(node.target).removeClass('tree-node-search'); $(node.target).hide(); }
"$.messager.progress" always shows after code for{...} 've executed, why?
|
|
|
8
|
General Category / General Discussion / Re: $.messager.progress behind combotree's panel
|
on: November 23, 2017, 02:55:54 AM
|
well done jarry, thank alot
now, i got new problem using $.messeger.progress, why it appears last time, after execute codes behind.
$.messager.progress({ title:'Wait', msg:'searching...' }).dialog('dialog').css('z-index', 9999999); next code #1; next code #2; next code #3;
why the messeger show after 'next code #3' executed, not first instead?
|
|
|
9
|
General Category / General Discussion / $.messager.progress behind combotree's panel
|
on: November 20, 2017, 09:10:23 PM
|
I use combotree's extend keyhandler to query node in its tree panel. While searching process, i want to show $.messager.progress . It works, but the $.messager.progress appears behind the combotree's panel.
How to show $.messager.progress on top of combotree's panel ?
thanks a lot
|
|
|
11
|
General Category / EasyUI for jQuery / treegrid getEditor return null
|
on: February 08, 2016, 08:50:32 PM
|
here are my code :
................................................. <thead> <tr> <th data-options="field:'name',width:180,editor:'text'">Task Name</th> <th data-options="field:'persons',width:60,align:'right'">Persons</th> <th data-options="field:'begin',width:80">Begin Date</th> <th data-options="field:'end',width:80">End Date</th> </tr> </thead> </table> <script type="text/javascript"> $(function(){ $('#tg').treegrid({ onClickCell: function(field,row){ console.log(row.id); console.log(field); var rowId=row.id; var nmField=field; var editor=$(this).treegrid('getEditor',{id:3,field:'name'}); console.log(editor); } }); }) </script>
My aim is : i want make cellediting when a cell clicked, but it (getEditor) returns null. can you help me?
|
|
|
12
|
General Category / EasyUI for jQuery / access combotree function on datagrid editor
|
on: April 02, 2015, 12:54:52 AM
|
i've trie this methods for tree : $.extend($.fn.tree.defaults.methods, { highlight: function(jq, target){ return jq.each(function(){ $(this).find('.tree-node-selected').removeClass('tree-node-selected'); /*isoft; original: .tree.node.hover*/ $(target).addClass('tree-node-selected'); }) }, navTree: function(jq){ return jq.each(function(){ var t = $(this); t.attr('tabindex',0); t.unbind('.tree').bind('keydown.tree', function(e){ var curr = getCurr(); if (!curr.length){return} if (e.keyCode == 40){ // down var li = getNext(curr); if (li.length){ t.tree('highlight', li[0]); t.tree('scrollTo',li[0]); /*isoft*/ } } else if (e.keyCode == 38){ // up var li = getPrev(curr); if (li.length){ t.tree('highlight', li[0]); t.tree('scrollTo',li[0]); /*isoft*/ } } else if (e.keyCode == 13){ t.tree('select', curr[0]); } else if (e.keyCode == 39){ // right if (!t.tree('isLeaf', curr[0])){ t.tree('expand', curr[0]); } } else if (e.keyCode == 37){ // left if (!t.tree('isLeaf', curr[0])){ t.tree('collapse', curr[0]); } } e.preventDefault(); }).bind('mouseover.tree', function(e){ var node = $(e.target).closest('div.tree-node'); if (node.length){ t.find('.tree-node-hover').each(function(){ if (this != node[0]){ $(this).removeClass('tree-node-hover'); } }) } }); function getCurr(){ var n = t.find('.tree-node-hover'); if (!n.length){ n = t.find('.tree-node-selected'); } return n; } function getNext(curr){ var n = $(); var node = t.tree('getNode', curr[0]); if (t.tree('isLeaf', node.target)){ n = curr.parent().next().children('div.tree-node'); if (!n.length){ var p = t.tree('getParent', curr[0]); if (p){ n = $(p.target).parent().next().children('div.tree-node'); } } } else { if (node.state == 'closed'){ n = curr.parent().next().children('div.tree-node'); } else { var cc = t.tree('getChildren', curr[0]); if (cc.length){ n = $(cc[0].target); } }
} return n; } function getPrev(curr){ var n = curr.parent().prev().children('div.tree-node'); if (n.length){ var node = t.tree('getNode', n[0]); if (node.state == 'open'){ var cc = t.tree('getChildren', node.target); if (cc.length){ n = $(cc[cc.length-1].target); } } } else { var p = t.tree('getParent', curr[0]); if (p){ n = $(p.target); } } return n; } }) } });
now, i place combotree on my datagrid as editor, how to access above method for my cobotree's tree?
|
|
|
13
|
General Category / EasyUI for jQuery / Re: change cell style on Click Cell
|
on: March 25, 2015, 07:42:37 PM
|
i have this :
var dg=$(this); var dc = $(this).data('datagrid').dc; var body = dc.body1.add(dc.body2); body.unbind('click').bind('click',function(e){ var tr = $(e.target).closest('tr.datagrid-row'); var tt=$(e.target); var index = parseInt(tr.attr('datagrid-row-index')); var td=tt.closest("td[field]",tr); var field=td.attr("field"); ......................... ......................... })
i tried to insert addClass for td in it, but it doesnt restyle
|
|
|
|