From 8be38885d043220e3e5635cb2bffb42e9620ecd1 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 14 Sep 2007 19:27:34 +0000 Subject: [PATCH] elofgren: USABILITY: Fix usability issue #66 'Cancel button needs to be added to Send Newsletter Window' by adding a Cancel button and aligning it left. More info here: http://www.elijahlofgren.com/silverstripe/cancel-button-needs-to-be-added-to-send-newsletter-window/ (merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@41794 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- css/cms_right.css | 6 ++++++ javascript/NewsletterAdmin_right.js | 12 ++++++++++++ templates/Includes/NewsletterAdmin_right.ss | 5 ++++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/css/cms_right.css b/css/cms_right.css index 522b8259..1758555c 100644 --- a/css/cms_right.css +++ b/css/cms_right.css @@ -87,6 +87,12 @@ html>body .right form textarea.htmleditor { .right form .optionset li { list-style: none; } +.right form .optionset li.cancel { + float: left; +} +.right form .optionset li.submit { + text-align: right; +} .right form h2 { clear: both; diff --git a/javascript/NewsletterAdmin_right.js b/javascript/NewsletterAdmin_right.js index 4dc66edd..1f73cdef 100755 --- a/javascript/NewsletterAdmin_right.js +++ b/javascript/NewsletterAdmin_right.js @@ -2,6 +2,18 @@ function action_send_right() { $('action_send_options').toggle(); } +/** + * Hides the drop-down Send newsletter form if Cancel button is clicked + */ +Behaviour.register( { + '#action_send_cancel': { + onclick : function() { + $('action_send_options').toggle(); + return false; + } + } +}); + CMSForm.applyTo('#Form_MemberForm','rightbottom'); Behaviour.register({ diff --git a/templates/Includes/NewsletterAdmin_right.ss b/templates/Includes/NewsletterAdmin_right.ss index 66428707..2fe8b875 100755 --- a/templates/Includes/NewsletterAdmin_right.ss +++ b/templates/Includes/NewsletterAdmin_right.ss @@ -17,7 +17,10 @@

- +