EasyUI Forum
May 16, 2024, 09:46:40 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: EasyUI and JQueryUI Conflict on Resize  (Read 27708 times)
melane
Newbie
*
Posts: 14


View Profile
« on: May 16, 2013, 08:01:13 PM »

Hi,

I have a project where I use EasyUI Datagrid (great stuff by the way), and I need to use Dialog from JqueryUI framework (because I need a dialog with form..).
When I import the JQueryUI library, I see a strange behavior on the EasyUI Datagrid Header Resize. If I try to manually resize the header, only the header cell is resized (the data cells for this column are not resized).

Note that the double click on the header cells separation works and will auto resize the column on the preferred size. The problem occurs when you try to resize by clilck and slid (manually defining the size of the column).

If I do not import JQueryUI library, then I confirm the resize columns feature of the datagrid is working fine. So I am guessing there must be a kind of conflict between both libraries, but I am not sure on how I could solve this issue. I created a small jsfiddle project to illustrate the issue : http://jsfiddle.net/melane/vmDP8/

Do you know how I could fix this?

Thanks,

Melanie
« Last Edit: May 16, 2013, 08:55:23 PM by melane » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: May 17, 2013, 12:05:52 AM »

Please prevent from using the dialog of jqueryui, use 'easyui-dialog' instead. Or disable the resizable feature for each columns.
Logged
melane
Newbie
*
Posts: 14


View Profile
« Reply #2 on: May 17, 2013, 12:13:26 AM »

Well,

Thank you, but the question is more about learning on how I could solve this conflict. I am fairly new to jquery and I would like to know if there is a way to prevent this conflict. Is there is a way to override the resize method ?

Thanks

Melanie
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: May 17, 2013, 12:19:38 AM »

No better way to avoid this conflict. So if you want to use the resizable of jqueryui, you must disable the resizable of easyui.
Logged
melane
Newbie
*
Posts: 14


View Profile
« Reply #4 on: May 17, 2013, 12:30:24 AM »

Hi,

How exactly can I disable the resizable of easyui ? It looks like this is a default feature of the datagrid as I did not set any resizable options. And when I add  resizable="false" option in the declaration of the datagrid, it does change anything, I can still change the size of the headers...

Thanks
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #5 on: May 17, 2013, 12:50:52 AM »

Set 'resizable:true' property for columns, just like this
Code:
<th field="firstname" width="50" resizable="false">First Name</th>

The best way to solve this issue is to use the 'easyui-dialog', please refer to http://jsfiddle.net/vmDP8/11/
Logged
melane
Newbie
*
Posts: 14


View Profile
« Reply #6 on: May 17, 2013, 12:56:38 AM »

Great got it, thanks!
Logged
pmjenn
Newbie
*
Posts: 9


View Profile
« Reply #7 on: June 14, 2013, 04:45:03 AM »

I was able to get around this problem by renaming the easy UI Resizable component to Resizable2. Of course, I also had to re-factor the dependencies for the new name. I'm not necessarily recommending this approach, but it has been working successfully in my project. The jQuery plug-ins use their resizable, and easy UI its resizable (albeit renamed) plug-in.

However, I agree with stworthy, unless you have no choice, you are better off picking one library or the other.
Logged
ifcwlme
Newbie
*
Posts: 8


View Profile
« Reply #8 on: April 27, 2016, 10:45:34 PM »

Why EasyUI have to use same name as jQueryUI ? It is so annoying.
Why don't just add a prefix to all EasyUI's module name to solve the problem?
Logged
ifcwlme
Newbie
*
Posts: 8


View Profile
« Reply #9 on: April 27, 2016, 11:59:37 PM »

The best way to solve this problem is use own copy of jquery for EasyUI and jQueryUi

Code:
	<script src="resources/jquery/jquery-1.11.3.min.js"></script>
<script src="resources/easyui/jquery.easyui.min.js"></script>
<script>
var $easy = $.noConflict(true);
</script>
<script src="resources/jquery/jquery-1.11.3.min.js"></script>
<script src="esources/jquery-ui/jquery-ui.min.js"></script>

Then use $ for jQueryUI's widget, $easy for EasyUI's components.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!