page managemnet changes
This commit is contained in:
parent
544839906e
commit
54941a201b
8 changed files with 82 additions and 38 deletions
|
@ -1,12 +1,9 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
.pageContent {
|
||||
"background-color":"",
|
||||
"padding-left":"",
|
||||
"padding-top":"",
|
||||
"border-width":"",
|
||||
"border-style":"",
|
||||
"border-color":"#ccc"}
|
||||
padding-left:6px;
|
||||
padding-top:2px;
|
||||
}
|
||||
|
||||
.pageContentContainer {
|
||||
background-color:#f5f5f5;
|
||||
|
@ -18,6 +15,7 @@
|
|||
|
||||
.pageContentTypeLabel {
|
||||
padding-left:6px;
|
||||
color:#064D68;
|
||||
}
|
||||
|
||||
.pageContentWrapper {
|
||||
|
@ -33,7 +31,14 @@
|
|||
float:right;
|
||||
padding-right:5px;
|
||||
}
|
||||
|
||||
.sparqlHtmlContent {
|
||||
background-color:#f9f9f9;
|
||||
padding-left:6px;
|
||||
padding-top:2px;
|
||||
border-width:1px;
|
||||
border-style:solid;
|
||||
border-color:#ccc;
|
||||
}
|
||||
.arrow {
|
||||
width:13px;
|
||||
height:9px;
|
||||
|
@ -51,6 +56,7 @@
|
|||
.deleteButton {
|
||||
margin-bottom:5px;
|
||||
}
|
||||
|
||||
section#floatRight {
|
||||
margin-top:0px;
|
||||
float:right;
|
||||
|
@ -68,6 +74,7 @@ section#headerBar {
|
|||
border-style:solid;
|
||||
border-bottom-width:0px;
|
||||
padding-left:6px;
|
||||
color:#064D68;
|
||||
}
|
||||
input#moreContent {
|
||||
margin-top:8px;
|
||||
|
@ -90,4 +97,29 @@ section.hideMenuSection {
|
|||
section.showMenuSection {
|
||||
margin-top:10px;
|
||||
}
|
||||
|
||||
input.doneWithContent {
|
||||
display: inline;
|
||||
padding: 5px 18px 7px;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
background-color: #398aac;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
line-height: 1;
|
||||
margin-right: .6em;
|
||||
margin-bottom:8px;
|
||||
margin-top:0px;
|
||||
}
|
||||
span.deleteLinkContainer {
|
||||
float:left;
|
||||
margin-left:100px;
|
||||
margin-top:-36px;
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ var pageManagementUtils = {
|
|||
this.displayInternalMessage = $('#internal-class label em');
|
||||
this.pageContentSubmissionInputs = $("#pageContentSubmissionInputs");
|
||||
this.headerBar = $("section#headerBar");
|
||||
this.moreContentButton = $("input#moreContent");
|
||||
this.doneButton = $("input#doneWithContent");
|
||||
this.isMenuCheckbox = $("input#menuCheckbox");
|
||||
this.menuSection = $("section#menu");
|
||||
this.submitButton = $("input#submit");
|
||||
|
@ -132,7 +132,7 @@ var pageManagementUtils = {
|
|||
this.sparqlQuerySection.hide();
|
||||
this.fixedHTMLSection.hide();
|
||||
this.classesForClassGroup.addClass('hidden');
|
||||
this.moreContentButton.hide();
|
||||
// tlw72 this.moreContentButton.hide();
|
||||
//left side components
|
||||
//These depend on whether or not this is an existing item or not
|
||||
if(this.isAdd()) {
|
||||
|
@ -169,7 +169,7 @@ var pageManagementUtils = {
|
|||
|
||||
//Collapses the current content and creates a new section of content
|
||||
//Resets the content to be cloned to default settings
|
||||
this.moreContentButton.click( function() {
|
||||
this.doneButton.click( function() {
|
||||
var selectedType = pageManagementUtils.contentTypeSelect.val();
|
||||
var selectedTypeText = $("#typeSelect option:selected").text();
|
||||
|
||||
|
@ -179,7 +179,6 @@ var pageManagementUtils = {
|
|||
pageManagementUtils.sparqlQuerySection.hide();
|
||||
//Reset main content type drop-down
|
||||
pageManagementUtils.contentTypeSelectOptions.eq(0).attr('selected', 'selected');
|
||||
pageManagementUtils.moreContentButton.hide();
|
||||
if ( pageManagementUtils.leftSideDiv.css("height") != undefined ) {
|
||||
pageManagementUtils.leftSideDiv.css("height","");
|
||||
if ( pageManagementUtils.leftSideDiv.height() < pageManagementUtils.rightSideDiv.height() ) {
|
||||
|
@ -238,7 +237,7 @@ var pageManagementUtils = {
|
|||
pageManagementUtils.classGroupSection.show();
|
||||
pageManagementUtils.fixedHTMLSection.hide();
|
||||
pageManagementUtils.sparqlQuerySection.hide();
|
||||
pageManagementUtils.moreContentButton.hide();
|
||||
// tlw72 pageManagementUtils.moreContentButton.hide();
|
||||
pageManagementUtils.headerBar.text("Browse Class Group - ");
|
||||
pageManagementUtils.headerBar.show();
|
||||
}
|
||||
|
@ -258,13 +257,13 @@ var pageManagementUtils = {
|
|||
|
||||
pageManagementUtils.headerBar.show();
|
||||
pageManagementUtils.classesForClassGroup.addClass('hidden');
|
||||
pageManagementUtils.moreContentButton.show();
|
||||
// tlw72 pageManagementUtils.moreContentButton.show();
|
||||
}
|
||||
if ( _this.contentTypeSelect.val() == "" ) {
|
||||
pageManagementUtils.classGroupSection.hide();
|
||||
pageManagementUtils.fixedHTMLSection.hide();
|
||||
pageManagementUtils.sparqlQuerySection.hide();
|
||||
pageManagementUtils.moreContentButton.hide();
|
||||
// tlw72 pageManagementUtils.moreContentButton.hide();
|
||||
pageManagementUtils.classesForClassGroup.addClass('hidden');
|
||||
pageManagementUtils.headerBar.hide();
|
||||
pageManagementUtils.headerBar.text("");
|
||||
|
@ -291,8 +290,13 @@ var pageManagementUtils = {
|
|||
|
||||
},
|
||||
clearInputs:function($el) {
|
||||
//jquery selector :input selects all input text area select and button elements
|
||||
$el.find("input").val("");
|
||||
// jquery selector :input selects all input text area select and button elements
|
||||
// $el.find("input").val(""); cannot delete the value of the done button -- tlw72
|
||||
$el.find("input").each( function() {
|
||||
if ( $(this).attr('id') != "doneWithContent" ) {
|
||||
$(this).val("");
|
||||
}
|
||||
});
|
||||
$el.find("textarea").val("");
|
||||
//resetting class group section as well so selection is reset if type changes
|
||||
$el.find("select option:eq(0)").attr("selected", "selected");
|
||||
|
@ -350,8 +354,8 @@ var pageManagementUtils = {
|
|||
html: "<span class='pageContentTypeLabel'>" + contentTypeLabel + " - " + varOrClass
|
||||
+ "</span><span id='clickable" + counter
|
||||
+ "' class='pageContentExpand'><div class='arrow expandArrow'></div></span><div id='innerContainer" + counter
|
||||
+ "' class='pageContentWrapper'><input id='remove" + counter
|
||||
+ "' type='button' class='delete' value='Delete' class='deleteButton' /></div>"
|
||||
+ "' class='pageContentWrapper'><span class='deleteLinkContainer'> or <a id='remove" + counter // changed button to a link
|
||||
+ "' href='' >delete</a></span></div>"
|
||||
});
|
||||
//Hide inner div
|
||||
var $innerDiv = $newDivContainer.children('div#innerContainer' + counter);
|
||||
|
@ -366,6 +370,7 @@ var pageManagementUtils = {
|
|||
bindClonedContentContainerEvents:function($newDivContainer, counter) {
|
||||
var $clickableSpan = $newDivContainer.children('span#clickable' + counter);
|
||||
var $innerDiv = $newDivContainer.children('div#innerContainer' + counter);
|
||||
|
||||
//Expand/collapse toggle
|
||||
$clickableSpan.click(function() {
|
||||
if ( $innerDiv.is(':visible') ) {
|
||||
|
@ -385,9 +390,9 @@ var pageManagementUtils = {
|
|||
window.setTimeout('pageManagementUtils.adjustSaveButtonHeight()', 223);
|
||||
});
|
||||
//remove button
|
||||
$newRemoveButton = $innerDiv.find('input#remove' + counter);
|
||||
$newRemoveLink = $innerDiv.find('a#remove' + counter); // tlw72 changed button to link
|
||||
//remove the content entirely
|
||||
$newRemoveButton.click(function() {
|
||||
$newRemoveLink.click(function() {
|
||||
//if content type of what is being deleted is browse class group, then
|
||||
//add browse classgroup back to set of options
|
||||
var contentType = $innerDiv.find("section.pageContent").attr("contentType");
|
||||
|
@ -462,12 +467,10 @@ var pageManagementUtils = {
|
|||
if (pageManagementUtils.selectClassGroupDropdown.val() == "" ) {
|
||||
pageManagementUtils.classesForClassGroup.addClass('hidden');
|
||||
$("div#leftSide").css("height","");
|
||||
pageManagementUtils.moreContentButton.hide();
|
||||
|
||||
}
|
||||
else {
|
||||
pageManagementUtils.classesForClassGroup.removeClass('hidden');
|
||||
pageManagementUtils.moreContentButton.show();
|
||||
if ( $("div#leftSide").height() < $("div#rightSide").height() ) {
|
||||
$("div#leftSide").css("height",$("div#rightSide").height() + "px");
|
||||
}
|
||||
|
@ -586,6 +589,7 @@ var pageManagementUtils = {
|
|||
createCloneObject:function(contentType, counter) {
|
||||
var originalObjectPath = 'section#' + contentType;
|
||||
var $newContentObj = $(originalObjectPath).clone();
|
||||
$newContentObj.removeClass("sparqlHtmlContent");
|
||||
$newContentObj.addClass("pageContent");
|
||||
$newContentObj.attr("contentNumber", counter);
|
||||
//Save content type
|
||||
|
@ -716,7 +720,7 @@ var pageManagementUtils = {
|
|||
return validationErrorMsg;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
pageManagementUtils.onLoad();
|
||||
|
|
|
@ -25,8 +25,14 @@
|
|||
<#-- Link to add a new menu item -->
|
||||
<#if editable>
|
||||
<#if addNewMenuItemUrl?has_content>
|
||||
<p><a class="add-hasElement green button" href="${addNewMenuItemUrl}" title="Add new menu item">Add menu item</a></p>
|
||||
<form id="pageListForm" action="${urls.base}/editRequestDispatch" method="get">
|
||||
<input type="hidden" name="typeOfNew" value="http://vitro.mannlib.cornell.edu/ontologies/display/1.1#Page">
|
||||
<input type="hidden" name="switchToDisplayModel" value="1">
|
||||
<input type="hidden" name="editForm" value="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.ManagePageGenerator" role="input">
|
||||
<input id="submit" value="Add new menu page" role="button" type="submit" >
|
||||
|
||||
</form>
|
||||
<br />
|
||||
<p class="note">Refresh page after reordering menu items</p>
|
||||
</#if>
|
||||
</#if>
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
</#if>
|
||||
</td>
|
||||
<td>
|
||||
<a href="${urls.base}/individual?uri=${pagex.listedPageUri?url}&switchToDisplayModel=1"><img src="${urls.images!}/profile-page-icon.png" title="view the profile properties for this page" alt="profile page"></a>
|
||||
<a href="${urls.base}/individual?uri=${pagex.listedPageUri?url}&switchToDisplayModel=1"><img src="${urls.images!}/profile-page-icon.png" title="view the individual profile for this page" alt="profile page"></a>
|
||||
|
||||
<#if !pagex.listedPageCannotDeletePage?has_content >
|
||||
<a cmd="deletePage" pageTitle=" ${pagex.listedPageTitle!}" href="${urls.base}/deletePageController?pageURI=${pagex.listedPageUri?url}"><img src="${urls.images!}/individual/deleteIcon.gif" title="delete this page" alt="delete"></a>
|
||||
|
|
|
@ -50,7 +50,8 @@
|
|||
<span class="ui-icon-sortable"></span>
|
||||
</li>
|
||||
</#list>
|
||||
</ul>
|
||||
</ul><br />
|
||||
<input type="button" id="doneWithContent" class="doneWithContent" name="moreContent" value="Done" />
|
||||
</section>
|
||||
</section>
|
||||
<#--Include JavaScript specific to the types of data getters related to this content-->
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
<#--This contains the template for the fixed HTML content type that is to be cloned and used in page management-->
|
||||
|
||||
<section id="fixedHtml" style="background-color:#f9f9f9;padding-left:6px;padding-top:2px;border-width:1px;border-style:solid;border-color:#ccc;">
|
||||
<section id="fixedHtml" class="sparqlHtmlContent">
|
||||
<label id="fixedHTMLVariableLabel" for="fixedHTMLVariable">Variable Name<span class="requiredHint"> *</span></label>
|
||||
<input type="text" name="saveToVar" size="20" value="" id="fixedHTMLSaveToVar" role="input" />
|
||||
<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>
|
||||
<textarea id="fixedHTMLValue" name="htmlValue" cols="70" rows="15" style="margin-bottom:7px"></textarea><br />
|
||||
<input type="button" id="doneWithContent" name="moreContent" value="Done" class="doneWithContent" />
|
||||
</section>
|
||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processFixedHTMLDataGetterContent.js"></script>')}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
<#--This contains the template for the Sparql Query content type that is to be cloned and used in page management-->
|
||||
<section id="sparqlQuery" style="background-color:#f9f9f9;padding-left:6px;padding-top:2px;border-width:1px;border-style:solid;border-color:#ccc;">
|
||||
<section id="sparqlQuery" class="sparqlHtmlContent">
|
||||
<label id="variableLabel" for="variable">Variable Name<span class="requiredHint"> *</span></label>
|
||||
<input type="text" name="saveToVar" size="20" value="" id="saveToVar" role="input" />
|
||||
<label id="queryModelLabel" for="queryModel">Query Model</label>
|
||||
<#--Hiding query model for now-->
|
||||
<#-- <label id="queryModelLabel" for="queryModel">Query Model</label> -->
|
||||
<input type="text" name="queryModel" size="20" value="" id="queryModel" role="input" style="display:none"/>
|
||||
<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>
|
||||
<textarea id="query" name="query" cols="70" rows="15" style="margin-bottom:7px"></textarea><br />
|
||||
<input type="button" id="doneWithContent" class="doneWithContent" name="moreContent" value="Done" />
|
||||
</section>
|
||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processSparqlDataGetterContent.js"></script>')}
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<option value="browseClassGroup">Browse Class Group</option>
|
||||
<option value="fixedHtml">Fixed HTML</option>
|
||||
<option value="sparqlQuery">SPARQL Query Results</option>
|
||||
</select>
|
||||
</select> <span class="note">Add one or more content types</span>
|
||||
</section>
|
||||
<section id="contentDivs"></section>
|
||||
<section id="headerBar" >
|
||||
|
@ -64,7 +64,6 @@
|
|||
<!--This content will be copied/shown for these particular content types, so any fields for n3 editing need to be included
|
||||
here that correspond to a specific content type. These are related to specific "data getters" on the server side. -->
|
||||
<#include "pageManagement--contentTemplates.ftl">
|
||||
<input type="button" id="moreContent" name="moreContent" value="Add More Content" class="delete" />
|
||||
</div>
|
||||
</section>
|
||||
<!--Information for page or menu item level-->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue