EasyUI Forum
November 06, 2025, 09:13:19 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: Lock All Cotrols Except Selected List  (Read 6972 times)
devnull
Sr. Member
****
Posts: 431


View Profile
« 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 ?

« Last Edit: February 05, 2015, 04:43:31 AM by devnull » Logged

-- Licensed User --
devnull
Sr. Member
****
Posts: 431


View Profile
« Reply #1 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','')}
« Last Edit: February 05, 2015, 04:56:27 AM by devnull » Logged

-- Licensed User --
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!