EasyUI Forum
May 15, 2024, 05:49:26 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: 1 ... 4 5 [6] 7 8 ... 10
 51 
 on: January 11, 2024, 07:20:53 PM 
Started by aljcn - Last post by jarry
Please call this code instead.
Code:
    <div style="width:800px;display:flex;">
        <div style="margin:2px;flex:1;border:1px solid red;">
          <input class="easyui-datebox" data-options="" style="width:100%;">
        </div>
        <div style="margin:2px;flex:1;border:1px solid blue;">
            <input class="easyui-datebox" data-options="" style="width:100%;">
        </div>
    </div>

 52 
 on: January 11, 2024, 07:09:42 AM 
Started by aljcn - Last post by aljcn
See next code:

Code:

    <div style="width:800px;display:flex;">
        <div style="margin:2px;flex-grow:1;border:1px solid red;">
          <input type="text" style="width:100%;min-width:0;" />
        </div>
        <div style="margin:2px;flex-grow:1;border:1px solid blue;">
            <input type="text" style="width:100%;min-width:0;" />
        </div>
    </div>

    <div style="width:800px;display:flex;">
        <div style="margin:2px;flex-grow:1;border:1px solid red;">
          <input class="easyui-datebox" data-options="" style="width:100%;">
        </div>
        <div style="margin:2px;flex-grow:1;border:1px solid blue;">
            <input class="easyui-datebox" data-options="" style="width:100%;">
        </div>
    </div>


in first row, two input each space 50% width as experted.

but in second row, textbox not show correctly

it seams some bug in textbox render...

 53 
 on: January 03, 2024, 12:34:03 AM 
Started by JeroenvdV - Last post by JeroenvdV
Thanks Jarry,

You pointed me in the right direction!
I made a minor adjustment to split on both commas and spaces.
Code:
var vv = value.split(/[\s,]+/); // split on both commas and spaces

Cheers,
Jeroen

 54 
 on: January 02, 2024, 07:12:43 PM 
Started by JeroenvdV - Last post by jarry
The extended operators can be made to filter multiple values in the rows.
Code:
$.extend($.fn.datagrid.defaults.operators, {
    mcontains:{
        text:'Contains',
        isMatch:function(source,value){
            const vv = value.split(',').filter(r=>r);
            for(let i=0; i<vv.length; i++){
                const v = vv[i];
                if (source.indexOf(v) >= 0){
                    return true;
                }
            }
            return false;
        }
    }
})

This new operator can be applied to a filter input.
Code:
$('#dg').datagrid('enableFilter', [
                {
                    field:'Users',
                    type:'textbox',
                    op:['equal','mcontains']
                },
...

 55 
 on: January 02, 2024, 06:48:04 PM 
Started by stephenl - Last post by jarry
Call this code to load the email address of the first item.
Code:
$('#fm').form('load',{email:data[0].Email});

 56 
 on: December 31, 2023, 05:31:09 AM 
Started by stephenl - Last post by stephenl
Regarding form data

In my case, the data returned is always a object, ie
$('#fm').form('load', [{name: 'xxx}]);

example of returned data
[
{"Company":"Company 1","Phone":"01234 567890","Email":"jim@yahoo.com"}
{"Company":"Company 2 ,"Phone":"01234 012345","Email":"bill@yahoo.com"}
]

I would like to use the email address, of the first element of the returned array data (in the above example "jim@yahoo.com" in a form field.

Suggestions appreciated

Thank you



 57 
 on: December 22, 2023, 03:39:49 AM 
Started by JeroenvdV - Last post by JeroenvdV
Hi,

I have a question about the Datagrid Filter Row extension.

In my datagrid I have 'Users' column in where each cell contains the abbreviation of one or more users, see attachment "column_data.png". In the filter input bar I want it to be possible to type multiple user-abbreviations separated by a comma or space, for example: "jvdv rza", also see attachment "filter_input.png". The idea is that only rows are shown that have at least a user "jvdv" or "rza", see attachment "desired_result.png".

The filtering is done remotely and the data returned is correct, but it does not appear in the datagrid, the grid becomes empty.
My guess is that the Filter extension compares and checks again the returned data with the filter input (textbox) and only shows the rows that exactly match with the text entered in the filter input bar.
Is my guess correct? Does the filter extension checks the returned data to match with the text entered in the filter input bar?
If so, how can I bypass that?

Many thanks in advance and best regards,
Jeroen

 58 
 on: December 22, 2023, 12:57:20 AM 
Started by poeziafree - Last post by kimmansu

https://www.jeasyui.com/forum/index.php?topic=8784.msg23427#msg23427

 59 
 on: December 22, 2023, 12:24:11 AM 
Started by kimmansu - Last post by kimmansu
lol~~~

Thanks a lot!!!  Jarry~~~


 60 
 on: December 21, 2023, 11:57:01 PM 
Started by kimmansu - Last post by jarry
This is the extended methods.
Code:
$.extend($.fn.radiogroup.methods, {
disable: function(jq){
return jq.each(function(){
$(this).find('.radiobutton-f').radiobutton('disable');
})
},
enable: function(jq){
return jq.each(function(){
$(this).find('.radiobutton-f').radiobutton('enable');
})
}
})

Usage example:
Code:
$('#formModMold .mChamberType').radiogroup('disable');

Pages: 1 ... 4 5 [6] 7 8 ... 10
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!