/[drupal]/contributions/modules/fasttoggle/fasttoggle.toggle.inc
ViewVC logotype

Diff of /contributions/modules/fasttoggle/fasttoggle.toggle.inc

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

revision 1.1, Sun Oct 7 12:44:04 2007 UTC revision 1.1.2.1, Sat Nov 8 11:09:20 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id$  // $Id: fasttoggle.toggle.inc,v 1.1 2007/10/07 12:44:04 timcn Exp $
3    
4  /**  /**
5   * Menu callback. Toggle options for a node if the action is confirmed via   * Menu callback. Toggle options for a node if the action is confirmed via
# Line 29  function fasttoggle_node_option($node, $ Line 29  function fasttoggle_node_option($node, $
29            'callback' => 'node',            'callback' => 'node',
30            'option' => $option,            'option' => $option,
31            'status' => $node->$option,            'status' => $node->$option,
32              'className' => 'fasttoggle-status-node-'. $option .'-'. intval($node->$option),
33          ));          ));
34          exit;          exit;
35        }        }
# Line 81  function fasttoggle_user_option($user, $ Line 82  function fasttoggle_user_option($user, $
82          drupal_set_header('Content-Type: text/javascript; charset=utf-8');          drupal_set_header('Content-Type: text/javascript; charset=utf-8');
83          echo drupal_to_js(array(          echo drupal_to_js(array(
84            'text' => $options[$option][intval($user->$option)],            'text' => $options[$option][intval($user->$option)],
85              'className' => 'fasttoggle-status-user-'. $option .'-'. intval($user->$option),
86          ));          ));
87          exit;          exit;
88        }        }
# Line 137  function fasttoggle_comment_option($comm Line 139  function fasttoggle_comment_option($comm
139            'callback' => 'comment',            'callback' => 'comment',
140            'option' => $option,            'option' => $option,
141            'status' => $comment->$option,            'status' => $comment->$option,
142              'className' => 'fasttoggle-status-comment-'. $option .'-'. (1 - intval($comment->$option)),
143          ));          ));
144          exit;          exit;
145        }        }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

  ViewVC Help
Powered by ViewVC 1.1.2