[evolvis-commits] r17687: theme-evolvis pending merges:↵ Thorsten Glaser 2011-11-02 add missing code↵ Thorsten Glaser 2011-11-02 call jQuery.noConflict immediately after loading jQuery↵ Thorsten Glaser 2011-11-02 make the XHTML easier to read

mirabilos at evolvis.org mirabilos at evolvis.org
Wed Nov 2 15:07:46 CET 2011


Author: mirabilos
Date: 2011-11-02 15:07:46 +0100 (Wed, 02 Nov 2011)
New Revision: 17687

Added:
   trunk/gforge_base/evolvisforge-5.1/src/www/js/jquery_noconflict.js
Modified:
   trunk/gforge_base/evolvisforge-5.1/src/debian/changelog
   trunk/gforge_base/evolvisforge-5.1/src/www/include/Layout.class.php
   trunk/gforge_base/evolvisforge-5.1/src/www/include/html.php
   trunk/gforge_base/evolvisforge-5.1/src/www/themes/tests/jstest.php
Log:
theme-evolvis pending merges:
  Thorsten Glaser 2011-11-02 add missing code
    Thorsten Glaser 2011-11-02 call jQuery.noConflict immediately after loading jQuery
    Thorsten Glaser 2011-11-02 make the XHTML easier to read


Modified: trunk/gforge_base/evolvisforge-5.1/src/debian/changelog
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/debian/changelog	2011-11-02 14:07:42 UTC (rev 17686)
+++ trunk/gforge_base/evolvisforge-5.1/src/debian/changelog	2011-11-02 14:07:46 UTC (rev 17687)
@@ -30,7 +30,7 @@
   * [#1850] Fix merge glitch
   * [#1859] [#1906] Port code from Evolvis 4.8 to 5.1
 
- -- Thorsten Glaser <t.glaser at tarent.de>  Wed, 02 Nov 2011 11:57:56 +0100
+ -- Thorsten Glaser <t.glaser at tarent.de>  Wed, 02 Nov 2011 14:10:17 +0100
 
 fusionforge (5.1.1-1+) UNRELEASED; urgency=low
 

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/include/Layout.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/include/Layout.class.php	2011-11-02 14:07:42 UTC (rev 17686)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/include/Layout.class.php	2011-11-02 14:07:46 UTC (rev 17687)
@@ -152,7 +152,6 @@
 			$this->jsdir = $this->themedir;
 			$this->jsbaseurl = $this->themeurl;
 		}
-		$this->has_jquery = false;
 
 		$this->addStylesheet('/themes/css/fusionforge.css');
 
@@ -206,9 +205,9 @@
 	function getJavascripts() {
 		$code = '';
 		foreach ($this->javascripts as $js) {
-			$code .= "\n\t" .
+			$code .= "\t" .
 			    '<script type="text/javascript" src="' . $js .
-			    '"></script>';
+			    '"></script>' . "\n";
 		}
 		return $code;
 	}
@@ -345,20 +344,6 @@
 
 		/* now emit all those from addJavascript() et al. */
 		echo $this->getJavascripts();
-
-		/*
-		 * switch jQuery into no conflict mode, i.e. do not let
-		 * it possess the dollar sign function; according to the
-		 * docs, this must come after both jQuery and Prototype
-		 * have been loaded, not before (why?)
-		 */
-		if ($this->has_jquery) {
-?>
-	<script language="JavaScript" type="text/javascript">//<![CDATA[
-		jQuery.noConflict();
-	//]]></script>
-<?php
-		}
 	}
 
 	function headerForgepluckerMeta() {

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/include/html.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/include/html.php	2011-11-02 14:07:42 UTC (rev 17686)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/include/html.php	2011-11-02 14:07:46 UTC (rev 17687)
@@ -359,7 +359,7 @@
 
 function html_use_jquery() {
 	use_javascript('/scripts/jquery/jquery.min.js');
-	$GLOBALS['HTML']->has_jquery = true;
+	use_javascript('/js/jquery_noconflict.js');
 }
 
 function html_use_tooltips() {

Added: trunk/gforge_base/evolvisforge-5.1/src/www/js/jquery_noconflict.js
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/js/jquery_noconflict.js	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/js/jquery_noconflict.js	2011-11-02 14:07:46 UTC (rev 17687)
@@ -0,0 +1,9 @@
+/*
+ * switch jQuery into no conflict mode, i.e. do not let
+ * it possess the dollar sign function; according to the
+ * docs, this must come after both jQuery and Prototype
+ * have been loaded, not before (why?) but apparently it
+ * should come immediately after jQuery…
+ */
+
+jQuery.noConflict();

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/themes/tests/jstest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/themes/tests/jstest.php	2011-11-02 14:07:42 UTC (rev 17686)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/themes/tests/jstest.php	2011-11-02 14:07:46 UTC (rev 17687)
@@ -104,7 +104,11 @@
 <p id="protooff">You should not see this. If you do, Prototype
  failed to hide.</p>
 <p>You should see this. There are three paragraphs above, but
- you should <em>not</em> see all of them.</p>
+ you should <em>not</em> see all of them, only one and this.</p>
+<script language="JavaScript" type="text/javascript">//<![CDATA[
+$("protoon").show();
+$("protooff").hide();
+//]]></script>
 
 <h3>DatePicker</h3>
 <form action="/" method="get">



More information about the evolvis-commits mailing list