Show Posts
|
Pages: 1 ... 4 5 [6] 7
|
79
|
General Category / General Discussion / [RESOLVED] tooltip of cobobox items show under combobox panel
|
on: July 12, 2018, 05:29:18 PM
|
combobox: , onBeforeLoad: mComboboxOnBeforeLoad_ClearTooltip , onLoadSuccess: mComboboxOnLoadSuccess_CreateTooltip , formatter: mComboboxFormatter
formatter: function mComboboxFormatter(row){ var currentValue = $( this ).combobox('getText'); var pattern = '(' + currentValue.replace(reEscape, '\\$1') + ')';
var s = "<div class=\"item "+row.cssID+" easyui-tooltip\" title=\""+row.Hint+"\">" + row.Label.replace(new RegExp(pattern, 'gi'), '<strong>$1<\/strong>') +"</div>"; return s; };
Tooltip clear: function mComboboxOnBeforeLoad_ClearTooltip(param){ $( this ).combobox('panel').find('.easyui-tooltip').tooltip('destroy'); }
Tooltip creator: function mComboboxOnLoadSuccess_CreateTooltip(){ $( this ).combobox('panel').find('.easyui-tooltip').tooltip({ showDelay: 100 , position: 'bottom' }); } Result in attach pic. How to fix it?
|
|
|
80
|
General Category / General Discussion / numberbox groupSeparator and validator
|
on: March 31, 2018, 04:52:59 PM
|
<input id="frmAmount" class="easyui-numberbox" data-options="label: 'Amount' , prompt: 'Amount' , cls: 'r' , groupSeparator: ' ' , precision: 0 , width: 500 , validType:{ greaterThan:[0] ,lessThanOrEqualTo:[1000] } , required: true " > $.extend($.fn.validatebox.defaults.rules, { greaterThan : { validator : function(value, param) { return parseInt(value,10)>parseInt(param[0],10); }, message : 'can be greather then {0}' } , lessThanOrEqualTo : { validator : function(value, param) { return parseInt(value,10)<=parseInt(param[0],10); }, message : 'can be less or equal to {1}' } });
user put 20000 in the lessThanOrEqualTo value = '20 000' and parseInt('20 000',10) == 20
|
|
|
85
|
General Category / General Discussion / Re: datagrid cell visibility refresh
|
on: March 01, 2018, 08:42:05 AM
|
thank you very much! = ADDITIONAL = view: scrollview table have 1.5K records pageSize = 50 $.each( $('#dg').datagrid('getRows'),function(eachIndex, singleRow){
cosole.log($('#dg').datagrid('getRowIndex', singleRow),eachIndex);
} ) and $('#dg').datagrid('getRowIndex', singleRow)
is NOT SAME if currentPage > 2 ! == ADDITIONAL 2 == if this code $.each( $('#dg').datagrid('getRows'),function(eachIndex, singleRow){ $('#dg').datagrid('updateRow',{ index: $('#dg').datagrid('getRowIndex', singleRow) , row: {Age: null} }) } ) fires periodicaly - ROW updated only FIRST time ! (in second and more times row not repainted because the Age is not changed (null to null) ) $.each( $('#dg').datagrid('getRows'),function(eachIndex, singleRow){ $('#dg').datagrid('updateRow',{ index: $('#dg').datagrid('getRowIndex', singleRow) , row: {Age: new Date()} }) } )
|
|
|
86
|
General Category / General Discussion / Re: datagrid cell visibility refresh
|
on: February 28, 2018, 04:26:59 PM
|
hmmmmmmm....... one more: $('#dg').datagrid('updateRow',{ ....})
refreshing|repainting ALL row fields (visible cells) or only CHANGED? if all then $('#dg').datagrid('refreshRow',eachIndex /* ?????? or $('#dg').datagrid('getRowIndex', singleRow) */ )
easier
|
|
|
87
|
General Category / General Discussion / Re: datagrid cell visibility refresh
|
on: February 28, 2018, 03:56:15 PM
|
THANX! this works (view: scrollview with pageSize 50) $.each( $('#dg').datagrid('getRows'),function(eachIndex, singleRow){ $('#dg').datagrid('updateRow',{ index: $('#dg').datagrid('getRowIndex', singleRow) , row: {Age: null} }) } )
I`m not sure in index: $('#dg').datagrid('getRowIndex', singleRow)
may be it replaced by for some optimization ? BUT Im not sure that 'eachIndex' can be equivalent to real 'rowIndex' of row when scroolview currentPage be 10 or 100 or 200 because scroolview delete data of invisible prevousPage or nextPage.
|
|
|
88
|
General Category / General Discussion / [SOLVED] datagrid cell visibility refresh
|
on: February 26, 2018, 07:32:14 AM
|
in easyui-datagrid i have <th field="Age" width="05%" align="center" formatter="fmtAge" >Age</th>
function fmtAge(val,row){ return getDeltaAge(row.inserted); }
function getDeltaAge(dateUTC) {
var matches = dateUTC.match(/^\s*(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})\s*$/); var DateUTC = new Date(parseInt(matches[1],10),parseInt(matches[2],10) - 1,parseInt(matches[3],10),parseInt(matches[4],10),parseInt(matches[5],10),parseInt(matches[6],10));
var now = new Date() , nowUTCtimestamp = now.getTime() + now.getTimezoneOffset()*60*1000 , nowUTC = new Date(nowUTCtimestamp) , difference = nowUTC.getTime() - DateUTC.getTime() , ageDifference = Math.floor(difference/1000/60/60/24) ;
if ( difference < 0 ){ ageDifference = ""; ageName = "new"; }else if( ageDifference > 0){ ageName = " d"; }else{ difference -= ageDifference*1000*60*60*24; var ageDifference = Math.floor(difference/1000/60/60);
if( ageDifference > 0 ){ ageName = " h"; }else{ difference -= ageDifference*1000*60*60;
var ageDifference = Math.floor(difference/1000/60); if( ageDifference > 0 ){ ageName = " m"; }else{ ageDifference = ""; ageName = "new"; } } } if(ageDifference != "" && ageDifference != 0 && ageDifference<10){ageDifference = "0" + ageDifference };
return ageDifference+ageName; };
How refresh visibility(?) ONLY THIS CELL ? without reload all|part of data or to refresh full row or refresh datagrid-view
|
|
|
|