mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 06:07:57 +01:00
Conflicts:
README.md config/database/mysql/apopulate-schemas.sql wise-webapp/pom.xml
This commit is contained in:
commit
ebf4603889
70
README.md
70
README.md
@ -39,6 +39,76 @@ Password: test
|
||||
|
||||
|
||||
|
||||
## Running the JS only version
|
||||
|
||||
Start by creating the .zip file:
|
||||
|
||||
`mvn assembly:assembly -Dmaven.test.skip=true`
|
||||
|
||||
To test the javascript frontend you then do:
|
||||
|
||||
ruby -rwebrick -e 'WEBrick::HTTPServer.new(:Port=>8000,:DocumentRoot=>".").start'
|
||||
|
||||
Now open a browser using the URL http://localhost:8000/wise-editor/src/main/webapp/
|
||||
|
||||
### Attaching drag and drop events.
|
||||
|
||||
1) Support for dragging TextNodes:
|
||||
|
||||
The following code is an example of how to add attach to the div dragImageNode the support for node dragging.
|
||||
|
||||
$("dragTextNode").addEvent('mousedown', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
// Create a image node ...
|
||||
var mindmap = designer.getMindmap();
|
||||
var node = mindmap.createNode();
|
||||
node.setText("Node Text !!!!");
|
||||
node.setMetadata("{'media':'test'}");
|
||||
node.setShapeType(mindplot.model.TopicShape.RECTANGLE);
|
||||
|
||||
// Add link ...
|
||||
var link = node.createFeature(mindplot.TopicFeature.Link.id, {url:"http://www.wisemapping.com"});
|
||||
node.addFeature(link);
|
||||
|
||||
// Add Note ...
|
||||
var note = node.createFeature(mindplot.TopicFeature.Note.id, {text:"This is a note"});
|
||||
node.addFeature(note);
|
||||
|
||||
designer.addDraggedNode(event, node);
|
||||
});
|
||||
|
||||
In the example, a new node is created with text "Node Text !!!!" and a note and a link associated to it when the user drop the node. Something to pay attention is the node.setMetadata("{}"), this delegated will be persisted during the serialization. Here you can store all the data you need.
|
||||
|
||||
2) Support for dragging Images: Similar to the point 1,drag support is registered to the div dragImageNode.
|
||||
|
||||
$("dragImageNode").addEvent('mousedown', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
// Create a image node ...
|
||||
var mindmap = designer.getMindmap();
|
||||
var node = mindmap.createNode();
|
||||
node.setImageSize(80, 43);
|
||||
node.setMetadata("{'media':'video,'url':'http://www.youtube.com/watch?v=P3FrXftyuzw&feature=g-vrec&context=G2b4ab69RVAAAAAAAAAA'}");
|
||||
node.setImageUrl("images/logo-small.png");
|
||||
node.setShapeType(mindplot.model.TopicShape.IMAGE);
|
||||
|
||||
designer.addDraggedNode(event, node);
|
||||
});
|
||||
|
||||
The node.setShapeType(mindplot.model.TopicShape.IMAGE) defines a image node. This makes mandatory the set of setImageUrl and setImageSize properties in the node.
|
||||
|
||||
3) An event registration mechanism for Image nodes edit events: The next snipped show how to register a custom edition handler.
|
||||
|
||||
designer.addEvent("editnode", function(event) {
|
||||
var node = event.model;
|
||||
|
||||
alert("Node Id:" + node.getId());
|
||||
alert("Node Metadata:" + node.getMetadata());
|
||||
alert("Is Read Only:" + event.readOnly);
|
||||
} });
|
||||
|
||||
|
||||
## Authors
|
||||
|
||||
* Pablo Luna
|
||||
|
@ -1,9 +1,9 @@
|
||||
DROP TABLE ACCESS_AUDITORY;
|
||||
DROP TABLE TAG;
|
||||
DROP TABLE COLLABORATION;
|
||||
DROP TABLE COLLABORATION_PROPERTIES;
|
||||
DROP TABLE MINDMAP_HISTORY;
|
||||
DROP TABLE MINDMAP;
|
||||
DROP TABLE USER;
|
||||
DROP TABLE COLLABORATOR;
|
||||
DROP TABLE IF EXISTS ACCESS_AUDITORY;
|
||||
DROP TABLE IF EXISTS TAG;
|
||||
DROP TABLE IF EXISTS COLLABORATION;
|
||||
DROP TABLE IF EXISTS COLLABORATION_PROPERTIES;
|
||||
DROP TABLE IF EXISTS MINDMAP_HISTORY;
|
||||
DROP TABLE IF EXISTS MINDMAP;
|
||||
DROP TABLE IF EXISTS USER;
|
||||
DROP TABLE IF EXISTS COLLABORATOR;
|
||||
COMMIT;
|
||||
|
@ -1,6 +1,7 @@
|
||||
CREATE DATABASE wisemapping
|
||||
DROP DATABASE IF EXISTS wisemapping;
|
||||
|
||||
CREATE DATABASE IF NOT EXISTS wisemapping
|
||||
CHARACTER SET = 'utf8'
|
||||
COLLATE = 'utf8_unicode_ci';
|
||||
CREATE USER 'wisemapping'@'localhost'
|
||||
IDENTIFIED BY 'password';
|
||||
GRANT ALL ON wisemapping.* TO 'wisemapping'@'localhost';
|
||||
SET PASSWORD FOR 'wisemapping'@'localhost' = PASSWORD('password');
|
@ -1,3 +1,5 @@
|
||||
USE wisemapping;
|
||||
|
||||
CREATE TABLE COLLABORATOR (
|
||||
id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||
email VARCHAR(255)
|
||||
|
@ -1,9 +1,9 @@
|
||||
DROP TABLE TAG;
|
||||
DROP TABLE ACCESS_AUDITORY;
|
||||
DROP TABLE COLLABORATION;
|
||||
DROP TABLE COLLABORATION_PROPERTIES;
|
||||
DROP TABLE MINDMAP_HISTORY;
|
||||
DROP TABLE MINDMAP;
|
||||
DROP TABLE USER;
|
||||
DROP TABLE COLLABORATOR;
|
||||
DROP TABLE IF EXISTS TAG;
|
||||
DROP TABLE IF EXISTS ACCESS_AUDITORY;
|
||||
DROP TABLE IF EXISTS COLLABORATION;
|
||||
DROP TABLE IF EXISTS COLLABORATION_PROPERTIES;
|
||||
DROP TABLE IF EXISTS MINDMAP_HISTORY;
|
||||
DROP TABLE IF EXISTS MINDMAP;
|
||||
DROP TABLE IF EXISTS USER;
|
||||
DROP TABLE IF EXISTS COLLABORATOR;
|
||||
COMMIT;
|
@ -14,10 +14,6 @@
|
||||
<source>mindplot/target/classes/mindplot-min.js</source>
|
||||
<outputDirectory>/js</outputDirectory>
|
||||
</file>
|
||||
<file>
|
||||
<source>mindplot/target/classes/mindplot.js</source>
|
||||
<outputDirectory>/js</outputDirectory>
|
||||
</file>
|
||||
</files>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
|
@ -27,62 +27,5 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>6.1.26</version>
|
||||
<configuration>
|
||||
<connectors>
|
||||
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
|
||||
<port>8080</port>
|
||||
<maxIdleTime>60000</maxIdleTime>
|
||||
</connector>
|
||||
</connectors>
|
||||
<webApp>${project.build.directory}/wise-editor-${com.wisemapping.version}.war</webApp>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>2.1.1</version>
|
||||
<configuration>
|
||||
<warSourceExcludes>js/mindplot-min.js</warSourceExcludes>
|
||||
<overlays>
|
||||
<overlay>
|
||||
<groupId>org.wisemapping</groupId>
|
||||
<artifactId>core-js</artifactId>
|
||||
<type>jar</type>
|
||||
<targetPath>js</targetPath>
|
||||
<includes>
|
||||
<include>*.js</include>
|
||||
</includes>
|
||||
</overlay>
|
||||
<overlay>
|
||||
<groupId>org.wisemapping</groupId>
|
||||
<artifactId>mindplot</artifactId>
|
||||
<type>jar</type>
|
||||
<targetPath>css</targetPath>
|
||||
<includes>
|
||||
<include>**/*.css</include>
|
||||
<include>**/*.html</include>
|
||||
</includes>
|
||||
</overlay>
|
||||
<overlay>
|
||||
<groupId>org.wisemapping</groupId>
|
||||
<artifactId>mindplot</artifactId>
|
||||
<type>jar</type>
|
||||
<targetPath>js</targetPath>
|
||||
<includes>
|
||||
<include>*.js</include>
|
||||
</includes>
|
||||
</overlay>
|
||||
</overlays>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
</project>
|
||||
|
@ -283,16 +283,16 @@
|
||||
<version>2.2.8</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
<artifactId>jackson-core-asl</artifactId>
|
||||
<version>1.9.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.mangofactory</groupId>
|
||||
<artifactId>swagger-springmvc</artifactId>
|
||||
<version>0.6.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.12.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
<artifactId>jackson-mapper-asl</artifactId>
|
||||
|
Loading…
Reference in New Issue
Block a user