EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: korenanzo on December 19, 2014, 09:55:07 AM



Title: How to disable the objects into a Panel?
Post by: korenanzo on December 19, 2014, 09:55:07 AM
Hi,
I have a panel; it contains several jeasyui objects : textbox, datebox, combobox, linkbuttons etc etc.

The objects are added at runtime so I do not know which objects there will be in.

Now I want to disable all the objects into the panel.

As I said, The problem is that I don't know how many and what type of objects I have.

I tried with:
Code:
$('#myPanel').find('*').prop('disabled',true) 

It works for all objects except the   linkbutton: this implies that the combo arrows remains active.
http://jsfiddle.net/korenanzo/c3vehtL2/

Is there another way ?

Thanks,

RIc


Title: Re: How to disable the objects into a Panel?
Post by: jarry on December 19, 2014, 05:39:33 PM
Please try this updated example
http://jsfiddle.net/c3vehtL2/1/


Title: Re: How to disable the objects into a Panel?
Post by: korenanzo on December 22, 2014, 01:25:53 AM
Hi jarry,
this is nice but dos not work for linkbuttons.
I tried adding 'linkbutton' on the plugins array but it's  not enough

http://jsfiddle.net/c3vehtL2/2/


Title: Re: How to disable the objects into a Panel?
Post by: jarry on December 22, 2014, 03:22:09 PM
You can call 'disable' method to disable the linkbutton components. If you want to prevent from do any thing with all the panel's elements, another alternative solution to solve this issue is to display a mask layer over the panel .