14 Commits

Author SHA1 Message Date
Paulo Gustavo Veiga
49677411c4 - Fix add tooltop 2012-07-16 00:28:33 -03:00
Paulo Gustavo Veiga
f449eff9ce - Add delete button to remove relationship
- Fix add button in the toolbar.
2012-07-16 00:15:59 -03:00
Paulo Gustavo Veiga
16bbc0a456 - Swap zoom buttons 2012-07-15 23:40:13 -03:00
Paulo Gustavo Veiga
3986a97717 - Fix do and undo buttons disable action 2012-07-15 23:35:45 -03:00
Paulo Gustavo Veiga
8d4b336908 Only send save operation of changes has been perfomed.
Change default SMTP port.
2012-07-15 22:20:21 -03:00
Paulo Gustavo Veiga
d304909a86 Minor licence correction. 2012-07-15 19:27:20 -03:00
Paulo Gustavo Veiga
1cd65e347b Open Term and Conditions in a different page. 2012-07-15 02:56:49 -03:00
Paulo Gustavo Veiga
5d82ccc552 Add Term Of Use missing page. 2012-07-15 02:53:41 -03:00
Paulo Gustavo Veiga
1ac80626b4 Remove username from the mindmap info. 2012-07-15 02:04:53 -03:00
Paulo Gustavo Veiga
9257638da2 Fix error importing freeming mindmaps. 2012-07-15 01:50:47 -03:00
Paulo Gustavo Veiga
0a74e73c80 Remove foreing key from auditory. 2012-07-15 01:38:52 -03:00
Paulo Gustavo Veiga
5c94291b06 Fix SQL on creation. 2012-07-15 01:25:21 -03:00
Paulo Gustavo Veiga
853aa0ad5c Remove username attribute 2012-07-15 01:05:30 -03:00
Paulo Gustavo Veiga
80cafc0c0d Add JSTL to the distribution. This is required by 2012-07-14 15:40:26 -03:00
62 changed files with 427 additions and 524 deletions

View File

@@ -527,13 +527,6 @@ mindplot.Designer = new Class({
this._relPivot.start(nodes[0], pos);
},
needsSave:function () {
//@Todo: Review all this ...
return this._actionDispatcher._actionRunner.hasBeenChanged();
},
getMindmapProperties:function () {
return {zoom:this.getModel().getZoom()};
},
@@ -668,12 +661,30 @@ mindplot.Designer = new Class({
// Build relationship line ....
var result = new mindplot.Relationship(sourceTopic, targetTopic, model);
result.addEvent('onfocus', function (event) {
this.onObjectFocusEvent(result, event);
result.addEvent('ontblur', function () {
var topics = this.getModel().filterSelectedTopics();
var rels = this.getModel().filterSelectedRelationships();
if (topics.length == 0 || rels.length == 0) {
this.fireEvent('onblur');
}
}.bind(this));
result.addEvent('ontfocus', function () {
var topics = this.getModel().filterSelectedTopics();
var rels = this.getModel().filterSelectedRelationships();
if (topics.length == 1 || rels.length == 1) {
this.fireEvent('onfocus');
}
}.bind(this));
// Append it to the workspace ...
dmodel.addRelationship(result);
return result;
},

View File

@@ -17,7 +17,7 @@
*/
mindplot.DesignerActionRunner = new Class({
initialize: function(commandContext, notifier) {
initialize:function (commandContext, notifier) {
$assert(commandContext, "commandContext can not be null");
this._undoManager = new mindplot.DesignerUndoManager();
@@ -25,7 +25,7 @@ mindplot.DesignerActionRunner = new Class({
this._notifier = notifier;
},
execute:function(command) {
execute:function (command) {
$assert(command, "command can not be null");
command.execute(this._context);
this._undoManager.enqueue(command);
@@ -34,29 +34,21 @@ mindplot.DesignerActionRunner = new Class({
},
undo: function() {
undo:function () {
this._undoManager.execUndo(this._context);
this.fireChangeEvent();
mindplot.EventBus.instance.fireEvent(mindplot.EventBus.events.DoLayout);
},
redo: function() {
redo:function () {
this._undoManager.execRedo(this._context);
this.fireChangeEvent();
mindplot.EventBus.instance.fireEvent(mindplot.EventBus.events.DoLayout);
},
fireChangeEvent : function () {
fireChangeEvent:function () {
var event = this._undoManager.buildEvent();
this._notifier.fireEvent("modelUpdate", event);
},
markAsChangeBase: function() {
return this._undoManager.markAsChangeBase();
},
hasBeenChanged: function() {
return this._undoManager.hasBeenChanged();
}
});

View File

@@ -21,8 +21,6 @@ mindplot.DesignerUndoManager = new Class({
this._undoQueue = [];
this._redoQueue = [];
this._baseId = 0;
this._fireChange = fireChange;
},
enqueue:function(command) {
@@ -62,9 +60,9 @@ mindplot.DesignerUndoManager = new Class({
},
markAsChangeBase: function() {
var undoLenght = this._undoQueue.length;
if (undoLenght > 0) {
var command = this._undoQueue[undoLenght - 1];
var undoLength = this._undoQueue.length;
if (undoLength > 0) {
var command = this._undoQueue[undoLength - 1];
this._baseId = command.getId();
} else {
this._baseId = 0;
@@ -73,11 +71,11 @@ mindplot.DesignerUndoManager = new Class({
hasBeenChanged: function() {
var result = true;
var undoLenght = this._undoQueue.length;
if (undoLenght == 0 && this._baseId == 0) {
var undoLength= this._undoQueue.length;
if (undoLength == 0 && this._baseId == 0) {
result = false;
} else if (undoLenght > 0) {
var command = this._undoQueue[undoLenght - 1];
} else if (undoLength > 0) {
var command = this._undoQueue[undoLength - 1];
result = (this._baseId != command.getId());
}
return result;

View File

@@ -21,7 +21,7 @@ mindplot.Relationship = new Class({
getStrokeColor:function () {
return '#9b74e6';
},
type: "Relationship"
type:"Relationship"
},
initialize:function (sourceNode, targetNode, model) {
$assert(sourceNode, "sourceNode can not be null");
@@ -202,8 +202,7 @@ mindplot.Relationship = new Class({
this._controlPointsController.setVisibility(focus);
this._onFocus = focus;
console.log("foucus:....");
this.fireEvent(focus ? 'ontfocus' : 'ontblur', this);
}
},
@@ -316,5 +315,10 @@ mindplot.Relationship = new Class({
getId:function () {
return this._model.getId();
},
fireEvent:function (type, event) {
var elem = this._line2d;
elem.fireEvent(type, event);
}
});

View File

@@ -23,12 +23,6 @@ mindplot.StandaloneActionDispatcher = new Class({
this._actionRunner = new mindplot.DesignerActionRunner(commandContext, this);
},
hasBeenChanged:function () {
// @todo: This don't seems to belong here.
this._actionRunner.hasBeenChanged();
},
addTopics:function (models, parentTopicsId) {
var command = new mindplot.commands.AddTopicCommand(models, parentTopicsId);
this.execute(command);

View File

@@ -26,6 +26,12 @@ mindplot.widget.IMenu = new Class({
this._toolbarElems = [];
this._containerId = containerId;
this._mapId = mapId;
this._mindmapUpdated = false;
// Register update events ...
this._designer.addEvent('modelUpdate', function () {
this.setRequireChange(true);
}.bind(this));
},
clear:function () {
@@ -35,9 +41,17 @@ mindplot.widget.IMenu = new Class({
},
discardChanges:function () {
// Avoid autosave before leaving the page ....
this.setRequireChange(false);
// Finally call discard function ...
var persistenceManager = mindplot.PersistenceManager.getInstance();
var mindmap = designer.getMindmap();
persistenceManager.discardChanges(mindmap.getId());
// Reload the page ...
window.location.reload();
},
save:function (saveElem, designer, saveHistory) {
@@ -54,6 +68,7 @@ mindplot.widget.IMenu = new Class({
}
// Call persistence manager for saving ...
var menu = this;
var persistenceManager = mindplot.PersistenceManager.getInstance();
persistenceManager.save(mindmap, mindmapProp, saveHistory, {
onSuccess:function () {
@@ -61,6 +76,7 @@ mindplot.widget.IMenu = new Class({
saveElem.setStyle('cursor', 'pointer');
$notify($msg('SAVE_COMPLETE'));
}
menu.setRequireChange(false);
},
onError:function () {
if (saveHistory) {
@@ -69,5 +85,13 @@ mindplot.widget.IMenu = new Class({
}
}
});
},
isSaveRequired:function () {
return this._mindmapUpdated;
},
setRequireChange:function (value) {
this._mindmapUpdated = value;
}
});

View File

@@ -239,22 +239,39 @@ mindplot.widget.Menu = new Class({
this._registerTooltip('zoomOut', $msg('ZOOM_OUT'));
this._addButton('undoEdition', false, false, function () {
var undoButton = this._addButton('undoEdition', false, false, function () {
designer.undo();
});
undoButton.disable();
this._registerTooltip('undoEdition', $msg('UNDO'), "meta+Z");
this._addButton('redoEdition', false, false, function () {
var redoButton = this._addButton('redoEdition', false, false, function () {
designer.redo();
});
redoButton.disable();
this._registerTooltip('redoEdition', $msg('REDO'), "meta+shift+Z");
if (redoButton && undoButton) {
designer.addEvent('modelUpdate', function (event) {
if (event.undoSteps > 0) {
undoButton.enable();
} else {
undoButton.disable();
}
if (event.redoSteps > 0) {
redoButton.enable();
} else {
redoButton.disable();
}
this._addButton('addTopics', true, false, function () {
}.bind(this));
}
this._addButton('addTopic', true, false, function () {
designer.createChildForSelectedNode();
});
this._registerTooltip('addTopics', $msg('ADD_TOPIC'), "Enter");
this._registerTooltip('addTopic', $msg('ADD_TOPIC'), "Enter");
this._addButton('deleteTopic', true, true, function () {
@@ -304,14 +321,14 @@ mindplot.widget.Menu = new Class({
if (!readOnly) {
// To prevent the user from leaving the page with changes ...
$(window).addEvent('beforeunload', function () {
if (designer.needsSave()) {
if (this.isSaveRequired()) {
this.save(saveElem, designer, false);
}
}.bind(this));
// Autosave on a fixed period of time ...
(function () {
if (designer.needsSave()) {
if (this.isSaveRequired()) {
this.save(saveElem, designer, false);
}
}.bind(this)).periodical(30000);
@@ -321,14 +338,7 @@ mindplot.widget.Menu = new Class({
var discardElem = $('discard');
if (discardElem) {
this._addButton('discard', false, false, function () {
// Avoid autosave before leaving the page ....
$(window).removeEvents(['beforeunload']);
// Discard changes ...
this.discardChanges();
// Reload the page ...
window.location.reload();
}.bind(this));
this._registerTooltip('discard', $msg('DISCARD_CHANGES'));
}
@@ -449,24 +459,16 @@ mindplot.widget.Menu = new Class({
var rels = designer.getModel().filterSelectedRelationships();
this._toolbarElems.each(function (button) {
var disable = false;
if (button.isTopicAction() && button.isRelAction()) {
disable = rels.length == 0 && topics.length == 0;
} else if (!button.isTopicAction() && !button.isRelAction()) {
disable = false;
}
else if (button.isTopicAction() && topics.length == 0) {
disable = true;
} else if (button.isRelAction() && rels.length == 0) {
disable = true;
}
var isTopicAction = button.isTopicAction();
var isRelAction = button.isRelAction();
if (disable) {
button.disable();
} else {
button.enable();
if (isTopicAction || isRelAction) {
if ((isTopicAction && topics.length != 0) || (isRelAction && rels.length != 0)) {
button.enable();
} else {
button.disable();
}
}
})
}.bind(this));
@@ -475,12 +477,18 @@ mindplot.widget.Menu = new Class({
var rels = designer.getModel().filterSelectedRelationships();
this._toolbarElems.each(function (button) {
if (button.isTopicAction() && topics.length > 0) {
button.enable();
}
var isTopicAction = button.isTopicAction();
var isRelAction = button.isRelAction();
if (button.isRelAction() && rels.length > 0) {
button.enable();
if (isTopicAction || isRelAction) {
if (isTopicAction && topics.length > 0) {
button.enable();
}
if (isRelAction && rels.length > 0) {
button.enable();
}
}
})
}.bind(this));
@@ -488,6 +496,7 @@ mindplot.widget.Menu = new Class({
_addButton:function (buttonId, topic, rel, fn) {
// Register Events ...
var result = null;
if ($(buttonId)) {
var button = new mindplot.widget.ToolbarItem(buttonId, function (event) {
@@ -496,7 +505,9 @@ mindplot.widget.Menu = new Class({
}.bind(this), {topicAction:topic, relAction:rel});
this._toolbarElems.push(button);
result = button;
}
return result;
},
_registerTooltip:function (buttonId, text, shortcut) {

View File

@@ -55,6 +55,10 @@ mindplot.widget.ToolbarItem = new Class({
return elem;
}.protect(),
getButtonId : function(){
return this._buttonId;
},
show : function() {
this.fireEvent('show');
},

View File

@@ -64,12 +64,12 @@
</div>
</div>
<div id="zoom" class="buttonContainer">
<div id="zoomIn" class="buttonOn">
<img src="images/zoom-in.png"/>
</div>
<div id="zoomOut" class="buttonOn">
<img src="images/zoom-out.png"/>
</div>
<div id="zoomIn" class="buttonOn">
<img src="images/zoom-in.png"/>
</div>
</div>
<div id="node" class="buttonContainer">
<div id="topicShape" class="buttonExtOn">

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 629 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 727 B

View File

@@ -227,7 +227,6 @@
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.mail</groupId>

View File

@@ -39,7 +39,7 @@ public class MindmapManagerImpl
final Collaborator collaborator;
final List<Collaborator> collaborators = getHibernateTemplate().find("from com.wisemapping.model.Collaborator collaborator where email=?", email);
if (collaborators != null && !collaborators.isEmpty()) {
assert collaborators.size() == 1 : "More than one user with the same username!";
assert collaborators.size() == 1 : "More than one user with the same email!";
collaborator = collaborators.get(0);
} else {
collaborator = null;
@@ -201,16 +201,16 @@ public class MindmapManagerImpl
}
@Override
public void removeMindmap(MindMap mindMap) {
public void removeMindmap(@NotNull final MindMap mindMap) {
getHibernateTemplate().delete(mindMap);
}
private void saveHistory(MindMap mindMap) {
private void saveHistory(@NotNull final MindMap mindMap) {
final MindMapHistory history = new MindMapHistory();
history.setXml(mindMap.getXml());
history.setCreationTime(Calendar.getInstance());
history.setCreator(mindMap.getLastModifierUser());
history.setEditor(mindMap.getLastEditor());
history.setMindmapId(mindMap.getId());
getHibernateTemplate().saveOrUpdate(history);
}

View File

@@ -33,8 +33,6 @@ public interface UserManager {
public User getUserBy(long id);
User getUserByUsername(String username);
void createUser(User user);
void auditLogin(@NotNull AccessAuditory accessAuditory);

View File

@@ -73,19 +73,6 @@ public class UserManagerImpl
return getHibernateTemplate().get(User.class, id);
}
@Override
public User getUserByUsername(String username) {
final User user;
final List users = getHibernateTemplate().find("from com.wisemapping.model.User colaborator where username=?", username);
if (users != null && !users.isEmpty()) {
assert users.size() == 1 : "More than one user with the same username!";
user = (User) users.get(0);
} else {
user = null;
}
return user;
}
@Override
public void createUser(User user) {
assert user != null : "Trying to store a null user";

View File

@@ -22,7 +22,6 @@ public class Constants {
public static final int MAX_MAP_NAME_LENGTH = 512;
public static final int MAX_MAP_DESCRIPTION_LENGTH = 512;
public static final int MAX_USER_USERNAME_LENGTH = 255;
public static final int MAX_USER_LASTNAME_LENGTH = 255;
public static final int MAX_USER_FIRSTNAME_LENGTH = 255;
public static final int MAX_USER_PASSWORD_LENGTH = 255;

View File

@@ -40,7 +40,7 @@ public class MindMap {
private boolean isPublic;
private Calendar lastModificationTime;
private String lastModifierUser;
private User lastEditor;
private Set<Collaboration> collaborations = new HashSet<Collaboration>();
@@ -144,12 +144,13 @@ public class MindMap {
this.lastModificationTime = lastModificationTime;
}
public String getLastModifierUser() {
return lastModifierUser;
@Nullable
public User getLastEditor() {
return lastEditor;
}
public void setLastModifierUser(String lastModifierUser) {
this.lastModifierUser = lastModifierUser;
public void setLastEditor(@Nullable User lastEditor) {
this.lastEditor = lastEditor;
}
public int getId() {

View File

@@ -18,21 +18,19 @@
package com.wisemapping.model;
import com.wisemapping.util.ZipUtils;
import org.jetbrains.annotations.Nullable;
import java.util.Calendar;
import java.io.IOException;
public class MindMapHistory {
private int id;
private Calendar creationTime;
private String creator;
private User editor;
private byte[] xml;
private int mindmapId;
public MindMapHistory()
{
public MindMapHistory() {
}
@@ -60,12 +58,13 @@ public class MindMapHistory {
this.creationTime = creationTime;
}
public String getCreator() {
return creator;
@Nullable
public User getEditor() {
return editor;
}
public void setCreator(String creator) {
this.creator = creator;
public void setEditor(@Nullable User editor) {
this.editor = editor;
}
public byte[] getXml() {

View File

@@ -32,7 +32,6 @@ public class User
private String password;
private long activationCode;
private Calendar activationDate;
private String username;
private Set<String> tags = new HashSet<String>();
private boolean allowSendEmail = false;
private String locale;
@@ -118,9 +117,7 @@ public class User
final String email = getEmail();
if (email != null ? !email.equals(user.getEmail()) : user.getEmail() != null) return false;
if (firstname != null ? !firstname.equals(user.firstname) : user.firstname != null) return false;
if (lastname != null ? !lastname.equals(user.lastname) : user.lastname != null) return false;
return !(username != null ? !username.equals(user.username) : user.username != null);
return !(lastname != null ? !lastname.equals(user.lastname) : user.lastname != null);
}
@@ -133,14 +130,6 @@ public class User
return result;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
@Nullable
public String getLocale() {
return locale;

View File

@@ -52,11 +52,6 @@ public class ExtensionsController {
return new ModelAndView("privacyPolicy");
}
@RequestMapping(value = "termsOfUse")
public ModelAndView termsOfUse() {
return new ModelAndView("termsOfUse");
}
@RequestMapping(value = "faq")
public ModelAndView faq() {
return new ModelAndView("faq");

View File

@@ -38,6 +38,11 @@ public class PublicPagesController {
return "aboutUs";
}
@RequestMapping(value = "termsOfUse")
public String showTermsOfUse() {
return "termsOfUse";
}
@RequestMapping(value = "crew")
public String crew() {
return "crew";

View File

@@ -108,7 +108,6 @@ public class UsersController {
// trim() the email email in order to remove spaces ...
user.setEmail(userBean.getEmail().trim());
user.setUsername(userBean.getUsername());
user.setFirstname(userBean.getFirstname());
user.setLastname(userBean.getLastname());
user.setPassword(userBean.getPassword());

View File

@@ -58,16 +58,6 @@ public class AdminController extends BaseController {
return new ModelAndView("userView", "user", new RestUser(user));
}
@RequestMapping(method = RequestMethod.GET, value = "admin/users/username/{username}", produces = {"application/json", "text/html", "application/xml"})
@ResponseBody
public ModelAndView getUserByUsername(@PathVariable String username) throws IOException {
final User user = userService.getUserByUsername(username);
if (user == null) {
throw new IllegalArgumentException("User '" + username + "' could not be found");
}
return new ModelAndView("userView", "user", new RestUser(user));
}
@RequestMapping(method = RequestMethod.POST, value = "admin/users", consumes = {"application/xml", "application/json"}, produces = {"application/json", "text/html", "application/xml"})
@ResponseStatus(value = HttpStatus.CREATED)
public void createUser(@RequestBody RestUser user, HttpServletResponse response) throws IOException, WiseMappingException {
@@ -81,15 +71,6 @@ public class AdminController extends BaseController {
throw new IllegalArgumentException("User already exists with this email.");
}
final String username = user.getUsername();
if (username == null || username.isEmpty()) {
throw new IllegalArgumentException("username can not be null");
}
if (userService.getUserByUsername(username) != null) {
throw new IllegalArgumentException("User already exists with this username.");
}
// Run some other validations ...
final User delegated = user.getDelegated();
final String lastname = delegated.getLastname();

View File

@@ -404,8 +404,7 @@ public class MindmapController extends BaseController {
}
// Save new map ...
final User user = Utils.getUser();
createMap(new RestMindmap(mindMap, user), response, title, description);
createMap(new RestMindmap(mindMap, null), response, title, description);
}
@RequestMapping(method = RequestMethod.POST, value = "/maps/{id}", consumes = {"application/xml", "application/json"})
@@ -438,7 +437,7 @@ public class MindmapController extends BaseController {
private void saveMindmap(boolean minor, @NotNull final MindMap mindMap, @NotNull final User user) throws WiseMappingException {
final Calendar now = Calendar.getInstance();
mindMap.setLastModificationTime(now);
mindMap.setLastModifierUser(user.getUsername());
mindMap.setLastEditor(user);
mindmapService.updateMindmap(mindMap, !minor);
}

View File

@@ -81,8 +81,8 @@ public class RestMindmap {
return mindmap.getCreator().getEmail();
}
public String getLastModifierUser() {
return mindmap.getLastModifierUser();
public Collaborator getLastModifierUser() {
return mindmap.getLastEditor();
}
public String getLastModificationTime() {

View File

@@ -44,7 +44,7 @@ public class RestMindmapHistory {
public RestMindmapHistory(@NotNull MindMapHistory history) {
this.id = history.getId();
this.creation = history.getCreationTime();
this.creator = history.getCreator();
this.creator = history.getEditor().getFullName();
}
public String getCreationTime() {

View File

@@ -88,7 +88,8 @@ public class RestMindmapInfo {
}
public String getLastModifierUser() {
return mindmap.getLastModifierUser();
final User user = mindmap.getLastEditor();
return user != null ? user.getFullName() : "unknown";
}
public String getLastModificationTime() {

View File

@@ -66,14 +66,6 @@ public class RestUser {
// return user.isActive();
// }
public String getUsername() {
return user.getUsername();
}
public void setUsername(String username) {
user.setUsername(username);
}
public long getId() {
return user.getId();
}

View File

@@ -137,8 +137,7 @@ public class MindmapServiceImpl
}
final Calendar creationTime = Calendar.getInstance();
final String username = user.getUsername();
map.setLastModifierUser(username);
map.setLastEditor(user);
map.setCreationTime(creationTime);
map.setLastModificationTime(creationTime);
map.setCreator(user);

View File

@@ -34,8 +34,6 @@ public interface UserService {
public User getUserBy(long id);
public User getUserByUsername(String username);
public void updateUser(User user);
public void resetPassword(@NotNull String email) throws InvalidUserEmailException;

View File

@@ -142,7 +142,7 @@ public class UserServiceImpl
return user;
}
private MindMap buildWelcomeMindmap(@NotNull String username) throws WiseMappingException {
private MindMap buildWelcomeMindmap(@NotNull String firstName) throws WiseMappingException {
//To change body of created methods use File | Settings | File Templates.
final Locale locale = LocaleContextHolder.getLocale();
MindMap result = new MindMap();
@@ -155,7 +155,7 @@ public class UserServiceImpl
try {
final byte[] bytes = IOUtils.toByteArray(resourceAsStream);
result.setXml(bytes);
result.setTitle(messageSource.getMessage("WELCOME", null, locale) + " " + username);
result.setTitle(messageSource.getMessage("WELCOME", null, locale) + " " + firstName);
result.setDescription("");
} catch (IOException e) {
@@ -176,11 +176,6 @@ public class UserServiceImpl
return userManager.getUserBy(email);
}
@Override
public User getUserByUsername(String username) {
return userManager.getUserByUsername(username);
}
@Override
public User getUserBy(long id) {
return userManager.getUserBy(id);

View File

@@ -21,7 +21,6 @@ package com.wisemapping.validator;
public interface Messages {
String EMAIL_ALREADY_EXIST = "EMAIL_ALREADY_EXIST";
String NO_VALID_EMAIL_ADDRESS = "NO_VALID_EMAIL_ADDRESS";
String USERNAME_ALREADY_EXIST = "USERNAME_ALREADY_EXIST";
String FIELD_REQUIRED = "FIELD_REQUIRED";
String IMPORT_MAP_ERROR = "IMPORT_MAP_ERROR";
String MAP_TITLE_ALREADY_EXISTS = "MAP_TITLE_ALREADY_EXISTS";

View File

@@ -56,14 +56,6 @@ public class UserValidator
Utils.validateEmailAddress(email, errors);
}
// Validate username ...
final String username = user.getUsername();
if (username != null && userService.getUserByUsername(username) != null) {
errors.rejectValue("username", Messages.USERNAME_ALREADY_EXIST);
} else {
ValidationUtils.rejectIfEmpty(errors, "username", Messages.FIELD_REQUIRED);
}
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "firstname", Messages.FIELD_REQUIRED);
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "lastname", Messages.FIELD_REQUIRED);
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "password", Messages.FIELD_REQUIRED);
@@ -78,11 +70,6 @@ public class UserValidator
"The lastname must have less than " + Constants.MAX_USER_LASTNAME_LENGTH + " characters.",
user.getLastname(),
Constants.MAX_USER_LASTNAME_LENGTH);
ValidatorUtils.rejectIfExceeded(errors,
"username",
"The username must have less than " + Constants.MAX_USER_USERNAME_LENGTH + " characters.",
username,
Constants.MAX_USER_USERNAME_LENGTH);
ValidatorUtils.rejectIfExceeded(errors,
"password",
"The password must have less than " + Constants.MAX_USER_PASSWORD_LENGTH + " characters.",

View File

@@ -22,48 +22,40 @@ import com.wisemapping.model.CollaborationRole;
import com.wisemapping.model.Collaborator;
import com.wisemapping.model.User;
public class CollaboratorBean
{
public class CollaboratorBean {
private CollaborationRole collaborationRole;
private boolean isUser;
private Collaborator collaborator;
public CollaboratorBean(Collaborator collaborator, CollaborationRole role)
{
public CollaboratorBean(Collaborator collaborator, CollaborationRole role) {
this.collaborator = collaborator;
this.collaborationRole = role;
this.isUser = false;
}
public CollaboratorBean(User user, CollaborationRole role)
{
public CollaboratorBean(User user, CollaborationRole role) {
this.collaborator = user;
this.collaborationRole = role;
this.isUser = true;
}
public boolean isUser()
{
public boolean isUser() {
return isUser;
}
public String getRole()
{
public String getRole() {
return collaborationRole.name();
}
public String getUsername()
{
return isUser ? ((User) collaborator).getUsername() : collaborator.getEmail();
public String getUsername() {
return isUser ? ((User) collaborator).getFullName() : collaborator.getEmail();
}
public String getEmail()
{
public String getEmail() {
return collaborator.getEmail();
}
public long getId()
{
public long getId() {
return collaborator.getId();
}
}

View File

@@ -69,7 +69,8 @@ public class MindMapBean {
}
public String getLastEditor() {
return mindmap.getLastModifierUser();
final User lastEditor = mindmap.getLastEditor();
return lastEditor != null ? lastEditor.getFullName() : "";
}
public String getLastEditTime() {

View File

@@ -21,13 +21,12 @@
<joined-subclass name="com.wisemapping.model.User" table="USER">
<key column="COLABORATOR_ID"/>
<property name="username" not-null="true"/>
<property name="firstname"/>
<property name="lastname"/>
<property name="password"/>
<property name="activationDate" column="activation_date"/>
<property name="activationCode"/>
<property name="allowSendEmail"/>
<property name="activationCode" column="activation_code"/>
<property name="allowSendEmail" column="allow_send_email"/>
<property name="locale"/>
<set name="tags" table="TAG">
<key column="user_id"/>

View File

@@ -13,11 +13,11 @@
<property name="public"/>
<property name="description"/>
<property name="zippedXml" column="XML"/>
<property name="lastModifierUser" column="last_editor"/>
<property name="lastModificationTime" column="edition_date"/>
<property name="creationTime" column="creation_date"/>
<property name="tags" column="tags"/>
<many-to-one name="creator" column="creator_id" unique="true" not-null="true"/>
<many-to-one name="creator" column="creator_id" unique="true" not-null="false" lazy="proxy"/>
<many-to-one name="lastEditor" column="last_editor_id" unique="false" not-null="true" lazy="proxy"/>
<set name="collaborations"
cascade="all,delete-orphan"

View File

@@ -11,9 +11,9 @@
</id>
<property name="mindmapId" column="mindmap_id"/>
<property name="xml" column="XML"/>
<property name="creationTime" column="creation_date"/>
<property name="creator" column="creator_user"/>
<property name="xml" column="XML"/>
<property name="creationTime" column="creation_date"/>
<many-to-one name="editor" column="editor_id" unique="false" not-null="false" lazy="proxy"/>
</class>
</hibernate-mapping>

View File

@@ -24,7 +24,7 @@ database.password=
#------------------------
# Plain SMTP Server Configuration
#------------------------
mail.smtp.port=465
mail.smtp.port=25
mail.smtp.host=localhost
mail.username=root
mail.password=

View File

@@ -208,5 +208,7 @@ COLLAPSE_CHILDREN=Collapse Children
KEYBOARD_SHORTCUTS_MSG=Keyboard shortcuts can help you save time by allowing you to never take your hands off the keyboard to use the mouse.
COPY_AND_PASTE_TOPICS=Copy and Page Topics
MULTIPLE_LINES=Add multiple text lines
TERM_OF_USE=Terms and Conditions

View File

@@ -209,4 +209,6 @@ KEYBOARD_SHORTCUTS_MSG=Los accesos directos pueden ayudarte a salvar tiempo perm
NAME=Nombre
COPY_AND_PASTE_TOPICS=Copiar y Pegar T\u00f3picos
MULTIPLE_LINES=Agregar multiples lineas de texto
TERM_OF_USE=T\u00e9rminos y Condiciones

View File

@@ -1,248 +0,0 @@
NAME = Nom
DESCRIPTION = Description
OK = Ok
WISEMAPPING = WiseMapping
ADD = Ajouter
ACTIONS = Actions
ADD_COLLABORATORS = Ajouter des membres Utilisateurs
CURRENT_COLLABORATORS = Membres actuels
VIEWERS = Lecteurs
ADD_VIEWERS = Ajouter des lecteurs
CURRENT_VIEWERS = Lecteurs actuels
USER_REGISTRATION = Inscription gratuite
CANCEL = Annuler
SUBMIT = Envoyer
FIRSTNAME = Pr\u00e9nom
LASTNAME = Nom
EMAIL = Adresse \u00e9lectronique
HELP = Aide
LOGOUT = D\u00e9connexion
PASSWORD = Mot de passe
MY_WISEMAPS = Mes Cartes Mentale
SAVE_AND_CLOSE = Sauver et Fermer
RETYPE_PASSWORD = Entrer le nouveau le mot de passe
REGISTER = S\'inscrire
REMEMBER_ME = M\u00e9moriser
SIGN_IN = S\'identifier
SIGN_UP = Se d\u00e9connecter
ACCOUNT = Param\u00e9tres du compte
USERNAME = Pseudo
BACK = Pr\u00e9c\u00e9dent
CLOSE = Fermer
NOT_READY_A_USER = Pas encore membre?
NOT_READY_A_USER_MESSAGE = L\'inscription est ouverte pour les enseignants et \u00e9l\u00e9ves de l\'acad\u00e9mie de Versailles et ne prend qu\'une minute.
JOIN_NOW = Devenez membre!
REMOVE = Supprimer
MINDMAP = Mindmap
ROLE = R\u00f4le
CAPTCHA = V\u00e9rification orthographe
FORGOT_PASSWORD = Mot de passe oubli\u00e9?
CHANGE_PASSWORD = Changer le mot de passe
FAQ = Questions fr\u00e9quentes
SHORT_FAQ = FAQ
LOGIN = Identifiant
SUBJECT = Objet
MSG = Message
PROBLEM_DETAIL = Description
EXPORT = Exporter
EXPORT_MSG = Exporter
EXPORT_FORMAT = Format d\'export
EDIT_PROFILE = G\u00e9rer mon profil / compte
JPEG_EXPORT_FORMAT = JPEG
PNG_EXPORT_FORMAT = Portable Network Graphics (PNG)
SVG_EXPORT_FORMAT = Scalable Vector Graphics (SVG)
PDF_EXPORT_FORMAT = Portable Document Format (PDF)
IMG_EXPORT_FORMAT = Fichier image
FREEMIND_EXPORT_FORMAT = Freemind (version 0.8.0)
FILE = Fichier
FILE_URL = URL fichier
STATUS = Statut
LAST_EDITOR = Derni\u00e8re version
DELETE_SELECTED_CONFIRMATION = Tous les cartes mentales s\u00e9lectionn\u00e9s seront supprim\u00e9s. Souhaitez-vous continuer?
DELETE_CONFIRMATION = Etes-vous s\u00fbr(e) de vouloir supprimer cette carte mentale?
DELETE_SELECTED = Supprimez la s\u00e9lection
DELETE = Supprimer
YES = oui
NO = non
EDITOR.LOADING = T\u00e9l\u00e9chargement...
SITE.TITLE=WiseMapping
SITE.SLOGAN=COMPLETE
SAVE = Sauver
DISCARD_CHANGES = Abandonner les changements
ABOUT = Qui sommes-nous?
ABOUT_TITLE = Le projet WiseMapping
KEYBOARD = Raccourcis clavier
KEYBOARD_MSG = Raccourcis clavier \u00e0 utiliser dans l\'application.
FIRST_STEPS = Cr\u00e9er une premi\u00e8re carte.
FIRST_STEPS_MSG = Votre espace en 2 minutes seulement!
HOME = Accueil
LOGIN_ERROR = L\'adresse \u00e9lectronique et le mot de passe ne sont pas compl\u00e9mentaires.
USER_INACTIVE = D\u00e9sol\u00e9, votre compte n\'a pas encore \u00e9t\u00e9 activ\u00e9. Vous allez recevoir une notification par email lorsque votre compte sera activ\u00e9.
CREW = L\'\u00e9quipe
ALREADY_A_MEMBER = D\u00e9j\u00e0 membre?
WORD_VERIFICATION = V\u00e9rification orthographe
TERM_OF_THE_SERVICE = Conditions d\'utilisation
FORGOT_PASSWORD_MESSAGE = Merci d\'entrer votre adresse email afin de pouvoir vous renvoyer votre mot de passe.
LOADING_MSG = T\u00e9l\u00e9chargement...
TRYNOW = Essayer la d\u00e9mo!
FIELD_REQUIRED = Champs obligatoires.
EMAIL_ALREADY_EXIST = Adresse email d\u00e9j\u00e90 utilis\u00e9e
NO_VALID_EMAIL_ADDRESS = Email non valide
USERNAME_ALREADY_EXIST = Ce pseudo est d\u00e9j\u00e0 pris
PASSWORD_MISSMATCH = Les mots de passe saisis ne sont pas compl\u00e9mentaires
TYPE_CHARACTER_BELOW = Saisissez les caract\u00e8res pr\u00e9sents dans l\'image ci-dessous.
WISEMAPPING_ACCOUNT_MESSAGE = Merci de v\u00e9rifier les informations de votre compte WiseMapping saisies plus haut ainsi que les conditions d\'utilisation.
REGISTRATION_CLICK_ADVICE = J\'accepte les conditions d\'utilisation et la politique de confidentialit\u00e9 de WiseMapping.
REGISTRATION_TITLE_MSG = Renseignez les champs pour devenir membre de la communaut\u00e9 WiseMapping. <br/>L\'inscription est <b> gratuite<b> et ne prend qu\'un moment.
CAPTCHA_ERROR = Saisissez les lettres telles qu\'elles apparaissent sur cette image.
DETAIL_INFORMATION = Informations d\u00e9taill\u00e9es
CREATOR = Cr\u00e9ateur
CREATION_TIME = Date de cr\u00e9ation
VIEWS = Vues
STATE = Etat
COLLABORATORS = Contributeurs
ADD_COLLABORATOR = Inviter un contributeur
EDITORS = Cr\u00e9ateurs / R\u00e9dacteurs
VIEWER = Lecteurs
PRIVATE = Priv\u00e9
PUBLIC = Public
SHARED = Partag\u00e9
UNDO_EDITION=Annuler
UNDO=Annuler
REDO_EDITION=R\u00e9tablie
REDO=R\u00e9tablir
ONLY_VIEW_PRIVATE = Ce document ne peut \u00eatre visualis\u00e9 que par vous.
ALL_VIEW_PUBLIC = Ce document peut \u00eatre visualis\u00e9 par tous.
EMAILS_ADRESSES = Adresses email
CURRENT_CONTACTS = Contacts actuels
MESSAGE = Message
COLLABORATION = Contribution
SHARE_DETAILS = Partagez vos cartes avec vos amis ou vos coll\u00e8gues. Donnez-leur acc\u00e8s \u00e0 vos cartes et invitez-les \u00e0 se joindre \u00e0 votre r\u00e9flexion.
NEW_MAP_MSG =
TAG = Mot-cl\u00e9
PUBLISH = Publier
PUBLISH_MSG = Il est possible d\'utiliser vos cartes dans votre site internet et votre blog!
PUBLISH_DETAILS = En publiant la carte, elle sera visible par tout le monde sur Internet. Copiez les codes ci-dessous pour les int\u00e9grer dans votre site internet ou votre blog.
DETAIL = D\u00e9tail
RECENT_FILES = Cartes r\u00e9centes
MINDMAP_DETAIL = D\u00e9tail de la Cartes
EDIT = Editer / R\u00e9diger
INSERT = Ins\u00e9rer
EDITOR.LAST_SAVED = Derni\u00e9re modification par
SHARE_IT = Partager
ACCOUNT_DETAIL = Souhaitez-vous modifier les options de votre profil ?
SETTINGS_MSG = S\u00e9lectionnez les options que vous souhaitez modifier dans votre profil
TAGS = Mots-cl\u00e9s
AVAILABLE_TAGS = Mots-cl\u00e9s disponibles
EMPTY_MINDMAP_TABLE = Organiser ses id\u00e9es n\'a jamais \u00e9t\u00e9 aussi simple. Cr\u00e9ez une carte et laissez-vous guider !
EMPTY_RECENT_MINDMAP_TABLE = Aucune carte r\u00e9cente
TAGS_DETAILS = Ajoutez des mots-cl\u00e9s \u00e0 vos maps en 1 clic.
TAG_IT = Taguer
PUBLISH_IT = Publier
UNSUPPORTED_BROWSER = Navigateur non support\u00e9
FIELD_REQUIRED_MSG=Les champs marqu\u00e9s avec une ast\u00e9risque sont requis.
COMMA_SEPARATED_EMAILS = S\u00e9parer les adresses email par une virgule
INVITE_USERS = Inviter des Utilisateurs
AS_COLLABORATOR = Vous \u00eates Collaborateur
AS_VIEWER = Vous \u00eates Lecteur
CUSTOMIZE_INVITATION = Personnaliser l\'invitation
INVITATION = Invitation
INVITATION_MSG = Je viens de partager une carte mentale avec toi. Identifies-toi sur www.wisemapping.com pour voir la carte partag\u00e9e dans ta liste de Cartes Mentale.
SVG_EXPORT_FORMAT_DETAILS = Scalable Vector Graphics (SVG) is a XML markup language for describing two-dimensional vector graphics. This format will enable you to print your maps without quality lost at any resolution.
PDF_EXPORT_FORMAT_DETAILS = Enregistrez votre carte en format PDF (Portable Document Format) afin de l\'ins\u00e9rer dans vos pr\u00e9sentations.
DELETE_MAP = Confirmation de suppression
TERMSOFUSE = Conditions d\'Utilisations
PRIVACYPOLICY = Politique de Confidentialit\u00e9
PUBLIC_MAP_VIEW = Informations sur les cartes publiques
HERE = ici
DETAILS = D\u00e9tails
PUBLIC_VIEW_TITLE = Visualisation de la carte
WHO_ARE_WE = Qui sommes-nous ?
MEMBERS = Membres
WELCOME = Bienvenue
RENAME = Renommer
RENAME_DETAILS = Modifier le titre et la description de la carte
MAX_CHARACTER_SIZE = La longueur maximale du message est de 512 caract\u00e8res.
PUBLISH_MAP_TO_INTERNET = Publier une carte sur Internet
URL = URL
DIRECT_LINK = Lien direct
BLOG_INCLUSION =
OPEN = Ouvrir
OPEN_MSG = Ouvrir une carte
ZOOM = Zoom
ZOOM_IN = Zoom avant
ZOOM_OUT = Zoom arri\u00e8re
HISTORY = Historique
TOPIC = Sujet
TOPIC_BACKGROUND_COLOR = Couleur de l\'arri\u00e8re-plan du noeud
TOPIC_BORDER_COLOR = Couleur du cadre du noeud
BORDER_COLOR = Couleur du cadre
BORDER = Cadre
TOPIC_SHAPE = Forme du noeud
SHAPE = Forme
TOPIC_ADD = Ajouter un noeud
TOPIC_DELETE = Supprimer le noeud
TOPIC_ICON = Ajouter une image
ICON = Image
TOPIC_LINK = Ajouter un lien
LINK = URL
TOPIC_RELATIONSHIP = Ajouter un lien
RELATION = Lien
TOPIC_NOTE = Ajouter une note
NOTE = Note
FONT = Police
FONT_TYPE = Style de la police
TYPE = Ecrire
FONT_SIZE = Taille de la police
SIZE = Taille
FONT_BOLD = Gras
BOLD = Gras
FONT_ITALIC = Italique
ITALIC = Italique
FONT_COLOR = Couleur de la police
COLOR = Couleur
SHARE = Partager
UNEXPECTED_ERROR = Oups!! Une erreur est survenue.
UNEXPECTED_ERROR_DETAILS = D\u00e9sol\u00e9, une erreur est survenue, votre requ\u00eate ne peut \u00eatre aboutie. Veuillez recommencer, ou rendez-vous sur la page d\u2019accueil.
NO_ENOUGH_PERMISSIONS = Oups!! Cette carte n\'est plus disponible.
NO_ENOUGH_PERMISSIONS_DETAILS = Vous ne pouvez pas acc\u00e9der \u00e0 cette carte. Cette carte est d\u00e9sormais priv\u00e9e ou a \u00e9t\u00e9 supprim\u00e9e.
SHARING = Partager
IMPORT_MINDMAP = Importer une carte
IMPORT_MINDMAP_DETAILS =
PRINT = Imprimer
IMPORT_MAP_ERROR = Le fichier import\u00e9 ne semble pas \u00eatre un fichier FreeMind valide.
MAP_TITLE_ALREADY_EXISTS = Le titre de la carte existe d\u00e9j\u00e0.
EMBEDDED_VIEWER = Int\u00e9grer un visualiseur de carte dans votre propre site internet, blog ou billet.
EMBEDDED_VIEWER_MESSAGE = Une fois que vous rendez votre carte publique, vous pourrez embarquer un visualiseur de carte dans votre site internet, blog ou billet exactement comme ici! Essayez!! Vous pouvez d\u00e9placer des noeuds, \u00e9tirer la carte, et zoomer en avant et en arri\u00e8re.
FREEMIND_EXPORT_IMPORT = Importer et Exporter des cartes \u00e0 partir de/vers FreeMind/Freeplane
FREEMIND_EXPORT_IMPORT_MESSAGE = Vous pouvez maintenant facilement importer et exporter des cartes mentale \u00e0 partir de/vers FreeMind/FreePlane.
EDITOR_TOOLBAR_IMPROVED=Usability Improvement = La barre d\'outil \u00e0 \u00e9t\u00e9 redessin\u00e9e.
EDITOR_TOOLBAR_IMPROVED_MESSAGE = La barre d\'outil a \u00e9t\u00e9 redessin\u00e9e afin d\'am\u00e9liorer son utilisation.
COLLABORATE = Contribuer
PRINT_FEATURE_IMPLEMENTED = Imprimer la carte maintenant.
EMBEDDED_MAP_SIZE=* Note
EDITOR_LINKS=Mind Map feature
EXPORT_FORMAT_RESTRICTIONS=Important: Exporting to Image, PDF or SVG is available only in the editor toolbar only.
STARRED=Starred
ACCOUNT_ACTIVED=COMPLETE
WISEMAPPING_EXPORT_FORMAT=WiseMapping
WISEMAPPING_EXPORT_FORMAT_DETAILS=COMPLETE
YOUR_ROLE=COMPLETE
ACCOUNT_ACTIVED_FAIL=COMPLETE
CHANGE_PASSWORD_SUCCESS=COMPLETE
CONTACT=COMPLETE
COPYRIGHT=COMPLETE
CONFIRM_NEW_PASSWORD=COMPLETE
UNEXPECTED_ERROR_SERVER_ERROR=COMPLETE
SEND_ME_A_NEW_PASSWORD=COMPLETE
ALL_MAPS=COMPLETE
CREATE=COMPLETE
DUPLICATE=COMPLETE
DELETE_MINDMAP=COMPLETE
INFO=COMPLETE
SAVING=COMPLETE
PUBLIC_MAPS=COMPLETE

View File

@@ -208,3 +208,5 @@ COLLAPSE_CHILDREN=\u6298\u53e0\u5b50\u8282\u70b9
KEYBOARD_SHORTCUTS_MSG=\u5feb\u6377\u952e\u53ef\u4ee5\u5e2e\u52a9\u4f60\u8282\u7ea6\u65f6\u95f4\uff0c\u4f7f\u4f60\u7684\u624b\u4e0d\u5fc5\u79bb\u5f00\u952e\u76d8\u800c\u53bb\u4f7f\u7528\u9f20\u6807\u3002
COPY_AND_PASTE_TOPICS=\u62f7\u8d1d\u548c\u7c98\u8d34\u8282\u70b9
MULTIPLE_LINES=\u6dfb\u52a0\u591a\u884c\u957f\u6587\u672c
TERM_OF_USE=\u6761\u6b3e\u548c\u6761\u4ef6

View File

@@ -208,3 +208,5 @@ COLLAPSE_CHILDREN=\u6298\u758a\u5b50\u7bc0\u9ede
KEYBOARD_SHORTCUTS_MSG=\u5feb\u6377\u9375\u53ef\u4ee5\u5e6b\u52a9\u4f60\u7bc0\u7d04\u6642\u9593\uff0c\u4f7f\u4f60\u7684\u624b\u4e0d\u5fc5\u96e2\u958b\u9375\u76e4\u800c\u53bb\u4f7f\u7528\u6ed1\u9f20\u3002
COPY_AND_PASTE_TOPICS=\u62f7\u8c9d\u548c\u7c98\u8cbc\u7bc0\u9ede
MULTIPLE_LINES=\u6dfb\u52a0\u591a\u884c\u9577\u6587\u672c
TERM_OF_USE=\u689d\u6b3e\u548c\u689d\u4ef6

View File

@@ -63,6 +63,11 @@
<put-attribute name="body" value="/jsp/login.jsp"/>
</definition>
<definition name="termsOfUse" extends="pageTemplate">
<put-attribute name="title" value="TERM_OF_USE"/>
<put-attribute name="body" value="/jsp/termsOfUse.jsp"/>
</definition>
<definition name="forgotPasswordError" extends="errorTemplate">
<put-attribute name="title" value="INVALID_EMAIL_ERROR"/>
<put-attribute name="body" value="/jsp/userForgotPasswordError.jsp"/>

View File

@@ -110,6 +110,10 @@ div.pageBodyContent li {
border: 1px dotted gray;
}
span.errorMsg{
color: red;
}
div.fform {
background: #eeeeee;
border: 1px solid #cfcfcf;

View File

@@ -18,17 +18,14 @@
<input type="text" name="password" id="email" required="required" readonly="readonly"
value="${user.email}"/>
<label for="userName"><strong><spring:message code="USERNAME"/>:</strong></label>
<input type="text" name="password" id="userName" required="required" value="${user.username}"
readonly="readonly"/>
<label for="firstname"><strong><spring:message code="FIRSTNAME"/>:</strong></label>
<input type="text" name="firstname" id="firstname" required="required" value="${user.firstname}"/>
<label for="lastname"><strong><spring:message code="LASTNAME"/>:</strong></label>
<input type="text" name="lastname" id="lastname" required="required" value="${user.lastname}"/>
<br/>
<input type="submit" id="changeUserInfoBtn" class="btn btn-primary" value="<spring:message code="SAVE_CHANGES"/>"/>
<input type="submit" id="changeUserInfoBtn" class="btn btn-primary"
value="<spring:message code="SAVE_CHANGES"/>"/>
</fieldset>
</form>

View File

@@ -4,7 +4,7 @@
<div>
<ul class="nav nav-tabs">
<li class="active"><a href="#general" data-toggle="pill">General</a></li>
<li class="active"><a href="#general" data-toggle="pill"><spring:message code="DESCRIPTION"/></a></li>
<li><a href="#collaborators" data-toggle="pill"><spring:message code="SHARED"/></a></li>
<li><a href="#publish" data-toggle="pill"><spring:message code="PUBLIC"/></a></li>
</ul>
@@ -14,7 +14,7 @@
<ul class="unstyled">
<li><strong><spring:message code="NAME"/>:</strong> ${mindmap.title}</li>
<li><strong><spring:message code="DESCRIPTION"/>:</strong> ${mindmap.description}</li>
<li><strong><spring:message code="CREATOR"/>:</strong> ${mindmap.creator.username}</li>
<li><strong><spring:message code="CREATOR"/>:</strong> ${mindmap.creator.fullName}</li>
<li><strong><spring:message code="CREATION_TIME"/>:</strong> ${mindmap.creationTime}</li>
<li><strong><spring:message code="LAST_UPDATE"/>:</strong> ${mindmap.lastEditTime}</li>
<li><strong><spring:message code="LAST_UPDATE_BY"/>:</strong> ${mindmap.lastEditor}</li>

View File

@@ -25,12 +25,12 @@
</div>
</c:if>
<div id="zoom" class="buttonContainer">
<div id="zoomIn" class="buttonOn">
<img src="images/zoom-in.png"/>
</div>
<div id="zoomOut" class="buttonOn">
<img src="images/zoom-out.png"/>
</div>
<div id="zoomIn" class="buttonOn">
<img src="images/zoom-in.png"/>
</div>
</div>
<c:if test="${!readOnlyMode}">
<div id="node" class="buttonContainer">

View File

@@ -109,8 +109,8 @@
<div id="footerLogo"></div>
</a>
<div id="zoomIn" class="button"></div>
<div id="zoomOut" class="button"></div>
<div id="zoomIn" class="button"></div>
<div id="mapDetails">
<span class="title"><spring:message code="CREATOR"/>:</span><span>${mindmap.creator.fullName}</span>

View File

@@ -0,0 +1,206 @@
<%@page pageEncoding="UTF-8" %>
<%@include file="/jsp/init.jsp" %>
<div>
<h1>
Terms and Conditions
</h1>
<p>
By using WiseMapping.com, you are agreeing to be bound by the following terms and conditions (Terms of
Service).<br/>
WiseMapping reserves the right to update and change the Terms of Service from time to time. WiseMapping will
notify
its users by email when the terms of service change. All features on this site, including features introduced
after
the effective date of this document is covered by this Terms of Service.
</p>
<h2>Terms</h2>
<p>
<ol>
<li>Your use of the Service is at your sole risk. The service is provided on an as is and as available basis.
</li>
<li>You must not modify, adapt or crack/hack the Service or modify another website so as to falsely imply that
it is associated with the Service, WiseMapping, or any other WiseMapping service.
</li>
<li>You warant that you are of legal age at the time of registration.</li>
<li>Accounts can be created and used by humans only. No robots or other automated methods can be used to sign up
or use this site.
</li>
<li>You are responsible for maintaining the security of your account and password. WiseMapping cannot and will
not be liable for any loss or damage from your failure to comply with this security obligation.
</li>
<li>You are responsible for all Content posted and activity that occurs under your account.</li>
<li>One person or legal entity may not maintain more than one free account.</li>
<li>You may not use the Service for any illegal or unauthorized purpose. You must not, in the use of the
Service, violate any laws in your jurisdiction (including but not limited to copyright laws).
</li>
<li>You may not sell, trade, resell, or otherwise exploit for any unauthorized commercial purpose or transfer
any WiseMapping account.
</li>
</ol>
<br/>
Violation of any of these agreements will result in the termination of your Account. While WiseMapping prohibits
such conduct and Content on the Service, you understand and agree that WiseMapping cannot be responsible for the
Content posted using WiseMapping.com and you nonetheless may be exposed to such materials. You agree to use the
Service at your own risk.
<h2>Copyright and Content Ownership</h2>
<p>
<ol>
<li>You may not send, upload, post to blog, distribute or disseminate or offer to do the same with respect to
any unlawful, defamatory, harassing, abusive, fraudulent, infringing, obscene, or otherwise objectionable
content.
</li>
<li>We claim no intellectual property rights over the material, including any text, data, information, images,
photographs, music, sound, video, or other material, that you upload, transmit or store in your Service
account.
</li>
<li>We will not use any of your content for any purpose except to provide you with the Service, and as otherwise
provided in these Terms.
</li>
<li>Don't upload or make available any Content that infringes upon any other proprietary rights of anyone else.
</li>
<li>We may, but have no obligation to, remove or refuse to distribute any content on the Service, such as
content, which violates these Terms.
</li>
</ol>
<h2>publishing and Shareing Content</h2>
<p>
The user has the right to publicize or not to publicize their own contents. By publicizing the Contents, the
user
acknowledges and agrees that anyone using this Web site can and may use the Contents without restrictions.
From time to time, publicized Contents can be used by WiseMapping at its own discretion.<br/>
In addition, the user can allow a specified user to access and collaborate on user-created Contents. WiseMapping
is
not responsible for any problems arising from users sharing or publishing Contents.
</p>
<h2>WiseMapping Brand</h2>
<p>
Mind Maps® is a registered trade-mark of The Buzan Organisation, Ltd. in the UK and the USA.<br/>
WiseMapping uses the FamFam Silk Icon library licensed under the Creative Commons Attribution 2.5 license.<br/>
</p>
<h2>Termination</h2>
<p>
WiseMapping, in its sole discretion, has the right to suspend or terminate your account and refuse any and all
current or future use of the Service, or any other WiseMapping service, for any reason at any time. Such
termination
of the Service will result in the deactivation or deletion of your Account or your access to your Account, and
the
forfeiture and relinquishment of all Content in your Account. WiseMapping reserves the right to refuse service to
anyone for any reason at any time.
</p>
<h2>Modifications to the Service and Prices</h2>
<p>
<ol>
<li>WiseMapping reserves the right at any time and from time to time to modify or discontinue, temporarily or
permanently, the Service (or any part thereof) with or without notice.
<li>WiseMapping.com is provided to you FREE.
<li>WiseMapping shall not be liable to you or to any third party for any modification, price change, suspension
or discontinuance of the Service.
</ol>
<h2>Links To Thirdparty Sites</h2>
<p>Some links on WiseMapping's website will let you leave WiseMapping site. The linked sites or documents are not
under
the control of WiseMapping and is not responsible for the contens of any linked site or any link contained in a
linked site, or any changes or updates to such sites. WiseMapping is not responsible for webcasting or any other
form of transmission received from any linked site. WiseMapping is providing these links to you only as a
convenience, and the inclusion of any linkds does not imply endorsement by WiseMapping of the site</p>
<h2>Account Inactivity</h2>
<p>WiseMapping reserves the right to terminate your account if you fail to login to your account for a period of
nine
months. If an account has been deactivated for inactivity, any email address provided by WiseMapping and
associated
with that account might be given to another user without notice to you or such other party.</p>
<h2>General Conditions</h2>
<p>
<ol>
<li>Verbal, physical, written or other abuse (including threats of abuse or retribution) of any WiseMapping
customer, employee, member, or officer will result in immediate account termination.
</li>
<li>You understand that the technical processing and transmission of the Service, including your Content, may be
transfered unencrypted and involve (a) transmissions over various networks; and (b) changes to conform and
adapt to technical requirements of connecting networks or devices.
</li>
<li>You must not transmit any worms or viruses or any code of a destructive nature.</li>
<li>WiseMapping does not warrant that (i) the service will meet your specific requirements, (ii) the service
will be uninterrupted, timely, secure, or error-free, (iii) the quality of any products, services,
information, or other material purchased or obtained by you through the service will meet your expectations,
and (iv) any errors in the Service will be corrected.
</li>
<li>You expressly understand and agree that WiseMapping shall not be liable for any direct, indirect,
incidental, special, consequential or exemplary damages, including but not limited to, damages for loss of
profits, goodwill, use, data or other intangible losses (even if WiseMapping has been advised of the
possibility of such damages), resulting from: (i) the use or the inability to use the service; (ii)
unauthorized access to or alteration of your transmissions or data; (iii) statements or conduct of any third
party on the service; (iv) termination of your account; or (v) any other matter relating to the service.
</li>
<li>The failure of WiseMapping to exercise or enforce any right or provision of the Terms of Service shall not
constitute a waiver of such right or provision. The Terms of Service constitutes the entire agreement
between you and WiseMapping and govern your use of the Service, superceding any prior agreements between you
and WiseMapping (including, but not limited to, any prior versions of the Terms of Service).
</li>
<li>Questions about the Terms of Service should be sent to support@wisemapping.com.</li>
</ol>
<h2>Personal Information</h2>
<p>
<ul>
<li>Account activity. You need to create an account in order tu use WiseMapping Services. WiseMapping asks for
some personal information when you create an Account, including your email address and a password, which is
used to protect your account from unauthorized access. WiseMapping automatically record certain information
about your use of it's Services. Similar to other web services, WiseMapping records information such as
account activity (e.g., storage usage, number of log-ins, actions taken), data displayed or clicked on
(e.g., UI elements, links), and other log information (e.g., browser type, IP address, date and time of
access, cookie ID, referrer URL).
</li>
<li>Content. WiseMapping stores, processes and maintains your documents and previous versions of those documents
in order to provide the service to you.
</li>
</ul>
</p>
<h2>Uses</h2>
<p>
<ul>
<li>We use this information internally to deliver the best possible service to you, such as improving the
WiseMapping user interface and maintaining a consistent and reliable user experience.
</li>
<li>Files you create with WiseMapping may, if you choose, be read, copied, used and redistributed by people you
know or, again if you choose, by people you do not know.
</li>
</ul>
<h2>Intellectual Property</h2>
<p>Our Terms and Conditions recognizes your right to retain full intellectual property protection for the digital
content you create.</p>
<h2>Your choices</h2>
<ul>
<li>You may terminate your use of WiseMapping at any time.</li>
<li>You may permanently delete any files you create in WiseMapping. Because of the way we maintain this service,
residual copies of your files and other information associated with your account may remain on our servers for
some weeks.
</li>
</ul>
</div>

View File

@@ -13,11 +13,6 @@
<form:input path="email" id="email" type="email" required="required"/>
<form:errors path="email" cssClass="errorMsg"/>
<label for="username"> <spring:message code="USERNAME"/></label>
<form:input path="username" id="username" required="required"/>
<form:errors path="username" cssClass="errorMsg"/>
<label for="firstname"><spring:message code="FIRSTNAME"/></label>
<form:input path="firstname" id="firstname" required="required"/>
<form:errors path="firstname" cssClass="errorMsg"/>
@@ -44,7 +39,7 @@
<div>
<p>
<spring:message code="TERM_OF_THE_SERVICE"/>
<spring:message code="WISEMAPPING_ACCOUNT_MESSAGE"/> <a href="c/termsOfUse"><spring:message
<spring:message code="WISEMAPPING_ACCOUNT_MESSAGE"/> <a href="c/termsOfUse" target="_blank"><spring:message
code="HERE"/></a>.
<spring:message code="REGISTRATION_CLICK_ADVICE"/>
</p>

View File

@@ -22,7 +22,7 @@ public class JsonTest {
String json2 = "{\"title\":\"some title\",\"description\":\"description here\"}";
mapper.readValue(json2, RestMindmap.class);
String userJson = "{\"username\":\"admin\",\"email\":\"admin@wisemapping.org\",\"tags\":[],\"creationDate\":1329706800000,\"firstname\":\"Wise\",\"lastname\":\"test\",\"password\":\"test\"}";
String userJson = "{\"email\":\"admin@wisemapping.org\",\"tags\":[],\"creationDate\":1329706800000,\"firstname\":\"Wise\",\"lastname\":\"test\",\"password\":\"test\"}";
final RestUser restUser = mapper.readValue(userJson, RestUser.class);
}

View File

@@ -75,25 +75,6 @@ public class RestAdminITCase {
}
}
@Test(dataProvider = "ContentType-Provider-Function")
public void findUserByUsername(final @NotNull MediaType mediaType) { // Configure media types ...
final HttpHeaders requestHeaders = createHeaders(mediaType);
final RestTemplate templateRest = createTemplate();
final RestUser restUser = createDummyUser();
// User has been created ...
createUser(requestHeaders, templateRest, restUser);
// Check that the user has been created ...
HttpEntity<RestUser> findUserEntity = new HttpEntity<RestUser>(requestHeaders);
final ResponseEntity<RestUser> responseEntity = templateRest.exchange(BASE_REST_URL + "/admin/users/username/" + restUser.getUsername(), HttpMethod.GET, findUserEntity, RestUser.class);
assertEquals(responseEntity.getBody().getUsername(), restUser.getUsername());
}
public String createNewUser(final @NotNull MediaType mediaType) {
// Configure media types ...
@@ -172,7 +153,6 @@ public class RestAdminITCase {
final String username = "foo-to-delete" + System.nanoTime();
final String email = username + "@example.org";
restUser.setEmail(email);
restUser.setUsername(username);
restUser.setFirstname("foo first name");
restUser.setLastname("foo last name");
restUser.setPassword("admin");

View File

@@ -6,13 +6,12 @@ creation_date date);
CREATE TABLE USER (
id INTEGER NOT NULL IDENTITY,
colaborator_id INTEGER NOT NULL,
username varchar(255) NOT NULL,
firstname varchar(255) NOT NULL,
lastname varchar(255) NOT NULL,
password varchar(255) NOT NULL,
activationCode BIGINT NOT NULL,
activation_code BIGINT NOT NULL,
activation_date DATE,
allowSendEmail CHAR(1) NOT NULL,
allow_send_email CHAR(1) NOT NULL,
locale varchar(5),
FOREIGN KEY(colaborator_id) REFERENCES COLLABORATOR(id)
);
@@ -27,7 +26,7 @@ creation_date DATETIME,
edition_date DATETIME,
creator_id INTEGER NOT NULL,
tags varchar(1014) ,
last_editor varchar(255) ,
last_editor_id INTEGER NOT NULL
--FOREIGN KEY(creator_id) REFERENCES USER(colaborator_id)
);
@@ -36,7 +35,8 @@ CREATE TABLE MINDMAP_HISTORY
xml LONGVARBINARY NOT NULL,
mindmap_id INTEGER NOT NULL,
creation_date DATETIME,
creator_user varchar(255));
editor_id INTEGER NOT NULL,
FOREIGN KEY(mindmap_id) REFERENCES MINDMAP(id));
CREATE TABLE COLLABORATION_PROPERTIES
(id INTEGER NOT NULL IDENTITY,
@@ -66,8 +66,7 @@ user_id INTEGER NOT NULL,
CREATE TABLE ACCESS_AUDITORY (
id INTEGER NOT NULL IDENTITY,
user_id INTEGER NOT NULL,
login_date date,
--FOREIGN KEY(user_id) REFERENCES USER(id) // Temporally disabled. Exception during first login. Need review..
login_date date
);
COMMIT;

View File

@@ -1,10 +1,10 @@
INSERT INTO COLLABORATOR(id,email,creation_date) values (1,'test@wisemapping.org',CURDATE());
INSERT INTO USER (colaborator_id,username,firstname, lastname, password, activationCode,activation_date,allowSendEmail)
values(1,'wise-test','Test','User', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3',1237,CURDATE(),1);
INSERT INTO USER (colaborator_id,firstname, lastname, password, activation_code,activation_date,allow_send_email)
values(1,'Test','User', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3',1237,CURDATE(),1);
INSERT INTO COLLABORATOR(id,email,creation_date) values (2,'admin@wisemapping.org',CURDATE());
INSERT INTO USER (colaborator_id,username,firstname, lastname, password, activationCode,activation_date,allowSendEmail)
values(2,'wise-admin','Admin','User', 'admin',1237,CURDATE(),1);
INSERT INTO USER (colaborator_id,firstname, lastname, password, activation_code,activation_date,allow_send_email)
values(2,'Admin','User', 'admin',1237,CURDATE(),1);
COMMIT;

View File

@@ -7,13 +7,12 @@ creation_date date
CREATE TABLE USER (
id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
colaborator_id INTEGER NOT NULL,
username varchar(255) CHARACTER SET utf8 NOT NULL,
firstname varchar(255) CHARACTER SET utf8 NOT NULL,
lastname varchar(255) CHARACTER SET utf8 NOT NULL,
password varchar(255) CHARACTER SET utf8 NOT NULL,
activationCode BIGINT(20) NOT NULL,
activation_code BIGINT(20) NOT NULL,
activation_date date,
allowSendEmail char(1) CHARACTER SET utf8 NOT NULL default 0,
allow_send_email char(1) CHARACTER SET utf8 NOT NULL default 0,
locale varchar(5),
FOREIGN KEY(colaborator_id) REFERENCES COLLABORATOR(id) ON DELETE CASCADE ON UPDATE NO ACTION
) CHARACTER SET utf8 ;
@@ -28,7 +27,7 @@ creation_date datetime,
edition_date datetime,
creator_id INTEGER not null,
tags varchar(1014) CHARACTER SET utf8 ,
last_editor varchar(255) CHARACTER SET utf8 ,
last_editor_id INTEGER NOT NULL,
FOREIGN KEY(creator_id) REFERENCES USER(colaborator_id) ON DELETE CASCADE ON UPDATE NO ACTION
) CHARACTER SET utf8 ;
@@ -38,7 +37,8 @@ CREATE TABLE MINDMAP_HISTORY
xml blob NOT NULL,
mindmap_id INTEGER NOT NULL,
creation_date datetime,
creator_user varchar(255) CHARACTER SET utf8
editor_id INTEGER NOT NULL,
FOREIGN KEY(mindmap_id) REFERENCES MINDMAP(id) ON DELETE CASCADE ON UPDATE NO ACTION
) CHARACTER SET utf8 ;
CREATE TABLE COLLABORATION_PROPERTIES(
@@ -68,8 +68,7 @@ FOREIGN KEY(user_id) REFERENCES USER(colaborator_id) ON DELETE CASCADE ON UPDATE
CREATE TABLE ACCESS_AUDITORY (
id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
login_date date,
user_id INTEGER NOT NULL,
FOREIGN KEY(user_id) REFERENCES USER(id) ON DELETE CASCADE ON UPDATE NO ACTION
user_id INTEGER NOT NULL
) CHARACTER SET utf8 ;
COMMIT;

View File

@@ -1,10 +1,10 @@
INSERT INTO COLLABORATOR(id,email,creation_date) values (1,'test@wisemapping.org',CURRENT_DATE());
INSERT INTO USER (colaborator_id,username,firstname, lastname, password, activationCode,activation_date,allowSendEmail)
values(1,'wise-test','Test','User', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3',1237,CURRENT_DATE(),1);
INSERT INTO USER (colaborator_id,firstname, lastname, password, activation_code,activation_date,allow_send_email)
values(1,'Test','User', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3',1237,CURRENT_DATE(),1);
INSERT INTO COLLABORATOR(id,email,creation_date) values (2,'admin@wisemapping.org',CURRENT_DATE());
INSERT INTO USER (colaborator_id,username,firstname, lastname, password, activationCode,activation_date,allowSendEmail)
values(2,'wise-admin','Admin','User', 'admin',1237,CURRENT_DATE(),1);
INSERT INTO USER (colaborator_id,firstname, lastname, password, activation_code,activation_date,allow_send_email)
values(2,'Admin','User', 'admin',1237,CURRENT_DATE(),1);
COMMIT;

View File

@@ -30,9 +30,15 @@ ALTER TABLE ACCESS_AUDITORY
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 `wisemapping`.`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 NULL AFTER `tags` ;
ALTER TABLE `wisemapping2`.`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`.`collaborator` (`id`, `email`, `creation_date`) VALUES (8081, 'fake@wisemapping.com', '2007-10-09');
# DELETE FROM `wisemapping`.`USER` where activation_date is null;
# DROP TABLE FEEDBACK;