Finish embedded view implementation.
This commit is contained in:
74
wise-editor/src/main/webapp/html/viewmode.html
Normal file
74
wise-editor/src/main/webapp/html/viewmode.html
Normal file
@@ -0,0 +1,74 @@
|
||||
<!DOCTYPE HTML>
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>WiseMapping - View </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" type="text/css" href="../css/embedded.css"/>
|
||||
<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>
|
||||
|
||||
<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">
|
||||
|
||||
var mapId = 'welcome';
|
||||
var viewMode = true;
|
||||
|
||||
var mindReady = false;
|
||||
$(document).addEvent('loadcomplete', function(resource) {
|
||||
mindReady = resource == 'mind' ? true : mindReady;
|
||||
|
||||
if (mindReady) {
|
||||
designer = buildDesigner(viewMode);
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
$('zoomIn').addEvent('click', function() {
|
||||
designer.zoomIn();
|
||||
});
|
||||
|
||||
$('zoomOut').addEvent('click', function() {
|
||||
designer.zoomOut();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="mapContainer">
|
||||
<div id="mindplot"></div>
|
||||
<div id="embFooter">
|
||||
<div id="logo"></div>
|
||||
<div id="zoomIn" class="button"></div>
|
||||
<div id="zoomOut" class="button"></div>
|
||||
<div id="mapDetails">
|
||||
<span class="title">Author: </span> Paulo Veiga
|
||||
<span class="title">Description: </span>View Mode
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="../js/editor.js"></script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user