SourceForge logo
SourceForge logo
Menu

phpwiki-checkins

From: Reini U. <ru...@us...> - 2005年07月24日 09:51:30
Update of /cvsroot/phpwiki/phpwiki/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8396/lib
Modified Files:
	Theme.php 
Log Message:
guard doubleClickEdit for unittests, add AcDropDown support
Index: Theme.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/Theme.php,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -2 -b -p -d -r1.131 -r1.132
--- Theme.php	10 Jun 2005 06:09:06 -0000	1.131
+++ Theme.php	24 Jul 2005 09:51:22 -0000	1.132
@@ -200,16 +200,21 @@ class Theme {
 $this->_theme = "themes/$theme_name";
 
+ if ($theme_name != 'default')
+ $this->_default_theme = new Theme;
+
 // by pixels
- if ($GLOBALS['request']->getPref('doubleClickEdit')
+ if ((is_object($GLOBALS['request']) // guard against unittests
+ and $GLOBALS['request']->getPref('doubleClickEdit'))
 or ENABLE_DOUBLECLICKEDIT)
 $this->initDoubleClickEdit();
 
- if ($theme_name != 'default')
- $this->_default_theme = new Theme;
-
 // will be replaced by acDropDown
 if (ENABLE_LIVESEARCH) { // by bitflux.ch
 $this->initLiveSearch();
 }
+ // replaces external LiveSearch
+ if (defined("ENABLE_ACDROPDOWN") and ENABLE_ACDROPDOWN) { 
+ $this->initMoAcDropDown();
+ }
 $this->_css = array();
 }
@@ -1096,5 +1101,5 @@ class Theme {
 var $_MoreHeaders = array();
 function addMoreHeaders ($element) {
- array_push($this->_MoreHeaders,$element);
+ array_push($this->_MoreHeaders, $element);
 }
 function getMoreHeaders () {
@@ -1177,6 +1182,6 @@ class Theme {
 }
 
- // Immediate title search results via XMLHttpRequest
- // by Bitflux GmbH, bitflux.ch. You need to install the livesearch.js seperately
+ // Immediate title search results via XMLHTML(HttpRequest
+ // by Bitflux GmbH, bitflux.ch. You need to install the livesearch.js seperately.
 // Google's or acdropdown is better.
 function initLiveSearch() {
@@ -1190,4 +1195,22 @@ class Theme {
 }
 }
+
+ // Immediate title search results via XMLHttpRequest
+ // using the shipped moacdropdown js-lib
+ function initMoAcDropDown() {
+ if (!$this->HTML_DUMP_SUFFIX) {
+ $dir = $this->_findData('moacdropdown');
+ // if autocomplete_remote is used:
+ foreach (array("mobrowser.js","modomevent.js","modomt.js",
+ "modomext.js","xmlextras.js") as $js) 
+ {
+ $this->addMoreHeaders(JavaScript('', array('src' => "$dir/js/$js")));
+ }
+ $this->addMoreHeaders(JavaScript('', array('src' => "$dir/js/acdropdown.js")));
+ //$this->addMoreHeaders($this->_CSSlink(0, 
+ // $this->_findFile('moacdropdown/css/dropdown.css'), 'all'));
+ $this->addMoreHeaders(HTML::style(" @import url( $dir/css/dropdown.css );\n"));
+ }
+ }
 };
 
@@ -1443,4 +1466,7 @@ function listAvailableLanguages() {
 
 // $Log$
+// Revision 1.132 2005年07月24日 09:51:22 rurban
+// guard doubleClickEdit for unittests, add AcDropDown support
+//
 // Revision 1.131 2005年06月10日 06:09:06 rurban
 // enable getPref('doubleClickEdit')
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /