Mode fixes.

This commit is contained in:
Paulo Veiga 2011-07-24 12:09:05 -03:00
parent 45f214e96d
commit aee814ffa7
11 changed files with 7572 additions and 503 deletions

98
wise-doc/pom.xml Normal file
View File

@ -0,0 +1,98 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>wise-doc</artifactId>
<packaging>war</packaging>
<name>WiseMapping WiseDoc</name>
<url>http://www.wisemapping.org</url>
<parent>
<groupId>org.wisemapping</groupId>
<artifactId>wisemapping</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.0-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>org.wisemapping</groupId>
<artifactId>core-js</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wisemapping</groupId>
<artifactId>mindplot</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<warName>wisemapping</warName>
<overlays>
<overlay>
<groupId>org.wisemapping</groupId>
<artifactId>core-js</artifactId>
<type>jar</type>
<targetPath>js</targetPath>
<includes>
<include>*.js</include>
</includes>
</overlay>
<overlay>
<groupId>org.wisemapping</groupId>
<artifactId>mindplot</artifactId>
<type>jar</type>
<targetPath>js</targetPath>
<includes>
<include>*.js</include>
</includes>
</overlay>
</overlays>
<archiveClasses>true</archiveClasses>
<webResources>
<resource>
<directory>src/main/resources</directory>
<targetPath>WEB-INF</targetPath>
<includes>
<include>*.wsdl</include>
<include>*.xsd</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
<!-- <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>wsimport</goal>
</goals>
</execution>
</executions>
<configuration>
<destDir>${project.build.directory}/generated-sources/jaxws</destDir>
<sourceDestDir>${project.build.directory}/generated-sources/jaxws</sourceDestDir>
<target>2.1</target>
<packageName>com.wisemapping.ws</packageName>
<wsdlDirectory>${basedir}/src/main/resources/</wsdlDirectory>
<wsdlFiles>
<wsdlFile>wiseservices.wsdl</wsdlFile>
</wsdlFiles>
</configuration>
</plugin>
-->
</plugins>
</build>
</project>

View File

@ -13,12 +13,14 @@
<link rel="stylesheet" type="text/css" href="../css/bubble.css"/> <link rel="stylesheet" type="text/css" href="../css/bubble.css"/>
<!--<script type='text/javascript' src='../js/wiseLibrary.js'></script>--> <!--<script type='text/javascript' src='../js/wiseLibrary.js'></script>-->
<script type='text/javascript' src='../../../../../wise-webapp/src/main/webapp/js/mootools.js'></script> <script type='text/javascript' src='../js/mootools.js'></script>
<script type='text/javascript' src='../../../../../wise-webapp/src/main/webapp/js/common.js'></script> <script type='text/javascript' src='../../../../../wise-webapp/src/main/webapp/js/common.js'></script>
<script type='text/javascript' src='../../../../../wise-webapp/src/main/webapp/js/windoo.js'></script> <script type='text/javascript' src='../../../../../wise-webapp/src/main/webapp/js/windoo.js'></script>
<!--<script type='text/javascript' src='../js/wiseEditorLibrary.js'></script>--> <!--<script type='text/javascript' src='../js/wiseEditorLibrary.js'></script>-->
<script type='text/javascript' src='../../../../../wise-webapp/src/main/webapp/js/IconPanel.js'></script> <script type='text/javascript' src='../../../../../wise-webapp/src/main/webapp/js/IconPanel.js'></script>
<script type='text/javascript' src='../../../../../wise-webapp/src/main/webapp/js/mooRainbow.js'></script>
<script type='text/javascript' src='../../../../../core-js/target/classes/core.js'></script> <script type='text/javascript' src='../../../../../core-js/target/classes/core.js'></script>
@ -29,8 +31,7 @@
<body> <body>
<form method="post" id="printForm" name="printForm" action='<c:url value="export.htm"/>' style="height:100%;" <form method="post" id="printForm" name="printForm" action='' style="height:100%;" target="${mindmap.title}">
target="${mindmap.title}">
<input type="hidden" name="action" value="print"> <input type="hidden" name="action" value="print">
<input type="hidden" name="mapId" value="${mindmap.id}"> <input type="hidden" name="mapId" value="${mindmap.id}">
<input type="hidden" name="mapSvg" value=""> <input type="hidden" name="mapSvg" value="">
@ -40,7 +41,7 @@
<div id="waitingContainer"> <div id="waitingContainer">
<div class="loadingIcon"></div> <div class="loadingIcon"></div>
<div class="loadingText"> <div class="loadingText">
<spring:message code="EDITOR.LOADING"/> SYMB_EDITOR.LOADING
</div> </div>
</div> </div>
</div> </div>
@ -49,7 +50,7 @@
<div id="errorContainer"> <div id="errorContainer">
<div class="loadingIcon"></div> <div class="loadingIcon"></div>
<div class="loadingText"> <div class="loadingText">
<spring:message code="EDITOR.ERROR_LOADING"/> SYMB_EDITOR.ERROR_LOADING
</div> </div>
</div> </div>
</div> </div>
@ -66,10 +67,11 @@
}); });
var mapId = '${mindmap.id}'; var mapId = '1';
var mapXml = '${mapXml}'; var mapXml = '<map name="38298" version="pela"><topic central="true" text="test" id="1"/></map>';
var editorProperties = ${mindmap.properties};
var isTryMode = ${editorTryMode}; // @Todo: This must be persiste in the map properties ...
var editorProperties = "{zoom:0.85,saveOnLoad:true}";
function printMap() { function printMap() {
document.printForm.mapSvg.value = $("workspaceContainer").innerHTML; document.printForm.mapSvg.value = $("workspaceContainer").innerHTML;
@ -106,323 +108,233 @@
</div> </div>
</div> </div>
<div id="actionsContainer"></div> <div id="actionsContainer">
<div>
<c:url value="mymaps.htm" var="shareMap">
<c:param name="action" value="collaborator"/>
<c:param name="userEmail" value="${pageContext.request.userPrincipal.name}"/>
</c:url>
</div> </div>
<div id="toolbar"> <div id="toolbar">
<div id="editTab" class="tabContent"> <div id="editTab" class="tabContent">
<div id="file" class="buttonContainer" title="FILE"> <div id="file" class="buttonContainer" title="SYMB_ FILE">
<fieldset> <fieldset>
<legend> <legend>
FILE> SYMB_FILE
</legend> </legend>
<div id="saveButton" class="button" title="SAVE"> <div id="saveButton" class="button" title="SYMB_ SAVE">
<div class="toolbarLabel"> <div class="toolbarLabel">
<p> <p>
SAVE SYMB_SAVE
</p> </p>
</div> </div>
</div> </div>
<div id="discardButton" class="button" title="CLOSE"> <div id="discardButton" class="button" title="SYMB_ CLOSE">
<div class="toolbarLabel"> <div class="toolbarLabel">
<p> <p>
CLOSE SYMB_CLOSE
</p> </p>
</div> </div>
</div> </div>
<div id="undoEdition" class="button" title="<spring:message code=" UNDO_EDITION <div id="undoEdition" class="button" title="SYMB_ UNDO_EDITION">
"/>"> <div class="toolbarLabel">
<div class="toolbarLabel"> <p>
<p> SYMB_UNDO
<spring:message code="UNDO"/> </p>
</p> </div>
</div> </div>
</div> <div id="redoEdition" class="button" title="SYMB_ REDO_EDITION">
<div id="redoEdition" class="button" title="<spring:message code=" REDO_EDITION <div class="toolbarLabel">
"/>"> <p>
<div class="toolbarLabel"> SYMB_REDO
<p> </p>
<spring:message code="REDO"/> </div>
</p> </div>
</div>
</div>
<div id="print" class="button" title="<spring:message code=" PRINT <div id="print" class="button" title="SYMB_ PRINT" onclick="printMap();">
"/>" onclick="printMap();"> <div class="toolbarLabel">
<div class="toolbarLabel"> <p>
<p> SYMB_PRINT
<spring:message code="PRINT"/> </p>
</p> </div>
</div> </div>
</div>
<div id="export" class="button" title="<spring:message code=" EXPORT <div id="export" class="button" title="SYMB_ EXPORT">
"/>"> <div class="toolbarLabel">
<div class="toolbarLabel"> <p>
<p> SYMB_EXPORT
<spring:message code="EXPORT"/> </p>
</p> </div>
</div> <a id="exportAnchor" href="export.htm?mapId=${mindmap.id}" rel="moodalbox 600px 400px"
<a id="exportAnchor" href="export.htm?mapId=${mindmap.id}" rel="moodalbox 600px 400px" title="SYMB_ EXPORT_DETAILS">
title="<spring:message code=" EXPORT_DETAILS"/>"> </a>
</a> </div>
</div> </fieldset>
</fieldset>
</div> </div>
<div id="zoom" class="buttonContainer" title="Zoom In"> <div id="zoom" class="buttonContainer" title="Zoom In">
<fieldset> <fieldset>
<legend> <legend>
<spring:message code="ZOOM"/> SYMB_ZOOM
</legend> </legend>
<div id="zoomIn" class="button" title="<spring:message code=" ZOOM_IN <div id="zoomIn" class="button" title="SYMB_ ZOOM_IN">
"/>"> <div class="toolbarLabel">
<div class="toolbarLabel"> <p>
<p> SYMB_IN
<spring:message code="IN"/> </p>
</p> </div>
</div> </div>
</div> <div id="zoomOut" class="button" title="SYMB_ ZOOM_OUT">
<div id="zoomOut" class="button" title="<spring:message code=" ZOOM_OUT <div class="toolbarLabel">
"/>"> <p>
<div class="toolbarLabel"> SYMB_OUT
<p> </p>
<spring:message code="OUT"/> </div>
</p> </div>
</div> </fieldset>
</div>
</fieldset>
</div> </div>
<div id="node" class="buttonContainer" title="Node Properties"> <div id="node" class="buttonContainer" title="Node Properties">
<fieldset> <fieldset>
<legend> <legend>
<spring:message code="TOPIC"/> SYMB_TOPIC
</legend> </legend>
<div id="topicShape" class="button comboButton" title="<spring:message code=" TOPIC_SHAPE <div id="topicShape" class="button comboButton" title="SYMB_ TOPIC_SHAPE">
"/>"> <div class="toolbarLabel">
<div class="toolbarLabel"> <p>
<p> SYMB_SHAPE
<spring:message code="SHAPE"/> </p>
</p> </div>
</div> </div>
</div> <div id="addTopic" class="button" title="SYMB_ TOPIC_ADD">
<div id="addTopic" class="button" title="<spring:message code=" TOPIC_ADD <div class="toolbarLabel">
"/>"> <p>
<div class="toolbarLabel"> SYMB_ADD
<p> </p>
<spring:message code="ADD"/> </div>
</p> </div>
</div> <div id="deleteTopic" class="button" title="SYMB_ TOPIC_DELETE">
</div> <div class="toolbarLabel">
<div id="deleteTopic" class="button" title="<spring:message code=" TOPIC_DELETE <p>
"/>"> SYMB_DELETE
<div class="toolbarLabel"> </p>
<p> </div>
<spring:message code="DELETE"/> </div>
</p> <div id="topicBorder" class="button comboButton" title="SYMB_ TOPIC_BORDER_COLOR">
</div> <div class="toolbarLabel">
</div> <p>
<div id="topicBorder" class="button comboButton" title="<spring:message code=" TOPIC_BORDER_COLOR SYMB_BORDER
"/>"> </p>
<div class="toolbarLabel"> </div>
<p> </div>
<spring:message code="BORDER"/> <div id="topicColor" class="button comboButton" title="SYMB_ TOPIC_BACKGROUND_COLOR">
</p> <div class="toolbarLabel">
</div> <p>
</div> SYMB_COLOR
<div id="topicColor" class="button comboButton" title="<spring:message code=" TOPIC_BACKGROUND_COLOR </p>
"/>"> </div>
<div class="toolbarLabel"> </div>
<p> <div id="topicIcon" class="button comboButton" title="SYMB_ TOPIC_ICON">
<spring:message code="COLOR"/> <div class="toolbarLabel">
</p> <p>
</div> SYMB_ICON
</div> </p>
<div id="topicIcon" class="button comboButton" title="<spring:message code=" TOPIC_ICON </div>
"/>"> </div>
<div class="toolbarLabel"> <div id="topicNote" class="button comboButton" title="SYMB_ TOPIC_NOTE">
<p> <div class="toolbarLabel">
<spring:message code="ICON"/> <p>
</p> SYMB_NOTE
</div> </p>
</div> </div>
<div id="topicNote" class="button comboButton" title="<spring:message code=" TOPIC_NOTE </div>
"/>"> <div id="topicLink" class="button" title="SYMB_ TOPIC_LINK">
<div class="toolbarLabel"> <div class="toolbarLabel">
<p> <p>
<spring:message code="NOTE"/> SYMB_LINK
</p> </p>
</div> </div>
</div> </div>
<div id="topicLink" class="button" title="<spring:message code=" TOPIC_LINK <div id="topicRelation" class="topicRelation button" title="SYMB_ TOPIC_RELATIONSHIP">
"/>"> <div class="relationshiplabel toolbarLabel">
<div class="toolbarLabel"> <p>
<p> SYMB_TOPIC_RELATIONSHIP
<spring:message code="LINK"/> </p>
</p> </div>
</div> </div>
</div> </fieldset>
<div id="topicRelation" class="topicRelation button" title="<spring:message code=" TOPIC_RELATIONSHIP
"/>">
<div class="relationshiplabel toolbarLabel">
<p>
<spring:message code="TOPIC_RELATIONSHIP"/>
</p>
</div>
</div>
</fieldset>
</div> </div>
<div id="font" class="buttonContainer" title="Font Properties"> <div id="font" class="buttonContainer" title="Font Properties">
<fieldset> <fieldset>
<legend> <legend>
<spring:message code="FONT"/> SYMB_FONT
</legend> </legend>
<div id="fontFamily" class="button comboButton" title="<spring:message code=" FONT_TYPE <div id="fontFamily" class="button comboButton" title="SYMB_ FONT_TYPE">
"/>"> <div class="toolbarLabel">
<div class="toolbarLabel"> <p>
<p> SYMB_TYPE
<spring:message code="TYPE"/> </p>
</p> </div>
</div> </div>
</div> <div id="fontSize" class="button comboButton" title="SYMB_ FONT_SIZE">
<div id="fontSize" class="button comboButton" title="<spring:message code=" FONT_SIZE <div class="toolbarLabel">
"/>"> <p>
<div class="toolbarLabel"> SYMB_SIZE
<p> </p>
<spring:message code="SIZE"/> </div>
</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}"/>&amp;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>
<div id="fontBold" class="button" title="SYMB_ FONT_BOLD">
<div class="toolbarLabel">
<p>
SYMB_BOLD
</p>
</div>
</div> </div>
</a> <div id="fontItalic" class="button" title="SYMB_ FONT_ITALIC">
<a id="publishAnchor" href="publish.htm?mapId=${mindmap.id}" <div class="toolbarLabel">
rel="moodalbox 600px 400px wizard" <p>
title="<spring:message code=" PUBLISH_MSG"/>"> SYMB_ITALIC
<div id="publishIt" class="button" title="<spring:message code=" PUBLISH </p>
"/>"> </div>
<div class="toolbarLabel">
<p>
<spring:message code="PUBLISH"/>
</p>
</div>
</div>
</a>
</c:when>
</c:choose>
<a id="historyAnchor" href="history.htm?action=list&amp;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>
<div id="fontColor" class="button comboButton" title="SYMB_ FONT_COLOR">
<div class="toolbarLabel">
<p>
SYMB_COLOR
</p>
</div>
</div>
</fieldset>
</div>
<div id="share" class="buttonContainer" title="Share Properties">
<fieldset>
<legend>
SYMB_COLLABORATION
</legend>
<div id="tagIt" class="button" title="SYMB_ TAG">
<div class="toolbarLabel">
<p>
SYMB_TAG
</p>
</div>
</div>
<div id="shareIt" class="button" title="SYMB_ COLLABORATE">
<div class="toolbarLabel">
<p>
SYMB_SHARE
</p>
</div>
</div>
<div id="publishIt" class="button" title="SYMB_ PUBLISH">
<div class="toolbarLabel">
<p>
SYMB_PUBLISH
</p>
</div>
</div>
<div id="history" class="button" title="SYMB_ HISTORY_MSG">
<div class="toolbarLabel">
<p>
SYMB_HISTORY
</p>
</div>
</div> </div>
</fieldset> </fieldset>
</c:otherwise>
</c:choose>
</div> </div>
</div> </div>
</div> </div>
@ -431,7 +343,7 @@
<div id="footerEditor"> <div id="footerEditor">
<div style="position:absolute; top:0px; width:100%"> <div style="position:absolute; top:0px; width:100%">
<a href="${pageContext.request.contextPath}/c/home.htm"> <a href="home.htm">
<div id="logo"></div> <div id="logo"></div>
</a> </a>
@ -448,6 +360,7 @@
<div style="float:left; position:relative; top:50%; margin-top:-8px; margin-left:4px;">Shortcuts</div> <div style="float:left; position:relative; top:50%; margin-top:-8px; margin-left:4px;">Shortcuts</div>
</div> </div>
</div> </div>
<div id="ffoxworkarround" style="display:none;"><input id="ffoxWorkarroundInput" type="text"></div>
<script type="text/javascript" src="../js/editor.js"></script> <script type="text/javascript" src="../js/editor.js"></script>
</body> </body>
</html> </html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 B

View File

@ -1,35 +1,32 @@
/* /*
* Copyright [2011] [wisemapping] * Copyright [2011] [wisemapping]
* *
* Licensed under WiseMapping Public License, Version 1.0 (the "License"). * Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the * It is basically the Apache License, Version 2.0 (the "License") plus the
* "powered by wisemapping" text requirement on every single page; * "powered by wisemapping" text requirement on every single page;
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the license at * You may obtain a copy of the license at
* *
* http://www.wisemapping.org/license * http://www.wisemapping.org/license
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
function afterCoreLoading() function afterCoreLoading() {
{
// Uncomment for debug ... // Uncomment for debug ...
$import("../js/mindplot.svg.js"); $import("../../../../../mindplot/target/classes/mindplot.svg.js");
// $import("../js/mindplot.svg-min.js"); }
;
};
afterCoreLoading(); afterCoreLoading();
/*Extend mootools known keys*/ /*Extend mootools known keys*/
ExtendedKeys = { ExtendedKeys = {
'insert': 45, 'insert': 45,
@ -96,8 +93,7 @@ Tabs = {
if (div.className.match(/\btabContent\b/i)) { if (div.className.match(/\btabContent\b/i)) {
if (div.id == "_" + contentId) if (div.id == "_" + contentId)
div.style.display = "block"; div.style.display = "block";
else else {
{
divsToHide.push(div); divsToHide.push(div);
} }
} }
@ -122,8 +118,7 @@ Tabs = {
}, },
Init: function () { Init: function () {
if (!document.getElementsByTagName) if (!document.getElementsByTagName) {
{
return; return;
} }
@ -178,18 +173,15 @@ var contentId = window.location.hash || "#Introduction";
var iconPanel = null; var iconPanel = null;
function afterMindpotLibraryLoading() function afterMindpotLibraryLoading() {
{
buildMindmapDesigner(); buildMindmapDesigner();
if ($('helpButton') != null) if ($('helpButton') != null) {
{
var helpPanel = new Panel({panelButton:$('helpButton'), backgroundColor:'black'}); var helpPanel = new Panel({panelButton:$('helpButton'), backgroundColor:'black'});
helpPanel.setContent(Help.buildHelp(helpPanel)); helpPanel.setContent(Help.buildHelp(helpPanel));
} }
if ($('helpButtonFirstSteps') != null) if ($('helpButtonFirstSteps') != null) {
{
var firstStepsPanel = $('helpButtonFirstSteps') var firstStepsPanel = $('helpButtonFirstSteps')
firstStepsPanel.addEvent('click', function(event) { firstStepsPanel.addEvent('click', function(event) {
var firstStepWindow = window.open("firststeps.htm", "WiseMapping", "width=100px, height=100px"); var firstStepWindow = window.open("firststeps.htm", "WiseMapping", "width=100px, height=100px");
@ -199,8 +191,7 @@ function afterMindpotLibraryLoading()
}); });
} }
if ($('helpButtonKeyboard') != null) if ($('helpButtonKeyboard') != null) {
{
var keyboardPanel = $('helpButtonKeyboard') var keyboardPanel = $('helpButtonKeyboard')
keyboardPanel.addEvent('click', function(event) { keyboardPanel.addEvent('click', function(event) {
MOOdalBox.open('keyboard.htm', 'KeyBoard Shortcuts', '500px 400px', false) MOOdalBox.open('keyboard.htm', 'KeyBoard Shortcuts', '500px 400px', false)
@ -229,19 +220,15 @@ function afterMindpotLibraryLoading()
designer.redo(); designer.redo();
}); });
designer.addEventListener("change", function(event) { designer.addEventListener("change", function(event) {
if (event.undoSteps > 0) if (event.undoSteps > 0) {
{
$("undoEdition").setStyle("background-image", "url(../images/file_undo.png)"); $("undoEdition").setStyle("background-image", "url(../images/file_undo.png)");
} else } else {
{
$("undoEdition").setStyle("background-image", "url(../images/file_undo_dis.png)"); $("undoEdition").setStyle("background-image", "url(../images/file_undo_dis.png)");
} }
if (event.redoSteps > 0) if (event.redoSteps > 0) {
{
$("redoEdition").setStyle("background-image", "url(../images/file_redo.png)"); $("redoEdition").setStyle("background-image", "url(../images/file_redo.png)");
} else } else {
{
$("redoEdition").setStyle("background-image", "url(../images/file_redo_dis.png)"); $("redoEdition").setStyle("background-image", "url(../images/file_redo_dis.png)");
} }
@ -328,126 +315,53 @@ function afterMindpotLibraryLoading()
var saveButton = $('saveButton'); var saveButton = $('saveButton');
saveButton.addEvent('click', function(event) { saveButton.addEvent('click', function(event) {
if (!isTryMode)
{ saveButton.setStyle('cursor', 'wait');
saveButton.setStyle('cursor', 'wait'); var saveFunc = function() {
var saveFunc = function() designer.save(function() {
{ var monitor = core.Monitor.getInstance();
designer.save(function() monitor.logMessage('Save completed successfully');
{ saveButton.setStyle('cursor', 'pointer');
var monitor = core.Monitor.getInstance(); }, true);
monitor.logMessage('Save completed successfully');
saveButton.setStyle('cursor', 'pointer');
}, true);
}
saveFunc.delay(1);
} else
{
new Windoo.Confirm('This option is not enabled in try mode. You must by signed in order to execute this action.<br/> to create an account click <a href="userRegistration.htm">here</a>',
{
'window': {theme:Windoo.Themes.wise,
title:''
}
});
} }
saveFunc.delay(1);
}); });
var discardButton = $('discardButton'); var discardButton = $('discardButton');
discardButton.addEvent('click', function(event) { discardButton.addEvent('click', function(event) {
if (!isTryMode) displayLoading();
{ window.document.location = "mymaps.htm";
displayLoading(); });
window.document.location = "mymaps.htm";
} else
{
displayLoading();
window.document.location = "home.htm";
}
});
if (isTryMode)
{
$('tagIt').addEvent('click', function(event)
{
new Windoo.Confirm('This option is not enabled in try mode. You must by signed in order to execute this action.',
{
'window': {theme:Windoo.Themes.wise,
title:''
}
});
}); var autosave = function() {
$('shareIt').addEvent('click', function(event) if (designer.needsSave()) {
{ designer.save(function() {
new Windoo.Confirm('This option is not enabled in try mode. You must by signed in order to execute this action.', var monitor = core.Monitor.getInstance();
{ }, false);
'window': {theme:Windoo.Themes.wise, }
title:'' };
} autosave.periodical(30000);
});
}); // To prevent the user from leaving the page with changes ...
window.onbeforeunload = function confirmExit() {
$('publishIt').addEvent('click', function(event) if (designer.needsSave()) {
{ designer.save(null, false)
new Windoo.Confirm('This option is not enabled in try mode. You must by signed in order to execute this action.',
{
'window': {theme:Windoo.Themes.wise,
title:''
}
});
});
$('history').addEvent('click', function(event)
{
new Windoo.Confirm('This option is not enabled in try mode. You must by signed in order to execute this action.',
{
'window': {theme:Windoo.Themes.wise,
title:''
}
});
});
}
// Autosave ...
if (!isTryMode)
{
var autosave = function() {
if (designer.needsSave())
{
designer.save(function()
{
var monitor = core.Monitor.getInstance();
}, false);
}
};
autosave.periodical(30000);
// To prevent the user from leaving the page with changes ...
window.onbeforeunload = function confirmExit()
{
if (designer.needsSave())
{
designer.save(null, false)
}
} }
} }
// Build panels ... // Build panels ...
fontFamilyPanel(); fontFamilyPanel();
shapeTypePanel(); shapeTypePanel();
fontSizePanel(); fontSizePanel();
// If not problem has occured, I close the dialod ... // If not problem has occured, I close the dialod ...
var closeDialog = function(){ var closeDialog = function() {
if(!window.hasUnexpectedErrors) if (!window.hasUnexpectedErrors) {
{
waitDialog.deactivate(); waitDialog.deactivate();
} }
}.delay(500); }.delay(500);
@ -456,15 +370,12 @@ function afterMindpotLibraryLoading()
function buildIconChooser() { function buildIconChooser() {
var content = new Element('div').setStyles({width:253,height:200,padding:5}); var content = new Element('div').setStyles({width:253,height:200,padding:5});
var count = 0; var count = 0;
for (var i = 0; i < mindplot.ImageIcon.prototype.ICON_FAMILIES.length; i = i + 1) for (var i = 0; i < mindplot.ImageIcon.prototype.ICON_FAMILIES.length; i = i + 1) {
{
var familyIcons = mindplot.ImageIcon.prototype.ICON_FAMILIES[i].icons; var familyIcons = mindplot.ImageIcon.prototype.ICON_FAMILIES[i].icons;
for (var j = 0; j < familyIcons.length; j = j + 1) for (var j = 0; j < familyIcons.length; j = j + 1) {
{
// Separate icons by line ... // Separate icons by line ...
var familyContent; var familyContent;
if ((count % 12) == 0) if ((count % 12) == 0) {
{
familyContent = new Element('div').inject(content); familyContent = new Element('div').inject(content);
} }
@ -486,22 +397,19 @@ function buildIconChooser() {
; ;
function setCurrentColorPicker(colorPicker) function setCurrentColorPicker(colorPicker) {
{
this.currentColorPicker = colorPicker; this.currentColorPicker = colorPicker;
} }
function removeCurrentColorPicker(colorPicker) function removeCurrentColorPicker(colorPicker) {
{
$clear(this.currentColorPicker); $clear(this.currentColorPicker);
} }
function buildMindmapDesigner() function buildMindmapDesigner() {
{
// Initialize message logger ... // Initialize message logger ...
var monitor = new core.Monitor($('msgLoggerContainer'), $('msgLogger')); // var monitor = new core.Monitor($('msgLoggerContainer'), $('msgLogger'));
core.Monitor.setInstance(monitor); // core.Monitor.setInstance(monitor);
var container = $('mindplot'); var container = $('mindplot');
@ -526,8 +434,7 @@ function buildMindmapDesigner()
// Save map on load .... // Save map on load ....
if (editorProperties.saveOnLoad) if (editorProperties.saveOnLoad) {
{
var saveOnLoad = function() { var saveOnLoad = function() {
designer.save(function() { designer.save(function() {
}, false); }, false);
@ -537,8 +444,7 @@ function buildMindmapDesigner()
} }
; ;
function createColorPalette(container, onSelectFunction, event) function createColorPalette(container, onSelectFunction, event) {
{
cleanScreenEvent(); cleanScreenEvent();
_colorPalette = new core.ColorPicker(); _colorPalette = new core.ColorPicker();
_colorPalette.onSelect = function(color) { _colorPalette.onSelect = function(color) {
@ -554,10 +460,8 @@ function createColorPalette(container, onSelectFunction, event)
} }
; ;
function cleanScreenEvent() function cleanScreenEvent() {
{ if (this.currentColorPicker) {
if (this.currentColorPicker)
{
this.currentColorPicker.hide(); this.currentColorPicker.hide();
} }
$("fontFamilyPanel").setStyle('display', "none"); $("fontFamilyPanel").setStyle('display', "none");
@ -566,66 +470,53 @@ function cleanScreenEvent()
iconPanel.close(); iconPanel.close();
} }
function fontFamilyPanel() function fontFamilyPanel() {
{
var supportedFonts = ['times','arial','tahoma','verdana']; var supportedFonts = ['times','arial','tahoma','verdana'];
var updateFunction = function(value) var updateFunction = function(value) {
{
value = value.charAt(0).toUpperCase() + value.substring(1, value.length); value = value.charAt(0).toUpperCase() + value.substring(1, value.length);
designer.setFont2SelectedNode(value); designer.setFont2SelectedNode(value);
}; };
var onFocusValue = function(selectedNode) var onFocusValue = function(selectedNode) {
{
return selectedNode.getFontFamily(); return selectedNode.getFontFamily();
}; };
buildPanel('fontFamily', 'fontFamilyPanel', supportedFonts, updateFunction, onFocusValue); buildPanel('fontFamily', 'fontFamilyPanel', supportedFonts, updateFunction, onFocusValue);
} }
function shapeTypePanel() function shapeTypePanel() {
{
var shapeTypePanel = ['rectagle','rounded_rectagle','line','elipse']; var shapeTypePanel = ['rectagle','rounded_rectagle','line','elipse'];
var updateFunction = function(value) var updateFunction = function(value) {
{ designer.setShape2SelectedNode(value.replace('_', ' '));
designer.setShape2SelectedNode(value.replace('_',' '));
}; };
var onFocusValue = function(selectedNode) var onFocusValue = function(selectedNode) {
{
return selectedNode.getShapeType().replace(' ','_'); return selectedNode.getShapeType().replace(' ', '_');
}; };
buildPanel('topicShape', 'topicShapePanel', shapeTypePanel, updateFunction, onFocusValue); buildPanel('topicShape', 'topicShapePanel', shapeTypePanel, updateFunction, onFocusValue);
} }
function fontSizePanel() function fontSizePanel() {
{
var shapeTypePanel = ['small','normal','large','huge']; var shapeTypePanel = ['small','normal','large','huge'];
var map = {small:'6',normal:'8',large:'10',huge:'15'}; var map = {small:'6',normal:'8',large:'10',huge:'15'};
var updateFunction = function(value) var updateFunction = function(value) {
{
var nodes = designer.getSelectedNodes(); var nodes = designer.getSelectedNodes();
var value = map[value]; var value = map[value];
designer.setFontSize2SelectedNode(value); designer.setFontSize2SelectedNode(value);
}; };
var onFocusValue = function(selectedNode) var onFocusValue = function(selectedNode) {
{
var fontSize = selectedNode.getFontSize(); var fontSize = selectedNode.getFontSize();
var result = ""; var result = "";
if (fontSize <= 6) if (fontSize <= 6) {
{
result = 'small'; result = 'small';
} else if (fontSize <= 8) } else if (fontSize <= 8) {
{
result = 'normal'; result = 'normal';
} else if (fontSize <= 10) } else if (fontSize <= 10) {
{
result = 'large'; result = 'large';
} else if (fontSize >= 15) } else if (fontSize >= 15) {
{
result = 'huge'; result = 'huge';
} }
return result; return result;
@ -633,18 +524,15 @@ function fontSizePanel()
buildPanel('fontSize', 'fontSizePanel', shapeTypePanel, updateFunction, onFocusValue); buildPanel('fontSize', 'fontSizePanel', shapeTypePanel, updateFunction, onFocusValue);
} }
function buildPanel(buttonElemId, elemLinksContainer, elemLinkIds, updateFunction, onFocusValue) function buildPanel(buttonElemId, elemLinksContainer, elemLinkIds, updateFunction, onFocusValue) {
{
// Font family event handling .... // Font family event handling ....
$(buttonElemId).addEvent('click', function(event) $(buttonElemId).addEvent('click', function(event) {
{
var container = $(elemLinksContainer); var container = $(elemLinksContainer);
var isRendered = container.getStyle('display') == 'block'; var isRendered = container.getStyle('display') == 'block';
cleanScreenEvent(); cleanScreenEvent();
// Restore default css. // Restore default css.
for (var i = 0; i < elemLinkIds.length; i++) for (var i = 0; i < elemLinkIds.length; i++) {
{
var elementId = elemLinkIds[i]; var elementId = elemLinkIds[i];
$(elementId).className = 'toolbarPanelLink'; $(elementId).className = 'toolbarPanelLink';
} }
@ -652,8 +540,7 @@ function buildPanel(buttonElemId, elemLinksContainer, elemLinkIds, updateFunctio
// Select current element ... // Select current element ...
var nodes = designer.getSelectedNodes(); var nodes = designer.getSelectedNodes();
var lenght = nodes.length; var lenght = nodes.length;
if (lenght == 1) if (lenght == 1) {
{
var selectedNode = nodes[0]; var selectedNode = nodes[0];
var selectedElementId = onFocusValue(selectedNode); var selectedElementId = onFocusValue(selectedNode);
selectedElementId = selectedElementId.toLowerCase(); selectedElementId = selectedElementId.toLowerCase();
@ -664,23 +551,20 @@ function buildPanel(buttonElemId, elemLinksContainer, elemLinkIds, updateFunctio
container.setStyle('display', 'block'); container.setStyle('display', 'block');
var mouseCoords = core.Utils.getMousePosition(event); var mouseCoords = core.Utils.getMousePosition(event);
if (!isRendered) if (!isRendered) {
{
container.setStyle('left', (mouseCoords.x - 10) + "px"); container.setStyle('left', (mouseCoords.x - 10) + "px");
} }
}); });
var fontOnClick = function(event) var fontOnClick = function(event) {
{
var value = this.getAttribute('id'); var value = this.getAttribute('id');
updateFunction(value); updateFunction(value);
cleanScreenEvent(); cleanScreenEvent();
}; };
// Register event listeners on elements ... // Register event listeners on elements ...
for (var i = 0; i < elemLinkIds.length; i++) for (var i = 0; i < elemLinkIds.length; i++) {
{
var elementId = elemLinkIds[i]; var elementId = elemLinkIds[i];
$(elementId).addEvent('click', fontOnClick.bind($(elementId))); $(elementId).addEvent('click', fontOnClick.bind($(elementId)));
} }

File diff suppressed because it is too large Load Diff