mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-05 07:03:24 +01:00
Several fixes.
This commit is contained in:
parent
361beb371f
commit
c4f3feb92e
@ -16,7 +16,7 @@
|
||||
*/
|
||||
mindplot.persistence.XMLSerializer_Beta = new Class({
|
||||
|
||||
toXML : function(mindmap) {
|
||||
toXML:function (mindmap) {
|
||||
$assert(mindmap, "Can not save a null mindmap");
|
||||
|
||||
var document = core.Utils.createDocument();
|
||||
@ -40,7 +40,7 @@ mindplot.persistence.XMLSerializer_Beta = new Class({
|
||||
return document;
|
||||
},
|
||||
|
||||
_topicToXML : function(document, topic) {
|
||||
_topicToXML:function (document, topic) {
|
||||
var parentTopic = document.createElement("topic");
|
||||
|
||||
// Set topic attributes...
|
||||
@ -139,25 +139,25 @@ mindplot.persistence.XMLSerializer_Beta = new Class({
|
||||
return parentTopic;
|
||||
},
|
||||
|
||||
_iconToXML : function(document, icon) {
|
||||
_iconToXML:function (document, icon) {
|
||||
var iconDom = document.createElement("icon");
|
||||
iconDom.setAttribute('id', icon.getIconType());
|
||||
return iconDom;
|
||||
},
|
||||
|
||||
_linkToXML : function(document, link) {
|
||||
_linkToXML:function (document, link) {
|
||||
var linkDom = document.createElement("link");
|
||||
linkDom.setAttribute('url', link.getUrl());
|
||||
return linkDom;
|
||||
},
|
||||
|
||||
_noteToXML : function(document, note) {
|
||||
_noteToXML:function (document, note) {
|
||||
var noteDom = document.createElement("note");
|
||||
noteDom.setAttribute('text', note.getText());
|
||||
return noteDom;
|
||||
},
|
||||
|
||||
loadFromDom : function(dom, mapId) {
|
||||
loadFromDom:function (dom, mapId) {
|
||||
$assert(dom, "Dom can not be null");
|
||||
$assert(mapId, "mapId can not be null");
|
||||
|
||||
@ -183,7 +183,7 @@ mindplot.persistence.XMLSerializer_Beta = new Class({
|
||||
return mindmap;
|
||||
},
|
||||
|
||||
_deserializeNode : function(domElem, mindmap) {
|
||||
_deserializeNode:function (domElem, mindmap) {
|
||||
var type = (domElem.getAttribute('central') != null) ? mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE : mindplot.model.INodeModel.MAIN_TOPIC_TYPE;
|
||||
var topic = mindmap.createNode(type);
|
||||
|
||||
@ -274,19 +274,19 @@ mindplot.persistence.XMLSerializer_Beta = new Class({
|
||||
return topic;
|
||||
},
|
||||
|
||||
_deserializeIcon : function(domElem, topic) {
|
||||
_deserializeIcon:function (domElem, topic) {
|
||||
var icon = domElem.getAttribute("id");
|
||||
icon = icon.replace("images/", "icons/legacy/");
|
||||
return mindplot.TopicFeature.createModel(mindplot.TopicFeature.Icon.id, topic, {id:icon});
|
||||
return mindplot.TopicFeature.createModel(mindplot.TopicFeature.Icon.id, {id:icon});
|
||||
},
|
||||
|
||||
_deserializeLink : function(domElem, topic) {
|
||||
return mindplot.TopicFeature.createModel(mindplot.TopicFeature.Link.id, topic, {url:domElem.getAttribute("url")});
|
||||
_deserializeLink:function (domElem, topic) {
|
||||
return mindplot.TopicFeature.createModel(mindplot.TopicFeature.Link.id, {url:domElem.getAttribute("url")});
|
||||
},
|
||||
|
||||
_deserializeNote : function(domElem, topic) {
|
||||
_deserializeNote:function (domElem, topic) {
|
||||
var text = domElem.getAttribute("text");
|
||||
return mindplot.TopicFeature.createModel(mindplot.TopicFeature.Note.id, topic, {text:text == null ? " " : text});
|
||||
return mindplot.TopicFeature.createModel(mindplot.TopicFeature.Note.id, {text:text == null ? " " : text});
|
||||
}});
|
||||
|
||||
mindplot.persistence.XMLSerializer_Beta.MAP_ROOT_NODE = 'map';
|
29
wise-editor/src/main/webapp/samples/sample2.xml
Normal file
29
wise-editor/src/main/webapp/samples/sample2.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<map name="8007">
|
||||
<topic central="true" text="Prospace" bgColor="#f2981b" brColor="#cc5627">
|
||||
<link url="prospace.com"/>
|
||||
<note text="Prospace.com%0A%0A%0AShow%20them%20the%20value%20and%20sell%20them%20a%20product%20that%20is%20much%20lower%20than%20the%20preceived%20value.%0A%0AIdentify%20the%20pain%20in%20the%20industry.%20%0A%0ATrying%20to%20get%20a%20job%20is%20a%20pain.%20%20You%20need%20a%20high%20level%20of%20confidence%20to%20market%20yourself.%20%20Prospace%0Areinforces%20that%20confidence%20by%20allowing%20users%20to%20build%20a%20esteem-building%20portfolio%20on%20oneself.%20%20Getting%20a%0Ajob%20takes%20time.%20%0A%0ACareer%20Centers%20need%20to%20bring%20value%20to%20their%20audience.%20%0A%0A%0A%0AShow%20them%20a%20service%20that%20would%20solve%20that%20pain.%20%20%20First%0Abring%20awareness%20to%20that%20pain.%20%20How%20will%20you%20bring%20awareness%20to%20that%20pain%3F%20%20%20Bring%20awareness%20%0Aof%20a%20service%20that%20would%20solve%20that%20pain%20at%20a%20cost%20that%20can%20fit%20reasonable%20in%20their%20budget.%0A%0A%0A%0A%0A%20How%20are%20competitors%20solving%20that%20pain%20now%3F%20%20%20How%20is%20the%20compeition%0Amaking%20them%20aware%20of%20the%20pain.%20%20%20What%20is%20the%20value%20and%20price%20competitors%20bringing%20to%20their%20customers.%0A%0AWhat%20are%20the%20fears%20of%20the%20competition%3F%20%20What%20do%20they%20think%20they%20need%20to%20do%20in%20the%20next%20five%20years%20to%20%0Astay%20ahead%3F%0A"/>
|
||||
<topic position="-314,-150" text="Newspapers">
|
||||
<topic order="0" text="College Newspapers"/>
|
||||
</topic>
|
||||
<topic position="-203,-300" text="Third Party ">
|
||||
<topic order="0" text="Thumbshot" shape="rectagle">
|
||||
<link url="thumbshots.org"/>
|
||||
</topic>
|
||||
</topic>
|
||||
<topic position="312,0" text="Partnerships">
|
||||
<topic order="0" text="Websites">
|
||||
<topic order="0" text="Business Networks">
|
||||
<topic order="0" text="Xing"/>
|
||||
<topic order="1" text="konnects.com"/>
|
||||
</topic>
|
||||
</topic>
|
||||
</topic>
|
||||
<topic position="-209,0" text="Career Counseling">
|
||||
<topic order="0" text="Fraternity"/>
|
||||
<topic order="1" text="Professional Associations"/>
|
||||
</topic>
|
||||
<topic position="-178,50" text="White-Label">
|
||||
<topic order="0" text="http://www.harrisconnect.com/"/>
|
||||
</topic>
|
||||
</topic>
|
||||
</map>
|
@ -264,11 +264,13 @@ public class Mindmap {
|
||||
}
|
||||
|
||||
public boolean hasPermissions(@NotNull Collaborator collaborator, @NotNull CollaborationRole role) {
|
||||
final Collaboration collaboration = this.findCollaboration(collaborator);
|
||||
boolean result = false;
|
||||
if (collaborator != null) {
|
||||
final Collaboration collaboration = this.findCollaboration(collaborator);
|
||||
if (collaboration != null) {
|
||||
result = collaboration.hasPermissions(role);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import com.wisemapping.exceptions.WiseMappingException;
|
||||
import com.wisemapping.model.CollaborationRole;
|
||||
import com.wisemapping.model.Mindmap;
|
||||
import com.wisemapping.model.MindMapHistory;
|
||||
import com.wisemapping.model.User;
|
||||
import com.wisemapping.security.Utils;
|
||||
import com.wisemapping.service.MindmapService;
|
||||
import com.wisemapping.view.MindMapBean;
|
||||
@ -143,9 +144,9 @@ public class MindmapController {
|
||||
// Configure default locale for the editor ...
|
||||
final Locale locale = LocaleContextHolder.getLocale();
|
||||
model.addAttribute("locale", locale.toString().toLowerCase());
|
||||
model.addAttribute("principal", Utils.getUser());
|
||||
model.addAttribute("readOnlyMode", !mindmap.hasPermissions(Utils.getUser(), CollaborationRole.EDITOR));
|
||||
|
||||
final User collaborator = Utils.getUser();
|
||||
model.addAttribute("principal", collaborator);
|
||||
model.addAttribute("readOnlyMode", !mindmap.hasPermissions(collaborator, CollaborationRole.EDITOR));
|
||||
return "mindmapEditor";
|
||||
}
|
||||
|
||||
|
@ -32,10 +32,6 @@ mail.smtp.auth=false
|
||||
mail.smtp.starttls.enable=false
|
||||
mail.smtp.quitwait=false
|
||||
|
||||
#------------------------
|
||||
# SSL SMTP Server Configuration
|
||||
#------------------------
|
||||
|
||||
#------------------------
|
||||
# GMAIL SMTP Configuration
|
||||
#------------------------
|
||||
@ -58,7 +54,7 @@ mail.serverSendEmail=root@localhost
|
||||
mail.supportEmail=root@localhost
|
||||
|
||||
# Optional: Unexpected errors will be reported to this address.
|
||||
mail.errorReporterEmail=support@wisemapping.com
|
||||
mail.errorReporterEmail=bug-report@wisemapping.com
|
||||
|
||||
##################################################################################
|
||||
# Users Registration Configuration
|
||||
|
@ -1,9 +0,0 @@
|
||||
# Configuration file for javax.mail
|
||||
|
||||
# Host whose mail services will be used
|
||||
# (Default value : localhost)
|
||||
mail.host=mail.wisemapping.com
|
||||
|
||||
# Return address to appear on emails
|
||||
# (Default value : username@host)
|
||||
mail.from=webmaster@wisemapping.com
|
@ -28,6 +28,7 @@
|
||||
<sec:http pattern="/c/home" security="none"/>
|
||||
|
||||
<sec:http pattern="/c/maps/*/embed" security="none"/>
|
||||
<sec:http pattern="/c/maps/*/try" security="none"/>
|
||||
<sec:http pattern="/c/maps/*/public" security="none"/>
|
||||
<sec:http pattern="/c/GCFInstall" security="none"/>
|
||||
|
||||
|
@ -4,17 +4,17 @@ starred BOOL NOT NULL default 0,
|
||||
mindmap_properties varchar(512) CHARACTER SET utf8
|
||||
) CHARACTER SET utf8;
|
||||
|
||||
drop table `wisemapping`.`MINDMAP_NATIVE`;
|
||||
ALTER TABLE `wisemapping`.`MINDMAP_COLABORATOR` RENAME TO `wisemapping`.`COLLABORATION`;
|
||||
ALTER TABLE `wisemapping`.`COLABORATOR` RENAME TO `wisemapping`.`COLLABORATOR`;
|
||||
drop table `MINDMAP_NATIVE`;
|
||||
ALTER TABLE `MINDMAP_COLABORATOR` RENAME TO `COLLABORATION`;
|
||||
ALTER TABLE `COLABORATOR` RENAME TO `COLLABORATOR`;
|
||||
|
||||
ALTER TABLE `wisemapping`.`MINDMAP` DROP COLUMN `editor_properties` , DROP COLUMN `mindMapNative_id` ;
|
||||
ALTER TABLE `MINDMAP` DROP COLUMN `editor_properties` , DROP COLUMN `mindMapNative_id` ;
|
||||
|
||||
ALTER TABLE `wisemapping`.`MINDMAP` CHANGE COLUMN `owner_id` `creator_id` INT(11) NOT NULL
|
||||
ALTER TABLE `MINDMAP` CHANGE COLUMN `owner_id` `creator_id` INT(11) NOT NULL
|
||||
, DROP INDEX `owner_id`
|
||||
, ADD INDEX `owner_id` (`creator_id` ASC) ;
|
||||
|
||||
ALTER TABLE `wisemapping`.`COLLABORATION` ADD COLUMN `properties_id` INT(11) NULL DEFAULT NULL AFTER `role_id` ;
|
||||
ALTER TABLE `COLLABORATION` ADD COLUMN `properties_id` INT(11) NULL DEFAULT NULL AFTER `role_id` ;
|
||||
DROP TABLE USER_LOGIN;
|
||||
|
||||
CREATE TABLE ACCESS_AUDITORY (
|
||||
@ -26,22 +26,22 @@ login_date date
|
||||
#ALTER TABLE ACCESS_AUDITORY
|
||||
# ADD CONSTRAINT `user_id`
|
||||
# FOREIGN KEY ()
|
||||
# REFERENCES `wisemapping`.`USER` ()
|
||||
# REFERENCES `USER` ()
|
||||
# ON DELETE CASCADE
|
||||
# ON UPDATE NO ACTION
|
||||
#, ADD INDEX `user_id` () ;
|
||||
|
||||
ALTER TABLE `wisemapping`.`MINDMAP_HISTORY` DROP COLUMN `creator_user` , ADD COLUMN `editor_id` INT(11) NULL DEFAULT NULL AFTER `creation_date`;
|
||||
ALTER TABLE `MINDMAP_HISTORY` DROP COLUMN `creator_user` , ADD COLUMN `editor_id` INT(11) NULL DEFAULT NULL AFTER `creation_date`;
|
||||
|
||||
ALTER TABLE `wisemapping`.`USER` ADD COLUMN `locale` VARCHAR(5) NULL AFTER `allowSendEmail` ;
|
||||
ALTER TABLE `USER` ADD COLUMN `locale` VARCHAR(5) NULL AFTER `allowSendEmail` ;
|
||||
|
||||
ALTER TABLE `wisemapping`.`MINDMAP` DROP COLUMN `last_editor` , ADD COLUMN `last_editor_id` INT(11) NULL DEFAULT 9 AFTER `tags` ;
|
||||
ALTER TABLE `MINDMAP` DROP COLUMN `last_editor` , ADD COLUMN `last_editor_id` INT(11) NULL DEFAULT 2 AFTER `tags` ;
|
||||
|
||||
ALTER TABLE `wisemapping`.`USER` DROP COLUMN `username` , CHANGE COLUMN `activationCode` `activation_code` BIGINT(20) NOT NULL , CHANGE COLUMN `allowSendEmail` `allow_send_email` CHAR(1) NOT NULL DEFAULT '0' ;
|
||||
ALTER TABLE `USER` DROP COLUMN `username` , CHANGE COLUMN `activationCode` `activation_code` BIGINT(20) NOT NULL , CHANGE COLUMN `allowSendEmail` `allow_send_email` CHAR(1) NOT NULL DEFAULT '0' ;
|
||||
|
||||
INSERT INTO `wisemapping`.`MINDMAP` (`last_editor_id`) VALUES (1);
|
||||
INSERT INTO `MINDMAP` (`last_editor_id`) VALUES (1);
|
||||
|
||||
INSERT INTO `wisemapping`.`COLLABORATOR` (`id`, `email`, `creation_date`) VALUES (8081, 'migfake@wisemapping.com', '2007-10-09');
|
||||
DELETE FROM `wisemapping`.`USER` where activation_date is null;
|
||||
INSERT INTO `COLLABORATOR` (`id`, `email`, `creation_date`) VALUES (8081, 'migfake@wis.com', '2007-10-09');
|
||||
DELETE FROM `USER` where activation_date is null;
|
||||
DROP TABLE FEEDBACK;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user