EasyUI Forum
April 27, 2024, 10:00:40 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: 1 [2] 3 4 ... 7
16  General Category / EasyUI for jQuery / [SOLVED] maskedbox: how change mask without recreate ? on: September 08, 2021, 10:23:39 AM
Code:
  $('#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:
Code:
 let nVal = '+99 99.9999';
 $('#Lat').maskedbox({mask:nVal,masks: {'9':'[0-9]','+':'[\+\-]'}}).maskedbox('initValue','+')

then in console

Quote
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

Code:
    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 Wink
17  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

Quote
{
"result":"error",
"error":"auth required"
}

and  datagrid do not event onLoadSuccess and do not event onLoadError Sad
( 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
Code:
 $('#DG').datagrid({
    ...
   ,onLoadError: function(){ console.log('DG load error'); }
   ,onLoadSuccess: function(aData){ console.log('DG load success',aData); }
   ...
currently possible only by overriding 'loader' ?
18  General Category / EasyUI for jQuery / Re: [SOLVED] compatibility with jQueryUI ? on: August 28, 2021, 03:05:58 PM
thanks very much!
19  General Category / EasyUI for jQuery / [SOLVED] compatibility with jQueryUI ? on: August 23, 2021, 02:38:22 PM
Hi!

How to ensure compatibility with jQ.UI ?
found some solution on this forum from jarry (Administrator)
Quote
   
Re: JqueryUI and Easyui Conflict
« Reply #1 on: March 16, 2017, 02:10:21 AM »
Reply with quoteQuote
Please look at this example http://code.reloado.com/agiwul3/edit#javascript,html. It shows how to use the jQuery UI and EasyUI together.

but domain code.reloado.com no longer available ...
20  General Category / EasyUI for jQuery / Re: input near the form on: April 19, 2021, 02:26:57 PM
now I use

Code:
document.getElementsByName('someName')[0].setAttribute('Form','someForm')

on onSubmit event
21  General Category / EasyUI for jQuery / input near the form on: April 19, 2021, 12:38:15 PM
source:
Code:
<input 
  name="someName"
  form="someForm"
  class="easyui-textbox"
  data-options="..."
>

result:
Code:
<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 ?:
Code:
  <input type="hidden" 
    class="textbox-value"
    name="someName"
    value=""
    form="someForm"
  >
22  General Category / EasyUI for jQuery / Re: validatebox.rules.remote on: April 19, 2021, 12:28:04 PM
thnx

// why this code not to implement to source of easyui?
23  General Category / EasyUI for jQuery / validatebox.rules.remote on: April 07, 2021, 11:01:49 AM
Please change

Code:
var _580=$.ajax({url:_57f[0],dataType:"json",data:data,async:false,cache:false,type:"post"}).responseText;
return _580=="true";
to

Code:
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!
24  General Category / EasyUI for jQuery / Re: [SOLVED] datagrid with get method set cookie on: March 29, 2021, 07:22:54 PM
Thnx!
25  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) ?


Code:
  <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:
Code:
jQuery.ajax({
    type: "GET",
    xhrFields: {withCredentials: true},  // <---
    url: myURL,
   ...
});
26  General Category / EasyUI for jQuery / dynamic menu in searchbox ? on: October 22, 2020, 06:32:52 PM
combo wrong Sad
Code:
  <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 Sad
Code:
 
  <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 ?
27  General Category / EasyUI for jQuery / Re: numberbox remote Question on: October 02, 2020, 05:09:22 AM
can be original fixed to:

Code:
}).responseText;
return response.replace(/\s/g, '') == 'true';

?
28  General Category / EasyUI for jQuery / repaint/redraw calendar on: August 09, 2020, 10:25:57 PM
Hi !

Have datebox :
Code:
		$('#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

Code:
$('#sDate').prop('sMin',aMin).prop('sMax',aMax);

$('#sTo').datebox().datebox('calendar').calendar('repaint'); // ;) ???

?

Thanxx
29  General Category / EasyUI for jQuery / need to sleep more: I know this method :) on: February 28, 2020, 06:26:53 AM
Thnx!
30  General Category / EasyUI for jQuery / how to check initialization of tooltip ? on: February 27, 2020, 06:16:43 AM
Code:
$('#dg').datagrid('getPanel').find('.easyui-tooltip')
.each(function(idx,elm){
let tip = $(elm).tooltip('tip');
$(elm).tooltip('destroy');
// console.log(idx, tip);
if(tip != undefined){$(tip).remove();}
});

if elm is not initialized this
let tip = $(elm).tooltip('tip');
trow error.

How check initialization of tooltip?
Pages: 1 [2] 3 4 ... 7
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!