[evolvis-commits] r17925: [#2237] theme-tracker pending merges:↵ Thorsten Glaser 2011-12-23 missing implementations for referenced styles↵ Thorsten Glaser 2011-12-23 fix some PHP warnings↵ Thorsten Glaser 2011-12-23 make the notepad window wide enough for its form content…↵ Thorsten Glaser 2011-12-23 ouchies, that was inside a callback function

mirabilos at evolvis.org mirabilos at evolvis.org
Fri Dec 23 15:30:42 CET 2011


Author: mirabilos
Date: 2011-12-23 15:30:41 +0100 (Fri, 23 Dec 2011)
New Revision: 17925

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/common/include/descriptive.php
   trunk/gforge_base/evolvisforge-5.1/src/common/include/utils.php
   trunk/gforge_base/evolvisforge-5.1/src/www/include/note.php
   trunk/gforge_base/evolvisforge-5.1/src/www/themes/css/fusionforge.css
Log:
[#2237] theme-tracker pending merges:
  Thorsten Glaser 2011-12-23 missing implementations for referenced styles
    Thorsten Glaser 2011-12-23 fix some PHP warnings
    Thorsten Glaser 2011-12-23 make the notepad window wide enough for its form content…
    Thorsten Glaser 2011-12-23 ouchies, that was inside a callback function


Modified: trunk/gforge_base/evolvisforge-5.1/src/common/include/descriptive.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/include/descriptive.php	2011-12-23 13:48:21 UTC (rev 17924)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/include/descriptive.php	2011-12-23 14:30:41 UTC (rev 17925)
@@ -304,14 +304,14 @@
  * @return	string
  *		XHTML rendition of the message body
  */
+define("SHOWMESS_FMT_INITIAL", 0);
+define("SHOWMESS_FMT_WANTPRE", 1);
+define("SHOWMESS_FMT_INPRE", 2);
+define("SHOWMESS_FMT_INPARA", 3);
 function showmess_fmt($mess) {
 	global $group_id;
 
-	define("S_INITIAL", 0);
-	define("S_WANTPRE", 1);
-	define("S_INPRE", 2);
-	define("S_INPARA", 3);
-	$state = S_INITIAL;
+	$state = SHOWMESS_FMT_INITIAL;
 	$spos = html_ap();
 	$sarr = array();
 
@@ -342,53 +342,53 @@
 		if (strpos($mess, "\t") !== false ||
 		    strpos($mess, "   ") !== false) {
 			/* but tab or three spaces in a row */
-			$state = S_WANTPRE;
+			$state = SHOWMESS_FMT_WANTPRE;
 		}
 	}
 
 	$s = "";
 	/* main parse loop */
 	foreach ($marr as $t) {
-		if ($state == S_WANTPRE) {
+		if ($state == SHOWMESS_FMT_WANTPRE) {
 			$s .= "<pre>";
-			$state = S_INPRE;
-		} else if ($state == S_INPRE && $t != /*{{{*/ "}}}") {
+			$state = SHOWMESS_FMT_INPRE;
+		} else if ($state == SHOWMESS_FMT_INPRE && $t != /*{{{*/ "}}}") {
 			$s .= "\n";
 		}
-		if ($state == S_INPRE) {
+		if ($state == SHOWMESS_FMT_INPRE) {
 			if ($t == /*{{{*/ "}}}") {
 				$s .= "</pre>\n";
-				$state = S_INITIAL;
+				$state = SHOWMESS_FMT_INITIAL;
 				continue;
 			}
 			/* fall through to main line formatter */
-		} else if ($state == S_INPARA) {
+		} else if ($state == SHOWMESS_FMT_INPARA) {
 			if (!$t) {
 				$sarr = html_a_copy($spos);
 				$s .= html_ac($spos) . "</p>\n";
-				$state = S_INITIAL;
+				$state = SHOWMESS_FMT_INITIAL;
 				continue;
 			}
 			if ($t == "{{{" /*}}}*/) {
 				$sarr = array();
 				$s .= html_ac($spos) . "</p>\n";
-				$state = S_WANTPRE;
+				$state = SHOWMESS_FMT_WANTPRE;
 				continue;
 			}
 			$s .= "<br />\n";
 		} else {
-			/* S_INITIAL */
+			/* SHOWMESS_FMT_INITIAL */
 			if (!$t) {
 				/* collapse empty lines */
 				continue;
 			}
 			if ($t == "{{{" /*}}}*/) {
 				$sarr = array();
-				$state = S_WANTPRE;
+				$state = SHOWMESS_FMT_WANTPRE;
 				continue;
 			}
 			$s .= "<p>" . html_a_apply($sarr);
-			$state = S_INPARA;
+			$state = SHOWMESS_FMT_INPARA;
 		}
 
 		/* main text conversion loop, per-line */
@@ -399,7 +399,7 @@
 			$mypcre = "\x01(?";
 			/* look for bracket-expression */
 			$mypcre .= "|" . $p_bexp;
-			if ($state != S_INPRE) {
+			if ($state != SHOWMESS_FMT_INPRE) {
 				/* look for formatting-begin */
 				$mypcre .= "|" . $p_fbeg;
 				if ($curpos > $spos) {
@@ -420,8 +420,9 @@
 
 			$mtype = 0;
 			if ($matched) {
+				$os = $matches[0][0];
 				$bs = substr($t, 0, $matches[0][1]);
-				switch ($matches[0][0][0]) {
+				switch ($os[0]) {
 				case '[':
 					$mtype = 1;
 					break;
@@ -433,11 +434,11 @@
 					break;
 				default:
 					throw new Exception("Invalid match: " .
-					    $matches[0][0]);
+					    $os);
 				}
-				$t = substr($t, $matches[0][1] +
-				    strlen($matches[0][0]));
+				$t = substr($t, $matches[0][1] + strlen($os));
 			} else {
+				$os = "";
 				$bs = $t;
 				$t = "";
 			}
@@ -561,7 +562,7 @@
 					}
 				}
 				if (!$lnk) {
-					$s .= util_html_encode($matches[0][0]);
+					$s .= util_html_encode($os);
 				} else {
 					$s .= "[" . html_e("a", array(
 						"href" => util_make_url($lnk),
@@ -585,7 +586,7 @@
 			/* none */
 			case 0:
 			default:
-				$s .= util_html_encode($matches[0][0]);
+				$s .= util_html_encode($os);
 				break;
 			}
 
@@ -594,15 +595,15 @@
 	}
 	/* handle closing all elements */
 	switch ($state) {
-	case S_INITIAL:
-	case S_WANTPRE:
+	case SHOWMESS_FMT_INITIAL:
+	case SHOWMESS_FMT_WANTPRE:
 		break;
 
-	case S_INPRE:
+	case SHOWMESS_FMT_INPRE:
 		$s .= "</pre>\n";
 		break;
 
-	case S_INPARA:
+	case SHOWMESS_FMT_INPARA:
 		$s .= html_ac($spos) . "</p>\n";
 		break;
 	}

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/include/utils.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/include/utils.php	2011-12-23 13:48:21 UTC (rev 17924)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/include/utils.php	2011-12-23 14:30:41 UTC (rev 17925)
@@ -1627,7 +1627,7 @@
 			$w = $matches[1];
 			$w = util_unconvert_htmlspecialchars($w);
 			$l = util_make_url("/plugins/mediawiki/wiki/" .
-			    $p . "/index.php/" . urlencode(strtr($w, ' ', '_')));
+			    $p . "/index.php/" . urlencode(strtr($w, " ", "_")));
 			return "[" . html_e("a", array(
 				"href" => $l,
 			    ), "wiki:" . util_html_encode($w)) . "]";

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/include/note.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/include/note.php	2011-12-23 13:48:21 UTC (rev 17924)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/include/note.php	2011-12-23 14:30:41 UTC (rev 17925)
@@ -59,7 +59,7 @@
 '                "&rows=" + rows + "&cols=" + cols;'.
 '     notepad_title = \'FusionForgeNotepad\';'.
 '     notepad_height = 700;'.
-'     notepad_width = 580;'.
+'     notepad_width = 620;'.
 '     notepad_winopt = "scrollbars=yes,resizable=yes,toolbar=no,height="+'.
 '                       notepad_height + ",width=" +  notepad_width;'.
 '    NotepadWin = window.open(notepad_url, notepad_title,'.

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/themes/css/fusionforge.css
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/themes/css/fusionforge.css	2011-12-23 13:48:21 UTC (rev 17924)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/themes/css/fusionforge.css	2011-12-23 14:30:41 UTC (rev 17925)
@@ -822,6 +822,10 @@
 	margin-bottom: 1px;
 }
 
+.showmess_fmt {
+	font-size:small;
+}
+
 /* jquery-tipsy stylesheet (modified) */
 
 .tipsy { padding: 5px; font-size: 10px; position: absolute; z-index: 100000; }
@@ -839,6 +843,10 @@
 
 /* styles for newly themed Tasks area */
 
+.item_details {
+	margin:3px 3px 0px 3px;
+}
+
 #taskContainer #taskHeader {
 	font-size:2em;
 }



More information about the evolvis-commits mailing list