From: <hs...@us...> - 2011-04-26 15:53:49
|
Revision: 807 http://treebase.svn.sourceforge.net/treebase/?rev=807&view=rev Author: hshyket Date: 2011-04-26 15:53:43 +0000 (Tue, 26 Apr 2011) Log Message: ----------- Updating messages for highlighted menu items. Submit button on ready state form is greyed out if anything in yellow is selected. Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/ReadyStateController.java trunk/treebase-web/src/main/webapp/WEB-INF/pages/json/citationToJSON.jsp trunk/treebase-web/src/main/webapp/WEB-INF/pages/readyState.jsp trunk/treebase-web/src/main/webapp/scripts/user/submissionSummary.js Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/ReadyStateController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/ReadyStateController.java 2011-04-26 00:28:51 UTC (rev 806) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/ReadyStateController.java 2011-04-26 15:53:43 UTC (rev 807) @@ -97,7 +97,7 @@ } - protected Map<String, Boolean> referenceData(HttpServletRequest pRequest) { + /*protected Map<String, Boolean> referenceData(HttpServletRequest pRequest) { String subid = ServletRequestUtils.getStringParameter(pRequest, "submissionid", null); Study study = mStudyService.findBySubmissionID(Long.parseLong(subid)); @@ -105,6 +105,17 @@ validatedProperties.put("AnalysesStatus", study.getAnalysesStatus()); return validatedProperties; + }*/ + + protected Map<String, Object> referenceData(HttpServletRequest pRequest) { + String subid = ServletRequestUtils.getStringParameter(pRequest, "submissionid", null); + Study study = mStudyService.findBySubmissionID(Long.parseLong(subid)); + + HashMap<String, Object> validatedProperties = new HashMap<String, Object>(); + validatedProperties.put("AnalysesStatus", study.getAnalysesStatus()); + validatedProperties.put("submissionNumber", Long.parseLong(subid)); + + return validatedProperties; } /** Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/json/citationToJSON.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/json/citationToJSON.jsp 2011-04-26 00:28:51 UTC (rev 806) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/json/citationToJSON.jsp 2011-04-26 15:53:43 UTC (rev 807) @@ -1,3 +1,20 @@ -<%@ include file="/common/taglibs.jsp"%> -<c:if test="${citation == null}">null</c:if> -<c:if test="${citation != null}">{id:${citation.id}}</c:if> \ No newline at end of file +<%@ include file="/common/taglibs.jsp"%> +<c:if test="${citation == null}">null</c:if> +<c:if test="${citation != null}"> +{ + id:${citation.id}, + citationType:'${citation.citationType}', + <c:choose> + <c:when test="${citation.citationType == 'Article'}"> + journal:'${citation.journal}' + </c:when> + <c:when test="${citation.citationType == 'Book'}"> + booktitle:'${citation.bookTitle}' + </c:when> + <c:when test="${citation.citationType == 'Book Section'}"> + booktitle:'${citation.bookTitle}', + sectiontitle:'${citation.sectionTitle}', + </c:when> + </c:choose> +} +</c:if> \ No newline at end of file Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/readyState.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/readyState.jsp 2011-04-26 00:28:51 UTC (rev 806) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/readyState.jsp 2011-04-26 15:53:43 UTC (rev 807) @@ -6,12 +6,14 @@ <form method="post"> +<%-- <c:if test="${AnalysesStatus eq false}"> <p style="color:red;font-weight:bold"> We notice that some of your taxon labels have failed to be validated against an external taxonomy. Unless it is impossible to validate these labels, TreeBASE may refuse or delay the acceptance of your data. </p> -</c:if> +</c:if> +--%> <p style="font-weight:bold"> Are you sure that you want to change the status of this study to 'Ready State'? This means that you are ready for the review process. If yes press Submit, @@ -21,8 +23,18 @@ Please note: after you press the Submit button you will no longer be able to make any further changes to this study. The study will be available in 'READ ONLY' mode. </p> - -<input type="submit" name="Submit" value="Submit"/> -<input type="submit" name="_cancel" value = "Cancel"/> - +<p class="readyStateError" style="display:none;"> + The items in the Tool Box on the right that are highlighted in yellow indicate that the item either has not been visited or there is an error. Hovering your mouse over the item will indicate the nature of the problem. Your submission cannot be changed to "Ready" state until all highlighted items are addressed. Please return to your submission to complete it. If you think this request is in error, please contact <a href='mailto:he...@tr...?subject=TreeBASE Submission S<c:out value="${submissionNumber}"/>'>help</a>. + <br /><br /> + The most common problems include: + <br /><br /> + (1) The submitter has not entered a citation that at a minimum must include the authors, year, title, and journal name.<br /> + (2) The submitter has "orphaned" matrices or trees: i.e., there are matrices that are not listed as inputs to at least one analysis; or trees that are not listed as outputs from at least one analysis. If your paper does not include a tree, please submit a generic neighbor joining tree to satisfy this requirement.<br /> + (3) The output tree of an analysis has taxon labels that do not match with the input matrix (i.e. there are taxon labels in the tree that are missing from the matrix or matrices that produced the tree). Preparing your submission using <a href='http://mesquiteproject.org/'>Mesquite</a>, in which both matrices and trees are part of the same Mesquite project and share a common taxon block, will avoid the problem of mismatched taxon labels.<br /> + (4) The submitter has not attempted to validate the taxon labels by clicking the "Validate Taxon Labels" button in the Taxa section. +</p> +<p> + <input type="submit" name="Submit" value="Submit" id="submitReadyState"/> + <input type="submit" name="_cancel" value = "Cancel"/> +</p> </form> \ No newline at end of file Modified: trunk/treebase-web/src/main/webapp/scripts/user/submissionSummary.js =================================================================== --- trunk/treebase-web/src/main/webapp/scripts/user/submissionSummary.js 2011-04-26 00:28:51 UTC (rev 806) +++ trunk/treebase-web/src/main/webapp/scripts/user/submissionSummary.js 2011-04-26 15:53:43 UTC (rev 807) @@ -142,7 +142,7 @@ if ( TreeBASE.study && TreeBASE.study.analyses ) { writeAnalyses(); writeNexusFileNames(); - decorateNotes(); + //decorateNotes(); decorateCitation(); decorateAuthors(); decorateUpload(); @@ -247,6 +247,44 @@ citationLi.addClassName('notAnalyzed'); citationLi.select('a.Citation')[0].title = 'No citation information has been entered yet'; } + else { + var isCitationError = false; + var citationErrorMessage = ''; + switch( TreeBASE.study.citation.citationType ){ + case 'Article': + if ( TreeBASE.study.citation.journal.length == 0 ) { + isCitationError = true; + citationErrorMessage = 'No journal name has been entered'; + } + break + case 'Book': + if ( TreeBASE.study.citation.booktitle.length == 0 ) { + isCitationError = true; + citationErrorMessage = 'No book title has been entered'; + } + break + case 'Book Section': + if (TreeBASE.study.citation.booktitle.length == 0) { + isCitationError = true; + citationErrorMessage = 'No book title has been entered'; + } + if (TreeBASE.study.citation.sectiontitle.length == 0) { + if ( isCitationError ) { + citationErrorMessage += '; '; + } + isCitationError = true; + citationErrorMessage += 'No book section has been entered'; + } + break + } + + if ( isCitationError ){ + var citationLi = $('menuList').select('li.Citation')[0]; + citationLi.addClassName('notAnalyzed'); + citationLi.select('a.Citation')[0].title = citationErrorMessage; + } + } + } function decorateAuthors() { if ( TreeBASE.study.authors.length == 0 ) { @@ -352,7 +390,7 @@ ul = createUnorderedList(taxonLabels,'taxonLabel','taxonLabel'); ul.style.display = 'none'; taxaLi.appendChild(ul); - var taxonLabelLis = ul.select('li'); + /*var taxonLabelLis = ul.select('li'); var analyzed = 'analyzed'; for ( var i = 0; i < taxonLabelLis.length; i++ ) { var id = taxonLabelLis[i].id; @@ -369,7 +407,7 @@ taxaLi.addClassName(analyzed); if ( analyzed == 'notAnalyzed' ) { taxaLi.select('a.Taxa')[0].title = 'Some taxa have not been linked to external taxonomy yet'; - } + }*/ } else { taxaLi.addClassName('emptyList'); @@ -466,4 +504,13 @@ }); TreeBASE.register(initializeMenus); })() + +var submitButton = $('submitReadyState'); +if (submitButton != null && submitButton != undefined) { + var notAnalyzed = $$('li.notAnalyzed'); + if (notAnalyzed != null && notAnalyzed != undefined) { + submitButton.disable(); + $$('p.readyStateError').invoke('setStyle', { display: 'block' }); + } +}; /* end of closure */ \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |