[fusion-commits] r2427 - in trunk: text widgets/Redline
widgets/Redline/classes
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Thu Sep 1 04:37:45 EDT 2011
Author: jng
Date: 2011-09-01 01:37:45 -0700 (Thu, 01 Sep 2011)
New Revision: 2427
Modified:
trunk/text/en
trunk/widgets/Redline/classes/markupcommand.php
trunk/widgets/Redline/classes/markupmanager.php
trunk/widgets/Redline/editmarkup.php
trunk/widgets/Redline/markupmain.php
trunk/widgets/Redline/newmarkup.php
Log:
#461: Finish the replacement of the old redline widget. This adds support for downloading redline SDF data files in the main page and all the pages have been localized
Modified: trunk/text/en
===================================================================
--- trunk/text/en 2011-09-01 05:51:57 UTC (rev 2426)
+++ trunk/text/en 2011-09-01 08:37:45 UTC (rev 2427)
@@ -212,21 +212,104 @@
THEMEQUANTILE = Quantile
THEMEJENKS = Jenks (Natural Breaks)
-# Redline UI
-REDLINEOPTIONS = Digitizing Options
-REDLINESELECTLAYER = Select Layer:
+# Redline Management
+REDLINEMANAGE = Manage Redline
+REDLINEAVAILABLELAYERS = Available Redline Layers
+REDLINELOADEDLAYERS = Redline Layers on Map
REDLINENEW = New
-REDLINERENAME = Rename
-REDLINEREMOVE = Remove
-REDLINEDRAW = Draw:
-REDLINEPOINT = Point
-REDLINELINE = Line
-REDLINERECTANGLE = Rectangle
-REDLINEPOLYGON = Polygon
-REDLINESAVE = Save
-REDLINEUPLOAD = Upload
-REDLINEFEATURES = Features
+REDLINEADDTOMAP = Add To Map
+REDLINEDELETE = Delete
+REDLINEREFRESH = Refresh
+REDLINEEDIT = Add/Edit Redlines
+REDLINEREMOVEFROMMAP = Remove From Map
+REDLINEDOWNLOADSDF = Download
+# New Redline UI
+REDLINENEWLAYER = New Redline Layer
+REDLINELAYERSETTINGS = Redline Layer Settings
+REDLINENAME = Redline Name:
+REDLINEPOINTSTYLE = Point Style
+REDLINEMARKERTYPE = Marker Type
+REDLINEMARKERSQUARE = Square
+REDLINEMARKERCIRCLE = Circle
+REDLINEMARKERTRIANGLE = Triangle
+REDLINEMARKERSTAR = Star
+REDLINEMARKERCROSS = Cross
+REDLINEMARKERX = X
+REDLINEUNITSPT = Points
+REDLINEUNITSIN = Inches
+REDLINEUNITSMM = Millimeters
+REDLINEUNITSCM = Centimeters
+REDLINEUNITSM = Meters
+REDLINEMARKERSIZE = Marker size:
+REDLINEMARKERCOLOR = Marker color:
+REDLINELINESTYLE = Line Style
+REDLINELINEPATTERN = Line pattern:
+REDLINEPATTERNSOLID = Solid
+REDLINEPATTERNDASH = Dash
+REDLINEPATTERNDOT = Dot
+REDLINEPATTERNDASHDOT = DashDot
+REDLINEPATTERNDASHDOTDOT = DashDotDot
+REDLINEPATTERNRAIL = Rail
+REDLINEPATTERNBORDER = Border
+REDLINEPATTERNDIVIDE = Divide
+REDLINEPATTERNFENCELINE = FenceLine
+REDLINEPATTERNNET = Net
+REDLINEPATTERNLINE = Line
+REDLINEPATTERNLINE45 = Line_45
+REDLINEPATTERNLINE90 = Line_90
+REDLINEPATTERNLINE135 = Line_135
+REDLINEPATTERNSQUARE = Square
+REDLINEPATTERNBOX = Box
+REDLINEPATTERNCROSS = Cross
+REDLINEPATTERNDOLMIT = Dolmit
+REDLINEPATTERNHEX = Hex
+REDLINEPATTERNSACNCR = Sacncr
+REDLINEPATTERNSTEEL = Steel
+REDLINESIZEUNITS = Size units:
+REDLINELINETHICKNESS = Line thickness:
+REDLINELINECOLOR = Line color:
+REDLINETRANSPARENT = Transparent
+REDLINEPOLYGONSTYLE = Polygon Style
+REDLINEFILLPATTERN = Fill pattern:
+REDLINEFILLTRANSPARENCY = Transparency:
+REDLINEFOREGROUND = Foreground color:
+REDLINEBACKGROUND = Background color:
+REDLINEBORDERPATTERN = Border pattern:
+REDLINEBORDERCOLOR = Border color:
+REDLINELABELSTYLE = Label Style
+REDLINEBORDERTHICKNESS = Border thickness:
+REDLINELABELFONTSIZE = Label font size:
+REDLINEFONTBOLD = Bold
+REDLINEFONTITALIC = Italic
+REDLINEFONTUNDERLINE = Underline
+REDLINELABELCOLOR = Label color:
+REDLINELABELBACKGROUNDSTYLE = Label background style:
+REDLINELABELGHOSTED = Ghosted
+REDLINELABELOPAQUE = Opaque
+
+# Redline Editing
+REDLINEEDIT = Edit Redline
+REDLINEEDITDEFAULTHELP = To begin select the type of markup to digitize.
+REDLINEEDITPOINTHELP = Click the map to specify the location of the point.
+REDLINEEDITLINEHELP = Click and drag on the map to specify the start and end points of the line.
+REDLINEEDITLINESTRINGHELP = Click the map to define each point of the line, Double Click on the final point to end.
+REDLINEEDITRECTANGLEHELP = Click on the map to specify the first corner and drag the mouse to define the rectangle.
+REDLINEEDITPOLYGONHELP = Click the map to define each point of the polygon, Double Click on the final point to end.
+REDLINEPROMPTLABEL = Enter a label for the markup item
+REDLINEADD = Add Redline
+REDLINEDIGITIZE = Digitize Redline
+REDLINEOBJECTPOINT = Point
+REDLINEOBJECTLINE = Line
+REDLINEOBJECTLINESTRING = Line String
+REDLINEOBJECTRECTANGLE = Rectangle
+REDLINEOBJECTPOLYGON = Polygon
+REDLINEMODIFY = Modify Redline
+REDLINESELECTOBJECT = Select
+REDLINEDELETEOBJECT = Delete
+REDLINEUPDATETEXT = Update Text
+REDLINEEDITCLOSE = Close
+
# HtmlViewerAbout
HTMLABOUTTITLE = About %s
HTMLABOUTTITLEBAR = MapGuide Viewer
Modified: trunk/widgets/Redline/classes/markupcommand.php
===================================================================
--- trunk/widgets/Redline/classes/markupcommand.php 2011-09-01 05:51:57 UTC (rev 2426)
+++ trunk/widgets/Redline/classes/markupcommand.php 2011-09-01 08:37:45 UTC (rev 2427)
@@ -8,6 +8,7 @@
const Refresh = 4;
const Edit = 5;
const Close = 6;
+ const Download = 7;
}
?>
\ No newline at end of file
Modified: trunk/widgets/Redline/classes/markupmanager.php
===================================================================
--- trunk/widgets/Redline/classes/markupmanager.php 2011-09-01 05:51:57 UTC (rev 2426)
+++ trunk/widgets/Redline/classes/markupmanager.php 2011-09-01 08:37:45 UTC (rev 2427)
@@ -301,7 +301,31 @@
$res = $featureService->UpdateFeatures($this->markupRegistryId, $cmds, false);
}
+
+ function DownloadMarkup()
+ {
+ $resourceService = $this->site->CreateService(MgServiceType::ResourceService);
+
+ $markupLayerResId = new MgResourceIdentifier($this->args['MARKUPLAYER']);
+ $markupSdfResId = new MgResourceIdentifier($this->GetResourceIdPrefix() . $markupLayerResId->GetName() . '.FeatureSource');
+ $dataName = $markupLayerResId->GetName().".sdf";
+ $byteReader = $resourceService->GetResourceData($markupSdfResId, $dataName);
+ $len = $byteReader->GetLength();
+
+ $outputBuffer = '';
+ $buffer = '';
+ while ($byteReader->Read($buffer, 50000) != 0)
+ {
+ $outputBuffer .= $buffer;
+ }
+
+ header("Content-Type: " . $byteReader->GetMimeType());
+ header("Content-Disposition: attachment; filename=$dataName");
+ header("Content-Length: " . strlen($outputBuffer));
+ echo $outputBuffer;
+ }
+
function GetOpenMarkup()
{
$openMarkup = array();
Modified: trunk/widgets/Redline/editmarkup.php
===================================================================
--- trunk/widgets/Redline/editmarkup.php 2011-09-01 05:51:57 UTC (rev 2426)
+++ trunk/widgets/Redline/editmarkup.php 2011-09-01 08:37:45 UTC (rev 2427)
@@ -1,4 +1,13 @@
<?php
+ $fusionMGpath = '../../layers/MapGuide/php/';
+ require_once $fusionMGpath . 'Common.php';
+ if(InitializationErrorOccurred())
+ {
+ DisplayInitializationErrorHTML();
+ exit;
+ }
+ require_once $fusionMGpath . 'Utilities.php';
+ require_once $fusionMGpath . 'JSON.php';
require_once 'classes/markupeditor.php';
require_once 'classes/editcommand.php';
@@ -8,6 +17,13 @@
$errorMsg = null;
$errorDetail = null;
+ SetLocalizedFilesPath(GetLocalizationPath());
+ if(isset($_REQUEST['LOCALE'])) {
+ $locale = $_REQUEST['LOCALE'];
+ } else {
+ $locale = GetDefaultLocale();
+ }
+
try
{
$markupEditor = new MarkupEditor($args);
@@ -43,6 +59,27 @@
}
$markupFeatures = $markupEditor->GetMarkupFeatures();
+
+ $editLocal = GetLocalizedString('REDLINEEDIT', $locale );
+ $defaultHelpLocal = GetLocalizedString('REDLINEEDITDEFAULTHELP', $locale );
+ $pointHelpLocal = GetLocalizedString('REDLINEEDITPOINTHELP', $locale );
+ $lineHelpLocal = GetLocalizedString('REDLINEEDITLINEHELP', $locale );
+ $lineStringHelpLocal = GetLocalizedString('REDLINEEDITLINESTRINGHELP', $locale );
+ $rectangleHelpLocal = GetLocalizedString('REDLINEEDITRECTANGLEHELP', $locale );
+ $polygonHelpLocal = GetLocalizedString('REDLINEEDITPOLYGONHELP', $locale );
+ $addLocal = GetLocalizedString('REDLINEADD', $locale );
+ $digitizeLocal = GetLocalizedString('REDLINEDIGITIZE', $locale );
+ $pointLocal = GetLocalizedString('REDLINEOBJECTPOINT', $locale );
+ $lineLocal = GetLocalizedString('REDLINEOBJECTLINE', $locale );
+ $lineStringLocal = GetLocalizedString('REDLINEOBJECTLINESTRING', $locale );
+ $rectangleLocal = GetLocalizedString('REDLINEOBJECTRECTANGLE', $locale );
+ $polygonLocal = GetLocalizedString('REDLINEOBJECTPOLYGON', $locale );
+ $modifyLocal = GetLocalizedString('REDLINEMODIFY', $locale );
+ $selectLocal = GetLocalizedString('REDLINESELECTOBJECT', $locale );
+ $deleteLocal = GetLocalizedString('REDLINEDELETEOBJECT', $locale );
+ $updateLocal = GetLocalizedString('REDLINEUPDATETEXT', $locale );
+ $closeLocal = GetLocalizedString('REDLINEEDITCLOSE', $locale );
+ $promptLabelLocal = GetLocalizedString('REDLINEPROMPTLABEL', $locale);
}
catch (MgException $e)
{
@@ -52,7 +89,7 @@
?>
<html>
<head>
- <title>Edit Markup</title>
+ <title><?=$editLocal?></title>
<link rel="stylesheet" href="Redline.css" type="text/css">
<script language="javascript" src="../../layers/MapGuide/MapGuideViewerApi.js"></script>
<script language="javascript" src="../../common/browserdetect.js"></script>
@@ -68,12 +105,12 @@
var CMD_DELETE = <?= EditCommand::Delete ?>;
var CMD_UPDATE = <?= EditCommand::Update ?>;
- var EDIT_DEFAULT_HELP = "To begin select the type of markup to digitize.";
- var EDIT_POINT_HELP = "Click the map to specify the location of the point.";
- var EDIT_LINE_HELP = "Click and drag on the map to specify the start and end points of the line.";
- var EDIT_LINESTRING_HELP = "Click the map to define each point of the line, Double Click on the final point to end.";
- var EDIT_RECTANGLE_HELP = "Click on the map to specify the first corner and drag the mouse to define the rectangle.";
- var EDIT_POLYGON_HELP = "Click the map to define each point of the polygon, Double Click on the final point to end.";
+ var EDIT_DEFAULT_HELP = "<?=$defaultHelpLocal?>";
+ var EDIT_POINT_HELP = "<?=$pointHelpLocal?>";
+ var EDIT_LINE_HELP = "<?=$lineHelpLocal?>";
+ var EDIT_LINESTRING_HELP = "<?=$lineStringHelpLocal?>";
+ var EDIT_RECTANGLE_HELP = "<?=$rectangleHelpLocal?>";
+ var EDIT_POLYGON_HELP = "<?=$polygonHelpLocal?>";
function SetDigitizeInfo(text)
{
@@ -124,7 +161,7 @@
{
var textInput = document.getElementById("textInput");
- textLabel = window.prompt("Enter a label for the markup item", "");
+ textLabel = window.prompt("<?=$promptLabelLocal?>", "");
textInput.value = (textLabel != null) ? textLabel : "";
ClearDigitization();
@@ -285,20 +322,20 @@
<td colspan="2" class="SubTitle">Add Markup</td>
</tr>
<tr>
- <td colspan="2">Digitize markup:</td>
+ <td colspan="2"><?=$digitizeLocal?></td>
</tr>
<tr><td colspan="2" height="2px"></td></tr>
<tr>
<td colspan="2">
- <input class="Ctrl" id="pointBtn" type="button" onClick="AddPoint()" value="Point" style="width:60px">
- <input class="Ctrl" id="lineBtn" type="button" onClick="AddLine()" value="Line" style="width:60px">
- <input class="Ctrl" id="lineStringBtn" type="button" onClick="AddLineString()" value="Line String" style="width:60px">
+ <input class="Ctrl" id="pointBtn" type="button" onClick="AddPoint()" value="<?=$pointLocal?>" style="width:60px">
+ <input class="Ctrl" id="lineBtn" type="button" onClick="AddLine()" value="<?=$lineLocal?>" style="width:60px">
+ <input class="Ctrl" id="lineStringBtn" type="button" onClick="AddLineString()" value="<?=$lineStringLocal?>" style="width:60px">
</td>
</tr>
<tr>
<td colspan="2">
- <input class="Ctrl" id="rectangleBtn" type="button" onClick="AddRectangle()" value="Rectangle" style="width:60px">
- <input class="Ctrl" id="polygonBtn" type="button" onClick="AddPolygon()" value="Polygon" style="width:60px">
+ <input class="Ctrl" id="rectangleBtn" type="button" onClick="AddRectangle()" value="<?=$rectangleLocal?>" style="width:60px">
+ <input class="Ctrl" id="polygonBtn" type="button" onClick="AddPolygon()" value="<?=$polygonLocal?>" style="width:60px">
</td>
</tr>
<tr><td colspan="2" height="2px"></td></tr>
@@ -307,7 +344,7 @@
</tr>
<tr><td colspan="2"></td></tr>
<tr>
- <td colspan="2" class="SubTitle">Modify Markup</td>
+ <td colspan="2" class="SubTitle"><?=$modifyLocal?></td>
</tr>
<tr>
<td colspan="2">
@@ -332,9 +369,9 @@
<tr><td colspan="2" height="2px"></td></tr>
<tr>
<td colspan="2">
- <input class="Ctrl" id="selectBtn" type="button" onClick="SelectMarkup()" value="Select Markup" style="width:80px">
- <input class="Ctrl" id="deleteBtn" type="button" onClick="DeleteMarkup()" value="Delete Markup" style="width:80px">
- <input class="Ctrl" id="updateBtn" type="button" onClick="UpdateMarkup()" value="Update Text" style="width:80px">
+ <input class="Ctrl" id="selectBtn" type="button" onClick="SelectMarkup()" value="<?=$selectLocal?>" style="width:80px">
+ <input class="Ctrl" id="deleteBtn" type="button" onClick="DeleteMarkup()" value="<?=$deleteLocal?>" style="width:80px">
+ <input class="Ctrl" id="updateBtn" type="button" onClick="UpdateMarkup()" value="<?=$updateLocal?>" style="width:80px">
</td>
</tr>
<tr><td colspan="2" height="2px"></td></tr>
@@ -342,7 +379,7 @@
<tr>
<td colspan="2" align="right">
<hr>
- <input class="Ctrl" name="" type="button" onClick="CloseEditor()" value="Close" style="width:60px">
+ <input class="Ctrl" name="" type="button" onClick="CloseEditor()" value="<?=$closeLocal?>" style="width:60px">
</td>
</tr>
Modified: trunk/widgets/Redline/markupmain.php
===================================================================
--- trunk/widgets/Redline/markupmain.php 2011-09-01 05:51:57 UTC (rev 2426)
+++ trunk/widgets/Redline/markupmain.php 2011-09-01 08:37:45 UTC (rev 2427)
@@ -1,6 +1,13 @@
<?php
$fusionMGpath = '../../layers/MapGuide/php/';
require_once $fusionMGpath . 'Common.php';
+ if(InitializationErrorOccurred())
+ {
+ DisplayInitializationErrorHTML();
+ exit;
+ }
+ require_once $fusionMGpath . 'Utilities.php';
+ require_once $fusionMGpath . 'JSON.php';
require_once 'classes/markupmanager.php';
require_once 'classes/markupcommand.php';
@@ -10,6 +17,13 @@
$errorMsg = null;
$errorDetail = null;
+ SetLocalizedFilesPath(GetLocalizationPath());
+ if(isset($_REQUEST['LOCALE'])) {
+ $locale = $_REQUEST['LOCALE'];
+ } else {
+ $locale = GetDefaultLocale();
+ }
+
try
{
$markupManager = new MarkupManager($args);
@@ -35,6 +49,9 @@
$markupManager->CloseMarkup();
$refreshMap = true;
break;
+ case MarkupCommand::Download:
+ $markupManager->DownloadMarkup();
+ break;
}
}
@@ -44,6 +61,17 @@
// Remove open markup from the list of available markup.
$availableMarkup = array_diff($availableMarkup, $openMarkup);
+
+ $manageLocal = GetLocalizedString('REDLINEMANAGE', $locale );
+ $availableLayersLocal = GetLocalizedString('REDLINEAVAILABLELAYERS', $locale );
+ $loadedLayersLocal = GetLocalizedString('REDLINELOADEDLAYERS', $locale );
+ $newLocal = GetLocalizedString('REDLINENEW', $locale );
+ $addToMapLocal = GetLocalizedString('REDLINEADDTOMAP', $locale );
+ $deleteLocal = GetLocalizedString('REDLINEDELETE', $locale );
+ $refreshLocal = GetLocalizedString('REDLINEREFRESH', $locale );
+ $addEditLocal = GetLocalizedString('REDLINEEDIT', $locale );
+ $removeFromMapLocal = GetLocalizedString('REDLINEREMOVEFROMMAP', $locale );
+ $downloadLocal = GetLocalizedString('REDLINEDOWNLOADSDF', $locale );
}
catch (MgException $mge)
{
@@ -70,6 +98,7 @@
var CMD_REFRESH = <?= MarkupCommand::Refresh ?>;
var CMD_EDIT = <?= MarkupCommand::Edit ?>;
var CMD_CLOSE = <?= MarkupCommand::Close ?>;
+ var CMD_DOWNLOAD = <?= MarkupCommand::Download ?>;
function SubmitCommand(cmd)
{
@@ -92,16 +121,19 @@
var availableSelect = document.getElementById("availableMarkup");
var openBtn = document.getElementById("openBtn");
var deleteBtn = document.getElementById("deleteBtn");
+ var downloadBtn = document.getElementById("downloadBtn");
if (availableSelect.selectedIndex >= 0)
{
openBtn.disabled = false;
deleteBtn.disabled = false;
+ downloadBtn.disabled = false;
}
else
{
openBtn.disabled = true;
deleteBtn.disabled = true;
+ downloadBtn.disabled = true;
}
}
@@ -143,8 +175,8 @@
<form action="" method="post" enctype="application/x-www-form-urlencoded" id="markupForm" target="_self">
<table class="RegText" border="0" cellspacing="0" width="100%">
- <tr><td class="Title">Manage Markup<hr></td></tr>
- <tr><td class="SubTitle">Available Markup Layers</td></tr>
+ <tr><td class="Title"><?=$manageLocal?><hr></td></tr>
+ <tr><td class="SubTitle"><?=$availableLayersLocal?></td></tr>
<tr>
<td class="RegText">
<select name="MARKUPLAYER" size="15" class="Ctrl" id="availableMarkup" onChange="OnAvailableMarkupChange()" style="width: 100%">
@@ -162,14 +194,15 @@
</tr>
<tr>
<td>
- <input class="Ctrl" type="button" id="newBtn" onClick="SubmitCommand(CMD_NEW)" value="New" style="width:50px">
- <input class="Ctrl" type="button" id="openBtn" onClick="SubmitCommand(CMD_OPEN)" value="Add To Map" style="width:90px">
- <input class="Ctrl" type="button" id="deleteBtn" onClick="SubmitCommand(CMD_DELETE)" value="Delete" style="width:50px">
- <input class="Ctrl" type="button" id="refreshBtn" onClick="SubmitCommand(CMD_REFRESH)" value="Refresh" style="width:50px">
+ <input class="Ctrl" type="button" id="newBtn" onClick="SubmitCommand(CMD_NEW)" value="<?=$newLocal?>" style="width:50px">
+ <input class="Ctrl" type="button" id="openBtn" onClick="SubmitCommand(CMD_OPEN)" value="<?=$addToMapLocal?>" style="width:90px">
+ <input class="Ctrl" type="button" id="deleteBtn" onClick="SubmitCommand(CMD_DELETE)" value="<?=$deleteLocal?>" style="width:50px">
+ <input class="Ctrl" type="button" id="refreshBtn" onClick="SubmitCommand(CMD_REFRESH)" value="<?=$refreshLocal?>" style="width:50px">
+ <input class="Ctrl" type="button" id="downloadBtn" onClick="SubmitCommand(CMD_DOWNLOAD)" value="<?=$downloadLocal?>" style="width:100px">
<br><br>
</td>
</tr>
- <tr><td class="SubTitle">Markup Layers on Map</td></tr>
+ <tr><td class="SubTitle"><?=$loadedLayersLocal?></td></tr>
<tr>
<td class="RegText">
<select name="OPENMARKUP" size="10" class="Ctrl" id="openMarkup" onChange="OnOpenMarkupChange()" style="width: 100%">
@@ -187,8 +220,8 @@
</tr>
<tr>
<td>
- <input class="Ctrl" type="button" id="editBtn" onClick="SubmitCommand(CMD_EDIT)" value="Add/Edit Markups" style="width:100px">
- <input class="Ctrl" type="button" id="closeBtn" onClick="SubmitCommand(CMD_CLOSE)" value="Remove From Map" style="width:100px">
+ <input class="Ctrl" type="button" id="editBtn" onClick="SubmitCommand(CMD_EDIT)" value="<?=$addEditLocal?>" style="width:100px">
+ <input class="Ctrl" type="button" id="closeBtn" onClick="SubmitCommand(CMD_CLOSE)" value="<?=$removeFromMapLocal?>" style="width:100px">
<br><br>
</td>
</tr>
Modified: trunk/widgets/Redline/newmarkup.php
===================================================================
--- trunk/widgets/Redline/newmarkup.php 2011-09-01 05:51:57 UTC (rev 2426)
+++ trunk/widgets/Redline/newmarkup.php 2011-09-01 08:37:45 UTC (rev 2427)
@@ -1,10 +1,90 @@
<?php
+ $fusionMGpath = '../../layers/MapGuide/php/';
+ require_once $fusionMGpath . 'Common.php';
+ if(InitializationErrorOccurred())
+ {
+ DisplayInitializationErrorHTML();
+ exit;
+ }
+ require_once $fusionMGpath . 'Utilities.php';
+ require_once $fusionMGpath . 'JSON.php';
require_once 'classes/markupcommand.php';
$args = ($_SERVER['REQUEST_METHOD'] == "POST") ? $_POST : $_GET;
$errorMsg = null;
$errorDetail = null;
+
+ SetLocalizedFilesPath(GetLocalizationPath());
+ if(isset($_REQUEST['LOCALE'])) {
+ $locale = $_REQUEST['LOCALE'];
+ } else {
+ $locale = GetDefaultLocale();
+ }
+
+ $newLayerLocal = GetLocalizedString('REDLINENEWLAYER', $locale );
+ $layerSettingsLocal = GetLocalizedString('REDLINELAYERSETTINGS', $locale );
+ $nameLocal = GetLocalizedString('REDLINENAME', $locale );
+ $pointStyleLocal = GetLocalizedString('REDLINEPOINTSTYLE', $locale );
+ $markerStyleLocal = GetLocalizedString('REDLINEMARKERTYPE', $locale );
+ $squareLocal = GetLocalizedString('REDLINEMARKERSQUARE', $locale );
+ $circleLocal = GetLocalizedString('REDLINEMARKERCIRCLE', $locale );
+ $triangleLocal = GetLocalizedString('REDLINEMARKERTRIANGLE', $locale );
+ $starLocal = GetLocalizedString('REDLINEMARKERSTAR', $locale );
+ $crossLocal = GetLocalizedString('REDLINEMARKERCROSS', $locale );
+ $xLocal = GetLocalizedString('REDLINEMARKERX', $locale );
+ $unitsPtLocal = GetLocalizedString('REDLINEUNITSPT', $locale );
+ $unitsInLocal = GetLocalizedString('REDLINEUNITSIN', $locale );
+ $unitsMmLocal = GetLocalizedString('REDLINEUNITSMM', $locale );
+ $unitsCmLocal = GetLocalizedString('REDLINEUNITSCM', $locale );
+ $unitsMLocal = GetLocalizedString('REDLINEUNITSM', $locale );
+ $markerSizeLocal = GetLocalizedString('REDLINEMARKERSIZE', $locale );
+ $markerColorLocal = GetLocalizedString('REDLINEMARKERCOLOR', $locale );
+ $lineStyleLocal = GetLocalizedString('REDLINELINESTYLE', $locale );
+ $linePatternLocal = GetLocalizedString('REDLINELINEPATTERN', $locale );
+ $solidLocal = GetLocalizedString('REDLINEPATTERNSOLID', $locale );
+ $dashLocal = GetLocalizedString('REDLINEPATTERNDASH', $locale );
+ $dotLocal = GetLocalizedString('REDLINEPATTERNDOT', $locale );
+ $dashDotLocal = GetLocalizedString('REDLINEPATTERNDASHDOT', $locale );
+ $dashDotDotLocal = GetLocalizedString('REDLINEPATTERNDASHDOTDOT', $locale );
+ $railLocal = GetLocalizedString('REDLINEPATTERNRAIL', $locale );
+ $borderLocal = GetLocalizedString('REDLINEPATTERNBORDER', $locale );
+ $divideLocal = GetLocalizedString('REDLINEPATTERNDIVIDE', $locale );
+ $fenceLineLocal = GetLocalizedString('REDLINEPATTERNFENCELINE', $locale );
+ $netLocal = GetLocalizedString('REDLINEPATTERNNET', $locale );
+ $lineLocal = GetLocalizedString('REDLINEPATTERNLINE', $locale );
+ $line45Local = GetLocalizedString('REDLINEPATTERNLINE45', $locale );
+ $line90Local = GetLocalizedString('REDLINEPATTERNLINE90', $locale );
+ $line135Local = GetLocalizedString('REDLINEPATTERNLINE135', $locale );
+ $squareLocal = GetLocalizedString('REDLINEPATTERNSQUARE', $locale );
+ $boxLocal = GetLocalizedString('REDLINEPATTERNBOX', $locale );
+ $crossLocal = GetLocalizedString('REDLINEPATTERNCROSS', $locale );
+ $dolmitLocal = GetLocalizedString('REDLINEPATTERNDOLMIT', $locale );
+ $hexLocal = GetLocalizedString('REDLINEPATTERNHEX', $locale );
+ $sacncrLocal = GetLocalizedString('REDLINEPATTERNSACNCR', $locale );
+ $steelLocal = GetLocalizedString('REDLINEPATTERNSTEEL', $locale );
+ $sizeUnitsLocal = GetLocalizedString('REDLINESIZEUNITS', $locale );
+ $thicknessLocal = GetLocalizedString('REDLINELINETHICKNESS', $locale );
+ $lineColorLocal = GetLocalizedString('REDLINELINECOLOR', $locale );
+ $transparentLocal = GetLocalizedString('REDLINETRANSPARENT', $locale );
+ $polygonStyleLocal = GetLocalizedString('REDLINEPOLYGONSTYLE', $locale );
+ $fillPatternLocal = GetLocalizedString('REDLINEFILLPATTERN', $locale );
+ $fillTransparencyLocal = GetLocalizedString('REDLINEFILLTRANSPARENCY', $locale );
+ $foregroundLocal = GetLocalizedString('REDLINEFOREGROUND', $locale );
+ $backgroundLocal = GetLocalizedString('REDLINEBACKGROUND', $locale );
+ $borderPatternLocal = GetLocalizedString('REDLINEBORDERPATTERN', $locale );
+ $borderColorLocal = GetLocalizedString('REDLINEBORDERCOLOR', $locale );
+ $labelStyleLocal = GetLocalizedString('REDLINELABELSTYLE', $locale );
+ $labelSizeUnitsLocal = GetLocalizedString('REDLINELABELSIZEUNITS', $locale );
+ $borderThicknessLocal = GetLocalizedString('REDLINEBORDERTHICKNESS', $locale );
+ $fontSizeLocal = GetLocalizedString('REDLINELABELFONTSIZE', $locale );
+ $boldLocal = GetLocalizedString('REDLINEFONTBOLD', $locale );
+ $italicLocal = GetLocalizedString('REDLINEFONTITALIC', $locale );
+ $underlineLocal = GetLocalizedString('REDLINEFONTUNDERLINE', $locale );
+ $labelColorLocal = GetLocalizedString('REDLINELABELCOLOR', $locale );
+ $labelBackgroundStyleLocal = GetLocalizedString('REDLINELABELBACKGROUNDSTYLE', $locale );
+ $ghostedLocal = GetLocalizedString('REDLINELABELGHOSTED', $locale );
+ $opaqueLocal = GetLocalizedString('REDLINELABELOPAQUE', $locale );
?>
<html>
<head>
@@ -149,130 +229,130 @@
<input name="MARKUPCOMMAND" type="hidden" value="<?= MarkupCommand::Create ?>">
<table class="RegText" border="0" cellspacing="0" width="100%%">
- <tr><td id="elTitle" colspan="2" class="Title">New Markup Layer<hr></td></tr>
+ <tr><td id="elTitle" colspan="2" class="Title"><?= $newLayerLocal ?><hr></td></tr>
- <tr><td colspan="2" class="SubTitle">Markup Layer Settings</td></tr>
- <tr><td colspan="2">Markup name:</td></tr>
+ <tr><td colspan="2" class="SubTitle"><?= $layerSettingsLocal ?></td></tr>
+ <tr><td colspan="2"><?= $nameLocal ?></td></tr>
<tr><td colspan="2"><input class="Ctrl" id="markupName" name="MARKUPNAME" type="text" maxlength="255" style="width:100%"><br><br></td></tr>
- <tr><td colspan="2" class="SubTitle">Point Style</td></tr>
+ <tr><td colspan="2" class="SubTitle"><?= $pointStyleLocal ?></td></tr>
<tr>
<td colspan="2">
- Marker type:<br>
+ <?=$markerStyleLocal?><br>
<select class="Ctrl" name="MARKERTYPE" size="1">
- <option value="Square" selected="selected">Square</option>
- <option value="Circle">Circle</option>
- <option value="Triangle">Triangle</option>
- <option value="Star">Star</option>
- <option value="Cross">Cross</option>
- <option value="X">X</option>
+ <option value="Square" selected="selected"><?=$squareLocal?></option>
+ <option value="Circle"><?=$circleLocal?></option>
+ <option value="Triangle"><?=$triangleLocal?></option>
+ <option value="Star"><?=$starLocal?></option>
+ <option value="Cross"><?=$crossLocal?></option>
+ <option value="X"><?=$xLocal?></option>
</select>
</td>
</tr>
<tr>
<td>
- Size units:<br>
+ <?=$sizeUnitsLocal?><br>
<select class="Ctrl" name="MARKERSIZEUNITS" size="1">
- <option value="Points" selected="selected">Points</option>
- <option value="Inches">Inches</option>
- <option value="Millimeters">Millimeters</option>
- <option value="Centimeters">Centimeters</option>
- <option value="Meters">Meters</option>
+ <option value="Points" selected="selected"><?=$unitsPtLocal?></option>
+ <option value="Inches"><?=$unitsInLocal?></option>
+ <option value="Millimeters"><?=$unitsMmLocal?></option>
+ <option value="Centimeters"><?=$unitsCmLocal?></option>
+ <option value="Meters"><?=$unitsMLocal?></option>
</select>
</td>
<td>
- Marker size:<br>
+ <?=$markerSizeLocal?><br>
<input class="Ctrl" name="MARKERSIZE" type="text" value="10">
</td>
</tr>
<tr>
<td colspan="2">
- Marker color:<br>
- <span class="Swatch" id="markerSwatch" style="color: #ff0000; background-color: #ff0000"> transparent </span>
+ <?=$markerColorLocal?><br>
+ <span class="Swatch" id="markerSwatch" style="color: #ff0000; background-color: #ff0000"> <?=$transparentLocal?> </span>
<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_MARKER_COLOR,false,false)">
<br><br>
</td>
</tr>
- <tr><td colspan="2" class="SubTitle">Line Style</td></tr>
+ <tr><td colspan="2" class="SubTitle"><?=$lineStyleLocal?></td></tr>
<tr>
<td colspan="2">
- Line pattern:<br>
+ <?=$linePatternLocal?><br>
<select class="Ctrl" name="LINEPATTERN" size="1">
- <option value="Solid" selected="selected">Solid</option>
- <option value="Dash">Dash</option>
- <option value="Dot">Dot</option>
- <option value="DashDot">DashDot</option>
- <option value="DashDotDot">DashDotDot</option>
- <option value="Rail">Rail</option>
- <option value="BORDER">Border</option>
- <option value="DIVIDE">Divide</option>
- <option value="FENCELINE1">FenceLine</option>
+ <option value="Solid" selected="selected"><?=$solidLocal?></option>
+ <option value="Dash"><?=$dashLocal?></option>
+ <option value="Dot"><?=$dotLocal?></option>
+ <option value="DashDot"><?=$dashDotLocal?></option>
+ <option value="DashDotDot"><?=$dashDotDotLocal?></option>
+ <option value="Rail"><?=$railLocal?></option>
+ <option value="BORDER"><?=$borderLocal?></option>
+ <option value="DIVIDE"><?=$divideLocal?></option>
+ <option value="FENCELINE1"><?=$fenceLineLocal?></option>
</select>
</td>
</tr>
<tr>
<td width="50%">
- Size units:<br>
+ <?=$sizeUnitsLocal?><br>
<select class="Ctrl" name="LINESIZEUNITS" size="1">
- <option value="Points">Points</option>
- <option value="Inches">Inches</option>
- <option value="Millimeters">Millimeters</option>
- <option value="Centimeters" selected="selected">Centimeters</option>
- <option value="Meters">Meters</option>
+ <option value="Points"><?=$unitsPtLocal?></option>
+ <option value="Inches"><?=$unitsInLocal?></option>
+ <option value="Millimeters"><?=$unitsMmLocal?></option>
+ <option value="Centimeters" selected="selected"><?=$unitsCmLocal?></option>
+ <option value="Meters"><?=$unitsMLocal?></option>
</select>
</td>
<td width="50%">
- Line thickness:<br>
+ <?=$thicknessLocal?><br>
<input class="Ctrl" name="LINETHICKNESS" type="text" value="0">
</td>
</tr>
<tr>
<td colspan="2">
- Line color:<br>
- <span class="Swatch" id="lineSwatch" style="color: #0000ff; background-color: #0000ff"> transparent </span>
+ <?=$lineColorLocal?><br>
+ <span class="Swatch" id="lineSwatch" style="color: #0000ff; background-color: #0000ff"> <?=$transparentLocal?> </span>
<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_LINE_COLOR,false,false)">
<br><br>
</td>
</tr>
- <tr><td colspan="2" class="SubTitle">Polygon Style</td></tr>
+ <tr><td colspan="2" class="SubTitle"><?=$polygonStyleLocal?></td></tr>
<tr>
<td width="50%">
- Fill pattern:<br>
+ <?=$fillPatternLocal?><br>
<select class="Ctrl" name="FILLPATTERN" size="1">
- <option value="Solid" selected>Solid</option>
- <option value="Net">Net</option>
- <option value="Line">Line</option>
- <option value="Line_45">Line_45</option>
- <option value="Line_90">Line_90</option>
- <option value="Line_135">Line_135</option>
- <option value="Square">Square</option>
- <option value="Box">Box</option>
- <option value="Cross">Cross</option>
- <option value="Dash">Dash</option>
- <option value="Dolmit">Dolmit</option>
- <option value="Hex">Hex</option>
- <option value="Sacncr">Sacncr</option>
- <option value="Steel">Steel</option>
+ <option value="Solid" selected><?=$solidLocal?></option>
+ <option value="Net"><?=$netLocal?></option>
+ <option value="Line"><?=$lineLocal?></option>
+ <option value="Line_45"><?=$line45Local?></option>
+ <option value="Line_90"><?=$line90Local?></option>
+ <option value="Line_135"><?=$line135Local?></option>
+ <option value="Square"><?=$squareLocal?></option>
+ <option value="Box"><?=$boxLocal?></option>
+ <option value="Cross"><?=$crossLocal?></option>
+ <option value="Dash"><?=$dashLocal?></option>
+ <option value="Dolmit"><?=$dolmitLocal?></option>
+ <option value="Hex"><?=$hexLocal?></option>
+ <option value="Sacncr"><?=$sacncrLocal?></option>
+ <option value="Steel"><?=$steelLocal?></option>
</select>
</td>
<td width="50%">
- Transparency:<br>
+ <?=$fillTransparencyLocal?><br>
<input class="Ctrl" name="FILLTRANSPARENCY" type="text" maxlength="3" value="0" style="width:50px">%
</td>
</tr>
<tr>
<td width="50%" valign="top">
- Foreground color:<br>
- <span class="Swatch" id="fillFgSwatch" style="color: #00ff00; background-color: #00ff00"> transparent </span>
+ <?=$foregroundLocal?><br>
+ <span class="Swatch" id="fillFgSwatch" style="color: #00ff00; background-color: #00ff00"> <?=$transparentLocal?> </span>
<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_FILL_FORE_COLOR,false,false)">
<br><br>
</td>
<td width="50%" valign="top">
- Background color:<br>
- <span class="Swatch" id="fillBgSwatch"> transparent </span>
+ <?=$backgroundLocal?><br>
+ <span class="Swatch" id="fillBgSwatch"> <?=$transparentLocal?> </span>
<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_FILL_BACK_COLOR,true,fillBackTrans)">
<br>
</td>
@@ -280,90 +360,90 @@
<tr><td colspan="2"><hr></td></tr>
<tr>
<td colspan="2">
- Border pattern:<br>
+ <?=$borderPatternLocal?><br>
<select class="Ctrl" name="BORDERPATTERN" size="1">
- <option value="Solid" selected="selected">Solid</option>
- <option value="Dash">Dash</option>
- <option value="Dot">Dot</option>
- <option value="DashDot">DashDot</option>
- <option value="DashDotDot">DashDotDot</option>
- <option value="Rail">Rail</option>
- <option value="BORDER">Border</option>
- <option value="DIVIDE">Divide</option>
- <option value="FENCELINE1">FenceLine</option>
+ <option value="Solid" selected="selected"><?=$solidLocal?></option>
+ <option value="Dash"><?=$dashLocal?></option>
+ <option value="Dot"><?=$dotLocal?></option>
+ <option value="DashDot"><?=$dashDotLocal?></option>
+ <option value="DashDotDot"><?=$dashDotDotLocal?></option>
+ <option value="Rail"><?=$railLocal?></option>
+ <option value="BORDER"><?=$borderLocal?></option>
+ <option value="DIVIDE"><?=$divideLocal?></option>
+ <option value="FENCELINE1"><?=$fenceLineLocal?></option>
</select>
</td>
</tr>
<tr>
<td width="50%">
- Size units:<br>
+ <?=$sizeUnitsLocal?><br>
<select class="Ctrl" name="BORDERSIZEUNITS" size="1">
- <option value="Points">Points</option>
- <option value="Inches">Inches</option>
- <option value="Millimeters">Millimeters</option>
- <option value="Centimeters" selected="selected">Centimeters</option>
- <option value="Meters">Meters</option>
+ <option value="Points"><?=$unitsPtLocal?></option>
+ <option value="Inches"><?=$unitsInLocal?></option>
+ <option value="Millimeters"><?=$unitsMmLocal?></option>
+ <option value="Centimeters" selected="selected"><?=$unitsCmLocal?></option>
+ <option value="Meters"><?=$unitsMLocal?></option>
</select>
</td>
<td width="50%">
- Border thickness:<br>
+ <?=$borderThicknessLocal?><br>
<input class="Ctrl" name="BORDERTHICKNESS" type="text" value="0">
</td>
</tr>
<tr>
<td colspan="2">
- Border color:<br>
+ <?=$borderColorLocal?><br>
<span class="Swatch" id="borderSwatch" style="color: #000000; background-color: #000000"> transparent </span>
<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_BORDER_COLOR,false,false)">
<br><br>
</td>
</tr>
- <tr><td colspan="2" class="SubTitle">Label Style</td></tr>
+ <tr><td colspan="2" class="SubTitle"><?=$labelStyleLocal?></td></tr>
<tr>
<td width="50%">
- Size units:<br>
+ <?=$sizeUnitsLocal?><br>
<select class="Ctrl" name="LABELSIZEUNITS" size="1">
- <option value="Points" selected="selected">Points</option>
- <option value="Inches">Inches</option>
- <option value="Millimeters">Millimeters</option>
- <option value="Centimeters">Centimeters</option>
- <option value="Meters">Meters</option>
+ <option value="Points" selected="selected"><?=$unitsPtLocal?></option>
+ <option value="Inches"><?=$unitsInLocal?></option>
+ <option value="Millimeters"><?=$unitsMmLocal?></option>
+ <option value="Centimeters"><?=$unitsCmLocal?></option>
+ <option value="Meters"><?=$unitsMLocal?></option>
</select>
</td>
<td width="50%">
- Label font size:<br>
+ <?=$fontSizeLocal?><br>
<input class="Ctrl" name="LABELFONTSIZE" type="text" value="10">
</td>
</tr>
<tr>
<td colspan="2" valign="middle">
- <input name="LABELBOLD" type="checkbox" value="bold"><label>Bold</label>
- <input name="LABELITALIC" type="checkbox" value="italic"><label>Italic</label>
- <input name="LABELUNDERLINE" type="checkbox" value="underline"><label>Underline</label>
+ <input name="LABELBOLD" type="checkbox" value="bold"><label><?=$boldLocal?></label>
+ <input name="LABELITALIC" type="checkbox" value="italic"><label><?=$italicLocal?></label>
+ <input name="LABELUNDERLINE" type="checkbox" value="underline"><label><?=$underlineLocal?></label>
</td>
</tr>
<tr>
<td width="50%" valign="top">
- Label color:<br>
- <span class="Swatch" id="labelFgSwatch" style="color: #000000; background-color: #000000"> transparent </span>
+ <?=$labelColorLocal?><br>
+ <span class="Swatch" id="labelFgSwatch" style="color: #000000; background-color: #000000"> <?=$transparentLocal?> </span>
<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_LABEL_FORE_COLOR,false,false)">
<br><br>
</td>
<td width="50%" valign="top">
- Background color:<br>
- <span class="Swatch" id="labelBgSwatch" style="color: #FFFFFF; background-color: #FFFFFF"> transparent </span>
+ <?=$backgroundLocal?><br>
+ <span class="Swatch" id="labelBgSwatch" style="color: #FFFFFF; background-color: #FFFFFF"> <?=$transparentLocal?> </span>
<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_LABEL_BACK_COLOR,false,false)">
<br>
</td>
</tr>
<tr>
<td colspan="2">
- Label background style:<br>
+ <?=$labelBackgroundStyleLocal?><br>
<select class="Ctrl" name="LABELBACKSTYLE" size="1">
- <option value="Ghosted" selected="selected">Ghosted</option>
- <option value="Opaque">Opaque</option>
- <option value="Transparent">Transparent</option>
+ <option value="Ghosted" selected="selected"><?=$ghostedLocal?></option>
+ <option value="Opaque"><?=$opaqueLocal?></option>
+ <option value="Transparent"><?=$transparentLocal?></option>
</select>
</td>
</tr>
More information about the fusion-commits
mailing list