Show Posts
|
Pages: [1] 2 3 ... 7
|
1
|
General Category / EasyUI for jQuery / [SOLVED] .combotree textField - didnt work
|
on: March 24, 2023, 07:13:11 PM
|
textField string The underlying data field name to bind to this ComboTree. Available since version 1.5.2. $('#Label').combotree({ url: '?getLabels' , idField: 'ID' , textField: 'Name' //, valueField: 'Name' //, treeField: 'Name' ... });
json and result in screenshots
|
|
|
2
|
General Category / EasyUI for jQuery / $.messager.prompt with miltiline input
|
on: March 01, 2023, 11:18:23 PM
|
$.messager.prompt({ title: ' new Note', msg: '', fn: function(r){ if (r){ alert(r);} }); $(".messager-window .messager-input") .textbox({width:260,height:100,multiline: true}) .textbox('textbox').focus();
PROBLEM IS : the 'r' returns filtered value without "\n" jQ hooks didn't work $.valHooks.textarea = { get: function( elem ) { return elem.value.replace( /\r?\n/g, "\n" ); } };
Additional: how to do to "return false" in fn(r) to prevent to close prompt ?
|
|
|
6
|
General Category / EasyUI for jQuery / Re: .datagrid('selectRecord',idValue) and .datagrid onSelect event
|
on: September 01, 2022, 09:29:33 AM
|
ok. maybe problem in call selectRecord from onLoadSuccess how select record after loading? only via setTimeout ? $('#dg').datagrid({ ... , idField: 'itemid' , onLoadSuccess: dgLoadSuccess });
function dgLoadSuccess(aData){ if($(this).prop('selectAfterLoad') !== undefined &&$(this).prop('selectAfterLoad') != '' ){ $(this).datagrid('selectRecord',$(this).prop('selectAfterLoad')); $(this).prop('selectAfterLoad','') }else{ $(this).datagrid('clearSelections'); }; };
|
|
|
9
|
General Category / EasyUI for jQuery / [SOLVED] $('#A').layout({'add','collapsed:true'}); error
|
on: April 24, 2022, 03:30:20 PM
|
$('#A .main').layout();
$('#A .main').layout('add',{ region: 'east' //,noheader: true ,title: 'Instruction:' ,hideCollapsedContent: false ,border: false ,split: false ,collapsible:true ,collapsed:true ,width: '95%' ,content: '<input class="Instruction">' });
jquery.js:4094 Uncaught TypeError: Cannot read properties of undefined (reading 'jQuery321056324004689852392') at Data.get (jquery.js:4094:9) at Data.access (jquery.js:4112:16) at Function.data (jquery.js:4252:19) at Object.options (<anonymous>:3481:10) at jQuery.fn.init.$.fn.panel (<anonymous>:3453:32) at _3fb (<anonymous>:5584:22) at _3f1 (<anonymous>:5537:10) at HTMLDivElement.<anonymous> (<anonymous>:5743:1) at Function.each (jquery.js:362:19) at jQuery.fn.init.each (jquery.js:157:17)
without ,collapsed:true all work fine except that the panel is visible
|
|
|
14
|
General Category / EasyUI for jQuery / [SOLVED] maskedbox: how change mask without recreate ?
|
on: September 08, 2021, 10:23:39 AM
|
$('#Lat').maskedbox({ label: 'Lat:' ,labelPosition: 'left' ,labelAlign: 'right' ,width: 300 ,promptChar: '0' ,mask: '+99 99 99' ,masks: {'9':'[0-9]','+':'[\+\-]'} ,onChange: LatChange ,required:true ,validType:{GIS:['Lat']} ,buttonIcon: 'fas fa-map-marker-alt greentext' ,onClickButton: getLast }); ... $('#Lat').maskedbox('button').tooltip({position: 'top',content: 'get last known position'});
GIS format changer: let nVal = '+99 99.9999'; $('#Lat').maskedbox({mask:nVal,masks: {'9':'[0-9]','+':'[\+\-]'}}).maskedbox('initValue','+')
then in console VM5213:2890 Uncaught TypeError: Cannot read properties of undefined (reading 'tip') at Object.tip (<anonymous>:2890:31) at jQuery.fn.init.$.fn.tooltip (<anonymous>:2872:34) at HTMLInputElement.onShow (<anonymous>:7553:9) at <anonymous>:2822:13 trying if(($('#Lat').maskedbox('button')).hasClass('tooltip-f') ){ $('#Lat').maskedbox('button').tooltip('destroy'); }; let nVal = '+99 99.9999'; $('#Lat').maskedbox({mask:nVal,masks: {'9':'[0-9]','+':'[\+\-]'}}).maskedbox('initValue','+') $('#Lat').maskedbox('button').tooltip({position: 'top',content: 'get last known position'});
but get same error ... do not get Uncaught TypeError only if don't create tooltip on button
|
|
|
15
|
General Category / EasyUI for jQuery / [SOLVED] datagrid & unexpected response from the server
|
on: August 28, 2021, 03:15:23 PM
|
how to intercept the answer from server before API server periodically need to reauth and its answer something like the { "result":"error", "error":"auth required" } and datagrid do not event onLoadSuccess and do not event onLoadError ( in console: Uncaught TypeError: "Cannot read property 'length' of undefined" ) how to intercept this API server answer ? UPD: hmm ... in EasyUI 1.9.15 it turns out that neither 'onLoadSuccess' nor 'onLoadError' is ever called at all $('#DG').datagrid({ ... ,onLoadError: function(){ console.log('DG load error'); } ,onLoadSuccess: function(aData){ console.log('DG load success',aData); } ...
currently possible only by overriding 'loader' ?
|
|
|
|