.

JQuery Class Reference
[JQuery]

Helper for using JQuery. More...

List of all members.

Static Public Member Functions

static  get_path ()

Public Attributes

const  CDN_GOOGLE = 'https://ajax.googleapis.com/ajax/libs/jquery/%version%/jquery.min.js'
const  CDN_MS = 'https://ajax.aspnetcdn.com/ajax/jQuery/jquery-%version_min%.min.js'

Detailed Description

Helper for using JQuery.

Author:
Gerd Riesselmann

Definition at line 8 of file jquery.cls.php.


Member Function Documentation

static JQuery::get_path (  )  [static]

Definition at line 12 of file jquery.cls.php.

00012                                           {
00013                 $cdn = trim(Config::get_value(ConfigJQuery::CDN));
00014                 if (empty($cdn)) {
00015                         return 'js/jquery.js';
00016                 }
00017                 
00018                 // Resolve CDN
00019                 if ($cdn == 'google') { $cdn = self::CDN_GOOGLE; }
00020                 elseif ($cdn == 'ms') { $cdn = self::CDN_MS; }
00021                 
00022                 $version = '';
00023                 switch(Config::get_value(ConfigJQuery::VERSION)) {
00024                         case '1.3': 
00025                                 $version = JQUERY_VERSION_1_3;
00026                                 break;
00027                         case '1.4': 
00028                                 $version = JQUERY_VERSION_1_4;
00029                                 break;
00030                         case '1.5': 
00031                                 $version = JQUERY_VERSION_1_5;
00032                                 break;
00033                         case '1.6': 
00034                                 $version = JQUERY_VERSION_1_6;
00035                                 break;
00036                         case '1.7':
00037                                 $version = JQUERY_VERSION_1_7;
00038                                 break;
00039                 }
00040                 if (empty($version)) {
00041                         throw new Exception('Unknown JQuery Version ' . Config::get_value(ConfigJQuery::VERSION));
00042                 }
00043                 
00044                 $cdn = str_replace('%version%', $version, $cdn);
00045                 $version_min = preg_replace('|\.0$|', '', $version);
00046                 $cdn = str_replace('%version_min%', $version_min, $cdn);
00047                 
00048                 return $cdn;
00049         }

Member Data Documentation

const JQuery::CDN_GOOGLE = 'https://ajax.googleapis.com/ajax/libs/jquery/%version%/jquery.min.js'

Definition at line 9 of file jquery.cls.php.

const JQuery::CDN_MS = 'https://ajax.aspnetcdn.com/ajax/jQuery/jquery-%version_min%.min.js'

Definition at line 10 of file jquery.cls.php.


The documentation for this class was generated from the following file: