Show Posts
|
Pages: [1] 2 3 ... 154
|
1
|
General Category / EasyUI for jQuery / Re: timespinner on blur
|
on: October 11, 2025, 05:04:55 AM
|
Please override the 'blur' event handler. $('#ROL_DUR').timespinner({ showSeconds: false , value: '' , inputEvents: $.extend({}, $.fn.timespinner.defaults.inputEvents, { blur: (e) => { $.fn.timespinner.defaults.inputEvents.blur.call(this,e); console.log(">>> blur handler wurde getriggert"); } }) });
|
|
|
2
|
General Category / EasyUI for jQuery / Re: Simple question about datagrid & toolbars
|
on: October 09, 2025, 02:15:15 AM
|
Please set the 'text-align:right' css style for the toolbar. <div id="tb" style="text-align: right;"> <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="javascript:alert('Add')">Add</a> <a href="#" class="easyui-linkbutton" iconCls="icon-cut" plain="true" onclick="javascript:alert('Cut')">Cut</a> <a href="#" class="easyui-linkbutton" iconCls="icon-save" plain="true" onclick="javascript:alert('Save')">Save</a> </div>
|
|
|
3
|
General Category / EasyUI for jQuery / Re: Mobile menu Iphone
|
on: August 14, 2025, 06:38:52 PM
|
Please set the 'showEvent' property value to 'click'. This means that the menu won't show until the 'click' event is triggered. <a href="javascript:void(0)" class="easyui-menubutton" data-options="iconCls:'icon-more',menu:'#mm1',menuAlign:'right',hasDownArrow:false,showEvent:'click'"> </a>
|
|
|
5
|
General Category / EasyUI for jQuery / Re: Mobile menu Iphone
|
on: August 11, 2025, 11:13:28 PM
|
This is the code that shows the panel header with the menu on the right. <!DOCTYPE html> <html>
<head> <meta charset="UTF-8"> <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <title>Basic Menu - jQuery EasyUI Mobile Demo</title> <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/material-blue/easyui.css"> <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/mobile.css"> <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/icon.css"> <script type="text/javascript" src="https://www.jeasyui.com/easyui/jquery.min.js"></script> <script type="text/javascript" src="https://www.jeasyui.com/easyui/jquery.easyui.min.js"></script> <script type="text/javascript" src="https://www.jeasyui.com/easyui/jquery.easyui.mobile.js"></script> </head>
<body> <div class="easyui-navpanel"> <header> <div class="m-toolbar"> <div class="m-title">TEST</div> <div class="m-right"> <a href="javascript:void(0)" class="easyui-menubutton" data-options="iconCls:'icon-more',menu:'#mm1',menuAlign:'right',hasDownArrow:false"></a> </div> </div> </header> </div> <div id="mm1" class="easyui-menu" style="width:200px;"> <div data-options="iconCls:'icon-photo_portrait_16'" onclick="test()">Test</div> </div> </body>
</html>
|
|
|
8
|
General Category / EasyUI for jQuery / Re: Datagrid Change singleselect and keep title
|
on: June 11, 2025, 05:01:00 AM
|
Call the code below will recreate the datagrid again. $('#dgList').datagrid({ singleSelect:true });
You can set the 'title' property while creating the datagrid. $('#dgList').datagrid({ title: '...', singleSelect:true });
If you only want to change the selecting mode, please set the 'singleSelect' property instead of recreating the whole datagrid again. $('#dgList').datagrid('options').singleSelect=true;
|
|
|
9
|
General Category / EasyUI for jQuery / Re: Datagrid scrollview and cardview together
|
on: June 09, 2025, 03:19:00 AM
|
Please override the 'renderRow' method of the scrollview. $.extend(scrollview, { renderRow: function (target, fields, frozen, rowIndex, rowData) { var opts = $.data(target, 'datagrid').options; var cc = []; if (frozen && opts.rownumbers) { var rownumber = rowIndex + 1; cc.push('<td class="datagrid-td-rownumber" style="height:50px"><div class="datagrid-cell-rownumber">' + rownumber + '</div></td>'); } if (!frozen) { cc.push('<td colspan=' + fields.length + ' style="padding:1px 10px 1px 10px;border:0;height:50px;width:360px !important;">'); cc.push('<div class="dash">'); cc.push('<table style="width:100%;border:none;border-collapse:collapse;">'); cc.push('<tr>'); cc.push('<td style="border:0">' + rowData['name'] + '</td>') cc.push('</tr>'); cc.push('</table>'); cc.push('</div>'); } cc.push('</td>'); return cc.join(''); } })
|
|
|
10
|
General Category / EasyUI for jQuery / Re: Change background-color of entire column
|
on: May 24, 2025, 06:21:35 AM
|
Define the 'styler' function to set the CSS styles for the column. <script> function mystyler(){ return 'background:#ddd' } </script> <table id="tg" title="Folder Browser" class="easyui-treegrid" style="width:700px;height:250px" data-options=" data:data, rownumbers: true, idField: 'id', treeField: 'name' "> <thead> <tr> <th data-options="field:'name',styler:mystyler" width="220">Name</th> <th data-options="field:'size'" width="100" align="right">Size</th> <th data-options="field:'date'" width="150">Modified Date</th> </tr> </thead> </table>
|
|
|
11
|
General Category / EasyUI for jQuery / Re: How to hide the treegrid icon
|
on: May 24, 2025, 06:16:45 AM
|
Add the CSS style to hide the expanding/collapsing icon on the treegrid. <style> .mytg .tree-hit{ display: none; } </style>
And then listen to the 'onClickRow' event, call the 'toggle' method to expand or collapse the node. $('#tg').treegrid({ cls: 'mytg', onClickRow: function(row){ $(this).treegrid('toggle',row.id) } })
|
|
|
12
|
General Category / EasyUI for jQuery / Re: Datagrid Cell Tooltip individual text
|
on: April 29, 2025, 12:22:40 AM
|
Please call this code to convert the tooltip. function formatTooltip(value, row, index) { var fieldName = this.field var fieldNumber = fieldName.split('_') return '<div class="dg-tp" title="' + row['tooltipText_' + fieldNumber[1]] + '">' + value + '</div>' } $(function () { $('#dg').datagrid({ // ..., onLoadSuccess: function (data) { $(this).datagrid('getPanel').find('.dg-tp').tooltip() } }) })
|
|
|
13
|
General Category / EasyUI for jQuery / Re: Timeline text alignment
|
on: April 09, 2025, 08:50:08 PM
|
There are some solutions to display the alternate items. 1. Use the 'labelFormatter' and 'formatter' functions. <!DOCTYPE html> <html>
<head> <meta charset="UTF-8"> <title>TimeLine - jQuery EasyUI Demo</title> <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/icon.css"> <script type="text/javascript" src="https://www.jeasyui.com/easyui/jquery.min.js"></script> <script type="text/javascript" src="https://www.jeasyui.com/easyui/jquery.easyui.min.js"></script> </head>
<body> <div class="easyui-panel" style="padding:10px;"> <div id="tt"></div> </div> <script> var data = [ { content: 'Goal', contentPosition: 'before', time: '10:30', playerName: 'Player #1', info: '' }, { content: 'Penalty', contentPosition: 'after', time: '12:00', playerName: 'Player #2', info: 'Yellow Card' }, { content: 'Goal', contentPosition: 'before', time: '14:30', playerName: 'Player #3', info: '' }, { content: 'Goal', contentPosition: 'after', time: '16:30', playerName: 'Player #4', info: '' } ] $(function () { const formatContent = (row) => { return ` <div> <div style="font-size:14px;font-weight:bold">${row.time} - ${row.content}</div> <div style="font-size:12px;color:#666">${row.playerName}</div> <div style="font-size:12px;color:#666">${row.info}</div> </div> ` } $('#tt').timeline({ data: data, formatter: (row) => { if (row.contentPosition == 'after') { return formatContent(row) } else { return '<div style="height:45px"></div>'; } }, labelFormatter: (row) => { if (row.contentPosition == 'before') { return formatContent(row) } else { return ''; } } }) }) </script> </body>
</html>
2. Set the 'align' property value to 'alternateReverse'. const formatContent = (row) => { return ` <div> <div style="font-size:14px;font-weight:bold">${row.time} - ${row.content}</div> <div style="font-size:12px;color:#666">${row.playerName}</div> <div style="font-size:12px;color:#666">${row.info}</div> </div> ` } $('#tt').timeline({ data: data, align: 'alternateReverse', formatter: formatContent })
3. Custom the 'itemPosition' function to set the item position to 'left' or 'right'. const formatContent = (row) => { return ` <div> <div style="font-size:14px;font-weight:bold">${row.time} - ${row.content}</div> <div style="font-size:12px;color:#666">${row.playerName}</div> <div style="font-size:12px;color:#666">${row.info}</div> </div> ` } $('#tt').timeline({ data: data, align: 'alternate', formatter: formatContent, itemPosition: (row,index) => { return row.contentPosition=='after' ? 'left' : 'right'; } })
|
|
|
|