Rename wise-doc to wise-editor.
This commit is contained in:
48
wise-editor/src/main/webapp/html/collab.html
Normal file
48
wise-editor/src/main/webapp/html/collab.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<html>
|
||||
<body>
|
||||
<script type="text/javascript" src="http://docs.google.com/brix/static/api/js/jsapi.nocache.js"></script>
|
||||
<script type="text/javascript">
|
||||
var collabOnLoad = function() {
|
||||
app = new goog.collab.CollaborativeApp();
|
||||
app.start();
|
||||
|
||||
app.addListener('modelLoad', function(model) {
|
||||
var root = app.getModel().getRoot();
|
||||
var myList = root.get("myList");
|
||||
if (!myList) {
|
||||
myList = app.getModel().create("List");
|
||||
root.put("myList", myList);
|
||||
}
|
||||
|
||||
myList.addListener('valuesAdded', function(event) {
|
||||
console.log("value added:" + myList.size());
|
||||
});
|
||||
|
||||
myList.addListener('valuesRemoved', function(event) {
|
||||
console.log("value removed:" + myList.size());
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
removedAction = function() {
|
||||
var root = app.getModel().getRoot();
|
||||
var myList = root.get("myList");
|
||||
myList.remove(myList.size() - 1);
|
||||
};
|
||||
|
||||
addAction = function() {
|
||||
var root = app.getModel().getRoot();
|
||||
var myList = root.get("myList");
|
||||
myList.add("Some elem " + myList.size());
|
||||
console.log("Click on adding...");
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
Funca?
|
||||
|
||||
<input style="font-size:20px;width:50px;height:50px;" type="button" value="Add" id="a2" onclick="addAction(this)"/>
|
||||
<input style="font-size:20px;width:50px;height:50px;" type="button" value="Remove" id="a2"
|
||||
onclick="removedAction(this)"/>
|
||||
</body>
|
||||
</html>
|
204
wise-editor/src/main/webapp/html/editor.html
Normal file
204
wise-editor/src/main/webapp/html/editor.html
Normal file
@@ -0,0 +1,204 @@
|
||||
<!DOCTYPE HTML>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<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/editor.less"/>
|
||||
|
||||
<script type='text/javascript' src='../js/mootools-core-1.3.2.js'></script>
|
||||
<script type='text/javascript' src='../js/mootools-more-1.3.2.js'></script>
|
||||
<script type='text/javascript' src='../js/core.js'></script>
|
||||
<script type='text/javascript' src='../js/less-1.1.3.min.js'></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var mapId = 'welcome';
|
||||
var mindReady = false;
|
||||
var collab = 'standalone';
|
||||
|
||||
$(document).addEvent('loadcomplete', function(resource) {
|
||||
mindReady = resource == 'mind' ? true : mindReady;
|
||||
|
||||
if (mindReady) {
|
||||
designer = buildDesigner(collab);
|
||||
|
||||
// Configure default persistence manager ...
|
||||
mindplot.PersitenceManager.init(new mindplot.LocalStorageManager());
|
||||
|
||||
// Load map from XML ...
|
||||
var persitence = mindplot.PersitenceManager.getInstance();
|
||||
var mindmap;
|
||||
try {
|
||||
mindmap = persitence.load(mapId);
|
||||
} catch(e) {
|
||||
// If the map could not be loaded, create a new empty map...
|
||||
mindmap = mindplot.model.Mindmap.buildEmpty(mapId);
|
||||
}
|
||||
designer.loadMap(mindmap);
|
||||
|
||||
// If not problem has arisen, close the dialog ...
|
||||
if (!window.hasUnexpectedErrors) {
|
||||
waitDialog.deactivate();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<link rel="icon" href="../images/favicon.ico" type="image/x-icon">
|
||||
<link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form method="post" id="printForm" name="printForm" action='' style="height:100%;" target="${mindmap.title}">
|
||||
<input type="hidden" name="action" value="print">
|
||||
<input type="hidden" name="mapId" value="${mindmap.id}">
|
||||
<input type="hidden" name="mapSvg" value="">
|
||||
</form>
|
||||
|
||||
<div id="waitDialog" style="display:none">
|
||||
<div id="waitingContainer">
|
||||
<div class="loadingIcon"></div>
|
||||
<div class="loadingText">
|
||||
Loading ...
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="errorDialog" style="display:none">
|
||||
<div id="errorContainer">
|
||||
<div class="loadingIcon"></div>
|
||||
<div class="loadingText">
|
||||
Unexpected error loading your map :(
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var waitDialog = new core.WaitDialog();
|
||||
waitDialog.activate(true, $("waitDialog"));
|
||||
$(window).addEvent("error", function(event) {
|
||||
|
||||
// Show error dialog ...
|
||||
waitDialog.changeContent($("errorDialog"), false);
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<div id="header">
|
||||
|
||||
<div id="headerInfo">
|
||||
<div id="headerActions">
|
||||
<span>MyWiseMappigs</span> | <span>Settings</span> | <span>Logout</span>
|
||||
</div>
|
||||
<div id="headerLogo"></div>
|
||||
<div id="headerMapTitle">Title: <span>Hola</span></div>
|
||||
</div>
|
||||
<div id="toolbar">
|
||||
<div id="editTab" class="tabContent">
|
||||
<div id="persist" class="buttonContainer">
|
||||
<div id="save" class="buttonOn" title="Save">
|
||||
<img src="../images/save.png"/>
|
||||
</div>
|
||||
<div id="discart" class="buttonOn" title="Discard">
|
||||
<img src="../images/discard.png"/>
|
||||
</div>
|
||||
<div id="print" class="buttonOn" title="Print">
|
||||
<img src="../images/print.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"/>
|
||||
</div>
|
||||
<div id="redoEdition" class="buttonOn" title="Redo Edition">
|
||||
<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"/>
|
||||
</div>
|
||||
<div id="zoomOut" class="buttonOn" title="Zoom Out">
|
||||
<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"/>
|
||||
</div>
|
||||
<div id="addTopic" class="buttonOn" title="Add Topic">
|
||||
<img src="../images/topic-add.png"/>
|
||||
</div>
|
||||
<div id="deleteTopic" class="buttonOn" title="Delete">
|
||||
<img src="../images/topic-delete.png"/>
|
||||
</div>
|
||||
<div id="topicBorder" class="buttonOn" title="Border Color">
|
||||
<img src="../images/topic-border.png"/>
|
||||
</div>
|
||||
<div id="topicColor" class="buttonExtOn" title="Background Color">
|
||||
<img src="../images/topic-color.png"/>
|
||||
</div>
|
||||
<div id="topicIcon" class="buttonExtOn" title="Add Icon">
|
||||
<img src="../images/topic-icon.png"/>
|
||||
</div>
|
||||
<div id="topicNote" class="buttonOn" title="Add Note">
|
||||
<img src="../images/topic-note.png"/>
|
||||
</div>
|
||||
<div id="topicLink" class="buttonOn" title="Add Link">
|
||||
<img src="../images/topic-link.png"/>
|
||||
</div>
|
||||
<div id="topicRelation" class="buttonOn" title="Add Relationship">
|
||||
<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"/>
|
||||
</div>
|
||||
<div id="fontSize" class="buttonExtOn" title="Font Size">
|
||||
<img src="../images/font-size.png"/>
|
||||
</div>
|
||||
<div id="fontBold" class="buttonOn" title="Bold Style">
|
||||
<img src="../images/font-bold.png"/>
|
||||
</div>
|
||||
<div id="fontItalic" class="buttonOn" title="Italic Style">
|
||||
<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>
|
||||
</div>
|
||||
<div id="collaboration" class="buttonContainer">
|
||||
<div id="tagIt" class="buttonOn" title="Tag">
|
||||
<img src="../images/tag.png"/>
|
||||
</div>
|
||||
<div id="shareIt" class="buttonOn" title="Share">
|
||||
<img src="../images/share.png"/>
|
||||
</div>
|
||||
<div id="publishIt" class="buttonOn" title="Publish">
|
||||
<img src="../images/public.png"/>
|
||||
</div>
|
||||
<div id="history" class="buttonOn" title="History">
|
||||
<img src="../images/history.png"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="headerNotifier"></div>
|
||||
</div>
|
||||
|
||||
<div id="mindplot"></div>
|
||||
<script type="text/javascript" src="../js/editor.js"></script>
|
||||
</body>
|
||||
</html>
|
111
wise-editor/src/main/webapp/html/embedded.htm
Normal file
111
wise-editor/src/main/webapp/html/embedded.htm
Normal file
@@ -0,0 +1,111 @@
|
||||
<!DOCTYPE HTML>
|
||||
|
||||
<%@ include file="/jsp/init.jsp" %>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<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]-->
|
||||
<!--<script type="text/javascript" src="http://docs.google.com/brix/static/api/js/jsapi.nocache.js"></script>-->
|
||||
<script type='text/javascript' src='../js/less-1.1.3.min.js'></script>
|
||||
<link rel="stylesheet" type="text/css" href="../css/embedded.css"/>
|
||||
|
||||
<script type='text/javascript'
|
||||
src='https://ajax.googleapis.com/ajax/libs/mootools/1.3.2/mootools-yui-compressed.js'></script>
|
||||
|
||||
<script type='text/javascript'
|
||||
src='/mindplot/src/main/javascript/libraries/mootools/mootools-more-1.3.2.1-yui.js'></script>
|
||||
<script type='text/javascript' src='/core-js/target/classes/core.js'></script>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var mapId = '${mindmap.id}';
|
||||
var mapXml = '<map name="38298" version="pela"><topic central="true" text="test\nThis is working ?" id="1"/></map>';
|
||||
var mindReady = false;
|
||||
$(document).addEvent('loadcomplete', function(resource) {
|
||||
mindReady = resource == 'mind' ? true : mindReady;
|
||||
if (mindReady) {
|
||||
|
||||
collab = 'standalone';
|
||||
//var editorProperties = {zoom:0.85,saveOnLoad:true,collab:'standalone'};
|
||||
|
||||
var isTryMode = false;
|
||||
designer = buildDesigner();
|
||||
|
||||
var domDocument = core.Utils.createDocumentFromText(mapXml);
|
||||
var serializer = mindplot.XMLMindmapSerializerFactory.getSerializerFromDocument(domDocument);
|
||||
var mindmap = serializer.loadFromDom(domDocument, mapId);
|
||||
|
||||
// Now, load the map ...
|
||||
designer.loadMap(mindmap);
|
||||
|
||||
// If not problem has arisen, close the dialog ...
|
||||
if (!window.hasUnexpectedErrors) {
|
||||
waitDialog.deactivate();
|
||||
}
|
||||
|
||||
$('zoomIn').addEvent('click', function() {
|
||||
designer.zoomIn();
|
||||
});
|
||||
|
||||
$('zoomOut').addEvent('click', function() {
|
||||
designer.zoomOut();
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="waitDialog" style="display:none">
|
||||
<div id="waitingContainer">
|
||||
<div class="loadingIcon"></div>
|
||||
<div class="loadingText">
|
||||
Loading ...
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="errorDialog" style="display:none">
|
||||
<div id="errorContainer">
|
||||
<div class="loadingIcon"></div>
|
||||
<div class="loadingText">
|
||||
Unexpected error loading your map :(
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var waitDialog = new core.WaitDialog();
|
||||
waitDialog.activate(true, $("waitDialog"));
|
||||
$(window).addEvent("error", function(event) {
|
||||
|
||||
// Show error dialog ...
|
||||
waitDialog.changeContent($("errorDialog"), false);
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<div id="mapContainer">
|
||||
<div id="mindplot"></div>
|
||||
<div id="embFooter">
|
||||
<a href="${pageContext.request.contextPath}/c/home.htm" target="new">
|
||||
<div id="logo"></div>
|
||||
</a>
|
||||
|
||||
<div id="zoomIn" class="button"></div>
|
||||
<div id="zoomOut" class="button"></div>
|
||||
<div id="mapDetails">
|
||||
<span class="title"><spring:message code="CREATOR"/>:</span><span>${mindmap.creator}</span>
|
||||
<span class="title"><spring:message code="DESCRIPTION"/>:</span><span>${mindmap.description}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="../js/editor.js"></script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user