Index: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG	(revision 793)
+++ trunk/CHANGELOG	(revision 794)
@@ -11,7 +11,8 @@
 ! = Update/Change
 
 ------------------------------------- 2.7.0 -------------------------------------
-02-Apr-2008 Christian Sommer
+03-Apr-2008 Christian Sommer
+!	updated edit module CSS functions to include backend.css into head if possible
 #	fixed bug in Javascript decryption routines of the Output-Filter module
 02-Apr-2008 Matthias Gallas
 #	fixed bug with registration of users are not added to signup group
Index: trunk/wb/framework/class.admin.php
===================================================================
--- trunk/wb/framework/class.admin.php	(revision 793)
+++ trunk/wb/framework/class.admin.php	(revision 794)
@@ -319,7 +319,7 @@
 		$head_links = "";
 		if($file_id == "css") {
       	$base_link = '<link href="'.WB_URL.'/modules/{MODULE_DIRECTORY}/backend.css"'; 
-			$base_link.= 'rel="stylesheet" type="text/css" media="screen" />';
+			$base_link.= ' rel="stylesheet" type="text/css" media="screen" />';
 			$base_file = "backend.css";
 		} else {
 			$base_link = '<script type="text/javascript" src="'.WB_URL.'/modules/{MODULE_DIRECTORY}/backend.js"></script>';
Index: trunk/wb/modules/form/edit_css.php
===================================================================
--- trunk/wb/modules/form/edit_css.php	(revision 793)
+++ trunk/wb/modules/form/edit_css.php	(revision 794)
@@ -87,8 +87,9 @@
 	/** 
 		MODIFY CONTENTS OF THE CSS FILE VIA TEXT AREA 
 	*/
-	// include the backend.css file if exists
-	if(file_exists(WB_PATH .'/modules/' .$mod_dir .'/backend.css')) {
+	// check if module backend.css file needs to be included into the <body>
+	if((!method_exists($admin, 'register_backend_modfiles') || !isset($_GET['page_id']))
+			&& file_exists(WB_PATH .'/modules/'.$mod_dir.'/backend.css')) {
 		echo '<style type="text/css">';
 		include(WB_PATH .'/modules/' .$mod_dir .'/backend.css');
 		echo "\n</style>\n";
Index: trunk/wb/modules/form/css.functions.php
===================================================================
--- trunk/wb/modules/form/css.functions.php	(revision 793)
+++ trunk/wb/modules/form/css.functions.php	(revision 794)
@@ -61,7 +61,7 @@
 			if(!isset($CAP_EDIT_CSS)) $CAP_EDIT_CSS	= 'Edit CSS';
 			?>
 			<form name="edit_module_file" action="<?php echo WB_URL .'/modules/' .$mod_dir .
-				'/edit_css.php';?>" method="post" style="margin: 0; align:right;">
+ 				'/edit_css.php?page_id='.$page_id;?>" method="post" style="margin: 0; align:right;">
 				<input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
 				<input type="hidden" name="section_id" value="<?php echo $section_id; ?>">
 				<input type="hidden" name="mod_dir" value="<?php echo $mod_dir; ?>">
Index: trunk/wb/modules/news/edit_css.php
===================================================================
--- trunk/wb/modules/news/edit_css.php	(revision 793)
+++ trunk/wb/modules/news/edit_css.php	(revision 794)
@@ -85,8 +85,9 @@
 	/** 
 		MODIFY CONTENTS OF THE CSS FILE VIA TEXT AREA 
 	*/
-	// include the backend.css file if exists
-	if(file_exists(WB_PATH .'/modules/' .$mod_dir .'/backend.css')) {
+	// check if module backend.css file needs to be included into the <body>
+	if((!method_exists($admin, 'register_backend_modfiles') || !isset($_GET['page_id']))
+			&& file_exists(WB_PATH .'/modules/'.$mod_dir.'/backend.css')) {
 		echo '<style type="text/css">';
 		include(WB_PATH .'/modules/' .$mod_dir .'/backend.css');
 		echo "\n</style>\n";
Index: trunk/wb/modules/news/css.functions.php
===================================================================
--- trunk/wb/modules/news/css.functions.php	(revision 793)
+++ trunk/wb/modules/news/css.functions.php	(revision 794)
@@ -61,7 +61,7 @@
 			if(!isset($CAP_EDIT_CSS)) $CAP_EDIT_CSS	= 'Edit CSS';
 			?>
 			<form name="edit_module_file" action="<?php echo WB_URL .'/modules/' .$mod_dir .
-				'/edit_css.php';?>" method="post" style="margin: 0; align:right;">
+ 				'/edit_css.php?page_id='.$page_id;?>" method="post" style="margin: 0; align:right;">
 				<input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
 				<input type="hidden" name="section_id" value="<?php echo $section_id; ?>">
 				<input type="hidden" name="mod_dir" value="<?php echo $mod_dir; ?>">
