/[drupal]/contributions/modules/spaces/spaces_shoutbox/spaces_shoutbox.js
ViewVC logotype

Contents of /contributions/modules/spaces/spaces_shoutbox/spaces_shoutbox.js

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


Revision 1.1 - (show annotations) (download) (as text)
Thu May 22 21:03:33 2008 UTC (18 months, 1 week ago) by jmiccolis
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-5, DRUPAL-6--1, DRUPAL-5--2
File MIME type: text/javascript
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