Show Posts
|
Pages: [1] 2 3 4
|
2
|
General Category / EasyUI for jQuery / Re: Layouts : content glitter/flash during page setup
|
on: March 23, 2023, 07:44:27 AM
|
Thanks for that neat solution. Here's a slight modification to provide a brief fade-in. <style> html { opacity:0; } </style> <script> $(document).ready(function() { document.getElementsByTagName("html")[0].style.opacity = 1; document.getElementsByTagName("html")[0].style.webkitTransition = 'opacity 1s 0s'; }); </script>
|
|
|
3
|
General Category / EasyUI for jQuery / Drag and drop datagrid addClass tree-dnd-no
|
on: March 14, 2023, 09:34:28 AM
|
When drag and drop is enabled in a datagrid, how can you manipulate $(sourceRow).draggable('proxy').removeClass('tree-dnd-yes').addClass('tree-dnd-no'); and $(sourceRow).draggable('proxy').removeClass('tree-dnd-no').addClass('tree-dnd-yes'); in the datagrid events? (onDragEnter, onDragOver,OnBeforeDrop etc.) For example, I have a datagrid with grouped rows. While it is not permitted to drop rows to a different group by default, the tick icon is still show rather than the red cross icon when dragging over targetRows in a different group.
|
|
|
5
|
General Category / EasyUI for jQuery / texteditor contextMenu
|
on: February 27, 2023, 01:22:48 PM
|
I want to dispense with the static texteditor toolbar and replace it with a context menu. I have used the following code to create a context menu. I have three texteditor fields on my page with ids: 'te0' 'te1' and 'te2' The javascript code: $(document).ready(function () { $(document).bind('contextmenu',function(e){ var t = $(e.target).closest('.texteditor'); e.preventDefault(); $('#teMenu').menu('show', { left: e.pageX, top: e.pageY-20 }); }); The simplified menu: <div id="teMenu" class="easyui-menu" style="border-top-width: 1px; top: 1px; width: 435px;"> <a href="#" onclick="$('te0').texteditor('getEditor').texteditor('execCommand','bold');" class="easyui-menubutton" data-options="plain:true, hasDownArrow:false, iconCls:'icon-bold'"></a> <a href="#" class="easyui-menubutton" data-options="plain:true, hasDownArrow:false, iconCls:'icon-italic'"></a> <a href="#" class="easyui-menubutton" data-options="plain:true, hasDownArrow:false, iconCls:'icon-underline'"></a> <a href="#" class="easyui-menubutton" data-options="plain:true, hasDownArrow:false, iconCls:'icon-removeformat'"></a> | <a href="#" class="easyui-menubutton" data-options="plain:true, hasDownArrow:false, iconCls:'icon-insertorderedlist'"></a> <a href="#" class="easyui-menubutton" data-options="plain:true, hasDownArrow:false, iconCls:'icon-insertunorderedlist'"></a> </div> One of the text editor divs: <div id="te0" fit="true" class="easyui-texteditor" title="TextEditor" data-options="header:'none' "/div> My question is: How do I invoke the various commands (bold, italic etc.)?I tried including in the menu: <a href="#" onclick="$('te0').texteditor('getEditor').texteditor('execCommand','bold');" class="easyui-menubutton" data-options="plain:true, hasDownArrow:false, iconCls:'icon-bold'"></a> But it doesn't work
|
|
|
6
|
General Category / EasyUI for jQuery / change opacity off different layout regions
|
on: November 24, 2022, 08:00:17 AM
|
I have a full page layout with N, S, E, W and center easyui-layout regions. I have a easyui texteditor in the center region.
I want to programmatically fade the opacity of the whole layout to opacity=0 but keep the Texteditor panel at opacity =1.
It is obviously inheriting the css values. If I place a panel below the layout, my code works fine.
The layout panel (id=bg1) starts with the style="z-index:1;position:fixed;opacity: 1;" When triggered it is faded as follows: $("#bg1").stop().animate({ opacity: 0 }, 5000); // fades to transparent over 5 secs
The easyui-texteditor (id=bg2) starts with the style="z-index:2;position:relative;opacity: 1;" When the background fade is triggered it is set to remain opaque as follows: $("#bg2").stop().animate({ opacity: 1 }, 0); // set to fully opaque immediately.
Any clues how to manipulate the css to make the easyui-texteditor box remain visible? Many thanks
|
|
|
7
|
General Category / EasyUI for jQuery / Can't trace error: Cannot read property of 'panel' of undefined
|
on: January 12, 2021, 04:11:29 AM
|
Can anyone help me to trace an error? My page has a datagrid with a nested subgrid. ERROR: "Uncaught TypeError: Cannot read property of 'panel' of undefined" This points to the following line in jquery.easyui.min.js: return $.data(jq[0],"datagrid"). panel.children("div.datagrid-pager"); AND $(this).datagrid("getPager").pagination("loaded"); My datagrid has pagination, which works correctly. My nested subgrid has pagination, which works correctly. Any ideas what might be the problem? Many thanks 
|
|
|
9
|
General Category / EasyUI for jQuery / TextEditor: font size
|
on: December 22, 2016, 05:55:31 AM
|
Thanks for adding the TextEditor extension. There seems to be a problem with the font size function. It doesn't have any effect and is stuck to "size 2". Not sure if this is deprecated in favour of point of pixel size??? A neat addition would also be View Source to toggle to html code. 
|
|
|
11
|
General Category / General Discussion / Re: How to handle onLoadSuccess if form load was used twice
|
on: November 07, 2016, 03:01:25 AM
|
If you are trying to combine data from two datasources into one datagrid or into one form, why don't you assemble your data using sql from your multiple datasources and combine it into a single json file? Then load the data into your datagrid/form with distinct fields (some relating to datasource 1, some relating to datasource 2). THen when you update/insert/delete, post the form variables to your controller, parse out the respective field values and do your CRUD operations to the 2 different tables/databases in your (Php) controller using the respective field values.
Does that make sense?
|
|
|
13
|
General Category / EasyUI for jQuery / $('#dg').datagrid('expandRow', rowIndex); not working
|
on: November 04, 2016, 04:06:30 AM
|
I have a datagrid with subgrid. It's along the lines of http://www.jeasyui.com/tutorial/datagrid/datagrid22.php With a parent record row expanded, upon double-clicking a child record, a modal form is opened and when submitted, it saves, and reloads the parent datagrid. I want it to re-select the parent record and expand the parent record. Everything works fine except it will not expand the record. Here's my code. I get the parent id from the form, and from that get the rowIndex. I understand the method is: $('#dg').datagrid('expandRow', rowIndex); function updateRecordTask() { var _thisjobid = $('#idtaskformjob_id').combogrid('getValue');// GET job_id (parent record id) from Form $('#taskfm').form('submit', { url: url, onSubmit: function() { return $(this).form('validate'); }, success: function(result) { var result = eval('(' + result + ')'); if (result.success) { $.messager.show({ title: 'Success!', msg: result.msg }); $('#taskdlg').dialog('close'); // close the dialog $('#dg').datagrid('reload'); // reload the user data $('#dg').datagrid('selectRecord', _thisjobid); //Select parent record with job_id var _rowid = $('#dg').datagrid('getRowIndex',_thisjobid); //Get rowindex of parent record with job_id
$('#dg').datagrid('expandRow',_rowid); //NOT WORKING - Expand row with rowindex
} else { $.messager.show({ title: 'Error', msg: result.msg }); } } }); } Everything works except the expandRow method.... Any ideas why it won't expand the row? Thanks 
|
|
|
|