Grigor
Grigor

Reputation: 4049

ExtJS 4.X.X disable all panels at once

How would I disable all forms and panels in ExtJS at once, ideally before function call and then enable after the function is complete?

Upvotes: 0

Views: 697

Answers (2)

Jason McClellan
Jason McClellan

Reputation: 3021

You could add a loadmask to the body element. That should have the same effect. Hide the loadmask when the function completes.

Upvotes: 0

JamesHalsall
JamesHalsall

Reputation: 13485

If you're using ExtJS 4, you can do something like this...

var panels = Ext.ComponentQuery.query('panel');
if (panels.length) {
    for (var i = 0, l = panels.length; i < l; i++) {
        panels[i].disable();
    }
}

Upvotes: 1

Related Questions