[mapguide-commits] r4633 - in sandbox/rfc71: . localized mapviewerjava mapviewernet mapviewerphp stdicons viewerfiles

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Mar 5 06:09:30 EST 2010


Author: jng
Date: 2010-03-05 06:09:29 -0500 (Fri, 05 Mar 2010)
New Revision: 4633

Added:
   sandbox/rfc71/stdicons/openButton.gif
Modified:
   sandbox/rfc71/
   sandbox/rfc71/localized/en
   sandbox/rfc71/mapviewerjava/toolbar.jsp
   sandbox/rfc71/mapviewernet/toolbar.aspx
   sandbox/rfc71/mapviewerphp/legend.php
   sandbox/rfc71/mapviewerphp/toolbar.php
   sandbox/rfc71/viewerfiles/mainframe.templ
   sandbox/rfc71/viewerfiles/taskbar.templ
   sandbox/rfc71/viewerfiles/toolbar.templ
   sandbox/rfc71/viewerfiles/viewer.css
Log:
Merge r4628 and r4631 to sandbox


Property changes on: sandbox/rfc71
___________________________________________________________________
Added: svn:mergeinfo
   + /trunk/MgDev/Web/src:4628-4631

Modified: sandbox/rfc71/localized/en
===================================================================
--- sandbox/rfc71/localized/en	2010-03-05 05:56:33 UTC (rev 4632)
+++ sandbox/rfc71/localized/en	2010-03-05 11:09:29 UTC (rev 4633)
@@ -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: sandbox/rfc71/mapviewerjava/toolbar.jsp
===================================================================
--- sandbox/rfc71/mapviewerjava/toolbar.jsp	2010-03-05 05:56:33 UTC (rev 4632)
+++ sandbox/rfc71/mapviewerjava/toolbar.jsp	2010-03-05 11:09:29 UTC (rev 4633)
@@ -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: sandbox/rfc71/mapviewernet/toolbar.aspx
===================================================================
--- sandbox/rfc71/mapviewernet/toolbar.aspx	2010-03-05 05:56:33 UTC (rev 4632)
+++ sandbox/rfc71/mapviewernet/toolbar.aspx	2010-03-05 11:09:29 UTC (rev 4633)
@@ -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: sandbox/rfc71/mapviewerphp/legend.php
===================================================================
--- sandbox/rfc71/mapviewerphp/legend.php	2010-03-05 05:56:33 UTC (rev 4632)
+++ sandbox/rfc71/mapviewerphp/legend.php	2010-03-05 11:09:29 UTC (rev 4633)
@@ -91,7 +91,7 @@
             $updateType = 0;
             // return only the layer structure, that is mainly groups/layers/layer-ids. Do not parse layer definitions.
             //
-            BuildClientSideTree($tree, null, "null", false, "layerData", null);
+            BuildClientSideTree($tree, null, "null", false, "layerData", null, null);
         }
         else
         {

Modified: sandbox/rfc71/mapviewerphp/toolbar.php
===================================================================
--- sandbox/rfc71/mapviewerphp/toolbar.php	2010-03-05 05:56:33 UTC (rev 4632)
+++ sandbox/rfc71/mapviewerphp/toolbar.php	2010-03-05 11:09:29 UTC (rev 4633)
@@ -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);
+}
+
 ?>

Copied: sandbox/rfc71/stdicons/openButton.gif (from rev 4631, trunk/MgDev/Web/src/stdicons/openButton.gif)
===================================================================
(Binary files differ)

Modified: sandbox/rfc71/viewerfiles/mainframe.templ
===================================================================
--- sandbox/rfc71/viewerfiles/mainframe.templ	2010-03-05 05:56:33 UTC (rev 4632)
+++ sandbox/rfc71/viewerfiles/mainframe.templ	2010-03-05 11:09:29 UTC (rev 4633)
@@ -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: sandbox/rfc71/viewerfiles/taskbar.templ
===================================================================
--- sandbox/rfc71/viewerfiles/taskbar.templ	2010-03-05 05:56:33 UTC (rev 4632)
+++ sandbox/rfc71/viewerfiles/taskbar.templ	2010-03-05 11:09:29 UTC (rev 4633)
@@ -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: sandbox/rfc71/viewerfiles/toolbar.templ
===================================================================
--- sandbox/rfc71/viewerfiles/toolbar.templ	2010-03-05 05:56:33 UTC (rev 4632)
+++ sandbox/rfc71/viewerfiles/toolbar.templ	2010-03-05 11:09:29 UTC (rev 4633)
@@ -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: sandbox/rfc71/viewerfiles/viewer.css
===================================================================
--- sandbox/rfc71/viewerfiles/viewer.css	2010-03-05 05:56:33 UTC (rev 4632)
+++ sandbox/rfc71/viewerfiles/viewer.css	2010-03-05 11:09:29 UTC (rev 4633)
@@ -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