More refactors.
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<mkdir dir="${basedir}/target/classes"/>
|
||||
<mkdir dir="${basedir}/target/classes"/>
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
@@ -54,9 +54,21 @@
|
||||
<include>${basedir}/target/tmp/Monitor-min.js</include>
|
||||
<include>${basedir}/target/tmp/Point-min.js</include>
|
||||
<include>${basedir}/target/tmp/Utils-min.js</include>
|
||||
<include>${basedir}/target/tmp/WaitDialog-min.js</include>
|
||||
<!--<include>${basedir}/target/tmp/LoadingDialog-min.js</include>-->
|
||||
<!-- @Todo:Review this -->
|
||||
<include>
|
||||
${basedir}/../mindplot/src/main/javascript/libraries/moodialog/Overlay.js
|
||||
</include>
|
||||
<include>
|
||||
${basedir}/../mindplot/src/main/javascript/libraries/moodialog/MooDialog.js
|
||||
</include>
|
||||
<include>
|
||||
${basedir}/../mindplot/src/main/javascript/libraries/moodialog/MooDialog.Request.js
|
||||
</include>
|
||||
<include>
|
||||
${basedir}/../mindplot/src/main/javascript/libraries/moodialog/MooDialog.Fx.js
|
||||
</include>
|
||||
<include>${basedir}/target/tmp/footer-min.js</include>
|
||||
|
||||
</includes>
|
||||
</aggregation>
|
||||
</aggregations>
|
||||
|
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
core.LoadingDiaglog = new Class({
|
||||
Extends:MooDialog,
|
||||
initialize : function() {
|
||||
this.parent({
|
||||
closeButton:false,
|
||||
useEscKey:false
|
||||
});
|
||||
var panel = this._buildPanel();
|
||||
this.setContent(panel);
|
||||
},
|
||||
|
||||
_buildPanel : function () {
|
||||
|
||||
var result = new Element('div');
|
||||
var content = new Element('p', {text:"sample"});
|
||||
|
||||
|
||||
result.addEvent('keydown', function(event) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
// waitDialog.activate(true, $("waitDialog"));
|
||||
// $(window).addEvent("error", function(event) {
|
||||
//
|
||||
// // Show error dialog ...
|
||||
// waitDialog.changeContent($("errorDialog"), false);
|
||||
// return false;
|
||||
// });
|
||||
|
||||
content.inject(result);
|
||||
return result;
|
||||
},
|
||||
|
||||
show : function() {
|
||||
this.open();
|
||||
}
|
||||
|
||||
});
|
@@ -1,135 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
Created By: Chris Campbell
|
||||
Website: http://particletree.com
|
||||
Date: 2/1/2006
|
||||
|
||||
Inspired by the lightbox implementation found at http://www.huddletogether.com/projects/lightbox/
|
||||
/*-----------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
core.WaitDialog = new Class({
|
||||
|
||||
|
||||
yPos : 0,
|
||||
xPos : 0,
|
||||
|
||||
initialize: function() {
|
||||
},
|
||||
// Turn everything on - mainly the IE fixes
|
||||
activate: function(changeCursor, dialogContent)
|
||||
{
|
||||
|
||||
this.content = dialogContent;
|
||||
|
||||
this._initLightboxMarkup();
|
||||
|
||||
this.displayLightbox("block");
|
||||
|
||||
// Change to loading cursor.
|
||||
if (changeCursor)
|
||||
{
|
||||
window.document.body.style.cursor = "wait";
|
||||
}
|
||||
},
|
||||
changeContent: function(dialogContent, changeCursor)
|
||||
{
|
||||
this.content = dialogContent;
|
||||
if (!$('lbContent'))
|
||||
{
|
||||
// Dialog is not activated. Nothing to do ...
|
||||
window.document.body.style.cursor = "pointer";
|
||||
return;
|
||||
}
|
||||
|
||||
this.processInfo();
|
||||
|
||||
// Change to loading cursor.
|
||||
if (changeCursor)
|
||||
{
|
||||
window.document.body.style.cursor = "wait";
|
||||
}else
|
||||
{
|
||||
window.document.body.style.cursor = "auto";
|
||||
}
|
||||
},
|
||||
displayLightbox: function(display) {
|
||||
if (display != 'none')
|
||||
this.processInfo();
|
||||
$('overlay-lightbox').style.display = display;
|
||||
$('lightbox').style.display = display;
|
||||
|
||||
},
|
||||
|
||||
// Display dialog content ...
|
||||
processInfo: function() {
|
||||
if ($('lbContent'))
|
||||
$('lbContent').dispose();
|
||||
|
||||
var lbContentElement = new Element('div').setProperty('id', 'lbContent');
|
||||
lbContentElement.innerHTML = this.content.innerHTML;
|
||||
|
||||
lbContentElement.inject($('lbLoadMessage'),'before');
|
||||
$('lightbox').className = "done";
|
||||
},
|
||||
|
||||
// Search through new links within the lightbox, and attach click event
|
||||
actions: function() {
|
||||
lbActions = document.getElementsByClassName('lbAction');
|
||||
|
||||
for (i = 0; i < lbActions.length; i++) {
|
||||
$(lbActions[i]).addEvent('click', function() {
|
||||
this[lbActions[i].rel].pass(this)
|
||||
}.bind(this));
|
||||
lbActions[i].onclick = function() {
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
// Example of creating your own functionality once lightbox is initiated
|
||||
deactivate: function(time) {
|
||||
|
||||
if ($('lbContent'))
|
||||
$('lbContent').dispose();
|
||||
|
||||
this.displayLightbox("none");
|
||||
|
||||
window.document.body.style.cursor = "default";
|
||||
}
|
||||
, _initLightboxMarkup:function()
|
||||
{
|
||||
// Add overlay element inside body ...
|
||||
var bodyElem = document.getElementsByTagName('body')[0];
|
||||
var overlayElem = new Element('div').setProperty('id', 'overlay-lightbox');
|
||||
overlayElem.inject(bodyElem);
|
||||
|
||||
// Add lightbox element inside body ...
|
||||
var lightboxElem = new Element('div').setProperty('id', 'lightbox');
|
||||
lightboxElem.addClass('loading');
|
||||
|
||||
var lbLoadMessageElem = new Element('div').setProperty('id', 'lbLoadMessage');
|
||||
lbLoadMessageElem.inject(lightboxElem);
|
||||
|
||||
lightboxElem.inject(bodyElem);
|
||||
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user