Show Posts
|
Pages: [1] 2 3 4
|
1
|
General Category / EasyUI for jQuery / Menubutton Hide Event
|
on: September 14, 2020, 10:21:18 AM
|
Hi Everyone, I'm having an issue with the hideEvent in my menubutton. If I move the cursor out of the top button, the menu stays and only closes when I click outside the menu. As soon as I move the cursor over any of the sub-menu items and then move the mouse cursor out of the menu, it closes the menu immediately. <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Test Menu</title> <link class="jeasycss" rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css" /> <script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.min.js"></script> <script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script> </head> <body> <a href="#" class="easyui-menubutton" data-options="menu:'#mm1',hideEvent:'click'">Menu</a> <div id="mm1" style="width:150px;"> <div>Option 1</div> <div>Option 2</div> <div>Option 3</div> </div> </body> </html> Please see https://jsfiddle.net/uoj8awrx/I would prefer to use the 'duration' property, but this property is used for both opening and closing the menu. Is there a way to extend the menubutton to have a close duration? Thanks a lot for the help. Kevin
|
|
|
5
|
General Category / General Discussion / Sorting fire onLoadSuccess event
|
on: September 02, 2019, 07:54:24 AM
|
Hi guys
Is there a reason why the onLoadSuccess event is fired whenever a column is clicked for sorting? Should this event only fire when the datagrid finishes loading data. After all there is the onSortColumn for this functionality. Is there a way to prevent this from happening?
Thanks
|
|
|
7
|
General Category / EasyUI for jQuery / Programmatically close $.messager.show
|
on: June 06, 2016, 08:34:49 AM
|
Hi Guys
Is there a way to close the $.messager.show message? I have a function that loads a variable amount of data. Sometimes large amounts of data and sometimes really small amounts. I have a message that tells the user that the system is busy loading the data but when this data is small, the datagrid will populate quickly. Problem is that the message remains visible for a couple more seconds and users feel they need to wait for this to clear before they can do anything on the system. I want to use the 'onLoadSuccess' event of the datagrid to close the message.
|
|
|
8
|
General Category / EasyUI for jQuery / Re: Data Grid Pagination
|
on: September 16, 2014, 07:51:36 AM
|
Here is another idea you could use. The onLoadSuccess event will return all parameters sent from the server. You could then set the button there. ie. $('#edgTrail').datagrid({ onLoadSuccess: function(params){ var TrailPager = $('#edgTrail').edatagrid('getPager');
if (params.privilege == 1) { TrailPager.pagination({ showPageList: false, showRefresh : false, displayMsg : '{from} bis {to} von {total} Tabellen', buttons :[ {iconCls:'icon-add' ,handler:function(){addTrail();}} ,{iconCls:'icon-edit' ,handler:function(){editTrail();}} ,{iconCls:'icon-remove',handler:function(){removeTrail();}} ,{iconCls:'icon-save' ,handler:function(){saveTrail();}} ,{iconCls:'icon-undo' ,handler:function(){undoTrail();}} ] }); } else if (params.privilege == 2) { //as per your setup } } });
|
|
|
10
|
General Category / EasyUI for jQuery / Re: Toolbar at bottom of a datagrid
|
on: September 15, 2014, 05:58:55 PM
|
This is more of a hack but does work. You need to move the toolbar div after the datagrid div once the datagrid has been generated. This can be done in the onLoadSuccess event. ie $('#dg').datagrid({ onLoadSuccess: function(){ $("#toolbar").insertAfter("#myid .datagrid-view"); } });
...
<div id="myid"> <table id="dg" toolbar="#toolbar" ></table> <div id="toolbar"></div> </div>
|
|
|
11
|
General Category / EasyUI for jQuery / Re: Sort column properties
|
on: September 15, 2014, 04:56:03 PM
|
Sorting on the server is ideal. If you still need to sort the data, you can use the onLoadSuccess event. Then you could call the sort method. For example; $('#dg').datagrid({ onLoadSuccess: function(){ $('#dg').datagrid('sort', { sortName: 'date', sortOrder: 'desc' }); }, fit: true, nowrap: true, striped: true, collapsible: true, columns: [[ { field: 'date', title: 'Date', width: 120, sortable: true, sorter: function (a, b) { return (a > b ? 1 : -1); } }, { field: 'name', title: 'Name', width: 120, sortable: true, sorter: function (a, b) { return (a > b ? 1 : -1); }} ]] });
|
|
|
12
|
General Category / EasyUI for jQuery / Re: Data Grid Pagination
|
on: September 15, 2014, 04:36:36 PM
|
Maybe I don't fully understand your question but would it not be easy to just create this on the server side with PHP? So for example, directly after you create the datagrid, you insert something like the following; <?php if ($privilege == 0) echo "$('#edgTrail').pagination({layout:['first','links','last']});"; else if ($privilege == 1) echo "$('#edgTrail').pagination({layout:['first','prev','links','next','last']});"; else echo "$('#edgTrail').pagination({layout:['list','sep','first','prev','next','last','refresh','manual','links']});"; ?>
|
|
|
13
|
General Category / EasyUI for jQuery / How to format a datagrid column header
|
on: September 15, 2014, 04:03:57 PM
|
I'm trying to format one of my datagrid's column header but I'm having no luck in getting this done. So for example; <table id='rep'> <thead> <tr> <th data-options="field:'tripStart',width:120,align:'left'">Trip Start</th> <th data-options="field:'speed1',width:60,align:'right'">1-120km/h</th> <th data-options="field:'speed2',width:60,align:'right'" style="background-color: #FF0000">121-180km/h</th> <th data-options="field:'cost',width:80,align:'right'">Cost</th> </tr> </thead> </table>
I need to have the 3rd column header displayed with a red background. The table rows are displayed per normal with no special formatting, it's only the column header. Is this possible?
|
|
|
14
|
General Category / EasyUI for jQuery / Re: Error in save function
|
on: June 05, 2013, 01:42:44 AM
|
Hi Marc
Check what is being returned in your JSON. This is the issue with eval. For example, the following will generate an error; eval("x=10;y=20;document.writ(x*y)");
This is because of a spelling mistake in the method 'write'.
|
|
|
|