/*
 * RVSiteBuilder User View Log Configulation 
 *
 * Copyright (c) 2006 RV Global Soft Co.,Ltd. All rights reserved.
 *
 * Depends:
 *  jquery.js
 *  ui.dialog.js (jQuery)
 *  ui.core.js (jQuery)
 *  ui.draggable.js (jQuery)
 *  ui.resizable.js (jQuery)
 *  jquery.bgiframe.js (jQuery)
 *  sitebuilder.js
 */
/*
 jQuery('#userViweLog').click(function(){
 jQuery('#userViweLog').sitebuilder.userViewLog({});
 jQuery('#userviewlog #configulationForm').dialog('open');
 return false;
 });
 */

(function($) {
    jQuery.sitebuilder.userViewLog = {

    };
    
    jQuery.sitebuilder.userViewLog.Configulation = {
        cmdOk: function(id) {
            //var parent = jQuery(this).parents().get(0).id;
            var parent = id;
            jQuery(parent).rvsDialog('close');
            var formParam = jQuery.sitebuilder.serialize.form(id);
            jQuery.sitebuilder.Log.logMessage('Form Paramiter: '+ formParam, LOG_PRIORITY.DEBUG);
            
            jQuery.sitebuilder.Ajax.connect("#viewlog-form", {
                callback: {
                    doError: function(xhr, ajaxOptions, thrownError) {
                        jQuery.sitebuilder.Ajax.doError(xhr, ajaxOptions, thrownError);
                    },
                    doSuccess: function(data) {
                        jQuery("#viewlogSuccess").rvsDialog('open', {});
                    }
                }
            });
        }
    };
})(jQuery);

