A little more optimization work, client-side this time. I lied, no librijnadel2 here, but it's about to be merged in...
authorDan
Thu, 03 Jul 2008 15:08:35 -0400
changeset 594 738c61b498a6
parent 593 4f9bec0d65c1
child 595 b051eb79b158
A little more optimization work, client-side this time. I lied, no librijnadel2 here, but it's about to be merged in...
includes/clientside/css/enano-shared.css
includes/clientside/jsres.php
includes/clientside/static/paginate.js
includes/template.php
index.php
themes/oxygen/header.tpl
--- a/includes/clientside/css/enano-shared.css	Wed Jul 02 22:15:55 2008 -0400
+++ b/includes/clientside/css/enano-shared.css	Thu Jul 03 15:08:35 2008 -0400
@@ -2,10 +2,6 @@
  * Shared stuff that all Enano themes (should) use
  */
 
-/* IE-only stylesheet */
-@import url("./enano-shared-ie.css");
-/* End IE-only stylesheet */
- 
 /* Information, warning, question, error, and wait boxes */
 div.error-box                     { background-image: url(../../../images/error.png);    background-position: 8px 8px; background-repeat: no-repeat; background-color: #FFF4F4; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 0; min-height: 25px; }
 div.info-box                      { background-image: url(../../../images/info.png);     background-position: 8px 8px; background-repeat: no-repeat; background-color: #F4F4FF; border: 1px dashed #406080; padding: 10px 10px 10px 50px; margin: 1em 0 0 0; min-height: 25px; }
--- a/includes/clientside/jsres.php	Wed Jul 02 22:15:55 2008 -0400
+++ b/includes/clientside/jsres.php	Thu Jul 03 15:08:35 2008 -0400
@@ -120,28 +120,15 @@
 
 // if we only want the tiny version of the API (just enough to get by until the full one is loaded), send that
 // with a simple ETag and far future expires header
+
+// note - obfuscated for optimization purposes. The exact same code except properly indented is in enano-lib-basic.
 if ( isset($_GET['early']) )
 {
-  header('ETag: enanocms-lib-early-r1');
+  header('ETag: enanocms-lib-early-r2');
   header('Expires: Wed, 1 Jan 2020 00:00:00 GMT');
   
   echo <<<JSEOF
-var onload_hooks = new Array();
-
-function addOnloadHook(func)
-{
-  if ( typeof ( func ) == 'function' )
-  {
-    if ( typeof(onload_hooks.push) == 'function' )
-    {
-      onload_hooks.push(func);
-    }
-    else
-    {
-      onload_hooks[onload_hooks.length] = func;
-    }
-  }
-}
+var onload_hooks = new Array();function addOnloadHook(func){if ( typeof ( func ) == 'function' ){if ( typeof(onload_hooks.push) == 'function' ){onload_hooks.push(func);}else{onload_hooks[onload_hooks.length] = func;};};}
 JSEOF;
   
   exit();
--- a/includes/clientside/static/paginate.js	Wed Jul 02 22:15:55 2008 -0400
+++ b/includes/clientside/static/paginate.js	Thu Jul 03 15:08:35 2008 -0400
@@ -13,6 +13,7 @@
 
 window.paginator = function(data, callback, offset, perpage, passer)
 {
+  load_component('flyin');
   if ( !perpage || typeof(perpage) != 'number' || ( typeof(perpage) == 'number' && perpage < 1 ) )
   {
     this.perpage = 10;
--- a/includes/template.php	Wed Jul 02 22:15:55 2008 -0400
+++ b/includes/template.php	Thu Jul 03 15:08:35 2008 -0400
@@ -956,11 +956,13 @@
     //
     
     $is_opera = (isset($_SERVER['HTTP_USER_AGENT']) && strstr($_SERVER['HTTP_USER_AGENT'], 'Opera')) ? true : false;
+    $is_msie = (isset($_SERVER['HTTP_USER_AGENT']) && strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE')) ? true : false;
     
     $this->tpl_bool = Array(
       'auth_admin' => $session->user_level >= USER_LEVEL_ADMIN ? true : false,
       'user_logged_in' => $session->user_logged_in,
       'opera' => $is_opera,
+      'msie' => $is_msie
       );
     
     if ( $session->sid_super )
--- a/index.php	Wed Jul 02 22:15:55 2008 -0400
+++ b/index.php	Thu Jul 03 15:08:35 2008 -0400
@@ -19,7 +19,7 @@
   define('ENANO_INTERFACE_INDEX', '');
   
   // For the mighty and brave.
-  // define('ENANO_DEBUG', '');
+  define('ENANO_DEBUG', '');
  
   // Set up gzip encoding before any output is sent
   
--- a/themes/oxygen/header.tpl	Wed Jul 02 22:15:55 2008 -0400
+++ b/themes/oxygen/header.tpl	Thu Jul 03 15:08:35 2008 -0400
@@ -4,6 +4,9 @@
     <title>{PAGE_NAME} &bull; {SITE_NAME}</title>
     <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
     <link rel="stylesheet" type="text/css" href="{SCRIPTPATH}/includes/clientside/css/enano-shared.css" />
+    <!-- BEGIN msie -->
+    <link rel="stylesheet" type="text/css" href="{SCRIPTPATH}/includes/clientside/css/enano-shared.css" />
+    <!-- END msie -->
     <link id="mdgCss" rel="stylesheet" href="{SCRIPTPATH}/themes/{THEME_ID}/css/{STYLE_ID}.css" type="text/css" />
     {JS_DYNAMIC_VARS}