Merge branch 'feature/remove_mootols' into develop
This commit is contained in:
@@ -14,32 +14,30 @@ function createStorageManager(mindplot) {
|
||||
|
||||
saveMapXml : function(mapId, mapXml, pref, saveHistory, events) {
|
||||
var url = this.backendUrl + mapId;
|
||||
var xmlRequest = new Request({
|
||||
$.ajax({
|
||||
url: url,
|
||||
method: 'post',
|
||||
async: false,
|
||||
onSuccess: function(responseText) {
|
||||
events.onSuccess();
|
||||
},
|
||||
success: function(responseText) {
|
||||
events.onSuccess();
|
||||
},
|
||||
onError: function (text, error) {
|
||||
console.log("Error saving mindmap to: " + url, text, error);
|
||||
events.onError();
|
||||
}
|
||||
});
|
||||
xmlRequest.send();
|
||||
},
|
||||
|
||||
loadMapDom : function(mapId) {
|
||||
var xml;
|
||||
var xmlRequest = new Request({
|
||||
$.ajax({
|
||||
url: this.backendUrl + mapId,
|
||||
method: 'get',
|
||||
async: false,
|
||||
onSuccess: function(responseText) {
|
||||
success: function(responseText) {
|
||||
xml = responseText;
|
||||
}
|
||||
});
|
||||
xmlRequest.send();
|
||||
|
||||
// If I could not load it from a file, hard code one.
|
||||
if (xml == null) {
|
||||
@@ -57,7 +55,7 @@ function createStorageManager(mindplot) {
|
||||
|
||||
In your script for loading the mindmap you add a call to the callback into the loadcomplete method::
|
||||
|
||||
$(document).addEvent('loadcomplete', function(resource) {
|
||||
$(document).on('loadcomplete', function(resource) {
|
||||
//Asset.javascript("{{ asset('bundles/fpgadmin/js/FpgMindmapPersistence.js')}}");
|
||||
// Options has been defined in by a external ile ?
|
||||
var options = {
|
||||
|
1
wise-editor/src/main/webapp/bootstrap
Symbolic link
1
wise-editor/src/main/webapp/bootstrap
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../mindplot/src/main/javascript/libraries/bootstrap
|
@@ -89,7 +89,7 @@ body * {
|
||||
}
|
||||
|
||||
body {
|
||||
font: normal 80% "Helvetica Neue",Helvetica,Arial,sans-serif;
|
||||
// font: normal 80% "Helvetica Neue",Helvetica,Arial,sans-serif;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
@@ -110,12 +110,6 @@ ul {
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
a:link, a:visited {
|
||||
font: bold 100%;
|
||||
text-decoration: underline;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a:hover, a:active {
|
||||
font: bold 100%;
|
||||
text-decoration: underline;
|
||||
|
@@ -1,9 +1,10 @@
|
||||
@import "compatibility.less";
|
||||
@import "libraries/moodialog/css/MooDialog.css";
|
||||
|
||||
/********************************************************************************/
|
||||
/* Header & Toolbar Styles */
|
||||
/********************************************************************************/
|
||||
@import "header.less";
|
||||
@import "../bootstrap/css/bootstrap.min.css";
|
||||
|
||||
body {
|
||||
-webkit-touch-callout: none;
|
||||
@@ -66,86 +67,6 @@ div#small_error_icon {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
padding: 5px 14px 6px;
|
||||
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
|
||||
color: #333;
|
||||
font-size: 13px;
|
||||
line-height: normal;
|
||||
border: 1px solid #ccc;
|
||||
border-bottom-color: #bbb;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
-webkit-transition: 0.1s linear all;
|
||||
-moz-transition: 0.1s linear all;
|
||||
-ms-transition: 0.1s linear all;
|
||||
-o-transition: 0.1s linear all;
|
||||
transition: 0.1s linear all;
|
||||
color: #ffffff;
|
||||
background-color: #0064cd;
|
||||
background-repeat: repeat-x;
|
||||
background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
|
||||
background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
|
||||
background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
|
||||
background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
|
||||
background-image: -o-linear-gradient(top, #049cdb, #0064cd);
|
||||
background-image: linear-gradient(top, #049cdb, #0064cd);
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
border-color: #0064cd #0064cd #003f81;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-position: 0 -15px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
background-color: #e6e6e6;
|
||||
background-repeat: no-repeat;
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
|
||||
background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
|
||||
background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
|
||||
background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
|
||||
background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
|
||||
background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
|
||||
padding: 5px 14px 6px;
|
||||
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
|
||||
color: #333;
|
||||
font-size: 13px;
|
||||
line-height: normal;
|
||||
border: 1px solid #ccc;
|
||||
border-bottom-color: #bbb;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
-webkit-transition: 0.1s linear all;
|
||||
-moz-transition: 0.1s linear all;
|
||||
-ms-transition: 0.1s linear all;
|
||||
-o-transition: 0.1s linear all;
|
||||
transition: 0.1s linear all;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
background-position: 0 -15px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/** */
|
||||
/* Modal dialogs definitions */
|
||||
|
||||
@@ -214,4 +135,33 @@ div.shareModalDialog {
|
||||
padding-left: 19px;
|
||||
}
|
||||
|
||||
.panelIcon {
|
||||
width:16px;
|
||||
height:16px;
|
||||
margin-left: 4px;
|
||||
margin-top: 3px;
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
.panelIcon:hover {
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
||||
.popoverBlack {
|
||||
background: black;
|
||||
}
|
||||
|
||||
.popoverBlack.bottom .arrow:after{
|
||||
border-bottom-color: black;
|
||||
}
|
||||
|
||||
.popoverGray {
|
||||
background: #e4e2d2;
|
||||
box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.2);
|
||||
border: 3px double #bebebe;
|
||||
}
|
||||
|
||||
.popoverGray.bottom .arrow:after{
|
||||
border-bottom-color: #e4e2d2;
|
||||
}
|
||||
|
||||
|
@@ -100,3 +100,26 @@ div#embFooter {
|
||||
background: #E5E5E5;
|
||||
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
|
||||
}
|
||||
|
||||
/* FIXME: duplicate in mindmapList
|
||||
---------------------------- Scrollbar --------------------------------- */
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
direction:rtl;
|
||||
text-align: left;
|
||||
position: relative;
|
||||
left: 10px;
|
||||
}
|
||||
::-webkit-scrollbar-track {
|
||||
border-radius: 10px;
|
||||
background-color: #eaeaea;
|
||||
border-left: 1px solid #ccc;
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
background-color: #c6c6c6;
|
||||
}
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background-color: #08c;
|
||||
}
|
||||
|
||||
|
@@ -1 +0,0 @@
|
||||
../../../../../../../../mindplot/src/main/javascript/libraries/moodialog/css/MooDialog.css
|
@@ -1 +0,0 @@
|
||||
../../../../../../../../mindplot/src/main/javascript/libraries/moodialog/css/dialog-close.png
|
@@ -33,6 +33,7 @@ div#toolbar .buttonOn, div#toolbar .buttonOff, div#toolbar .buttonActive, div#to
|
||||
margin-top: 3px;
|
||||
padding-top: 2px;
|
||||
padding-left: 2px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
div#toolbar .buttonOn:hover {
|
||||
@@ -68,6 +69,7 @@ div#toolbar .buttonExtOn, div#toolbar .buttonExtOff, div#toolbar .buttonExtActiv
|
||||
margin-top: 3px;
|
||||
padding-top: 2px;
|
||||
padding-left: 5px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
div#toolbar .buttonExtOn:hover {
|
||||
|
@@ -12,7 +12,6 @@
|
||||
<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>
|
||||
|
||||
@@ -22,7 +21,7 @@
|
||||
<script type="text/javascript">
|
||||
|
||||
var mapId = 'welcome';
|
||||
$(document).addEvent('loadcomplete', function(resource) {
|
||||
$(document).on('loadcomplete', function(resource) {
|
||||
var options = loadDesignerOptions();
|
||||
var designer = buildDesigner(options);
|
||||
|
||||
@@ -33,7 +32,7 @@
|
||||
});
|
||||
|
||||
|
||||
$(document).addEvent('loadcomplete', function(resource) {
|
||||
$(document).on('loadcomplete', function(resource) {
|
||||
|
||||
$("dragImageNode").addEvent('mousedown', function(event) {
|
||||
event.preventDefault();
|
||||
|
@@ -11,8 +11,14 @@
|
||||
<![endif]-->
|
||||
<link rel="stylesheet/less" type="text/css" href="css/editor.less"/>
|
||||
|
||||
<script type='text/javascript' src='js/jquery.js'></script>
|
||||
<script type='text/javascript' src='js/jquery-mousewheel.js'></script>
|
||||
<script type='text/javascript' src='js/hotkeys.js'></script>
|
||||
<script type='text/javascript' src='js/underscorejs.js'></script>
|
||||
<script type="text/javascript" language="javascript" src="bootstrap/js/bootstrap.js"></script>
|
||||
<script src="js/less.js" type="text/javascript"></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>
|
||||
|
||||
@@ -21,7 +27,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
var mapId = 'welcome';
|
||||
$(document).addEvent('loadcomplete', function(resource) {
|
||||
$(document).bind('loadcomplete', function(resource) {
|
||||
var options = loadDesignerOptions();
|
||||
var designer = buildDesigner(options);
|
||||
|
||||
@@ -35,6 +41,14 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id='load' class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div style="height: 120px; text-align: center; border: 2px solid orange" class="modal-content">
|
||||
<img style='margin-top:25px; text-align: center' src="images/ajax-loader.gif">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="header">
|
||||
|
||||
<div id="headerInfo">
|
||||
|
@@ -10,8 +10,10 @@
|
||||
<![endif]-->
|
||||
<link rel="stylesheet/less" type="text/css" href="css/embedded.less"/>
|
||||
|
||||
<script type='text/javascript' src='js/jquery.js'></script>
|
||||
<script type='text/javascript' src='js/bootstrap.js'></script>
|
||||
<script type='text/javascript' src='js/underscore.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>
|
||||
|
||||
@@ -21,13 +23,11 @@
|
||||
<script type="text/javascript">
|
||||
|
||||
var mapId = 'welcome';
|
||||
$(document).addEvent('loadcomplete', function(resource) {
|
||||
$(document).on('loadcomplete', function(resource) {
|
||||
|
||||
// Options has been defined in by a external ile ?
|
||||
var uri = new URI(window.location);
|
||||
var query = String.parseQueryString(uri.get('query'));
|
||||
var confUrl = query.confUrl;
|
||||
|
||||
var queryString = window.location.search;
|
||||
var confUrl = queryString.replace("?confUrl=", "");
|
||||
var options = loadDesignerOptions(confUrl);
|
||||
var designer = buildDesigner(options);
|
||||
|
||||
@@ -130,9 +130,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="headerNotifier"></div>
|
||||
<div id="footer">
|
||||
<div id="footerLogo"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="mindplot" onselectstart="return false;"></div>
|
||||
|
@@ -10,8 +10,10 @@
|
||||
<![endif]-->
|
||||
<link rel="stylesheet/less" type="text/css" href="css/embedded.less"/>
|
||||
|
||||
<script type='text/javascript' src='js/jquery.js'></script>
|
||||
<script type='text/javascript' src='js/bootstrap.js'></script>
|
||||
<script type='text/javascript' src='js/underscore.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>
|
||||
|
||||
@@ -21,7 +23,7 @@
|
||||
<script type="text/javascript">
|
||||
|
||||
var mapId = 'welcome';
|
||||
$(document).addEvent('loadcomplete', function(resource) {
|
||||
$(document).unbind().bind('loadcomplete', function (resource) {
|
||||
|
||||
// Set readonly option ...
|
||||
var options = loadDesignerOptions();
|
||||
@@ -33,7 +35,7 @@
|
||||
var mindmap;
|
||||
try {
|
||||
mindmap = persistence.load(mapId);
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
// If the map could not be loaded, create a new empty map...
|
||||
mindmap = mindplot.model.Mindmap.buildEmpty(mapId);
|
||||
}
|
||||
@@ -43,6 +45,13 @@
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='load' class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div style="height: 120px; text-align: center; border: 2px solid orange" class="modal-content">
|
||||
<img style='margin-top:25px; text-align: center' src="images/ajax-loader.gif">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="header">
|
||||
<div id="headerNotifier"></div>
|
||||
|
BIN
wise-editor/src/main/webapp/images/logo-xsmall.png
Normal file
BIN
wise-editor/src/main/webapp/images/logo-xsmall.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
1
wise-editor/src/main/webapp/js/bootstrap.js
vendored
Symbolic link
1
wise-editor/src/main/webapp/js/bootstrap.js
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../../mindplot/src/main/javascript/libraries/bootstrap/js/bootstrap.min.js
|
@@ -18,20 +18,41 @@
|
||||
|
||||
var designer = null;
|
||||
|
||||
|
||||
/*
|
||||
* Disclaimer: this global variable is a temporary workaround to Mootools' Browser class
|
||||
* We need to avoid browser detection and replace it with feature detection,
|
||||
* jquery recommends: http://www.modernizr.com/
|
||||
*/
|
||||
|
||||
Browser = {
|
||||
firefox: window.globalStorage,
|
||||
ie: document.all && !window.opera,
|
||||
ie6: !window.XMLHttpRequest,
|
||||
ie7: document.all && window.XMLHttpRequest && !XDomainRequest && !window.opera,
|
||||
ie8: document.documentMode==8,
|
||||
opera: Boolean(window.opera),
|
||||
chrome: Boolean(window.chrome),
|
||||
safari: window.getComputedStyle && !window.globalStorage && !window.opera,
|
||||
Platform: {
|
||||
mac: navigator.platform.indexOf('Mac') != -1
|
||||
}
|
||||
};
|
||||
|
||||
function buildDesigner(options) {
|
||||
|
||||
var container = $(options.container);
|
||||
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.delay(1000, window.waitDialog);
|
||||
window.waitDialog.close();
|
||||
window.waitDialog = null;
|
||||
window.mindmapLoadReady = true;
|
||||
});
|
||||
|
||||
window.onerror = function (message, url, lineNo) {
|
||||
var onerrorFn = function (message, url, lineNo) {
|
||||
|
||||
// Ignore errors ...
|
||||
if (message === "Script error." && lineNo == 0) {
|
||||
@@ -50,22 +71,21 @@ function buildDesigner(options) {
|
||||
}
|
||||
errorMsg = errorMsg.toString();
|
||||
|
||||
new Request({
|
||||
$.ajax({
|
||||
method:'post',
|
||||
url:"/c/restful/logger/editor",
|
||||
headers:{"Content-Type":"application/json", "Accept":"application/json"},
|
||||
emulation:false,
|
||||
urlEncoded:false
|
||||
}).post(JSON.encode({
|
||||
jsErrorMsg:"Message: '" + errorMsg + "', line:'" + lineNo + "', url: :" + url,
|
||||
jsStack:window.errorStack,
|
||||
userAgent:navigator.userAgent,
|
||||
mapId:options.mapId}));
|
||||
|
||||
data: {
|
||||
jsErrorMsg: "Message: '" + errorMsg + "', line:'" + lineNo + "', url: :" + url,
|
||||
jsStack: window.errorStack,
|
||||
userAgent: navigator.userAgent,
|
||||
mapId: options.mapId
|
||||
}
|
||||
});
|
||||
|
||||
// Close loading dialog ...
|
||||
if (window.waitDialog) {
|
||||
window.waitDialog.close.delay(1000, window.waitDialog);
|
||||
window.waitDialog.close();
|
||||
window.waitDialog = null;
|
||||
}
|
||||
|
||||
@@ -76,6 +96,9 @@ function buildDesigner(options) {
|
||||
}
|
||||
};
|
||||
|
||||
// @Todo: Remove this after all is fixed.
|
||||
// window.onerror = onerrorFn;
|
||||
|
||||
// Configure default persistence manager ...
|
||||
var persistence;
|
||||
if (options.persistenceManager) {
|
||||
@@ -92,7 +115,7 @@ function buildDesigner(options) {
|
||||
mindplot.PersistenceManager.init(persistence);
|
||||
|
||||
// Register toolbar event ...
|
||||
if ($('toolbar')) {
|
||||
if ($('#toolbar')) {
|
||||
var menu = new mindplot.widget.Menu(designer, 'toolbar', options.mapId, "");
|
||||
|
||||
// If a node has focus, focus can be move to another node using the keys.
|
||||
@@ -108,17 +131,17 @@ function buildDesigner(options) {
|
||||
function loadDesignerOptions(jsonConf) {
|
||||
// Load map options ...
|
||||
var result;
|
||||
var me = this;
|
||||
if (jsonConf) {
|
||||
var request = new Request.JSON({
|
||||
url:jsonConf,
|
||||
async:false,
|
||||
onSuccess:function (options) {
|
||||
this.options = options;
|
||||
|
||||
}.bind(this)
|
||||
$.ajax({
|
||||
url: jsonConf,
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
method: 'get',
|
||||
success: function (options) {
|
||||
me.options = options;
|
||||
}
|
||||
);
|
||||
request.get();
|
||||
});
|
||||
result = this.options;
|
||||
}
|
||||
else {
|
||||
@@ -139,75 +162,28 @@ function loadDesignerOptions(jsonConf) {
|
||||
|
||||
editor = {};
|
||||
editor.WaitDialog = new Class({
|
||||
Extends:MooDialog,
|
||||
initialize:function () {
|
||||
var panel = this._buildPanel();
|
||||
this.parent({
|
||||
closeButton:false,
|
||||
destroyOnClose:true,
|
||||
autoOpen:false,
|
||||
useEscKey:false,
|
||||
title:'',
|
||||
onInitialize:function (wrapper) {
|
||||
wrapper.setStyle('opacity', 0);
|
||||
this.wrapper.setStyle('display', 'none');
|
||||
this.fx = new Fx.Morph(wrapper, {
|
||||
duration:100,
|
||||
transition:Fx.Transitions.Bounce.easeOut
|
||||
});
|
||||
},
|
||||
|
||||
onBeforeOpen:function () {
|
||||
this.overlay = new Overlay(this.options.inject, {
|
||||
duration:this.options.duration
|
||||
});
|
||||
this.overlay.open();
|
||||
this.fx.start({
|
||||
'margin-top':[-200, -100],
|
||||
opacity:[0, 1]
|
||||
}).chain(function () {
|
||||
this.fireEvent('show');
|
||||
this.wrapper.setStyle('display', 'block');
|
||||
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
onBeforeClose:function () {
|
||||
this.fx.start({
|
||||
'margin-top':[-100, 0],
|
||||
opacity:0,
|
||||
duration:200
|
||||
}).chain(function () {
|
||||
this.fireEvent('hide');
|
||||
this.wrapper.setStyle('display', 'none');
|
||||
|
||||
}.bind(this));
|
||||
}}
|
||||
);
|
||||
this.setContent(panel);
|
||||
this.panel = this._buildPanel();
|
||||
},
|
||||
|
||||
_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.setStyle('margin-top', '15px');
|
||||
img.inject(result);
|
||||
var result = $('#load');
|
||||
var content = result.find('.modal-content');
|
||||
var winH = $(window).height();
|
||||
//Set the popup window to center
|
||||
content.css('margin-top', winH/2 - content.height()/2);
|
||||
return result;
|
||||
},
|
||||
|
||||
show:function () {
|
||||
this.open();
|
||||
this.panel.modal({
|
||||
backdrop: 'static'
|
||||
});
|
||||
},
|
||||
|
||||
destroy:function () {
|
||||
this.parent();
|
||||
this.overlay.destroy();
|
||||
close: function() {
|
||||
this.panel.modal('hide');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Show loading dialog ...
|
||||
@@ -215,4 +191,4 @@ waitDialog = new editor.WaitDialog();
|
||||
waitDialog.show();
|
||||
|
||||
// Loading libraries ...
|
||||
Asset.javascript("js/mindplot-min.js");
|
||||
jQuery.getScript("js/mindplot-min.js");
|
||||
|
1
wise-editor/src/main/webapp/js/hotkeys.js
Symbolic link
1
wise-editor/src/main/webapp/js/hotkeys.js
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../../mindplot/src/main/javascript/libraries/hotkeys/jquery.hotkeys.js
|
1
wise-editor/src/main/webapp/js/jquery-mousewheel.js
vendored
Symbolic link
1
wise-editor/src/main/webapp/js/jquery-mousewheel.js
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../../mindplot/src/main/javascript/libraries/jquery/jquery.mousewheel.min.js
|
1
wise-editor/src/main/webapp/js/jquery.js
vendored
Symbolic link
1
wise-editor/src/main/webapp/js/jquery.js
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../../mindplot/src/main/javascript/libraries/jquery/jquery-2.1.0.min.js
|
@@ -1 +1 @@
|
||||
../../../../../mindplot/src/main/javascript/libraries/less/less-1.6.2.min.js
|
||||
../../../../../mindplot/src/main/javascript/libraries/less/less-1.4.2.min.js
|
52
wise-editor/src/main/webapp/js/mindplot-min.js
vendored
52
wise-editor/src/main/webapp/js/mindplot-min.js
vendored
@@ -4,25 +4,21 @@
|
||||
function JSPomLoader(pomUrl, callback) {
|
||||
console.log("POM Load URL:" + pomUrl);
|
||||
var jsUrls;
|
||||
var request = new Request({
|
||||
new jQuery.ajax({
|
||||
url: pomUrl,
|
||||
method: 'get',
|
||||
onRequest: function() {
|
||||
console.log("loading ...");
|
||||
},
|
||||
onSuccess: function(responseText, responseXML) {
|
||||
|
||||
method: 'get'
|
||||
}).done(function (data) {
|
||||
// Collect JS Urls ...
|
||||
var concatRoot = responseXML.getElementsByTagName('includes');
|
||||
var fileSetArray = Array.filter(concatRoot[0].childNodes, function(elem) {
|
||||
var concatRoot = data.getElementsByTagName('includes');
|
||||
var fileSetArray = Array.filter(concatRoot[0].childNodes, function (elem) {
|
||||
return elem.nodeType == Node.ELEMENT_NODE
|
||||
});
|
||||
|
||||
jsUrls = new Array();
|
||||
Array.each(fileSetArray, function(elem) {
|
||||
Array.each(fileSetArray, function (elem) {
|
||||
var jsUrl = elem.firstChild.nodeValue;
|
||||
if (jsUrl.indexOf("${basedir}") != -1) {
|
||||
jsUrls.push(pomUrl.substring(0, pomUrl.lastIndexOf('/')) + jsUrl.replace("${basedir}",""));
|
||||
jsUrls.push(pomUrl.substring(0, pomUrl.lastIndexOf('/')) + jsUrl.replace("${basedir}", ""));
|
||||
} else {
|
||||
|
||||
jsUrls.push(pomUrl.substring(0, pomUrl.lastIndexOf('/')) + "/src/main/javascript/" + jsUrl);
|
||||
@@ -39,31 +35,41 @@ function JSPomLoader(pomUrl, callback) {
|
||||
callback();
|
||||
} else {
|
||||
var url = urls.pop();
|
||||
Asset.javascript(url, {
|
||||
onLoad: function() {
|
||||
jsRecLoad(urls)
|
||||
$.ajax({
|
||||
url: url,
|
||||
crossDomain: true,
|
||||
dataType: "script",
|
||||
success: function () {
|
||||
jsRecLoad(urls);
|
||||
},
|
||||
error: function(){
|
||||
console.error("Unexpected error loading:"+url);
|
||||
console.error(arguments);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
jsRecLoad(jsUrls);
|
||||
},
|
||||
onFailure: function() {
|
||||
console.log('Sorry, your request failed :(');
|
||||
}
|
||||
});
|
||||
request.send();
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Asset.javascript("../../../../../web2d/target/classes/web2d.svg-min.js", {
|
||||
onLoad: function() {
|
||||
JSPomLoader('../../../../../mindplot/pom.xml', function() {
|
||||
$.ajax({
|
||||
url: "../../../../../web2d/target/classes/web2d.svg-min.js",
|
||||
crossDomain: true,
|
||||
dataType: "script",
|
||||
success: function () {
|
||||
JSPomLoader('../../../../../mindplot/pom.xml', function () {
|
||||
});
|
||||
},
|
||||
error: function(){
|
||||
console.error("Unexpected error loading:"+url);
|
||||
console.error(arguments);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -1 +0,0 @@
|
||||
../../../../../mindplot/src/main/javascript/libraries/mootools/mootools-more-1.4.0.1.js
|
1
wise-editor/src/main/webapp/js/underscore.js
Symbolic link
1
wise-editor/src/main/webapp/js/underscore.js
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../../mindplot/src/main/javascript/libraries/underscorejs/underscore-min.js
|
1
wise-editor/src/main/webapp/js/underscorejs.js
Symbolic link
1
wise-editor/src/main/webapp/js/underscorejs.js
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../../mindplot/src/main/javascript/libraries/underscorejs/underscore-min.js
|
Reference in New Issue
Block a user