pagemanagement - added cancel button to main content type sections
This commit is contained in:
parent
1aed1c4976
commit
7ea00cd5a8
5 changed files with 22 additions and 6 deletions
|
@ -133,4 +133,8 @@ form#managePage textarea {
|
||||||
margin-bottom: .8em;
|
margin-bottom: .8em;
|
||||||
width: 65%;
|
width: 65%;
|
||||||
}
|
}
|
||||||
|
.disabledSubmit {
|
||||||
|
color: #ede ! important;
|
||||||
|
background-color: #b2d15a ! important;
|
||||||
|
cursor: default ! important;
|
||||||
|
}
|
||||||
|
|
|
@ -118,6 +118,7 @@ var pageManagementUtils = {
|
||||||
this.pageContentSubmissionInputs = $("#pageContentSubmissionInputs");
|
this.pageContentSubmissionInputs = $("#pageContentSubmissionInputs");
|
||||||
this.headerBar = $("section#headerBar");
|
this.headerBar = $("section#headerBar");
|
||||||
this.doneButton = $("input#doneWithContent");
|
this.doneButton = $("input#doneWithContent");
|
||||||
|
this.cancelLink = $("a#cancelContentLink");
|
||||||
this.isMenuCheckbox = $("input#menuCheckbox");
|
this.isMenuCheckbox = $("input#menuCheckbox");
|
||||||
this.menuLinkText = $("input#menuLinkText");
|
this.menuLinkText = $("input#menuLinkText");
|
||||||
this.menuSection = $("section#menu");
|
this.menuSection = $("section#menu");
|
||||||
|
@ -181,6 +182,15 @@ var pageManagementUtils = {
|
||||||
pageManagementUtils.handleClickDone();
|
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
|
//replacing with menu management edit version which is extended with some of the logic below
|
||||||
this.selectClassGroupDropdown.change(function() {
|
this.selectClassGroupDropdown.change(function() {
|
||||||
pageManagementUtils.chooseClassGroup();
|
pageManagementUtils.chooseClassGroup();
|
||||||
|
@ -266,7 +276,6 @@ var pageManagementUtils = {
|
||||||
pageManagementUtils.classGroupSection.show();
|
pageManagementUtils.classGroupSection.show();
|
||||||
pageManagementUtils.fixedHTMLSection.hide();
|
pageManagementUtils.fixedHTMLSection.hide();
|
||||||
pageManagementUtils.sparqlQuerySection.hide();
|
pageManagementUtils.sparqlQuerySection.hide();
|
||||||
// tlw72 pageManagementUtils.moreContentButton.hide();
|
|
||||||
pageManagementUtils.headerBar.text("Browse Class Group - ");
|
pageManagementUtils.headerBar.text("Browse Class Group - ");
|
||||||
pageManagementUtils.headerBar.show();
|
pageManagementUtils.headerBar.show();
|
||||||
}
|
}
|
||||||
|
@ -286,13 +295,11 @@ var pageManagementUtils = {
|
||||||
|
|
||||||
pageManagementUtils.headerBar.show();
|
pageManagementUtils.headerBar.show();
|
||||||
pageManagementUtils.classesForClassGroup.addClass('hidden');
|
pageManagementUtils.classesForClassGroup.addClass('hidden');
|
||||||
// tlw72 pageManagementUtils.moreContentButton.show();
|
|
||||||
}
|
}
|
||||||
if ( _this.contentTypeSelect.val() == "" ) {
|
if ( _this.contentTypeSelect.val() == "" ) {
|
||||||
pageManagementUtils.classGroupSection.hide();
|
pageManagementUtils.classGroupSection.hide();
|
||||||
pageManagementUtils.fixedHTMLSection.hide();
|
pageManagementUtils.fixedHTMLSection.hide();
|
||||||
pageManagementUtils.sparqlQuerySection.hide();
|
pageManagementUtils.sparqlQuerySection.hide();
|
||||||
// tlw72 pageManagementUtils.moreContentButton.hide();
|
|
||||||
pageManagementUtils.classesForClassGroup.addClass('hidden');
|
pageManagementUtils.classesForClassGroup.addClass('hidden');
|
||||||
pageManagementUtils.headerBar.hide();
|
pageManagementUtils.headerBar.hide();
|
||||||
pageManagementUtils.headerBar.text("");
|
pageManagementUtils.headerBar.text("");
|
||||||
|
@ -352,6 +359,9 @@ var pageManagementUtils = {
|
||||||
//Clone the object, renaming ids and copying text area values as well
|
//Clone the object, renaming ids and copying text area values as well
|
||||||
$newContentObj = pageManagementUtils.createCloneObject(contentType, counter);
|
$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") {
|
if ( contentType == "sparqlQuery" || contentType == "fixedHtml") {
|
||||||
varOrClass = $newContentObj.find('input[name="saveToVar"]').val();
|
varOrClass = $newContentObj.find('input[name="saveToVar"]').val();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||||
<#-- Scripts for class group browsing -->
|
<#-- 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/processClassGroupDataGetterContent.js"></script>')}
|
||||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processIndividualsForClassesDataGetterContent.js"></script>')}
|
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processInternalClassDataGetterContent.js"></script>')}
|
||||||
<#--Setting up script with class group URIs and labels for editing purposes-->
|
|
||||||
|
|
|
@ -7,5 +7,6 @@
|
||||||
<label id="fixedHTMLValueLabel" for="fixedHTMLValue">Enter fixed HTML here<span id="fixedHTMLValueSpan"></span><span class="requiredHint"> *</span></label>
|
<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 />
|
<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" />
|
<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>
|
</section>
|
||||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processFixedHTMLDataGetterContent.js"></script>')}
|
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processFixedHTMLDataGetterContent.js"></script>')}
|
||||||
|
|
|
@ -9,5 +9,6 @@
|
||||||
<label id="queryLabel" for="queryLabel"><span id="querySpan">Enter SPARQL query here</span><span class="requiredHint"> *</span></label>
|
<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 />
|
<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" />
|
<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>
|
</section>
|
||||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processSparqlDataGetterContent.js"></script>')}
|
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processSparqlDataGetterContent.js"></script>')}
|
||||||
|
|
Loading…
Add table
Reference in a new issue