pagemanagement - added cancel button to main content type sections

This commit is contained in:
tworrall 2012-06-25 19:59:18 +00:00
parent 1aed1c4976
commit 7ea00cd5a8
5 changed files with 22 additions and 6 deletions

View file

@ -133,4 +133,8 @@ form#managePage textarea {
margin-bottom: .8em;
width: 65%;
}
.disabledSubmit {
color: #ede ! important;
background-color: #b2d15a ! important;
cursor: default ! important;
}

View file

@ -118,6 +118,7 @@ var pageManagementUtils = {
this.pageContentSubmissionInputs = $("#pageContentSubmissionInputs");
this.headerBar = $("section#headerBar");
this.doneButton = $("input#doneWithContent");
this.cancelLink = $("a#cancelContentLink");
this.isMenuCheckbox = $("input#menuCheckbox");
this.menuLinkText = $("input#menuLinkText");
this.menuSection = $("section#menu");
@ -181,6 +182,15 @@ var pageManagementUtils = {
pageManagementUtils.handleClickDone();
});
this.cancelLink.click( function() {
pageManagementUtils.clearSourceTemplateValues();
pageManagementUtils.headerBar.hide();
pageManagementUtils.classGroupSection.hide();
pageManagementUtils.fixedHTMLSection.hide();
pageManagementUtils.sparqlQuerySection.hide();
pageManagementUtils.contentTypeSelectOptions.eq(0).attr('selected', 'selected');
pageManagementUtils.contentTypeSelect.focus();
});
//replacing with menu management edit version which is extended with some of the logic below
this.selectClassGroupDropdown.change(function() {
pageManagementUtils.chooseClassGroup();
@ -266,7 +276,6 @@ var pageManagementUtils = {
pageManagementUtils.classGroupSection.show();
pageManagementUtils.fixedHTMLSection.hide();
pageManagementUtils.sparqlQuerySection.hide();
// tlw72 pageManagementUtils.moreContentButton.hide();
pageManagementUtils.headerBar.text("Browse Class Group - ");
pageManagementUtils.headerBar.show();
}
@ -286,13 +295,11 @@ var pageManagementUtils = {
pageManagementUtils.headerBar.show();
pageManagementUtils.classesForClassGroup.addClass('hidden');
// tlw72 pageManagementUtils.moreContentButton.show();
}
if ( _this.contentTypeSelect.val() == "" ) {
pageManagementUtils.classGroupSection.hide();
pageManagementUtils.fixedHTMLSection.hide();
pageManagementUtils.sparqlQuerySection.hide();
// tlw72 pageManagementUtils.moreContentButton.hide();
pageManagementUtils.classesForClassGroup.addClass('hidden');
pageManagementUtils.headerBar.hide();
pageManagementUtils.headerBar.text("");
@ -351,6 +358,9 @@ var pageManagementUtils = {
//Clone the object, renaming ids and copying text area values as well
$newContentObj = pageManagementUtils.createCloneObject(contentType, counter);
// Get rid of the cancel link; it'll be replaced by a delete link
$newContentObj.find('span#cancelContent' + counter).html('');
if ( contentType == "sparqlQuery" || contentType == "fixedHtml") {
varOrClass = $newContentObj.find('input[name="saveToVar"]').val();

View file

@ -1,5 +1,5 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Scripts for class group browsing -->
<#--Replaces Vitro's processing for individuals for classes with VIVO's processing internal classes-->
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processClassGroupDataGetterContent.js"></script>')}
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processIndividualsForClassesDataGetterContent.js"></script>')}
<#--Setting up script with class group URIs and labels for editing purposes-->
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processInternalClassDataGetterContent.js"></script>')}

View file

@ -7,5 +7,6 @@
<label id="fixedHTMLValueLabel" for="fixedHTMLValue">Enter fixed HTML here<span id="fixedHTMLValueSpan"></span><span class="requiredHint"> *</span></label>
<textarea id="fixedHTMLValue" name="htmlValue" cols="70" rows="15" style="margin-bottom:7px"></textarea><br />
<input type="button" id="doneWithContent" name="doneWithContent" value="Done" class="doneWithContent" />
<span id="cancelContent"> or <a class="cancel" href="javascript:" id="cancelContentLink" >Cancel</a></span>
</section>
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processFixedHTMLDataGetterContent.js"></script>')}

View file

@ -9,5 +9,6 @@
<label id="queryLabel" for="queryLabel"><span id="querySpan">Enter SPARQL query here</span><span class="requiredHint"> *</span></label>
<textarea id="query" name="query" cols="70" rows="15" style="margin-bottom:7px"></textarea><br />
<input type="button" id="doneWithContent" class="doneWithContent" name="doneWithContent" value="Done" />
<span id="cancelContent"> or <a class="cancel" href="javascript:" id="cancelContentLink" >Cancel</a></span>
</section>
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processSparqlDataGetterContent.js"></script>')}