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

Diff of /contributions/modules/annotation/annotation.js

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

revision 1.9, Thu Apr 30 23:02:36 2009 UTC revision 1.10, Fri May 1 02:27:17 2009 UTC
# Line 20  Drupal.settings.annotationBtStyle = jQue Line 20  Drupal.settings.annotationBtStyle = jQue
20        var $submit = $('#edit-submit', source.annotationForm);        var $submit = $('#edit-submit', source.annotationForm);
21        var $edit = $('#edit-comment', source.annotationForm).focus().keyup(function() {        var $edit = $('#edit-comment', source.annotationForm).focus().keyup(function() {
22          if ($(this).attr('value') === '') {          if ($(this).attr('value') === '') {
23          $submit.attr('disabled', 'disabled');            $submit.attr('disabled', 'disabled');
24          }          }
25          else {          else {
26            $submit.removeAttr('disabled');            $submit.removeAttr('disabled');
# Line 59  Drupal.settings.annotationBtStyle = jQue Line 59  Drupal.settings.annotationBtStyle = jQue
59      // Edit annotation link.      // Edit annotation link.
60      $('a[href*=#annotation-edit]', source.annotationBox).click(function() {      $('a[href*=#annotation-edit]', source.annotationBox).click(function() {
61        var comment = Drupal.settings.annotationCommentsSource[source.attr('class').match(/\bannotation-(cid-\d+)\b/)[1]];        var comment = Drupal.settings.annotationCommentsSource[source.attr('class').match(/\bannotation-(cid-\d+)\b/)[1]];
62        source.annotate({        source.annotate(jQuery.extend({
63          comment: comment          comment: comment
64        });        }, eval('Drupal.' + comment.annotation.options)));
65        return false;        return false;
66      });      });
67    }    }
# Line 141  Drupal.behaviors.annotation = function(c Line 141  Drupal.behaviors.annotation = function(c
141  }  }
142    
143  jQuery.fn.annotate = function(options) {  jQuery.fn.annotate = function(options) {
144    var opts = jQuery.extend(jQuery.annotation.defaults, options);    var opts = jQuery.extend({}, jQuery.annotation.defaults, options);
145    jQuery.annotation.active = true;    jQuery.annotation.active = true;
146    
147    if (opts.comment !== undefined) {    if (opts.comment !== undefined) {

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.2