/[drupal]/contributions/modules/simplenews/simplenews.js
ViewVC logotype

Contents of /contributions/modules/simplenews/simplenews.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Tue Sep 30 20:07:34 2008 UTC (13 months, 3 weeks ago) by sutharsan
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-6--1, DRUPAL-6--2
File MIME type: text/javascript
Changes to send actions and email options in node add/edit form
1 // $Id$
2
3 /**
4 * Set text of Save button dependent on the selected send option.
5 */
6 Drupal.behaviors.simplenewsCommandSend = function (context) {
7 var simplenewsSendButton = function () {
8 switch ($(".simplenews-command-send :radio:checked").val()) {
9 case '0':
10 $('#edit-submit').attr({value: Drupal.t('Save')});
11 break;
12 case '1':
13 $('#edit-submit').attr({value: Drupal.t('Save and send')});
14 break;
15 case '2':
16 $('#edit-submit').attr({value: Drupal.t('Save and send test')});
17 break;
18 }
19 }
20
21 // Update send button at page load and when a send option is selected.
22 $(function() { simplenewsSendButton(); });
23 $(".simplenews-command-send").click( function() { simplenewsSendButton(); });
24
25
26 }

  ViewVC Help
Powered by ViewVC 1.1.2