Keep cleaning and refactoring styles and samples.

This commit is contained in:
Paulo Veiga
2012-02-02 00:13:29 -03:00
parent b37ecd8c2c
commit b6dd7712f9
23 changed files with 317 additions and 1276 deletions

View File

@@ -0,0 +1,23 @@
<!DOCTYPE HTML>
<html>
<head>
<title>WiseMapping - Embedded Sample </title>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
<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>
<h1>Embedded editor sample</h1>
<h2></h2>
<div style="text-align:center">
<iframe src="editor.html?width=800&height=600" width="800" height="600"></iframe>
</div>
</body>
</html>

View File

@@ -20,32 +20,28 @@
<script type="text/javascript">
var mapId = 'welcome';
var mindReady = false;
var viewMode = false;
$(document).addEvent('loadcomplete', function(resource) {
mindReady = resource == 'mind' ? true : mindReady;
if (mindReady) {
designer = buildDesigner(viewMode);
var designer = buildDesigner(viewMode);
// Configure default persistence manager ...
mindplot.PersitenceManager.init(new mindplot.LocalStorageManager());
// Configure default persistence manager ...
mindplot.PersistenceManager.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);
// Load map from XML ...
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);
}
designer.loadMap(mindmap);
// If not problem has arisen, close the dialog ...
if (!window.hasUnexpectedErrors) {
waitDialog.deactivate();
}
// If not problem has arisen, close the dialog ...
if (!window.hasUnexpectedErrors) {
waitDialog.deactivate();
}
});
@@ -53,12 +49,6 @@
</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>
@@ -103,7 +93,7 @@
<div id="save" class="buttonOn" title="Save">
<img src="../images/save.png"/>
</div>
<div id="discart" class="buttonOn" title="Discard">
<div id="discard" class="buttonOn" title="Discard">
<img src="../images/discard.png"/>
</div>
</div>

View File

@@ -20,32 +20,28 @@
<script type="text/javascript">
var mapId = 'welcome';
var mindReady = false;
var viewMode = false;
$(document).addEvent('loadcomplete', function(resource) {
mindReady = resource == 'mind' ? true : mindReady;
var designer = buildDesigner(viewMode);
if (mindReady) {
designer = buildDesigner(viewMode);
// Configure default persistence manager ...
mindplot.PersistenceManager.init(new mindplot.LocalStorageManager());
// Configure default persistence manager ...
mindplot.PersitenceManager.init(new mindplot.LocalStorageManager());
// Load map from XML ...
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);
}
designer.loadMap(mindmap);
// 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();
}
// If not problem has arisen, close the dialog ...
if (!window.hasUnexpectedErrors) {
waitDialog.deactivate();
}
});
@@ -105,7 +101,7 @@
<div id="save" class="buttonOn" title="Save">
<img src="../images/save.png"/>
</div>
<div id="discart" class="buttonOn" title="Discard">
<div id="discard" class="buttonOn" title="Discard">
<img src="../images/discard.png"/>
</div>
<div id="print" class="buttonOn" title="Print">

View File

@@ -21,27 +21,23 @@
var mapId = 'welcome';
var viewMode = true;
var mindReady = false;
$(document).addEvent('loadcomplete', function(resource) {
mindReady = resource == 'mind' ? true : mindReady;
var designer = buildDesigner(viewMode);
if (mindReady) {
designer = buildDesigner(viewMode);
// Configure default persistence manager ...
mindplot.PersistenceManager.init(new mindplot.LocalStorageManager());
// 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);
// Load map from XML ...
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);
}
designer.loadMap(mindmap);
$('zoomIn').addEvent('click', function() {
designer.zoomIn();
@@ -64,8 +60,7 @@
<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
View Mode Sample
</div>
</div>
</div>