- Improve logging mechanism

- Manage errors on editor loading.
This commit is contained in:
Paulo Veiga
2009-06-11 17:43:45 +00:00
parent fab4f67e9d
commit 3114b448ea
21 changed files with 3118 additions and 774 deletions

View File

@@ -312,7 +312,8 @@ public class UserAgent implements Serializable {
public boolean isBrowserSupported() {
// Is it a supported browser ?.
final UserAgent.Product product = this.getProduct();
boolean result = product == UserAgent.Product.FIREFOX && this.isVersionGreatedOrEqualThan(1, 5);
boolean result = product == UserAgent.Product.FIREFOX && ((this.isVersionGreatedOrEqualThan(1, 5) && this.getOs() != UserAgent.OS.MAC) || (this.isVersionGreatedOrEqualThan(3, 0) && this.getOs() == UserAgent.OS.MAC));
result = result || product == UserAgent.Product.EXPLORER && this.isVersionGreatedOrEqualThan(6, 0) && this.getOs() == UserAgent.OS.WINDOWS;
result = result || product == UserAgent.Product.OPERA && this.isVersionGreatedOrEqualThan(9, 2);
return result;

View File

@@ -70,6 +70,7 @@ YES=yes
NO=no
EDITOR.LOADING=Loading ...
EDITOR.ERROR_LOADING=An unexpected error has occurred initializing this page. <br/>We'll solve this problem as soon as possible. Please, click <a href="mymaps.htm">here</a> to return to your mindmap list.
SITE.TITLE=WiseMapping
SITE.SLOGAN=Visual Thinking Evolution
SAVE=Save

View File

@@ -24,7 +24,7 @@ html {
top: 30px;
}
#loadingContainer {
#waitingContainer,#errorContainer {
position: relative;
top: 80px;
height: 120px; /*background: whitesmoke;*/
@@ -36,7 +36,12 @@ html {
}
#loadingContainer .loadingText {
#errorContainer {
width: 400px;
border: 1px solid red;
}
#waitingContainer .loadingText {
position: relative;
top: 50%;
margin-top: -35px;
@@ -47,9 +52,32 @@ html {
float: left;
}
#loadingContainer .loadingIcon {
#errorContainer .loadingText {
position: relative;
background: url( ../images/loadingIcon.gif ) no-repeat;
top: 50%;
margin-top: -80px;
font-size: 15px;
font-weight: bold;
vertical-align: text-bottom;
height: 30px;
float: right;
padding-left:120px;
}
#waitingContainer .loadingIcon {
position: relative;
background: url(../images/loadingIcon.gif) no-repeat;
top: 50%;
margin-top: -65px;
height: 100px;
width: 121px;
float: left;
clear: both;
}
#errorContainer .loadingIcon {
position: relative;
background: url(../images/errorIcon.png) no-repeat;
top: 50%;
margin-top: -65px;
height: 100px;
@@ -107,7 +135,7 @@ div#toolbar .buttonContainer {
border: 1px solid #BBB4D6;
padding: 2px;
margin: 1px;
padding-bottom:4px;
padding-bottom: 4px;
}
.buttonContainer legend {
@@ -118,8 +146,8 @@ div#toolbar .buttonContainer {
font-size: 11px;
text-align: right;
margin: 0px;
-moz-margin-start:7px;
-moz-margin-end:7px;
-moz-margin-start: 7px;
-moz-margin-end: 7px;
}
div#toolbar .button {
@@ -128,7 +156,7 @@ div#toolbar .button {
float: left;
margin: 0px 2px 2px 2px;
cursor: pointer;
text-align:center;
text-align: center;
}
div#toolbar .comboButton {
@@ -150,22 +178,21 @@ div#toolbar .comboButton:hover {
width: 34px;
}
div#toolbar .button img{
div#toolbar .button img {
width: 30px;
height: 30px;
border:0;
border: 0;
}
div#toolbar .toolbarLabel{
position:relative;
top:55%;
text-align:center;
width:34px;
height:36px;
font-size:10px;
div#toolbar .toolbarLabel {
position: relative;
top: 55%;
text-align: center;
width: 34px;
height: 36px;
font-size: 10px;
}
.mapSeparator {
width: 1px;
height: 20px;
@@ -175,151 +202,149 @@ div#toolbar .toolbarLabel{
}
div#file, div#zoom, div#node, div#font, div#share {
position:absolute;
top:-6px;
left:3px;
position: absolute;
top: -6px;
left: 3px;
}
div#zoom {
left:229px;
left: 229px;
}
div#node {
left:311px;
left: 311px;
}
div#font {
left:619px;
/*left:581px;*/
left: 619px; /*left:581px;*/
}
div#share {
left:815px;
/*left:777px;*/
left: 815px; /*left:777px;*/
}
div#saveButton {
background: url( ../images/save.png) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/save.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
}
div#discardButton {
background: url( ../images/close.png) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/close.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
}
div#history {
background: url( ../images/history.png) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/history.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
}
div#print {
background: url( ../images/file_printer.png) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/file_printer.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
}
div#undoEdition {
background: url( ../images/file_undo_dis.png) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/file_undo_dis.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
}
div#redoEdition {
background: url( ../images/file_redo_dis.png) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/file_redo_dis.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
}
#export {
background: url( ../images/file_export.png) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/file_export.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
}
div#zoomIn {
background: url( ../images/zoom_in.png ) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/zoom_in.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
}
#zoomOut {
background: url( ../images/zoom_out.png ) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/zoom_out.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
}
#addTopic {
background: url( ../images/topic_add.png ) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/topic_add.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
}
#deleteTopic {
background: url( ../images/topic_delete.png ) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/topic_delete.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
}
div#topicColor {
background: url( ../images/topic_bgcolor.png ) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/topic_bgcolor.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
z-index: 4;
}
div#topicIcon {
background: url( ../images/topic_icon.png ) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/topic_icon.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
z-index: 4;
}
div#topicNote {
background: url( ../images/note.png ) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/note.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
z-index: 4;
}
div#topicLink {
background: url( ../images/topic_link.png ) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/topic_link.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
z-index: 4;
}
div#topicNote {
background-image: url( ../images/note.png );
behavior: url( ../css/iepngfix.htc );
background-image: url(../images/note.png);
behavior: url(../css/iepngfix.htc);
z-index: 4;
}
#topicBorder {
background: url( ../images/topic_border.png ) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/topic_border.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
width: 30px;
}
#fontFamily {
background: url( ../images/font_type.png ) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/font_type.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
}
#topicShape {
background: url( ../images/topic_shape.png ) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/topic_shape.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
width: 30px;
}
#fontBold {
background: url( ../images/font_bold.png ) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/font_bold.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
}
#fontItalic {
background: url( ../images/font_italic.png ) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/font_italic.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
}
div#fontColor {
background: url( ../images/font_color.png ) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/font_color.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
z-index: 4;
}
#fontSize {
float: left;
background: url( ../images/font_size.png ) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/font_size.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
}
#font-size {
@@ -336,19 +361,19 @@ div#fontColor {
}
#shareIt {
background: url( ../images/collab_share.png ) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/collab_share.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
}
#publishIt {
background: url( ../images/collab_publish.png) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/collab_publish.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
}
#tagIt {
background: url( ../images/collab_tag.png) no-repeat center top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/collab_tag.png) no-repeat center top;
behavior: url(../css/iepngfix.htc);
}
#colorPalette {
@@ -414,7 +439,7 @@ div#actionsContainer {
width: 190px;
right: 0;
margin: 10px;
float:left;
float: left;
}
#actionsContainer .button {
@@ -447,17 +472,16 @@ div#actionsContainer {
text-decoration: none;
}
#actionsContainer .buttonStart {
width: 6px;
height: 25px;
background: url( ../images/btnStart2.png ) no-repeat left top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/btnStart2.png) no-repeat left top;
behavior: url(../css/iepngfix.htc);
float: left;
}
#actionsContainer .buttonBody {
background: url( ../images/btnBody2.png );
background: url(../images/btnBody2.png);
float: left;
height: 18px;
padding: 0px 5px;
@@ -469,8 +493,8 @@ div#actionsContainer {
#actionsContainer .buttonEnd {
width: 7px;
height: 23px;
background: url( ../images/btnEnd2.png ) no-repeat right top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/btnEnd2.png) no-repeat right top;
behavior: url(../css/iepngfix.htc);
float: left;
}
@@ -489,8 +513,8 @@ div#footerEditor {
width: 80px;
float: right;
margin: 5px;
background: url( ../images/logo-vsmall.png ) no-repeat right top;
behavior: url( ../css/iepngfix.htc );
background: url(../images/logo-vsmall.png) no-repeat right top;
behavior: url(../css/iepngfix.htc);
}
#footerEditor .msgLoggerContainer {
@@ -508,14 +532,14 @@ div#msgStart {
float: left;
height: 36px;
width: 16px;
background: url( ../images/footerStart.png ) no-repeat right top;
background: url(../images/footerStart.png) no-repeat right top;
}
div#msgEnd {
float: left;
height: 36px;
width: 16px;
background: url( ../images/footerEnd.png ) no-repeat right top;
background: url(../images/footerEnd.png) no-repeat right top;
}
@@ -523,7 +547,7 @@ div#msgLogger {
float: left;
height: 36px;
width: 500px;
background: url( ../images/footerBody.png ) repeat-x right top;
background: url(../images/footerBody.png) repeat-x right top;
text-align: center;
white-space: nowrap;
padding: 5px;
@@ -567,7 +591,7 @@ ol#toc li {
}
ol#toc a {
background: #fff url( ../images/tab4.png );
background: #fff url(../images/tab4.png);
color: #008;
display: block;
float: left;
@@ -597,7 +621,7 @@ ol#toc li.current span {
}
ol#toc span {
background: #fff url( ../images/tab4.png ) 100% 0;
background: #fff url(../images/tab4.png) 100% 0;
display: block;
line-height: 2em;
padding-right: 10px;
@@ -612,7 +636,7 @@ ol#toc span {
}
#workspaceContainer {
background: url( ../images/grid.gif ) bottom left repeat !important;
background: url(../images/grid.gif) bottom left repeat !important;
}
@@ -653,8 +677,8 @@ span#lastSaved {
opacity: 0.9;
cursor: move;
background-color: #69686F;
filter: alpha( opacity = 90 );
color:#000c8f;
filter: alpha(opacity = 90);
color: #000c8f;
}
#tryEditorWarning a {
@@ -681,7 +705,7 @@ div#helpContainer {
padding: 20px;
cursor: move;
background-color: #69686F;
filter: alpha( opacity = 90 );
filter: alpha(opacity = 90);
}
div#helpContent h1 {
@@ -703,7 +727,7 @@ div.close {
top: 7px;
right: 10px;
cursor: pointer;
background: url( ../images/close12_1.gif ) bottom left no-repeat !important;
background: url(../images/close12_1.gif) bottom left no-repeat !important;
}
div#helpContent li {
@@ -716,5 +740,5 @@ div#helpContent li {
div#small_error_icon {
padding-left: 18px;
min-height: 16px;
background: url( ../images/error_icon.png ) bottom left no-repeat !important;
background: url(../images/error_icon.png) bottom left no-repeat !important;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1,22 +1,22 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
*/
/*Extend mootools known keys*/
ExtendedKeys = {
'insert': 45,
@@ -443,8 +443,14 @@ function afterWisemapLoading()
shapeTypePanel();
fontSizePanel();
// Disable loading dialog ...
setTimeout("loadingDialog.deactivate();", 500);
// If not problem has occured, I close the dialod ...
var closeDialog = function(){
if(!window.hasUnexpectedErrors)
{
waitDialog.deactivate();
}
}.delay(500);
}
function buildIconChooser() {
@@ -497,36 +503,7 @@ function buildMindmapDesigner()
var monitor = new core.Monitor($('msgLoggerContainer'), $('msgLogger'));
core.Monitor.setInstance(monitor);
// Initialize logger...
core.Logger.init(window.LoggerService);
var container = $('mindplot');
var footer = $('footerEditor');
if (core.UserAgent.isIframeWorkaroundRequired())
{
var iframe = document.createElement('iframe');
iframe.id = "mindplotIFrame";
var top = container.offsetTop;
var bottom = footer.offsetTop;
iframe.setStyle('width', "100%");
iframe.setStyle('height', bottom - top + "px");
iframe.setStyle('overflow', "hidden");
iframe.setStyle('border', "none");
container.appendChild(iframe);
var mapContainer = "<div id='mindplot' style='background: url( ../images/grid.gif ) bottom left repeat !important;'></div><script>function styleMe() {" +
"var small_head = document.getElementsByTagName('head').item(0);" +
"var thestyle = document.createElement('link');" +
"thestyle.setAttribute('rel', 'stylesheet');thestyle.setAttribute('type', 'text/css');thestyle.setAttribute('href', '../css/bubble.css');small_head.appendChild(thestyle);}; styleMe();</script>";
var doc = iframe.contentDocument;
if (doc == undefined || doc == null)
doc = iframe.contentWindow.document;
doc.open();
doc.write(mapContainer);
doc.close();
$(doc.body).setStyle('margin', '0px');
container = doc.getElementById('mindplot');
}
// Initialize Editor ...
var persistantManager = new mindplot.PersistanceManager(window.MapEditorService);
@@ -534,7 +511,7 @@ function buildMindmapDesigner()
var screenWidth = window.getWidth();
var screenHeight = window.getHeight();
// Positionate node ... h
// Positionate node ...
// header - footer
screenHeight = screenHeight - 90 - 61;

View File

@@ -1,21 +1,21 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
*/
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
*/
function afterCoreLoading()
{
@@ -34,7 +34,6 @@ function afterWisemapLoading()
{
buildMindmapDesigner();
$('zoomIn').addEvent('click', function(event) {
designer.zoomIn();
});
@@ -43,8 +42,16 @@ function afterWisemapLoading()
designer.zoomOut();
});
// Disable loading dialog ...
setTimeout("loadingDialog.deactivate();", 500);
// If not problem has occured, I close the dialod ...
var closeDialog = function() {
if (!window.hasUnexpectedErrors)
{
waitDialog.deactivate();
}
}.delay(500);
}
function setCurrentColorPicker(colorPicker)
@@ -56,36 +63,7 @@ function setCurrentColorPicker(colorPicker)
function buildMindmapDesigner()
{
// Initialize logger...
core.Logger.init(window.LoggerService);
var container = $('mindplot');
var footer = $('embFooter');
if (core.UserAgent.isIframeWorkaroundRequired())
{
var iframe = document.createElement('iframe');
iframe.id = "mindplotIFrame";
var top = container.offsetTop;
var bottom = footer.offsetTop;
iframe.setStyle('width', "100%");
iframe.setStyle('height', bottom - top + "px");
iframe.setStyle('overflow', "hidden");
iframe.setStyle('border', "none");
container.appendChild(iframe);
var mapContainer = "<div id='mindplot' style='background: url( ../images/grid.gif ) bottom left repeat !important;'></div><script>function styleMe() {" +
"var small_head = document.getElementsByTagName('head').item(0);" +
"var thestyle = document.createElement('link');" +
"thestyle.setAttribute('rel', 'stylesheet');thestyle.setAttribute('type', 'text/css');thestyle.setAttribute('href', '../css/bubble.css');small_head.appendChild(thestyle);}; styleMe();</script>";
var doc = iframe.contentDocument;
if (doc == undefined || doc == null)
doc = iframe.contentWindow.document;
doc.open();
doc.write(mapContainer);
doc.close();
$(doc.body).setStyle('margin', '0px');
container = doc.getElementById('mindplot');
}
// Initialize Editor ...
var persistantManager = new mindplot.PersistanceManager(window.MapEditorService);
@@ -93,10 +71,6 @@ function buildMindmapDesigner()
var screenWidth = window.getWidth();
var screenHeight = window.getHeight();
// Positionate node ...
// header - footer
screenHeight = screenHeight;
// body margin ...
editorProperties.width = screenWidth;
editorProperties.height = screenHeight;

View File

@@ -9,8 +9,8 @@
<p>Although you can use our site with that browser, some features may not be functional.</p>
WiseMapping is optimized for use with:
<ul>
<li>Internet Explorer 6.0 or greater</li>
<li>Firefox 1.5 or greater</li>
<li>Internet Explorer 7.0 or greater</li>
<li>Firefox 3.0 or greater</li>
<li>Opera 9.21 or greater</li>
</ul>

View File

@@ -23,10 +23,19 @@
</div>
</div>
<script type="text/javascript">
//Dialog box display ...
var loadingDialog = new core.WaitDialog('waitDialog');
addLightboxMarkup();
loadingDialog.activate(true);
var waitDialog = new core.WaitDialog();
waitDialog.activate(true, $("waitDialog"));
$(window).addEvent("error", function(event) {
// Show error dialog ...
waitDialog.changeContent($("errorDialog"), false);
return false;
});
var mapId = '${mindmap.id}';
var mapXml = '${mapXml}';
var editorProperties = {zoom:${zoom}};

View File

@@ -20,6 +20,9 @@
<link rel="stylesheet" type="text/css" href="../css/bubble.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/thirdparty.css">
<script type="text/javascript" src="../dwr/engine.js"></script>
<script type="text/javascript" src="../dwr/interface/LoggerService.js"></script>
<script type='text/javascript' src='../js/wiseLibrary.js'></script>
<script type='text/javascript' src='../js/core.js'></script>
@@ -38,18 +41,35 @@
</form>
<div id="waitDialog" style="display:none">
<div id="loadingContainer">
<div id="waitingContainer">
<div class="loadingIcon"></div>
<div class="loadingText">
<spring:message code="EDITOR.LOADING"/>
</div>
</div>
</div>
<div id="errorDialog" style="display:none">
<div id="errorContainer">
<div class="loadingIcon"></div>
<div class="loadingText">
<spring:message code="EDITOR.ERROR_LOADING"/>
</div>
</div>
</div>
<script type="text/javascript">
//Dialog box display ...
var loadingDialog = new core.WaitDialog('waitDialog');
addLightboxMarkup();
loadingDialog.activate(true);
var waitDialog = new core.WaitDialog();
waitDialog.activate(true, $("waitDialog"));
$(window).addEvent("error", function(event) {
// Show error dialog ...
waitDialog.changeContent($("errorDialog"), false);
return false;
});
var mapId = '${mindmap.id}';
var mapXml = '${mapXml}';
var editorProperties = ${mindmap.properties};
@@ -100,162 +120,163 @@
</div>
<div id="toolbar">
<div id="editTab" class="tabContent">
<div id="file" class="buttonContainer" title="<spring:message code="FILE"/>">
<fieldset>
<legend>
<spring:message code="FILE"/>
</legend>
<div id="saveButton" class="button" title="<spring:message code="SAVE"/>">
<div class="toolbarLabel"><p><spring:message code="SAVE"/></p></div>
</div>
<div id="discardButton" class="button" title="<spring:message code="CLOSE"/>">
<div class="toolbarLabel"><p><spring:message code="CLOSE"/></p></div>
</div>
<div id="undoEdition" class="button" title="<spring:message code="UNDO_EDITION"/>">
<div class="toolbarLabel"><p><spring:message code="UNDO"/></p></div>
</div>
<div id="redoEdition" class="button" title="<spring:message code="REDO_EDITION"/>">
<div class="toolbarLabel"><p><spring:message code="REDO"/></p></div>
</div>
<a id="printAnchor" href="javascript:printMap();" title="<spring:message code="PRINT"/>">
<div id="print" class="button" title="<spring:message code="PRINT"/>">
<div class="toolbarLabel"><p><spring:message code="PRINT"/></p></div>
</div>
</a>
<a id="exportAnchor" href="export.htm?mapId=${mindmap.id}" rel="moodalbox 600px 400px"
title="<spring:message code="EXPORT_DETAILS"/>">
<div id="export" class="button" title="<spring:message code="EXPORT"/>">
<div class="toolbarLabel"><p><spring:message code="EXPORT"/></p></div>
</div>
</a>
</fieldset>
</div>
<div id="zoom" class="buttonContainer" title="Zoom In">
<fieldset>
<legend>
<spring:message code="ZOOM"/>
</legend>
<div id="zoomIn" class="button" title="<spring:message code="ZOOM_IN"/>">
<div class="toolbarLabel"><p><spring:message code="IN"/></p></div>
</div>
<div id="zoomOut" class="button" title="<spring:message code="ZOOM_OUT"/>">
<div class="toolbarLabel"><p><spring:message code="OUT"/></p></div>
</div>
</fieldset>
</div>
<div id="node" class="buttonContainer" title="Node Properties">
<fieldset>
<legend>
<spring:message code="TOPIC"/>
</legend>
<div id="topicShape" class="button comboButton" title="<spring:message code="TOPIC_SHAPE"/>">
<div class="toolbarLabel"><p><spring:message code="SHAPE"/></p></div>
</div>
<div id="addTopic" class="button" title="<spring:message code="TOPIC_ADD"/>">
<div class="toolbarLabel"><p><spring:message code="ADD"/></p></div>
</div>
<div id="deleteTopic" class="button" title="<spring:message code="TOPIC_DELETE"/>">
<div class="toolbarLabel"><p><spring:message code="DELETE"/></p></div>
</div>
<div id="topicBorder" class="button comboButton" title="<spring:message code="TOPIC_BORDER_COLOR"/>">
<div class="toolbarLabel"><p><spring:message code="BORDER"/></p></div>
</div>
<div id="topicColor" class="button comboButton" title="<spring:message code="TOPIC_BACKGROUND_COLOR"/>">
<div class="toolbarLabel"><p><spring:message code="COLOR"/></p></div>
</div>
<div id="topicIcon" class="button comboButton" title="<spring:message code="TOPIC_ICON"/>">
<div class="toolbarLabel"><p><spring:message code="ICON"/></p></div>
</div>
<div id="topicNote" class="button comboButton" title="<spring:message code="TOPIC_NOTE"/>">
<div class="toolbarLabel"><p><spring:message code="NOTE"/></p></div>
</div>
<div id="topicLink" class="button" title="<spring:message code="TOPIC_LINK"/>">
<div class="toolbarLabel"><p><spring:message code="LINK"/></p></div>
</div>
</fieldset>
</div>
<div id="font" class="buttonContainer" title="Font Properties">
<fieldset>
<legend>
<spring:message code="FONT"/>
</legend>
<div id="fontFamily" class="button comboButton" title="<spring:message code="FONT_TYPE"/>">
<div class="toolbarLabel"><p><spring:message code="TYPE"/></p></div>
</div>
<div id="fontSize" class="button comboButton" title="<spring:message code="FONT_SIZE"/>">
<div class="toolbarLabel"><p><spring:message code="SIZE"/></p></div>
</div>
<div id="fontBold" class="button" title="<spring:message code="FONT_BOLD"/>">
<div class="toolbarLabel"><p><spring:message code="BOLD"/></p></div>
</div>
<div id="fontItalic" class="button" title="<spring:message code="FONT_ITALIC"/>">
<div class="toolbarLabel"><p><spring:message code="ITALIC"/></p></div>
</div>
<div id="fontColor" class="button comboButton" title="<spring:message code="FONT_COLOR"/>">
<div class="toolbarLabel"><p><spring:message code="COLOR"/></p></div>
</div>
</fieldset>
</div>
<div id="share" class="buttonContainer" title="Share Properties">
<c:choose>
<c:when test="${editorTryMode==false}">
<div id="editTab" class="tabContent">
<div id="file" class="buttonContainer" title="<spring:message code="FILE"/>">
<fieldset>
<legend>
<spring:message code="COLLABORATION"/>
<spring:message code="FILE"/>
</legend>
<a id="tagAnchor" href="tags.htm?mapId=${mindmap.id}" rel="moodalbox 400px 200px wizard"
title="<spring:message code="TAGS_DETAILS"/>">
<div id="tagIt" class="button" title="<spring:message code="TAG"/>">
<div class="toolbarLabel"><p><spring:message code="TAG"/></p></div>
<div id="saveButton" class="button" title="<spring:message code="SAVE"/>">
<div class="toolbarLabel"><p><spring:message code="SAVE"/></p></div>
</div>
<div id="discardButton" class="button" title="<spring:message code="CLOSE"/>">
<div class="toolbarLabel"><p><spring:message code="CLOSE"/></p></div>
</div>
<div id="undoEdition" class="button" title="<spring:message code="UNDO_EDITION"/>">
<div class="toolbarLabel"><p><spring:message code="UNDO"/></p></div>
</div>
<div id="redoEdition" class="button" title="<spring:message code="REDO_EDITION"/>">
<div class="toolbarLabel"><p><spring:message code="REDO"/></p></div>
</div>
<a id="printAnchor" href="javascript:printMap();" title="<spring:message code="PRINT"/>">
<div id="print" class="button" title="<spring:message code="PRINT"/>">
<div class="toolbarLabel"><p><spring:message code="PRINT"/></p></div>
</div>
</a>
<c:choose>
<c:when test="${mindmap.owner==user}">
<a id="shareAnchor" href="<c:out value="${shareMap}"/>&mapId=${mindmap.id}"
rel="moodalbox 780px 530px wizard" title="<spring:message code="SHARE_DETAILS"/>">
<div id="shareIt" class="button" title="<spring:message code="COLLABORATION"/>">
<div class="toolbarLabel"><p><spring:message code="SHARE"/></p></div>
</div>
</a>
<a id="publishAnchor" href="publish.htm?mapId=${mindmap.id}" rel="moodalbox 600px 400px wizard"
title="<spring:message code="PUBLISH_MSG"/>">
<div id="publishIt" class="button" title="<spring:message code="PUBLISH"/>">
<div class="toolbarLabel"><p><spring:message code="PUBLISH"/></p></div>
</div>
</a>
</c:when>
</c:choose>
<a id="historyAnchor" href="history.htm?action=list&mapId=${mindmap.id}"
rel="moodalbox 600px 400px wizard" title="<spring:message code="HISTORY_MSG"/>">
<div id="history" class="button" title="<spring:message code="HISTORY_MSG"/>">
<div class="toolbarLabel"><p><spring:message code="HISTORY"/></p></div>
<a id="exportAnchor" href="export.htm?mapId=${mindmap.id}" rel="moodalbox 600px 400px"
title="<spring:message code="EXPORT_DETAILS"/>">
<div id="export" class="button" title="<spring:message code="EXPORT"/>">
<div class="toolbarLabel"><p><spring:message code="EXPORT"/></p></div>
</div>
</a>
</fieldset>
</c:when>
<c:otherwise>
</div>
<div id="zoom" class="buttonContainer" title="Zoom In">
<fieldset>
<legend>
<spring:message code="COLLABORATION"/>
<spring:message code="ZOOM"/>
</legend>
<div id="tagIt" class="button" title="<spring:message code="TAG"/>">
<div class="toolbarLabel"><p><spring:message code="TAG"/></p></div>
<div id="zoomIn" class="button" title="<spring:message code="ZOOM_IN"/>">
<div class="toolbarLabel"><p><spring:message code="IN"/></p></div>
</div>
<div id="shareIt" class="button" title="<spring:message code="COLLABORATE"/>">
<div class="toolbarLabel"><p><spring:message code="SHARE"/></p></div>
</div>
<div id="publishIt" class="button" title="<spring:message code="PUBLISH"/>">
<div class="toolbarLabel"><p><spring:message code="PUBLISH"/></p></div>
</div>
<div id="history" class="button" title="<spring:message code="HISTORY_MSG"/>">
<div class="toolbarLabel"><p><spring:message code="HISTORY"/></p></div>
<div id="zoomOut" class="button" title="<spring:message code="ZOOM_OUT"/>">
<div class="toolbarLabel"><p><spring:message code="OUT"/></p></div>
</div>
</fieldset>
</c:otherwise>
</c:choose>
</div>
</div>
</div>
<div id="node" class="buttonContainer" title="Node Properties">
<fieldset>
<legend>
<spring:message code="TOPIC"/>
</legend>
<div id="topicShape" class="button comboButton" title="<spring:message code="TOPIC_SHAPE"/>">
<div class="toolbarLabel"><p><spring:message code="SHAPE"/></p></div>
</div>
<div id="addTopic" class="button" title="<spring:message code="TOPIC_ADD"/>">
<div class="toolbarLabel"><p><spring:message code="ADD"/></p></div>
</div>
<div id="deleteTopic" class="button" title="<spring:message code="TOPIC_DELETE"/>">
<div class="toolbarLabel"><p><spring:message code="DELETE"/></p></div>
</div>
<div id="topicBorder" class="button comboButton" title="<spring:message code="TOPIC_BORDER_COLOR"/>">
<div class="toolbarLabel"><p><spring:message code="BORDER"/></p></div>
</div>
<div id="topicColor" class="button comboButton" title="<spring:message code="TOPIC_BACKGROUND_COLOR"/>">
<div class="toolbarLabel"><p><spring:message code="COLOR"/></p></div>
</div>
<div id="topicIcon" class="button comboButton" title="<spring:message code="TOPIC_ICON"/>">
<div class="toolbarLabel"><p><spring:message code="ICON"/></p></div>
</div>
<div id="topicNote" class="button comboButton" title="<spring:message code="TOPIC_NOTE"/>">
<div class="toolbarLabel"><p><spring:message code="NOTE"/></p></div>
</div>
<div id="topicLink" class="button" title="<spring:message code="TOPIC_LINK"/>">
<div class="toolbarLabel"><p><spring:message code="LINK"/></p></div>
</div>
</fieldset>
</div>
<div id="font" class="buttonContainer" title="Font Properties">
<fieldset>
<legend>
<spring:message code="FONT"/>
</legend>
<div id="fontFamily" class="button comboButton" title="<spring:message code="FONT_TYPE"/>">
<div class="toolbarLabel"><p><spring:message code="TYPE"/></p></div>
</div>
<div id="fontSize" class="button comboButton" title="<spring:message code="FONT_SIZE"/>">
<div class="toolbarLabel"><p><spring:message code="SIZE"/></p></div>
</div>
<div id="fontBold" class="button" title="<spring:message code="FONT_BOLD"/>">
<div class="toolbarLabel"><p><spring:message code="BOLD"/></p></div>
</div>
<div id="fontItalic" class="button" title="<spring:message code="FONT_ITALIC"/>">
<div class="toolbarLabel"><p><spring:message code="ITALIC"/></p></div>
</div>
<div id="fontColor" class="button comboButton" title="<spring:message code="FONT_COLOR"/>">
<div class="toolbarLabel"><p><spring:message code="COLOR"/></p></div>
</div>
</fieldset>
</div>
<div id="share" class="buttonContainer" title="Share Properties">
<c:choose>
<c:when test="${editorTryMode==false}">
<fieldset>
<legend>
<spring:message code="COLLABORATION"/>
</legend>
<a id="tagAnchor" href="tags.htm?mapId=${mindmap.id}" rel="moodalbox 400px 200px wizard"
title="<spring:message code="TAGS_DETAILS"/>">
<div id="tagIt" class="button" title="<spring:message code="TAG"/>">
<div class="toolbarLabel"><p><spring:message code="TAG"/></p></div>
</div>
</a>
<c:choose>
<c:when test="${mindmap.owner==user}">
<a id="shareAnchor" href="<c:out value="${shareMap}"/>&mapId=${mindmap.id}"
rel="moodalbox 780px 530px wizard" title="<spring:message code="SHARE_DETAILS"/>">
<div id="shareIt" class="button" title="<spring:message code="COLLABORATION"/>">
<div class="toolbarLabel"><p><spring:message code="SHARE"/></p></div>
</div>
</a>
<a id="publishAnchor" href="publish.htm?mapId=${mindmap.id}"
rel="moodalbox 600px 400px wizard"
title="<spring:message code="PUBLISH_MSG"/>">
<div id="publishIt" class="button" title="<spring:message code="PUBLISH"/>">
<div class="toolbarLabel"><p><spring:message code="PUBLISH"/></p></div>
</div>
</a>
</c:when>
</c:choose>
<a id="historyAnchor" href="history.htm?action=list&mapId=${mindmap.id}"
rel="moodalbox 600px 400px wizard" title="<spring:message code="HISTORY_MSG"/>">
<div id="history" class="button" title="<spring:message code="HISTORY_MSG"/>">
<div class="toolbarLabel"><p><spring:message code="HISTORY"/></p></div>
</div>
</a>
</fieldset>
</c:when>
<c:otherwise>
<fieldset>
<legend>
<spring:message code="COLLABORATION"/>
</legend>
<div id="tagIt" class="button" title="<spring:message code="TAG"/>">
<div class="toolbarLabel"><p><spring:message code="TAG"/></p></div>
</div>
<div id="shareIt" class="button" title="<spring:message code="COLLABORATE"/>">
<div class="toolbarLabel"><p><spring:message code="SHARE"/></p></div>
</div>
<div id="publishIt" class="button" title="<spring:message code="PUBLISH"/>">
<div class="toolbarLabel"><p><spring:message code="PUBLISH"/></p></div>
</div>
<div id="history" class="button" title="<spring:message code="HISTORY_MSG"/>">
<div class="toolbarLabel"><p><spring:message code="HISTORY"/></p></div>
</div>
</fieldset>
</c:otherwise>
</c:choose>
</div>
</div>
</div>
<div id="mindplot"></div>
@@ -272,14 +293,6 @@
<div id="msgEnd"></div>
</div>
</div>
<%if (userAgent != null && !(userAgent.getOs() == UserAgent.OS.MAC && userAgent.getProduct() == UserAgent.Product.FIREFOX && userAgent.getVersionMajor() < 3)) { %>
<div id="helpButton"
style="text-align:center; width:90px; height:20px; background-color:#f5f5f5; border: 1px solid #BBB6D6; cursor:pointer; padding-left:5px; margin-left:3px;">
<div style="float:left; position:relative; top:50%; margin-top:-8px; margin-left:15px;"><img
src="../images/help.png"/></div>
<div style="float:left; position:relative; top:50%; margin-top:-8px; margin-left:4px;">Help</div>
</div>
<% } else {%>
<div id="helpButtonFirstSteps"
style="text-align:center; width:90px; height:20px; background-color:#f5f5f5; border: 1px solid #BBB6D6; cursor:pointer; padding-left:5px; margin-left:3px;float:left;">
<div style="float:left; position:relative; top:50%; margin-top:-8px; margin-left:5px;"><img
@@ -292,7 +305,6 @@
src="../images/help.png"/></div>
<div style="float:left; position:relative; top:50%; margin-top:-8px; margin-left:4px;">Shortcuts</div>
</div>
<% } %>
</div>
<c:if test="${editorTryMode==true}">
<div id="tryEditorWarning" class="sb">
@@ -308,8 +320,6 @@
</div>
<script type="text/javascript">
// Register close event ...
//$('tryEditorWarning').makeRounded({radius: 8,borderColor: '#69686F',backgroundColor: '#69686F'});
var tryElem = $('tryEditorWarning');
tryElem.addClass('drag').makeDraggable();
$('tryClose').addEvent('click', function(event) {
@@ -319,11 +329,9 @@
</script>
</c:if>
<div id="ffoxworkarround" style="display:none;"><input id="ffoxWorkarroundInput" type="text"></div>
<script type="text/javascript" src="../dwr/engine.js"></script>
<c:if test="${editorTryMode==false}">
<script type="text/javascript" src="../dwr/interface/MapEditorService.js"></script>
</c:if>
<script type="text/javascript" src="../dwr/interface/LoggerService.js"></script>
<script type="text/javascript" src="../js/editor.js"></script>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>