Parent Directory
|
Revision Log
|
Revision Graph
Initial commit of the spaces module. Spaces integrates with Organic Groups and the Context modules to provide customizable groups with various features.
| 1 | if (typeof(Drupal) == "undefined" || !Drupal.shout) { |
| 2 | Drupal.shout = {}; |
| 3 | } |
| 4 | |
| 5 | Drupal.shout.attach = function () { |
| 6 | $("form#spaces-shoutbox-ajaxform").submit(function() { |
| 7 | var shout = $('input.form-text', this).val(); |
| 8 | if (shout.length > 0) { |
| 9 | $.get( |
| 10 | Drupal.shout.shout_url, |
| 11 | {'shout': shout}, |
| 12 | function(data) { |
| 13 | if (data) { |
| 14 | $('form#spaces-shoutbox-ajaxform input.form-text').val(''); |
| 15 | $('div#spaces-shouts').prepend(data); |
| 16 | return false; |
| 17 | } |
| 18 | } |
| 19 | ); |
| 20 | } |
| 21 | return false; |
| 22 | }); |
| 23 | } |
| 24 | |
| 25 | if (Drupal.jsEnabled) { |
| 26 | $(document).ready(function() { |
| 27 | if ($('form#spaces-shoutbox-ajaxform').size() > 0) { |
| 28 | Drupal.shout.attach(); |
| 29 | } |
| 30 | }); |
| 31 | }; |
| ViewVC Help | |
| Powered by ViewVC 1.1.2 |