adding general collaboration framework and Brix
This commit is contained in:
@@ -62,6 +62,7 @@
|
||||
<includes>
|
||||
<include>*.wsdl</include>
|
||||
<include>*.xsd</include>
|
||||
<include>*.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</webResources>
|
||||
|
128
wise-doc/src/main/resources/web.xml
Normal file
128
wise-doc/src/main/resources/web.xml
Normal file
@@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
|
||||
version="2.4">
|
||||
|
||||
<context-param>
|
||||
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
|
||||
<param-value>messages</param-value>
|
||||
</context-param>
|
||||
|
||||
<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>
|
||||
/WEB-INF/wisemapping-security.xml
|
||||
/WEB-INF/wisemapping-dao.xml
|
||||
/WEB-INF/wisemapping-service.xml
|
||||
/WEB-INF/wisemapping-model.xml
|
||||
/WEB-INF/wisemapping-acegi-security.xml
|
||||
</param-value>
|
||||
</context-param>
|
||||
|
||||
<!--
|
||||
- Loads the root application context of this web app at startup.
|
||||
- The application context is then available via
|
||||
- WebApplicationContextUtils.getWebApplicationContext(servletContext).
|
||||
-->
|
||||
<listener>
|
||||
<listener-class>com.wisemapping.service.HibernateAppListener</listener-class>
|
||||
</listener>
|
||||
|
||||
|
||||
<filter>
|
||||
<filter-name>charsetFilter</filter-name>
|
||||
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
|
||||
<init-param>
|
||||
<param-name>encoding</param-name>
|
||||
<param-value>UTF-8</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>forceEncoding</param-name>
|
||||
<param-value>true</param-value>
|
||||
</init-param>
|
||||
</filter>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>charsetFilter</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</filter-mapping>
|
||||
<filter>
|
||||
<filter-name>hibernate</filter-name>
|
||||
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
|
||||
<init-param>
|
||||
<param-name>singleSession</param-name>
|
||||
<param-value>true</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>sessionFactoryBeanName</param-name>
|
||||
<param-value>mindmapSessionFactory</param-value>
|
||||
</init-param>
|
||||
</filter>
|
||||
<filter>
|
||||
<filter-name>Acegi Filter Chain Proxy</filter-name>
|
||||
<filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
|
||||
<init-param>
|
||||
<param-name>targetClass</param-name>
|
||||
<param-value>org.acegisecurity.util.FilterChainProxy</param-value>
|
||||
</init-param>
|
||||
</filter>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>Acegi Filter Chain Proxy</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>hibernate</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
<listener>
|
||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||
</listener>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>wisemapping</servlet-name>
|
||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
|
||||
<init-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>
|
||||
/WEB-INF/wisemapping-servlet.xml
|
||||
/WEB-INF/wisemapping-captcha.xml
|
||||
</param-value>
|
||||
</init-param>
|
||||
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>dwr-invoker</servlet-name>
|
||||
<servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>debug</param-name>
|
||||
<param-value>true</param-value>
|
||||
</init-param>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>wisemapping</servlet-name>
|
||||
<url-pattern>*.htm</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>dwr-invoker</servlet-name>
|
||||
<url-pattern>/dwr/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<welcome-file-list>
|
||||
<welcome-file>
|
||||
index.jsp
|
||||
</welcome-file>
|
||||
</welcome-file-list>
|
||||
<session-config>
|
||||
<session-timeout>180</session-timeout>
|
||||
</session-config>
|
||||
</web-app>
|
@@ -5,7 +5,7 @@
|
||||
<!--[if lt IE 9]>
|
||||
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
||||
<![endif]-->
|
||||
|
||||
<script type="text/javascript" src="http://docs.google.com/brix/static/api/js/jsapi.nocache.js"></script>
|
||||
<!-- Internet Explorer 8 Hack -->
|
||||
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
|
||||
<title>WiseMapping - Editor </title>
|
||||
@@ -16,16 +16,26 @@
|
||||
<script type='text/javascript' src='../js/mootools-core-1.3.2-full-compat.js'></script>
|
||||
<script type='text/javascript' src='../js/mootools-more-1.3.2.1-yui.js'></script>
|
||||
|
||||
<script type='text/javascript' src='../../../../../wise-webapp/src/main/webapp/js/common.js'></script>
|
||||
<script type='text/javascript' src='../../../../../wise-webapp/src/main/webapp/js/windoo.js'></script>
|
||||
<!--<script type='text/javascript' src='../js/common.js'></script>-->
|
||||
<!--<script type='text/javascript' src='../js/windoo.js'></script>-->
|
||||
|
||||
<!--<script type='text/javascript' src='../js/wiseEditorLibrary.js'></script>-->
|
||||
<script type='text/javascript' src='../../../../../wise-webapp/src/main/webapp/js/IconPanel.js'></script>
|
||||
<script type='text/javascript' src='../../../../../wise-webapp/src/main/webapp/js/mooRainbow.js'></script>
|
||||
<!--<script type='text/javascript' src='../js/IconPanel.js'></script>-->
|
||||
<!--<script type='text/javascript' src='../js/mooRainbow.js'></script>-->
|
||||
|
||||
|
||||
|
||||
<script type='text/javascript' src='../../../../../core-js/target/classes/core.js'></script>
|
||||
<script type='text/javascript' src='../js/core.js'></script>
|
||||
<script type="text/javascript">
|
||||
//Google-Brix framework load callback function
|
||||
collabOnLoad = function() {
|
||||
isGoogleBrix=true;
|
||||
if(typeof mindplot != "undefined"){
|
||||
console.log("calling");
|
||||
mindplot.collaboration.frameworks.brix.BrixFramework.instanciate();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<link rel="icon" href="../images/favicon.ico" type="image/x-icon">
|
||||
<link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon">
|
||||
|
80
wise-doc/src/main/webapp/html/tictactoe.html
Normal file
80
wise-doc/src/main/webapp/html/tictactoe.html
Normal file
@@ -0,0 +1,80 @@
|
||||
<html>
|
||||
<body>
|
||||
<script type="text/javascript" src="http://docs.google.com/brix/static/api/js/jsapi.nocache.js"></script>
|
||||
<script type="text/javascript">
|
||||
var app;
|
||||
|
||||
collabOnLoad = function() {
|
||||
app = new goog.collab.CollaborativeApp();
|
||||
app.start();
|
||||
app.addListener('modelLoad', function(model) {
|
||||
var root = app.getModel().getRoot();
|
||||
if (root.isEmpty()) {
|
||||
root.put("a1", ' ');
|
||||
root.put("a2", " ");
|
||||
root.put("a3", " ");
|
||||
root.put("b1", " ");
|
||||
root.put("b2", " ");
|
||||
root.put("b3", " ");
|
||||
root.put("c1", " ");
|
||||
root.put("c2", " ");
|
||||
root.put("c3", " ");
|
||||
root.put("turn", "X");
|
||||
}
|
||||
var list1 = app.getModel().create("List");
|
||||
root.put("list",list1);
|
||||
|
||||
document.getElementById("a1").value = root.get("a1");
|
||||
document.getElementById("a2").value = root.get("a2");
|
||||
document.getElementById("a3").value = root.get("a3");
|
||||
document.getElementById("b1").value = root.get("b1");
|
||||
document.getElementById("b2").value = root.get("b2");
|
||||
document.getElementById("b3").value = root.get("b3");
|
||||
document.getElementById("c1").value = root.get("c1");
|
||||
document.getElementById("c2").value = root.get("c2");
|
||||
document.getElementById("c3").value = root.get("c3");
|
||||
relabelTurn(root.get("turn"));
|
||||
|
||||
root.addListener('valueChanged', function(e) {
|
||||
document.getElementById(e.getProperty()).value = e.getNewValue();
|
||||
relabelTurn(root.get("turn"));
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
function move(square) {
|
||||
app.getModel().getRoot().put(square.id, app.getModel().getRoot().get("turn"));
|
||||
var turn = app.getModel().getRoot().get("turn") == "X" ? "O" : "X";
|
||||
app.getModel().getRoot().put("turn", turn);
|
||||
relabelTurn(app.getModel().getRoot().get("turn"));
|
||||
app.getModel().getRoot().get("list").add(turn);
|
||||
}
|
||||
|
||||
function relabelTurn(turn) {
|
||||
document.getElementById("turn").innerHTML = "Next move is: " + turn;
|
||||
}
|
||||
|
||||
</script>
|
||||
<p>
|
||||
TIC TAC TOE!
|
||||
<p>
|
||||
<span id=turn></span>
|
||||
<table>
|
||||
<tr>
|
||||
<td><input style="font-size:20px;width:50px;height:50px;" type="button" value=" " id="a1" onclick="move(this)"></td>
|
||||
<td><input style="font-size:20px;width:50px;height:50px;" type="button" value=" " id="b1" onclick="move(this)"></td>
|
||||
<td><input style="font-size:20px;width:50px;height:50px;" type="button" value=" " id="c1" onclick="move(this)"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input style="font-size:20px;width:50px;height:50px;" type="button" value=" " id="a2" onclick="move(this)"></td>
|
||||
<td><input style="font-size:20px;width:50px;height:50px;" type="button" value=" " id="b2" onclick="move(this)"></td>
|
||||
<td><input style="font-size:20px;width:50px;height:50px;" type="button" value=" " id="c2" onclick="move(this)"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input style="font-size:20px;width:50px;height:50px;" type="button" value=" " id="a3" onclick="move(this)"></td>
|
||||
<td><input style="font-size:20px;width:50px;height:50px;" type="button" value=" " id="b3" onclick="move(this)"></td>
|
||||
<td><input style="font-size:20px;width:50px;height:50px;" type="button" value=" " id="c3" onclick="move(this)"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
1070
wise-doc/src/main/webapp/js/core.js
Normal file
1070
wise-doc/src/main/webapp/js/core.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
$import("../../../../../mindplot/target/classes/mindplot.svg.js");
|
||||
$import("../js/mindplot.svg.js");
|
||||
|
||||
var designer = null;
|
||||
|
||||
@@ -181,7 +181,7 @@ function afterMindpotLibraryLoading() {
|
||||
}
|
||||
|
||||
var iconChooser = buildIconChooser();
|
||||
iconPanel = new IconPanel({button:$('topicIcon'), onStart:cleanScreenEvent, content:iconChooser});
|
||||
// iconPanel = new IconPanel({button:$('topicIcon'), onStart:cleanScreenEvent, content:iconChooser});
|
||||
// Register Events ...
|
||||
$(document).addEvent('keydown', designer.keyEventHandler.bindWithEvent(designer));
|
||||
$("ffoxWorkarroundInput").addEvent('keydown', designer.keyEventHandler.bindWithEvent(designer));
|
||||
@@ -227,7 +227,7 @@ function afterMindpotLibraryLoading() {
|
||||
});
|
||||
|
||||
var context = this;
|
||||
var colorPicker1 = new MooRainbow('topicColor', {
|
||||
/*var colorPicker1 = new MooRainbow('topicColor', {
|
||||
id: 'topicColor',
|
||||
imgPath: '../images/',
|
||||
startColor: [255, 255, 255],
|
||||
@@ -256,7 +256,7 @@ function afterMindpotLibraryLoading() {
|
||||
onComplete: function(color) {
|
||||
removeCurrentColorPicker.attempt(colorPicker2, context);
|
||||
}
|
||||
});
|
||||
});*/
|
||||
$('topicLink').addEvent('click', function(event) {
|
||||
designer.addLink2SelectedNode();
|
||||
|
||||
@@ -280,7 +280,7 @@ function afterMindpotLibraryLoading() {
|
||||
designer.setStyle2SelectedNode();
|
||||
});
|
||||
|
||||
var colorPicker3 = new MooRainbow('fontColor', {
|
||||
/*var colorPicker3 = new MooRainbow('fontColor', {
|
||||
id: 'fontColor',
|
||||
imgPath: '../images/',
|
||||
startColor: [255, 255, 255],
|
||||
@@ -294,7 +294,7 @@ function afterMindpotLibraryLoading() {
|
||||
onComplete: function(color) {
|
||||
removeCurrentColorPicker.attempt(colorPicker3, context);
|
||||
}
|
||||
});
|
||||
});*/
|
||||
|
||||
// Save event handler ....
|
||||
var saveButton = $('saveButton');
|
||||
@@ -380,7 +380,6 @@ function removeCurrentColorPicker(colorPicker) {
|
||||
}
|
||||
|
||||
function buildMindmapDesigner() {
|
||||
|
||||
// Initialize message logger ...
|
||||
// var monitor = new core.Monitor($('msgLoggerContainer'), $('msgLogger'));
|
||||
// core.Monitor.setInstance(monitor);
|
||||
@@ -397,14 +396,32 @@ function buildMindmapDesigner() {
|
||||
// body margin ...
|
||||
editorProperties.width = screenWidth;
|
||||
editorProperties.height = screenHeight;
|
||||
|
||||
designer = new mindplot.MindmapDesigner(editorProperties, container);
|
||||
|
||||
if($wise_collaborationManager.isCollaborationFrameworkAvailable()){
|
||||
buildCollaborativeMindmapDesigner();
|
||||
}else{
|
||||
buildStandaloneMindmapDesigner();
|
||||
}
|
||||
}
|
||||
|
||||
function buildStandaloneMindmapDesigner(){
|
||||
designer.loadFromXML(mapId, mapXml);
|
||||
|
||||
// If a node has focus, focus can be move to another node using the keys.
|
||||
designer._cleanScreen = cleanScreenEvent.bind(this);
|
||||
}
|
||||
|
||||
function buildCollaborativeMindmapDesigner(){
|
||||
if($wise_collaborationManager.isCollaborativeFrameworkReady()){
|
||||
designer.loadFromCollaborativeModel($wise_collaborationManager);
|
||||
// If a node has focus, focus can be move to another node using the keys.
|
||||
designer._cleanScreen = cleanScreenEvent.bind(this);
|
||||
}else{
|
||||
$wise_collaborationManager.setWiseReady(true);
|
||||
}
|
||||
}
|
||||
|
||||
function createColorPalette(container, onSelectFunction, event) {
|
||||
cleanScreenEvent();
|
||||
_colorPalette = new core.ColorPicker();
|
||||
@@ -422,13 +439,13 @@ function createColorPalette(container, onSelectFunction, event) {
|
||||
;
|
||||
|
||||
function cleanScreenEvent() {
|
||||
if (this.currentColorPicker) {
|
||||
/*if (this.currentColorPicker) {
|
||||
this.currentColorPicker.hide();
|
||||
}
|
||||
}*/
|
||||
$("fontFamilyPanel").setStyle('display', "none");
|
||||
$("fontSizePanel").setStyle('display', "none");
|
||||
$("topicShapePanel").setStyle('display', "none");
|
||||
iconPanel.close();
|
||||
// iconPanel.close();
|
||||
}
|
||||
|
||||
function fontFamilyPanel() {
|
||||
|
13758
wise-doc/src/main/webapp/js/mindplot.svg.js
Normal file
13758
wise-doc/src/main/webapp/js/mindplot.svg.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user