View File | Revision Log | Show Annotations | Download File | View Changeset
/hippo/hippo-cms6/hippo-cms/branches/Branch-CMS-v6_05_xx/editor/src/site/workbench/transformers/top.xsl
Revision: 36981
Committed: Mon Nov 19 13:42:31 2012 UTC (7 years, 10 months ago) by abogaart
Content type: application/xml
File size: 13221 byte(s)
Log Message:
CMSSIX-296: onUnLoad all locks for the current user will be removed

File Contents

# Content
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!--
3 Copyright 2001-2008 Hippo (www.onehippo.com)
4
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 -->
17 <!--
18 Top frame
19 Loads the CMS framework javascript classes and startup script
20 Draws tab headers
21 -->
22
23 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
24 xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
25
26 <xsl:param name="username"/>
27 <xsl:param name="fullname"/>
28 <xsl:param name="editUri"/>
29 <xsl:param name="editType"/>
30 <xsl:param name="previewURL"/>
31 <xsl:param name="randomNr"/>
32 <xsl:param name="enableShelf"/>
33
34 <xsl:template match="/">
35 <html>
36
37 <head>
38 <title>Hippo CMS Tab Menu</title>
39 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
40 <link href="/workbench/css/top_layout_browser_generic.css" rel="stylesheet" type="text/css" media="all" />
41 <link href="/workbench/css/top_style_browser_generic.css" rel="stylesheet" type="text/css" media="all" />
42 <link href="/workbench/css/topstyle.css" rel="stylesheet" type="text/css" media="all" />
43
44 <!-- Class framework's -->
45 <scriptpackage id="external" inline="true">
46 <script type="text/javascript" src="/workbench/js/cfx/Cfx.js">&#160;</script>
47 <script type="text/javascript" src="/js/scriptaculous/lib/prototype.js">&#160;</script>
48 </scriptpackage>
49
50 <scriptpackage id="hippoFramework">
51
52 <!-- Load helper functions and classes -->
53 <script type="text/javascript" src="/workbench/js/hippo/util.js">&#160;</script>
54
55 <!-- Framework classes -->
56 <script type="text/javascript" src="/workbench/js/hippo/framework/logger.js">&#160;</script>
57 <script type="text/javascript" src="/workbench/js/hippo/framework/loggertranslations.js">&#160;</script>
58 <script type="text/javascript" src="/workbench/js/hippo/framework/start.js">&#160;</script>
59 <script type="text/javascript" src="/workbench/js/hippo/framework/context.js">&#160;</script>
60 <script type="text/javascript" src="/workbench/js/hippo/framework/services.js">&#160;</script>
61 <script type="text/javascript" src="/workbench/js/hippo/framework/components.js">&#160;</script>
62 <script type="text/javascript" src="/workbench/js/hippo/framework/events.js">&#160;</script>
63 <script type="text/javascript" src="/workbench/js/hippo/framework/event_util.js">&#160;</script>
64 <script type="text/javascript" src="/workbench/js/hippo/framework/remotecall.js">&#160;</script>
65 <script type="text/javascript" src="/workbench/js/hippo/framework/remotecall-ajax.js">&#160;</script>
66 <script type="text/javascript" src="/workbench/js/hippo/framework/authentication.js">&#160;</script>
67
68 <!-- non-standard framework source files from xml-configuration -->
69 <xsl:apply-templates select="/root/sources[@context='Framework']/*"/>
70 </scriptpackage>
71
72 <!-- Load framework configuration -->
73 <script type="text/javascript" src="/workbench/js/FrameworkConfiguration.js?{$randomNr}=">&#160;</script>
74
75 <!-- Application classes -->
76 <scriptpackage id="hippoApplication">
77 <script type="text/javascript" src="/workbench/js/hippo/cms.js">&#160;</script>
78 <script type="text/javascript" src="/workbench/js/hippo/workbench.js">&#160;</script>
79 <script type="text/javascript" src="/workbench/js/hippo/container.js">&#160;</script>
80 <script type="text/javascript" src="/workbench/js/hippo/perspectives.js">&#160;</script>
81 <script type="text/javascript" src="/workbench/js/hippo/views.js">&#160;</script>
82 <script type="text/javascript" src="/workbench/js/hippo/keyboard.js">&#160;</script>
83
84 <!-- non-standard application source files from xml-configuration -->
85 <xsl:apply-templates select="/root/sources[@context='Application']/*"/>
86 </scriptpackage>
87
88 <!-- Load application configuration -->
89 <script type="text/javascript" src="/workbench/js/ApplicationConfiguration.js?{$randomNr}=">&#160;</script>
90
91 <script language="javascript" type="text/javascript">
92 var documentIsOpen = "false";
93 function openDocument(state)
94 {
95 documentIsOpen = state;
96 }
97 var scheduledTasks = new Array();
98
99 <xsl:choose>
100 <xsl:when test="string-length($editUri) &gt; 0 and ($editType='binary-resource' or $editType='asset')">
101 scheduledTasks[scheduledTasks.length] = {'event':'assetselectSource','arguments':[{key:'url',val:'<xsl:value-of select="$editUri"/>'}]};
102 </xsl:when>
103 <xsl:when test="string-length($editUri) &gt; 0 and string-length($editType) &gt; 0">
104 scheduledTasks[scheduledTasks.length] = {'event':'editDocument','arguments':[{key:'url',val:'<xsl:value-of select="$editUri"/>'},{key:'type',val:'<xsl:value-of select="$editType"/>'}]};
105 </xsl:when>
106 <xsl:when test="string-length($editUri) &gt; 0 and string-length($editType) = 0">
107 scheduledTasks[scheduledTasks.length] = {'event':'selectSource','arguments':[{key:'url',val:'<xsl:value-of select="$editUri"/>'}]};
108 </xsl:when>
109 </xsl:choose>
110
111 //temporary workaround for 6.0.3.1 ONLY!
112 var CMS_PREVIEW_URL = '<xsl:value-of select="$previewURL"/>';
113
114 function removeLocks() {
115 window.top.window.frames['topframe'].fireCMSEvent('beforeUnloadCMS');
116 return true;
117 }
118 </script>
119
120 </head>
121
122 <body onbeforeunload="return removeLocks();">
123 <!-- start body-->
124 <div id="container_main">
125 <!-- start top-->
126 <div id="top">
127 <!-- start top left: logo & navigation-->
128 <div id="top_left_container" >
129 <xsl:if test="count(/root/application//perspectives/perspective) &gt; 5">
130 <!-- default width in css is to small to align all icons when > 5 -->
131 <xsl:attribute name="style">width:<xsl:value-of select="count(/root/application//perspectives/perspective) * 116"/>px;</xsl:attribute>
132 </xsl:if>
133 <div id="logo">
134 <img class="unselectable" unselectable="on" src="/skins/images/logo_top.gif" alt="Hippo CMS" width="170" height="27"/>
135 </div>
136 <!-- start top navigation-->
137 <div id="nav">
138 <xsl:apply-templates select="/root/application//perspectives/*"/>
139 </div>
140 <!-- end top navigation-->
141 </div>
142 <!-- end top left-->
143 <!-- start top right: user data & search field-->
144 <div id="top_right_container_top">
145 <table cellspacing="0" cellpadding="3" class="user_data" border="0">
146 <tr>
147 <td class="unselectable username" unselectable="on">
148 <!--div id="usernameBox"-->
149 <xsl:choose>
150 <xsl:when test="string-length($fullname)&gt;0">
151 <xsl:value-of select="$fullname"/>
152 </xsl:when>
153 <xsl:otherwise>
154 <xsl:value-of select="$username"/>
155 </xsl:otherwise>
156 </xsl:choose>
157 <!--/div-->
158 </td>
159 <td class="unselectable" unselectable="on">
160 <img src="/skins/images/user_top.gif" alt="" width="10" height="8"/>
161 </td>
162 <td class="unselectable" unselectable="on">
163 <a href="/login/logout" target="_top">
164 <i18n:text>topmenu.logoffmessage</i18n:text>
165 </a>
166 </td>
167 <td class="unselectable" unselectable="on">
168 <a href="/login/logout" target="_top" class="unselectable" unselectable="on"
169 onfocus="document.getElementById('logoffIcon').style.border='1px solid #666';"
170 onblur="document.getElementById('logoffIcon').style.border='0px';">
171 <img src="/skins/images/logout.gif" alt="log out" width="14" height="9"/>
172 </a>
173 </td>
174 </tr>
175 </table>
176 <form style="padding:0px; margin:0px;">
177 <xsl:attribute name="onsubmit">
178 <xsl:text>fireCMSEvent('doSearch',[{key:'reportID',val:'adv'},{key:'simpleSearch',val:document.getElementById('topSimpleSearch').value}]); return false;</xsl:text>
179 </xsl:attribute>
180 <table cellspacing="0" cellpadding="0" class="search_top" border="0">
181 <tr>
182 <td id="waitImage" style="visibility:hidden; vertical-align: bottom;">
183 <img class="unselectable" unselectable="on" src="/skin/images/clock_05.gif" alt="" width="26" height="24"/>
184 </td>
185 <td>&#160;</td>
186 <td class="search_top_divider_L"/>
187 <xsl:if test="$enableShelf='on'"><td class="form"><a href="#" onclick="window.open('/workbench/clipboard/external-shelf.html','shelfitems','width=600,height=400,resizable=yes,scrollbars=yes,status=no,toolbar=no');return false;" target="_blank"><img src="/skins/images/icons/16x16/folder_window.gif" border="0"/></a>&#160;</td></xsl:if>
188 <td class="form">
189 <input type="text" name="topSimpleSearch" id="topSimpleSearch"/>
190 </td>
191 <td class="form">&#160;</td>
192 <td class="form">
193 <button type="button" name="search" value="search" id="topSearchBtn">
194 <xsl:attribute name="onclick">
195 <xsl:text>fireCMSEvent('doSearch',[{key:'reportID',val:'adv'},{key:'simpleSearch',val:document.getElementById('topSimpleSearch').value}])</xsl:text>
196 </xsl:attribute>
197 <i18n:text>topmenu.toolbar.search</i18n:text>
198 </button>
199 </td>
200 <td class="search_top_divider_R"/>
201 </tr>
202 </table>
203 </form>
204 </div>
205 <!-- <div id="top_right_container_bottom">
206
207 </div>-->
208 <!-- end top right -->
209 </div>
210 <!-- end top -->
211 <!-- start horizontal gray divider & breadcrumb bar-->
212 <div id="top_divider">&#160;</div>
213 <div unselectable="on" id="top_path_bar" class="unselectable">
214 <i18n:text>topmenu.toolbar.home</i18n:text>
215 <span id="top_breadcrumb" unselectable="on" class="unselectable">&#160;</span>
216 <span id="search_result_summary" unselectable="on" class="unselectable"></span>
217 <span id="search_result_extended_summary" unselectable="on" class="unselectable"></span>
218 </div>
219 <!-- end horizontal gray divider -->
220 </div>
221 </body>
222 </html>
223 </xsl:template>
224
225 <xsl:template match="perspective">
226 <table unselectable="on" cellspacing="0" cellpadding="0" class="nav_tbl unselectable">
227 <xsl:attribute name="onclick">fireCMSEvent('setFocus',[{key:'perspectiveID',val:'<xsl:value-of select="@id"/>'}])</xsl:attribute>
228 <xsl:attribute name="onfocus">this.blur();</xsl:attribute>
229 <xsl:attribute name="ondblclick">fireCMSEvent('reloadActivePerspective',[]);</xsl:attribute>
230 <tr>
231 <td unselectable="on" id="{@id}_tab_top" class="tab_top_empty unselectable"></td>
232 </tr>
233 <tr>
234 <td class="unselectable" id="{@id}" unselectable="on">
235 <div class="perspectiveTab unselectable" unselectable="on">
236 <xsl:attribute name="style">
237 <xsl:text>background: url(/skins/images/icons/24x24/</xsl:text>
238 <xsl:value-of select="@icon"/>
239 <xsl:text>.gif) 4px 2px no-repeat;</xsl:text>
240 </xsl:attribute>
241 <a href="#" unselectable="on" class="unselectable">
242 <xsl:value-of select="@label"/>
243 </a>
244 </div>
245 </td>
246 </tr>
247 </table>
248 </xsl:template>
249
250 <xsl:template match="perspective" mode="top-path-bar">
251 </xsl:template>
252
253 <xsl:template match="source">
254 <xsl:if test="string-length(.)&gt;0">
255 <script type="text/javascript" src="{.}">&#160;</script>
256 </xsl:if>
257 </xsl:template>
258
259 <xsl:template match="*" />
260
261 </xsl:stylesheet>

Properties

Name Value
svn:eol-style native
svn:keywords Id