diff --git a/.htaccess b/.htaccess index 9494b53..69458eb 100644 --- a/.htaccess +++ b/.htaccess @@ -101,7 +101,7 @@ DirectoryIndex index.php index.html index.htm # # If your site is running in a VirtualDocumentRoot at http://example.com/, # uncomment the following line: - # RewriteBase / + RewriteBase / # Pass all requests not referring directly to files in the filesystem to # index.php. Clean URLs are handled in drupal_environment_initialize(). diff --git a/includes/common.inc b/includes/common.inc index fbad974..f5cfae4 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -3987,6 +3987,7 @@ function drupal_add_js($data = NULL, $options = NULL) { // Register all required libraries. drupal_add_library('system', 'jquery', TRUE); drupal_add_library('system', 'jquery.once', TRUE); + drupal_add_library('system', 'html5shim', TRUE); } switch ($options['type']) { diff --git a/misc/html5.js b/misc/html5.js new file mode 100644 index 0000000..b87a4e5 --- /dev/null +++ b/misc/html5.js @@ -0,0 +1,4 @@ +// html5shiv @rem remysharp.com/html5-enabling-script +// iepp v1.6.2 @jon_neal iecss.com/print-protector +// Dual licensed under the MIT or GPL Version 2 licenses +/*@cc_on(function(a,b){function r(a){var b=-1;while(++b";return a.childNodes.length!==1}())){a.iepp=a.iepp||{};var c=a.iepp,d=c.html5elements||"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",e=d.split("|"),f=e.length,g=new RegExp("(^|\\s)("+d+")","gi"),h=new RegExp("<(/*)("+d+")","gi"),i=/^\s*[\{\}]\s*$/,j=new RegExp("(^|[^\\n]*?\\s)("+d+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),k=b.createDocumentFragment(),l=b.documentElement,m=l.firstChild,n=b.createElement("body"),o=b.createElement("style"),p=/print|all/,q;c.getCSS=function(a,b){if(a+""===undefined)return"";var d=-1,e=a.length,f,g=[];while(++dassertTrue(array_key_exists('misc/jquery.js', $javascript), t('jQuery is added when a file is added.')); $this->assertTrue(array_key_exists('misc/drupal.js', $javascript), t('Drupal.js is added when file is added.')); + $this->assertTrue(array_key_exists('misc/html5.js', $javascript), t('html5.js is added when file is added.')); $this->assertTrue(array_key_exists('misc/collapse.js', $javascript), t('JavaScript files are correctly added.')); $this->assertEqual(base_path(), $javascript['settings']['data'][0]['basePath'], t('Base path JavaScript setting is correctly set.')); url('', array('prefix' => &$prefix)); diff --git a/modules/system/system.module b/modules/system/system.module index 3ebc657..b37a0d1 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -1221,6 +1221,16 @@ function system_library() { ), ); + // html5shim. + $libraries['html5shim'] = array( + 'title' => 'html5shim', + 'website' => 'http://html5shim.googlecode.com/svn/trunk/html5.js', + 'version' => 'r10', + 'js' => array( + 'misc/html5.js' => array(), + ), + ); + // Farbtastic. $libraries['farbtastic'] = array( 'title' => 'Farbtastic',