Changeset 145

Show
Ignore:
Timestamp:
05/20/08 16:46:33 (5 months ago)
Author:
llaumgui
Message:
 
Location:
javascript/mootools_1.1.x
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • javascript/mootools_1.1.x/dc_remember/dc_remember.src.js

    r144 r145  
    3939 *    if( $('title-form') ) { 
    4040 *       var dcRemember      = new dotclearRemember( "comment_info", 180, "/" ); // cookieName, cookieDuration, cookiePath 
    41  *       dcRemember.initialize(); 
     41 *       dcRemember.init(); 
    4242 *    } 
    4343 * });</code> 
     
    4646 * 
    4747 * @author Guillaume Kulakowski <guillaume_AT_llaumgui_DOT_com> 
    48  * @version 1.0.1 
     48 * @version 1.0.2 
    4949 * @param       string  cookieName              Nom du cookie 
    5050 * @param       int             cookieDuration  Durée de vie du cookie en jours 
     
    6767         * @since 1.0 
    6868         */ 
    69         this.initialize = function initialize() { 
     69        this.init = function init() { 
     70         
     71                this.fbConsole("info", "dotclearRemember initialized"); 
    7072                 
    7173                this.setCheckbox(); 
     
    136138                        $('c_remember').setProperty('checked', true); 
    137139                } 
     140                else { 
     141                        this.fbConsole("warn", "No cookie called" + this.cookieName"); 
     142                } 
    138143        }; 
    139144 
     
    154159                } 
    155160        }; 
     161         
     162         
     163         
     164        /* 
     165         * Ecriture dnas la console de Firebug du champ sur une erreure. 
     166         * 
     167         * @author Guillaume Kulakowski <guillaume_AT_llaumgui_DOT_com> 
     168         * @since 1.0.2 
     169         * @param type  string  type de message 
     170         * @param msg   string  Suffix de l'ereur 
     171         */ 
     172        this.fbConsole = function fbConsole ( type, msg ) { 
     173                 
     174                /* Présence de Firebug */ 
     175                if( typeof console != 'undefined' && typeof console.log != 'undefined' ) { 
     176                        eval("console."+ type + "(msg);") 
     177                } 
     178        } 
    156179 
    157180 
  • javascript/mootools_1.1.x/verif_form/verif_form.src.js

    r144 r145  
    126126        this.init = function init() { 
    127127                 
    128                 this.consoleLog("verifForm initialized"); 
     128                this.fbConsole("info", "verifForm initialized"); 
    129129                 
    130130                this.btnSubmit.addEvent( "click", function(e) { 
     
    273273         */ 
    274274        this.hookTest = function hookTest() { 
    275                 this.consoleLog("No hookTest"); 
     275                this.fbConsole("warn", "No hookTest"); 
    276276        }; 
    277277 
     
    285285         */ 
    286286        this.hookSubmit = function hookSubmit() { 
    287                 this.consoleLog("No hooksubmit"); 
     287                this.fbConsole("warn", "No hooksubmit"); 
    288288        }; 
    289289 
     
    306306                } 
    307307                else { 
    308                         this.consoleLog("No id for input"); 
     308                        this.fbConsole("warn", "No id for input"); 
    309309                } 
    310310        } 
     
    313313 
    314314        /* 
    315          * Ecriture dnas la console de fireBug du champ sur une erreure. 
     315         * Ecriture dnas la console de Firebug du champ sur une erreure. 
    316316         * 
    317317         * @author Guillaume Kulakowski <guillaume_AT_llaumgui_DOT_com> 
    318318         * @since 1.4 
     319         * @param type  string  type de message 
    319320         * @param msg   string  Suffix de l'ereur 
    320321         */ 
    321         this.consoleLog = function consoleLog ( msg ) { 
     322        this.fbConsole = function fbConsole ( type, msg ) { 
    322323                 
    323                 if( console.log ) { 
    324                         console.log(msg); 
     324                /* Présence de Firebug */ 
     325                if( typeof console != 'undefined' && typeof console.log != 'undefined' ) { 
     326                        eval("console."+ type + "(msg);") 
    325327                } 
    326328        } 
     
    355357                        } 
    356358                        else { 
    357                                 this.consoleLog( "msgError length <= 0"); 
     359                                this.fbConsole( "msgError length <= 0"); 
    358360                        }  
    359361