Changeset 19715

Show
Ignore:
Timestamp:
12/11/08 17:13:12 (2 years ago)
Author:
bergie
Message:

Enable loading jQuery from Google's hosted service, fixes #638

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/ragnaroek/midcom/midcom.core/midcom/application.php

    r19702 r19715  
    27542754        } 
    27552755 
    2756         $url = MIDCOM_STATIC_URL . "/jQuery/jquery-{$version}.js"; 
    2757         $this->_jquery_init_scripts = "<script type=\"text/javascript\" src=\"{$url}\"></script>\n"; 
     2756        $this->_jquery_init_scripts .= "\n"; 
     2757 
     2758        if ($GLOBALS['midcom_config']['jquery_load_from_google']) 
     2759        { 
     2760            // Use Google's hosted jQuery version 
     2761            $this->_jquery_init_scripts .= "<script src=\"http://www.google.com/jsapi\"></script>\n"; 
     2762            $this->_jquery_init_scripts .= "<script>\n"; 
     2763            $this->_jquery_init_scripts .= "    google.load('jquery', '{$GLOBALS['midcom_config']['jquery_version']}');\n"; 
     2764            $this->_jquery_init_scripts .= "</script>\n";             
     2765        } 
     2766        else 
     2767        { 
     2768            $url = MIDCOM_STATIC_URL . "/jQuery/jquery-{$version}.js"; 
     2769            $this->_jquery_init_scripts .= "<script type=\"text/javascript\" src=\"{$url}\"></script>\n"; 
     2770        } 
    27582771 
    27592772        if (!defined('MIDCOM_JQUERY_UI_URL')) 
  • branches/ragnaroek/midcom/midcom.core/midcom/config/midcom_config.php

    r19611 r19715  
    566566 
    567567// Related to JavaScript libraries 
    568 $GLOBALS['midcom_config_default']['enable_prototype'] = false; 
    569 $GLOBALS['midcom_config_default']['enable_scriptaculous'] = false; 
    570568$GLOBALS['midcom_config_default']['jquery_no_conflict'] = true; 
    571569$GLOBALS['midcom_config_default']['jquery_version'] = '1.2.6'; 
    572570$GLOBALS['midcom_config_default']['jquery_ui_version'] = '1.5.2'; 
     571$GLOBALS['midcom_config_default']['jquery_load_from_google'] = false; 
    573572$GLOBALS['midcom_config_default']['enable_ajax_editing'] = false; 
    574573