summaryrefslogtreecommitdiff
path: root/edit_book.php
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2007-11-08 21:59:36 +0000
committerMax Kremmel <xing@synapse.plus.com>2007-11-08 21:59:36 +0000
commit049a40b47819a4ea9f144797055cf787976dc840 (patch)
tree87d11c819018895eaef1d69e7116d9b28eb4ed8f /edit_book.php
parent0553dc86fff37292517e181a689336a19ba793a2 (diff)
downloadwiki-049a40b47819a4ea9f144797055cf787976dc840.tar.gz
wiki-049a40b47819a4ea9f144797055cf787976dc840.tar.bz2
wiki-049a40b47819a4ea9f144797055cf787976dc840.zip
massive update to javascript and css file loading. main aim is to reduce the number of HTTP requests to speed up page loading times. speedup should be quite prominent in our favoutire browser.
to load javascirpt files use: $gBitThemes->loadJavascript( '/full/path/to/javascript/file.js', <boolean: compress javascript> ); to load css files use: $gBitThemes->loadCss( '/full/path/to/javascript/file.css' ); if you have a relative path in your css file such as 'background-image: url( images/foo.png );', this method of loading will not work.
Diffstat (limited to 'edit_book.php')
-rw-r--r--edit_book.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/edit_book.php b/edit_book.php
index 5cef669..bbb02f7 100644
--- a/edit_book.php
+++ b/edit_book.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/edit_book.php,v 1.11 2007/10/25 20:43:02 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/edit_book.php,v 1.12 2007/11/08 21:59:36 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
*
- * $Id: edit_book.php,v 1.11 2007/10/25 20:43:02 squareing Exp $
+ * $Id: edit_book.php,v 1.12 2007/11/08 21:59:36 squareing Exp $
* @package wiki
* @subpackage functions
*/
@@ -97,8 +97,14 @@ if( isset($_REQUEST["createstructure"]) ) {
$_REQUEST['content_type_guid'] = !isset( $_REQUEST['content_type_guid'] ) ? 'bitpage' : $_REQUEST['content_type_guid'];
// verify the book permission on structure load
$verifyStructurePermission = 'p_wiki_admin_book';
- // load the javascript dynamic tree
- $gBitSmarty->assign( "loadDynamicTree", TRUE );
+
+ // we need to load some javascript and css for this page
+ $gBitThemes->loadCss( UTIL_PKG_PATH.'javascript/libs/mygosu/DynamicTree.css' );
+ if( $gSniffer->_browser_info['browser'] == 'ie' && $gSniffer->_browser_info['maj_ver'] == 5 ) {
+ $gBitThemes->loadJavascript( UTIL_PKG_PATH.'javascript/libs/mygosu/ie5.js' );
+ }
+ $gBitThemes->loadJavascript( UTIL_PKG_PATH.'javascript/libs/mygosu/DynamicTreeBuilder.js' );
+
// set the correct display template
$mid = 'bitpackage:wiki/edit_book.tpl';
include_once( LIBERTY_PKG_PATH.'edit_structure_inc.php');