Started a port to Drupal 7. No big changes in the module are needed however I have one issue left to solve. After page load a js error is thrown:
Uncaught TypeError: Cannot read property 'ajaxIt' of undefined" (anonymous function)
The page will display white expect the toolbar as expected.

If I put the code produced by the module directly after $.ajaxIt = ajaxItMain; the module works.
May be related to the changes in D7 to Drupal.behaviors: http://drupal.org/node/224333#drupal_behaviors

Need to look further since I am not very familiar jquery so I am happy for hints.

note: Fixed some small things regarding coding standards like use of t().

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

s.Daniel’s picture

Assigned: Unassigned » s.Daniel

* OK got the js error fixed (thx@Johannes). http://drupal.org/node/224333#javascript_compatibility
* Changed the code lookup folder to sites/all/libraries/ajaxit
* Created a sandbox project http://drupal.org/sandbox/s.Daniel/1228116

Still some things like the admin menu entry needs fixing but the general functionality is there.

s.Daniel’s picture

Status: Active » Needs review
FileSize
5.68 KB

Added fix for overlay menu (exclude url set via hook_enable)
Added uninstall information to delete variables on uninstall.

Should be ready for testing now, check sandbox or attached patch.

s.Daniel’s picture

Updated README.txt to reflect changes of js lookup.

andypost’s picture

Status: Needs review » Needs work
+++ b/ajaxit.module
@@ -7,18 +7,26 @@
+ * Implementation of hook_enable().

1) Implements hook...
2) this function should be in .install
3) enabling the moduleshould overrride the variable value that been saved before disable?

disable!=uninstall

+++ b/ajaxit.module
@@ -66,41 +74,45 @@ function ajaxit_settings_form() {
+    $script .='$.ajaxIt.ajaxItArea = "' . variable_get('ajaxit_area', 'body') . '";' . "\n";
+    $script .='$.ajaxIt.basePath = "' . base_path() . '";' . "\n";

JS should use behaviors and Drupal.settings. I think basepath already there

+++ b/ajaxit.module
@@ -66,41 +74,45 @@ function ajaxit_settings_form() {
+      } ¶

trailing whitespace and dreditor shows more

mefisto75’s picture

Can we get a dev version? Maybe main page?

s.Daniel’s picture

@andypost thanks :) I'll look into that asap. (Still might take a few days)

One more todo: Add more default EXCLUDE URLs. These are mine atm:

admin
node/add
node/([A-Za-z0-9-]+)/edit
user/([A-Za-z0-9-]+)/edit
user/([A-Za-z0-9-]+)/shortcuts
node/([A-Za-z0-9-]+)/webform
imce
locationmap
batch
lee20’s picture

Subscribing. Hoping to see a D7 branch for this module soon!

s.Daniel’s picture

@lee20: The sandbox version works allthough it is buggy there is nothing that should break your site seriously so you can use this version if you must or provide a patch so we can get a propper d7 version. No guarantee on that but I feel good enough about it to use it on a live site.
I'll finish it at some time but since I've got exams coming up this will take one or two more months.

btw: No need to "subscribe" there is a follow button now ;)

lee20’s picture

@s.Daniel

I tried your sandbox version and there were a couple issues out of the box. If I wind up going with this module I will submit some patches.

I am aware of the follow button. But on short threads like this it is good to leave a note to let those involved know there is interest!

apoc1’s picture

Hey, interesting module. Is there any chance yet to release a dev or beta version of it?

s.Daniel’s picture

Note: You should exclude mailto* as well or mailto:... Links break.

waleedq’s picture

@s.Daniel good job man, i can add you as a co-maintainer so you can handle the the drupal 7 version, and maybe i can help with it also.