YUI3 Panel background shading and position problems

Author - Webner
10.03.2015
|
0 Comments
|

By default YUI3 assigns yui3-widget-mask class for background shading. To override that we need to change its style properties. Similarly for position of the panel, it can be changed by specifying position property of .yui3-panel class. These are the methods to accomplish this:

Y.one(‘.yui3-widget-mask’).setStyle(‘background’,’#fff’); 
Y.one(‘.yui3-panel’).setStyle(‘position’,’fixed’); 
Full code is like this:
YUI().use(‘panel’, function(Y) {
EX_waitPanel = new Y.Panel( {
srcNode : ‘#plswait’,
width : “240px”,
centered : true,
close : false,
draggable : false,
modal : true,
bodyContent : waitImg,
headerContent : waitMsg
});             
EX_waitPanel.render(document.body);
Y.one(‘.yui3-widget-mask’).setStyle(‘background’,’#fff’); 
Y.one(‘.yui3-panel’).setStyle(‘position’,’fixed’); 

Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at dev@webners.com for your Insurance, eLearning and Salesforce applications.

Leave a Reply

Your email address will not be published. Required fields are marked *