EasyUI Forum
May 07, 2024, 06:48:30 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / Bug Report / datagrid get change bug on: May 15, 2018, 12:54:05 PM
Suppose you have an editable datagrid with id="dg"
you get changes this way
all changes:
var changes = $('#dg').datagrid('getChanges');
all inserts:
var c = $('#dg').datagrid('getChanges', 'inserted');
all updates:
var u = $('#dg').datagrid('getChanges', 'updated');
all deletes:
var d = $('#dg').datagrid('getChanges', 'deleted');

supposedly changes=c+u+d, but this is not always true unfortunately.

get the bug this way:
you first edit this row (say myRow)
and then delete this row

then you would think:
c=[]
u=[]
d=[{myRow}]

actually
c=[]
u=[{myRow}]             <------------problem--------------
d=[{myRow}]
2  General Category / EasyUI for jQuery / Re: easyui-window and PDF file on: August 27, 2014, 04:54:21 PM
One of the workaround is ti use <iframe src="my.pdf"/> inside your window though.
3  General Category / EasyUI for jQuery / Re: Form submit issue on: August 27, 2014, 07:16:48 AM
Thanks you stworthy. I use pure HTML+WS. I tried to add [] inside name and then to ID for each single case or both. Unfortunately, it won't submit.
4  General Category / EasyUI for jQuery / Form submit issue on: August 26, 2014, 09:02:56 PM
I suppose the form should submit $('#NI_Cat').combobox('getValue') when multiple=false; and should submit $('#NI_Cat').combobox('getValues') when multiple=true. This is true in 1.3.4 but not in 1.4. Please advise.

<input class="easyui-combobox" id="NI_Cat" name="NI_Cat" data-options="
                        data:[{ID:'Moving the University Forward',Name:'Moving the University Forward'},
                            {ID:'Operational Excellence',Name:'Operational Excellence'},
                            {ID:'Innovation / Creativity',Name:'Innovation / Creativity'},
                            {ID:'Fiscal Stewardship',Name:'Fiscal Stewardship'}],
                        valueField: 'ID', textField: 'Name',
                        multiple:true, <---------------------------------------
                        panelWidth: 350, panelHeight: 'auto',
                        prompt:'Select multiple items by clicking'
                    " style="width: 550px;" required="true">

$('#newNominee').submit();
5  General Category / EasyUI for jQuery / Re: Cannot drop in datagrid on: August 15, 2014, 08:34:55 AM
Some update:

It looks like B can allow only 1(one) drop no matter how I click in A to load data for B. One I have 1 drop in B, B must have rows to receive dropping. If I then click in A and there is no data loaded for B. B won't accept dropping when it is empty.
6  General Category / EasyUI for jQuery / Cannot drop in datagrid on: August 15, 2014, 07:17:38 AM
I have 3 dtatgrids:
A - list of categories
B - list of items received by dropping from C
C - list of items to be sent to B by dragging

So, basically, I want to drag an item from C to B. When I click on a category in A, B will load a already received list based on what selected in A. A web service will load the corresponding list to B based on the selection in A. The web service may return a JSON array or empty.

Now it comes the problem. When I drag an item from C and try to to drop into B. Sometimes B welcomes dropping and sometimes rejects dropping no matter whether B is empty or not. When B is not empty, sometimes I have to drop a new item onto the list and sometimes I can drop in anywhere inside B when it is welcoming dropping.

Since this behavior is not consistent, I added $('#B').datagrid('enableDnd') everywhere, like when B is initialized,when row in A or C is clicked. Unfortunately, I cannot see any help. The consistence is, when B allows dropping everywhere, I can keep doing so until I click another row in A. When B is rejecting dropping based on the selection in A, clicking other rows and then clicking back won't help.

The following is my code. Anybody can help?

<table id="A" class="easyui-datagrid" title="Eligible Org Units" data-options="
                    singleSelect:true,
                    collapsible:true,
                    url:'ws.cfc?method=getEligibleOrgUnit',
                    method:'get',
                    remoteSort:false,
                    onClickRow:function(rowIndex, rowData){
                                                                                 
                       $('#B').datagrid('load','ws.cfc?method=getApprover&Org_Unit_ID='+rowData.Org_Unit_ID+'&Role=OU'); 
                           $('#B').datagrid('enableDnd');       
                    }
                " style="width:300px;height:270px">
                    <thead>
                        <tr>
                            <th data-options="field:'Org_Unit_Long_Name',sortable:true">Org Unit Name</th>
                            <th data-options="field:'Org_Unit_ID',sortable:true">Org Unit ID</th>
                        </tr>
                    </thead>
                </table>

 <table id="B" class="easyui-datagrid" title="Optional Unit Approval" data-options="
                    singleSelect:true, collapsible:true,
                    method:'get',
                    remoteSort:false,
                    onLoadSuccess:function(){
                        $('#B').datagrid('enableDnd');                           
                    },
                    onDblClickRow:function(rowIndex, rowData){
                       $.messager.confirm('Confirm','Remove '+rowData.Incumbent_Name+' from Optional Unit Approval?',function(r){
                            if (r){
                                $.ajax({
                                    url: 'ws.cfc?method=deleteApprover',
                                    type:'post',
                                    data:{PUID:rowData.PUID,
                                        Org_Unit_ID:$('#A').datagrid('getSelected').Org_Unit_ID,
                                         Role:'OU'}
                                }).done(function () {
                                    $('#B').datagrid('deleteRow',rowIndex);
                                    $('#B').datagrid('enableDnd');
                                });                               
                            }
                        });                     
                    },
                    onBeforeDrop: function(targetRow,sourceRow,point){
                        $.ajax({
                            url: 'ws.cfc?method=setApprover',
                            type:'post',
                            data:{PUID:sourceRow.PUID,
                                Org_Unit_ID:$('#A').datagrid('getSelected').Org_Unit_ID,
                                 Role:'OU'}
                        }).done(function () {
                            $('#B').datagrid('appendRow',{
                                Incumbent_Name: sourceRow.Incumbent_Name,
                                PUID: sourceRow.PUID
                            });
                            $('#B').datagrid('enableDnd');
                        });               
                        return false;   
                    }
                " style="width:300px;height:180px">
                    <thead>
                        <tr>
                            <th data-options="field:'Incumbent_Name',sortable:true">Name</th>
                            <th data-options="field:'PUID',sortable:true">PUID</th>
                        </tr>
                    </thead>
                </table>

 <table id="C" class="easyui-datagrid" data-options="
                    singleSelect:true, collapsible:true,revert:true,proxy:'clone',
                    method:'get', remoteSort:false, toolbar:'#tb',
                    onLoadSuccess:function(){
                        $(this).datagrid('enableDnd');
                    },
                    onClickRow:function(rowIndex, rowData){
                           $('#B').datagrid('enableDnd');                                                     
                    }
                " title="Employees" style="width:300px;height:270px">
                    <thead>
                        <tr>
                            <th data-options="field:'Incumbent_Name',sortable:true">Employee Name</th>
                            <th data-options="field:'Org_Unit_Long_Name',sortable:true">Org Unit Name</th>
                            <th data-options="field:'PUID',sortable:true">PUID</th>
                        </tr>
                    </thead>
                </table>
7  General Category / EasyUI for jQuery / Re: Way to use "Form onLoadSuccess event" on: July 07, 2014, 09:06:46 AM
It works great!. Thanks  a lot.
8  General Category / EasyUI for jQuery / Cannot set single value for multiple combobox on: July 05, 2014, 09:56:42 PM
I have a multiple  combobox like the following.

   <input class="easyui-combobox" id="cc" name="cc" data-options="
        data:[{ID:1,Name:'A'},{ID:2,Name:'B'},{ID:3,Name:'C'},{ID:4,Name:'D'},{ID:5,Name:'E'},{ID:6,Name:'F'}],
        method: 'get',
        valueField: 'ID',
        textField: 'Name',
        multiple:true,
        panelWidth: 350,
        panelHeight: 'auto'
    " style="width: 550px;" >

If I pick options 1 and 3, I am selecting A and C. The value saved in database is 1,3. When I load 1,3 back into the form for this field, I get A,,,C displayed in the combobox. This looks a little bit odd but OK.

However if I pick a single value, say, C in this case. Database saves 3 in the table. The odd thing is that when I load this value 3 back to the form for this field, I would expect it to show C. Unfortunately, it shows nothing.

I use the following to load database value back:

$('#myForm').form('load', 'mywebservice.php');

Please help.
9  General Category / Bug Report / Re: Bug: slider still changable after disabled on: July 05, 2014, 07:26:11 PM

You saved me. Thanks a lot.
10  General Category / EasyUI for jQuery / Way to use "Form onLoadSuccess event" on: July 05, 2014, 05:49:49 PM
I need to do something after "Form onLoadSuccess event". I cannot find an example about how to use it.

Originally, I tried:
$('#myform').form('load', 'mywebservice.php');
myFunctionToDoSomethingWithFormFields();

but myFunctionToDoSomethingWithFormFields() just executed too soon before the form being filled data from webservice.

Now I am doing:
$('#myform').form('load', 'mywebservice.php');
window.setTimeout(function () {
   myFunctionToDoSomethingWithFormFields();
}, 1000);

assuming the data will be filled into the from within 1 second. This is just a workaround.

Although the document says there is a onLoadSuccess event, there is no example showing the usage.

I tried the following with no luck:
$('#myform').form('load', 'mywebservice.php',{onLoadSuccess:' myFunctionToDoSomethingWithFormFields();'});

$('#myform').onLoadSuccess=function(){
    myFunctionToDoSomethingWithFormFields();
};
11  General Category / Bug Report / Bug: slider still changable after disabled on: July 05, 2014, 02:35:42 PM
For example, you have a slider:

<input id="ss" class="easyui-slider" value="25"  style="width:300px"   
        data-options="showTip:true,rule:[0,'|',25,'|',50,'|',75,'|',100]" />

Use JavaScript to disable it:
$("#ss").slider("disable");

I would expect that a user will NOT be able to change its value. It appears this is true since the slider is dimmed and you cannot drag the ball to slide to other value.

However, there is a way to change the value it is showing to user no matter whether the value behind the control is changable or not.
Since the default is 25, the sliding ball is on 25, but you can clicking on 50, then the ball moves to 50, you can do the same thing to other value such as 75. This bug mistakenly signals the user that the value is changable. This is contrary to my purpose of disabling the control unfortunately.
12  General Category / EasyUI for jQuery / Re: Tree won't expand/collapse in IE8 and Auto complete wo't work at all on: October 30, 2013, 05:22:12 AM
Just found auto complete is case sensitive. Can we make it non-case sensitive? Still need help for tree expand/collapse in IE8.
13  General Category / EasyUI for jQuery / Tree won't expand/collapse in IE8 and Auto complete wo't work at all on: October 30, 2013, 05:18:37 AM
The demo tree won't expand/collapse in demo.
http://www.jeasyui.com/demo/main/index.php?plugin=Tree&theme=default&dir=ltr&pitem=

The auto complete won't won't work in all IE,FF etc. in demo.
http://www.jeasyui.com/demo/main/index.php?plugin=ComboBox&theme=default&dir=ltr&pitem=

Please help.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!