[mapguide-commits] r4631 - in trunk/MgDev/Web/src: localized
mapviewerjava mapviewernet mapviewerphp stdicons viewerfiles
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Fri Mar 5 00:55:14 EST 2010
Author: liuar
Date: 2010-03-05 00:55:13 -0500 (Fri, 05 Mar 2010)
New Revision: 4631
Added:
trunk/MgDev/Web/src/stdicons/openButton.gif
Modified:
trunk/MgDev/Web/src/localized/en
trunk/MgDev/Web/src/mapviewerjava/toolbar.jsp
trunk/MgDev/Web/src/mapviewernet/toolbar.aspx
trunk/MgDev/Web/src/mapviewerphp/toolbar.php
trunk/MgDev/Web/src/viewerfiles/mainframe.templ
trunk/MgDev/Web/src/viewerfiles/taskbar.templ
trunk/MgDev/Web/src/viewerfiles/toolbar.templ
trunk/MgDev/Web/src/viewerfiles/viewer.css
Log:
Ticket #1288 MapGuide Enhancement "Add an ?\226?\128?\156Open Task pane?\226?\128?\157 Button for MGE Basic Web Layout"
Modified: trunk/MgDev/Web/src/localized/en
===================================================================
--- trunk/MgDev/Web/src/localized/en 2010-03-04 17:03:41 UTC (rev 4630)
+++ trunk/MgDev/Web/src/localized/en 2010-03-05 05:55:13 UTC (rev 4631)
@@ -193,9 +193,11 @@
# Task Bar
TASKS = Tasks
-TASKBARCLOSEBUTTONTEXT = Close the task bar
-TASKBARCLOSEBUTTONDESC = Close the task bar
+TASKBARCLOSEBUTTONTEXT = Close the task pane
+TASKBARCLOSEBUTTONDESC = Close the task pane
TASKBARCLOSEBUTTONICON = ../stdicons/closeButton.gif
+TASKBAROPENBUTTONTEXT = Open the task pane
+TASKBAROPENBUTTONDESC = Open the task pane
# Viewer Options
OPTIONSTITLE = Viewer Options
Modified: trunk/MgDev/Web/src/mapviewerjava/toolbar.jsp
===================================================================
--- trunk/MgDev/Web/src/mapviewerjava/toolbar.jsp 2010-03-04 17:03:41 UTC (rev 4630)
+++ trunk/MgDev/Web/src/mapviewerjava/toolbar.jsp 2010-03-05 05:55:13 UTC (rev 4631)
@@ -23,8 +23,24 @@
<%@ page import="javax.servlet.http.*" %>
<%@ include file="common.jsp" %>
+<%!
+String locale;
+%>
+
<%
+ locale = "";
response.setContentType("text/html; charset=UTF-8");
request.setCharacterEncoding("UTF-8");
- response.getWriter().write(LoadTemplate("/viewerfiles/toolbar.templ"));
+
+ MgLocalizer.SetLocalizedFilesPath(getServletContext().getRealPath("/") + "localized/");
+ GetRequestParameters(request);
+
+ response.getWriter().write(MgLocalizer.Localize(LoadTemplate("/viewerfiles/toolbar.templ"), locale, GetClientOS(request)));
%>
+
+<%!
+void GetRequestParameters(HttpServletRequest request)
+{
+ locale = GetParameter(request, "LOCALE");
+}
+%>
Modified: trunk/MgDev/Web/src/mapviewernet/toolbar.aspx
===================================================================
--- trunk/MgDev/Web/src/mapviewernet/toolbar.aspx 2010-03-04 17:03:41 UTC (rev 4630)
+++ trunk/MgDev/Web/src/mapviewernet/toolbar.aspx 2010-03-05 05:55:13 UTC (rev 4631)
@@ -17,10 +17,36 @@
<%@ Page language="c#" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.IO" %>
+<%@ Import Namespace="OSGeo.MapGuide" %>
<!-- #Include File="common.aspx -->
+<script runat="server">
+String locale;
+</script>
+
<%
+ locale = "";
Response.Charset = "utf-8";
- Response.Write(LoadTemplate(Request, "../viewerfiles/toolbar.templ"));
+ GetRequestParameters();
+
+ MgLocalizer.SetLocalizedFilesPath(Request.ServerVariables["APPL_PHYSICAL_PATH"] + "..\\localized\\");
+
+ Response.Write(MgLocalizer.Localize(LoadTemplate(Request, "../viewerfiles/toolbar.templ"), locale, GetClientOS(Request)));
%>
+
+<script runat="server">
+void GetRequestParameters()
+{
+ if (Request.HttpMethod == "POST")
+ GetParameters(Request.Form);
+ else
+ GetParameters(Request.QueryString);
+}
+
+void GetParameters(NameValueCollection parameters)
+{
+ locale = GetParameter(parameters, "LOCALE");
+}
+
+</script>
Modified: trunk/MgDev/Web/src/mapviewerphp/toolbar.php
===================================================================
--- trunk/MgDev/Web/src/mapviewerphp/toolbar.php 2010-03-04 17:03:41 UTC (rev 4630)
+++ trunk/MgDev/Web/src/mapviewerphp/toolbar.php 2010-03-05 05:55:13 UTC (rev 4631)
@@ -17,6 +17,13 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
+ include 'common.php';
+
+ $locale = "";
+ GetRequestParameters();
+
+ SetLocalizedFilesPath(GetLocalizationPath());
+
// pass diferent button height depending on the browser
// to achieve a similar rendering, as there is no cross-browser conditional CSS
//
@@ -28,7 +35,23 @@
// return the HTML template
//
- $templ = file_get_contents("../viewerfiles/toolbar.templ");
+ $templ = Localize(file_get_contents("../viewerfiles/toolbar.templ"), $locale, GetClientOS());
printf($templ, $btnHeight);
+function GetParameters($params)
+{
+ global $locale;
+
+ if(isset($params['LOCALE']))
+ $locale = $params['LOCALE'];
+}
+
+function GetRequestParameters()
+{
+ if($_SERVER['REQUEST_METHOD'] == "POST")
+ GetParameters($_POST);
+ else
+ GetParameters($_GET);
+}
+
?>
Added: trunk/MgDev/Web/src/stdicons/openButton.gif
===================================================================
(Binary files differ)
Property changes on: trunk/MgDev/Web/src/stdicons/openButton.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/MgDev/Web/src/viewerfiles/mainframe.templ
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/mainframe.templ 2010-03-04 17:03:41 UTC (rev 4630)
+++ trunk/MgDev/Web/src/viewerfiles/mainframe.templ 2010-03-05 05:55:13 UTC (rev 4631)
@@ -180,11 +180,12 @@
{
if(orgTaskBarWidth == -1)
{
- orgTaskBarWidth = mainappFrame.cols;
+ orgTaskBarWidth = mainappFrame.cols.substring(2);;
}
if(width != -1)
{
- mainappFrame.cols = width;
+
+ mainappFrame.cols = "*," + width;
}
}
}
Modified: trunk/MgDev/Web/src/viewerfiles/taskbar.templ
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/taskbar.templ 2010-03-04 17:03:41 UTC (rev 4630)
+++ trunk/MgDev/Web/src/viewerfiles/taskbar.templ 2010-03-05 05:55:13 UTC (rev 4631)
@@ -149,6 +149,21 @@
active = eltId;
}
+function CloseTaskPane()
+{
+ var tbframe = parent.frames["tbFrame"];
+ var openTaskbarBtn = tbframe.document.getElementById("divOpenTaskbarBtn");
+ if(openTaskbarBtn != null)
+ {
+ openTaskbarBtn.style.display='block';
+ }
+
+ var divRefresh = tbframe.document.getElementById("divRefresh");
+ divRefresh.className = "cssRefreshWithOpenBtn";
+
+ parent.CloseTaskBar();
+}
+
function OpenTaskMenu()
{
try
@@ -182,7 +197,7 @@
<table height=30 border=0 cellpadding=0 cellspacing=0>
<tr height=30>
<td align=center valign=center>
- <span class="btn" id="btnClose" style="position: absolute; left: 5px;" onmouseover="HoverButton('btnClose', '')" onmouseout="LeaveButton('btnClose', '')" onclick="parent.CloseTaskBar()">
+ <span class="btn" id="btnClose" style="position: absolute; left: 5px;" onmouseover="HoverButton('btnClose', '')" onmouseout="LeaveButton('btnClose', '')" onclick="CloseTaskPane()">
<img class="btnImg" id="imgClose" title="" src="../stdicons/transparentpixel.gif" width=16 height=16>
</span>
</td>
Modified: trunk/MgDev/Web/src/viewerfiles/toolbar.templ
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/toolbar.templ 2010-03-04 17:03:41 UTC (rev 4630)
+++ trunk/MgDev/Web/src/viewerfiles/toolbar.templ 2010-03-05 05:55:13 UTC (rev 4631)
@@ -30,11 +30,17 @@
/* font-family: __#@font#__; */
/* font-size: __#@fontsize#__; */
}
- div.cssRefresh
+ div.cssOpenTaskbarBtn
{
position: absolute;
- right:10px;
- top:4px;
+ right:5px;
+ top:3px;
+ width: 26;
+ height:25;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #f0f0f0;
+ cursor: pointer;
}
</style>
@@ -108,7 +114,11 @@
document.getElementById(eltId).style.border = "solid #a0a0a0 1px";
hovered = eltId;
- parent.SetStatusMsg(cmdId!=null? parent.commands[cmdId].description: '');
+
+ if(eltId == 'divOpenTaskbarBtn')
+ parent.SetStatusMsg("__#TASKBAROPENBUTTONDESC#__");
+ else
+ parent.SetStatusMsg(cmdId!=null? parent.commands[cmdId].description: '');
}
function LeaveButton(eltId)
@@ -147,6 +157,20 @@
active = eltId;
}
+function OpenTaskPane()
+{
+ var openTaskbarBtn = document.getElementById("divOpenTaskbarBtn");
+ if(openTaskbarBtn != null)
+ {
+ openTaskbarBtn.style.display='none';
+ }
+
+ var divRefresh = document.getElementById("divRefresh");
+ divRefresh.className = "cssRefresh";
+
+ parent.OpenTaskBar();
+}
+
function ExecuteCommand(index, toggle, eltId)
{
parent.ExecuteCommand(index);
@@ -245,6 +269,9 @@
<div id="divRefresh" name="divRefresh" class="cssRefresh" style="display:none;">
<img alt="loading" src="../stdicons/icon_loading.gif">
</div>
+ <div id="divOpenTaskbarBtn" name="divOpenTaskbarBtn" class="cssOpenTaskbarBtn" style="display:none;" onmouseover="HoverButton('divOpenTaskbarBtn', null)" onmouseout="LeaveButton('divOpenTaskbarBtn')" onclick="OpenTaskPane()">
+ <img id="imgOpen" title="__#TASKBAROPENBUTTONTEXT#__" src="../stdicons/openButton.gif" style="margin: 4px 0px 0px 5px;" width=16 height=16>
+ </div>
<span id="ToolbarContent">
</span>
<div class="TextMetricsDiv" id="TextMetricsDiv">
Modified: trunk/MgDev/Web/src/viewerfiles/viewer.css
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/viewer.css 2010-03-04 17:03:41 UTC (rev 4630)
+++ trunk/MgDev/Web/src/viewerfiles/viewer.css 2010-03-05 05:55:13 UTC (rev 4631)
@@ -97,7 +97,18 @@
position: absolute;
top: 50px;
}
-
+div.cssRefresh
+{
+ position: absolute;
+ right:10px;
+ top:8px;
+}
+div.cssRefreshWithOpenBtn
+{
+ position: absolute;
+ right:35px;
+ top:8px;
+}
/*
Statusbar styles
*/
More information about the mapguide-commits
mailing list