EasyUI Forum
May 01, 2024, 06:32:01 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: 1 2 3 [4] 5 6 ... 10
 31 
 on: February 12, 2024, 06:33:27 AM 
Started by Wojak - Last post by jarry
This issue has been solved. Please download the latest version from https://www.jeasyui.com/extension/datagrid_filter.php.

 32 
 on: February 10, 2024, 12:00:50 AM 
Started by fonzie - Last post by fonzie
I want an autosave feature with the text editor, but when i use the "getValue" method, it doesn't always reflect what is displayed on the (text editor) page.

I'm only using getValue when either the space bar or enter key is pressed, but quite often the data I'm then saving to a database is words or lines old.

Can anyone help / advise ?


 33 
 on: February 08, 2024, 10:50:02 AM 
Started by Wojak - Last post by Wojak
Can another parameter be added to the "myLoadFilter" function in the "datagrid-filter.js" file without breaking other functions? Because I noticed that when filtering, if I had custom params before, it does not show up in the "onLoadSuccess" function in the datagrid during filtering. I used this option because when downloading data to the datagrid, I could also send other parameters to the inputs at the same time.

Something like this. It starts at 666 line in file.
Code:
data = opts.filterMatcher.call(target, {
total: state.filterSource.total,
rows: state.filterSource.rows,
footer: state.filterSource.footer||[]
});
data.params = data.params; // Here new line of code
data.filterRows = data.rows;

 34 
 on: February 06, 2024, 01:44:24 AM 
Started by Spike - Last post by Spike

Hi Jarry,

Required is working fine.

Is it possible that required is still ACTIVE till whole maskedit is complete?

Now required is already okay after one character. And not fulfill the whole mask.

Thanx in advance

Hans Spike

 35 
 on: February 05, 2024, 06:42:30 AM 
Started by Spike - Last post by Spike
Up and running! thanx

 36 
 on: February 05, 2024, 06:26:51 AM 
Started by Spike - Last post by Spike
Thanx Jarry!

I will give it a try !

 37 
 on: February 05, 2024, 01:52:16 AM 
Started by Spike - Last post by jarry
This is the possible solution for maskedbox.

1. Extend a new validation type.
Code:
$.extend($.fn.validatebox.defaults.rules, {
notempty: {
validator: function (value, param) {
var opts = $(this).parent().prev().maskedbox('options');
var tt = (value || '').split('');
var vv = [];
for (var i = 0; i < opts.mask.length; i++) {
if (opts.masks[opts.mask[i]]) {
var t = tt[i];
vv.push(t != opts.promptChar ? t : '');
}
}
return vv.join('') != '';
},
message: 'The field is required.'
}
});

2. Attach it to the maskedbox.
Code:
<input id="mb" validType="notempty" class="easyui-maskedbox" mask="(999) 999-9999" label="Phone Number:"
labelPosition="top" style="width:100%">

 38 
 on: February 05, 2024, 01:22:05 AM 
Started by BinaryCode - Last post by jarry
The 'onClose' event handler can be attached into the html markup.
Code:
<script>
function onDialogClose(){
console.log('dialog closed')
}
</script>
<div id="dlgEditVehicle" class="easyui-dialog" data-options="buttons:'#buttons',closed:true,resizable:true,onClose:onDialogClose"
style="width:500px;height:200px;padding:20px;">
...
</div>

 39 
 on: February 03, 2024, 04:50:54 AM 
Started by fonzie - Last post by fonzie
OK, I solved this myself, code below for anyone that runs into a similar issue (probably for most controls).


$(function(){

$('.easyui-texteditor').on('keyup',function(e){
    var idname = $(this).attr('id');
    console.log(idname);
    console.log(e.keyCode)
  });

})

Hope this helps someone

 40 
 on: February 03, 2024, 01:12:47 AM 
Started by fonzie - Last post by fonzie
I have  text editors on different tabs and detect a keypress for autosave like this (simplified for easy reading)

$(function(){
    $('#texteditor1').on('keyup',function(e){
       

        console.log(e.keyCode)

    })
})

Rather than have five functions to check each editor, I would like to have one function to check a keypress and take action depending on what tab was selected, is this possible ?

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