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

Diff of /contributions/modules/views_bookmark/views_bookmark.js

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

revision 1.1.2.16, Tue Jun 10 01:49:27 2008 UTC revision 1.1.2.17, Tue Jun 10 19:09:46 2008 UTC
# Line 4  if (Drupal.jsEnabled) { Line 4  if (Drupal.jsEnabled) {
4    
5      // Helper function for flipping the bookmark link contents.      // Helper function for flipping the bookmark link contents.
6      function flipLink(element, settings) {      function flipLink(element, settings) {
7        // Get the current status by reading the class names.        // If this is a 'mark this' link...
8        var current_class = $(element).attr('class');        if ($(element).is('.views-bookmark-mark')) {
9        if (current_class.indexOf('views-bookmark-mark ') == -1) {          // ...then turn it into an 'unmark this' link;
10          // Add the mark link.          var new_link = $(settings.unmark);
         var new_link = $(settings.mark);  
11        }        }
12        else {        else {
13          // Add the unmark link.          // else, turn it into a 'mark this' link.
14          var new_link = $(settings.unmark);          var new_link = $(settings.mark);
15        }        }
16    
17        // Reattach the behavior to the new link.        // Reattach the behavior to the new link.

Legend:
Removed from v.1.1.2.16  
changed lines
  Added in v.1.1.2.17

  ViewVC Help
Powered by ViewVC 1.1.2