svn: /web/doc-editor/trunk/ index.php php/html.templates.php

[email protected] (Yannick Torres)
Newsgroups php.doc.web
Message-ID <[email protected]>
yannick                                  Sun, 21 Feb 2010 16:59:48 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=295304

Log:
Use cachefly.net for ExtJs files

Changed paths:
    U   web/doc-editor/trunk/index.php
    U   web/doc-editor/trunk/php/html.templates.php

Modified: web/doc-editor/trunk/index.php
===================================================================
--- web/doc-editor/trunk/index.php	2010-02-21 13:27:48 UTC (rev 295303)
+++ web/doc-editor/trunk/index.php	2010-02-21 16:59:48 UTC (rev 295304)
@@ -39,12 +39,12 @@
 // Log the user in if needed
 if (!isset($_SESSION['userID'])) {
     echo headerTemplate();
-    echo cssLoadTemplate('js/extjs/resources/css/ext-all.css');
+    echo cssLoadTemplate('http://extjs.cachefly.net/ext-3.1.1/resources/css/ext-all.css');
     echo cssLoadTemplate('themes/login-all.css');
     echo jsCallTemplate('document.getElementById("loading-msg").innerHTML = "Loading Core API...";');
-    echo jsLoadTemplate('js/extjs/adapter/ext/ext-base.js');
+    echo jsLoadTemplate('http://extjs.cachefly.net/ext-3.1.1/adapter/ext/ext-base.js');
     echo jsCallTemplate('document.getElementById("loading-msg").innerHTML = "Loading UI Components...";');
-    echo jsLoadTemplate('js/extjs/ext-all.js');
+    echo jsLoadTemplate('http://extjs.cachefly.net/ext-3.1.1/ext-all.js');
     echo jsCallTemplate('document.getElementById("loading-msg").innerHTML = "Initializing...";');
     echo jsLoadTemplate('js/login-all.js');
     echo jsCallTemplate($directAccess);
@@ -53,15 +53,15 @@
 }

 echo headerTemplate();
-echo cssLoadTemplate('js/extjs/resources/css/ext-all.css', 'extTheme');
+echo cssLoadTemplate('http://extjs.cachefly.net/ext-3.1.1/resources/css/ext-all.css', 'extTheme');
 echo cssLoadTemplate('themes/empty.css', 'appTheme');
 echo cssLoadTemplate('themes/main-all.css');

 // ExtJs Javascript core files
 echo jsCallTemplate('document.getElementById("loading-msg").innerHTML = "Loading Core API...";');
-echo jsLoadTemplate('js/extjs/adapter/ext/ext-base.js');
+echo jsLoadTemplate('http://extjs.cachefly.net/ext-3.1.1/adapter/ext/ext-base.js');
 echo jsCallTemplate('document.getElementById("loading-msg").innerHTML = "Loading UI Components...";');
-echo jsLoadTemplate('js/extjs/ext-all.js');
+echo jsLoadTemplate('http://extjs.cachefly.net/ext-3.1.1/ext-all.js');

 // Ext.ux Javascript files
 echo jsCallTemplate('document.getElementById("loading-msg").innerHTML = "Initializing...";');

Modified: web/doc-editor/trunk/php/html.templates.php
===================================================================
--- web/doc-editor/trunk/php/html.templates.php	2010-02-21 13:27:48 UTC (rev 295303)
+++ web/doc-editor/trunk/php/html.templates.php	2010-02-21 16:59:48 UTC (rev 295304)
@@ -68,9 +68,9 @@
     $return='';

     //i18n for ExtJs library
-    if( is_file('js/extjs/src/locale/ext-lang-'.$_SESSION['lang'].'.js') )
+    if( @file_get_contents('http://extjs.cachefly.net/ext-3.1.1/src/locale/ext-lang-'.$_SESSION['lang'].'.js') )
     {
-        $return.= sprintf('  <script type="text/javascript" src="%s"></script>', 'js/extjs/src/locale/ext-lang-'.$_SESSION['lang'].'.js') . "\n";
+        $return.= sprintf('  <script type="text/javascript" src="%s"></script>', 'http://extjs.cachefly.net/ext-3.1.1/src/locale/ext-lang-'.$_SESSION['lang'].'.js') . "\n";
     }

     //i18n for the UI
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.