Fix import.

This commit is contained in:
Paulo Gustavo Veiga 2012-04-15 08:00:51 -03:00
parent b245b97db3
commit 873e635b9a
14 changed files with 109 additions and 761 deletions

View File

@ -57,9 +57,7 @@ public class ImportController
final MindmapService mindmapService = this.getMindmapService(); final MindmapService mindmapService = this.getMindmapService();
mindmapService.addMindmap(mindMap, user); mindmapService.addMindmap(mindMap, user);
final StringBuilder redirectionTo = new StringBuilder("redirect:editor.htm?mapId="); final StringBuilder redirectionTo = new StringBuilder("redirect:" + mindMap.getId() + "/edit.htm");
redirectionTo.append(mindMap.getId());
redirectionTo.append("&action=open");
return new ModelAndView(redirectionTo.toString()); return new ModelAndView(redirectionTo.toString());
} }

View File

@ -1,58 +0,0 @@
/*
* 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.controller;
import com.wisemapping.exceptions.WiseMappingException;
import com.wisemapping.service.MindmapService;
import com.wisemapping.view.MindMapInfoBean;
import com.wisemapping.model.MindMap;
import com.wisemapping.model.User;
import com.wisemapping.security.Utils;
import org.springframework.validation.BindException;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class RenameMindmapController
extends BaseSimpleFormController {
//~ Methods ..............................................................................................
protected Object formBackingObject(HttpServletRequest httpServletRequest) throws Exception {
final MindMap mindMap = getMindmapFromRequest(httpServletRequest);
User user = Utils.getUser();
if (!mindMap.getOwner().equals(user)) {
throw new IllegalStateException("No enough right to execute this operation");
}
return new MindMapInfoBean(mindMap);
}
public ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors)
throws ServletException, WiseMappingException {
final MindMapInfoBean bean = (MindMapInfoBean) command;
final MindmapService mindmapService = this.getMindmapService();
mindmapService.updateMindmap(bean.getMindMap(), false);
return new ModelAndView(getSuccessView());
}
}

View File

@ -1,98 +0,0 @@
/*
* 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.controller;
import com.wisemapping.model.MindMap;
import com.wisemapping.model.MindMapCriteria;
import com.wisemapping.security.Utils;
import com.wisemapping.view.MindMapBean;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.multiaction.NoSuchRequestHandlingMethodException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class SearchController extends BaseMultiActionController {
private static final int MAX_RESULT = 20;
public ModelAndView handleNoSuchRequestHandlingMethod(NoSuchRequestHandlingMethodException noSuchRequestHandlingMethodException, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
return searchPage(httpServletRequest, httpServletResponse);
}
public ModelAndView searchPage(HttpServletRequest request, HttpServletResponse response) {
logger.info("Search");
return new ModelAndView("search");
}
public ModelAndView showAll(HttpServletRequest request, HttpServletResponse response)
{
final Map<String, Object> viewAttrMap = getRequestAttributes(request);
viewAttrMap.put("emptyCriteria", false);
com.wisemapping.model.User user = Utils.getUser();
viewAttrMap.put("user",user);
final List<MindMap> searchResult = getMindmapService().getPublicMaps(MAX_RESULT);
final List<MindMapBean> result = new ArrayList<MindMapBean>();
for (MindMap mindMap : searchResult) {
result.add(new MindMapBean(mindMap));
}
viewAttrMap.put("wisemapsList", result);
return new ModelAndView("searchResult", viewAttrMap);
}
public ModelAndView search(HttpServletRequest request, HttpServletResponse response) {
logger.info("Search Result");
final Map<String, Object> viewAttrMap = getRequestAttributes(request);
final MindMapCriteria criteria = getMindMapCriteriaFromRequest(request);
viewAttrMap.put("emptyCriteria", criteria.isEmpty());
com.wisemapping.model.User user = Utils.getUser();
viewAttrMap.put("user",user);
if (!criteria.isEmpty()) {
final List<MindMap> searchResult = getMindmapService().search(criteria);
final List<MindMapBean> result = new ArrayList<MindMapBean>();
for (MindMap mindMap : searchResult) {
result.add(new MindMapBean(mindMap));
}
viewAttrMap.put("wisemapsList", result);
}
return new ModelAndView("searchResult", viewAttrMap);
}
private Map<String, Object> getRequestAttributes(HttpServletRequest request) {
final Map<String, Object> viewAttrMap = new HashMap<String, Object>();
viewAttrMap.put("titleOrTags", request.getParameter("titleOrTags"));
final String name = request.getParameter("name");
viewAttrMap.put("name", name);
viewAttrMap.put("description", request.getParameter("description"));
viewAttrMap.put("tags", request.getParameter("tags"));
viewAttrMap.put("advanceSearch", request.getParameter("advanceSearch"));
return viewAttrMap;
}
}

View File

@ -25,6 +25,7 @@ import com.wisemapping.importer.ImporterException;
import com.wisemapping.importer.ImporterFactory; import com.wisemapping.importer.ImporterFactory;
import com.wisemapping.model.MindMap; import com.wisemapping.model.MindMap;
import com.wisemapping.view.ImportMapBean; import com.wisemapping.view.ImportMapBean;
import org.jetbrains.annotations.NotNull;
import org.springframework.validation.Errors; import org.springframework.validation.Errors;
import org.springframework.validation.ValidationUtils; import org.springframework.validation.ValidationUtils;
@ -36,11 +37,10 @@ public class ImportMapValidator extends MapInfoValidator {
return clazz.equals(ImportMapBean.class); return clazz.equals(ImportMapBean.class);
} }
public void validate(Object obj, Errors errors) { public void validate(Object obj, @NotNull Errors errors) {
ImportMapBean bean = (ImportMapBean) obj; final ImportMapBean bean = (ImportMapBean) obj;
super.validate(obj,errors);
this.validateMapInfo(errors, bean.getTitle(), bean.getDescription());
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "mapFile", Messages.FIELD_REQUIRED); ValidationUtils.rejectIfEmptyOrWhitespace(errors, "mapFile", Messages.FIELD_REQUIRED);
try { try {
final Importer importer = ImporterFactory.getInstance().getImporter(ImportFormat.FREEMIND); final Importer importer = ImporterFactory.getInstance().getImporter(ImportFormat.FREEMIND);

View File

@ -48,14 +48,23 @@ public class MapInfoValidator implements Validator {
public void validate(Object obj, @NotNull Errors errors) { public void validate(Object obj, @NotNull Errors errors) {
final MindMap map = (MindMap) obj; final MindMap map = (MindMap) obj;
if (map == null) { if (map == null) {
errors.rejectValue("map", "error.not-specified", null, "Value required."); errors.rejectValue("map", "error.not-specified", null, "Value required.");
} else { } else {
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "title", Messages.FIELD_REQUIRED);
final String title = map.getTitle(); final String title = map.getTitle();
final String desc = map.getDescription(); final String desc = map.getDescription();
validateMapInfo(errors, title, desc);
}
}
protected void validateMapInfo(Errors errors, String title, String desc) {
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "title", Messages.FIELD_REQUIRED);
if (title != null && title.length() > 0) { if (title != null && title.length() > 0) {
if (title.length() > Constants.MAX_MAP_NAME_LENGTH) { if (title.length() > Constants.MAX_MAP_NAME_LENGTH) {
errors.rejectValue("title", "field.max.length", errors.rejectValue("title", "field.max.length",
@ -78,8 +87,6 @@ public class MapInfoValidator implements Validator {
Constants.MAX_MAP_DESCRIPTION_LENGTH); Constants.MAX_MAP_DESCRIPTION_LENGTH);
} }
}
public MindmapService getMindmapService() { public MindmapService getMindmapService() {
return mindmapService; return mindmapService;
} }

View File

@ -1,82 +0,0 @@
/*
* 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.validator;
import org.springframework.validation.Validator;
import org.springframework.validation.Errors;
import org.springframework.validation.ValidationUtils;
import com.wisemapping.service.MindmapService;
import com.wisemapping.view.MindMapInfoBean;
import com.wisemapping.controller.Messages;
import com.wisemapping.model.Constants;
import com.wisemapping.model.User;
import com.wisemapping.model.MindMap;
public class RenameMapValidator
implements Validator {
private MindmapService mindmapService;
public boolean supports(final Class clazz) {
return clazz.equals(MindMapInfoBean.class);
}
public void validate(Object obj, Errors errors) {
final MindMapInfoBean map = (MindMapInfoBean) obj;
if (map == null) {
errors.rejectValue("map", "error.not-specified", null, "Value required.");
} else {
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "title", Messages.FIELD_REQUIRED);
final String title = map.getTitle();
final String desc = map.getDescription();
if (title != null && title.length() > 0) {
if (title.length() > Constants.MAX_MAP_NAME_LENGTH) {
errors.rejectValue("title", "field.max.length",
new Object[]{Constants.MAX_MAP_NAME_LENGTH},
"The title must have less than " + Constants.MAX_MAP_NAME_LENGTH + " characters.");
} else {
// Map alredy exists ?
final MindmapService service = this.getMindmapService();
final User user = com.wisemapping.security.Utils.getUser();
final MindMap mindMap = service.getMindmapByTitle(title, user);
if (mindMap != null && map.getMindMap().getId() != mindMap.getId() ) {
errors.rejectValue("title", Messages.MAP_TITLE_ALREADY_EXISTS);
}
}
}
ValidatorUtils.rejectIfExceeded(errors,
"description",
"The description must have less than "+Constants.MAX_MAP_DESCRIPTION_LENGTH + " characters.",
desc,
Constants.MAX_MAP_DESCRIPTION_LENGTH);
}
}
public MindmapService getMindmapService() {
return mindmapService;
}
public void setMindmapService(MindmapService mindmapService) {
this.mindmapService = mindmapService;
}
}

View File

@ -78,9 +78,6 @@ SAVE=Save
DISCARD_CHANGES=Discard Changes DISCARD_CHANGES=Discard Changes
ABOUT=About ABOUT=About
ABOUT_TITLE=What is WiseMapping? ABOUT_TITLE=What is WiseMapping?
BLOG=Blog
BLOG_TITLE=WiseMapping Blog
NEWS=News
KEYBOARD=Keyboard Shortcuts KEYBOARD=Keyboard Shortcuts
KEYBOARD_MSG=These are the keyboard shortcuts you can use in the editor! KEYBOARD_MSG=These are the keyboard shortcuts you can use in the editor!
FIRST_STEPS=Editor First Steps FIRST_STEPS=Editor First Steps
@ -93,18 +90,7 @@ ALREADY_A_MEMBER=Already a member?
WORD_VERIFICATION=Word Verification WORD_VERIFICATION=Word Verification
TERM_OF_THE_SERVICE=Terms of Service: TERM_OF_THE_SERVICE=Terms of Service:
FORGOT_PASSWORD_MESSAGE=Please enter your email to start the password recovery process. FORGOT_PASSWORD_MESSAGE=Please enter your email to start the password recovery process.
LOADING_MSG=Loading ...
SEARCH_TITLE=Search for WiseMaps
SEARCH_TEXT=Search for public mind maps using either its name or tags
SEARCH_FIELD=Map Title or Tag SEARCH_FIELD=Map Title or Tag
SEARCH=Search
SEARCH_RESULTS=Search Results
NO_SEARCH_RESULTS=No results were found. Go ahead and be the first one to publish a mind map about it!
NO_SEARCH_TERM=You didn't enter any search terms.
ADVANCE_SEARCH=Advanced Search
SIMPLE_SEARCH=Simple Search
TRYNOW= Try Demo !
VIDEO=WiseMapping in 2 minutes
FIELD_REQUIRED=Required field cannot be left blank FIELD_REQUIRED=Required field cannot be left blank
EMAIL_ALREADY_EXIST=Email already exists EMAIL_ALREADY_EXIST=Email already exists
@ -253,14 +239,6 @@ FREEMIND_EXPORT_IMPORT_MESSAGE=You can now easily import and export mind maps fr
EDITOR_TOOLBAR_IMPROVED=Usability Improvement: The editor toolbar has been redesign EDITOR_TOOLBAR_IMPROVED=Usability Improvement: The editor toolbar has been redesign
EDITOR_TOOLBAR_IMPROVED_MESSAGE= The toolbar has been redesign to improve its usability. EDITOR_TOOLBAR_IMPROVED_MESSAGE= The toolbar has been redesign to improve its usability.
COLLABORATE=Collaborate COLLABORATE=Collaborate
PRINT_FEATURE_IMPLEMENTED=You can print your maps now
PRINT_FEATURE_IMPLEMENTED_MESSAGE=You can now easily print your maps from the editor and the map list!
EMBEDDED_MAP_SIZE=* Note: You can change embedded map size modifying 'height' and 'width' style properties. You can also adjust the zoom factor modifying 'zoom' parameter from the URL.
NEWSLETTER_DESC = Get News delivered to <br>your Inbox
USABILITY_EDITING_IMPROVED= Usability Improvement: Node text Editing
USABILITY_EDITING_IMPROVED_ESC= Usability Improvement: Cancelling Node text Editing with the ESC Key
USABILITY_EDITING_IMPROVED_TEXT=Now you have 3 different ways of editing a node text.</br><ul><li><b>Typing:</b> Start typing to replace the focused node text.</li><li><b>F2:</b> Pressing F2 key, will let you edit the node text</li><li><b>Double click:</b> Double click with the mouse on the node to start editing its text</li></ul>
USABILITY_EDITING_IMPROVED_TEXT_ESC=Now, You can also cancel the changes that you've made in the text of a node by pressing the ESC key while editing it's text.
IMPORT-EXPORT_ISSUES_FIXED=Usability Improvement: Import-Export issues have been solved. IMPORT-EXPORT_ISSUES_FIXED=Usability Improvement: Import-Export issues have been solved.
GO_TO= Go to my Wisemaps GO_TO= Go to my Wisemaps
@ -289,18 +267,6 @@ EDITOR_LINKS_TEXT=You can add Links to the topics very easily using the link ico
IMPORT_EXPORT_IMPROVEMENTS=We have done some improvements in the import and export features IMPORT_EXPORT_IMPROVEMENTS=We have done some improvements in the import and export features
USERS_1500=We already have 2100 users!!, Thanks to all of you that have trust us in this starting phase...
NO_PRIVATE_ANY_MORE= We are not private any more! More than 2100 users have tested and used the application, it's time to stop being private!.. Stay tune because we have a lot of new ideas for WiseMapping!!
NO_PRIVATE_ANY_MORE_SHORT= We are not private any more!
NO_PRIVATE_ANY_MORE_TEXT=More than 1500 real users have tested the application!, so it's time to stop being private!
NEWS_ADD_ICON=Mind Map feature: Add icons to the topics
NEWS_ADD_ICON_SHORT=Add icons to the topics
NEWS_ADD_ICON_TEXT=You can now add Icons to the topics very easily using the link icon in the toolbar
NEWS_TOOLBAR_SHORT =New Editor Toolbar
NEWS_TOOLBAR_TEXT = We have update our editor toolbar in order to be more intuitive.
#####FOOTER #####FOOTER
COPYRIGHT=Powered by WiseMapping COPYRIGHT=Powered by WiseMapping
TERMS_AND_CONDITIONS=Terms and Conditions TERMS_AND_CONDITIONS=Terms and Conditions
@ -332,3 +298,4 @@ INVALID_EMAIL_ERROR = The e-mail was not verified
BROWSER_NOT_SUPPOERTED= Current Browser is not supported. BROWSER_NOT_SUPPOERTED= Current Browser is not supported.
CHECK_BROWSERS= You can check supported browser at CHECK_BROWSERS= You can check supported browser at
NO_PRODUCTION_DATABASE_CONFIGURED=Note: Although HSQLDB is bundled with WiseMapping by default during the installation, we do not recommend this database for production use. Please consider using MySQL 5.5 instead. You can find more information how to configure MySQL NO_PRODUCTION_DATABASE_CONFIGURED=Note: Although HSQLDB is bundled with WiseMapping by default during the installation, we do not recommend this database for production use. Please consider using MySQL 5.5 instead. You can find more information how to configure MySQL
IMPORT=Import

View File

@ -158,19 +158,13 @@
<put name="body" value="/jsp/mindmapRename.jsp"/> <put name="body" value="/jsp/mindmapRename.jsp"/>
</definition> </definition>
<definition name="importMap" extends="formDialogTemplate">
<put name="title" value="IMPORT_MINDMAP"/>
<put name="details" value="IMPORT_MINDMAP_INFO"/>
<put name="body" value="/jsp/mindmapImport.jsp"/>
</definition>
<definition name="keyboard" extends="formDialogTemplate"> <definition name="keyboard" extends="formDialogTemplate">
<put name="title" value="KEYBOARD"/> <put name="title" value="KEYBOARD"/>
<put name="details" value="KEYBOARD_MSG"/> <put name="details" value="KEYBOARD_MSG"/>
<put name="body" value="/jsp/keyboard.jsp"/> <put name="body" value="/jsp/keyboard.jsp"/>
</definition> </definition>
<definition name="importMapError" extends="pageTemplate"> <definition name="importMap" extends="pageTemplate">
<put name="title" value="IMPORT_MINDMAP"/> <put name="title" value="IMPORT_MINDMAP"/>
<put name="details" value="IMPORT_MINDMAP_INFO"/> <put name="details" value="IMPORT_MINDMAP_INFO"/>
<put name="body" value="/jsp/mindmapImportError.jsp"/> <put name="body" value="/jsp/mindmapImportError.jsp"/>

View File

@ -125,24 +125,11 @@
<property name="userService" ref="userService"/> <property name="userService" ref="userService"/>
</bean> </bean>
<bean id="renameMapValidator" class="com.wisemapping.validator.RenameMapValidator">
<property name="mindmapService" ref="mindmapService"/>
</bean>
<bean id="importMapValidator" class="com.wisemapping.validator.ImportMapValidator"> <bean id="importMapValidator" class="com.wisemapping.validator.ImportMapValidator">
<property name="mindmapService" ref="mindmapService"/> <property name="mindmapService" ref="mindmapService"/>
</bean> </bean>
<bean id="renameMapController" class="com.wisemapping.controller.RenameMindmapController">
<property name="sessionForm" value="false"/>
<property name="commandName" value="renameMap"/>
<property name="commandClass" value="com.wisemapping.view.MindMapInfoBean"/>
<property name="validator" ref="renameMapValidator"/>
<property name="formView" value="renameMap"/>
<property name="successView" value="closeDialog"/>
<property name="mindmapService" ref="mindmapService"/>
<property name="userService" ref="userService"/>
</bean>
<bean id="historyController" class="com.wisemapping.controller.HistoryController"> <bean id="historyController" class="com.wisemapping.controller.HistoryController">
<property name="methodNameResolver" ref="paramResolverByAction"/> <property name="methodNameResolver" ref="paramResolverByAction"/>
@ -156,7 +143,7 @@
<property name="commandClass" value="com.wisemapping.view.ImportMapBean"/> <property name="commandClass" value="com.wisemapping.view.ImportMapBean"/>
<property name="validator" ref="importMapValidator"/> <property name="validator" ref="importMapValidator"/>
<property name="formView" value="importMap"/> <property name="formView" value="importMap"/>
<property name="errorView" value="importMapError"/> <property name="errorView" value="importMap"/>
<property name="mindmapService" ref="mindmapService"/> <property name="mindmapService" ref="mindmapService"/>
<property name="userService" ref="userService"/> <property name="userService" ref="userService"/>
</bean> </bean>
@ -185,11 +172,6 @@
<property name="userService" ref="userService"/> <property name="userService" ref="userService"/>
</bean> </bean>
<bean id="searchController" class="com.wisemapping.controller.SearchController">
<property name="methodNameResolver" ref="paramResolverByAction"/>
<property name="mindmapService" ref="mindmapService"/>
</bean>
<bean id="keyboardController" class="com.wisemapping.controller.KeyboardController"> <bean id="keyboardController" class="com.wisemapping.controller.KeyboardController">
<property name="methodNameResolver" ref="paramResolverByAction"/> <property name="methodNameResolver" ref="paramResolverByAction"/>
<property name="mindmapService" ref="mindmapService"/> <property name="mindmapService" ref="mindmapService"/>
@ -226,12 +208,9 @@
<prop key="/c/publish.htm">publishController</prop> <prop key="/c/publish.htm">publishController</prop>
<prop key="/c/editProfile.htm">editProfileController</prop> <prop key="/c/editProfile.htm">editProfileController</prop>
<prop key="/c/tags.htm">tagsController</prop> <prop key="/c/tags.htm">tagsController</prop>
<prop key="/c/search.htm">searchController</prop>
<prop key="/c/keyboard.htm">keyboardController</prop>
<prop key="/c/publicView.htm">publicView</prop> <prop key="/c/publicView.htm">publicView</prop>
<prop key="/c/embeddedView.htm">embeddedView</prop> <prop key="/c/embeddedView.htm">embeddedView</prop>
<prop key="/c/renameMap.htm">renameMapController</prop> <prop key="/c/map/import.htm">importMapController</prop>
<prop key="/c/importMap.htm">importMapController</prop>
<prop key="/c/history.htm">historyController</prop> <prop key="/c/history.htm">historyController</prop>
<prop key="/c/installCFG.htm">homeController</prop> <prop key="/c/installCFG.htm">homeController</prop>
</props> </props>

View File

@ -28,7 +28,7 @@
/* ------------------------------ Tags ---------------------------------- */ /* ------------------------------ Tags ---------------------------------- */
@tags-width: 20%; @tags-width: 10%;
@tags-border-size: @base-border-size; @tags-border-size: @base-border-size;
@tags-padding: @base-padding; @tags-padding: @base-padding;

View File

@ -6,375 +6,20 @@
cursor: pointer; cursor: pointer;
} }
#intro {
width: 100%;
height: 310px;
border-bottom: 1px solid #bbb4d6;
background-color: #e5e5e5;
}
#introContent {
width: 800px;
margin: auto;
position: relative;
height: 250px;
clear: both;
}
#introAnimation {
float: left;
width: 510px;
height: 210px;
margin: 40px 12px 0 10px;
}
.contentImage {
height: 210px;
width: 245px;
float: left;
}
.contentText {
float: left;
width: 255px;
margin-left: 50px;
margin-top: 25px;
font: normal 80% "trebuchet ms", verdana, arial, helvetica, sans-serif;
}
.contentTitle {
width: 100px;
font-size: 22px;
font-weight: bold;
color: #808080;
margin-left: -2px;
}
.contentDescription { .contentDescription {
font-size: 15px; font-size: 15px;
font-weight: normal; font-weight: normal;
} }
#introRightContent { #loginContent .loginNews {
float: left;
width: 190px;
margin-top: 20px;
}
#searchAdvance {
padding: 5px;
border: 1px dotted white;
}
#searchAdvance table {
padding: 5px;
}
#searchResult {
clear: both;
width: 100%;
height: 550px;
overflow: auto;
border: 0 solid gray;
background-color: white;
z-index: 2;
position: relative;
padding: 20px;
}
#searchResultTable table {
width: 100%;
border: 0 solid gray;
background-color: white;
}
#searchResultTable thead, #searchAdvance thead {
background-color: #093A9D;
font-size: 12px;
font-weight: normal;
padding: 5px;
}
#searchResultTable td {
text-align: center;
border-bottom: 1px solid #EEEEEE;
color: #999999;
font-size: 12px;
padding: 3px;
}
#searchResultTable th, #searchAdvance th {
color: white;
border-right: 1px dotted #ffffff;
font-weight: bold;
text-align: center;
font-size: 12px;
padding: 5px;
}
#searchResultTable tbody tr:hover {
background-color: #E2f0f6;
}
#searchResultTable tr {
padding: 5px;
}
#searchResultTable .mapTitle {
font-size: 13px;
color: #666666;
font-weight: bold;
}
#searchResultTable .mapTags {
font-size: 11px;
color: black;
}
#search {
clear: both;
width: 200px;
font-size: 12px;
padding: 9px 9px 0;
}
#searchTitle {
height: 16px;
top: 3px;
color: #6186CB;
font-size: 16px;
font-weight: bold;
}
#searchText {
margin-bottom: 10px;
}
#searchField {
margin-bottom: 5px;
}
#searchField input {
color: gray;
width: 93%;
}
#searchButton {
height: 30px;
}
#searchButtonContainer {
float: right;
margin-right: 10px;
}
div#tryNow a {
text-decoration: none;
}
div#tryNow .tryBtnText {
padding: 0 20px;
position: relative;
height: 70px;
font-size: 20px;
color: #093A9D;
font-weight: bold;
top: 50%;
margin-top: -13px;
white-space: normal;
}
#video {
clear: both;
font-size: 12px;
text-align: center;
margin-top: 10px;
margin-left: 20px;
height:51px;
}
div#video .videoIconContainer {
display:inline;
height:51px;
margin-right:10px;
position:relative;
top:14px;
width:20px;
}
div#video img {
width:20px;
}
div#video a {
text-decoration: none;
}
div#video .videoBtnText {
position: relative;
height: 70px;
font-size: 12px;
color: #093A9D;
font-weight: bold;
white-space: normal;
display:inline;
width:125px;
}
/* MAIN CONTENT STYLES */
#main {
width: 800px;
margin: auto;
position: relative;
height: 315px;
clear: both;
}
#mainContent, #introContent {
padding: 10px 0 15px 0;
font-size: 80%;
width: 800px;
}
.separator {
width: 520px;
padding-bottom: 40px;
margin-bottom: 40px;
}
#newsAndArticles, #recentMaps, #join {
width: 230px;
float: left;
margin-right: 0;
padding: 9px;
}
#recentMaps {
margin-right: 10px;
margin-left: 10px;
}
#join {
}
#join a {
text-decoration: none;
}
div#signUpButton {
color: black;
padding: 5px;
margin-bottom: 5px; /*text-align: center;*/
font-weight: bold;
}
div#signUpButton a {
font-size: 120%; /*color: #660066;*/
width: 100%;
}
div#signUpButton .signUpBtnContainer {
left: 60px;
}
div#signUpButton .signUpText {
padding: 0 20px;
position: relative;
height: 25px;
color: #093A9D;
font-weight: bold;
top: 50%;
margin-top: -7px;
}
#newsAndArticles dl, #recentMaps dl, #join dl, #search dl {
width: 100%; /*padding-bottom: 15px;*/
color: black;
}
#newsAndArticles dl dt, #join dl dt, #search dl dt {
margin: 0;
color: black;
font-weight: bold;
padding: 10px 0 5px 0;
}
#newsAndArticles dl dd, #join dl dd, #search dl dd {
padding: 0;
margin: 0;
}
div#news {
float: left; float: left;
width: 400px; width: 400px;
} }
#recentMaps dl dt { #joinContent {
margin: 0;
color: black;
font-weight: bold;
}
#recentMaps dt {
padding-top: 3px;
}
#recentMaps dd {
padding-bottom: 3px;
margin: 0;
border-bottom: 1px solid #E5E5E5;
}
#newsAndArticles h1, #recentMaps h1, #join h1, #search h1 {
color: #093A9D;
font-size: 150%;
text-align: center;
font-weight: bold;
}
#join dl {
padding-bottom: 10px;
}
#join h1 {
color: white;
}
#join dd {
color: white;
}
#join dt {
color: white;
font-size: medium;
}
#recentMapsContent, #newsContent, #joinContent {
padding: 5px 10px; padding: 5px 10px;
} }
#search dl {
padding-bottom: 10px;
}
#search h1 {
color: white;
}
#search dd {
color: white;
}
#search dt {
color: white;
font-size: medium;
}
/* Finish homepage styles */ /* Finish homepage styles */
div#mainBody { div#mainBody {
@ -383,7 +28,6 @@ div#mainBody {
height: 300px; height: 300px;
} }
div#login { div#login {
float: right; float: right;
width: 350px; width: 350px;
@ -502,17 +146,6 @@ div.pageBodyContent ol li {
list-style-type: decimal; list-style-type: decimal;
} }
div.newsContainer {
clear:both;
margin-bottom:20px;
padding:10px;
width:100%;
}
div.newsContainer h2 {
padding:10px;
color:#6B628F;
}
#login.sb, #userRegistration.sb, #forgotPasswordContainer.sb { #login.sb, #userRegistration.sb, #forgotPasswordContainer.sb {
background: #eeeeee; background: #eeeeee;
border: 1px solid #cfcfcf; border: 1px solid #cfcfcf;
@ -549,12 +182,12 @@ div.newsContainer h2 {
border-radius: 16px; border-radius: 16px;
} }
#searchResult.sb { #importContainer table {
background: #C3DEF5; background: #eeeeee;
border:1px solid #A7C6DF; border: 1px solid #cfcfcf;
-moz-border-radius: 16px; -moz-border-radius: 8px;
-khtml-border-radius: 16px; -khtml-border-radius: 8px;
-webkit-border-radius: 16px; -webkit-border-radius: 8px;
border-radius: 16px; border-radius: 16px;
} }

View File

@ -3,7 +3,7 @@
<%@ include file="/jsp/init.jsp" %> <%@ include file="/jsp/init.jsp" %>
<div id="loginContent"> <div id="loginContent">
<div id="news" class="sb"> <div class="sb loginNews">
<h1>What is New: </h1> <h1>What is New: </h1>
<ul> <ul>
<li>Links Between Nodes</li> <li>Links Between Nodes</li>
@ -67,7 +67,7 @@
<input type="submit" class="btn-primary" id="submitButton" <input type="submit" class="btn-primary" id="submitButton"
value="<spring:message code="SIGN_IN"/>"> value="<spring:message code="SIGN_IN"/>">
<div style="text-align:right;"><a href="<c:url value="forgotPassword.htm"/>"> <div style="text-align:right;"><a href="<c:url value="/c/forgotPassword.htm"/>">
<spring:message code="FORGOT_PASSWORD"/> <spring:message code="FORGOT_PASSWORD"/>
</a></div> </a></div>
</td> </td>
@ -81,7 +81,7 @@
<div id="register"> <div id="register">
<b><spring:message code="NOT_READY_A_USER"/></b> <b><spring:message code="NOT_READY_A_USER"/></b>
<spring:message code="NOT_READY_A_USER_MESSAGE"/> <spring:message code="NOT_READY_A_USER_MESSAGE"/>
<a href="userRegistration.htm"> <a href="c/userRegistration.htm">
<spring:message code="JOIN_NOW"/> <spring:message code="JOIN_NOW"/>
</a> </a>
</div> </div>

View File

@ -1,12 +1,11 @@
<%@ include file="/jsp/init.jsp" %> <%@ include file="/jsp/init.jsp" %>
<div> <div id="importContainer">
<form:form method="post" commandName="importMap" enctype="multipart/form-data"> <form:form method="post" commandName="importMap" enctype="multipart/form-data">
<table> <table>
<tr> <tr>
<td class="formLabel"> <td class="formLabel">
<span class="fieldRequired">*</span> <span class="fieldRequired">*</span>
<spring:message code="NAME"/> <spring:message code="NAME"/>:
:
</td> </td>
<td> <td>
<form:input path="title" id="title" tabindex="1"/> <form:input path="title" id="title" tabindex="1"/>
@ -15,8 +14,7 @@
</tr> </tr>
<tr> <tr>
<td class="formLabel"> <td class="formLabel">
<spring:message code="DESCRIPTION"/> <spring:message code="DESCRIPTION"/>:
:
</td> </td>
<td> <td>
<form:input path="description" id="description" tabindex="2"/> <form:input path="description" id="description" tabindex="2"/>
@ -26,8 +24,7 @@
<tr> <tr>
<td class="formLabel"> <td class="formLabel">
<span class="fieldRequired">*</span> <span class="fieldRequired">*</span>
<spring:message code="FREE_MIND_FILE"/> <spring:message code="FREE_MIND_FILE"/>:
:
</td> </td>
<td> <td>
<input type="file" name="mapFile"/> <input type="file" name="mapFile"/>
@ -37,17 +34,9 @@
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<td> <td>
<input type="submit" value="<spring:message code="SUBMIT"/>" class="btn-primary"> <input type="submit" value="<spring:message code="IMPORT"/>" class="btn-primary">
<c:choose> <input type="button" value="<spring:message code="CANCEL"/>" class="btn-secondary"
<c:when test="${!errorView}"> onclick="window.location='/c/mymaps.htm'">
<input type="button" value="<spring:message code="CANCEL"/>" class="btn-primary"
onclick="MOOdalBox.close();">
</c:when>
<c:otherwise>
<input type="button" value="<spring:message code="BACK"/>" class="btn-primary"
onclick="window.location='mymaps.htm'">
</c:otherwise>
</c:choose>
</td> </td>
</tr> </tr>
</table> </table>

View File

@ -193,7 +193,7 @@
// Initialize dialog ... // Initialize dialog ...
$("#duplicate-dialog-modal").dialogForm({ $("#duplicate-dialog-modal").dialogForm({
modal: true, modal: true,
acceptButtonLabel : "Duplicated", acceptButtonLabel : "Duplicate",
cancelButtonLabel : "Cancel", cancelButtonLabel : "Cancel",
redirect: "c/map/{header.resourceId}/edit.htm", redirect: "c/map/{header.resourceId}/edit.htm",
url : "../service/maps/" + mapId url : "../service/maps/" + mapId
@ -263,6 +263,8 @@
$("#buttons .importMap").button({ $("#buttons .importMap").button({
icons: { primary: "ui-icon-trash" } icons: { primary: "ui-icon-trash" }
}).click(function() {
window.open('c/map/import.htm');
}); });
$("#buttons .printMap").button({ $("#buttons .printMap").button({
@ -274,10 +276,22 @@
} }
}); });
$("#buttons .publishMap").button({
$("#buttons .moreActions").button({ icons: { primary: "ui-icon-print" }
icons: { primary: "ui-icon-triangle-1-s" } }).click(function() {
}); });
$("#buttons .shareMap").button({
icons: { primary: "ui-icon-print" }
}).click(function() {
});
$("#buttons .tagMap").button({
icons: { primary: "ui-icon-print" }
}).click(function() {
});
}); });
// Register time update functions .... // Register time update functions ....
@ -300,6 +314,18 @@
</div> </div>
<div id="buttons"> <div id="buttons">
<button class="newMap">New</button>
<button class="importMap">Import</button>
<button class="duplicateMap">Duplicate</button>
<button class="delete">Delete</button>
<button class="renameMap">Rename</button>
<button class="printMap">Print</button>
<button class="publishMap">Publish</button>
<button class="shareMap">Collaborate</button>
<button class="tagMap">Tag</button>
</div>
<div>
<div id="delete-dialog-modal" title="Delete maps" style="display: none"> <div id="delete-dialog-modal" title="Delete maps" style="display: none">
<p>Are you sure you want to delete maps <span></span> ?</p> <p>Are you sure you want to delete maps <span></span> ?</p>
</div> </div>
@ -384,13 +410,6 @@
<div id="share-dialog-modal" title="Share maps" style="display: none"> <div id="share-dialog-modal" title="Share maps" style="display: none">
<p>Are you sure you want to share maps <span></span> ?</p> <p>Are you sure you want to share maps <span></span> ?</p>
</div> </div>
<button class="newMap">New</button>
<button class="duplicateMap">Duplicate</button>
<button class="delete">Delete</button>
<button class="renameMap">Rename</button>
<button class="importMap">Import</button>
<button class="printMap">Print</button>
<button class="moreActions">More</button>
</div> </div>
<div> <div>