Start working on a folders support.

This commit is contained in:
Paulo Gustavo Veiga 2012-05-23 21:54:03 -03:00
parent 5498c681a4
commit 9bc4504aea
7 changed files with 157 additions and 143 deletions

View File

@ -272,8 +272,6 @@ td.formLabel {
padding: 5px; padding: 5px;
} }
}
/*--- Modal Dialog Form ---*/ /*--- Modal Dialog Form ---*/
div.modalDialog { div.modalDialog {
padding: 15px 30px; padding: 15px 30px;

View File

@ -83,7 +83,11 @@ public class RestMindmap {
public String getLastModificationTime() { public String getLastModificationTime() {
final Calendar date = mindmap.getLastModificationTime(); final Calendar date = mindmap.getLastModificationTime();
return toISO8601(date.getTime()); String result = null;
if (date != null) {
result = toISO8601(date.getTime());
}
return result;
} }
public boolean isPublic() { public boolean isPublic() {

View File

@ -38,6 +38,8 @@
#map-table { #map-table {
width: 100% !important; width: 100% !important;
display: inline-block; display: inline-block;
float:right;
border-top: 1px solid black
} }
input#selectAll { input#selectAll {
@ -140,7 +142,7 @@ input#selectAll {
#tableActions { #tableActions {
float: right; float: right;
width: 500px; width: 350px;
white-space:nowrap; white-space:nowrap;
} }

View File

@ -71,7 +71,7 @@ jQuery.fn.dialogForm = function(options) {
$("#" + containerId).find('input').attr('value', ''); $("#" + containerId).find('input').attr('value', '');
} }
// Reset button state ... // Clear button "Saving..." state ...
var acceptBtn = $('#' + containerId + ' .btn-accept'); var acceptBtn = $('#' + containerId + ' .btn-accept');
acceptBtn.button('reset'); acceptBtn.button('reset');
@ -107,14 +107,13 @@ jQuery.fn.dialogForm = function(options) {
var fieldErrors = errors.fieldErrors; var fieldErrors = errors.fieldErrors;
if (fieldErrors) { if (fieldErrors) {
for (var fieldName in fieldErrors) { for (var fieldName in fieldErrors) {
// Mark the field ... // Mark the field with errors ...
var message = fieldErrors[fieldName]; var message = fieldErrors[fieldName];
var inputField = $("#" + containerId + " input[name='" + fieldName + "']"); var inputField = $("#" + containerId + " input[name='" + fieldName + "']");
$("#" + containerId).find(".errorMessage").text(message).addClass("alert alert-error"); $("#" + containerId).find(".errorMessage").text(message).addClass("alert alert-error");
inputField.parent().addClass('error'); inputField.parent().addClass('error');
} }
} }
} else { } else {

View File

@ -249,13 +249,13 @@
</script> </script>
</head> </head>
<body> <body>
<div style="min-height: 500px">
<jsp:include page="header.jsp"> <jsp:include page="header.jsp">
<jsp:param name="removeSignin" value="false"/> <jsp:param name="removeSignin" value="false"/>
<jsp:param name="showLogout" value="true"/> <jsp:param name="showLogout" value="true"/>
</jsp:include> </jsp:include>
<div id="mindmapListContainer"> <div style="min-height: 500px">
<div id="messagesPanel" class="alert alert-error alert-block fade in hide" style="margin-top: 10px"> <div id="messagesPanel" class="alert alert-error alert-block fade in hide" style="margin-top: 10px">
<strong><spring:message code="UNEXPECTED_ERROR"/></strong> <strong><spring:message code="UNEXPECTED_ERROR"/></strong>
@ -264,134 +264,157 @@
<div></div> <div></div>
</div> </div>
<div id="buttonsToolbar" class="btn-toolbar"> <div id="mindmapListContainer">
<div style="width: 15%;float: left;margin-right: 2%;margin-top: 80px">
<ul class="nav nav-list">
<li class="nav-header">Folders</li>
<div class="btn-group"> <li class="active"><a href="#"><i class="icon-inbox"></i> All</a></li>
<button id="newBtn" class="btn btn-info"><i class="icon-file icon-white"></i> New</button> <li><a href="#"><i class="icon-share"></i> Shared With Me</a></li>
<button id="importBtn" class="btn btn-info"><i class="icon-upload icon-white"></i> Import</button> <li><a href="#"><i class="icon-globe"></i> Public Maps</a></li>
</div>
<div class="btn-group act-multiple" id="deleteBtn" style="display:none">
<button class="btn btn-info"><i class="icon-trash icon-white"></i> Delete</button>
</div>
<div id="infoBtn" class="btn-group act-single" style="display:none">
<button class="btn btn-info"><i class="icon-exclamation-sign icon-white"></i> Info</button>
</div>
<div id="actionsBtn" class="btn-group act-single" style="display:none">
<button class="btn btn-info dropdown-toggle" data-toggle="dropdown">
<i class="icon-asterisk icon-white"></i> More
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li id="duplicateBtn"><a href="#" onclick="return false"><i class="icon-plus-sign"></i>
Duplicate</a></li>
<li id="renameBtn"><a href="#" onclick="return false"><i class="icon-edit"></i> Rename</a></li>
<li id="printBtn"><a href="#" onclick="return false"><i class="icon-print"></i> Print</a></li>
<li id="publishBtn"><a href="#" onclick="return false"><i class="icon-globe"></i>Publish</a></li>
<li id="shareBtn"><a href="#" onclick="return false"><i class="icon-share"></i> Share</a></li>
<li id="tagMap"><a href="#" onclick="return false"><i class="icon-tags"></i> Tag</a></li>
</ul> </ul>
</div> </div>
<div id="tableActions" class="btn-toolbar">
<div class="btn-group" id="pageButtons"> <div style="width: 78%;float: left;">
<button class="btn" id="pPageBtn"><strong>&lt;</strong></button> <div id="buttonsToolbar" class="btn-toolbar">
<button class="btn" id="nPageBtn"><strong>&gt;</strong></button>
<div class="btn-group">
<button id="newBtn" class="btn btn-primary"><i class="icon-file icon-white"></i> New</button>
<button id="importBtn" class="btn btn-primary"><i class="icon-upload icon-white"></i> Import
</button>
</div>
<div class="btn-group act-multiple" id="deleteBtn" style="display:none">
<button class="btn btn-primary"><i class="icon-trash icon-white"></i> Delete</button>
</div>
<div id="infoBtn" class="btn-group act-single" style="display:none">
<button class="btn btn-primary"><i class="icon-exclamation-sign icon-white"></i> Info</button>
</div>
<div id="actionsBtn" class="btn-group act-single" style="display:none">
<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
<i class="icon-asterisk icon-white"></i> More
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li id="duplicateBtn"><a href="#" onclick="return false"><i class="icon-plus-sign"></i>
Duplicate</a></li>
<li id="renameBtn"><a href="#" onclick="return false"><i class="icon-edit"></i> Rename</a></li>
<li id="printBtn"><a href="#" onclick="return false"><i class="icon-print"></i> Print</a></li>
<li id="publishBtn"><a href="#" onclick="return false"><i class="icon-globe"></i>Publish</a>
</li>
<li id="shareBtn"><a href="#" onclick="return false"><i class="icon-share"></i> Share</a></li>
<li id="tagMap"><a href="#" onclick="return false"><i class="icon-tags"></i> Tag</a></li>
</ul>
</div>
<div id="tableActions" class="btn-toolbar">
<div class="btn-group" id="pageButtons">
<button class="btn" id="pPageBtn"><strong>&lt;</strong></button>
<button class="btn" id="nPageBtn"><strong>&gt;</strong></button>
</div>
<div id="pageInfo"></div>
</div>
</div> </div>
<div id="pageInfo"></div> <div id="map-table">
<table class="table" id="mindmapListTable"></table>
<div id="tableFooter" class="form-inline"></div>
</div>
</div>
</div>
</div>
<jsp:include page="footer.jsp"/>
<div id="dialogsContainer">
<!-- New map dialog -->
<div id="new-dialog-modal" title="Add new map" class="modal fade" style="display:none">
<div class="modal-header">
<button class="close" data-dismiss="modal">x</button>
<h3>Create a new map</h3>
</div>
<div class="modal-body">
<div class="errorMessage"></div>
<form class="form-horizontal">
<fieldset>
<div class="control-group">
<label class="control-label" for="newTitle"><spring:message code="NAME"/>:</label>
<input class="control" name="title" id="newTitle" type="text" required="true"
placeholder="Name of the new map to create" autofocus="autofocus"/>
</div>
<div class="control-group">
<label class="control-label" for="newDec"><spring:message code="DESCRIPTION"/>:</label>
<input class="control" name="description" id="newDec" type="text"
placeholder="Some description for your map"/>
</div>
</fieldset>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-primary btn-accept" data-loading-text="Saving ...">Create</button>
<button class="btn btn-cancel" data-dismiss="modal">Cancel</button>
</div> </div>
</div> </div>
<div> <!-- Duplicate map dialog -->
<!-- New map dialog --> <div id="duplicate-dialog-modal" class="modal fade" style="display: none">
<div id="new-dialog-modal" title="Add new map" class="modal fade" style="display:none"> <div class="modal-header">
<div class="modal-header"> <button class="close" data-dismiss="modal">X</button>
<button class="close" data-dismiss="modal">x</button> <h3 id="dupDialogTitle"></h3>
<h3>Create a new map</h3>
</div>
<div class="modal-body">
<div class="errorMessage"></div>
<form class="form-horizontal">
<fieldset>
<div class="control-group">
<label class="control-label" for="newTitle"><spring:message code="NAME"/>:</label>
<input class="control" name="title" id="newTitle" type="text" required="true"
placeholder="Name of the new map to create" autofocus="autofocus"/>
</div>
<div class="control-group">
<label class="control-label" for="newDec"><spring:message code="DESCRIPTION"/>:</label>
<input class="control" name="description" id="newDec" type="text"
placeholder="Some description for your map"/>
</div>
</fieldset>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-primary btn-accept" data-loading-text="Saving ...">Create</button>
<button class="btn btn-cancel" data-dismiss="modal">Cancel</button>
</div>
</div> </div>
<div class="modal-body">
<!-- Duplicate map dialog --> <div class="errorMessage"></div>
<div id="duplicate-dialog-modal" class="modal fade" style="display: none"> <form class="form-horizontal">
<div class="modal-header"> <fieldset>
<button class="close" data-dismiss="modal">X</button> <div class="control-group">
<h3 id="dupDialogTitle"></h3> <label for="title" class="control-label"><spring:message code="NAME"/>: </label>
</div> <input name="title" id="title" type="text" required="required"
<div class="modal-body"> placeholder="Name of the new map to create" autofocus="autofocus"
<div class="errorMessage"></div> class="control"/>
<form class="form-horizontal"> </div>
<fieldset> <div class="control-group">
<div class="control-group"> <label for="description" class="control-label"><spring:message
<label for="title" class="control-label"><spring:message code="NAME"/>: </label> code="DESCRIPTION"/>: </label>
<input name="title" id="title" type="text" required="required" <input name="description" id="description" type="text"
placeholder="Name of the new map to create" autofocus="autofocus" placeholder="Some description for your map" class="control"/>
class="control"/> </div>
</div> </fieldset>
<div class="control-group"> </form>
<label for="description" class="control-label"><spring:message
code="DESCRIPTION"/>: </label>
<input name="description" id="description" type="text"
placeholder="Some description for your map" class="control"/>
</div>
</fieldset>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-primary btn-accept" data-loading-text="Saving ...">Duplicate</button>
<button class="btn btn-cancel" data-dismiss="modal">Cancel</button>
</div>
</div> </div>
<div class="modal-footer">
<button class="btn btn-primary btn-accept" data-loading-text="Saving ...">Duplicate</button>
<button class="btn btn-cancel" data-dismiss="modal">Cancel</button>
</div>
</div>
<!-- Rename map dialog --> <!-- Rename map dialog -->
<div id="rename-dialog-modal" class="modal fade" style="display: none"> <div id="rename-dialog-modal" class="modal fade" style="display: none">
<div class="modal-header"> <div class="modal-header">
<button class="close" data-dismiss="modal">x</button> <button class="close" data-dismiss="modal">x</button>
<h3 id="renameDialogTitle"></h3> <h3 id="renameDialogTitle"></h3>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="errorMessage"></div> <div class="errorMessage"></div>
<form class="form-horizontal"> <form class="form-horizontal">
<fieldset> <fieldset>
<div class="control-group"> <div class="control-group">
<label for="renTitle" class="control-label"><spring:message code="NAME"/>: </label> <label for="renTitle" class="control-label"><spring:message code="NAME"/>: </label>
<input name="title" id="renTitle" required="required" autofocus="autofocus" <input name="title" id="renTitle" required="required" autofocus="autofocus"
class="control"/> class="control"/>
</div> </div>
<div class="control-group"> <div class="control-group">
<label for="renDescription" class="control-label"><spring:message <label for="renDescription" class="control-label"><spring:message
code="DESCRIPTION"/>:</label> code="DESCRIPTION"/>:</label>
<input name="description" class="control" id="renDescription"/> <input name="description" class="control" id="renDescription"/>
</div> </div>
</fieldset> </fieldset>
</form> </form>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button class="btn btn-primary btn-accept" data-loading-text="Saving ...">Rename</button> <button class="btn btn-primary btn-accept" data-loading-text="Saving ...">Rename</button>
<button class="btn btn-cancel" data-dismiss="modal">Cancel</button> <button class="btn btn-cancel" data-dismiss="modal">Cancel</button>
</div>
</div> </div>
</div> </div>
@ -441,17 +464,5 @@
<button class="btn btn-cancel" data-dismiss="modal">Cancel</button> <button class="btn btn-cancel" data-dismiss="modal">Cancel</button>
</div> </div>
</div> </div>
<div id="map-table">
<table class="table table-bordered" id="mindmapListTable">
</table>
<div id="tableFooter" class="form-inline"></div>
</div>
</div>
</div>
<jsp:include page="footer.jsp"/>
</body> </body>
</html> </html>

View File

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

View File

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