Index: /extensions/edit_gmaps/admin/admin_edit.php
===================================================================
--- /extensions/edit_gmaps/admin/admin_edit.php	(revision 10059)
+++ /extensions/edit_gmaps/admin/admin_edit.php	(revision 10060)
@@ -5,115 +5,100 @@
 $admin_url = PHPWG_ROOT_PATH.'admin.php';
 
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+ 
+/***********************************************************************************/
+if (!defined('TOOL_KIT_PATH')) define(  'TOOL_KIT_PATH',   EDIT_CL_PATH."admin/");
+if (!defined('INCLUDE_PATH')) define(  'INCLUDE_PATH',   TOOL_KIT_PATH.'include/' );                      
+$Toolkit_Dir =INCLUDE_PATH           ;   
+ 
+include $Toolkit_Dir . 'fonctions.php';
+/***********************************************************************************/
+$info_message="" ;
+$error_message="";
+ 
+/************* Mise à jour des meta données ***************/
+if ( isset($_POST['update']) && $_POST['update']==l10n('update_exif')){
+  $exif = @read_exif_data( $exif );     
+  $exif = @array_intersect_key( $exif, array_flip( array('GPSLatitudeRef', 'GPSLatitude', 'GPSLongitudeRef', 'GPSLongitude', 'GPSAltitudeRef', 'GPSAltitude') ) );
+
+  // error_reporting ( 0 );
+  // Hide any unknown EXIF tags       
+  $GLOBALS['HIDE_UNKNOWN_TAGS'] = FALSE;
+  include $Toolkit_Dir.'Toolkit_Version.php';   // Change: added as of version 1.11
+    // Include the required files for reading and writing Photoshop File Info
+  include  $Toolkit_Dir.'JPEG.php';
+  include  $Toolkit_Dir.'XMP.php';
+  include  $Toolkit_Dir.'Photoshop_IRB.php';
+  include  $Toolkit_Dir.'EXIF.php';
+  include  $Toolkit_Dir.'GPS_File_Info.php';
+  $GLOBALS['HTTP_POST_VARS']=$_POST ;
+  // Copy all of the HTML Posted variables into an array
+  $new_ps_file_info_array = $GLOBALS['HTTP_POST_VARS'];
+  // Some characters are escaped with backslashes in HTML Posted variable
+  // Cycle through each of the HTML Posted variables, and strip out the slashes '
+  foreach( $new_ps_file_info_array as $var_key => $var_val ){ 
+    if ($var_key !="selection")
+        $new_ps_file_info_array[ $var_key ] = stripslashes( $var_val );                           
+  }         
+  $new_ps_file_info_array['selection'] = explode(";",$new_ps_file_info_array['filename']);
+  foreach( $new_ps_file_info_array['selection']  as $filename )   {
+    //======================================================
+    //= $new_ps_file_info_array[ 'filename' ];
+    if($filename!="") {   // Protect against hackers editing other files                               
+      // copy( $filename,  $filename.".bak" );  
+      $path_parts = pathinfo( $filename );    
+      if(1) {
+        if ( strcasecmp( $path_parts["extension"], "jpg" ) != 0 ) {
+          $error_message .= $filename ;					
+          $error_message .="Incorrect File Type - JPEG Only\n";
+          $filename="";
+          //  exit( );
+         }
+        // Change: removed limitation on file being in current directory - as of version 1.11
+        // Retrieve the header information
+        $jpeg_header_data = get_jpeg_header_data( $filename );
+        // Retreive the EXIF, XMP and Photoshop IRB information from
+        // the existing file, so that it can be updated
+        $Exif_array = get_EXIF_JPEG( $filename );
+        $XMP_array = read_XMP_array_from_text( get_XMP_text( $jpeg_header_data ) );
+        $IRB_array = get_Photoshop_IRB( $jpeg_header_data );
+
+        // Update the JPEG header information with the new Photoshop File Info
+        $jpeg_header_data = put_GPS_file_info( $jpeg_header_data, $new_ps_file_info_array, $Exif_array, $XMP_array, $IRB_array );
+        // Check if the Update worked
+        if ( $jpeg_header_data == FALSE ) {
+            // Update of file info didn''t work - output error message
+            $error_message .= "jpeg_header_data
+            Error - Failure update Photoshop File Info : $filename <br>\n";
+            // Output HTML with the form and data which was
+            // sent, to allow the user to fix it
+          }else if ( FALSE == put_jpeg_header_data(  $filename, $filename, $jpeg_header_data ) ) {
+            // Attempt to write the new JPEG file
+            // Writing of the new file didn''t work - output error message
+            $error_message .= "Error - Failure to write new JPEG : $filename <br>\n";
+            // Output HTML with the form and data which was
+            // sent, to allow the user to fix it
+          }else{
+            $info_message .= l10n('update') . " Exif: " . $filename . " " .  l10n('OK') ."<br />" ;
+          }    
+          $_POST['submit']= l10n('update_database') ;
+        }
+      }
+    }
+    $_POST['update'] ="ok";
+  } 
+/****************************************************************/
 if ( !isset($_GET['cat']) )   $_GET['cat'] = 'caddie';
 $_GET['mode'] = 'map';
-if (PHPWG_VERSION < 2.2 ) 
- include (PHPWG_ROOT_PATH.'admin/element_set.php');
-else 
-include (dirname(__FILE__).'\element_set.php');
-
-
- 				
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
-
-/***********************************************************************************/
-  if (!defined('TOOL_KIT_PATH')) define(  'TOOL_KIT_PATH',   EDIT_CL_PATH."admin/");
-  if (!defined('INCLUDE_PATH')) define(  'INCLUDE_PATH',   TOOL_KIT_PATH.'include/' );                      
-  $Toolkit_Dir =INCLUDE_PATH           ;   
-
-   include $Toolkit_Dir . 'fonctions.php';
-/***********************************************************************************/
-
- 
-$template->concat('TABSHEET_TITLE', ' '.l10n_dec('%d image', '%d images', count($page['cat_elements_id'])).' - '.$page['title']);
-$info_message="" ;
-$error_message="";
-
-/************* Mise à jour des meta données ***************/
-if ( isset($_POST['update']) && $_POST['update']==l10n('update_exif'))
-{
-    $exif = @read_exif_data( $exif );     
-    $exif = @array_intersect_key( $exif, array_flip( array('GPSLatitudeRef', 'GPSLatitude', 'GPSLongitudeRef', 'GPSLongitude', 'GPSAltitudeRef', 'GPSAltitude') ) );
-
-  // error_reporting ( 0 );
-  // Hide any unknown EXIF tags       
- $GLOBALS['HIDE_UNKNOWN_TAGS'] = FALSE;
-                        include $Toolkit_Dir.'Toolkit_Version.php';   // Change: added as of version 1.11
-                         // Include the required files for reading and writing Photoshop File Info
-                        include  $Toolkit_Dir.'JPEG.php';
-                        include  $Toolkit_Dir.'XMP.php';
-                        include  $Toolkit_Dir.'Photoshop_IRB.php';
-                        include  $Toolkit_Dir.'EXIF.php';
-                        include  $Toolkit_Dir.'GPS_File_Info.php';
-                        $GLOBALS['HTTP_POST_VARS']=$_POST ;
-                         // Copy all of the HTML Posted variables into an array
-                        $new_ps_file_info_array = $GLOBALS['HTTP_POST_VARS'];
-                        // Some characters are escaped with backslashes in HTML Posted variable
-                        // Cycle through each of the HTML Posted variables, and strip out the slashes '
-                        foreach( $new_ps_file_info_array as $var_key => $var_val ){ 
-                            if ($var_key !="selection")
-                                $new_ps_file_info_array[ $var_key ] = stripslashes( $var_val );  
-                         
-                         }         
-                    $new_ps_file_info_array['selection'] = explode(";",$new_ps_file_info_array['filename']);
-                    foreach( $new_ps_file_info_array['selection']  as $filename )   {
-                        //======================================================
-                        //= $new_ps_file_info_array[ 'filename' ];
-                        if($filename!="")    
-                            {       // Protect against hackers editing other files   
-                              
-                           //      copy( $filename,  $filename.".bak" );  
-                                $path_parts = pathinfo( $filename );    
-                        if(1) {
-                               if ( strcasecmp( $path_parts["extension"], "jpg" ) != 0 )
-                                    {
-						              $error_message .= $filename ;					
-                                       $error_message .="Incorrect File Type - JPEG Only\n";
-                                       $filename="";
-                                          //  exit( );
-                                    }
-                      // Change: removed limitation on file being in current directory - as of version 1.11
-                      // Retrieve the header information
-                      $jpeg_header_data = get_jpeg_header_data( $filename );
-                        // Retreive the EXIF, XMP and Photoshop IRB information from
-                        // the existing file, so that it can be updated
-                        $Exif_array = get_EXIF_JPEG( $filename );
-                        $XMP_array = read_XMP_array_from_text( get_XMP_text( $jpeg_header_data ) );
-                        $IRB_array = get_Photoshop_IRB( $jpeg_header_data );
-
-                        // Update the JPEG header information with the new Photoshop File Info
-                        $jpeg_header_data = put_GPS_file_info( $jpeg_header_data, $new_ps_file_info_array, $Exif_array, $XMP_array, $IRB_array );
-               // Check if the Update worked
-              if ( $jpeg_header_data == FALSE ) {
-                                // Update of file info didn''t work - output error message
-                        $error_message .= "jpeg_header_data
-                        Error - Failure update Photoshop File Info : $filename <br>\n";
-
-                                // Output HTML with the form and data which was
-                                // sent, to allow the user to fix it
-
-                        }else if ( FALSE == put_jpeg_header_data(  $filename, $filename, $jpeg_header_data ) )
-                        {// Attempt to write the new JPEG file
-                                // Writing of the new file didn''t work - output error message
-                           $error_message .= "Error - Failure to write new JPEG : $filename <br>\n";
-
-                                // Output HTML with the form and data which was
-                                // sent, to allow the user to fix it
-
-                        }else{
-                         $info_message .= l10n('update') . " Exif: " . $filename . " " .  l10n('OK') ."<br />" ;
-                            
-                        }    
-                        $_POST['submit']= l10n('update_database') ;
-                    }
-                }
-            }
-            //================================================
-             $_POST['update'] ="ok";
-        } 
-     
-
-        if ( isset($_POST['submit'])  ) { 
-            $collection = array();
+if (PHPWG_VERSION < 2.2 ) {
+ include (PHPWG_ROOT_PATH.'admin/element_set.php'); 				 
+ } else {
+if (!isset($page['title'])) $page['title']="";
+    include (PHPWG_ROOT_PATH.'admin/batch_manager.php');		 
+    $template->concat('TABSHEET_TITLE', ' '.l10n_dec('%d image', '%d images', count($page['cat_elements_id'])).' - '.$page['title']);
+   }    
+
+if ( isset($_POST['submit'])  ) { 
+	$collection = array();
                 if( !isset ($_POST['target'])) {
                     $_POST['submit'] = l10n('Submit') ;
@@ -122,68 +107,69 @@
                }
 
-              switch ($_POST['target'])
-              {
-                case 'all' :
-                  $collection = $page['cat_elements_id'];
-                  break;
-                case 'selection' :
-                  if (!isset($_POST['selection']) or count($_POST['selection']) == 0)
-                    array_push($page['errors'], l10n('Select at least one picture'));
-                  else
-                    $collection = $_POST['selection'];
-                  break;
-              } 
-
-            /******** Mise à jour base de données *****/
-          if (   $_POST['submit'] == l10n('update_database') )
-            {
-	          if ( count($collection)>0 )
-	          {
-		        $lat = trim($_POST['lat']);
-		        $lon = trim($_POST['lon']);
-                $alt = trim($_POST['alt']);
- 
-		        if ( strlen($lat)>0 and strlen($lon)>0 )
-		        {
-		          if ( (double)$lat<=90 and (double)$lat>=-90
-			          and (double)$lon<=180 and (double)$lat>=-180 )
-			        $update_query = 'lat='.$lat.', lon='.$lon;
-		          else
-			        $page['errors'][] = 'Invalid lat or lon value';
-		        }
-		        elseif ( strlen($lat)==0 and strlen($lon)==0 )
-		          $update_query = 'lat=NULL, lon=NULL';
-		        else
-		          $page['errors'][] = 'Both lat/lon must be empty or not empty';
-
-                if ( strlen($alt)==0) 
+  switch ($_POST['target'])
+  {
+    case 'all' :
+      $collection = $page['cat_elements_id'];
+      break;
+    case 'selection' :
+      if (!isset($_POST['selection']) or count($_POST['selection']) == 0)
+        array_push($page['errors'], l10n('Select at least one photo'));
+      else
+        $collection = $_POST['selection'];
+      break;
+  } 
+
+  /******** Mise à jour base de données *****/
+   if (   $_POST['submit'] == l10n('update_database') ){
+	if ( count($collection)>0 ){
+    $lat = trim($_POST['lat']);
+    $lon = trim($_POST['lon']);
+	$alt = trim($_POST['alt']);
+
+    if ( strlen($lat)>0 and strlen($lon)>0 ) {
+      if ( (double)$lat<=90 and (double)$lat>=-90
+          and (double)$lon<=180 and (double)$lat>=-180 )
+        $update_query = 'lat='.$lat.', lon='.$lon;
+      else
+        $page['errors'][] = 'Invalid lat or lon value';
+    }
+    elseif ( strlen($lat)==0 and strlen($lon)==0 )
+      $update_query = 'lat=NULL, lon=NULL';
+    else
+      $page['errors'][] = 'Both lat/lon must be empty or not empty';
+
+              if ( strlen($alt)==0) 
                      $update_query .= ', alt=NULL';
                   else
                      $update_query .= ', alt=' .$alt ;
 
-		        if (isset($update_query))
-		        {
-		          $update_query = '
-			        UPDATE '.IMAGES_TABLE.' SET '.$update_query.'
-			        WHERE id IN ('.implode(',',$collection).')';
-		            pwg_query($update_query);
-		            cl_meta_invalidate_cache();
-                  $info_message .= l10n('update') . " " . IMAGES_TABLE . " : " .  l10n('OK') ;
-		          $_POST['submit'] = l10n('Submit') ;
-                }
-
-	          }
-	        }
-}
-
-
-$template->append(
-  'specials',
-  array(
-		$admin_url.get_query_string_diff(array('start','cat')).'&amp;cat=caddie' => l10n('Caddie')
-    ),
-	true
-  );
-
+	if (isset($update_query)){
+      $update_query = '
+		UPDATE '.IMAGES_TABLE.' SET '.$update_query.'
+  		WHERE id IN ('.implode(',',$collection).')';
+      	pwg_query($update_query);
+		cl_meta_invalidate_cache();
+		$info_message .= l10n('update') . " " . IMAGES_TABLE . " : " .  l10n('OK') ;
+		$_POST['submit'] = l10n('Submit') ;
+     }
+    }
+  }
+ }
+/**************************************/
+$specials_selected = null;
+foreach( array('caddie'=>'Caddie', 'recent'=>'Recent photos') as $k => $v)
+{
+	$link = $admin_url.get_query_string_diff(array('start','cat')).'&amp;cat='.$k;
+	$template->append(
+		'specials',
+		array(
+			$link => l10n($v),
+			),
+		true
+		);
+	if ($k == $_GET['cat']) $specials_selected = $link;
+}
+$template->assign('specials_selected', $specials_selected);
+/****************************************/
 $query = '
 SELECT id,name,uppercats,global_rank
@@ -321,29 +307,27 @@
 if (isset($_POST['submit']) and $_POST['submit']==l10n('selection' ))
 {
-    if (isset($collection))	
-        {  $lat =1000;$first_image="";
-                           
-            foreach ($collection as $id_0)  {
-  		        foreach ($images as $image)  {
-   			        if (array_search($id_0,$image)) { 
-			            $_POST['selection'] = $collection ;   
-                        $infos_gps=  Get_exif_gps( $image['path'],$image) ;   
-                        $image['lat']=$infos_gps['lat'];
-                        $image['lon']=$infos_gps['lon'];
-                        $image['alt']=$infos_gps['alt'];    
-                        
-              if ($lat==1000) {
-			    $lat= ($image['lat'] <> '') ? $image['lat'] : '100'  ;
-				$lon= ($image['lon']  <> '') ? $image['lon'] : '3.0'  ;
-                $alt= ($image['alt']  <> '') ? $image['alt'] : '0'  ;
-				if($lat != '100') $lat=$image['lat'];
- 				//=====================================================
-				$template->assign( 'coordinates',
-				                   array('FILE' => $image['path'],
-                                         'LAT' =>   $lat  ,
+  if (isset($collection)) {  
+    $lat =1000;$first_image="";                           
+    foreach ($collection as $id_0)  {
+  		foreach ($images as $image) {
+   			if (array_search($id_0,$image)) { 
+            $_POST['selection'] = $collection ;   
+            $infos_gps=  Get_exif_gps( $image['path'],$image) ;   
+            $image['lat']=$infos_gps['lat'];
+            $image['lon']=$infos_gps['lon'];
+            $image['alt']=$infos_gps['alt']; 
+            if ($lat==1000) {
+			        $lat= ($image['lat'] <> '') ? $image['lat'] : '100'  ;
+				      $lon= ($image['lon']  <> '') ? $image['lon'] : '3.0'  ;
+              $alt= ($image['alt']  <> '') ? $image['alt'] : '0'  ;
+				      if($lat != '100') $lat=$image['lat'];
+ 				      //=====================================================
+				      $template->assign( 'coordinates',
+				             array('FILE' => $image['path'],
+                     'LAT' =>   $lat  ,
 										 'LON' =>   $lon  ,
 										 'ADRESSE' =>  $adresse ,
 										 'ZOOM' => 4,
-                                         'ALT' =>   $alt ,
+                     'ALT' =>   $alt ,
 										)
 									);
@@ -361,24 +345,22 @@
 			            $image,
       					array(
-                           'filename' =>  $image['path'],
-                           'exif' => $infos_gps['is_exif'] ,
-						   'lat'  =>    $image['lat']    ,
-						   'lon' =>     $image['lon']    ,
-                           'alt' =>     $image['alt']    , 
-                           'latDMS' =>    $latDMS[3]     ,
-                           'lonDMS' =>   "-->".$lonDMS[3]     ,
-						   'adresse' =>  $adresse   ,
-        					'U_TN' => get_thumbnail_url($image),
-        					'TITLE' => get_thumbnail_title($image),
-							'U_MAP' => cl_make_map_picture_url(
+                  'filename' =>  $image['path'],
+                  'exif' => $infos_gps['is_exif'] ,
+                  'lat'  =>    $image['lat']    ,
+                  'lon' =>     $image['lon']    ,
+                  'alt' =>     $image['alt']    , 
+                  'latDMS' =>    $latDMS[3]     ,
+                  'lonDMS' =>   "-->".$lonDMS[3]     ,
+                  'adresse' =>  $adresse   ,
+                  'U_TN' => get_thumbnail_url($image),
+                  'TITLE' => get_thumbnail_title($image),
+							    'U_MAP' => cl_make_map_picture_url(
 							                                    array(
 							                                         'image_id'=>$image['id'],
 							                                         'image_file'=>$image['file'],
 							                                         ) 
-
       						                                    ),
-								)  								
-    						);
-	 
+								  )  								
+    						);	 
 				$template->append('Selectthumbnails', $tpl_var);			
 			}
@@ -392,24 +374,14 @@
  if ( !empty($first_image))
  { $error_message .= cl_edit_controler::Memo_Vars($first_image);
- if (isset($_POST['update']))
- {
+ if (isset($_POST['update'])) {
 // document.Envoie.latDMS.value
-	
-
         $image= first_image ;
         $filename=$image['path'] ;
         $Val_exif="";
-        $Val_XMP="";    
-
-  
-      	
+        $Val_XMP="";         	
    /*  */   
      if (!empty($infos_gps)) 
      $Position = $infos_gps ;
-
      else  $Position =  Get_exif_gps($filename,$image) ;
-
-
-
 
   $jpeg_header_data = get_jpeg_header_data($filename ); 
Index: /extensions/edit_gmaps/admin/admin_edit.tpl
===================================================================
--- /extensions/edit_gmaps/admin/admin_edit.tpl	(revision 10059)
+++ /extensions/edit_gmaps/admin/admin_edit.tpl	(revision 10060)
@@ -1,6 +1,8 @@
 {html_head}
 {* $Id: admin_edit.tpl  2011-01-03   *}
-{if PHPWG_VERSION < 2.2 } {include
-file=$EDIT_CL_PATH_ABS|@cat:'header_2_1.tpl'} {else} {include file= $EDIT_CL_PATH_ABS|@cat:'header_2_2.tpl'}
+{if PHPWG_VERSION < 2.2 } 
+{include file=$EDIT_CL_PATH_ABS|@cat:'header_2_1.tpl'} 
+{else} 
+{include file= $EDIT_CL_PATH_ABS|@cat:'header_2_2.tpl'}
 {/if}
 
@@ -81,7 +83,5 @@
         | <a href="{$U_DISPLAY}&amp;display=all">{'all'|@translate}</a>
         </p>
-    </fieldset>
- {if  empty($Selectthumbnails) }{/if}
-
+    </fieldset> 
 
 <form action="" method="post" id="Envoie" name="Envoie"   >
@@ -89,7 +89,6 @@
 
 <fieldset  id="Elements"  class="fieldset">
-	<legend>{'Elements'|@translate}</legend>
-
-    {if !empty($navbar) }{include file='navigation_bar.tpl'} {/if}
+	<legend>{'Elements'|@translate}
+    {if !empty($navbar) }{include file='navigation_bar.tpl'} {/if}</legend>
         <fieldset >   
 	        <ul class="thumbnails">
@@ -121,16 +120,18 @@
         <td><label><input type="radio" name="target" value="all" /> {'all'|@translate}</label></td>
         <td><label><input type="radio" name="target" value="selection" checked="checked" /> {'selection'|@translate}</label></td>
-        <td><input class="cluetip submit " title="{'selection'|@translate}|{'hlp_line3'|@translate}." type="submit" name="submit" value="{'selection'|@translate}"  {$tag_input_enabled} /></td>
-        </table>
-    </fieldset>
+        <input class="cluetip submit" title="{'selection'|@translate}|{'hlp_line3'|@translate}." type="submit" name="submit" value="{'selection'|@translate}"   />
+</table>
+        </fieldset>
 </fieldset>
  <script>
-   {if empty($Selectthumbnails)  }
-  
-   var no_affiche=true ;
-   {else}
-   var no_affiche=false ;
-   {/if} </script>
-<fieldset   id ="geoposition"  class="fieldset">
+
+   {if empty($Selectthumbnails)  }    
+   var no_affiche="false" ;
+   {else}  
+   var no_affiche="true" ;
+   {/if} 
+   </script>
+
+<fieldset   id ="geoposition"  class="fieldset" >
 <legend>{'Selection'|@translate}</legend>
   
@@ -166,8 +167,10 @@
 		<table>
 			<td>
-			<input class="cluetip" title="{'reset'|@translate}|{'hlp_line4'|@translate}."  type="submit" name="submit" value="{'reset'|@translate}" /><br />
-			</td>
-			<td>
-			<input class="cluetip" title="{'selection'|@translate}|{'hlp_line3'|@translate}." type="submit" name="submit" value="{'selection'|@translate}" />
+			<input class="cluetip submit" title="{'reset'|@translate}|{'hlp_line4'|@translate}."
+        type="submit" name="submit" value="{'reset'|@translate}" /><br />
+			</td>
+			<td>
+			<input class="cluetip submit" title="{'selection'|@translate}|{'hlp_line3'|@translate}."
+        type="submit" name="submit" value="{'selection'|@translate}" />
 			</td>
 		</table>
@@ -233,8 +236,8 @@
 		<table>
 			<td>
-			<input class="submit cluetip" title="{'update_database'|@translate}|{'hlp_update_database'|@translate}." type="submit" value="{'update_database'|@translate}" name="submit" {$tag_input_enabled} /></td>
-			</td>
-			<td>
-			<input class="submit cluetip" title="{'update_exif'|@translate}|{'hlp_update_exif'|@translate}." type="submit" value="{'update_exif'|@translate}" name="update" {$tag_input_enabled} /></td>
+			<input class="cluetip submit" title="{'update_database'|@translate}|{'hlp_update_database'|@translate}." type="submit" value="{'update_database'|@translate}" name="submit" {$tag_input_enabled} /></td>
+			</td>
+			<td>
+			<input class="cluetip submit" title="{'update_exif'|@translate}|{'hlp_update_exif'|@translate}." type="submit" value="{'update_exif'|@translate}" name="update" {$tag_input_enabled} /></td>
 			</td>		 
         </table> 
Index: /extensions/edit_gmaps/admin/header_2_2.tpl
===================================================================
--- /extensions/edit_gmaps/admin/header_2_2.tpl	(revision 10059)
+++ /extensions/edit_gmaps/admin/header_2_2.tpl	(revision 10060)
@@ -1,5 +1,4 @@
 {combine_script id="jquery" load="header" path = $ROOT_URL|@cat:"themes/default/js/jquery.min.js "} 
-{combine_script id="jquery.cluetip" path = $ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.js" require="jquery" }
-
-{combine_script id="EDIT_RV_script" path=$EDIT_CL_PATH|@cat:"admin/js/JScript.js" require="jquery"} 
-{combine_script id="fieldset" path=$EDIT_CL_PATH|@cat:"admin/js/fieldset.js" require="jquery"} 
+{combine_script id="jquery.cluetip" path = $ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.js" require="jquery" } 
+{combine_script id="EDIT_RV_script" load="footer" path=$EDIT_CL_PATH|@cat:"admin/js/JScript.js" require="jquery"}
+ {combine_script id="fieldset" load="footer" path=$EDIT_CL_PATH|@cat:"admin/js/fieldset.js" require="jquery"}
Index: /extensions/edit_gmaps/admin/include/EXIF.php
===================================================================
--- /extensions/edit_gmaps/admin/include/EXIF.php	(revision 10059)
+++ /extensions/edit_gmaps/admin/include/EXIF.php	(revision 10060)
@@ -118,4 +118,5 @@
 function get_EXIF_JPEG( $filename )
 {
+global $error_message ;
         // Change: Added as of version 1.11
         // Check if a wrapper is being used - these are not currently supported (see notes at top of file)
@@ -123,8 +124,8 @@
         {
                 // A HTTP or FTP wrapper is being used - show a warning and abort
-                echo "HTTP and FTP wrappers are currently not supported with EXIF - See EXIF functionality documentation - a local file must be specified<br>";
-                echo "To work on an internet file, copy it locally to start with:<br><br>\n";
-                echo "\$newfilename = tempnam ( \$dir, \"tmpexif\" );<br>\n";
-                echo "copy ( \"http://whatever.com\", \$newfilename );<br><br>\n";
+                $error_message .= "HTTP and FTP wrappers are currently not supported with EXIF - See EXIF functionality documentation - a local file must be specified<br>";
+                $error_message .= "To work on an internet file, copy it locally to start with:<br><br>\n";
+                $error_message .= "\$newfilename = tempnam ( \$dir, \"tmpexif\" );<br>\n";
+                $error_message .= "copy ( \"http://whatever.com\", \$newfilename );<br><br>\n";
                 return FALSE;
         }
@@ -167,5 +168,5 @@
         {
                 // Could't open the file - exit
-                echo "<p>Could not open file $filename</p>\n";
+                $error_message .= "<p>Could not open file $filename</p>\n";
                 return FALSE;
         }
@@ -296,4 +297,5 @@
 function get_Meta_JPEG( $filename )
 {
+global $error_message ;
         // Change: Added as of version 1.11
         // Check if a wrapper is being used - these are not currently supported (see notes at top of file)
@@ -301,8 +303,8 @@
         {
                 // A HTTP or FTP wrapper is being used - show a warning and abort
-                echo "HTTP and FTP wrappers are currently not supported with Meta - See EXIF/Meta functionality documentation - a local file must be specified<br>";
-                echo "To work on an internet file, copy it locally to start with:<br><br>\n";
-                echo "\$newfilename = tempnam ( \$dir, \"tmpmeta\" );<br>\n";
-                echo "copy ( \"http://whatever.com\", \$newfilename );<br><br>\n";
+                $error_message .= "HTTP and FTP wrappers are currently not supported with Meta - See EXIF/Meta functionality documentation - a local file must be specified<br>";
+                $error_message .= "To work on an internet file, copy it locally to start with:<br><br>\n";
+                $error_message .= "\$newfilename = tempnam ( \$dir, \"tmpmeta\" );<br>\n";
+                $error_message .= "copy ( \"http://whatever.com\", \$newfilename );<br><br>\n";
                 return FALSE;
         }
@@ -345,5 +347,5 @@
         {
                 // Could't open the file - exit
-                echo "<p>Could not open file $filename</p>\n";
+                $error_message .= "<p>Could not open file $filename</p>\n";
                 return FALSE;
         }
@@ -472,4 +474,5 @@
 function get_EXIF_TIFF( $filename )
 {
+global $error_message ;
         // Change: Added as of version 1.11
         // Check if a wrapper is being used - these are not currently supported (see notes at top of file)
@@ -477,8 +480,8 @@
         {
                 // A HTTP or FTP wrapper is being used - show a warning and abort
-                echo "HTTP and FTP wrappers are currently not supported with TIFF - See EXIF/TIFF functionality documentation - a local file must be specified<br>";
-                echo "To work on an internet file, copy it locally to start with:<br><br>\n";
-                echo "\$newfilename = tempnam ( \$dir, \"tmptiff\" );<br>\n";
-                echo "copy ( \"http://whatever.com\", \$newfilename );<br><br>\n";
+                $error_message .= "HTTP and FTP wrappers are currently not supported with TIFF - See EXIF/TIFF functionality documentation - a local file must be specified<br>";
+                $error_message .= "To work on an internet file, copy it locally to start with:<br><br>\n";
+                $error_message .= "\$newfilename = tempnam ( \$dir, \"tmptiff\" );<br>\n";
+                $error_message .= "copy ( \"http://whatever.com\", \$newfilename );<br><br>\n";
                 return FALSE;
         }
@@ -491,5 +494,5 @@
         {
                 // Could't open the file - exit
-                echo "<p>Could not open file $filename</p>\n";
+                $error_message .= "<p>Could not open file $filename</p>\n";
                 return FALSE;
         }
@@ -1128,4 +1131,5 @@
 function read_Multiple_IFDs( $filehnd, $Tiff_offset, $Byte_Align, $Tag_Definitions_Name, $local_offsets = FALSE, $read_next_ptr = TRUE )
 {
+global $error_message ;
         // Start at the offset of the first IFD
         $Next_Offset = 0;
@@ -1140,5 +1144,5 @@
                 {
                         // Error seeking to position of next IFD
-                        echo "<p>Error: Corrupted EXIF</p>\n";
+                        $error_message .= "<p>Error: Corrupted EXIF</p>\n";
                         return FALSE;
                 }
@@ -1189,4 +1193,6 @@
 function read_IFD_universal( $filehnd, $Tiff_offset, $Byte_Align, $Tag_Definitions_Name, $local_offsets = FALSE, $read_next_ptr = TRUE )
 {
+global $error_message ;
+
         if ( ( $filehnd == NULL ) || ( feof( $filehnd ) ) )
         {
@@ -1210,5 +1216,5 @@
         {
                 // Huge number of entries - abort
-                echo "<p>Error: huge number of EXIF entries - EXIF is probably Corrupted</p>\n";
+                $error_message .= "<p>".$No_Entries."Error: huge number of EXIF entries - EXIF is probably Corrupted</p>\n";
 
                 return array ( FALSE , 0);
@@ -1235,5 +1241,5 @@
         {
                 // Couldn't read the IFD Data properly, Some Casio files have no Next IFD pointer, hence cause this error
-                echo "<p>Error: EXIF Corrupted</p>\n";
+                $error_message .= "<p>Error: EXIF Corrupted</p>\n";
                 return array(FALSE, 0);
         }
@@ -1291,5 +1297,5 @@
                 if ( $Data_Count > 100000 )
                 {
-                     //   echo "<p>Error: huge EXIF data count - EXIF is probably Corrupted</p>\n";
+                     //   $error_message .= "<p>Error: huge EXIF data count - EXIF is probably Corrupted</p>\n";
 
                         // Some Casio files have no Next IFD pointer, hence cause errors
@@ -2202,6 +2208,6 @@
 ******************************************************************************/
 
-function get_IFD_Data_Type( $input_data, $data_type, $Byte_Align )
-{
+function get_IFD_Data_Type( $input_data, $data_type, $Byte_Align ){
+global $error_message ;
         // Check if this is a Unsigned Byte, Unsigned Short or Unsigned Long
         if (( $data_type == 1 ) || ( $data_type == 3 ) || ( $data_type == 4 ))
@@ -2228,5 +2234,5 @@
                 // to return multiple values instead of a single value
 
-                echo "<p>Error - ASCII Strings should not be processed in get_IFD_Data_Type</p>\n";
+                $error_message .= "<p>Error - ASCII Strings should not be processed in get_IFD_Data_Type</p>\n";
                 return "Error Should never get here"; //explode( "\x00", $input_data );
         }
Index: /extensions/edit_gmaps/admin/js/JScript.js
===================================================================
--- /extensions/edit_gmaps/admin/js/JScript.js	(revision 10059)
+++ /extensions/edit_gmaps/admin/js/JScript.js	(revision 10060)
@@ -279,8 +279,8 @@
 jQuery(document).ready(function () {
 
-
     jQuery('.cluetip').cluetip({
         width: 300, height: 100,
-        splitTitle: '|'
+        splitTitle: '|',
+        clickThrough: true
     }
   );
Index: /extensions/edit_gmaps/admin/js/fieldset.js
===================================================================
--- /extensions/edit_gmaps/admin/js/fieldset.js	(revision 10059)
+++ /extensions/edit_gmaps/admin/js/fieldset.js	(revision 10060)
@@ -1,175 +1,176 @@
- if (typeof ef_animate_fast == "undefined") 
-      var ef_animate_fast =  true;
+if (typeof ef_animate_fast == "undefined")
+  var ef_animate_fast = true;
 
-      // Smart Fieldsets initialization/ 
-      if (typeof ef_plus_bullet_path == "undefined") 
-      {       
-         var ef_plus_bullet_path = './plugins/edit_gmaps/admin/icon/plus.png';
-         var ef_minus_bullet_path = './plugins/edit_gmaps/admin/icon/minus.png';
- 
-      }
+// Smart Fieldsets initialization/ 
+if (typeof ef_plus_bullet_path == "undefined") {
+  var ef_plus_bullet_path = './plugins/edit_gmaps/admin/icon/plus.png';
+  var ef_minus_bullet_path = './plugins/edit_gmaps/admin/icon/minus.png';
 
-     if (typeof ef_separator == "undefined")  
-     var ef_separator = '&nbsp;: ';
+}
 
-      function ef_reduce(fieldset_id, fast) {
-          var l_m = jQuery('#' + fieldset_id + ' legend');
-          if (ef_reduce.arguments.length < 2) fast = ef_animate_fast;
-          if (!l_m.is('.ef_command')) l_m.addClass('ef_command');
-          if (!jQuery('#' + fieldset_id).is(':hidden'))
-              l_m.trigger('ef_reduce_private', fast);
-          l_m.removeClass('ef_command');
+if (typeof ef_separator == "undefined")
+  var ef_separator = '&nbsp;: ';
 
-      }
+function ef_reduce(fieldset_id, fast) {
+  l_m = jQuery('#' + fieldset_id + ' legend');
+  if (ef_reduce.arguments.length < 2) fast = ef_animate_fast;
+  if (!l_m.is('.ef_command')) l_m.addClass('ef_command');
+  if (!jQuery('#' + fieldset_id).is(':hidden')) 
+    l_m.trigger('ef_reduce_private', fast.fast,this);
+  l_m.removeClass('ef_command');
 
-      function ef_maximize(fieldset_id, fast) {
-          var l_r = jQuery('#' + fieldset_id + '_reduced_legend');
-          if (ef_maximize.arguments.length < 2) fast = ef_animate_fast;
-          if (!l_r.is('.ef_command')) l_r.addClass('ef_command');
-          if (jQuery('#' + fieldset_id).is(':hidden'))
-              l_r.trigger('ef_maximize_private', fast);
-          l_r.removeClass('ef_command');
-      }
+}
 
-    
-      function ef_init(fieldset_id, cache_id) {
-          jQuery(document).ready(function () {
-              var f_m = jQuery('#' + fieldset_id);
-              var l_m = jQuery('#' + fieldset_id + ' legend');
-              var l_txt = l_m.text();
-              var f_r = f_m;
-              var l_r = l_m;
+function ef_maximize(fieldset_id, fast) {
+  l_r = jQuery('#' + fieldset_id + '_reduced_legend');
+  if (ef_maximize.arguments.length < 2) fast = ef_animate_fast;
+  if (!l_r.is('.ef_command')) l_r.addClass('ef_command');
+  if (jQuery('#' + fieldset_id).is(':hidden'))
+    l_r.trigger('ef_maximize_private', fast);
+  l_r.removeClass('ef_command');
+   
+}
 
-              if (ef_minus_bullet_path != '') l_m.prepend(
+var l_m, l_r;
+function ef_init(fieldset_id, cache_id) {
+  jQuery(document).ready(function () {
+    var f_m = jQuery('#' + fieldset_id);
+    l_m = jQuery('#' + fieldset_id + ' legend');
+    var l_txt = l_m.text();
+    var f_r = f_m;
+    l_r = l_m;
+
+    if (ef_minus_bullet_path != '') l_m.prepend(
           '<img alt = "" title = ""' +
           'src = "' + ef_minus_bullet_path + '"' + '>&nbsp;'
         );
-              l_m.addClass('ef_legends');
-              l_m.addClass('ef_click_ok');
-   
+    l_m.addClass('ef_legends');
+    l_m.addClass('ef_click_ok');
 
-              f_r = jQuery('#' + fieldset_id + " ").clone();
-              l_r = jQuery('#' + fieldset_id + " LEGEND").clone();
-              f_r.empty();
-              l_r.appendTo(f_r);
- 
-              f_r.attr('id', fieldset_id + '_reduced');
-              f_r.insertAfter(f_m);
-               f_r.css({display: 'none'   });
-              
-   
-              l_r.attr('id', fieldset_id + '_reduced_legend');
-              l_r.addClass('ef_legends');
-              l_r.addClass('ef_click_ok');
 
-               
+    f_r = jQuery('#' + fieldset_id + " ").clone();
+    l_r = jQuery('#' + fieldset_id + " LEGEND").clone();
+    f_r.empty();
+    l_r.appendTo(f_r);
 
-              l_r.css({                
-                  outlineColor: "invert",
-                  opacity: 0
-              });  
-                        
-     if (ef_plus_bullet_path == '') 
-         l_r.append(
+    f_r.attr('id', fieldset_id + '_reduced');
+    f_r.insertAfter(f_m);
+    f_r.css({ display: 'none' });
+
+
+    l_r.attr('id', fieldset_id + '_reduced_legend');
+    l_r.addClass('ef_legends');
+    l_r.addClass('ef_click_ok');
+
+
+
+    l_r.css({
+      outlineColor: "invert",
+      opacity: 0
+    });
+
+    if (ef_plus_bullet_path == '')
+      l_r.append(
           '<span style = "padding-left:' + l_m.css('padding-left') + ';">' +
           l_txt + '</' + 'span>' + ef_separator
          );
-              else 
-              {
+    else {
 
-              lg= jQuery(l_r).find("img") ;
-              if(lg.length>0)
-                  lg.get(0).src = ef_plus_bullet_path ;
+      lg = jQuery(l_r).find("img");
+      if (lg.length > 0)
+        lg.get(0).src = ef_plus_bullet_path;
 
-              l_r.append('&nbsp;' + ef_separator  );
-         }
+      l_r.append('&nbsp;' + ef_separator);
+    }
 
-             f_r.append('<span id="' + cache_id +'" > </span>') ;
-                   jQuery('.ef_legends').css('cursor', 'pointer');
-              l_m.bind('ef_reduce_private', function (event, fast) { // Reduce
-             
-                  if (l_m.is('.ef_command, .ef_click_ok')) {
-                      if (fast) {
-                          f_m.hide();
-                          f_r.show();
-                          f_r.find('*').css({opacity: 1});
-                      }
-                      else {
-                          f_m.find('*').not('.ef_legends, img').animate(
-                                 {opacity: 0} ,
-                                200,
+    f_r.append('<span id="' + cache_id + '" > </span>');
+    jQuery('.ef_legends').css('cursor', 'pointer');
+
+    l_m.bind('ef_reduce_private', function (event, fast) { // Reduce
+
+      if (l_m.is('.ef_command, .ef_click_ok')) {
+        if (fast) {
+          f_m.hide();
+          f_r.show();
+          f_r.find('*').css({ opacity: 1 });
+        }
+        else {
+          f_m.find('*').not('.ef_legends, img').animate(
+                                 { opacity: 0 }, 200,
                                 function () {
-                                    f_m.slideUp(400);
-                                    f_r.slideDown(400, function () {
-                                            f_r.find('*').css({opacity: 1});
-                                    });
+                                  f_m.slideUp(400);
+                                  f_r.slideDown(400, function () {
+                                    f_r.find('*').css({ opacity: 1 });
+                                  });
                                 }
                             );
-                      }
-                  }
-              });
-              l_r.bind('ef_maximize_private', function (event, fast) { // Maximize
-                  if (l_r.is('.ef_command, .ef_click_ok')) {
-                      if (fast) {
-                          f_r.hide();
-                          f_m.show();
-                      } else {
-                          f_r.find('*').css({opacity: 0});
-                          f_r.slideUp(400);
-                          f_m.slideDown(400, function () {
-                              f_m.find('*').not('.ef_legends, img').animate(
-                                                                    {opacity: 1},
-                                                                            200
-                                                                              );
-                                 });
-                        }
-                  }
-              });
-              l_m.click(function () { // Reduce
-                  l_m.trigger('ef_reduce_private', ef_animate_fast);
-              });
-              l_r.click(function () { // Maximize
-                  l_r.trigger('ef_maximize_private', ef_animate_fast);
-              });
+        }
+      }
+    });
+
+    l_r.bind('ef_maximize_private', function (event, fast) { // Maximize
+      if (l_r.is('.ef_command, .ef_click_ok')) {
+        if (fast) {
+          f_r.hide();
+          f_m.show();
+        } else {
+          f_r.find('*').css({ opacity: 0 });
+          f_r.slideUp(400);
+          f_m.slideDown(400, function () {
+            f_m.find('*').not('.ef_legends, img').animate({ opacity: 1 },200 );
           });
+        }
       }
+    });
+
+    l_m.click(function () { // Reduce
+      l_m.trigger('ef_reduce_private', ef_animate_fast);
+    });
+
+    l_r.click(function () { // Maximize
+      l_r.trigger('ef_maximize_private', ef_animate_fast);
+    });
+    if (no_affiche!="true") {
+      ef_reduce("geoposition", { fast: true })
+      // jQuery("#Envoie").trigger("submit");
+    } else {
+      ef_reduce("Elements", { fast: true })
+    }
+  });
+}
 
 
-      jQuery(document).ready(function () {
-          if (jQuery(".fieldset").length >= 1)
-              jQuery(".fieldset").each(
+jQuery(document).ready(function () {
+  if (jQuery(".fieldset").length >= 1)
+    jQuery(".fieldset").each(
                 function (i) {
-                    id0 = jQuery(this).attr("id");
-                    if (id0 == "") jQuery(this).attr("id", "Cadre_" + i);
-                    id0 = jQuery(this).attr("id");
-                    // Update of the '#cache' value when changing the selected value in the fieldset
-                    jQuery("#" + id0 + ' .inputs').click(function () {
-                        jQuery("#" + id0).text(jQuery("#" + id0 + ' .inputs:checked').next().text());
-                    });
+                  id0 = jQuery(this).attr("id");
+                  if (id0 == "") jQuery(this).attr("id", "Cadre_" + i);
+                  id0 = jQuery(this).attr("id");
+                  // Update of the '#cache' value when changing the selected value in the fieldset
+                  jQuery("#" + id0 + ' .inputs').click(function () {
+                    jQuery("#" + id0).text(jQuery("#" + id0 + ' .inputs:checked').next().text());
+                  });
                 });
-          // Some changes of the defaults, nothing to see with Smart Fieldsets
-          //   jQuery('input').attr('checked', 'true');
-          jQuery('code').css('font-size', 'larger');
-          jQuery('#ef_presentation label, #ef_presentation input').css('cursor', 'pointer');
-      });
+  // Some changes of the defaults, nothing to see with Smart Fieldsets
+  //   jQuery('input').attr('checked', 'true');
+  jQuery('code').css('font-size', 'larger');
+  jQuery('#ef_presentation label, #ef_presentation input').css('cursor', 'pointer');
+});
 
 
 
-      jQuery(document).ready(function () {
-          if (jQuery(".fieldset").length >= 1) {
-              jQuery(".fieldset").each(
+jQuery(document).ready(function () {
+  if (jQuery(".fieldset").length >= 1) {
+    jQuery(".fieldset").each(
               function (i) {
-                  id0 = jQuery(this).attr("id");
-                  ef_init(id0, 'cache' + i);
+                id0 = jQuery(this).attr("id");
+                ef_init(id0, 'cache' + i);
 
               })
-          }
-          if (no_affiche) {
-              ef_reduce("geoposition", true)
-          } else {
-              ef_reduce("Elements", true)
-          }
 
-      })
+  }
+
+})
 
              
Index: /extensions/edit_gmaps/main.inc.php
===================================================================
--- /extensions/edit_gmaps/main.inc.php	(revision 10059)
+++ /extensions/edit_gmaps/main.inc.php	(revision 10060)
