Show Posts
|
|
Pages: [1]
|
|
1
|
General Category / EasyUI for jQuery / Re: There are some bugs in the tagbox plugin
|
on: January 19, 2022, 05:58:27 PM
|
thank you very much for your reply! But there are still some problems.When mode: 'remote', after entering some words in the tagbox, the drop-down list will find some matching options, but the entered words suddenly disappear. combobox does not have this problem If I don't select any of the options in the drop-down, clicking the drop-down button again will find that the drop-down options are the ones that matched the word I just entered, not all of them. Please override the 'tagFormatter' function to achieve your requirement. $('#cc').tagbox({ onBeforeLoad: function(){ var data = $(this).tagbox('getData'); var opts = $(this).tagbox('options'); var values = $(this).tagbox('getValues'); opts.mappingRows = opts.mappingRows||[]; data = data.concat(opts.mappingRows); for(var i=0; i<values.length; i++){ var item = $.easyui.getArrayItem(data, opts.valueField, values[i]); if (item){ var row = $.easyui.getArrayItem(opts.mappingRows, opts.valueField, values[i]); if (!row){ opts.mappingRows.push(item); } } } }, tagFormatter: function(value,row){ var opts = $(this).tagbox('options'); if (row && row[opts.textField]){ return row[opts.textField]; } var mappingRows = opts.mappingRows||[]; var item = $.easyui.getArrayItem(mappingRows, opts.valueField, value); return item ? item[opts.textField] : value; } })
|
|
|
|
|
2
|
General Category / EasyUI for jQuery / There are some bugs in the tagbox plugin
|
on: January 16, 2022, 02:12:41 AM
|
Ver:1.10.1 The tagbox is inherited from the ComboBox plugin, so I can use all the properties in the ComboBox plugin. When I use mode: "remote" in tagbox I got some exceptions. <input name="item.graph_id" class="form-control easyui-tagbox" id="graph_id" data-options="required:true,valueField:'id',textField:'title',hasDownArrow: true,limitToList: true, url:'#(path)/graph/listj',mode:'remote',delay:500," value="#(item.graph_id??)">
1、When you directly select some options from the drop-down options, and then enter some words, the selected value suddenly becomes the result of id. Finally, delete all the selected values, click the drop-down button, and find that the drop-down options are not the same as the beginning. 2、Chinese internationalization of tagbox is wrong, still in English
|
|
|
|
|
3
|
General Category / EasyUI for jQuery / Re: treegrid remove event
|
on: December 26, 2014, 05:47:34 AM
|
Your json data has the wrong format, please use the 'loadFilter' function to convert your original data to correct data format. $('#tt').treegrid({ loadFilter:function(data,parentId){ function getRows(children){ var rows = []; function setRows(pid, children){ $.map(children, function(row){ row._parentId = pid; rows.push(row); if (row.children && row.children.length){ setRows(row.id, row.children); } row.children = undefined; }); } setRows(null, children); return rows; } data.rows = getRows(data.rows); return data; } })
thank you very much!
|
|
|
|
|
5
|
General Category / EasyUI for jQuery / Re: treegrid remove event
|
on: December 24, 2014, 06:31:26 AM
|
The 'remove' method can remove the specified node. Please check your code carefully. If your issue continues, please provide an example to demonstrate your issue.
function deleteSubject(id){ var t = $('#tt'); $.messager.confirm('提示', '确定删除该科目?', function(r){ if(r){ var data1 = t.treegrid("getData"); console.info(data1); t.treegrid("remove",id); var data = t.treegrid("getData"); console.info(data); } }); /*var footer = t.treegrid("getFooterRows"); var json = {}; json.total = 10; json.rows = data; json.footer = footer; t.treegrid("loadData",json);*/ }
|
|
|
|
|
6
|
General Category / EasyUI for jQuery / treegrid remove event
|
on: December 23, 2014, 07:48:56 AM
|
|
t.treegrid("remove",id); var data = t.treegrid("getData"); console.info(data);
This is my code . After it is called, the html dom element is removed but when I invoke the 'getData' method, the result also contains the removed data。
easyui version 1.4 。 waiting.....
|
|
|
|
|
8
|
General Category / EasyUI for jQuery / Can you hepl me online ? tree onClick is NULL
|
on: November 26, 2014, 02:42:41 AM
|
$(function(){ // 上级节点 $('#cc').combotree(); // 展示资源树 $("#tt").tree({ url:path+'/pdc_Resources/list', animate:true, lines:true, // 点击属性节点,表示要修改节点 onClick:function(node){ console.info(node); -----------------------------------------is null why? ?? $("#res_content").children().remove(); // 删除先前load // 不是点击资源管理---进入修改 if(node.id != 0){ $("#res_content").load(path+"/pdc_Resources/edit/"+node.id); }else{ $("#res_content").load(path+"/pdc_Resources/add"); } }, onLoadSuccess:function(node,data){ $('#cc').combotree("loadData",data) } }); }); My English is so bad . EasyUI Vesion is 1.4.1 and I have add the easyui-1.4.1-patch.zip. but it doesn't work!
|
|
|
|
|