Show Posts
|
Pages: 1 [2] 3 4 ... 7
|
18
|
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
|
|
|
19
|
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' ?
|
|
|
23
|
General Category / EasyUI for jQuery / input near the form
|
on: April 19, 2021, 12:38:15 PM
|
source: <input name="someName" form="someForm" class="easyui-textbox" data-options="..." >
result: <input form="someForm" class="easyui-textbox textbox-f" data-options="..." textboxname="someName" style="display: none;" >
<span class="textbox textbox-invalid" style="width: 300px;"> <input id="_easyui_textbox_input1" type="text" class="textbox-text validatebox-text validatebox-invalid textbox-prompt" autocomplete="off" tabindex="" style="..." title="" > <input type="hidden" class="textbox-value" name="someName" value="" > </span>
CAN BE add attr FORM to hidden input ?: <input type="hidden" class="textbox-value" name="someName" value="" form="someForm" >
|
|
|
25
|
General Category / EasyUI for jQuery / validatebox.rules.remote
|
on: April 07, 2021, 11:01:49 AM
|
Please change var _580=$.ajax({url:_57f[0],dataType:"json",data:data,async:false,cache:false,type:"post"}).responseText; return _580=="true";
to var _580=$.ajax({url:_57f[0],dataType:"json",data:data,async:false,cache:false,type:"post"}).responseText; return _580.replace(/\s/g, '')=="true"; some API return true/false + LN thnx!
|
|
|
27
|
General Category / EasyUI for jQuery / [SOLVED] datagrid with get method set cookie
|
on: March 29, 2021, 06:05:31 AM
|
Hi! how to enable set cookie in datagrid (withCredentials:true in ajax request) ? <table id="dg" noheader="true" fit="true" class="easyui-datagrid" url="${API_PATH}?$API_CMD" pagination="false" idField="ID" rownumbers="true" fitColumns="true" singleSelect="true" showFooter="false" > <thead> ... </thead> </table>
basic ajax will be: jQuery.ajax({ type: "GET", xhrFields: {withCredentials: true}, // <--- url: myURL, ... });
|
|
|
28
|
General Category / EasyUI for jQuery / dynamic menu in searchbox ?
|
on: October 22, 2020, 06:32:52 PM
|
combo wrong <input id="sb" class="easyui-searchbox" style="width:300px" data-options="searcher:doSearch , prompt:'Search' , menu: '#cb' " > <input id="cb" class="easyui-combobox" data-options="valueField:'MID' , textField:'Name' , url: apiPath " >
datalist wrong <input id="sb" class="easyui-searchbox" style="width:300px" data-options="searcher:doSearch , prompt:'Search' , menu: '#cld' " > <div id="cld" class="easyui-datalist" data-options="valueField:'MID' , textField:'Name' , checkbox: false , lines: true , url:apiPath " > </div>
OR how to create menu for searchbox based on remote server data ?
|
|
|
30
|
General Category / EasyUI for jQuery / repaint/redraw calendar
|
on: August 09, 2020, 10:25:57 PM
|
Hi ! Have datebox : $('#sTo').datebox().datebox('calendar').calendar({ validator: function(date){ var d1 = new Date($('#sDate').prop('sMin')||0); var d2 = new Date($('#sDate').prop('sMax')||0); return d1<=date && date<=d2; } ,styler: function(date){ var d1 = new Date($('#sDate').prop('sMin')||0); var d2 = new Date($('#sDate').prop('sMax')||0); return (d1<=date && date<=d2)?'background-color:#0c0':''; } });
How repaint calendar when set new values to '#sDate' propertys $('#sDate').prop('sMin',aMin).prop('sMax',aMax);
$('#sTo').datebox().datebox('calendar').calendar('repaint'); // ;) ???
? Thanxx
|
|
|
|