[fusion-commits] r2463 - trunk/widgets/BufferPanel

svn_fusion at osgeo.org svn_fusion at osgeo.org
Mon Nov 21 04:29:04 EST 2011


Author: liuar
Date: 2011-11-21 01:29:04 -0800 (Mon, 21 Nov 2011)
New Revision: 2463

Modified:
   trunk/widgets/BufferPanel/Buffer.php
   trunk/widgets/BufferPanel/BufferReport.templ
Log:
Fix ticket #491 Nothing displays while warnings occur during buffer.



Modified: trunk/widgets/BufferPanel/Buffer.php
===================================================================
--- trunk/widgets/BufferPanel/Buffer.php	2011-11-21 04:47:51 UTC (rev 2462)
+++ trunk/widgets/BufferPanel/Buffer.php	2011-11-21 09:29:04 UTC (rev 2463)
@@ -53,6 +53,7 @@
     $srs = "";
     $featureName = "Buffer";
     $params = null;
+    $warnings = 0;
 
     GetRequestParameters();
     SetLocalizedFilesPath(GetLocalizationPath());
@@ -340,12 +341,13 @@
             $warningFmt = $excludedLayers > 1 ? GetLocalizedString( "BUFFERREPORTWARNINGSINGULAR", $locale ) : GetLocalizedString( "BUFFERREPORTWARNINGPLURAL", $locale );
             $warningStr = sprintf( $warningFmt, $excludedLayers );
             $msg = $msg."<p><p>".$warningStr;
+            $warnings = 1;
         }
 
         // return the report page
         $templ = file_get_contents("./BufferReport.templ");
         $templ = Localize($templ, $locale, GetClientOS());
-        print sprintf($templ, $popup, $mapName, $title, $msg);
+        print sprintf($templ, $popup, $warnings, $mapName, $title, $msg);
     }
     catch(MgException $e)
     {

Modified: trunk/widgets/BufferPanel/BufferReport.templ
===================================================================
--- trunk/widgets/BufferPanel/BufferReport.templ	2011-11-21 04:47:51 UTC (rev 2462)
+++ trunk/widgets/BufferPanel/BufferReport.templ	2011-11-21 09:29:04 UTC (rev 2463)
@@ -24,14 +24,14 @@
 <script language=javascript>
 
 var popup = %s;
-var errors = false; //this page is only returned for success;
+var warnings = %s; //this page is only returned for success;
 var mapName = '%s';
 
 function InitDocument()
 {
     var map = GetParent().Fusion.getMapByName(mapName);
     map.reloadMap();
-    if (!errors) {
+    if (!warnings) {
       Back();
     }
 }
@@ -63,7 +63,7 @@
 </head>
 <body onload="InitDocument()" marginwidth=5 marginheight=5 leftmargin=5 topmargin=5 bottommargin=5 rightmargin=5>
 <table class="RegText" border="0" cellspacing="0" width="100%%">
-  <tr><td class="Title">Create Buffer<hr></td></tr>
+  <tr><td class="Title">%s<hr></td></tr>
   <tr><td class="RegText">%s</td></tr>
   <tr><td height="10"></td></tr>
   <tr><td><input type="button" value="OK" style="width: 70px;" class="Ctrl" onclick="Back()"></td></tr>



More information about the fusion-commits mailing list