WiseMapping
This commit is contained in:
72
trunk/core-js/pom.xml
Normal file
72
trunk/core-js/pom.xml
Normal file
@@ -0,0 +1,72 @@
|
||||
<project>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>core-js</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>Core JavaScript Utils Libraries</name>
|
||||
|
||||
<parent>
|
||||
<groupId>org.wisemapping</groupId>
|
||||
<artifactId>wisemapping</artifactId>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>merge-js-resources</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<mkdir dir="${basedir}/target/classes"/>
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>net.sf.alchim</groupId>
|
||||
<artifactId>yuicompressor-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>compress</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sourceDirectory>src/main/javascript/</sourceDirectory>
|
||||
<outputDirectory>target/tmp/</outputDirectory>
|
||||
<aggregations>
|
||||
<aggregation>
|
||||
<output>${basedir}/target/classes/core.js</output>
|
||||
<includes>
|
||||
<include>${basedir}/target/tmp/header-min.js</include>
|
||||
<include>${basedir}/target/tmp/ColorPicker-min.js</include>
|
||||
<include>${basedir}/target/tmp/Loader-min.js</include>
|
||||
<include>${basedir}/target/tmp/Logger-min.js</include>
|
||||
<include>${basedir}/target/tmp/Monitor-min.js</include>
|
||||
<include>${basedir}/target/tmp/Point-min.js</include>
|
||||
<include>${basedir}/target/tmp/UserAgent-min.js</include>
|
||||
<include>${basedir}/target/tmp/Utils-min.js</include>
|
||||
<include>${basedir}/target/tmp/WaitDialog-min.js</include>
|
||||
<include>${basedir}/target/tmp/footer-min.js</include>
|
||||
</includes>
|
||||
</aggregation>
|
||||
</aggregations>
|
||||
<nomunge>true</nomunge>
|
||||
<jswarn>false</jswarn>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
95
trunk/core-js/src/main/javascript/ColorPicker.js
Normal file
95
trunk/core-js/src/main/javascript/ColorPicker.js
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
core.ColorPicker = function()
|
||||
{
|
||||
this.palette = "7x10";
|
||||
this._palettes = {"7x10": [["fff", "fcc", "fc9", "ff9", "ffc", "9f9", "9ff", "cff", "ccf", "fcf"],
|
||||
["ccc", "f66", "f96", "ff6", "ff3", "6f9", "3ff", "6ff", "99f", "f9f"],
|
||||
["c0c0c0", "f00", "f90", "fc6", "ff0", "3f3", "6cc", "3cf", "66c", "c6c"],
|
||||
["999", "c00", "f60", "fc3", "fc0", "3c0", "0cc", "36f", "63f", "c3c"],
|
||||
["666", "900", "c60", "c93", "990", "090", "399", "33f", "60c", "939"],
|
||||
["333", "600", "930", "963", "660", "060", "366", "009", "339", "636"],
|
||||
["000", "300", "630", "633", "330", "030", "033", "006", "309", "303"]],
|
||||
|
||||
"3x4": [["ffffff"/*white*/, "00ff00"/*lime*/, "008000"/*green*/, "0000ff"/*blue*/],
|
||||
["c0c0c0"/*silver*/, "ffff00"/*yellow*/, "ff00ff"/*fuchsia*/, "000080"/*navy*/],
|
||||
["808080"/*gray*/, "ff0000"/*red*/, "800080"/*purple*/, "000000"/*black*/]]
|
||||
//["00ffff"/*aqua*/, "808000"/*olive*/, "800000"/*maroon*/, "008080"/*teal*/]];
|
||||
};
|
||||
};
|
||||
|
||||
core.ColorPicker.buildRendering = function ()
|
||||
{
|
||||
this.domNode = document.createElement("table");
|
||||
// dojo.html.disableSelection(this.domNode);
|
||||
// dojo.event.connect(this.domNode, "onmousedown", function (e) {
|
||||
// e.preventDefault();
|
||||
// });
|
||||
with (this.domNode) { // set the table's properties
|
||||
cellPadding = "0";
|
||||
cellSpacing = "1";
|
||||
border = "1";
|
||||
style.backgroundColor = "white";
|
||||
}
|
||||
var colors = this._palettes[this.palette];
|
||||
for (var i = 0; i < colors.length; i++) {
|
||||
var tr = this.domNode.insertRow(-1);
|
||||
for (var j = 0; j < colors[i].length; j++) {
|
||||
if (colors[i][j].length == 3) {
|
||||
colors[i][j] = colors[i][j].replace(/(.)(.)(.)/, "$1$1$2$2$3$3");
|
||||
}
|
||||
|
||||
var td = tr.insertCell(-1);
|
||||
with (td.style) {
|
||||
backgroundColor = "#" + colors[i][j];
|
||||
border = "1px solid gray";
|
||||
width = height = "15px";
|
||||
fontSize = "1px";
|
||||
}
|
||||
|
||||
td.color = "#" + colors[i][j];
|
||||
|
||||
td.onmouseover = function (e) {
|
||||
this.style.borderColor = "white";
|
||||
};
|
||||
td.onmouseout = function (e) {
|
||||
this.style.borderColor = "gray";
|
||||
};
|
||||
// dojo.event.connect(td, "onmousedown", this, "onClick");
|
||||
|
||||
td.innerHTML = " ";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
core.ColorPicker.onClick = function(/*Event*/ e)
|
||||
{
|
||||
this.onColorSelect(e.currentTarget.color);
|
||||
e.currentTarget.style.borderColor = "gray";
|
||||
};
|
||||
|
||||
core.ColorPicker.onColorSelect = function(color)
|
||||
{
|
||||
// summary:
|
||||
// Callback when a color is selected.
|
||||
// color: String
|
||||
// Hex value corresponding to color.
|
||||
};
|
||||
|
87
trunk/core-js/src/main/javascript/Loader.js
Normal file
87
trunk/core-js/src/main/javascript/Loader.js
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
core.Loader =
|
||||
{
|
||||
load: function(scriptPath, stylePath,jsFileName)
|
||||
{
|
||||
var headElement = document.getElementsByTagName('head');
|
||||
var htmlDoc = headElement.item(0);
|
||||
var baseUrl = this.baseUrl(jsFileName);
|
||||
if (scriptPath && scriptPath.length > 0)
|
||||
{
|
||||
for (var i = 0; i < scriptPath.length; i++)
|
||||
{
|
||||
this.includeScriptNode(baseUrl + scriptPath[i]);
|
||||
}
|
||||
}
|
||||
if (stylePath && stylePath.length > 0)
|
||||
{
|
||||
for (var i = 0; i < stylePath.length; i++)
|
||||
{
|
||||
this.includeStyleNode(baseUrl + stylePath[i]);
|
||||
}
|
||||
}
|
||||
},
|
||||
baseUrl: function(jsFileName)
|
||||
{
|
||||
var headElement = document.getElementsByTagName('head');
|
||||
var htmlDoc = headElement.item(0);
|
||||
var headChildren = htmlDoc.childNodes;
|
||||
var result = null;
|
||||
for (var i = 0; i < headChildren.length; i++)
|
||||
{
|
||||
var node = headChildren.item(i);
|
||||
if (node.nodeName && node.nodeName.toLowerCase() == "script")
|
||||
{
|
||||
var libraryUrl = node.src;
|
||||
if (libraryUrl.indexOf(jsFileName) != -1)
|
||||
{
|
||||
var index = libraryUrl.lastIndexOf("/");
|
||||
index = libraryUrl.lastIndexOf("/", index - 1);
|
||||
result = libraryUrl.substring(0, index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (result == null)
|
||||
{
|
||||
throw "Could not obtain the base url directory.";
|
||||
}
|
||||
return result;
|
||||
},
|
||||
includeScriptNode: function(filename) {
|
||||
var html_doc = document.getElementsByTagName('head').item(0);
|
||||
var js = document.createElement('script');
|
||||
js.setAttribute('language', 'javascript');
|
||||
js.setAttribute('type', 'text/javascript');
|
||||
js.setAttribute('src', filename);
|
||||
html_doc.appendChild(js);
|
||||
return false;
|
||||
},
|
||||
includeStyleNode: function(filename) {
|
||||
var html_doc = document.getElementsByTagName('head').item(0);
|
||||
var js = document.createElement('link');
|
||||
js.setAttribute('rel', 'stylesheet');
|
||||
js.setAttribute('type', 'text/css');
|
||||
js.setAttribute('href', filename);
|
||||
html_doc.appendChild(js);
|
||||
return false;
|
||||
}
|
||||
};
|
129
trunk/core-js/src/main/javascript/Logger.js
Normal file
129
trunk/core-js/src/main/javascript/Logger.js
Normal file
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
core.Logger =
|
||||
{
|
||||
_enabled: false,
|
||||
setEnabled: function (enabled) {
|
||||
this._enabled = enabled;
|
||||
},init: function(serverLogger)
|
||||
{
|
||||
this._serverLogger = serverLogger;
|
||||
if (window.onerror) {
|
||||
// Save any previously defined handler to call
|
||||
core.Logger._origOnWindowError = window.onerror;
|
||||
}
|
||||
window.onerror = core.Logger._onWindowError;
|
||||
},
|
||||
log: function(message, severity, src)
|
||||
{
|
||||
if (!severity)
|
||||
{
|
||||
severity = core.LoggerSeverity.DEBUG;
|
||||
}
|
||||
|
||||
// Error messages must be loggued in the server ...
|
||||
if (severity >= core.LoggerSeverity.ERROR)
|
||||
{
|
||||
if (this._serverLogger)
|
||||
{
|
||||
try
|
||||
{
|
||||
this._serverLogger.logError(core.LoggerSeverity.ERROR, message);
|
||||
} catch(e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// // Finally, log the error in debug console if it's enabled.
|
||||
if (this._enabled)
|
||||
{
|
||||
this._browserLogger(message);
|
||||
}
|
||||
},
|
||||
_browserLogger: function(message) {
|
||||
// Firebug is not enabled.
|
||||
|
||||
if (core.Logger._origOnWindowError) {
|
||||
core.Logger._origOnWindowError();
|
||||
}
|
||||
|
||||
if (!console)
|
||||
{
|
||||
if (!this._isInitialized)
|
||||
{
|
||||
this._console = window.document.createElement("div");
|
||||
this._console.style.position = "absolute";
|
||||
this._console.style.width = "300px";
|
||||
this._console.style.height = "200px";
|
||||
this._console.style.bottom = 0;
|
||||
this._console.style.right = 0;
|
||||
this._console.style.border = '1px solid black';
|
||||
this._console.style.background = 'yellow';
|
||||
this._console.style.zIndex = 60000;
|
||||
|
||||
this._textArea = window.document.createElement("textarea");
|
||||
this._textArea.cols = "40";
|
||||
this._textArea.rows = "10";
|
||||
this._console.appendChild(this._textArea);
|
||||
|
||||
window.document.body.appendChild(this._console);
|
||||
this._isInitialized = true;
|
||||
}
|
||||
this._textArea.value = this._textArea.value + "\n" + msg;
|
||||
|
||||
} else
|
||||
{
|
||||
// Firebug console...
|
||||
console.log(message);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Handles logging of messages due to window error events.
|
||||
*
|
||||
* @method _onWindowError
|
||||
* @param sMsg {String} The error message.
|
||||
* @param sUrl {String} URL of the error.
|
||||
* @param sLine {String} Line number of the error.
|
||||
* @private
|
||||
*/
|
||||
_onWindowError: function(sMsg, sUrl, sLine) {
|
||||
// Logger is not in scope of this event handler
|
||||
// http://cfis.savagexi.com/articles/2007/05/08/what-went-wrong-with-my-javascript
|
||||
try {
|
||||
core.Logger.log(sMsg + ' (' + sUrl + ', line ' + sLine + ')', core.LoggerSeverity.ERROR, "window");
|
||||
}
|
||||
catch(e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
logError: function(msg) {
|
||||
core.Logger.log(msg, core.LoggerSeverity.ERROR, "code");
|
||||
}
|
||||
};
|
||||
|
||||
core.LoggerSeverity =
|
||||
{
|
||||
DEBUG: 1,
|
||||
WARNING: 2,
|
||||
ERROR: 3,
|
||||
WINDOW: 4
|
||||
};
|
142
trunk/core-js/src/main/javascript/Monitor.js
Normal file
142
trunk/core-js/src/main/javascript/Monitor.js
Normal file
@@ -0,0 +1,142 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
core.Monitor = function(fadeElement, logContentElem)
|
||||
{
|
||||
core.assert(fadeElement, "fadeElement can not be null");
|
||||
core.assert(logContentElem, "logContentElem can not be null");
|
||||
|
||||
this.pendingMessages = [];
|
||||
this.inProgress = false;
|
||||
this._container = fadeElement;
|
||||
this._currentMessage = null;
|
||||
this._logContentElem = logContentElem;
|
||||
|
||||
this._fxOpacity = fadeElement.effect('opacity', { duration: 6000 });
|
||||
|
||||
};
|
||||
|
||||
core.Monitor.prototype._logMessage = function(msg, msgKind)
|
||||
{
|
||||
this._fxOpacity.clearTimer();
|
||||
if (msgKind == core.Monitor.MsgKind.ERROR)
|
||||
{
|
||||
msg = "<div id='small_error_icon'>" + msg + "</div>";
|
||||
}
|
||||
this._currentMessage = msg;
|
||||
this._fxOpacity.start(1, 0);
|
||||
this._logContentElem.innerHTML = msg;
|
||||
|
||||
};
|
||||
|
||||
core.Monitor.prototype.logError = function(userMsg)
|
||||
{
|
||||
this.logMessage(userMsg, core.Monitor.MsgKind.ERROR);
|
||||
};
|
||||
|
||||
core.Monitor.prototype.logFatal = function(userMsg)
|
||||
{
|
||||
this.logMessage(userMsg, core.Monitor.MsgKind.FATAL);
|
||||
};
|
||||
|
||||
core.Monitor.prototype.logMessage = function(msg, msgKind)
|
||||
{
|
||||
if (!msgKind)
|
||||
{
|
||||
msgKind = core.Monitor.MsgKind.INFO;
|
||||
}
|
||||
|
||||
if (msgKind == core.Monitor.MsgKind.FATAL)
|
||||
{
|
||||
// In this case, a modal dialog must be shown... No recovery is possible.
|
||||
new Windoo.Alert(msg,
|
||||
{
|
||||
'window': { theme:Windoo.Themes.aero,
|
||||
title:"Outch!!. An unexpected error.",
|
||||
'onClose':function() {
|
||||
}
|
||||
}
|
||||
});
|
||||
} else
|
||||
{
|
||||
var messages = this.pendingMessages;
|
||||
var monitor = this;
|
||||
|
||||
if (!this.executer)
|
||||
{
|
||||
// Log current message ...
|
||||
monitor._logMessage(msg, msgKind);
|
||||
|
||||
// Start worker thread ...
|
||||
var disptacher = function()
|
||||
{
|
||||
if (messages.length > 0)
|
||||
{
|
||||
var msgToDisplay = messages.shift();
|
||||
monitor._logMessage(msgToDisplay);
|
||||
}
|
||||
|
||||
// Stop thread?
|
||||
if (messages.length == 0)
|
||||
{
|
||||
$clear(monitor.executer);
|
||||
monitor.executer = null;
|
||||
monitor._fxOpacity.hide();
|
||||
this._currentMessage = null;
|
||||
}
|
||||
};
|
||||
this.executer = disptacher.periodical(600);
|
||||
} else
|
||||
{
|
||||
if (this._currentMessage != msg)
|
||||
{
|
||||
messages.push(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
core.Monitor.setInstance = function(monitor)
|
||||
{
|
||||
this.monitor = monitor;
|
||||
};
|
||||
|
||||
core.Monitor.getInstance = function()
|
||||
{
|
||||
var result = this.monitor;
|
||||
if (result == null)
|
||||
{
|
||||
result = {
|
||||
logError: function() {
|
||||
},
|
||||
logMessage: function() {
|
||||
}
|
||||
};
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
core.Monitor.MsgKind =
|
||||
{
|
||||
INFO:1,
|
||||
WARNING:2,
|
||||
ERROR:3,
|
||||
FATAL:4
|
||||
};
|
40
trunk/core-js/src/main/javascript/Point.js
Normal file
40
trunk/core-js/src/main/javascript/Point.js
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
core.Point = function(x, y)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
};
|
||||
|
||||
core.Point.prototype.setValue = function(x, y)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
};
|
||||
|
||||
core.Point.prototype.inspect = function()
|
||||
{
|
||||
return "{x:" + this.x + ",y:" + this.y + "}";
|
||||
};
|
||||
|
||||
core.Point.prototype.clone = function()
|
||||
{
|
||||
return new core.Point(this.x, this.y);
|
||||
};
|
148
trunk/core-js/src/main/javascript/UserAgent.js
Normal file
148
trunk/core-js/src/main/javascript/UserAgent.js
Normal file
@@ -0,0 +1,148 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
core.UserAgent = {
|
||||
_isVMLSupported:null,
|
||||
isVMLSupported: function()
|
||||
{
|
||||
if (!core.Utils.isDefined())
|
||||
{
|
||||
this._isVMLSupported = navigator.appVersion.match(/MSIE (\d\.\d)/);
|
||||
}
|
||||
return this._isVMLSupported;
|
||||
},
|
||||
isSVGSupported: function()
|
||||
{
|
||||
return !core.UserAgent.isVMLSupported();
|
||||
},
|
||||
isIframeWorkaroundRequired: function()
|
||||
{
|
||||
return core.UserAgent.OS == "Mac" && core.UserAgent.browser == "Firefox" && core.UserAgent.version < 3;
|
||||
},
|
||||
isMozillaFamily: function()
|
||||
{
|
||||
return this.browser == "Netscape" || this.browser == "Firefox";
|
||||
},
|
||||
isIE: function()
|
||||
{
|
||||
return this.browser == "Explorer";
|
||||
},
|
||||
init: function () {
|
||||
this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
|
||||
this.version = this.searchVersion(navigator.userAgent)
|
||||
|| this.searchVersion(navigator.appVersion)
|
||||
|| "an unknown version";
|
||||
this.OS = this.searchString(this.dataOS) || "an unknown OS";
|
||||
},
|
||||
searchString: function (data) {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var dataString = data[i].string;
|
||||
var dataProp = data[i].prop;
|
||||
this.versionSearchString = data[i].versionSearch || data[i].identity;
|
||||
if (dataString) {
|
||||
if (dataString.indexOf(data[i].subString) != -1)
|
||||
return data[i].identity;
|
||||
}
|
||||
else if (dataProp)
|
||||
return data[i].identity;
|
||||
}
|
||||
},
|
||||
searchVersion: function (dataString) {
|
||||
var index = dataString.indexOf(this.versionSearchString);
|
||||
if (index == -1) return;
|
||||
return parseFloat(dataString.substring(index + this.versionSearchString.length + 1));
|
||||
},
|
||||
dataBrowser: [
|
||||
{ string: navigator.userAgent,
|
||||
subString: "OmniWeb",
|
||||
versionSearch: "OmniWeb/",
|
||||
identity: "OmniWeb"
|
||||
},
|
||||
{
|
||||
string: navigator.vendor,
|
||||
subString: "Apple",
|
||||
identity: "Safari"
|
||||
},
|
||||
{
|
||||
prop: window.opera,
|
||||
identity: "Opera"
|
||||
},
|
||||
{
|
||||
string: navigator.vendor,
|
||||
subString: "iCab",
|
||||
identity: "iCab"
|
||||
},
|
||||
{
|
||||
string: navigator.vendor,
|
||||
subString: "KDE",
|
||||
identity: "Konqueror"
|
||||
},
|
||||
{
|
||||
string: navigator.userAgent,
|
||||
subString: "Firefox",
|
||||
identity: "Firefox"
|
||||
},
|
||||
{
|
||||
string: navigator.vendor,
|
||||
subString: "Camino",
|
||||
identity: "Camino"
|
||||
},
|
||||
{ // for newer Netscapes (6+)
|
||||
string: navigator.userAgent,
|
||||
subString: "Netscape",
|
||||
identity: "Netscape"
|
||||
},
|
||||
{
|
||||
string: navigator.userAgent,
|
||||
subString: "MSIE",
|
||||
identity: "Explorer",
|
||||
versionSearch: "MSIE"
|
||||
},
|
||||
{
|
||||
string: navigator.userAgent,
|
||||
subString: "Gecko",
|
||||
identity: "Mozilla",
|
||||
versionSearch: "rv"
|
||||
},
|
||||
{ // for older Netscapes (4-)
|
||||
string: navigator.userAgent,
|
||||
subString: "Mozilla",
|
||||
identity: "Netscape",
|
||||
versionSearch: "Mozilla"
|
||||
}
|
||||
],
|
||||
dataOS : [
|
||||
{
|
||||
string: navigator.platform,
|
||||
subString: "Win",
|
||||
identity: "Windows"
|
||||
},
|
||||
{
|
||||
string: navigator.platform,
|
||||
subString: "Mac",
|
||||
identity: "Mac"
|
||||
},
|
||||
{
|
||||
string: navigator.platform,
|
||||
subString: "Linux",
|
||||
identity: "Linux"
|
||||
}
|
||||
]
|
||||
};
|
||||
core.UserAgent.init();
|
257
trunk/core-js/src/main/javascript/Utils.js
Normal file
257
trunk/core-js/src/main/javascript/Utils.js
Normal file
@@ -0,0 +1,257 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
core.Utils =
|
||||
{
|
||||
isDefined: function(val)
|
||||
{
|
||||
return val !== null && val !== undefined;
|
||||
},
|
||||
escapeInvalidTags: function (text)
|
||||
{
|
||||
//todo:Pablo. scape invalid tags in a text
|
||||
return text;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* http://kevlindev.com/tutorials/javascript/inheritance/index.htm
|
||||
* A function used to extend one class with another
|
||||
*
|
||||
* @param {Object} subClass
|
||||
* The inheriting class, or subclass
|
||||
* @param {Object} baseClass
|
||||
* The class from which to inherit
|
||||
*/
|
||||
objects = {};
|
||||
objects.extend = function(subClass, baseClass) {
|
||||
function inheritance() {
|
||||
}
|
||||
inheritance.prototype = baseClass.prototype;
|
||||
|
||||
subClass.prototype = new inheritance();
|
||||
subClass.prototype.constructor = subClass;
|
||||
subClass.baseConstructor = baseClass;
|
||||
subClass.superClass = baseClass.prototype;
|
||||
};
|
||||
|
||||
core.assert = function(assert, message)
|
||||
{
|
||||
if (!assert)
|
||||
{
|
||||
var stack;
|
||||
try
|
||||
{
|
||||
null.eval();
|
||||
} catch(e)
|
||||
{
|
||||
stack = e;
|
||||
}
|
||||
core.Logger.logError(message + "," + stack);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
core.findElement = function(name)
|
||||
{
|
||||
var result;
|
||||
if (core.UserAgent.isIframeWorkaroundRequired())
|
||||
{
|
||||
var iframe = $('mindplotIFrame');
|
||||
var doc = iframe.contentDocument;
|
||||
if (doc == undefined || doc == null)
|
||||
doc = iframe.contentWindow.document;
|
||||
result = $(doc.getElementById(name));
|
||||
}
|
||||
if (!result)
|
||||
{
|
||||
result = $(name);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Math.sign = function(value)
|
||||
{
|
||||
return (value >= 0) ? 1 : -1;
|
||||
};
|
||||
|
||||
|
||||
// Extensions ....
|
||||
function $import(src) {
|
||||
var scriptElem = document.createElement('script');
|
||||
scriptElem.setAttribute('src', src);
|
||||
scriptElem.setAttribute('type', 'text/javascript');
|
||||
document.getElementsByTagName('head')[0].appendChild(scriptElem);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the mouse position.
|
||||
*/
|
||||
core.Utils.getMousePosition = function(event)
|
||||
{
|
||||
var xcoord = -1;
|
||||
var ycoord = -1;
|
||||
|
||||
if (!event) {
|
||||
if (window.event) {
|
||||
//Internet Explorer
|
||||
event = window.event;
|
||||
} else {
|
||||
//total failure, we have no way of referencing the event
|
||||
throw "Could not obtain mouse position";
|
||||
}
|
||||
}
|
||||
if (typeof( event.pageX ) == 'number') {
|
||||
//most browsers
|
||||
xcoord = event.pageX;
|
||||
ycoord = event.pageY;
|
||||
} else if (typeof( event.clientX ) == 'number') {
|
||||
//Internet Explorer and older browsers
|
||||
//other browsers provide this, but follow the pageX/Y branch
|
||||
xcoord = event.clientX;
|
||||
ycoord = event.clientY;
|
||||
var badOldBrowser = ( window.navigator.userAgent.indexOf('Opera') + 1 ) ||
|
||||
( window.ScriptEngine && ScriptEngine().indexOf('InScript') + 1 ) ||
|
||||
( navigator.vendor == 'KDE' );
|
||||
if (!badOldBrowser) {
|
||||
if (document.body && ( document.body.scrollLeft || document.body.scrollTop )) {
|
||||
//IE 4, 5 & 6 (in non-standards compliant mode)
|
||||
xcoord += document.body.scrollLeft;
|
||||
ycoord += document.body.scrollTop;
|
||||
} else if (document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop )) {
|
||||
//IE 6 (in standards compliant mode)
|
||||
xcoord += document.documentElement.scrollLeft;
|
||||
ycoord += document.documentElement.scrollTop;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw "Could not obtain mouse position";
|
||||
}
|
||||
|
||||
|
||||
return {x:xcoord,y:ycoord};
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Calculate the position of the passed element.
|
||||
*/
|
||||
core.Utils.workOutDivElementPosition = function(divElement)
|
||||
{
|
||||
var curleft = 0;
|
||||
var curtop = 0;
|
||||
if (divElement.offsetParent) {
|
||||
curleft = divElement.offsetLeft;
|
||||
curtop = divElement.offsetTop;
|
||||
while (divElement = divElement.offsetParent) {
|
||||
curleft += divElement.offsetLeft;
|
||||
curtop += divElement.offsetTop;
|
||||
}
|
||||
}
|
||||
return {x:curleft,y:curtop};
|
||||
};
|
||||
|
||||
|
||||
core.Utils.innerXML = function(/*Node*/node) {
|
||||
// summary:
|
||||
// Implementation of MS's innerXML function.
|
||||
if (node.innerXML) {
|
||||
return node.innerXML;
|
||||
// string
|
||||
} else if (node.xml) {
|
||||
return node.xml;
|
||||
// string
|
||||
} else if (typeof XMLSerializer != "undefined") {
|
||||
return (new XMLSerializer()).serializeToString(node);
|
||||
// string
|
||||
}
|
||||
};
|
||||
|
||||
core.Utils.createDocument = function() {
|
||||
// summary:
|
||||
// cross-browser implementation of creating an XML document object.
|
||||
var doc = null;
|
||||
var _document = window.document;
|
||||
if (window.ActiveXObject) {
|
||||
var prefixes = [ "MSXML2", "Microsoft", "MSXML", "MSXML3" ];
|
||||
for (var i = 0; i < prefixes.length; i++) {
|
||||
try {
|
||||
doc = new ActiveXObject(prefixes[i] + ".XMLDOM");
|
||||
} catch(e) { /* squelch */
|
||||
}
|
||||
;
|
||||
|
||||
if (doc) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if ((_document.implementation) &&
|
||||
(_document.implementation.createDocument)) {
|
||||
doc = _document.implementation.createDocument("", "", null);
|
||||
}
|
||||
|
||||
return doc;
|
||||
// DOMDocument
|
||||
};
|
||||
|
||||
core.Utils.createDocumentFromText = function(/*string*/str, /*string?*/mimetype) {
|
||||
// summary:
|
||||
// attempts to create a Document object based on optional mime-type,
|
||||
// using str as the contents of the document
|
||||
if (!mimetype) {
|
||||
mimetype = "text/xml";
|
||||
}
|
||||
if (window.DOMParser)
|
||||
{
|
||||
var parser = new DOMParser();
|
||||
return parser.parseFromString(str, mimetype);
|
||||
// DOMDocument
|
||||
} else if (window.ActiveXObject) {
|
||||
var domDoc = core.Utils.createDocument();
|
||||
if (domDoc) {
|
||||
domDoc.async = false;
|
||||
domDoc.loadXML(str);
|
||||
return domDoc;
|
||||
// DOMDocument
|
||||
} else {
|
||||
//dojo.debug("toXml didn't work?");
|
||||
}
|
||||
} else {
|
||||
// var _document = dojo.doc();
|
||||
// if(_document.createElement){
|
||||
// // FIXME: this may change all tags to uppercase!
|
||||
// var tmp = _document.createElement("xml");
|
||||
// tmp.innerHTML = str;
|
||||
// if(_document.implementation && _document.implementation.createDocument){
|
||||
// var xmlDoc = _document.implementation.createDocument("foo", "", null);
|
||||
// for(var i = 0; i < tmp.childNodes.length; i++) {
|
||||
// xmlDoc.importNode(tmp.childNodes.item(i), true);
|
||||
// }
|
||||
// return xmlDoc; // DOMDocument
|
||||
// }
|
||||
// // FIXME: probably not a good idea to have to return an HTML fragment
|
||||
// // FIXME: the tmp.doc.firstChild is as tested from IE, so it may not
|
||||
// // work that way across the board
|
||||
// return ((tmp.document)&&
|
||||
// (tmp.document.firstChild ? tmp.document.firstChild : tmp)); // DOMDocument
|
||||
// }
|
||||
}
|
||||
return null;
|
||||
};
|
216
trunk/core-js/src/main/javascript/WaitDialog.js
Normal file
216
trunk/core-js/src/main/javascript/WaitDialog.js
Normal file
@@ -0,0 +1,216 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
/*
|
||||
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/
|
||||
*/
|
||||
|
||||
/*-------------------------------GLOBAL VARIABLES------------------------------------*/
|
||||
|
||||
var detect = navigator.userAgent.toLowerCase();
|
||||
var OS,browser,version,total,thestring;
|
||||
|
||||
/*-----------------------------------------------------------------------------------------------*/
|
||||
|
||||
//Browser detect script origionally created by Peter Paul Koch at http://www.quirksmode.org/
|
||||
|
||||
function getBrowserInfo(evt) {
|
||||
if (checkIt('konqueror')) {
|
||||
browser = "Konqueror";
|
||||
OS = "Linux";
|
||||
}
|
||||
else if (checkIt('safari')) browser = "Safari"
|
||||
else if (checkIt('omniweb')) browser = "OmniWeb"
|
||||
else if (checkIt('opera')) browser = "Opera"
|
||||
else if (checkIt('webtv')) browser = "WebTV";
|
||||
else if (checkIt('icab')) browser = "iCab"
|
||||
else if (checkIt('msie')) browser = "Internet Explorer"
|
||||
else if (!checkIt('compatible')) {
|
||||
browser = "Netscape Navigator"
|
||||
version = detect.charAt(8);
|
||||
}
|
||||
else browser = "An unknown browser";
|
||||
|
||||
if (!version) version = detect.charAt(place + thestring.length);
|
||||
|
||||
if (!OS) {
|
||||
if (checkIt('linux')) OS = "Linux";
|
||||
else if (checkIt('x11')) OS = "Unix";
|
||||
else if (checkIt('mac')) OS = "Mac"
|
||||
else if (checkIt('win')) OS = "Windows"
|
||||
else OS = "an unknown operating system";
|
||||
}
|
||||
}
|
||||
|
||||
function checkIt(string) {
|
||||
place = detect.indexOf(string) + 1;
|
||||
thestring = string;
|
||||
return place;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------------------*/
|
||||
|
||||
$(window).addEvent('load', getBrowserInfo);
|
||||
|
||||
core.WaitDialog = new Class({
|
||||
|
||||
initialize: function(contentId) {
|
||||
this.content = $(contentId);
|
||||
},
|
||||
|
||||
yPos : 0,
|
||||
|
||||
xPos : 0,
|
||||
|
||||
// Turn everything on - mainly the IE fixes
|
||||
activate: function(changeCursor)
|
||||
{
|
||||
// if (browser == 'Internet Explorer'){
|
||||
//// this.getScroll();
|
||||
// this.prepareIE('100%', 'hidden');
|
||||
//// this.setScroll(0,0);
|
||||
//// this.hideSelects('hidden');
|
||||
// }
|
||||
this.displayLightbox("block");
|
||||
|
||||
// Change to loading cursor.
|
||||
if (changeCursor)
|
||||
{
|
||||
window.document.body.style.cursor = "wait";
|
||||
}
|
||||
},
|
||||
|
||||
// Ie requires height to 100% and overflow hidden or else you can scroll down past the lightbox
|
||||
prepareIE: function(height, overflow) {
|
||||
bod = document.getElementsByTagName('body')[0];
|
||||
bod.style.height = height;
|
||||
bod.style.overflow = overflow;
|
||||
|
||||
htm = document.getElementsByTagName('html')[0];
|
||||
htm.style.height = height;
|
||||
htm.style.overflow = overflow;
|
||||
},
|
||||
|
||||
// In IE, select elements hover on top of the lightbox
|
||||
hideSelects: function(visibility) {
|
||||
selects = document.getElementsByTagName('select');
|
||||
for (i = 0; i < selects.length; i++) {
|
||||
selects[i].style.visibility = visibility;
|
||||
}
|
||||
},
|
||||
|
||||
// Taken from lightbox implementation found at http://www.huddletogether.com/projects/lightbox/
|
||||
getScroll: function() {
|
||||
if (self.pageYOffset) {
|
||||
this.yPos = self.pageYOffset;
|
||||
} else if (document.documentElement && document.documentElement.scrollTop) {
|
||||
this.yPos = document.documentElement.scrollTop;
|
||||
} else if (document.body) {
|
||||
this.yPos = document.body.scrollTop;
|
||||
}
|
||||
},
|
||||
|
||||
setScroll: function(x, y) {
|
||||
window.scrollTo(x, y);
|
||||
},
|
||||
|
||||
displayLightbox: function(display) {
|
||||
$('overlay').style.display = display;
|
||||
$('lightbox').style.display = display;
|
||||
if (display != 'none')
|
||||
this.processInfo();
|
||||
},
|
||||
|
||||
// Display Ajax response
|
||||
processInfo: function() {
|
||||
var info = new Element('div').setProperty('id', 'lbContent');
|
||||
info.setHTML(this.content.innerHTML);
|
||||
info.injectBefore($('lbLoadMessage'));
|
||||
$('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
|
||||
insert: function(e) {
|
||||
var event = new Event(e);
|
||||
link = event.target;
|
||||
if ($('lbContent'))
|
||||
$('lbContent').remove();
|
||||
|
||||
var myAjax = new Ajax.Request(
|
||||
link.href,
|
||||
{method: 'post', parameters: "", onComplete: this.processInfo.pass(this)}
|
||||
);
|
||||
|
||||
},
|
||||
|
||||
// Example of creating your own functionality once lightbox is initiated
|
||||
deactivate: function(time) {
|
||||
|
||||
if ($('lbContent'))
|
||||
$('lbContent').remove();
|
||||
//
|
||||
// if (browser == "Internet Explorer"){
|
||||
// this.setScroll(0,this.yPos);
|
||||
// this.prepareIE("auto", "auto");
|
||||
// this.hideSelects("visible");
|
||||
// }
|
||||
this.displayLightbox("none");
|
||||
|
||||
window.document.body.style.cursor = "default";
|
||||
}
|
||||
});
|
||||
|
||||
/*-----------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Onload, make all links that need to trigger a lightbox active
|
||||
function initialize() {
|
||||
addLightboxMarkup();
|
||||
valid = new core.WaitDialog($('sampleDialog'));
|
||||
}
|
||||
|
||||
// Add in markup necessary to make this work. Basically two divs:
|
||||
// Overlay holds the shadow
|
||||
// Lightbox is the centered square that the content is put into.
|
||||
function addLightboxMarkup() {
|
||||
var body = document.getElementsByTagName('body')[0];
|
||||
overlay = new Element('div').setProperty('id', 'overlay').injectInside(document.body);
|
||||
var lb = new Element('div').setProperty('id', 'lightbox');
|
||||
lb.addClass('loading');
|
||||
var tmp = new Element('div').setProperty('id', 'lbLoadMessage').injectInside(lb);
|
||||
lb.injectInside(document.body);
|
||||
}
|
30
trunk/core-js/src/main/javascript/footer.js
Normal file
30
trunk/core-js/src/main/javascript/footer.js
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
window.__coreLoad = function()
|
||||
{
|
||||
if (window.afterCoreLoading)
|
||||
{
|
||||
window.afterCoreLoading();
|
||||
} else
|
||||
{
|
||||
setTimeout("window.__coreLoad()", 2000);
|
||||
}
|
||||
}
|
||||
window.__coreLoad();
|
20
trunk/core-js/src/main/javascript/header.js
Normal file
20
trunk/core-js/src/main/javascript/header.js
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
var core = {};
|
Reference in New Issue
Block a user