- 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

@ -1,3 +1 @@
- Check mail jars
- Google Tracking
- Customizable JSP Replacements

View File

@ -51,7 +51,7 @@
<include>${basedir}/target/tmp/header-min.js</include>
<include>${basedir}/target/tmp/ColorPicker-min.js</include>
<include>${basedir}/target/tmp/Loader-min.js</include>
<include>${basedir}/target/tmp/Logger-min.js</include>
<include>${basedir}/target/tmp/log4js-min.js</include>
<include>${basedir}/target/tmp/Monitor-min.js</include>
<include>${basedir}/target/tmp/Point-min.js</include>
<include>${basedir}/target/tmp/UserAgent-min.js</include>

View File

@ -1,129 +0,0 @@
/*
* 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 $
*/
core.Logger =
{
_enabled: false,
setEnabled: function (enabled) {
this._enabled = enabled;
},init: function(serverLogger)
{
this._serverLogger = serverLogger;
if (window.onerror) {
// Save any previously defined handler to call
core.Logger._origOnWindowError = window.onerror;
}
window.onerror = core.Logger._onWindowError;
},
log: function(message, severity, src)
{
if (!severity)
{
severity = core.LoggerSeverity.DEBUG;
}
// Error messages must be loggued in the server ...
if (severity >= core.LoggerSeverity.ERROR)
{
if (this._serverLogger)
{
try
{
this._serverLogger.logError(core.LoggerSeverity.ERROR, message);
} catch(e)
{
}
}
}
// // Finally, log the error in debug console if it's enabled.
if (this._enabled)
{
this._browserLogger(message);
}
},
_browserLogger: function(message) {
// Firebug is not enabled.
if (core.Logger._origOnWindowError) {
core.Logger._origOnWindowError();
}
if (!console)
{
if (!this._isInitialized)
{
this._console = window.document.createElement("div");
this._console.style.position = "absolute";
this._console.style.width = "300px";
this._console.style.height = "200px";
this._console.style.bottom = 0;
this._console.style.right = 0;
this._console.style.border = '1px solid black';
this._console.style.background = 'yellow';
this._console.style.zIndex = 60000;
this._textArea = window.document.createElement("textarea");
this._textArea.cols = "40";
this._textArea.rows = "10";
this._console.appendChild(this._textArea);
window.document.body.appendChild(this._console);
this._isInitialized = true;
}
this._textArea.value = this._textArea.value + "\n" + msg;
} else
{
// Firebug console...
console.log(message);
}
},
/**
* Handles logging of messages due to window error events.
*
* @method _onWindowError
* @param sMsg {String} The error message.
* @param sUrl {String} URL of the error.
* @param sLine {String} Line number of the error.
* @private
*/
_onWindowError: function(sMsg, sUrl, sLine) {
// Logger is not in scope of this event handler
// http://cfis.savagexi.com/articles/2007/05/08/what-went-wrong-with-my-javascript
try {
core.Logger.log(sMsg + ' (' + sUrl + ', line ' + sLine + ')', core.LoggerSeverity.ERROR, "window");
}
catch(e) {
return false;
}
return true;
},
logError: function(msg) {
core.Logger.log(msg, core.LoggerSeverity.ERROR, "code");
}
};
core.LoggerSeverity =
{
DEBUG: 1,
WARNING: 2,
ERROR: 3,
WINDOW: 4
};

View File

@ -31,10 +31,6 @@ core.UserAgent = {
{
return !core.UserAgent.isVMLSupported();
},
isIframeWorkaroundRequired: function()
{
return core.UserAgent.OS == "Mac" && core.UserAgent.browser == "Firefox" && core.UserAgent.version < 3;
},
isMozillaFamily: function()
{
return this.browser == "Netscape" || this.browser == "Firefox";

View File

@ -70,21 +70,7 @@ core.assert = function(assert, message)
core.findElement = function(name)
{
var result;
if (core.UserAgent.isIframeWorkaroundRequired())
{
var iframe = $('mindplotIFrame');
var doc = iframe.contentDocument;
if (doc == undefined || doc == null)
doc = iframe.contentWindow.document;
result = $(doc.getElementById(name));
}
if (!result)
{
result = $(name);
}
return result;
return $(name);
}
Math.sign = function(value)

View File

@ -23,74 +23,25 @@ Website: http://particletree.com
Date: 2/1/2006
Inspired by the lightbox implementation found at http://www.huddletogether.com/projects/lightbox/
*/
/*-------------------------------GLOBAL VARIABLES------------------------------------*/
var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;
/*-----------------------------------------------------------------------------------------------*/
//Browser detect script origionally created by Peter Paul Koch at http://www.quirksmode.org/
function getBrowserInfo(evt) {
if (checkIt('konqueror')) {
browser = "Konqueror";
OS = "Linux";
}
else if (checkIt('safari')) browser = "Safari"
else if (checkIt('omniweb')) browser = "OmniWeb"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab"
else if (checkIt('msie')) browser = "Internet Explorer"
else if (!checkIt('compatible')) {
browser = "Netscape Navigator"
version = detect.charAt(8);
}
else browser = "An unknown browser";
if (!version) version = detect.charAt(place + thestring.length);
if (!OS) {
if (checkIt('linux')) OS = "Linux";
else if (checkIt('x11')) OS = "Unix";
else if (checkIt('mac')) OS = "Mac"
else if (checkIt('win')) OS = "Windows"
else OS = "an unknown operating system";
}
}
function checkIt(string) {
place = detect.indexOf(string) + 1;
thestring = string;
return place;
}
/*-----------------------------------------------------------------------------------------------*/
$(window).addEvent('load', getBrowserInfo);
core.WaitDialog = new Class({
initialize: function(contentId) {
this.content = $(contentId);
},
yPos : 0,
xPos : 0,
initialize: function() {
},
// Turn everything on - mainly the IE fixes
activate: function(changeCursor)
activate: function(changeCursor, dialogContent)
{
// if (browser == 'Internet Explorer'){
//// this.getScroll();
// this.prepareIE('100%', 'hidden');
//// this.setScroll(0,0);
//// this.hideSelects('hidden');
// }
this.content = dialogContent;
this._initLightboxMarkup();
this.displayLightbox("block");
// Change to loading cursor.
@ -99,41 +50,27 @@ core.WaitDialog = new Class({
window.document.body.style.cursor = "wait";
}
},
changeContent: function(dialogContent, changeCursor)
{
this.content = dialogContent;
if (!$('lbContent'))
{
// Dialog is not activated. Nothing to do ...
window.document.body.style.cursor = "pointer";
return;
}
// Ie requires height to 100% and overflow hidden or else you can scroll down past the lightbox
prepareIE: function(height, overflow) {
bod = document.getElementsByTagName('body')[0];
bod.style.height = height;
bod.style.overflow = overflow;
this.processInfo();
htm = document.getElementsByTagName('html')[0];
htm.style.height = height;
htm.style.overflow = overflow;
},
// In IE, select elements hover on top of the lightbox
hideSelects: function(visibility) {
selects = document.getElementsByTagName('select');
for (i = 0; i < selects.length; i++) {
selects[i].style.visibility = visibility;
// Change to loading cursor.
if (changeCursor)
{
window.document.body.style.cursor = "wait";
}else
{
window.document.body.style.cursor = "auto";
}
},
// Taken from lightbox implementation found at http://www.huddletogether.com/projects/lightbox/
getScroll: function() {
if (self.pageYOffset) {
this.yPos = self.pageYOffset;
} else if (document.documentElement && document.documentElement.scrollTop) {
this.yPos = document.documentElement.scrollTop;
} else if (document.body) {
this.yPos = document.body.scrollTop;
}
},
setScroll: function(x, y) {
window.scrollTo(x, y);
},
displayLightbox: function(display) {
$('overlay').style.display = display;
$('lightbox').style.display = display;
@ -141,11 +78,15 @@ core.WaitDialog = new Class({
this.processInfo();
},
// Display Ajax response
// Display dialog content ...
processInfo: function() {
var info = new Element('div').setProperty('id', 'lbContent');
info.setHTML(this.content.innerHTML);
info.injectBefore($('lbLoadMessage'));
if ($('lbContent'))
$('lbContent').remove();
var lbContentElement = new Element('div').setProperty('id', 'lbContent');
lbContentElement.setHTML(this.content.innerHTML);
lbContentElement.injectBefore($('lbLoadMessage'));
$('lightbox').className = "done";
},
@ -164,53 +105,31 @@ core.WaitDialog = new Class({
},
// Example of creating your own functionality once lightbox is initiated
insert: function(e) {
var event = new Event(e);
link = event.target;
if ($('lbContent'))
$('lbContent').remove();
var myAjax = new Ajax.Request(
link.href,
{method: 'post', parameters: "", onComplete: this.processInfo.pass(this)}
);
},
// Example of creating your own functionality once lightbox is initiated
deactivate: function(time) {
if ($('lbContent'))
$('lbContent').remove();
//
// if (browser == "Internet Explorer"){
// this.setScroll(0,this.yPos);
// this.prepareIE("auto", "auto");
// this.hideSelects("visible");
// }
this.displayLightbox("none");
window.document.body.style.cursor = "default";
}
, _initLightboxMarkup:function()
{
// Add overlay element inside body ...
var bodyElem = document.getElementsByTagName('body')[0];
var overlayElem = new Element('div').setProperty('id', 'overlay');
overlayElem.injectInside(bodyElem);
// Add lightbox element inside body ...
var lightboxElem = new Element('div').setProperty('id', 'lightbox');
lightboxElem.addClass('loading');
var lbLoadMessageElem = new Element('div').setProperty('id', 'lbLoadMessage');
lbLoadMessageElem.injectInside(lightboxElem);
lightboxElem.injectInside(bodyElem);
}
});
/*-----------------------------------------------------------------------------------------------*/
// Onload, make all links that need to trigger a lightbox active
function initialize() {
addLightboxMarkup();
valid = new core.WaitDialog($('sampleDialog'));
}
// Add in markup necessary to make this work. Basically two divs:
// Overlay holds the shadow
// Lightbox is the centered square that the content is put into.
function addLightboxMarkup() {
var body = document.getElementsByTagName('body')[0];
overlay = new Element('div').setProperty('id', 'overlay').injectInside(document.body);
var lb = new Element('div').setProperty('id', 'lightbox');
lb.addClass('loading');
var tmp = new Element('div').setProperty('id', 'lbLoadMessage').injectInside(lb);
lb.injectInside(document.body);
}

View File

@ -17,6 +17,79 @@
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
*/
// Init default logger level ...
var wLogger = new Log4js.getLogger("WiseMapping");
wLogger.setLevel(Log4js.Level.ALL);
wLogger.addAppender(new Log4js.BrowserConsoleAppender());
// Is logger service available ?
if (window.LoggerService)
{
Log4js.WiseServerAppender = function()
{
this.layout = new Log4js.SimpleLayout();
};
Log4js.WiseServerAppender.prototype = Log4js.extend(new Log4js.Appender(), {
/**
* @see Log4js.Appender#doAppend
*/
doAppend: function(loggingEvent) {
try {
var message = this.layout.format(loggingEvent);
var level = this.levelCode(loggingEvent);
window.LoggerService.logError(level, message);
} catch (e) {
alert(e);
}
},
/**
* toString
*/
toString: function() {
return "Log4js.WiseServerAppender";
},
levelCode: function(loggingEvent)
{
var retval;
switch (loggingEvent.level) {
case Log4js.Level.FATAL:
retval = 3;
break;
case Log4js.Level.ERROR:
retval = 3;
break;
case Log4js.Level.WARN:
retval = 2;
break;
default:
retval = 1;
break;
}
return retval;
}
});
wLogger.addAppender(new Log4js.WiseServerAppender());
}
// Handle error events ...
window.onerror = function(sMsg, sUrl, sLine)
{
window.hasUnexpectedErrors = true;
var msg = sMsg + ' (' + sUrl + ', line ' + sLine + ')';
wLogger.fatal(msg);
return true;
};
window.__coreLoad = function()
{
if (window.afterCoreLoading)

File diff suppressed because it is too large Load Diff

View File

@ -426,6 +426,9 @@ mindplot.MindmapDesigner.prototype.loadFromXML = function(mapId, xmlContent)
// Place the focus on the Central Topic
var centralTopic = this.getCentralTopic();
this._goToNode.attempt(centralTopic, this);
this._fireEvent("loadsuccess");
};
mindplot.MindmapDesigner.prototype.load = function(mapId)
@ -444,6 +447,8 @@ mindplot.MindmapDesigner.prototype.load = function(mapId)
// Place the focus on the Central Topic
var centralTopic = this.getCentralTopic();
this._goToNode.attempt(centralTopic, this);
this._fireEvent("loadsuccess");
};
mindplot.MindmapDesigner.prototype._loadMap = function(mapId, mindmapModel)
@ -466,6 +471,8 @@ mindplot.MindmapDesigner.prototype._loadMap = function(mapId, mindmapModel)
nodeGraph.setBranchVisibility(true);
}
}
this._fireEvent("loadsuccess");
};

View File

@ -43,7 +43,7 @@ mindplot.PersistanceManager.prototype.save = function(mindmap, chartType, xmlCha
if (response.msgCode != "OK")
{
monitor.logError("Save could not be completed. Please,try again in a couple of minutes.");
core.Logger.logError(response.msgDetails);
wLogger.error(response.msgDetails);
} else
{
// Execute on success handler ...
@ -56,7 +56,7 @@ mindplot.PersistanceManager.prototype.save = function(mindmap, chartType, xmlCha
errorHandler:function(message) {
var monitor = core.Monitor.getInstance();
monitor.logError("Save could not be completed. Please,try again in a couple of minutes.");
core.Logger.logError(message);
wLogger.error(message);
},
verb:"POST",
async: false
@ -89,7 +89,7 @@ mindplot.PersistanceManager.prototype.load = function(mapId)
var msg = response.msgDetails;
var monitor = core.Monitor.getInstance();
monitor.logFatal("We're sorry, an error has occurred and we can't load your map. Please try again in a few minutes.");
core.Logger.logError(msg);
wLogger.error(msg);
}
},
verb:"GET",
@ -97,7 +97,7 @@ mindplot.PersistanceManager.prototype.load = function(mapId)
errorHandler:function(msg) {
var monitor = core.Monitor.getInstance();
monitor.logFatal("We're sorry, an error has occurred and we can't load your map. Please try again in a few minutes.");
core.Logger.logError(msg);
wLogger.error(msg);
}
});

View File

@ -77,7 +77,6 @@ web2d.peer.svg.GroupPeer.prototype.updateTransform = function()
var cx = this._position.x - this._coordOrigin.x * sx;
var cy = this._position.y - this._coordOrigin.y * sy;
//Logger.logMsg("Group.updateTrasform:"+"translate("+ cx + "," + cy+ ") scale("+ sx + "," + sy + ")");
this._native.setAttribute("transform", "translate(" + cx + "," + cy + ") scale(" + sx + "," + sy + ")");
};

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,7 +52,19 @@ html {
float: left;
}
#loadingContainer .loadingIcon {
#errorContainer .loadingText {
position: relative;
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%;
@ -58,6 +75,17 @@ html {
clear: both;
}
#errorContainer .loadingIcon {
position: relative;
background: url(../images/errorIcon.png) no-repeat;
top: 50%;
margin-top: -65px;
height: 100px;
width: 121px;
float: left;
clear: both;
}
#infoContainer {
float: left;
}
@ -165,7 +193,6 @@ div#toolbar .toolbarLabel{
font-size: 10px;
}
.mapSeparator {
width: 1px;
height: 20px;
@ -189,13 +216,11 @@ div#node {
}
div#font {
left:619px;
/*left:581px;*/
left: 619px; /*left:581px;*/
}
div#share {
left:815px;
/*left:777px;*/
left: 815px; /*left:777px;*/
}
div#saveButton {
@ -447,7 +472,6 @@ div#actionsContainer {
text-decoration: none;
}
#actionsContainer .buttonStart {
width: 6px;
height: 25px;

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -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

@ -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};
@ -218,7 +238,8 @@
<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"
<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>
@ -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>