EasyUI Forum
March 28, 2024, 06:45:27 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 ... 7
1  General Category / EasyUI for jQuery / Re: Layout collapsible region collapses because of tooltip on: December 29, 2020, 10:23:50 AM
Hello EasyUI-admins/developers,

could you please give me a hint to avoid collapsing of region when the mouse is moved over the tooltip?
Thanks for looking into it.
2  General Category / EasyUI for jQuery / Re: Detect mousedown event on datagrid's scrollbar on: December 04, 2020, 03:10:35 AM
I found a solution to detect mousedown events on scrollbars and ignore them. Here is the updated demo:
http://jsfiddle.net/k8ecnmfp/
3  General Category / EasyUI for jQuery / Layout collapsible region collapses because of tooltip on: December 03, 2020, 01:03:12 PM
The collapsible east region collapses when mouse is moved over the buttons having tooltip.

Please refer the attached screencast and demo:
http://jsfiddle.net/Lvquzyac/1/
4  General Category / EasyUI for jQuery / Re: Detect mousedown event on datagrid's scrollbar on: December 03, 2020, 11:31:46 AM
I have created a demo to demonstrate the problem - click on the parts of datagrid while having a row in edit mode:
http://jsfiddle.net/2nx5w47z/

How can I identify if the click is on the scrollbar?
Thanks!
5  General Category / EasyUI for jQuery / Detect mousedown event on datagrid's scrollbar (SOLVED) on: December 03, 2020, 10:00:42 AM
How can I determine if the mouse is clicked on datagrid's vertical/horizontal scrollbar?
Please note that the datagrid-scrollbars may not be present always. And if they are present, how can I ignore the mousedown event on it.

As seen in the screencast below, a warning is displayed when the user clicks outside the row being edited.
But the warning also gets displayed when the click is on datagrid's vertical scrollbar.

Screencast: https://streamable.com/5eawxt
6  General Category / EasyUI for jQuery / Re: extend validateRow to consider limitToList on: September 18, 2020, 12:43:04 PM
Thanks Jarry for your suggestion, will try it out. I was looking for a generic solution without having to adjust dozens of editors. I have in between extended the datagrid methods and overwritten the standard 'validateRow':

Code:
$.extend($.fn.datagrid.methods, {
validateRow: function(jq, index){
        return gordisExtendedValidateRow(jq[0], index);
    }
});

$.fn.combobox.defaults = $.extend({}, $.fn.combobox.defaults, {
        validateSelection: true
});

/**
 * Overwritten validateRow method of easyui to perform additional validation.
 * Here, the combobox editors are validated to ensure a valid selection from its list is made.
 */
function gordisExtendedValidateRow(target, index){
    const tr = $.data(target, 'datagrid').options.finder.getTr(target, index);
    if (!tr.hasClass('datagrid-row-editing')){
        return true;
    }

    const vbox = tr.find('.validatebox-text');
    vbox.validatebox('validate');
    vbox.trigger('mouseleave');
    const invalidbox = tr.find('.validatebox-invalid');
    let result = invalidbox.length === 0;
    if (result) {
        // Now check if combobox editors contain valid selection
        const editors = $(target).edatagrid('getEditors', index);
        for(let i=0; i<editors.length;i++) {
            const editor = editors[i];
            if (editor.type === 'combobox') {
                const comboEditor = $(editor.target);
                if(comboEditor.combobox('options').validateSelection === true &&
                    textNotEmpty(comboEditor.combobox('getText')) && _isSelectionValid(editor.target) === false) {
                    comboEditor.combobox('textbox').addClass("validatebox-invalid");
                    result = false;
                    break;
                }
            }
        }
    }
    return result;

    function _isSelectionValid(comboboxComp) {
        const c = $(comboboxComp);
        const opts = c.combobox('options');
        const data = c.combobox('getData');
        let exists = false;
        for(let i=0; i<data.length; i++){
            if (c.combobox('getText') === data[i][opts.textField]){
                exists = true;
                break;
            }
        }
        return exists;
    }
}
The extended validation for combobox editors will be skipped if the option validateSelection is set to false. 
7  General Category / EasyUI for jQuery / extend validateRow to consider limitToList on: September 16, 2020, 11:48:40 PM
I have Combobox editors in Edatagrid with limitToList set to true. How can I extend validateRow to consider limitToList as well? Is it possible to have it included as standard feature?
8  General Category / EasyUI for jQuery / Re: Layout expanding a region on mouse over instead of on click on: July 08, 2020, 11:25:59 AM
I too was looking for this option to "slide open" the layout's region on mouseenter.

This approach however, keeps the region in expanded mode. How to get the region to "slide open" - like it does on mouseclick - and thereafter collapse on mouseleave? Thanks.
9  General Category / EasyUI for jQuery / Re: How to set defaultFilterOptions in datagrid-filter? on: January 30, 2020, 03:35:18 AM
Sorry to take up an old issue, but
defaultFilterOptions to set a filter promt, as suggested by Jarry in the previous post, doesn't seem to work:

http://code.reloado.com/isuzex3/6/edit#preview

Would be great if someone at EasyUI support could check this one out.
10  General Category / EasyUI for jQuery / display of tree lines in release 1.8.5 on: September 25, 2019, 12:36:02 PM
In release 1.8.5, the tree lines aren't displayed correctly - there are gaps between the nodes. Please refer the attached file and let us know the fix for the same. Thank you.
 
11  General Category / EasyUI for jQuery / Display combogrid panel automatically when focus is set within the input field on: July 15, 2019, 01:30:54 AM
We use a combogrid plugin and our intention is to display the combogrid panel automatically when the user clicks withind the input field.

We extended the combogrid „onLoadSuccess“ event to bind the mousedown with the "showPanel" call.
But the following error is displayed in developer tool.

Uncaught TypeError: Cannot read property 'options' of undefined

How can this problem be fixed and the combogrid panel displayed automatically?

For more details check this example: http://jsfiddle.net/Mohamed_Amor/kyzp5cgn/
12  General Category / EasyUI for jQuery / Re: Datagrid continue editing row after negative validation check on: May 20, 2019, 11:55:23 PM
Brilliant. will try that out. Thanks!
13  General Category / EasyUI for jQuery / Datagrid continue editing row after negative validation check on: May 20, 2019, 09:07:55 AM
I have a datagrid with five columns having checkbox editor. If a row is edited, at least ONE of the five checkboxes must be checked. If not, I want to inform the user "please select a checkbox" while remaining in the editing mode.

How can this be achieved? Currently, the row editing gets ended and the user has to double click to begin the editing again:

Code:
onEndEdit: function (index, rowToSave) {
                if (rowToSave.isNewRecord && atleastOneCheckboxSelected(rowToSave) === false) {
                    showSlideMsg("Please select a checkbox!");
                    return false;
                }
                ... save row ...
}

Thanks for the help.
14  General Category / EasyUI for jQuery / Re: (SOLVED) Datagrid issue: the filter row is removed when the columns struc.. on: May 20, 2019, 08:48:59 AM
This issue was solved by destroying filter and enabling it again: http://jsfiddle.net/r3tLep2v/
15  General Category / EasyUI for jQuery / Datagrid issue: the filter row is removed when the columns structurre is updated on: May 15, 2019, 05:57:06 AM
Hello,

The filter row of an Edatagrid is removed when the datagrid columns are updated. For more details please check this example: http://jsfiddle.net/Mohamed_Amor/94cq5L0r/.

How this issue can be fixed?
Pages: [1] 2 3 ... 7
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!