Index: dblclick.module =================================================================== RCS file: /cvs/drupal/contributions/modules/dblclick/dblclick.module,v retrieving revision 1.3.2.3 diff -u -r1.3.2.3 dblclick.module --- dblclick.module 16 Jan 2007 12:58:12 -0000 1.3.2.3 +++ dblclick.module 15 Jun 2008 20:39:32 -0000 @@ -18,8 +18,8 @@ /** * Implementation of hook_help(). */ -function dblclick_help($section) { - switch ($section) { +function dblclick_help($path, $arg) { + switch ($path) { case 'admin/help#dblclick': return t('
This simple module has no configuration settings. It only implements one permission, but it allows users with proper permissions @@ -29,7 +29,7 @@ comment before it redirects them to edit form.
This module also implements an API hook to allow other modules to create their own double-click behaviors.
-', array('@access' => url('admin/user/access'))); +', array('@access' => url('admin/user/permissions'))); } } @@ -37,7 +37,24 @@ * Implementation of hook_init(). */ function dblclick_init() { - if ($_GET['dbl'] == 'true' && user_access('double click')) { + if (user_access('double click')) { + // add the dblclick.js file + $path = drupal_get_path('module', 'dblclick'); + drupal_add_js($path .'/dblclick.js'); + drupal_add_js($path .'/dblclick.js', 'module', 'header', TRUE); + + // add a little bit of "extra" information for javascript to use + $data = array( + 'dblClick' => array( + 'dblDest' => '&dbl'. drupal_get_destination(), + 'dblTime' => variable_get('dblclick_time', 300) + ) + ); + drupal_add_js($data, 'setting'); + } + + + if ((@$_GET['dbl'] == 'true') && (user_access('double click'))) { // modules can create a "hook_dblclick" $results = module_invoke_all('dblclick'); if (!in_array(FALSE, $results)) { @@ -59,31 +76,6 @@ /** - * Implementation of hook_menu(). - */ -function dblclick_menu($may_cache) { - $items = array(); - - if (!$may_cache) { - if (user_access('double click')) { - // add the dblclick.js file - $path = drupal_get_path('module', 'dblclick'); - drupal_add_js($path .'/dblclick.js'); - - // add a little bit of "extra" information for javascript to use - $data = array( - 'dblClick' => array( - 'dblDest' => '&dbl'. drupal_get_destination(), - 'dblTime' => variable_get('dblclick_time', 300) - ) - ); - drupal_add_js($data, 'setting'); - } - } - return $items; -} - -/** * Implementation of hook_dblclick() * * @abstract Index: dblclick.js =================================================================== RCS file: /cvs/drupal/contributions/modules/dblclick/dblclick.js,v retrieving revision 1.4.2.2 diff -u -r1.4.2.2 dblclick.js --- dblclick.js 16 Jan 2007 12:58:12 -0000 1.4.2.2 +++ dblclick.js 15 Jun 2008 20:39:32 -0000 @@ -51,7 +51,7 @@ // exclude blocks from dhtml_menu module because of conflicts $('a[@href]:not("[@href*=":"]):not([@onclick]):exclude(div[@id^="block-dhtml_menu"] a)') .each(function(){this.oldclick = this.onclick}) - .unclick() + .unbind('click') .click(Drupal.dblClick.clicker) .dblclick(Drupal.dblClick.dblClicker); }); Index: dblclick.info =================================================================== RCS file: /cvs/drupal/contributions/modules/dblclick/dblclick.info,v retrieving revision 1.3.2.1 diff -u -r1.3.2.1 dblclick.info --- dblclick.info 19 Nov 2006 04:30:17 -0000 1.3.2.1 +++ dblclick.info 15 Jun 2008 20:39:31 -0000 @@ -1,4 +1,5 @@ -; $Id: dblclick.info,v 1.3.2.1 2006/11/19 04:30:17 jjeff Exp $ +; $Id$ name = Double Click description = Double click internal links to do special things. -package = User interface \ No newline at end of file +package = User interface +core = 6.x \ No newline at end of file