EasyUI Forum
April 29, 2024, 12:44:16 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1] 2 3 ... 5
1  General Category / EasyUI for jQuery / Re: Datagrid Datetime Column Sort on: October 31, 2018, 10:23:17 PM
Hello stworthy,

Thanks a lot for your reply. It works as expected.

The below code is my modified version which handles the date in dd/Mon/yyyy format as well.

Code:
var month_names = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"];

function dateSorter(date1, date2)
{
var toDate = function(str){
var parts = str.split(' ');
var dd = parts[0].split('/');
var hh = parts[1].split(':');
var date = "";
try{
date = new Date(dd[2],month_names.indexOf(dd[1].substring(0,3).toLowerCase()),dd[0],hh[0],hh[1],hh[2]); //converting month to lower case
}
catch(Ex){
date = new Date(dd[2],parseInt(dd[1])-1,dd[0],hh[0],hh[1],hh[2]); //subtracting one from month since months start from 0 in javascript
}
return date;
}
var d1 = toDate(date1);
var d2 = toDate(date2);
return d1.getTime()<d2.getTime()?-1:1;
}

Thanks & Regards,
Darrel.
2  General Category / EasyUI for jQuery / Datagrid Datetime Column Sort [Solved] on: October 30, 2018, 01:56:03 PM
Hello Team,

Basically I wanted to try out sorting on the datagrid column on a date field. The following url that I referred for doing this custom sorting is https://www.jeasyui.com/tutorial/datagrid/datagrid14.php

I had to tweak it a little for dd/mm/yyyy format. But when I introduced the timestamp into the date field, that's when the results started getting weird. The same can be checked in the following fiddle: http://jsfiddle.net/c9so6p3b/

You can change the sorting for the date field and check the results. The output isn't as expected, notice the timestamp part. Please could you help me out. One thing I have in mind is to separate out the time stamp before doing the comparison but then I got stuck on when I need to add it back Sad

Also just another thought, how would this work in case the date string is in dd/Mon/yyyy format....

Regards,
Darrel
3  General Category / EasyUI for jQuery / Combobox Values not displayed in maximized panel on: September 07, 2018, 07:59:32 AM
Hello team,

I'm stuck on a weird issue. I have a panel that gets maximized on the full screen done with the help of the following link: https://www.jeasyui.com/forum/index.php?topic=5353.0

The issue now is, if there is a combobox present inside the panel, it displays the drop down values properly. But if we maximize the panel and then try to select/change the combobox value, it does not display the drop down values. I'm able to select the values only if the panel is in normal or restored state. I'm suspecting this is due to the z-index changes in the max class.

The link for the issue faced is as follows: https://jsfiddle.net/ap6se2wL/1/

You can check the same by maximizing the url and checking that the dropdown values are displayed or not.

I tried setting max in the easyui-combobox class as well but it didn't help. What can I do to view the dropdown values even if the panel is maximized.

Regards,
Darrel
4  General Category / EasyUI for jQuery / Re: Fetch value in easyui dialog frame from parent html on: August 31, 2018, 06:24:53 AM
Hello stworthy,

I was able to solve it using this concept. Thanks a lot.
Got to learn something new in frame communications...
5  General Category / EasyUI for jQuery / Fetch value in easyui dialog frame from parent html [Solved] on: August 03, 2018, 10:49:30 AM
Hello Team,

I have a some fields with the ids, say, 'stud_name' and 'stud_age' on an html page. I'm calling a dialog box on submit, which has a frame, to show the details based on the stud_name field's value.
I want to access the value of the parent frame fields in the dialog box on successful load of the dialog box.

Code:
<!-- HTML Code -->
<div id="dlg" style="width:95%;height:80%;padding:10px;display:none" >
<div id="iframe">
</div>
</div>

Code:
//javascript code
function displayFrame(){
var iframe_ = '<iframe src="somehtmlFile.html" frameborder="0" style="border:0;width:100%;height:99.4%;"></iframe>';

$('#iframe').panel({
content: iframe_,
width: '100%',
height: '100%'
});

$('#dlg').window({
title: 'Details',
width: '90%',
height: '80%',
closed: false,
cache: false,
modal: true,
minimizable: false,
onLoad: function(){}
});
}

How can I access the stud_name/stud_age fields value in 'somehtmlFile.html' without passing it in the src of the frame or dialog box using pure javascript or jquery or easyui syntax.

Regards,
Darrel
6  General Category / EasyUI for jQuery / Portal window reloads on maximize on: April 22, 2018, 10:54:05 PM
Hello team,

Is it possible to stop the portal window from reloading whenever the maximize window button is clicked?

The page loaded inside that particular portal window should scale automatically, without having the page to be reloaded, whenever the maximize button is clicked. Would the same should be applicable for datagrids as well??

Assuming there are any datagrids, then they too would reload again on maximize, leading to unnecessary processing for the same data to be displayed. Is there any way to prevent/stop this unnecessary reload on maximize??

Regards,
Darrel.
7  General Category / EasyUI for jQuery / Re: Highlight searched text in datagrid cell on: April 02, 2018, 04:55:02 AM
Hi jarry,

Thanks a lot for your reply. I've modified the code slightly as per my requirements.
The modified reloado code for the same is: http://code.reloado.com/elexay3/5/edit

Regards,
Darrel
8  General Category / EasyUI for jQuery / Re: pannel ajax content of Portal load data twicely on: March 28, 2018, 09:20:38 AM
Hi zzdfc,

Are you loading the easyui.js library file twice by mistake??? Because I had faced a similar issue due to this.

Regards,
Darrel
9  General Category / EasyUI for jQuery / Highlight searched text in datagrid cell [Solved] on: March 28, 2018, 09:16:09 AM
Hello team,

Is it possible to highlight the searched term in the doSearch function for a single search field on the grid?? For example, if I type 'ABCD' and if the data is present in the row object, then change the font color to red and background color to yellow of that matching cell.

The code is the same as the following link: https://www.jeasyui.com/forum/index.php?topic=5537.0

Code:
function doSearch(inp) {
var rows = [];

inp = inp.toUpperCase();

var l_pageSize = $('#dg').datagrid('options').pageSize;

if(!table_data.length || l_pageSize != g_pageSize)
{
getTableData();
}

$.map(table_data, function(row){
for(var p in row)
{
var v = row[p];
var regExp = new RegExp(inp, 'i'); // i - makes the search case-insensitive.

if(regExp.test(String(v)))
{
//will I have to manipulate the rows here???
rows.push(row);
break;
}
}
});

if(inp != "")
{
alert("Found records: " + rows.length);
$('#dg').datagrid('loadData', rows);
}
}

Thanks & Regards,
Darrel
10  General Category / EasyUI for jQuery / Re: Close iframe window using link button on: March 06, 2017, 10:26:53 PM
Hello jarry,

Thanks a lot for your reply.

It worked as per the suggested changes Smiley

Regards,
Darrel.
11  General Category / EasyUI for jQuery / Close iframe window using link button [Solved] on: March 06, 2017, 02:54:23 AM
Hello,

I have the following case where one page is loaded as an iframe in an easyui-window. The page loads as expected in the iframe. Everything works fine, the only issue being that I'm not able to close the iframe window on click of the button which is present in the frame. I am able to close the window using the close button on the title bar.
Reloado code example for the same is:
http://code.reloado.com/inepot3/3/edit#preview

As seen in the above reloado code, I need the iframe to close on click of the button as well.

I basically have a function that is called in the onBeforeClose event of the window, to help set some values to the main page before the window closes. This works fine with the close button on the title bar, but I can't seem to get it work with the link button as well Sad

Please could you tell me how can I close the window on click of the "Click To Close" button???

Regards,
Darrel
12  General Category / EasyUI for jQuery / Re: Datagrid extra blank column on: March 03, 2017, 01:12:52 AM
Hello jarry,

Thanks a lot for your help. It solved the issue Smiley

Regards,
Darrel
13  General Category / EasyUI for jQuery / Datagrid extra blank column [Solved] on: March 02, 2017, 03:29:35 AM
Hello,

I'm stuck in a silly issue with the datagrid. I can see that the last column of the datagrid is not to the full width of the div in which it is contained. See the extreme right hand side of the grid. The following reloado code will display the same:  http://code.reloado.com/unupaq3/2/edit

However I noticed one thing that if I play around with the width of the div, the size of that extra column changes accordingly. For example when the div has a width of 100% the grid loads properly without that extra space in the last... reloado code for this case: http://code.reloado.com/unupaq3/3/edit#source

Referring to some other older posts as well I tried the following:
1) Setting fixed: true in the column object and excluding the property in the last column. But it didn't work!!!!! http://code.reloado.com/unupaq3/4/edit

2) Tried using fitColumns as well. This didn't work as well!!!!!
Code:
$("#DATAGRID_TEST").datagrid('fitColumns');

reloado link for the above code block: http://code.reloado.com/unupaq3/5/edit


I can modify the colData to set properly as per this example: http://code.reloado.com/unupaq3/6/edit

But if i resize the screen then, booooom it appears again!!!!!!!! Shocked Cry
Also it is not recommended to get calculate the size everytime during resize in the code itself!!!! That's the reason why the width is given in percentage!!!

Please could you tell me how to avoid that extra visible section this the size of the div in which the datagrid is contained is around 33% only.

Regards,
Darrel
14  General Category / EasyUI for jQuery / Re: Dynamic Datalist on: February 20, 2017, 10:32:12 PM
Hello stworthy,

Thanks a lot for your help Smiley
It works well now.....

Regards,
Darrel.
15  General Category / EasyUI for jQuery / Re: Dynamic Datalist on: February 20, 2017, 05:06:11 AM
Hello stworthy,

Firstly thank you for your fast response. The up/down movement of the datalist elements is working fine.

However I did see that when unchecking the checkbox in the first datalist, the second datalist isn't getting it's elements properly removed due to the fact that the index and row data are coming wrong from the first datalist.

For example on load of the page, the datalist has all the checkboxes checked causing the second datalist to have the same elements as well. But when I start unchecking the checkboxes in a sequential order, the unCheck logic fails, due to the index and row data that are incorrectly passed. I've added console debugs to try to solve the same but however, I wasn't able to figure out this weird behaviour. Sad

The reloado code for the same is:     http://code.reloado.com/osadug4/3/edit

I also have one more question, can the width of the datalist be set to auto depending on the width of the element it contains?

Please could you help me out with these. Smiley

Regards,
Darrel.
Pages: [1] 2 3 ... 5
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!