diff --git a/webapp/web/css/menupage/pageManagement.css b/webapp/web/css/menupage/pageManagement.css index 72088a41f..d81d55c31 100644 --- a/webapp/web/css/menupage/pageManagement.css +++ b/webapp/web/css/menupage/pageManagement.css @@ -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; +} diff --git a/webapp/web/js/menupage/pageManagementUtils.js b/webapp/web/js/menupage/pageManagementUtils.js index 462990a03..394c1dd69 100644 --- a/webapp/web/js/menupage/pageManagementUtils.js +++ b/webapp/web/js/menupage/pageManagementUtils.js @@ -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: "" + contentTypeLabel + " - " + varOrClass + "
" + + "' class='pageContentWrapper'> or delete" }); //Hide inner div var $innerDiv = $newDivContainer.children('div#innerContainer' + counter); @@ -360,12 +364,13 @@ var pageManagementUtils = { pageManagementUtils.bindClonedContentContainerEvents($newDivContainer, counter); //Append the new container to the section storing these containers $newDivContainer.appendTo($('section#contentDivs')); - //place new content object + //place new content object $newContentObj.prependTo($innerDiv); }, 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 @@ -715,9 +719,9 @@ var pageManagementUtils = { }); return validationErrorMsg; } - -}; +} + $(document).ready(function() { pageManagementUtils.onLoad(); }); diff --git a/webapp/web/templates/freemarker/body/individual/individual-menu.ftl b/webapp/web/templates/freemarker/body/individual/individual-menu.ftl index 6bf15e1c5..65ebad2b8 100644 --- a/webapp/web/templates/freemarker/body/individual/individual-menu.ftl +++ b/webapp/web/templates/freemarker/body/individual/individual-menu.ftl @@ -25,8 +25,14 @@ <#-- Link to add a new menu item --> <#if editable> <#if addNewMenuItemUrl?has_content> -

Add menu item

- +
+ + + + + +
+

Refresh page after reordering menu items

diff --git a/webapp/web/templates/freemarker/body/pagemanagement/pageList.ftl b/webapp/web/templates/freemarker/body/pagemanagement/pageList.ftl index 652cd71e6..f9be483a4 100644 --- a/webapp/web/templates/freemarker/body/pagemanagement/pageList.ftl +++ b/webapp/web/templates/freemarker/body/pagemanagement/pageList.ftl @@ -44,7 +44,7 @@ - profile page + profile page    <#if !pagex.listedPageCannotDeletePage?has_content > delete diff --git a/webapp/web/templates/freemarker/edit/forms/pageManagement--browseClassGroups.ftl b/webapp/web/templates/freemarker/edit/forms/pageManagement--browseClassGroups.ftl index 22a14990e..42b145f8e 100644 --- a/webapp/web/templates/freemarker/edit/forms/pageManagement--browseClassGroups.ftl +++ b/webapp/web/templates/freemarker/edit/forms/pageManagement--browseClassGroups.ftl @@ -50,7 +50,8 @@ - +
+ <#--Include JavaScript specific to the types of data getters related to this content--> diff --git a/webapp/web/templates/freemarker/edit/forms/pageManagement--fixedHtml.ftl b/webapp/web/templates/freemarker/edit/forms/pageManagement--fixedHtml.ftl index cd7f46929..14145a69f 100644 --- a/webapp/web/templates/freemarker/edit/forms/pageManagement--fixedHtml.ftl +++ b/webapp/web/templates/freemarker/edit/forms/pageManagement--fixedHtml.ftl @@ -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--> -
+
- +
+
${scripts.add('')} diff --git a/webapp/web/templates/freemarker/edit/forms/pageManagement--sparqlQuery.ftl b/webapp/web/templates/freemarker/edit/forms/pageManagement--sparqlQuery.ftl index e453d7fda..f64bc58d5 100644 --- a/webapp/web/templates/freemarker/edit/forms/pageManagement--sparqlQuery.ftl +++ b/webapp/web/templates/freemarker/edit/forms/pageManagement--sparqlQuery.ftl @@ -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--> -
+
- <#--Hiding query model for now--> + <#-- --> - +
+
${scripts.add('')} diff --git a/webapp/web/templates/freemarker/edit/forms/pageManagement.ftl b/webapp/web/templates/freemarker/edit/forms/pageManagement.ftl index 6ae961e71..81b67222a 100644 --- a/webapp/web/templates/freemarker/edit/forms/pageManagement.ftl +++ b/webapp/web/templates/freemarker/edit/forms/pageManagement.ftl @@ -54,7 +54,7 @@ - +  Add one or more content types
@@ -63,8 +63,7 @@ <#--This include file contains links to the templates that will be cloned and used for the different content types--> - <#include "pageManagement--contentTemplates.ftl"> - + <#include "pageManagement--contentTemplates.ftl">