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
This commit is contained in:
Ingo Schommer 2007-09-14 19:27:34 +00:00
parent 74214051b8
commit 8be38885d0
3 changed files with 22 additions and 1 deletions

View File

@ -87,6 +87,12 @@ html>body .right form textarea.htmleditor {
.right form .optionset li { .right form .optionset li {
list-style: none; list-style: none;
} }
.right form .optionset li.cancel {
float: left;
}
.right form .optionset li.submit {
text-align: right;
}
.right form h2 { .right form h2 {
clear: both; clear: both;

View File

@ -2,6 +2,18 @@ function action_send_right() {
$('action_send_options').toggle(); $('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'); CMSForm.applyTo('#Form_MemberForm','rightbottom');
Behaviour.register({ Behaviour.register({

View File

@ -17,7 +17,10 @@
</fieldset> </fieldset>
<p class="actions"> <p class="actions">
<input type="submit" value="Send newsletter" /> <ul class="optionset">
<li class="cancel"><button id="action_send_cancel">Cancel</button></li>
<li class="submit"><input type="submit" value="Send newsletter" /></li>
</ul>
</p> </p>
</form> </form>