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

Diff of /contributions/modules/abuse/abuse.js

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

revision 1.1.2.2 by btmash, Wed May 14 19:13:19 2008 UTC revision 1.1.2.3 by btmash, Fri Jul 18 15:52:51 2008 UTC
# Line 24  $(function(){ Line 24  $(function(){
24                                  if(response.status) {                                  if(response.status) {
25                                          (Drupal.theme.onModerateContentComplete || onModerateContentComplete)(response, report);                                          (Drupal.theme.onModerateContentComplete || onModerateContentComplete)(response, report);
26                                  } else {                                  } else {
27                                          (Drupal.theme.onModerateContentError || onModerateContentError).call(response, report);                                          (Drupal.theme.onModerateContentError || onModerateContentError)(response, report);
28                                  }                                  }
29                          }                          }
30                  });                  });
31    
32                  $('.abuse-report-allow, .abuse-report-remove', this).each(function(){                  $('.abuse-report-allow, .abuse-report-remove', this).each(function(){
33                          var $submit = $(':submit', this), submit = $submit[0];                          var $submit = $(':submit', this), submit = $submit[0];
34                          $('<a href="#"></a>')                          $('<a href="#" class="button"></a>')
35                          .text($submit.attr('value'))                          .text($submit.attr('value'))
36                          .appendTo($actions)                          .insertBefore($form)
37                          .bind('click', function(event){                          .bind('click', function(event){
38                                  form.clk = submit;                                  form.clk = submit;
39                                  $form.trigger('submit');                                  $form.trigger('submit');
# Line 44  $(function(){ Line 44  $(function(){
44                  $('.abuse-report-warn-and-allow, .abuse-report-warn-and-remove', this).each(function(){                  $('.abuse-report-warn-and-allow, .abuse-report-warn-and-remove', this).each(function(){
45                          var $element = $(this);                          var $element = $(this);
46    
47                          $('<a href="#"></a>')                          $('<a href="#" class="button"></a>')
48                          .text($(':submit', this).attr('value'))                          .text($(':submit', this).attr('value'))
49                          .appendTo($actions)                          .insertBefore($form)
50                          .bind('click', function(event){                          .bind('click', function(event){
51                                    $(this).toggleClass('button-active');
52                                  $('legend a', $element).trigger('click');                                  $('legend a', $element).trigger('click');
53                                  return false;                                  return false;
54                          });                          });
# Line 59  $(function(){ Line 60  $(function(){
60                                          var body = $(this).next('dd').text();                                          var body = $(this).next('dd').text();
61                                          $('a', this).bind('click', function(){                                          $('a', this).bind('click', function(){
62  //                                              $(':input[@id^="edit-allow-subject"]', $element).val(subject);  //                                              $(':input[@id^="edit-allow-subject"]', $element).val(subject);
63                                                  $(':input[@id^="edit-allow-body"]', $element).val(body);                                                  $(':input[@id^="edit-allow-body"], :input[@id^="edit-remove-body"]', $element).val(body);
64                                                  return false;                                                  return false;
65                                          });                                          });
66                                  })                                  })
# Line 70  $(function(){ Line 71  $(function(){
71    
72                  });                  });
73    
74                    $('.abuse-report-ban', this).each(function(){
75                            var message = $('.form-item', this).text();
76                            var $submit = $(':submit', this), submit = $submit[0];
77                            $('<a href="#" class="button"></a>')
78                            .text($submit.attr('value'))
79                            .insertBefore($form)
80                            .bind('click', function(event){
81                                    if(confirm(message)) {
82                                            form.clk = submit;
83                                            $form.trigger('submit');
84                                    }
85                                    return false;
86                            });
87                    });
88    
89          });          });
90  });  });

Legend:
Removed from v.1.1.2.2  
changed lines
  Added in v.1.1.2.3

  ViewVC Help
Powered by ViewVC 1.1.3