/****************************************\ * Author: Fabio R. Panettieri * * Date: 29-07-2008 * * Email: frenzo.panettieri@concatel.com * * CVT Argentina * \****************************************/ /** * This class is designed upon the Factory method pattern * It requires DynamicLoader to working properly * * Usage: * var MyPopup = PopupFactory.get('ListFilter'); */ /* Single instance */ if (typeof PopupFactory == 'undefined'){ var PopupFactory = {}; /* create required implementation */ PopupFactory.get = function(type){ if(type == 'legal'){ return new LegalPopup(); } else if (type == 'users') { return new UsersPopup(); } else if (type == 'image'){ return new imagePopup(); } } }