Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1583)
+++ branches/2.8.x/CHANGELOG	(revision 1584)
@@ -12,6 +12,8 @@
 
 =========================== add small Features 2.8.2 ==========================
 19 Jan-2012 Build 1583 Dietmar Woellbrink (Luisehahne)
+! form module, shows email-adress from body tag
+- remove scrollable table in overview form module 
 ! forgot upload save.php in wysiwyg module
 19 Jan-2012 Build 1582 Dietmar Woellbrink (Luisehahne)
 # wysiwyg module, fix issues with magic_quote_gpc if on
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1583)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1584)
@@ -52,5 +52,5 @@
 
 // check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
 if(!defined('VERSION')) define('VERSION', '2.8.2');
-if(!defined('REVISION')) define('REVISION', '1583');
+if(!defined('REVISION')) define('REVISION', '1584');
 if(!defined('SP')) define('SP', 'SP2');
Index: branches/2.8.x/wb/modules/form/backend.js
===================================================================
--- branches/2.8.x/wb/modules/form/backend.js	(revision 1583)
+++ branches/2.8.x/wb/modules/form/backend.js	(nonexistent)
@@ -1,186 +0,0 @@
-/**
- *
- *  Scrollable HTML table
- *  http://www.webtoolkit.info/
- *  for Chrome, Safari, Opera
- *  http://s7u.blogspot.com/
- **/
-
- function ScrollableTable (tableEl, tableHeight, tableWidth) {
-  tableHeight = tableHeight * screen.height * 0.01;
-  this.initIEengine = function () {
-
-   this.containerEl.style.overflowY = 'auto';
-   if (this.tableEl.parentElement.clientHeight - this.tableEl.offsetHeight < 0) {
-    this.tableEl.style.width = this.newWidth - this.scrollWidth +'px';
-   } else {
-    this.containerEl.style.overflowY = 'auto';
-    this.containerEl.style.overflowX = 'hidden';
-    this.tableEl.style.width = this.newWidth +'px';
-   }
-
-   if (this.thead) {
-    var trs = this.thead.getElementsByTagName('tr');
-    for (x=0; x < trs.length; x++) {
-     trs[x].style.position ='relative';
-     trs[x].style.setExpression("top",  "this.parentElement.parentElement.parentElement.scrollTop + 'px'");
-    }
-   }
-
-   if (this.tfoot) {
-    var trs = this.tfoot.getElementsByTagName('tr');
-    for (x=0; x < trs.length; x++) {
-     trs[x].style.position ='relative';
-     trs[x].style.setExpression("bottom",  "(this.parentElement.parentElement.offsetHeight - this.parentElement.parentElement.parentElement.clientHeight - this.parentElement.parentElement.parentElement.scrollTop) + 'px'");
-    }
-   }
-
-   eval("window.attachEvent('onresize', function () { document.getElementById('" + this.tableEl.id + "').style.visibility = 'hidden'; document.getElementById('" + this.tableEl.id + "').style.visibility = 'visible'; } )");
-  };
-
-
-  this.initFFengine = function () {
-   this.containerEl.style.overflow = 'hidden';
-   this.tableEl.style.width = this.newWidth + 'px';
-   var headHeight = (this.thead) ? this.thead.clientHeight : 0;
-   var footHeight = (this.tfoot) ? this.tfoot.clientHeight : 0;
-
-
-   var bodyHeight = this.tbody.clientHeight;
-   var trs = this.tbody.getElementsByTagName('tr');
-   if (bodyHeight >= (this.newHeight - (headHeight + footHeight))) {
-     this.tbody.style.overflow = 'scroll';
-   }
-   else {
-  this.tbody.style.overflow = 'auto';
-   }
-   /*
-    Chrome is built on Mozilla. Some script to assign width for tables dynamically.
-   */
- var isChrome = (navigator.userAgent.toUpperCase().indexOf('MOZILLA')> -1 || navigator.userAgent.toUpperCase().indexOf('OPERA')> -1);
-
-   if(isChrome){
-    this.thead.style.display ="inline-block";
-    this.tfoot.style.display ="inline-block";
-    this.tbody.style.display ="inline-block";
-    this.tbody.style.overflow ="auto";
-
-
-    var count = trs[0].getElementsByTagName('th').length || trs[0].getElementsByTagName('td').length;
-    var colArray = new Array(count);
-
-    /*Thead*/
-    trs = this.tableEl.getElementsByTagName('tr');
-    for(var i=0; i < trs.length ; i++ ){
-     var cols = trs[i].getElementsByTagName('th') || trs[i].getElementsByTagName('td');
-     for(var j=0; j < cols.length ; j++){
-      if(colArray[j]==null || colArray[j] < cols[j].clientWidth){
-       colArray[j] =cols[j].clientWidth;
-      }
-     }
-    }
-
-    var sumArray=0;
-    for(i =0; i < colArray.length; i++){
-     sumArray += colArray[i];
-    }
-
-    /* if the width of any cell is greater */
-    if (sumArray < (this.newWidth - this.scrollWidth)){
-     var newCount =0;
-     var nWidth =0;
-     for(i =0; i < colArray.length; i++){
-      var wid = (this.newWidth - this.scrollWidth)/count;
-      if(wid < colArray[i]){
-       newCount++;
-       nWidth += colArray[i];
-      }
-     }
-     var newWid = ((this.newWidth - this.scrollWidth) - nWidth)/(count-newCount);
-     for(i =0; i < colArray.length; i++){
-      var wid = (this.newWidth - this.scrollWidth)/count;
-      if(wid >= colArray[i]){
-       colArray[i]= newWid;
-      }
-     }
-    }
-
-    /*Thead */
-    trs = this.thead.getElementsByTagName('tr');
-    for(var i=0; i < trs.length ; i++ ){
-     var cols = trs[i].getElementsByTagName('th')||trs[i].getElementsByTagName('td');
-     for(var j=0; j < cols.length ; j++){
-      cols[j].style.width = colArray[j] + 'px';
-     }
-     var tcell1 = trs[i].insertCell(cols.length);
-     tcell1.setAttribute("width", this.scrollWidth -2 +'px' );
-    }
-    /*Tbody */
-    trs = this.tbody.getElementsByTagName('tr');
-    for(var i=0; i < trs.length ; i++ ){
-     var cols = trs[i].getElementsByTagName('td');
-     for(var j=0; j < cols.length ; j++){
-      cols[j].style.width = colArray[j] + 'px';
-     }
-    }
-    /*Tfoot */
-    trs = this.tfoot.getElementsByTagName('tr');
-    for(var i=0; i < trs.length ; i++ ){
-     var cols = trs[i].getElementsByTagName('th')||trs[i].getElementsByTagName('td');
-     for(var j=0; j < cols.length ; j++){
-      cols[j].style.width = colArray[j] + 'px';
-     }
-     var tcell1 = trs[i].insertCell(cols.length);
-     tcell1.setAttribute("width", this.scrollWidth -2 +'px');
-    }
-
-   }
-   else{ // else block is for Firefox
-    trs = this.tbody.getElementsByTagName('tr');
-    for (x=0; x < trs.length; x++) {
-     var tds = trs[x].getElementsByTagName('td');
-     tds[tds.length-1].style.paddingRight += this.scrollWidth + 'px';
-    }
-
-   }
-
-   var cellSpacing = (this.tableEl.offsetHeight - (this.tbody.clientHeight + headHeight + footHeight)) / 4;
-   this.tbody.style.height = (this.newHeight - (headHeight + cellSpacing * 2) - (footHeight + cellSpacing * 2)) + 'px';
-
-  };
-
-  this.tableEl = tableEl;
-  this.scrollWidth = 16;
-
-  this.originalHeight = this.tableEl.clientHeight;
-  this.originalWidth = this.tableEl.clientWidth;
-
-  this.newHeight = parseInt(tableHeight);
-  this.newWidth = tableWidth ? parseInt(tableWidth) : this.originalWidth;
-
-  this.tableEl.style.height = 'auto';
-  this.tableEl.removeAttribute('height');
-
-  this.containerEl = this.tableEl.parentNode.insertBefore(document.createElement('div'), this.tableEl);
-  this.containerEl.appendChild(this.tableEl);
-  this.containerEl.style.height = this.newHeight + 'px';
-  this.containerEl.style.width = this.newWidth + 'px';
-
-
-  var thead = this.tableEl.getElementsByTagName('thead');
-  this.thead = (thead[0]) ? thead[0] : null;
-
-  var tfoot = this.tableEl.getElementsByTagName('tfoot');
-  this.tfoot = (tfoot[0]) ? tfoot[0] : null;
-
-  var tbody = this.tableEl.getElementsByTagName('tbody');
-  this.tbody = (tbody[0]) ? tbody[0] : null;
-
-  if (!this.tbody) return;
-   this.containerEl.style.overflow = 'auto';
-
-  if (document.all && document.getElementById && !window.opera) this.initIEengine();
-  if (!document.all && document.getElementById ) this.initFFengine();
-
-
- }

Property changes on: branches/2.8.x/wb/modules/form/backend.js
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/modules/form/view.php
===================================================================
--- branches/2.8.x/wb/modules/form/view.php	(revision 1583)
+++ branches/2.8.x/wb/modules/form/view.php	(revision 1584)
@@ -469,7 +469,10 @@
 						$sql .= 'submitted_by=\''.$submitted_by.'\', ';
 						$sql .= 'body=\''.$email_body.'\' ';
 						if($database->query($sql)) {
-/*
+
+						if(!$database->is_error()) {
+							$success = true;
+						}
 						// Make sure submissions table isn't too full
 						$query_submissions = $database->query("SELECT submission_id FROM ".TABLE_PREFIX."mod_form_submissions ORDER BY submitted_when");
 						$num_submissions = $query_submissions->numRows();
@@ -484,10 +487,6 @@
 								}
 							}
 						}
-*/
-						if(!$database->is_error()) {
-							$success = true;
-						}
 					}  // numRows
 	 			}
 	 			}
Index: branches/2.8.x/wb/modules/form/modify.php
===================================================================
--- branches/2.8.x/wb/modules/form/modify.php	(revision 1583)
+++ branches/2.8.x/wb/modules/form/modify.php	(revision 1584)
@@ -29,6 +29,10 @@
 	ini_set('arg_separator.output', '&amp;');
 }
 
+// load module language file
+$lang = (dirname(__FILE__)) . '/languages/' . LANGUAGE . '.php';
+require_once(!file_exists($lang) ? (dirname(__FILE__)) . '/languages/EN.php' : $lang );
+
 include_once(WB_PATH.'/framework/functions.php');
 
 $sec_anchor = (defined( 'SEC_ANCHOR' ) && ( SEC_ANCHOR != '' )  ? '#'.SEC_ANCHOR.$section['section_id'] : '' );
@@ -43,7 +47,7 @@
 }
 
 ?>
-<table summary="" cellpadding="0" cellspacing="0" border="0" width="916">
+<table summary="" width="100%" cellpadding="0" cellspacing="0" border="0" width="916">
 <tr>
 	<td align="left" width="33%">
 		<input type="button" value="<?php echo $TEXT['ADD'].' '.$TEXT['FIELD']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/form/add_field.php?page_id=<?php echo $page_id; ?>&amp;section_id=<?php echo $section_id; ?>';" style="width: 100%;" />
@@ -68,7 +72,7 @@
 		$num_fields = $query_fields->numRows();
 		$row = 'a';
 		?>
-		<table summary="" cellpadding="2" cellspacing="0" border="0">
+		<table summary="" width="100%" cellpadding="2" cellspacing="0" border="0">
 		<thead>
 			<tr style="background-color: #dddddd; font-weight: bold;">
 				<th width="20" style="padding-left: 5px;">&nbsp;</th>
@@ -194,7 +198,7 @@
 $sql .= 'WHERE `section_id` = '.(int)$section_id.' ';
 $sql .= 'ORDER BY `submitted_when` ASC ';
 */
-$sql  = 'SELECT s.*, u.`display_name` ';
+$sql  = 'SELECT s.*, u.`display_name`, u.`email` ';
 $sql .=            'FROM `'.TABLE_PREFIX.'mod_form_submissions` s ';
 $sql .= 'LEFT OUTER JOIN `'.TABLE_PREFIX.'users` u ';
 $sql .= 'ON u.`user_id` = s.`submitted_by` ';
@@ -204,7 +208,7 @@
 if($query_submissions = $database->query($sql)) {
 ?>
 <!-- submissions -->
-		<table summary="" cellpadding="2" cellspacing="0" border="0" class="" id="frm-ScrollTable" >
+		<table summary="" width="100%" cellpadding="2" cellspacing="0" border="0" class="" id="frm-ScrollTable" >
 		<thead>
 		<tr style="background-color: #dddddd; font-weight: bold;">
 			<th width="23" style="text-align: center;">&nbsp;</th>
@@ -211,7 +215,7 @@
 			<th width="33" style="text-align: right;"> ID </th>
 			<th width="250" style="padding-left: 10px;"><?php echo $TEXT['SUBMITTED'] ?></th>
 			<th width="240" style="padding-left: 10px;"><?php echo $TEXT['USER']; ?></th>
-			<th width="250">&nbsp;</th>
+			<th width="250"><?php echo $TEXT['EMAIL'].' '.$MOD_FORM['FROM'] ?></th>
 			<th width="20">&nbsp;</th>
 			<th width="20">&nbsp;</th>
 			<th width="20">&nbsp;</th>
@@ -224,7 +228,11 @@
 		// List submissions
 		$row = 'a';
 		while($submission = $query_submissions->fetchRow(MYSQL_ASSOC)) {
-        $submission['display_name'] = (($submission['display_name']!=null) ? $submission['display_name'] : $TEXT['UNKNOWN']);
+	        $submission['display_name'] = (($submission['display_name']!=null) ? $submission['display_name'] : '');
+			$sBody = $submission['body'];
+			$regex = "/[a-z0-9\-_]?[a-z0-9.\-_]+[a-z0-9\-_]?@[a-z0-9.-]+\.[a-z]{2,}/iU";
+			preg_match ($regex, $sBody, $output);
+			$submission['email'] = $output['0'];
 ?>
 			<tr class="row_<?php echo $row; ?>">
 				<td width="20" style="padding-left: 5px;text-align: center;">
@@ -235,7 +243,7 @@
 				<td width="30" style="padding-right: 5px;text-align: right;"><?php echo $submission['submission_id']; ?></td>
 				<td width="250" style="padding-left: 10px;"><?php echo gmdate(DATE_FORMAT.', '.TIME_FORMAT, $submission['submitted_when']+TIMEZONE ); ?></td>
 				<td width="250" style="padding-left: 10px;"><?php echo $submission['display_name']; ?></td>
-				<td width="240">&nbsp;</td>
+				<td width="240"><?php echo $submission['email']; ?></td>
 				<td width="20" style="text-align: center;">&nbsp;</td>
 				<td width="20">&nbsp;</td>
 				<td width="20" style="text-align: center;">
@@ -269,7 +277,7 @@
 			<th width="33" style="text-align: right;"> ID </th>
 			<th width="250" style="padding-left: 10px;"><?php echo $TEXT['SUBMITTED'] ?></th>
 			<th width="250" style="padding-left: 10px;"><?php echo $TEXT['USER']; ?></th>
-			<th width="250">&nbsp;</th>
+			<th width="250"><?php echo $TEXT['EMAIL'].' '.$MOD_FORM['FROM'] ?></th>
 			<th width="20">&nbsp;</th>
 			<th width="20">&nbsp;</th>
 			<th width="20">&nbsp;</th>
@@ -282,7 +290,3 @@
 	echo $database->get_error().'<br />';
 	echo $sql;
 }
-?>
-<script type="text/javascript">
-var t = new ScrollableTable(document.getElementById('frm-ScrollTable'), 30, 916);
-</script>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/form/backend.css
===================================================================
--- branches/2.8.x/wb/modules/form/backend.css	(revision 1583)
+++ branches/2.8.x/wb/modules/form/backend.css	(revision 1584)
@@ -9,7 +9,7 @@
 */
 input.mod_form_edit_css { color :#000000; background-color :#f0f0f0; border :1px solid #808080; padding :2px; margin :0; margin-left :625px; margin-top :-20px; margin-bottom :5px; width :110px; }
 
-
+/*
   table#frm-ScrollTable { text-align :left; font-size :12px; border :1px ridge #dadada; font-family :verdana; background :transparent; color :#0066ff; }
   table#frm-ScrollTable thead  { cursor :pointer; }
   table#frm-ScrollTable thead tr,
@@ -16,3 +16,4 @@
   table#frm-ScrollTable tfoot tr { background :transparent; }
   table#frm-ScrollTable tbody tr {  }
   td, th { border :0px ridge #dadada; }
+*/
\ No newline at end of file
Index: branches/2.8.x/wb/modules/form
===================================================================
--- branches/2.8.x/wb/modules/form	(revision 1583)
+++ branches/2.8.x/wb/modules/form	(revision 1584)

Property changes on: branches/2.8.x/wb/modules/form
___________________________________________________________________
Modified: svn:ignore
## -1 +1,2 ##
 SimpleMailException.php
+backend.js
