Merge branch 'master' of repo.wisemapping.org:wisemapping/wiseorg

This commit is contained in:
Tarjei Huse
2012-03-14 20:32:20 +01:00
297 changed files with 6490 additions and 14012 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 658 B

View File

@@ -1,24 +1,18 @@
<div class="modalDialog">
<!-- Header can be customized -->
<h1>
Export
'sss'</h1>
<h1>Export</h1>
<div>
<form method="post" id="exportForm" name="exportForm" action="export.bin" style="height:100%;">
<input type="hidden" name="action" value="export">
<input type="hidden" name="mapId" value="3">
<input type="hidden" name="mapSvg" value="">
<form method="POST" id="exportForm" name="exportForm" action="http://localhost:8080/service/transform"
style="height:100%;" enctype="application/x-www-form-urlencoded">
<input name="svgXml" value="" type="hidden"/>
<input name="mapXml" value="" type="hidden"/>
<input name="filename" value="welcome" type="hidden"/>
<table>
<tbody>
<tr>
<td>
<input type="radio" id="svg" name="exportFormat" value="SVG">
<b>
Scalable Vector Graphics (SVG)
</b>
<input type="radio" id="svg" name="exportFormat" value="svg">
<b> Scalable Vector Graphics (SVG)</b>
<p>
Scalable Vector Graphics (SVG) is an XML markup language for describing two-dimensional
@@ -30,9 +24,7 @@
<tr>
<td>
<input type="radio" name="exportFormat" value="PDF" id="pdf">
<b>
Portable Document Format (PDF)
</b>
<b>Portable Document Format (PDF)</b>
<p>
Get your map as Portable Document Format(PDF) to share use in your presentations.
@@ -42,9 +34,7 @@
<tr>
<td>
<input type="radio" id="freemind" name="exportFormat" value="FREEMIND" checked="checked">
<b>
Freemind (version 0.9.0)
</b>
<b>Freemind (version 0.9.0)</b>
<p>
FreeMind is a nice desktop mind mapping application that has the great benefit of being
@@ -55,12 +45,11 @@
<tr>
<td>
<input type="radio" name="exportFormat" id="img" value="IMG_EXPORT_FORMAT">
<b>
Image File
</b><select name="imgFormat" id="imgFormat" style="visibility:hidden;margin-left:5px;">
<option>PNG</option>
<option>JPEG</option>
</select>
<b>Image File</b>
<select name="imgFormat" id="imgFormat" style="visibility:hidden;margin-left:5px;">
<option>PNG</option>
<option>JPEG</option>
</select>
<p>
Get a graphic representation of your map including all colors and shapes to reuse in
@@ -71,7 +60,8 @@
<tr>
<td style="text-align:center;margin-top:10px;">
<input type="button" id="ok" value="Ok" class="btn-primary">
<input type="button" value="Cancel" class="btn-secondary" onclick="MOOdalBox.close();">
<input type="button" value="Cancel" class="btn-secondary"
onclick="MooDialog.Request.active.close();">
</td>
</tr>
</tbody>
@@ -92,9 +82,36 @@
});
$('ok').addEvent('click', function(event) {
$('exportForm').submit();
var form = $('exportForm');
// Look for the selected format and append export suffix...
var value = $$('input[name=exportFormat]:checked')[0].get('value');
var suffix;
if (value == 'IMG_EXPORT_FORMAT') {
var selected = $('imgFormat');
suffix = selected.options[selected.selectedIndex].value;
} else {
suffix = value;
}
suffix = suffix.toLowerCase();
form.action = form.action + "." + suffix;
// Store SVG o native map...
if (suffix == "freemind") {
var mindmap = designer.getMindmap();
var serializer = mindplot.persistence.XMLSerializerFactory.getSerializerFromMindmap(mindmap);
var domMap = serializer.toXML(mindmap);
form.mapXml.value = core.Utils.innerXML(domMap);
} else {
form.svgXml.value = $("workspaceContainer").innerHTML;
}
// Finally, submit map ...
form.submit();
MooDialog.Request.active.close();
});
document.exportForm.mapSvg.value = $("workspaceContainer").innerHTML;
</script>

View File

@@ -1,91 +1,21 @@
@import "compatibility.less";
@import "../css/libraries/moodialog/css/MooDialog.css";
/**********************************************************/
/* Error Dialog ... */
/**********************************************************/
#waitDialog {
position: absolute;
top: 10px;
left: 10px;
height: 200px;
}
#waitingContainer, #errorContainer {
position: relative;
top: 80px;
height: 120px; /*background: whitesmoke;*/
background: #FEFEFE;
opacity: .99;
padding: 15px;
width: 100%;
border: 1px solid;
border-color: #a9a9a9;
}
#errorContainer {
width: 400px;
border: 1px solid red;
}
#waitingContainer .loadingText {
position: relative;
top: 50%;
margin-top: -35px;
font-size: 30px;
font-weight: bold;
vertical-align: text-bottom;
height: 30px;
float: left;
}
#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/rebota.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;
width: 121px;
float: left;
clear: both;
}
@import "css/libraries/moodialog/css/MooDialog.css";
/********************************************************************************/
/* Header & Toolbar Styles */
/********************************************************************************/
@import "header.less";
body {
overflow:hidden;
}
div#mindplot {
position: relative;
top: 0;
left: 0;
width: 100%;
height:100%;
border: 0;
}

View File

@@ -0,0 +1 @@
../../../../../../../../mindplot/src/main/javascript/libraries/moodialog/css/dialog-close.png

View File

@@ -41,7 +41,7 @@
This is a simple example of how WiseMapping can be embedded in a page.
Embedding WiseMapping editor is such simple as copying this line in your page:
</p>
<div id="code">&lt;iframe src="embedded.html?confUrl=../html/container.json" width="800" height="600"&gt;&lt;/iframe&gt;</div>
<div id="code">&lt;iframe src="embedded.html?confUrl=html/container.json" width="800" height="600"&gt;&lt;/iframe&gt;</div>
<p>
The container.json file contains a set of properties that must be configured. Properties:
</p>
@@ -61,7 +61,7 @@
</div>
<div id="editor">
<iframe src="embedded.html?confUrl=../html/container.json" width="800" height="400"></iframe>
<iframe src="embedded.html?confUrl=html/container.json" width="800" height="400"></iframe>
</div>
</div>
</body>

View File

@@ -2,20 +2,23 @@
<html>
<head>
<base href="../">
<title>WiseMapping - Editor </title>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
<meta http-equiv="Content-type" content="text/html; char
set=UTF-8"/>
<!--[if lt IE 9]>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<![endif]-->
<link rel="stylesheet/less" type="text/css" href="../css/editor.less"/>
<link rel="stylesheet/less" type="text/css" href="css/editor.less"/>
<script type='text/javascript' src='../js/mootools-core.js'></script>
<script type='text/javascript' src='../js/mootools-more.js'></script>
<script type='text/javascript' src='../js/core.js'></script>
<script type='text/javascript' src='../js/less.js'></script>
<script type='text/javascript' src='js/mootools-core.js'></script>
<script type='text/javascript' src='js/mootools-more.js'></script>
<script type='text/javascript' src='js/core.js'></script>
<script type='text/javascript' src='js/less.js'></script>
<link rel="icon" href="../images/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon">
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<script type="text/javascript">
@@ -26,17 +29,10 @@
// Load map from XML file persisted on disk...
var persistence = mindplot.PersistenceManager.getInstance();
var mindmap;
try {
mindmap = persistence.load(mapId);
} catch(e) {
// If the map could not be loaded, create a new empty map...
mindmap = mindplot.model.Mindmap.buildEmpty(mapId);
}
var mindmap = mindmap = persistence.load(mapId);
designer.loadMap(mindmap);
});
</script>
</head>
<body>
@@ -52,72 +48,75 @@
<div id="editTab" class="tabContent">
<div id="persist" class="buttonContainer">
<div id="save" class="buttonOn" title="Save">
<img src="../images/save.png"/>
<img src="images/save.png"/>
</div>
<div id="discard" class="buttonOn" title="Discard">
<img src="../images/discard.png"/>
<img src="images/discard.png"/>
</div>
<div id="export" class="buttonOn" title="Export">
<img src="images/export.png"/>
</div>
</div>
<div id="edit" class="buttonContainer">
<div id="undoEdition" class="buttonOn" title="Undo Edition">
<img src="../images/undo.png"/>
<img src="images/undo.png"/>
</div>
<div id="redoEdition" class="buttonOn" title="Redo Edition">
<img src="../images/redo.png"/>
<img src="images/redo.png"/>
</div>
</div>
<div id="zoom" class="buttonContainer">
<div id="zoomIn" class="buttonOn" title="Zoom In">
<img src="../images/zoom-in.png"/>
<img src="images/zoom-in.png"/>
</div>
<div id="zoomOut" class="buttonOn" title="Zoom Out">
<img src="../images/zoom-out.png"/>
<img src="images/zoom-out.png"/>
</div>
</div>
<div id="node" class="buttonContainer">
<div id="topicShape" class="buttonExtOn" title="Topic Shape">
<img src="../images/topic-shape.png"/>
<img src="images/topic-shape.png"/>
</div>
<div id="addTopic" class="buttonOn" title="Add Topic">
<img src="../images/topic-add.png"/>
<img src="images/topic-add.png"/>
</div>
<div id="deleteTopic" class="buttonOn" title="Delete">
<img src="../images/topic-delete.png"/>
<img src="images/topic-delete.png"/>
</div>
<div id="topicBorder" class="buttonExtOn" title="Border Color">
<img src="../images/topic-border.png"/>
<img src="images/topic-border.png"/>
</div>
<div id="topicColor" class="buttonExtOn" title="Background Color">
<img src="../images/topic-color.png"/>
<img src="images/topic-color.png"/>
</div>
<div id="topicIcon" class="buttonExtOn" title="Add Icon">
<img src="../images/topic-icon.png"/>
<img src="images/topic-icon.png"/>
</div>
<div id="topicNote" class="buttonOn" title="Add Note">
<img src="../images/topic-note.png"/>
<img src="images/topic-note.png"/>
</div>
<div id="topicLink" class="buttonOn" title="Add Link">
<img src="../images/topic-link.png"/>
<img src="images/topic-link.png"/>
</div>
<div id="topicRelation" class="buttonOn" title="Add Relationship">
<img src="../images/topic-relation.png"/>
<img src="images/topic-relation.png"/>
</div>
</div>
<div id="font" class="buttonContainer">
<div id="fontFamily" class="buttonExtOn" title="Font Style">
<img src="../images/font-type.png"/>
<img src="images/font-type.png"/>
</div>
<div id="fontSize" class="buttonExtOn" title="Font Size">
<img src="../images/font-size.png"/>
<img src="images/font-size.png"/>
</div>
<div id="fontBold" class="buttonOn" title="Bold Style">
<img src="../images/font-bold.png"/>
<img src="images/font-bold.png"/>
</div>
<div id="fontItalic" class="buttonOn" title="Italic Style">
<img src="../images/font-italic.png"/>
<img src="images/font-italic.png"/>
</div>
<div id="fontColor" class="buttonExtOn" title="Fond Color" style="padding-top:4px">
<img src="../images/font-color.png"/>
<div id="fontColor" class="buttonExtOn" title="Font Color" style="padding-top:4px">
<img src="images/font-color.png"/>
</div>
</div>
</div>
@@ -128,7 +127,26 @@
</div>
</div>
<!--<div style="position: absolute;align:left;background: gray;width: 100px;height: 300px;z-index: 100" id="dragPanel">-->
<!--<div id="dragIcon" style="">-->
<!--<img src="images/logo-small.png"/>-->
<!--</div>-->
<!--</div>-->
<!--<script type="text/javascript">-->
<!--$("dragIcon").addEvent('mousedown', function(event) {-->
<!--event.preventDefault();-->
<!--var options = {imageUrl:"images/logo-small.png",-->
<!--imageWidth:80,-->
<!--imageHeight:43,-->
<!--metadata: "{'media':'video,'url':'http://www.youtube.com/watch?v=P3FrXftyuzw&feature=g-vrec&context=G2b4ab69RVAAAAAAAAAA'}"-->
<!--};-->
<!--designer.addDraggedNode(event, options);-->
<!--});-->
<!--</script>-->
<div id="mindplot"></div>
<script type="text/javascript" src="../js/editor.js"></script>
<script type="text/javascript" src="js/editor.js"></script>
</body>
</html>

View File

@@ -2,20 +2,21 @@
<html>
<head>
<base href="../">
<title>WiseMapping - Editor </title>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
<!--[if lt IE 9]>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<![endif]-->
<link rel="stylesheet/less" type="text/css" href="../css/embedded.less"/>
<link rel="stylesheet/less" type="text/css" href="css/embedded.less"/>
<script type='text/javascript' src='../js/mootools-core.js'></script>
<script type='text/javascript' src='../js/mootools-more.js'></script>
<script type='text/javascript' src='../js/core.js'></script>
<script type='text/javascript' src='../js/less.js'></script>
<script type='text/javascript' src='js/mootools-core.js'></script>
<script type='text/javascript' src='js/mootools-more.js'></script>
<script type='text/javascript' src='js/core.js'></script>
<script type='text/javascript' src='js/less.js'></script>
<link rel="icon" href="../images/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon">
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<script type="text/javascript">
@@ -57,72 +58,72 @@
<div id="editTab" class="tabContent">
<div id="persist" class="buttonContainer">
<div id="save" class="buttonOn" title="Save">
<img src="../images/save.png"/>
<img src="images/save.png"/>
</div>
<div id="discard" class="buttonOn" title="Discard">
<img src="../images/discard.png"/>
<img src="images/discard.png"/>
</div>
</div>
<div id="edit" class="buttonContainer">
<div id="undoEdition" class="buttonOn" title="Undo Edition">
<img src="../images/undo.png"/>
<img src="images/undo.png"/>
</div>
<div id="redoEdition" class="buttonOn" title="Redo Edition">
<img src="../images/redo.png"/>
<img src="images/redo.png"/>
</div>
</div>
<div id="zoom" class="buttonContainer">
<div id="zoomIn" class="buttonOn" title="Zoom In">
<img src="../images/zoom-in.png"/>
<img src="images/zoom-in.png"/>
</div>
<div id="zoomOut" class="buttonOn" title="Zoom Out">
<img src="../images/zoom-out.png"/>
<img src="images/zoom-out.png"/>
</div>
</div>
<div id="node" class="buttonContainer">
<div id="topicShape" class="buttonExtOn" title="Topic Shape">
<img src="../images/topic-shape.png"/>
<img src="images/topic-shape.png"/>
</div>
<div id="addTopic" class="buttonOn" title="Add Topic">
<img src="../images/topic-add.png"/>
<img src="images/topic-add.png"/>
</div>
<div id="deleteTopic" class="buttonOn" title="Delete">
<img src="../images/topic-delete.png"/>
<img src="images/topic-delete.png"/>
</div>
<div id="topicBorder" class="buttonOn" title="Border Color">
<img src="../images/topic-border.png"/>
<img src="images/topic-border.png"/>
</div>
<div id="topicColor" class="buttonExtOn" title="Background Color">
<img src="../images/topic-color.png"/>
<img src="images/topic-color.png"/>
</div>
<div id="topicIcon" class="buttonExtOn" title="Add Icon">
<img src="../images/topic-icon.png"/>
<img src="images/topic-icon.png"/>
</div>
<div id="topicNote" class="buttonOn" title="Add Note">
<img src="../images/topic-note.png"/>
<img src="images/topic-note.png"/>
</div>
<div id="topicLink" class="buttonOn" title="Add Link">
<img src="../images/topic-link.png"/>
<img src="images/topic-link.png"/>
</div>
<div id="topicRelation" class="buttonOn" title="Add Relationship">
<img src="../images/topic-relation.png"/>
<img src="images/topic-relation.png"/>
</div>
</div>
<div id="font" class="buttonContainer">
<div id="fontFamily" class="buttonOn" title="Font Style">
<img src="../images/font-type.png"/>
<img src="images/font-type.png"/>
</div>
<div id="fontSize" class="buttonExtOn" title="Font Size">
<img src="../images/font-size.png"/>
<img src="images/font-size.png"/>
</div>
<div id="fontBold" class="buttonOn" title="Bold Style">
<img src="../images/font-bold.png"/>
<img src="images/font-bold.png"/>
</div>
<div id="fontItalic" class="buttonOn" title="Italic Style">
<img src="../images/font-italic.png"/>
<img src="images/font-italic.png"/>
</div>
<div id="fontColor" class="buttonExtOn" title="Fond Color" style="padding-top:4px">
<img src="../images/font-color.png"/>
<img src="images/font-color.png"/>
</div>
</div>
@@ -135,6 +136,6 @@
</div>
<div id="mindplot"></div>
<script type="text/javascript" src="../js/editor.js"></script>
<script type="text/javascript" src="js/editor.js"></script>
</body>
</html>

View File

@@ -2,20 +2,21 @@
<html>
<head>
<base href="../">
<title>WiseMapping - Editor </title>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
<!--[if lt IE 9]>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<![endif]-->
<link rel="stylesheet/less" type="text/css" href="../css/embedded.less"/>
<link rel="stylesheet/less" type="text/css" href="css/embedded.less"/>
<script type='text/javascript' src='../js/mootools-core.js'></script>
<script type='text/javascript' src='../js/mootools-more.js'></script>
<script type='text/javascript' src='../js/core.js'></script>
<script type='text/javascript' src='../js/less.js'></script>
<script type='text/javascript' src='js/mootools-core.js'></script>
<script type='text/javascript' src='js/mootools-more.js'></script>
<script type='text/javascript' src='js/core.js'></script>
<script type='text/javascript' src='js/less.js'></script>
<link rel="icon" href="../images/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon">
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<script type="text/javascript">
@@ -51,6 +52,6 @@
</div>
<div id="mindplot"></div>
<script type="text/javascript" src="../js/editor.js"></script>
<script type="text/javascript" src="js/editor.js"></script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 957 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@@ -1,230 +1,311 @@
/*
* Copyright [2011] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
* "powered by wisemapping" text requirement on every single page;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the license at
*
* http://www.wisemapping.org/license
*
* 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.
*/
var designer = null;
function buildDesigner(options) {
var container = $(options.container);
$assert(container, 'container could not be null');
// Register load events ...
designer = new mindplot.Designer(options, container);
designer.addEvent('loadSuccess', function() {
window.waitDialog.close();
window.waitDialog.destroy();
});
designer.addEvent('loadError', function(e) {
window.waitDialog.close();
window.waitDialog.destroy();
console.log(e);
});
// Configure default persistence manager ...
var persistence;
if (options.persistenceManager) {
persistence = eval("new " + options.persistenceManager + "()");
} else {
persistence = new mindplot.LocalStorageManager();
}
mindplot.PersistenceManager.init(persistence);
// Register toolbar event ...
if ($('toolbar')) {
var menu = new mindplot.widget.Menu(designer, 'toolbar');
// If a node has focus, focus can be move to another node using the keys.
designer._cleanScreen = function() {
menu.clear()
};
}
return designer;
}
function loadDesignerOptions(jsonConf) {
// Load map options ...
if (jsonConf) {
var request = new Request.JSON({
url: jsonConf,
async:false,
onSuccess:
function(options) {
this.options = options;
}.bind(this)
}
);
request.get();
result = this.options;
}
else {
// Set workspace screen size as default. In this way, resize issues are solved.
var containerSize = {
height: parseInt(screen.height),
width: parseInt(screen.width)
};
var viewPort = {
height: parseInt(window.innerHeight - 70), // Footer and Header
width: parseInt(window.innerWidth)
};
result = {readOnly:false,zoom:0.85,saveOnLoad:true,size:containerSize,viewPort:viewPort,container:'mindplot'};
}
return result;
}
editor = {};
editor.WaitDialog = new Class({
Extends:MooDialog,
initialize : function() {
var panel = this._buildPanel();
this.parent({
closeButton:false,
destroyOnClose:true,
autoOpen:true,
useEscKey:false,
title:'Loading ...',
onInitialize: function(wrapper) {
wrapper.setStyle('opacity', 0);
this.fx = new Fx.Morph(wrapper, {
duration: 100,
transition: Fx.Transitions.Bounce.easeOut
});
this.overlay = new Overlay(this.options.inject, {
duration: this.options.duration
});
if (this.options.closeOnOverlayClick) this.overlay.addEvent('click', this.close.bind(this));
}
,
onBeforeOpen: function() {
this.overlay.open();
this.fx.start({
'margin-top': [-200, -100],
opacity: [0, 1]
}).chain(function() {
this.fireEvent('show');
}.bind(this));
}
,
onBeforeClose: function() {
this.fx.start({
'margin-top': [-100, 0],
opacity: 0,
duration: 200
}).chain(function() {
this.fireEvent('hide');
}.bind(this));
this.overlay.close();
}}
)
;
this.setContent(panel);
},
_buildPanel : function () {
var result = new Element('div');
result.setStyles({
'text-align':'center',
width: '400px'
});
var img = new Element('img', {'src': '../images/ajax-loader.gif'});
img.inject(result);
return result;
},
show : function() {
this.open();
}
});
editor.Help = {
buildHelp:function(panel){
var container = new Element('div');
container.setStyles({width:'100%', textAlign:'center'});
var content1 = Help.buildContentIcon('../images/black-keyboard.png', 'Keyboard Shortcuts', function(){MOOdalBox.open('keyboard.htm','KeyBoard Shortcuts', '500px 400px', false);panel.hidePanel();});
var content2 = Help.buildContentIcon('../images/firstSteps.png', 'Editor First Steps', function(){
var wOpen;
var sOptions;
sOptions = 'status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes';
sOptions = sOptions + ',width=' + (screen.availWidth - 10).toString();
sOptions = sOptions + ',height=' + (screen.availHeight - 122).toString();
sOptions = sOptions + ',screenX=0,screenY=0,left=0,top=0';
wOpen = window.open("firststeps.htm", "WiseMapping", "width=100px, height=100px");
wOpen.focus();
wOpen.moveTo( 0, 0 );
wOpen.resizeTo( screen.availWidth, screen.availHeight );
panel.hidePanel();
});
container.addEvent('show', function(){
content1.effect('opacity',{duration:800}).start(0,100);
var eff = function(){content2.effect('opacity',{duration:800}).start(0,100);};
eff.delay(150);
});
container.addEvent('hide', function(){
content1.effect('opacity').set(0);
content2.effect('opacity').set(0)
});
content1.inject(container);
content2.inject(container);
return container;
},
buildContentIcon:function(image, text, onClickFn){
var container = new Element('div').setStyles({margin:'15px 0px 0px 0px', opacity:0, padding:'5px 0px', border: '1px solid transparent', cursor:'pointer'});
var icon = new Element('div');
icon.addEvent('click',onClickFn);
var img = new Element('img');
img.setProperty('src',image);
img.inject(icon);
icon.inject(container);
var textContainer = new Element('div').setStyles({width:'100%', color:'white'});
textContainer.innerHTML=text;
textContainer.inject(container);
container.addEvent('mouseover', function(event){
$(this).setStyle('border-top', '1px solid #BBB4D6');
$(this).setStyle('border-bottom', '1px solid #BBB4D6');
}.bindWithEvent(container));
container.addEvent('mouseout', function(event){
$(this).setStyle('border-top', '1px solid transparent');
$(this).setStyle('border-bottom', '1px solid transparent');
}.bindWithEvent(container));
return container;
}
};
// Show loading dialog ...
waitDialog = new editor.WaitDialog();
waitDialog.show();
// Loading libraries ...
Asset.javascript("../js/mindplot-min.js");
/*
* Copyright [2011] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
* "powered by wisemapping" text requirement on every single page;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the license at
*
* http://www.wisemapping.org/license
*
* 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.
*/
var designer = null;
function buildDesigner(options) {
var container = $(options.container);
$assert(container, 'container could not be null');
// Register load events ...
designer = new mindplot.Designer(options, container);
designer.addEvent('loadSuccess', function() {
window.waitDialog.close();
window.waitDialog.destroy();
});
window.onerror = function()
{
window.waitDialog.close();
window.waitDialog.destroy();
errorDialog.show();
console.log(e);
};
// Configure default persistence manager ...
var persistence;
if (options.persistenceManager) {
if (options.persistenceManager instanceof String) {
persistence = eval("new " + options.persistenceManager + "()");
}
else {
persistence = options.persistenceManager;
}
} else {
persistence = new mindplot.LocalStorageManager();
}
mindplot.PersistenceManager.init(persistence);
// Register toolbar event ...
if ($('toolbar')) {
var menu = new mindplot.widget.Menu(designer, 'toolbar', "");
// If a node has focus, focus can be move to another node using the keys.
designer._cleanScreen = function() {
menu.clear()
};
}
return designer;
}
function loadDesignerOptions(jsonConf) {
// Load map options ...
if (jsonConf) {
var request = new Request.JSON({
url: jsonConf,
async:false,
onSuccess:
function(options) {
this.options = options;
}.bind(this)
}
);
request.get();
result = this.options;
}
else {
// Set workspace screen size as default. In this way, resize issues are solved.
var containerSize = {
height: parseInt(screen.height),
width: parseInt(screen.width)
};
var viewPort = {
height: parseInt(window.innerHeight - 70), // Footer and Header
width: parseInt(window.innerWidth)
};
result = {readOnly:false,zoom:0.85,saveOnLoad:true,size:containerSize,viewPort:viewPort,container:'mindplot'};
}
console.log("result:" + JSON.encode(result));
return result;
}
editor = {};
editor.WaitDialog = new Class({
Extends:MooDialog,
initialize : function() {
var panel = this._buildPanel();
this.parent({
closeButton:false,
destroyOnClose:true,
autoOpen:true,
useEscKey:false,
title:'Loading ...',
onInitialize: function(wrapper) {
wrapper.setStyle('opacity', 0);
this.fx = new Fx.Morph(wrapper, {
duration: 100,
transition: Fx.Transitions.Bounce.easeOut
});
this.overlay = new Overlay(this.options.inject, {
duration: this.options.duration
});
if (this.options.closeOnOverlayClick) this.overlay.addEvent('click', this.close.bind(this));
},
onBeforeOpen: function() {
this.overlay.open();
this.fx.start({
'margin-top': [-200, -100],
opacity: [0, 1]
}).chain(function() {
this.fireEvent('show');
}.bind(this));
},
onBeforeClose: function() {
this.fx.start({
'margin-top': [-100, 0],
opacity: 0,
duration: 200
}).chain(function() {
this.fireEvent('hide');
}.bind(this));
this.overlay.close();
}}
);
this.setContent(panel);
},
_buildPanel : function () {
var result = new Element('div');
result.setStyles({
'text-align':'center',
width: '400px'
});
var img = new Element('img', {'src': 'images/ajax-loader.gif'});
img.inject(result);
return result;
},
show : function() {
this.open();
}
});
editor.FatalErrorDialog = new Class({
Extends:MooDialog,
initialize : function() {
var panel = this._buildPanel();
this.parent({
closeButton:false,
destroyOnClose:true,
autoOpen:true,
useEscKey:false,
title:'Outch!!. An unexpected error has occurred',
onInitialize: function(wrapper) {
wrapper.setStyle('opacity', 0);
this.fx = new Fx.Morph(wrapper, {
duration: 100,
transition: Fx.Transitions.Bounce.easeOut
});
this.overlay = new Overlay(this.options.inject, {
duration: this.options.duration
});
if (this.options.closeOnOverlayClick) this.overlay.addEvent('click', this.close.bind(this));
}
,
onBeforeOpen: function() {
this.overlay.open();
this.fx.start({
'margin-top': [-200, -100],
opacity: [0, 1]
}).chain(function() {
this.fireEvent('show');
}.bind(this));
}
,
onBeforeClose: function() {
this.fx.start({
'margin-top': [-100, 0],
opacity: 0,
duration: 200
}).chain(function() {
this.fireEvent('hide');
}.bind(this));
this.overlay.close();
}}
);
this.setContent(panel);
},
_buildPanel : function () {
var result = new Element('div');
result.setStyles({
'text-align':'center',
width: '400px'
});
var p = new Element('p', {'text': 'We\'re sorry, an error has occurred and we can not process your request. Please try again, or go to the home page.'});
p.inject(result);
var img = new Element('img', {'src': 'images/alert-sign.png'});
img.inject(result);
return result;
},
show : function() {
this.open();
}
});
editor.Help = {
buildHelp:function(panel) {
var container = new Element('div');
container.setStyles({width:'100%', textAlign:'center'});
var content1 = Help.buildContentIcon('images/black-keyboard.png', 'Keyboard Shortcuts', function() {
MOOdalBox.open('keyboard.htm', 'KeyBoard Shortcuts', '500px 400px', false);
panel.hidePanel();
});
var content2 = Help.buildContentIcon('images/firstSteps.png', 'Editor First Steps', function() {
var wOpen;
var sOptions;
sOptions = 'status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes';
sOptions = sOptions + ',width=' + (screen.availWidth - 10).toString();
sOptions = sOptions + ',height=' + (screen.availHeight - 122).toString();
sOptions = sOptions + ',screenX=0,screenY=0,left=0,top=0';
wOpen = window.open("firststeps.htm", "WiseMapping", "width=100px, height=100px");
wOpen.focus();
wOpen.moveTo(0, 0);
wOpen.resizeTo(screen.availWidth, screen.availHeight);
panel.hidePanel();
});
container.addEvent('show', function() {
content1.effect('opacity', {duration:800}).start(0, 100);
var eff = function() {
content2.effect('opacity', {duration:800}).start(0, 100);
};
eff.delay(150);
});
container.addEvent('hide', function() {
content1.effect('opacity').set(0);
content2.effect('opacity').set(0)
});
content1.inject(container);
content2.inject(container);
return container;
},
buildContentIcon:function(image, text, onClickFn) {
var container = new Element('div').setStyles({margin:'15px 0px 0px 0px', opacity:0, padding:'5px 0px', border: '1px solid transparent', cursor:'pointer'});
var icon = new Element('div');
icon.addEvent('click', onClickFn);
var img = new Element('img');
img.setProperty('src', image);
img.inject(icon);
icon.inject(container);
var textContainer = new Element('div').setStyles({width:'100%', color:'white'});
textContainer.innerHTML = text;
textContainer.inject(container);
container.addEvent('mouseover', function() {
$(this).setStyle('border-top', '1px solid #BBB4D6');
$(this).setStyle('border-bottom', '1px solid #BBB4D6');
}.bindWithEvent(container));
container.addEvent('mouseout', function() {
$(this).setStyle('border-top', '1px solid transparent');
$(this).setStyle('border-bottom', '1px solid transparent');
}.bindWithEvent(container));
return container;
}
};
// Show loading dialog ...
waitDialog = new editor.WaitDialog();
waitDialog.show();
errorDialog = new editor.FatalErrorDialog();
// Loading libraries ...
Asset.javascript("js/mindplot-min.js");

View File

@@ -0,0 +1,48 @@
<map name="welcome" version="tango">
<topic central="true" text="Welcome To WiseMapping" id="1" fontStyle=";;#dfcfe6;;;" bgColor="#0a0a08">
<topic position="178,-130" order="0" text="Try it Now!" id="11" fontStyle=";;#ffffff;;;" bgColor="#250be3"
brColor="#080559">
<topic position="272,-156" order="0" text="Double Click" id="12" fontStyle=";;#001be6;;italic;"/>
<topic position="274,-130" order="1" text=" INS to insert" id="13" fontStyle=";;#001be6;;italic;"/>
<topic position="285,-104" order="2" text="Drag map to move" id="14" fontStyle=";;#001be6;;italic;"/>
</topic>
<topic position="-189,-52" order="1" text="Productivity" id="2" fontStyle=";;#104f11;;;" bgColor="#d9b518">
<icon id="chart_bar"/>
<topic position="-310,-104" order="0" text="Share your ideas" id="3">
<icon id="bulb_light_on"/>
</topic>
<topic position="-299,-25" order="2" text="Brainstorming" id="4"/>
<topic position="-283,1" order="3" text="Visual " id="5"/>
<topic position="-307,-65" order="1" shape="image" image="80,43:images/logo-small.png" id="27"
metadata="{'media':'video,'url':'http://www.youtube.com/watch?v=P3FrXftyuzw&amp;feature=g-vrec&amp;context=G2b4ab69RVAAAAAAAAAA'}"/>
</topic>
<topic position="185,-39" order="2" text="Mind Mapping" id="6" fontStyle=";;#602378;;;" bgColor="#edabff">
<topic position="303,-78" order="0" text="Share with Collegues" id="7"/>
<topic position="275,-52" order="1" text="Online" id="8"/>
<topic position="299,-26" order="2" text="Anyplace, Anytime" id="9"/>
<topic position="277,0" order="3" text="Free!!!" id="10"/>
</topic>
<topic position="-183,66" order="3" text="Web 2.0 Tool" id="22" fontStyle=";;#0c1d6b;;;" bgColor="#add1f7">
<topic position="-281,27" order="0" text="Collaborate" id="23"/>
<topic position="-302,53" order="1" text="No plugin required" id="24">
<icon id="conn_disconnect"/>
</topic>
<topic position="-271,79" order="2" text="Share" id="25"/>
<topic position="-282,105" order="3" text="Easy to use" id="26"/>
</topic>
<topic position="171,91" order="4" text="Features" id="15">
<topic position="266,26" order="0" text="Links to Sites" id="16" fontStyle=";6;;;;">
<link url="http://www.digg.com" type="url"/>
</topic>
<topic position="245,52" order="1" text="Fonts" id="17"/>
<topic position="255,78" order="2" text="Topic Color" id="18"/>
<topic position="260,104" order="3" text="Topic Shapes" shape="line" id="19"/>
<topic position="252,130" order="4" text="Icons" id="20">
<icon id="object_rainbow"/>
</topic>
<topic position="272,156" order="5" text="History Changes" id="21">
<icon id="arrowc_turn_left"/>
</topic>
</topic>
</topic>
</map>