From 4f95ad04caca5f88b9c1ec44fe7d23ca7a3650a8 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Tue, 29 May 2012 22:36:32 -0300 Subject: [PATCH] - Add support for starred. - Remove tags temporally. --- .../exporter/FreemindExporter.java | 4 +- .../importer/freemind/FreemindImporter.java | 4 +- .../model/CollaboratorProperties.java | 69 ++++++++++++++++++ .../java/com/wisemapping/model/MindMap.java | 43 ++++++++++- .../com/wisemapping/model/ShapeStyle.java | 6 +- .../wisemapping/rest/MindmapController.java | 41 +++++++++-- .../com/wisemapping/rest/MindmapFilter.java | 27 ++++++- .../wisemapping/rest/model/RestMindmap.java | 22 +++++- .../rest/model/RestMindmapInfo.java | 17 ++++- .../rest/model/RestMindmapList.java | 7 +- .../model/CollaboratorProperties.hbm.xml | 29 ++++++++ .../com/wisemapping/model/MindMap.hbm.xml | 9 ++- .../com/wisemapping/model/MindmapUser.hbm.xml | 2 +- .../webapp/WEB-INF/classes/log4j.properties | 3 + .../main/webapp/WEB-INF/wisemapping-dao.xml | 1 + .../webapp/WEB-INF/wisemapping-servlet.xml | 15 ---- wise-webapp/src/main/webapp/css/mymaps.less | 24 ++++++ .../src/main/webapp/images/back_disabled.jpg | Bin 612 -> 0 bytes .../src/main/webapp/images/back_enabled.jpg | Bin 807 -> 0 bytes .../main/webapp/images/forward_disabled.jpg | Bin 635 -> 0 bytes .../main/webapp/images/forward_enabled.jpg | Bin 852 -> 0 bytes .../src/main/webapp/images/icon_list.png | Bin 4556 -> 0 bytes .../images/icon_triangle_grey_12x13.gif | Bin 192 -> 0 bytes .../src/main/webapp/images/star-off-hover.png | Bin 0 -> 367 bytes .../src/main/webapp/images/star-off.png | Bin 0 -> 294 bytes .../src/main/webapp/images/star-on-hover.png | Bin 0 -> 490 bytes .../src/main/webapp/images/star-on.png | Bin 0 -> 315 bytes wise-webapp/src/main/webapp/js/mymaps.js | 53 +++++++++++++- .../src/main/webapp/jsp/mindmapList.jsp | 23 +++--- wise-webapp/src/main/webapp/jsp/toolbar.jsf | 5 +- .../src/test/sql/hsql/create-schemas.sql | 23 ++++-- .../src/test/sql/mysql/create-schemas.sql | 13 +++- 32 files changed, 368 insertions(+), 72 deletions(-) create mode 100644 wise-webapp/src/main/java/com/wisemapping/model/CollaboratorProperties.java create mode 100644 wise-webapp/src/main/resources/com/wisemapping/model/CollaboratorProperties.hbm.xml delete mode 100644 wise-webapp/src/main/webapp/images/back_disabled.jpg delete mode 100644 wise-webapp/src/main/webapp/images/back_enabled.jpg delete mode 100644 wise-webapp/src/main/webapp/images/forward_disabled.jpg delete mode 100644 wise-webapp/src/main/webapp/images/forward_enabled.jpg delete mode 100644 wise-webapp/src/main/webapp/images/icon_list.png delete mode 100644 wise-webapp/src/main/webapp/images/icon_triangle_grey_12x13.gif create mode 100644 wise-webapp/src/main/webapp/images/star-off-hover.png create mode 100644 wise-webapp/src/main/webapp/images/star-off.png create mode 100644 wise-webapp/src/main/webapp/images/star-on-hover.png create mode 100644 wise-webapp/src/main/webapp/images/star-on.png diff --git a/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java b/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java index dae68cce..96e0d3d3 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java +++ b/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java @@ -140,10 +140,10 @@ public class FreemindExporter final String shape = mindmapTopic.getShape(); if (shape != null && !shape.isEmpty()) { - if (isRoot && !ShapeStyle.ROUNDED_RETAGLE.getStyle().endsWith(shape) || !isRoot && !ShapeStyle.LINE.getStyle().endsWith(shape)) { + if (isRoot && !ShapeStyle.ROUNDED_RECTANGLE.getStyle().endsWith(shape) || !isRoot && !ShapeStyle.LINE.getStyle().endsWith(shape)) { String style = shape; - if (ShapeStyle.ROUNDED_RETAGLE.getStyle().equals(shape)) { + if (ShapeStyle.ROUNDED_RECTANGLE.getStyle().equals(shape)) { style = "bubble"; } freemindNode.setSTYLE(style); diff --git a/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java b/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java index 43fafb87..fb6a8dbb 100755 --- a/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java +++ b/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java @@ -128,7 +128,7 @@ public class FreemindImporter convertNodeProperties(freeNode, wiseTopic); - wiseTopic.setShape(ShapeStyle.ROUNDED_RETAGLE.getStyle()); + wiseTopic.setShape(ShapeStyle.ROUNDED_RECTANGLE.getStyle()); mindmapMap.getTopic().add(wiseTopic); mindmapMap.setName(mapName); @@ -631,7 +631,7 @@ public class FreemindImporter String result = node.getSTYLE(); // In freemind a node without style is a line if ("bubble".equals(result)) { - result = ShapeStyle.ROUNDED_RETAGLE.getStyle(); + result = ShapeStyle.ROUNDED_RECTANGLE.getStyle(); } else { result = ShapeStyle.LINE.getStyle(); } diff --git a/wise-webapp/src/main/java/com/wisemapping/model/CollaboratorProperties.java b/wise-webapp/src/main/java/com/wisemapping/model/CollaboratorProperties.java new file mode 100644 index 00000000..1326ce11 --- /dev/null +++ b/wise-webapp/src/main/java/com/wisemapping/model/CollaboratorProperties.java @@ -0,0 +1,69 @@ +/* +* Copyright [2011] [wisemapping] +* +* Licensed under WiseMapping Public License, Version 1.0 (the "License"). +* It is basically the Apache License, Version 2.0 (the "License") plus the +* "powered by wisemapping" text requirement on every single page; +* you may not use this file except in compliance with the License. +* You may obtain a copy of the license at +* +* http://www.wisemapping.org/license +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package com.wisemapping.model; + +import org.jetbrains.annotations.NotNull; + +public class CollaboratorProperties { + private long id; + private boolean starred; + private Collaborator collaborator; + private MindMap mindmap; + + + public CollaboratorProperties(@NotNull Collaborator collaborator, @NotNull MindMap mindmap) { + this.collaborator = collaborator; + this.mindmap = mindmap; + } + + public CollaboratorProperties(){ + + } + + public boolean getStarred() { + return starred; + } + + public void setStarred(boolean starred) { + this.starred = starred; + } + public Collaborator getCollaborator() { + return collaborator; + } + + public void setCollaborator(Collaborator collaborator) { + this.collaborator = collaborator; + } + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public MindMap getMindmap() { + return mindmap; + } + + public void setMindmap(@NotNull MindMap mindmap) { + this.mindmap = mindmap; + } +} diff --git a/wise-webapp/src/main/java/com/wisemapping/model/MindMap.java b/wise-webapp/src/main/java/com/wisemapping/model/MindMap.java index 93a8c278..a149f176 100644 --- a/wise-webapp/src/main/java/com/wisemapping/model/MindMap.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/MindMap.java @@ -19,7 +19,6 @@ package com.wisemapping.model; import com.wisemapping.util.ZipUtils; -import org.apache.log4j.Logger; import org.jetbrains.annotations.NotNull; import java.io.IOException; @@ -33,17 +32,18 @@ public class MindMap { private static final String UTF_8 = "UTF-8"; //~ Instance fields ...................................................................................... - + private int id; private Calendar creationTime; private String creator; private String description; - private int id; private boolean isPublic; private Calendar lastModificationTime; private String lastModifierUser; private Set mindmapUsers = new HashSet(); + private Set collaboratorProperties = new HashSet(); + private User owner; private String properties; private String tags; @@ -86,7 +86,7 @@ public class MindMap { throws IOException { byte[] result = this.xml; if (result != null) { - result = ZipUtils.stringToZip(new String(result, UTF_8)); + result = ZipUtils.stringToZip(new String(result, UTF_8)); } return result; } @@ -219,6 +219,41 @@ public class MindMap { return owner; } + public Set getCollaboratorProperties() { + return collaboratorProperties; + } + + public void setCollaboratorProperties(@NotNull Set collaboratorProperties) { + this.collaboratorProperties = collaboratorProperties; + } + + private CollaboratorProperties findUserProperty(@NotNull Collaborator collaborator) { + final Set collaboratorProperties = this.getCollaboratorProperties(); + CollaboratorProperties result = null; + for (CollaboratorProperties collaboratorProperty : collaboratorProperties) { + final Collaborator propCollab = collaboratorProperty.getCollaborator(); + if (propCollab != null && propCollab.getEmail().equals(collaborator.getEmail())) { + result = collaboratorProperty; + break; + } + } + return result; + } + + public void setStarred(@NotNull Collaborator collaborator, boolean value) { + CollaboratorProperties collaboratorProperties = this.findUserProperty(collaborator); + if (collaboratorProperties == null) { + collaboratorProperties = new CollaboratorProperties(collaborator, this); + } + collaboratorProperties.setStarred(value); + this.getCollaboratorProperties().add(collaboratorProperties); + } + + public boolean isStarred(@NotNull Collaborator collaborator) { + final CollaboratorProperties collaboratorProperty = this.findUserProperty(collaborator); + return collaboratorProperty != null && collaboratorProperty.getStarred(); + } + public static String getDefaultMindmapXml(@NotNull final String title) { final StringBuilder result = new StringBuilder(); diff --git a/wise-webapp/src/main/java/com/wisemapping/model/ShapeStyle.java b/wise-webapp/src/main/java/com/wisemapping/model/ShapeStyle.java index b8f26e05..3f84dfaf 100755 --- a/wise-webapp/src/main/java/com/wisemapping/model/ShapeStyle.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/ShapeStyle.java @@ -21,9 +21,9 @@ package com.wisemapping.model; public enum ShapeStyle { LINE("line"), - ROUNDED_RETAGLE("rounded rectagle"), - RECTAGLE("rectagle"), - ELIPSE("elipse"); + ROUNDED_RECTANGLE("rounded rectagle"), + RECTANGLE("rectagle"), + ELLIPSE("elipse"); private String style; diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java index 2d2012c6..0b7fa7b5 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java @@ -1,3 +1,21 @@ +/* +* Copyright [2011] [wisemapping] +* +* Licensed under WiseMapping Public License, Version 1.0 (the "License"). +* It is basically the Apache License, Version 2.0 (the "License") plus the +* "powered by wisemapping" text requirement on every single page; +* you may not use this file except in compliance with the License. +* You may obtain a copy of the license at +* +* http://www.wisemapping.org/license +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + package com.wisemapping.rest; @@ -35,8 +53,9 @@ public class MindmapController extends BaseController { @RequestMapping(method = RequestMethod.GET, value = "/maps/{id}", produces = {"application/json", "text/html", "application/xml"}) @ResponseBody public ModelAndView getMindmap(@PathVariable int id) throws IOException { + final User user = com.wisemapping.security.Utils.getUser(); final MindMap mindMap = mindmapService.getMindmapById(id); - final RestMindmap map = new RestMindmap(mindMap); + final RestMindmap map = new RestMindmap(mindMap, user); return new ModelAndView("mapView", "map", map); } @@ -54,7 +73,7 @@ public class MindmapController extends BaseController { mindmaps.add(mindmap); } } - final RestMindmapList restMindmapList = new RestMindmapList(mindmaps); + final RestMindmapList restMindmapList = new RestMindmapList(mindmaps, user); return new ModelAndView("mapsView", "list", restMindmapList); } @@ -137,7 +156,7 @@ public class MindmapController extends BaseController { @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/title", consumes = {"text/plain"}, produces = {"application/json", "text/html", "application/xml"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) - public void changeMapTitle(@RequestBody String title, @PathVariable int id) throws WiseMappingException { + public void updateMapTitle(@RequestBody String title, @PathVariable int id) throws WiseMappingException { final MindMap mindMap = mindmapService.getMindmapById(id); final User user = Utils.getUser(); @@ -156,7 +175,7 @@ public class MindmapController extends BaseController { @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/description", consumes = {"text/plain"}, produces = {"application/json", "text/html", "application/xml"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) - public void changeMapDescription(@RequestBody String description, @PathVariable int id) throws WiseMappingException { + public void updateMapDescription(@RequestBody String description, @PathVariable int id) throws WiseMappingException { final MindMap mindMap = mindmapService.getMindmapById(id); final User user = Utils.getUser(); @@ -169,7 +188,7 @@ public class MindmapController extends BaseController { @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/publish", consumes = {"text/plain"}, produces = {"application/json", "text/html", "application/xml"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) - public void changeMapPublish(@RequestBody String value, @PathVariable int id) throws WiseMappingException { + public void updatePublishState(@RequestBody String value, @PathVariable int id) throws WiseMappingException { final MindMap mindMap = mindmapService.getMindmapById(id); final User user = Utils.getUser(); @@ -184,6 +203,18 @@ public class MindmapController extends BaseController { } + @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/starred", consumes = {"text/plain"}, produces = {"application/json", "text/html", "application/xml"}) + @ResponseStatus(value = HttpStatus.NO_CONTENT) + public void updateStarredState(@RequestBody String value, @PathVariable int id) throws WiseMappingException { + + final MindMap mindMap = mindmapService.getMindmapById(id); + final User user = Utils.getUser(); + + // Update map status ... + mindMap.setStarred(user, Boolean.parseBoolean(value)); + updateMindmap(true, mindMap, user); + } + @RequestMapping(method = RequestMethod.DELETE, value = "/maps/{id}") @ResponseStatus(value = HttpStatus.NO_CONTENT) public void updateMap(@PathVariable int id) throws IOException, WiseMappingException { diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapFilter.java b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapFilter.java index 435a3ab1..be6b53d0 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapFilter.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapFilter.java @@ -1,5 +1,24 @@ -package com.wisemapping.rest; +/* +* Copyright [2011] [wisemapping] +* +* Licensed under WiseMapping Public License, Version 1.0 (the "License"). +* It is basically the Apache License, Version 2.0 (the "License") plus the +* "powered by wisemapping" text requirement on every single page; +* you may not use this file except in compliance with the License. +* You may obtain a copy of the license at +* +* http://www.wisemapping.org/license +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wisemapping.rest; import com.wisemapping.model.MindMap; import com.wisemapping.model.User; @@ -20,6 +39,12 @@ public enum MindmapFilter { return mindmap.getOwner().equals(user); } }, + STARRED("starred") { + @Override + boolean accept(@NotNull MindMap mindmap, @NotNull User user) { + return mindmap.isStarred(user); + } + }, SHARED_WITH_ME("shared_with_me") { @Override boolean accept(@NotNull MindMap mindmap, @NotNull User user) { diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmap.java b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmap.java index dfb06625..9f24595f 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmap.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmap.java @@ -1,10 +1,10 @@ package com.wisemapping.rest.model; +import com.wisemapping.model.Collaborator; import com.wisemapping.model.MindMap; import com.wisemapping.model.User; import org.codehaus.jackson.annotate.*; -import org.codehaus.jackson.map.annotate.JsonSerialize; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -27,7 +27,8 @@ import java.util.TimeZone; ) @JsonIgnoreProperties(ignoreUnknown = true) public class RestMindmap { - + @JsonIgnore + private Collaborator collaborator; @JsonIgnore private MindMap mindmap; @JsonIgnore @@ -39,12 +40,13 @@ public class RestMindmap { } public RestMindmap() { - this(new MindMap()); + this(new MindMap(), null); } - public RestMindmap(@NotNull MindMap mindmap) { + public RestMindmap(@NotNull MindMap mindmap, @NotNull Collaborator collaborator) { this.mindmap = mindmap; + this.collaborator = collaborator; } public String getCreationTime() { @@ -147,6 +149,18 @@ public class RestMindmap { return mindmap.getProperties(); } + public boolean getStarred() { + boolean result = false; + if (collaborator != null) { + result = mindmap.isStarred(collaborator); + } + return result; + } + + public void setStarred(boolean value) { + mindmap.setStarred(collaborator, value); + } + @JsonIgnore public MindMap getDelegated() { return this.mindmap; diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapInfo.java b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapInfo.java index ec7ab603..ee8a741a 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapInfo.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapInfo.java @@ -1,6 +1,7 @@ package com.wisemapping.rest.model; +import com.wisemapping.model.Collaborator; import com.wisemapping.model.MindMap; import com.wisemapping.model.User; import org.codehaus.jackson.annotate.*; @@ -10,7 +11,6 @@ import org.jetbrains.annotations.Nullable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; -import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; @@ -29,6 +29,7 @@ public class RestMindmapInfo { @JsonIgnore private MindMap mindmap; + private Collaborator collaborator; @JsonIgnore static private SimpleDateFormat sdf; @@ -38,12 +39,13 @@ public class RestMindmapInfo { } public RestMindmapInfo() { - this(new MindMap()); + this(new MindMap(), null); } - public RestMindmapInfo(@NotNull MindMap mindmap) { + public RestMindmapInfo(@NotNull MindMap mindmap, @Nullable Collaborator collaborator) { this.mindmap = mindmap; + this.collaborator = collaborator; } public String getCreationTime() { @@ -93,7 +95,14 @@ public class RestMindmapInfo { } public void setId(int id) { - mindmap.setId(id); + } + + public boolean getStarred() { + return mindmap.isStarred(collaborator); + } + + public void setStarred(int value) { + } public void setTitle(String title) { diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapList.java b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapList.java index 6f3fc348..438f4f2e 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapList.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmapList.java @@ -1,6 +1,7 @@ package com.wisemapping.rest.model; +import com.wisemapping.model.Collaborator; import com.wisemapping.model.MindMap; import org.codehaus.jackson.annotate.JsonAutoDetect; import org.jetbrains.annotations.NotNull; @@ -25,13 +26,13 @@ public class RestMindmapList { private List mindmapsInfo; public RestMindmapList() { - this(Collections.emptyList()); + this(Collections.emptyList(), null); } - public RestMindmapList(@NotNull List mindmaps) { + public RestMindmapList(@NotNull List mindmaps, @NotNull Collaborator collaborator) { this.mindmapsInfo = new ArrayList(); for (MindMap mindMap : mindmaps) { - this.mindmapsInfo.add(new RestMindmapInfo(mindMap)); + this.mindmapsInfo.add(new RestMindmapInfo(mindMap, collaborator)); } } diff --git a/wise-webapp/src/main/resources/com/wisemapping/model/CollaboratorProperties.hbm.xml b/wise-webapp/src/main/resources/com/wisemapping/model/CollaboratorProperties.hbm.xml new file mode 100644 index 00000000..5ed22664 --- /dev/null +++ b/wise-webapp/src/main/resources/com/wisemapping/model/CollaboratorProperties.hbm.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/wise-webapp/src/main/resources/com/wisemapping/model/MindMap.hbm.xml b/wise-webapp/src/main/resources/com/wisemapping/model/MindMap.hbm.xml index 6ccc5a2c..442ed721 100644 --- a/wise-webapp/src/main/resources/com/wisemapping/model/MindMap.hbm.xml +++ b/wise-webapp/src/main/resources/com/wisemapping/model/MindMap.hbm.xml @@ -27,7 +27,14 @@ inverse="true"> - + + + + + + diff --git a/wise-webapp/src/main/resources/com/wisemapping/model/MindmapUser.hbm.xml b/wise-webapp/src/main/resources/com/wisemapping/model/MindmapUser.hbm.xml index aea6b936..7db2c720 100644 --- a/wise-webapp/src/main/resources/com/wisemapping/model/MindmapUser.hbm.xml +++ b/wise-webapp/src/main/resources/com/wisemapping/model/MindmapUser.hbm.xml @@ -17,7 +17,7 @@ column="MINDMAP_ID" not-null="true" class="com.wisemapping.model.MindMap" - /> + /> com/wisemapping/model/Collaborator.hbm.xml com/wisemapping/model/MindMap.hbm.xml com/wisemapping/model/MindmapUser.hbm.xml + com/wisemapping/model/CollaboratorProperties.hbm.xml com/wisemapping/model/UserLogin.hbm.xml com/wisemapping/model/MindMapHistory.hbm.xml diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml index 9f9dc9e0..4f8c6c05 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml @@ -137,20 +137,6 @@ - - - - - - - - - - - - - - @@ -196,7 +182,6 @@ cookerController settingsController editProfileController - tagsController historyController diff --git a/wise-webapp/src/main/webapp/css/mymaps.less b/wise-webapp/src/main/webapp/css/mymaps.less index 999bad7d..1de4082d 100644 --- a/wise-webapp/src/main/webapp/css/mymaps.less +++ b/wise-webapp/src/main/webapp/css/mymaps.less @@ -132,6 +132,10 @@ input#selectAll { /* ----------------------------- Misc ----------------------------------- */ +.messagesPanel { + width: @body-width; +} + .dataTables_empty { text-align: center; } @@ -174,3 +178,23 @@ input#selectAll { margin-right: 2%; margin-top: 80px } + +span.starredOff{ + background: url('../images/star-off.png') no-repeat center left; + padding: 10px; + margin: 0 0px 0 15px; +} + +span.starredOff:hover{ + background: url('../images/star-off-hover.png') no-repeat center left; +} + +span.starredOn{ + background: url('../images/star-on.png') no-repeat center left; + padding: 10px; + margin: 0 0px 0 15px; +} + +span.starredOn:hover{ + background: url('../images/star-on-hover.png') no-repeat center left; +} \ No newline at end of file diff --git a/wise-webapp/src/main/webapp/images/back_disabled.jpg b/wise-webapp/src/main/webapp/images/back_disabled.jpg deleted file mode 100644 index 1e73a546e3609636f9cf4c543c2a4fe4050866c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 612 zcmex=C5UDGKfoZ!!63{a%*-grz$D1XEXer(2tyUn z+02YUSHb}sD?0}l&^EXLguy7lz`(-H!phDIlVN0HVHIR%V-ON%S2Pq6HFFG{Xryc+ zmRQ($@S#&sld*HEn>dFcBLmQ_$YwDLDjGT#PW*q1fd^^;oX+iLI)z|@;wX;U8Xr> zT8Qgxn;R!Cottl}#(8Ri${a3d=J*$R5qBRbK9bRJe*4BYwq9(uIM4mLS9%TSY?*y6 zE==owYH)vf>dq6(Uzum+IyVJqc3N&dRPD57vW(=l(=(DZ-K_!LSx zwPk@>bN@4B-OI9gCf>Wc_;CDAS%c@BJZ}kBlbDz~@y-*&Y^_U+@};q`xNUthN} On^Cj9W}Eu@|2F})$f79# diff --git a/wise-webapp/src/main/webapp/images/back_enabled.jpg b/wise-webapp/src/main/webapp/images/back_enabled.jpg deleted file mode 100644 index a6d764c79c7a2047b6bf65bf9d96fcafd5161e38..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 807 zcmex=C5UDGKfoZ!!63{a%*-grz$D1XEXer(2*U&h z1}0{pBN2d|gO!bok%5r~RhW^Pm5qg+Lx6#Sm5Gs^od+h%$i&RTD#*spplB#0EW!~u z(MZ`u)XXulu<_tSr=TWdXR%Z_aiE1jZ7eM8Fl&IpCkWK1$Y$s$#2&a&N#sM~M5iWU z<^Q)Bc$gW1&SMs2uxGfw`}E06etb^r9k|jMc@Dlk(IlSD-Wwx*G{%4ThHhR%HnTsw zbu3z!=BtbC=-In5f5nt;je{+vrKZdWckk$U`c^FEYC6}Jn=lG)17QB>6z3khm7PHhg<-pEGSO0F>VA}N6`w53!8pr$>MbUW| zMEsFn=(%w+^5v0yp7Lmb+~3PpI4(#G~bQ$y_;t)oo+U5`bnSHZcn){CH~m7Ys2rz z2!R@xgGrCtcPz?eOPOzKr2P26p~(mTGjR1-c3?psA>uUGsyt|R2Ts3~!B zN71DGSrW%W*`w8#2{O$LX)%%8*<4Ycyr;tN(Hm8|M=_HtvR>P P+Rcr(b5Xx$|NkZcT0jT? diff --git a/wise-webapp/src/main/webapp/images/forward_disabled.jpg b/wise-webapp/src/main/webapp/images/forward_disabled.jpg deleted file mode 100644 index 28a9dc53fa232919299ac980dc9b61167c1868bd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 635 zcmex=C5UDGKfoZ!!63{a%*-grz$D1XEXer(2tySE z1JEp>E8&2Nm4%I+g9~UMTnNHo6kuRrVP;|B;)Y2uGBL9Vva&GlzGLeh=CM*_u2I6%$1L~6;-1yGa|?*FvavCW+Av>{Flt>+*?d?iZ`9)^O?_H|D3t8;Og6lD<#WHQvW(mo1ETsD>A@mr8@sqg(?1R z%d@qrmWLWmIn1#pQuo}{brVW*C8t%EDXbOt_DabwXgGW3;wDX1;~7hWrYL+ZX=qre z&-y^2q0zm?-FJb#(AWJTHOJ-3`S`D|JEhzC{KvY_h0kZinXP-?w!g_L@p#JQO^!z$ mYCgVwS7#SryXs@?>&L&t^Z(SozHVt~@Z#>58}s)6zX<@qORf(9 diff --git a/wise-webapp/src/main/webapp/images/forward_enabled.jpg b/wise-webapp/src/main/webapp/images/forward_enabled.jpg deleted file mode 100644 index 598c075f13ab0e4bbe05a4eeea7cf777ba73cf03..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 852 zcmex=C5UDGKfoZ!!63{a%*-grz$D1XEXer(2tywO z0~0eN(3Nn&%Fe>Z!NthH$ciG&$iU3P%Em6hz`z1zu=B#yGcqx=2(q#<2(fb*3M-3< zDh5t8G7&R#Oe}1C=oHjs?40T*F37+LbR`oj+(bq}CT0c}Rz*W0Hg?Cv#)(EB0yioN zi~PUEzyov)lOVGogFVA5dn3uE%Z<*rn&ugY^FIG9<<=87L*?mOy^~u`Rq(Eg+UDw^ z@^Uh}zJ$t~P2YpRT#sm2p`oEt8zJ-EBRfY;>b?DxZo!24Z)Q(O&}!Mbt}27`dKa(x zr)AHkZg5MjKa&4$syaupXWNXgp32dQs_rj-?|M=Q9pN^hZg^mV7=UWs>}D5 z$40(ME7Q1T4h8p}ZJ8O!G-Xk84;P~#ci!&o`A5I3kG@gLm*VlJbn%kvSqIh?3Y?HQ zAX0NL>XIkpf=MN83*!%}9-aN5)p7^py2Am>F9gW&pFSp#V0dxX#ZPW;UoD(gaI@8E z(rNQz1DBIiM13!LtZ|85lHB@$wW~n0fhRz-$?R&m{@z;uI}N|35As;}zdXB<I#+N1k=r*G-&mI78vJ_Ezs!yIV%J}l7d*c9>7Bn;xyLT84V&`$ z@9WMTAJ6DZyR)~=FS6P2e3MDv7lHB>{C&1H^7EJ9PIf=EdUwUYtGE9%$X9(m*ZWLf M_rC2^{;K~s0TRp{r2qf` diff --git a/wise-webapp/src/main/webapp/images/icon_list.png b/wise-webapp/src/main/webapp/images/icon_list.png deleted file mode 100644 index ce13eaf6bdfefb827a77d16af70609bc060a4669..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4556 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 diff --git a/wise-webapp/src/main/webapp/images/icon_triangle_grey_12x13.gif b/wise-webapp/src/main/webapp/images/icon_triangle_grey_12x13.gif deleted file mode 100644 index 0bb01df5f855bf814143f4c4031141975168ff79..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 192 zcmZ?wbhEHbgMgAM}_fb3*owS6GOkdo=dm$)vV zdrj(XGiIIb{k6_#B;HSOf5_gV;^sOtc>)jLWM0OVGc4Y=g+)4FU-e3k?Zy-}HO-o* H0u0sw-nw>@ diff --git a/wise-webapp/src/main/webapp/images/star-off-hover.png b/wise-webapp/src/main/webapp/images/star-off-hover.png new file mode 100644 index 0000000000000000000000000000000000000000..2f904f1b757fdd7bd3358e61f736b54c718af9dc GIT binary patch literal 367 zcmV-#0g(QQP)7&aeH+jHtnENhyT-&zXT6*2Uai65MU?OQP*f;6lFtW$%lCcU?{`#H)r;12 zk9w$=-g#QbehKAtrbN974@*f#38NC+=qr|A}ehFEUi)6`?pSwRS(A{`T=FXbZ$!%*z*7Y N002ovPDHLkV1mwfrcnR@ literal 0 HcmV?d00001 diff --git a/wise-webapp/src/main/webapp/images/star-off.png b/wise-webapp/src/main/webapp/images/star-off.png new file mode 100644 index 0000000000000000000000000000000000000000..6b6aa3e1bcef1c19f28993880e3075001f27631c GIT binary patch literal 294 zcmV+>0oneEP)*G zA-46HCpJ%UPSaF3P4gCTK@Yv`agND*60)kQoI=#-vAsRpJspHw*L5o)a@6SYHbB;; zEX$P`IcmGylyz;}b{6RSeukJFwY_3`9LJY~cOWK5&09=Xl;^pI58EX+@{zAtvbeR{ sKyIm7e}hddcDZG^9edx|uLKo)0ui=%s%-8T{Qv*}07*qoM6N<$f^k`XL;wH) literal 0 HcmV?d00001 diff --git a/wise-webapp/src/main/webapp/images/star-on-hover.png b/wise-webapp/src/main/webapp/images/star-on-hover.png new file mode 100644 index 0000000000000000000000000000000000000000..23f71065d5c0a8f59550b70e869631698ca87409 GIT binary patch literal 490 zcmVLHk;j zbTBl6L_{P$_dK_9-}5d_(U6G@4erB&p||vQsMhc{&C)Js!a@y;4)JoVQ4N( zYQA{@TozbJ7@EsdQGW&i=UP!=%Hc|Tb9T3v0B~rUP&}$9D{@o1Kp}zV$cGw4R z@gPwuYyvdY;DML-D6#<IUsVcIoA>R55OzAT*M!BPYN@!{v0EdPeJmS+JUD^3sXZOQifB-hFC8pH?;CUUM z|5o;M>oKkU<+cF(?d9hKc%h+YeHx@;*X!!cY_Or0aSz{)iv!$)8a#!BDg4g4g|~!L gn6_9`Y{N>0FaBaig<>UUDgXcg07*qoM6N<$f`P-?9smFU literal 0 HcmV?d00001 diff --git a/wise-webapp/src/main/webapp/images/star-on.png b/wise-webapp/src/main/webapp/images/star-on.png new file mode 100644 index 0000000000000000000000000000000000000000..dc865a5eb373a6fea81cad1be36c552ae25c0e1f GIT binary patch literal 315 zcmV-B0mS}^P)PNNEbM z3^PBU&P-^Ih;pX*ycExVSSoS~Doq+Q227cGAhQ`-Jh){7h_jlp%dAd7)vB(U_uO;{ zs9OCq6GNsbr*V~N*9$H*<9z1pMeZ$#2jsDo48LL-=Ef`MyNp(zI)P{ zaZ#S*-dC-d5pt+OqrCtw?w==i%nUiyQf-qT7~B@kz~HfN2OvfcwX|mR+IGJiTmr<% zp{8xd#ny3DArQW(h(mcx*Nlm6S*PSlvLnG@Ys!nPf$nbDu4Dc=4xdP_I@yet3! N002ovPDHLkV1kQhglqr+ literal 0 HcmV?d00001 diff --git a/wise-webapp/src/main/webapp/js/mymaps.js b/wise-webapp/src/main/webapp/js/mymaps.js index 9dd60bfa..3580547e 100644 --- a/wise-webapp/src/main/webapp/js/mymaps.js +++ b/wise-webapp/src/main/webapp/js/mymaps.js @@ -71,7 +71,7 @@ jQuery.fn.dataTableExt.selectAllMaps = function() { $(this).prop("checked", false); }); } - updateStatus(); + updateStatusToolbar(); }; jQuery.fn.dataTableExt.getSelectedMapsIds = function() { @@ -93,7 +93,7 @@ jQuery.fn.dataTableExt.removeSelectedRows = function() { trs.each(function() { $('#mindmapListTable').dataTable().fnDeleteRow(this); }); - updateStatus(); + updateStatusToolbar(); }; @@ -179,7 +179,7 @@ jQuery.fn.dialogForm = function(options) { // Update toolbar events ... -function updateStatus() { +function updateStatusToolbar() { // Mark column row selection values ... $("#mindmapListTable tbody input:checked").parent().parent().addClass('row-selected'); @@ -206,4 +206,51 @@ function updateStatus() { } +// Update toolbar events ... +function updateStarred(spanElem) { + $(spanElem).removeClass('starredOff'); + $(spanElem).addClass('starredOn'); + + // Retrieve row data ... + var tableElem = $('#mindmapListTable'); + var trElem = $(spanElem).parent().parent(); + var rowData = tableElem.dataTable().fnGetData(trElem[0]); + + // Update status ... + var starred = !rowData.starred; + var mapId = rowData.id; + if (starred) { + $(spanElem).removeClass('starredOff'); + $(spanElem).addClass('starredOn'); + } else { + $(spanElem).removeClass('starredOn'); + $(spanElem).addClass('starredOff'); + } + + jQuery.ajax("service/maps/" + mapId + "/starred", { + async:false, + dataType: 'json', + data: "" + starred, + type: 'PUT', + contentType:"text/plain", + success : function() { + if (starred) { + $(spanElem).removeClass('starredOff'); + $(spanElem).addClass('starredOn'); + } else { + $(spanElem).removeClass('starredOn'); + $(spanElem).addClass('starredOff'); + } + }, + error: function(jqXHR, textStatus, errorThrown) { + $('#messagesPanel div').text(errorThrown).parent().show(); + } + }); + + // Finally update st + rowData.starred = starred; +} + + + diff --git a/wise-webapp/src/main/webapp/jsp/mindmapList.jsp b/wise-webapp/src/main/webapp/jsp/mindmapList.jsp index 799a5b36..413afe3b 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapList.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapList.jsp @@ -31,25 +31,31 @@ sAjaxSource : "../service/maps", sAjaxDataProp: 'mindmapsInfo', fnInitComplete: function() { - $('#mindmapListTable tbody').change(updateStatus); + $('#mindmapListTable tbody').change(updateStatusToolbar); + $('#mindmapListTable .starredOff').click(function() { + updateStarred(this); + }); }, aoColumns: [ { sTitle : '', - sWidth : "15px", + sWidth : "55px", sClass : "select", bSortable : false, bSearchable : false, + mDataProp: "starred", + bUseRendered : false, fnRender : function(obj) { - return ''; + return ''; } }, { sTitle : "Name", + sWidth:"270px", bUseRendered : false, mDataProp: "title", fnRender : function(obj) { - return '' + obj.aData.title + ''; + return '' + obj.aData.title + ''; } }, { @@ -224,11 +230,6 @@ $("#actionButtons .shareMap").click(function() { }); - $("#actionButtons .tagMap").click(function() { - }); - - $("#actionButtons .tags").click(function() { - }); $('#foldersContainer li').click(function(event) { // Deselect previous option ... @@ -277,6 +278,7 @@
  • All
  • My Maps
  • Shared With Me
  • +
  • Starred
  • Public Maps
  • @@ -309,10 +311,9 @@ Duplicate
  • Rename
  • Print
  • -
  • Publish +
  • Publish
  • Share
  • -
  • Tag
  • History
  • diff --git a/wise-webapp/src/main/webapp/jsp/toolbar.jsf b/wise-webapp/src/main/webapp/jsp/toolbar.jsf index 3fe7fe17..f23d4986 100644 --- a/wise-webapp/src/main/webapp/jsp/toolbar.jsf +++ b/wise-webapp/src/main/webapp/jsp/toolbar.jsf @@ -76,10 +76,7 @@
    -
    - -
    -
    +
    diff --git a/wise-webapp/src/test/sql/hsql/create-schemas.sql b/wise-webapp/src/test/sql/hsql/create-schemas.sql index b8751239..ce6aa8c3 100644 --- a/wise-webapp/src/test/sql/hsql/create-schemas.sql +++ b/wise-webapp/src/test/sql/hsql/create-schemas.sql @@ -13,18 +13,18 @@ password varchar(255) NOT NULL, activationCode BIGINT NOT NULL, activation_date DATE, allowSendEmail CHAR(1) NOT NULL, -FOREIGN KEY(colaborator_id) REFERENCES colaborator(id) +FOREIGN KEY(colaborator_id) REFERENCES COLABORATOR(id) ); CREATE TABLE MINDMAP ( id INTEGER NOT NULL IDENTITY, -title VARCHAR(255) NOT NULL, +title VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, xml LONGVARBINARY NOT NULL, -public BOOLEAN not null, +public BOOLEAN NOT NULL, creation_date DATETIME, edition_date DATETIME, -owner_id INTEGER not null, +owner_id INTEGER NOT NULL, tags varchar(1014) , last_editor varchar(255) , creator_user varchar(255) , @@ -32,6 +32,15 @@ editor_properties varchar(512) --FOREIGN KEY(owner_id) REFERENCES USER(colaborator_id) ); +CREATE TABLE MINDMAP_COLLABORATOR_PROPERTIES +(id INTEGER NOT NULL IDENTITY, +mindmap_id INTEGER NOT NULL, +collaborator_id INTEGER NOT NULL, +starred BOOLEAN NOT NULL, +FOREIGN KEY(collaborator_id) REFERENCES COLABORATOR(id), +FOREIGN KEY(mindmap_id) REFERENCES MINDMAP(id) +); + CREATE TABLE MINDMAP_HISTORY (id INTEGER NOT NULL IDENTITY, xml LONGVARBINARY NOT NULL, @@ -44,15 +53,15 @@ CREATE TABLE MINDMAP_COLABORATOR colaborator_id INTEGER NOT NULL, mindmap_id INTEGER NOT NULL, role_id INTEGER NOT NULL, -FOREIGN KEY(colaborator_id) REFERENCES colaborator(id), -FOREIGN KEY(mindmap_id) REFERENCES mindmap(id) +FOREIGN KEY(colaborator_id) REFERENCES COLABORATOR(id), +FOREIGN KEY(mindmap_id) REFERENCES MINDMAP(id) ); CREATE TABLE TAG (id INTEGER NOT NULL IDENTITY, name varchar(255) NOT NULL, user_id INTEGER NOT NULL, ---FOREIGN KEY(user_id) REFERENCES user(colaborator_id) +--FOREIGN KEY(user_id) REFERENCES USER(colaborator_id) ); CREATE TABLE USER_LOGIN diff --git a/wise-webapp/src/test/sql/mysql/create-schemas.sql b/wise-webapp/src/test/sql/mysql/create-schemas.sql index 2d9abf24..afb1d845 100644 --- a/wise-webapp/src/test/sql/mysql/create-schemas.sql +++ b/wise-webapp/src/test/sql/mysql/create-schemas.sql @@ -33,9 +33,18 @@ editor_properties varchar(512) CHARACTER SET utf8 , FOREIGN KEY(owner_id) REFERENCES USER(colaborator_id) ) CHARACTER SET utf8 ; -CREATE TABLE MINDMAP_HISTORY -( + +CREATE TABLE MINDMAP_COLLABORATOR_PROPERTIES( id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, +mindmap_id INTEGER NOT NULL, +collaborator_id INTEGER NOT NULL, +starred BOOL NOT NULL default 0, +FOREIGN KEY(collaborator_id) REFERENCES COLABORATOR(id), +FOREIGN KEY(mindmap_id) REFERENCES MINDMAP(id) +) CHARACTER SET utf8; + +CREATE TABLE MINDMAP_HISTORY +(id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, xml blob NOT NULL, mindmap_id INTEGER NOT NULL, creation_date datetime,