Newer
Older
Moshe Weitzman
committed
// $Id$
// Content type form
Drupal.behaviors.og_content_type = function() {
// Disable the group limit textarea if the content type is not a standard group post
$('input[name="og_content_type_usage"]').click(function(){
if (!$('#edit-og-content-type-usage-group-post-standard').attr('checked')) {
$('#edit-og-max-groups').attr('disabled','disabled');
} else {
$('#edit-og-max-groups').removeAttr('disabled');
}
});
// Initial check to see if content type is standard group post
if (!$('#edit-og-content-type-usage-group-post-standard').attr('checked')) {
$('#edit-og-max-groups').attr('disabled','disabled');
};
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
}
Drupal.verticalTabs = Drupal.verticalTabs || {};
Drupal.verticalTabs.og_nodeapi = function() {
var values = [];
$('.vertical-tabs-og_nodeapi #edit-og-groups :selected')
.each(function (i, selected) {
values[i] = $(selected).text();
});
return values.join(', ');
}
Drupal.verticalTabs.og = function() {
var type = $('.vertical-tabs-og input[type=radio]:checked').val();
switch (type) {
case 'group':
return Drupal.t('Group node');
break;
case 'omitted':
return Drupal.t('May not be posted into a group.');
break;
case 'group_post_standard':
return Drupal.t('Standard group post');
break;
case 'group_post_wiki':
return Drupal.t('Wiki group post');
break;
}
}