Show Posts
|
Pages: [1] 2
|
2
|
General Category / Bug Report / Re: Datagrid formatter problem 1.4.3
|
on: July 07, 2015, 12:49:56 PM
|
My full code <table class="easyui-datagrid" id="${_id}" data-options=" url:'${request.resource_url(_context, 'list')}',border:false, pagination:true,fit:true,pageSize:50,singleSelect:true, sortName:'deadline',sortOrder:'asc', pageList:[50,100,500],idField:'_id',checkOnSelect:false, selectOnCheck:false,toolbar:'#${_tb_id}', view: detailview, onExpandRow: function(index, row){ var row_id = 'row-${_id}-' + row.id; $('#' + row_id).load( '/tasks/details?id=' + row.id, function(){ $('#${_id}').datagrid('fixDetailRowHeight', index); $('#${_id}').datagrid('fixRowHeight', index); $.parser.parse('#' + row_id); } ); }, detailFormatter: function(index, row){ var row_id = 'row-${_id}-' + row.id; return '<div id=' + row_id + '></div>'; }, onBeforeLoad: function(param){ param.performer_id = ${h.common.get_auth_employee(request).id}; $.each($('#${_tb_id} .searchbar').find('input'), function(i, el){ if(!is_undefined($(el).attr('name'))) param[$(el).attr('name')] = $(el).val(); }); } " width="100%"> <thead> % if _context.has_permision('delete'): <th data-options="field:'_id',checkbox:true">${_(u"id")}</th> % endif <th data-options="field:'title',sortable:true,width:180">${_(u"title")}</th> <th data-options="field:'status',sortable:false,width:60,formatter:function(value, row){return status_formatter(value);}">${_(u"status")}</th> <th data-options="field:'deadline',sortable:true,width:110,styler:function(){return datagrid_resource_cell_styler();}">${_(u'deadline')}</th> </thead> </table>
status_formatter function function status_formatter(status){ if(status){ var span = $('<span/>').html(status.title); span.addClass('status-label ' + status.key); return $('<div/>').append(span).html(); } }
functions status_formatter and datagrid_resource_cell_styler does not calls
|
|
|
3
|
General Category / Bug Report / Datagrid formatter problem 1.4.3
|
on: July 05, 2015, 09:24:24 AM
|
Hello. After update from 1.4.2 to 1.4.3 formatter and styler function for datagrid does not work. <thead> <th data-options="field:'status',sortable:false,width:60,formatter:function(value, row, index){return status_formatter(value);}">${_(u"status")}</th> <th data-options="field:'modifydt',sortable:true,width:120,styler:function(){return datagrid_resource_cell_styler();}"><strong>${_(u"updated")}</strong></th> <th data-options="field:'modifier',width:100,styler:function(){return datagrid_resource_cell_styler();}"><strong>${_(u"modifier")}</strong></th> </thead>
I use detailview
|
|
|
6
|
General Category / Bug Report / Re: Datagrid pageNumber bug
|
on: August 17, 2014, 01:01:55 AM
|
Does not work correctly, default page num stays 0. My code is <table class="easyui-datagrid" id="${_id}" data-options=" url:'${request.resource_url(_context, 'list')}',border:false, pagination:true,fit:true,pageSize:50,singleSelect:true, rownumbers:true,sortName:'id',sortOrder:'desc', pageList:[50,100,500],idField:'_id',checkOnSelect:false, selectOnCheck:false,toolbar:'#${_tb_id}', view: detailview, onExpandRow: function(index, row){ var row_id = 'row-${_id}-' + row.id; $('#' + row_id).load( '/suppliers/details?id=' + row.id, function(){ $('#${_id}').datagrid('fixDetailRowHeight', index); $('#${_id}').datagrid('fixRowHeight', index); } ); }, detailFormatter: function(index, row){ var row_id = 'row-${_id}-' + row.id; return '<div id=' + row_id + '></div>'; }, onBeforeLoad: function(param){ $.each($('#${_s_id}, #${_tb_id} .searchbar').find('input'), function(i, el){ param[$(el).attr('name')] = $(el).val(); }); } " width="100%"> <thead> % if _context.has_permision('delete'): <th data-options="field:'_id',checkbox:true">${_(u"id")}</th> % endif <th data-options="field:'id',sortable:true,width:60">${_(u"id")}</th> <th data-options="field:'name',sortable:true,width:200">${_(u"name")}</th> <th data-options="field:'modifydt',sortable:true,width:120,styler:function(){return datagrid_resource_cell_styler();}"><strong>${_(u"updated")}</strong></th> <th data-options="field:'modifier',width:100,styler:function(){return datagrid_resource_cell_styler();}"><strong>${_(u"modifier")}</strong></th> </thead> </table>
|
|
|
8
|
General Category / EasyUI for jQuery / Re: DataGrid Detailview + ajax
|
on: June 26, 2014, 02:23:36 AM
|
The main problem is height fixing of detailview row container. Seems I had found good solution to do detailview with ajax, may be this code will be helpful view: detailview, onExpandRow: function(index, row){ var row_id = 'row-${_id}-' + row.id; $('#' + row_id).load( '/bpersons/details?id=' + row.id, function(){ $('#${_id}').datagrid('fixDetailRowHeight', index); $('#${_id}').datagrid('fixRowHeight', index); } ); }, detailFormatter: function(index, row){ var row_id = 'row-${_id}-' + row.id; return '<div id=' + row_id + '></div>'; },
|
|
|
9
|
General Category / EasyUI for jQuery / DataGrid Detailview + ajax
|
on: June 24, 2014, 11:57:17 AM
|
Hi. I try to use ajax for detailview. Part of my code is onExpandRow: function(index, row){ var row_id = 'row-' + row.id; $('#' + row_id).load('/banks_details/details?id=' + row.id); }, detailFormatter: function(index, row){ var row_id = 'row-' + row.id; return '<div id=' + row_id + '></div>'; },
it works, but is this right way?
|
|
|
10
|
General Category / EasyUI for jQuery / Combogrid column formatter
|
on: March 22, 2014, 11:31:58 AM
|
Hi all. Have problem with formatter in column of combogrid. My Code <input class="easyui-combogrid text w20 combogrid-f combo-f" data-options=" url: '/regions/list', fitColumns: true, scrollbarSize: 7, border: false, delay: 500, idField: 'id', textField: 'region_name', mode: 'remote', sortName: 'id', sortOrder: 'desc', columns: [[{"field": "region_name", "formatter": "function(val, row){return val + \"(\" + row.country_name + \")\"} ", "sortable": true, "width": 200, "title": "name"}]], pageSize: 50, showHeader: false, showFooter: true, view: bufferview, toolbar: '#tb-827044', onBeforeLoad: function(param){ if(null && typeof(param.q) == 'undefined'){ param.id = null; } if(!param.page){ param.page = 1; param.rows = 50; } } " id="827044" type="text">
and got an error: Uncaught TypeError: Property 'formatter' of object #<Object> is not a function without formatter function works fine
|
|
|
12
|
General Category / General Discussion / Combogrid from markup
|
on: January 02, 2014, 11:37:20 AM
|
Is it possible to make combogrid from markup? For example I have a datagrid: <table class="easyui-datagrid" tal:attributes="url url; id id_datagrid" data-options=" border:false,pagination:true,fit:true,pageSize:50,singleSelect:true, rownumbers:true,sortName:'rid',sortOrder:'desc', pageList:[50,100,500],idField:'_rid',checkOnSelect:false, selectOnCheck:false,toolbar:'#${id_datagrid_toolbar}' " width="100%"> <thead> <tr> <th data-options="field:'_rid',checkbox:true" i18n:translate="">rid</th> <th data-options="field:'rid',sortable:true,width:60" i18n:translate="">rid</th> <metal:block metal:define-slot="fields"> </metal:block> <th data-options="field:'status',width:50,formatter:function(value,row,index){return datagrid_resource_status_format(value);},styler:function(){return datagrid_resource_cell_styler();}"><strong i18n:translate="">status</strong></th> <th data-options="field:'modifydt',sortable:true,width:120,styler:function(){return datagrid_resource_cell_styler();}"><strong i18n:translate="">updated</strong></th> <th data-options="field:'owner',width:100,styler:function(){return datagrid_resource_cell_styler();}"><strong i18n:translate="">owner</strong></th> </tr> </thead> </table>
and I want to make combogrid from it Thanks
|
|
|
13
|
General Category / EasyUI for jQuery / Treegrid and onBeforeLoad
|
on: April 14, 2013, 07:41:39 AM
|
I have a problem with treegrid event onBeforeLoad: <table class="easyui-treegrid" border="false" fit="true" checkOnSelect="false" selectOnCheck="false" data-options=" onBeforeLoad:function(row, param){ // param.q = $(this).closest('.container').find('.toolbar .search-tool input.search').val(); param.rid = 1; return true; }, onDblClickRow:function(rowIndex, rowData){ $(this).closest('.container').attr('unselectable','on').css('UserSelect','none').css('MozUserSelect','none'); $(this).closest('.container').find('.toolbar a[href=\'${request.route_url('navigations.edit')}\']').click(); }" url="${request.url}" singleSelect="true" rownumbers="true" idField="rid" treeField="name" toolbar=".toolbar:last"> <thead> <tr> <th field="_rid" width="40" checkbox="true" data-options="formatter: function(value,row,index){return row.rid;}"></th> <th field="rid" width="60" sortable="true">ID</th> <th field="name" width="160" sortable="true">${_(u'name')}</th> </tr> </thead> </table>
I'm getting error: Uncaught TypeError: Cannot set property 'rid' of undefinedwhat i'm doing wrong?
|
|
|
|