EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: devnull on February 05, 2015, 04:00:52 AM



Title: Lock All Cotrols Except Selected List
Post by: devnull on February 05, 2015, 04:00:52 AM
I am looking for a way to prevent clicks on all controls on the page without needing to individually change their enabled / disabled property.

The following code succeeds in locking everything, but does not allow events within the #seqf form.

Code:
$('body:not(#seqf *)').css( 'pointer-events', 'none' );

Realistically, what I have is a page with many controls, trees, linkbuttons, comboboxes etc etc, and when a user does something, I want to lock everything except for specific fileds on the form and specific buttons such as the save button.

Any suggestions on how I can achieve ths without needing to set / rest each control individually ?



Title: Re: Lock All Cotrols Except Selected
Post by: devnull on February 05, 2015, 04:43:08 AM
This appears to lock everything, even comboboxes, which are not in the jquery selector list ?

Code:
function uilock(omit){$('.l-btn,.tree, .easyui-tabs').not(omit).css( 'pointer-events', 'none' )}
function uiunlock(omit){$('.l-btn,.tree, .easyui-tabs').not(omit).css('pointer-events','')}