diff --git a/webapp/web/css/menupage/testmenupage.css b/webapp/web/css/menupage/testmenupage.css index 78bf18d03..3e067314b 100644 --- a/webapp/web/css/menupage/testmenupage.css +++ b/webapp/web/css/menupage/testmenupage.css @@ -10,12 +10,6 @@ #edit-menu-item p { margin-top: 15px; } -#add-menu-item input[type="text"], -#edit-menu-item input[type="text"], -#add-menu-item select, -#edit-menu-item select { - width: 20em; -} #add-menu-item input[name="prettyUrl"], #edit-menu-item input[name="prettyUrl"] { margin-bottom: 0; @@ -45,4 +39,7 @@ ul#selectedClasses { #internal-class { margin-top: 10px; margin-bottom: 10px; +} +ul#selectedClasses li { + margin-left: .4em; } \ No newline at end of file diff --git a/webapp/web/js/menupage/menuManagementUtils.js b/webapp/web/js/menupage/menuManagementUtils.js new file mode 100644 index 000000000..65f975e50 --- /dev/null +++ b/webapp/web/js/menupage/menuManagementUtils.js @@ -0,0 +1,47 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +// menu management util tools + +$(document).ready(function(){ + + // reveal/unveil custom template field + $('input.default-template').click(function(){ + if ( this.checked ) { + // If checked, hide this input element + $('#custom-template').addClass('hidden'); + } + else { + // if not checked, display them + $('#custom-template').removeClass('hidden'); + } + }); + + $('input.custom-template').click(function(){ + if ( this.checked ) { + // If checked, hide this input element + $('#custom-template').removeClass('hidden'); + // And clear any values entered in the password fields + //$('input[name=confirmPassword]').val(""); + } + //else { + // if not checked, display them + // $('#custom-template').removeClass('hidden'); + //} + }); + + // Check/unckeck all account for deletion + $('input:checkbox[name=allSelected]').click(function(){ + if ( this.checked ) { + // if checked, select all the checkboxes + $('input:checkbox[name=classInClassGroup]').attr('checked','checked'); + + } else { + // if not checked, deselect all the checkboxes + $('input:checkbox[name=classInClassGroup]').removeAttr('checked'); + } + }); + + $('input:checkbox[name=classInClassGroup]').click(function(){ + $('input:checkbox[name=allSelected]').removeAttr('checked'); + }); +}); \ No newline at end of file diff --git a/webapp/web/templates/freemarker/edit/forms/testMenuManagement.ftl b/webapp/web/templates/freemarker/edit/forms/testMenuManagement.ftl index 1b6e3acd6..aa777db9e 100644 --- a/webapp/web/templates/freemarker/edit/forms/testMenuManagement.ftl +++ b/webapp/web/templates/freemarker/edit/forms/testMenuManagement.ftl @@ -1,8 +1,6 @@ <#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> -<#--Since we are going to use one template for adding and editing a menu item, - it will be necessary to provide a freemarker variable that lets us know if you are in edit or add mode. This is up - to you Huda the way you implement it. --> +<#--Template for adding and editing menu items --> <#-- some additional processing here which shows or hides the class group selection and classes based on initial action--> <#assign existingClassGroupStyle = " " /> @@ -16,50 +14,51 @@
- - - + + + - + - +

(Format: / - ie. /people)

<#--Commented out for now -->

Template *

- checked /> + checked role="radio" />
- checked /> + checked role="input" /> <#if selectedTemplateType = "custom"> -
- * +
+ * +
-
+

Selected content type for the associated page

- ${associatedPage} - Change content type + ${associatedPage} + Change content type

<#-- Select class group --> -
+
- + <#list classGroups as aClassGroup> - +
@@ -67,17 +66,15 @@ <#-- Select classes in a class group -->

Select content to display

- -
    +