Show Posts
|
Pages: [1] 2 3 4
|
1
|
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
|
|
|
2
|
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 
|
|
|
4
|
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. 
|
|
|
6
|
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?
|
|
|
8
|
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 
|
|
|
11
|
General Category / EasyUI for jQuery / Re: combobox multiple not working
|
on: October 17, 2014, 10:08:06 AM
|
I have sussed it out. To convert a comma-separated string in your database to an array for a multiple-type combobox, do as follows: Javascript function to get the field values, convert them from a string to an array and correctly pass them to the combobox function explodeArrayReviewers(data){ var _StringReviewers = data.Reviewers; var _ArrayReviewers = _StringReviewers.split(","); $('#idformReviewers').combobox('setValues', _ArrayReviewers); } You call this js function from your form's onLoadSuccess event: <form id="fm" method="post" novalidate data-options="onLoadSuccess: function(data){explodeArrayReviewers(data);}"> To Update or Insert these values after submitting your form, the combobox field will post an array. To convert the array to a comma-separated string do as follows in your update/insert php file: $ReviewersArray = $_POST['Reviewers']; $Reviewers = implode(',', $ReviewersArray);
$sql = "UPDATE ... DON'T USE THE METHOD I THOUGHT WAS A SOLUTION ABOVE, THIS IS THE WAY TO DO IT!
|
|
|
12
|
General Category / EasyUI for jQuery / Re: combobox multiple not working
|
on: October 17, 2014, 09:46:59 AM
|
If a have a multiple-type combobox that is loaded with its id/text options. No problems there. But to initialise it with its MULTIPLE selected values, I need to set its value with an array of id values. It will then correctly display the selected values and they will be preselected. My form data for this field is a string of comma-separated values (e.g. "3,2,4,34"). I need to convert this string of comma-separated values to an array before passing it to the combobox as its selected values. I think you can convert a string to an array and set the combobox values like this: e.g. _DBstring ="3,2,4,34"; // How to get the field value???? var _comboarray = _DBstring.split(","); $('#mycombobox').combobox('setValues', _comboarray); BUT... How do I get the DBstring value for the field and convert it to an array before it is loaded? Do I use the form's onBeforeLoad method? (How?) Or do I use my php select code? (How?) Thanks in advance for any tips.
|
|
|
|