Permalink
Browse files

For some reason the drupal.org CVS-to-GIT migration was totally botch…

…ed and lost all of my revisions.

So, I am remigrating them in here.
  • Loading branch information...
1 parent 08ac0ed commit d5ca18d356c92ec334017c5f011b84f2f18d6a75 @brendoncrawford brendoncrawford committed Apr 7, 2011
Showing with 3,032 additions and 407 deletions.
  1. +0 −180 Ajax.js
  2. +14 −0 CHANGELOG
  3. +12 −0 README
  4. +0 −7 README.md
  5. +5 −0 ajax.info
  6. +73 −0 ajax.install
  7. +317 −0 ajax.js
  8. +560 −0 ajax.module
  9. +6 −0 ajax_ui/ajax_ui.info
  10. +78 −0 ajax_ui/ajax_ui.install
  11. +328 −0 ajax_ui/ajax_ui.module
  12. +6 −0 jquery/README
  13. +637 −0 jquery/jquery.a_form.js
  14. +11 −0 jquery/jquery.a_form.packed.js
  15. +7 −0 plugins/captcha/ajax_captcha.info
  16. +105 −0 plugins/captcha/ajax_captcha.module
  17. +11 −0 plugins/captcha/patches/README
  18. +35 −0 plugins/captcha/patches/captcha.module.patch
  19. +18 −0 plugins/captcha/patches/image_captcha.module.patch
  20. +18 −0 plugins/captcha/patches/text_captcha.module.patch
  21. +7 −0 plugins/comment/ajax_comment.info
  22. +111 −0 plugins/comment/ajax_comment.module
  23. +8 −0 plugins/disable_redirect/README
  24. +7 −0 plugins/disable_redirect/ajax_disable_redirect.info
  25. +47 −0 plugins/disable_redirect/ajax_disable_redirect.install
  26. +38 −0 plugins/disable_redirect/ajax_disable_redirect.js
  27. +37 −0 plugins/disable_redirect/ajax_disable_redirect.module
  28. +7 −0 plugins/fckeditor/ajax_fckeditor.info
  29. +26 −0 plugins/fckeditor/ajax_fckeditor.js
  30. +24 −0 plugins/fckeditor/ajax_fckeditor.module
  31. +7 −0 plugins/loggintoboggan/ajax_logintoboggan.info
  32. +49 −0 plugins/loggintoboggan/ajax_logintoboggan.module
  33. +7 −0 plugins/quicktabs/ajax_quicktabs.info
  34. +41 −0 plugins/quicktabs/ajax_quicktabs.js
  35. +24 −0 plugins/quicktabs/ajax_quicktabs.module
  36. +6 −0 plugins/scroller/ajax_scroller.info
  37. +77 −0 plugins/scroller/ajax_scroller.js
  38. +34 −0 plugins/scroller/ajax_scroller.module
  39. +6 −0 plugins/thickbox/ajax_thickbox.info
  40. +46 −0 plugins/thickbox/ajax_thickbox.js
  41. +24 −0 plugins/thickbox/ajax_thickbox.module
  42. +7 −0 plugins/tinymce/ajax_tinymce.info
  43. +26 −0 plugins/tinymce/ajax_tinymce.js
  44. +24 −0 plugins/tinymce/ajax_tinymce.module
  45. +7 −0 plugins/webform/ajax_webform.info
  46. +32 −0 plugins/webform/ajax_webform.module
  47. +7 −0 plugins/wysiwyg/ajax_wysiwyg.info
  48. +31 −0 plugins/wysiwyg/ajax_wysiwyg.js
  49. +24 −0 plugins/wysiwyg/ajax_wysiwyg.module
  50. 0 translations/.gitignore
  51. +0 −5 zzzz_ajax.info
  52. +0 −215 zzzz_ajax.module
View
180 Ajax.js
@@ -1,180 +0,0 @@
-/**
- * Ajax form validation and submission
- *
- * @author BrendonC
- */
-
-var Ajax = new Object;
-
-Ajax.conf = {
- jquery_ver : '1.2.0'
-}
-
-Ajax.pass = true;
-
-Ajax.preprocess = function() {
- var v, i, _i, j_ver, jq_current_ver, pass;
- jq_current_ver = jQuery.fn.jquery.toString();
- v = jq_current_ver.split('.');
- j_ver = Ajax.conf.jquery_ver.split('.');
- for (i = 0, _i = j_ver.length; i < _i; i++) {
- if (parseInt(v[i]) < parseInt(j_ver[i])) {
- window.alert(
- "Required minumum jquery version is " +
- Ajax.conf.jquery_ver + ". The version currently installed " +
- "is " + jq_current_ver + ". Please follow the instructions " +
- "which were provided with the jQuery Update Module for upgrading " +
- "jQuery. The jQuery Update homepage can be found at " +
- "http://drupal.org/project/jquery_update. Until jQuery is upgraded, " +
- "AJAX validation will not be activated for this form.");
- Ajax.pass = false;
- }
- }
-}
-
-
-Ajax.go = function(submitter_) {
- var data, loadingBox, formObj, data, submitter, submitterVal, thisForm;
- if (!Ajax.pass) {
- return false;
- }
- else {
- formObj = $(submitter_.form);
- submitter = $(submitter_);
- submitterVal = submitter.val();
- data = formObj.serializeArray();
- data[data.length] = {
- name: submitter.attr('name'),
- value: submitterVal
- };
- data[data.length] = {
- name: 'ajax',
- value: 1
- };
- submitter.val('Loading...');
- /**
- * Eventually we may want to append the submit hidden
- * field to the form list
- */
- $.ajax({
- url: formObj[0].getAttribute('action'),
- data: data,
- type: 'POST',
- async: true,
- dataType: 'json',
- success: function(data){
- submitter.val(submitterVal);
- Ajax.response(submitter, formObj, data);
- }
-
- })
- return false;
- }
-}
-
-
-Ajax.scroller = function(submitter) {
- var scroll_weight, box, found, timer;
- scroll_weight = 100;
- timer = window.setInterval(function() {
- box = submitter;
- found = false;
- // Watch for thickbox
- while (box.parentNode !== null && box.id !== 'TB_window') {
- box = box.parentNode;
- // Document
- if (box === document) {
- if (box.documentElement.scrollTop &&
- box.documentElement.scrollTop > 0) {
- box.documentElement.scrollTop -= scroll_weight;
- found = true;
- }
- }
- // Body
- else if (box === document.body) {
- if (box.scrollTop &&
- box.scrollTop > 0) {
- box.scrollTop -= scroll_weight;
- found = true;
- }
- }
- // Window
- else if (box === window) {
- if ((window.pageYOffset && window.pageYOffset > 0) ||
- (window.scrollY && window.scrollY > 0)) {
- window.scrollBy(0, -scroll_weight);
- found = true;
- }
- }
- // Any other element
- else {
- if (box.scrollTop &&
- box.scrollTop > 0) {
- box.scrollTop -= scroll_weight;
- found = true;
- }
- }
- }
- // Check if completed
- if (!found) {
- window.clearInterval(timer);
- }
- return true;
- }, 100);
-}
-
-Ajax.message = function(messages, type, formObj, submitter) {
- var i, _i, thisItem, log, errBox, h;
- log = $('<ul>');
- errBox = $(".messages." + type, formObj[0])
- for (i = 0, _i = messages.length; i < _i; i++) {
- thisItem = $('#' + messages[i].id, formObj[0])
- thisItem.addClass(type);
- if (messages[i].required) {
- thisItem.addClass('required');
- }
- log.append('<li>' + messages[i].value + '</li>');
- }
- if (errBox.length === 0) {
- errBox = $("<div class='messages " + type + "'>");
- formObj.prepend(errBox);
- }
- errBox.html(log);
- Ajax.scroller(submitter[0]);
-}
-
-Ajax.response = function(submitter, formObj, data){
- /**
- * Failure
- */
- if (data.status === false) {
- Ajax.message(data.messages_error, 'error', formObj, submitter);
- }
- /**
- * Success
- */
- else {
- // If no redirect, then simply show messages
- if (data.redirect === null) {
- if (data.messages_status.length > 0) {
- Ajax.message(data.messages_status, 'status', formObj, submitter);
- }
- if (data.messages_warning.length > 0) {
- Ajax.message(data.messages_warning, 'warning', formObj, submitter);
- }
- if (data.messages_status.length === 0 &&
- data.messages_warning.length === 0) {
- Ajax.message([{
- id : 0,
- value : 'Submission Complete.'
- }], 'status', formObj, submitter);
- }
- }
- // Redirect
- else {
- window.location.href = '/' + data.redirect;
- }
- }
-}
-
-Ajax.preprocess();
View
@@ -0,0 +1,14 @@
+2009-05-02
+
+ * Changed 'complete' hook to 'redirect'. Please update
+ all your plugins accordingly.
+ * Added 'afterMessage' hook.
+ * Moved scrolling functionality into separate plugin.
+ Be sure to update your config accordingly.
+ * Changed args structure to 'message' hook. Be sure to
+ update your plugins accordingly.
+
+2009-05-12
+
+ * Minor documentation additions to captcha patches README
+ * Minor text changes to ajax_ui and ajax_scroller info descriptions
View
12 README
@@ -0,0 +1,12 @@
+##
+## Ajax.module
+##
+
+Author: Brendon Crawford
+Date: 2009-01-17
+Homepage: http://drupal.org/project/ajax
+IRC: irc://freenode.net/#drupy
+
+For up-to-date documentation, please visit http://drupal.org/node/349961 .
+
+
View
@@ -1,7 +0,0 @@
-Drupal AJAX Forms
-==========
-
-Automatically validates and submits any Drupal form using AJAX. This module needs to run last.
-
-
-
View
@@ -0,0 +1,5 @@
+name = Ajax
+description = Automatically validates and submits any Drupal form using AJAX.
+package = Ajax
+core = 6.x
+
View
@@ -0,0 +1,73 @@
+<?php
+ /**
+ * Automatic AJAX forms validation, preview, and submission
+ *
+ * @see http://drupal.org/project/ajax
+ * @see irc://freenode.net/#drupy
+ * @depends Drupal 6
+ * @author brendoncrawford
+ * @note This file uses a 79 character width limit.
+ *
+ */
+
+
+ /**
+ * hook_install
+ *
+ * @return Bool
+ */
+function ajax_install() {
+ db_query(
+ "UPDATE {system} SET " .
+ " weight = 81 " .
+ "WHERE " .
+ " name = 'ajax' AND " .
+ " type = 'module' "
+ );
+ return TRUE;
+}
+
+/**
+ * Update 0
+ *
+ * @return Array
+ */
+function ajax_update_6100() {
+ return array();
+}
+
+/**
+ * Update 1
+ *
+ * @return Array
+ */
+function ajax_update_6101() {
+ return array();
+}
+
+/**
+ * Update 2
+ *
+ * @return Array
+ */
+function ajax_update_6102() {
+ return array();
+}
+
+/**
+ * Update 3
+ *
+ * @return Array
+ */
+function ajax_update_6103() {
+ $ret = array();
+ $ret[] = update_sql(
+ "UPDATE {system} SET " .
+ " weight = 81 " .
+ "WHERE " .
+ " name = 'ajax' AND " .
+ " type = 'module' "
+ );
+ return $ret;
+}
+
Oops, something went wrong.

0 comments on commit d5ca18d

Please sign in to comment.